HealthLake Inbound Adapters
InterSystems provides two inbound adapters that can be used to retrieve FHIR® resources from HealthLake, one for performing a Read interaction and another for performing a Search interaction. In FHIR, interactions are the actions you can take to work with FHIR resources in a repository like HealthLake. The Read interaction retrieves a single resource based on its ID while the Search interaction retrieves one or more resources that meet certain search criteria. This distinction is important when retrieving a single resource by ID. If you use the adapter that performs a Read interaction, only the resource is returned from Healthlake. However, if you search by ID using the adapter that performs a Search interaction, you receive a bundle that contains the resource, not just the resource by itself. Both inbound adapters are used by a business service to retrieve a FHIR payload from a HealthLake data store and bring it into the production.
Reading a Single Resource
By incorporating a business service that uses the EnsLib.AmazonHealthLake.InboundAdapterOpens in a new tab adapter, your production can retrieve a resource from a HealthLake data store by specifying its resource type and ID. This inbound adapter performs a FHIR Read interactionOpens in a new tab. The adapter's properties include the HealthLake data store, the resource type, and the resource ID, along with an option to delete a resource from HealthLake once it has been retrieved. Like most adapter properties, these properties can be set in the Management Portal once the business service has been added to the production.
When a business service calls this inbound adapter, the resource that matches the resource type and ID defined in the adapter is returned in an EnsLib.AmazonHealthLake.InboundInputOpens in a new tab object. The JSON representation of the FHIR resource is placed in the object's PayLoad property as a Stream, while the data store ID, resource type, and resource ID are stored in the object as Strings.
When creating a custom business service that uses the EnsLib.AmazonHealthLake.InboundAdapter adapter, be sure that the OnProcessInput method accepts the EnsLib.AmazonHealthLake.InboundInput object as its first argument. For details on creating a custom business service, see Defining Business Services.
Searching for Resources
A business service that uses the EnsLib.AmazonHealthLake.InboundAdapterQueryOpens in a new tab adapter retrieves resources from a HealthLake data store by providing a resource type and search criteria. This inbound adapter performs a FHIR Search interactionOpens in a new tab with a context limited to the specified resource type.
When defining the adapter's properties, the SearchType property sets the resource type of the search, for example, Patient or Observation. The SearchParameters property is a string of valid FHIR search parameters supported by HealthLake. Like most adapter properties, these properties can be set by viewing the business service in the Management Portal. As an example, if the properties of the adapter are DatastoreID="12asdf45", SearchType="Patient" and SearchParameters="name=Smith&birthdate=1944-08-23", then the equivalent search syntax used by the adapter is:
For a list of search parameters supported by HealthLake, see the HealthLake DocumentationOpens in a new tab.
Resources of the specified resource type that match the search criteria defined in the adapter are returned in an EnsLib.AmazonHealthLake.InboundInputQueryOpens in a new tab object, which is consumed by the business service using the adapter. The data store ID, resource type, and search parameters are returned as String properties of the object, while the FHIR bundle returned by the search is stored as a Stream in the PayLoad property.
When creating a custom business service that uses the EnsLib.AmazonHealthLake.InboundAdapterQuery adapter, be sure that the OnProcessInput method accepts the EnsLib.AmazonHealthLake.InboundInputQuery object as its first argument. For details on creating a custom business service, see Defining Business Services.