Smile CDR v2022.11.PRE
On this page:

40.1Getting Started
Experimental

 

The following sections outline how to get started and what are required to use this module.

40.1.1Configuration
Experimental

 

To enable this module, the following options can be done:

  1. Add “Amazon HealthLake Outbound REST Connector” module from the Smile CDR web admin console configuration page and configure the Amazon HealthLake REST Endpoint properties.
  2. Invoke Create Module endpoint including the property keys defined in Amazon HealthLake REST Endpoint.

Here’s a sample create module request:

{
  "moduleType": "ENDPOINT_AWSHEALTHLAKE_OUT",
  "options": [
    {
      "key": "endpoint.url",
      "value": "https://healthlake.us-east-1.amazonaws.com/datastore/123456789"
    },
    {
      "type": "region.name",
      "moduleId": "us-east-1"
    },
    {
      "type": "role.arn",
      "moduleId": "arn:aws:iam::290702338006:role/HealthLake-Session-Token"
    },
    {
      "type": "subscription.automanage.enabled",
      "moduleId": "true"
    },
    {
      "type": "subscription.criteria",
      "moduleId": "[*]"
    }
  ],
  "dependencies": [
    {
      "type": "PERSISTENCE_R4",
      "moduleId": "persistence"
    }
  ]
}

40.1.2Subscription
Experimental

 

In order to trigger delivery to Amazon HealthLake, a FHIR Subscription, which is a publish-subscribe (pub/sub) mechanism, is used to track resources as they are created and changed in Smile CDR’s FHIR repository. A subscription is defined using a Subscription resource, which will be created in the FHIR Storage Module that references the Amazon HealthLake Outbound REST Connector module. This subscription can use any valid criteria for data to be pushed to a delivery queue using Kafka Message Broker. Multi-Type Criteria may be helpful in order to propagate all resources of one or more resource types. This connector module, then, consumes from the delivery queue and sends the message to Amazon HealthLake.

The subscription must also include Delivering Delete Events and Delivering Latest Version extensions with their values set to true. With Delivering Delete Events set to true, all DELETE events are replicated which means that if a resource is deleted in Smile CDR, a delete operation for the resource is sent to Amazon HealthLake. With Delivering Latest Version to true, only the latest version of the resource will be transmitted to Amazon HealthLake.

Automatically Creating the Subscription

By setting the Auto-Manage Subscription Resource property of Amazon HealthLake Outbound REST Connector module to true, the module will automatically create a Subscription in the FHIR Storage module upon startup. This Subscription will use the criteria specified in Auto-Managed Subscription Criteria.

This subscription will be automatically created with a client-assigned ID matching the Amazon HealthLake Outbound REST Connector module ID (any _ characters in the module ID will be replaced by - in the Subscription ID due to FHIR limitations in the allowable characters in resource ID).

Letting the export module manage its own Subscription is generally the easiest option.

Manually Creating the Subscription

A subscription can also be manually created by submitting a Subscription resource to the FHIR endpoint.

Note that the Subscription resource must include the following as in the example below:

It is possible to create multiple subscriptions to the same module, although care must be taken to avoid having overlapping criteria (this may result in the same resource being delivered twice).

{
   "resourceType":"Subscription",
   "id":"endpoint-awshealthlake-out-connector",
   "status":"requested",
   "criteria":"[*]",
   "channel":{
      "extension":[
         {
            "url":"https://smilecdr.com/fhir/ns/StructureDefinition/subscription-channel-rest-delivery-class",
            "valueString":"ca.cdr.awshl.out.deliverer.OutboundAwsHealthlakeSubscriptionDeliverer"
         },
         {
            "url":"https://smilecdr.com/fhir/ns/StructureDefinition/subscription-channel-awshealthlake-sender-module-id",
            "valueString":"endpoint_awshealthlake_out_connector"
         },
         {
            "url":"http://hapifhir.io/fhir/StructureDefinition/subscription-send-delete-messages",
            "valueBoolean":true
         },
         {
            "url":"http://hapifhir.io/fhir/StructureDefinition/subscription-resthook-deliver-latest-version",
            "valueBoolean":true
         }
      ],
      "type":"rest-hook"
   }
}

40.1.3Start/Stop/Restart Module
Experimental

 

After the module has been created and configured, the module is displayed in Smile CDR Web Admin Console with the status. Green checkmark icon indicates that the module is up and running. Orange stop icon indicates that the module is stopped (not running).

There are two ways to manage module startup:

  1. Using module configuration start/stop/restart buttons
  2. Using module config endpoint