Skip to main content
InterSystems IRIS for Health 2024.3
AskMe (beta)
Loading icon

Using the HealthLake Inbound Adapters

Within a production, you can include custom business services that retrieve FHIR® resources from Amazon HealthLakeOpens in a new tab. To do so, create one or more business service classes as described here. Then add them to your production and configure them.

Introduction to the Adapters

InterSystems IRIS® data platform provides two inbound adapters that can be used to retrieve FHIR® resources from HealthLake:

Overall Behavior of the Adapters

Each of the HealthLake inbound adapters provides settings that you can use to specify the location of the FHIR® resources to check for, as well as settings to authenticate to AWS. When included in a business service, each of these adapters periodically polls for available resources. Then at each polling interval:

  1. If the adapter finds input from its configured data source, it constructs an input object to hold the data, and it calls the internal ProcessInput() method of the business service, passing the object to it. The input object depends upon the adapter.

  2. The internal ProcessInput() method of the business service receives the input object. It then performs basic production tasks such as maintaining internal information as needed by all business services. You do not customize or override this method, which your business service class inherits.

  3. The ProcessInput() method then calls your custom OnProcessInput() method, passing the input object. The requirements for this method are described in Implementing the OnProcessInput() Method.

  4. Your custom OnProcessInput() method examines the input object and sends it to other hosts in the production (or creates and sends new messages based on the input object).

Creating a Business Service

The following list describes the basic requirements of the business service class:

Implementing the OnProcessInput() Method

Within your business service class, your OnProcessInput() method should have one of the following signatures, depending on the inbound adapter class:

Where:

  • pInput is the input object created by the adapter, using data retrieved from HealthLake.

  • pOutput is the generic output argument required in the method signature. You can use a more specific message class in the method signature.

The OnProcessInput() method should do the following:

  1. Examine the input object (pInput) and decide how to use it.

    The PayLoad property of this object is an instance of %GlobalBinarySteam containing the JSON representation of the FHIR resource. Use methods and properties of %GlobalBinarySteam to work with this data. See Properties of the Input Object for information on other properties, which depend on the adapter you are using.

  2. Create an instance of the request message, which will be the message that your business service sends.

    For information on creating message classes, see Defining Messages.

  3. For the request message, set its properties as appropriate, using values in the input.

  4. Call a suitable method of the business service to send the request to some destination within the production. Specifically, call SendRequestSync(), SendRequestAsync(), or (less common) SendDeferredResponse(). For details, see Sending Request Messages.

    Each of these methods returns a status (specifically, an instance of %StatusOpens in a new tab).

  5. Make sure that you set the output argument (pOutput). Typically you set this equal to the response message that you have received. This step is required.

  6. Return an appropriate status. This step is required.

Properties of the Input Object

When you use EnsLib.AmazonHealthLake.InboundAdapterOpens in a new tab, the input object is an instance of EnsLib.AmazonHealthLake.InboundInputOpens in a new tab, which has the following properties:

  • PayLoad is an instance of %GlobalBinarySteam containing the JSON representation of the FHIR resource. Use methods and properties of %GlobalBinarySteam to work with this data.

  • DatastoreId, ResourceId, ResourceType are the ID of the data store, the ID of the resource, and the type of resource from which the data was obtained. These properties are all strings.

When you use EnsLib.AmazonHealthLake.InboundAdapterQueryOpens in a new tab, the input object is an instance of EnsLib.AmazonHealthLake.InboundInputQueryOpens in a new tab, which has the following properties:

  • PayLoad is an instance of %GlobalBinarySteam containing the JSON representation of the FHIR resource. Use methods and properties of %GlobalBinarySteam to work with this data.

  • DatastoreId is the ID of the data store from which the data was obtained. This property is a string.

  • SearchType is the type of search that was performed. This property is a string.

  • SearchParameters is the search parameters used to obtain the data. This property is a string.

Your OnProcessInput() method should examine these properties and use them as needed for your business case.

See Also

FeedbackOpens in a new tab