The Resource Repository is the default InteractionsStrategy for InterSystems IRIS for Health, allowing you to install a fully functioning FHIR® server without further development tasks. It automatically stores FHIR data received by the server as dynamic objects that encapsulate the JSON data structures of the FHIR data. Of course, you can extend the Resource Repository’s classes, HS.FHIRServer.Storage.Json.Interactions and HS.FHIRServer.Storage.Json.InteractionsStrategy, to refine how the FHIR server handles the FHIR data. The Resource Repository also comes with default FHIR operations in the HS.FHIRServer.Storage package.
The Resource Repository is not supported in Health Connect. Though you can create custom Interactions and InteractionsStrategy classes for a FHIR server in Health Connect, in most cases you are accepting FHIR into an interoperability production for other purposes. For more information, see FHIR Productions .
For more information about programmatically retrieving data from or storing data in the Resource Repository, see ObjectScript Applications. For more information about working with FHIR data once it is retrieved from the Resource Repository, see Working with FHIR Data.
What is Supported?
When using the Resource Repository strategy provided with InterSystems IRIS for Health, the FHIR server supports the following interactions and operations. If your custom FHIR server extends the Resource Repository, it also supports these interactions and operations.
FHIR interactions are the set of actions that a FHIR client can take on resources. These interactions can be grouped according to whether they act upon an instance, a type, or the whole system. An instance is a specific instance of a resource, for example, Patient/1 refers to an instance of a Patient resource with an id of 1. A type refers to a particular FHIR resource, for example, a Patient or Observation.
The following table summarizes the support for FHIR interactions in the Resource Repository, or a custom FHIR server that has extended the Resource Repository. If an interaction is not listed, it is not supported.
|create||Fully supported, including conditional create.|
|read||The _elementsparameter is not supported.
Conditional read is not supported.
|vread||The _elementsparameter is not supported.
Conditional read is not supported.
|update||Fully supported, including conditional update.|
|delete||Supported, but conditional delete is not supported.|
|history||Supported for instance interactions only, not type or system. For example, GET [baseURL]/Patient/1/_history is supported, but not GET [baseURL]/Patient/_history or GET [baseURL]/_history.
The _count and _at parameters are not supported.
Paging is not supported.
|transaction||Circular references within the bundle are not supported.|
|search||Supported with some limitations. For details, see Search Interaction.|
FHIR clients use the search interaction to retrieve resources from the Resource Repository. For full details about the search interaction, refer to FHIR specification. This section summarizes the default support for the search interaction when the FHIR server is using or extending the Resource Repository.
Keep in mind that a FHIR server using or extending the Resource Repository has the following limitations:
Does not support searching across multiple resource types. For example GET [base]?_id=1 is not supported.
You cannot perform a search on all resource types within a compartment. For example, you cannot search for [base]/Patient/10000001/?_id=008. Therefore, searches within the context of a compartment must specify a resource type in that compartment. For example, you can use [base]/Patient/100000001/Observation to return all Observations in the specific patient’s compartment or [base]/Patient/100000001/Observation?status=final to search for a subset of Observations within the compartment. If you want to retrieve a Patient’s entire compartment, use the $everything operation (for example, [base]/Patient/100000001/$everything).
Search Parameter Types
Each search parameter has a search parameter type that determines how the parameter behaves. The following search parameter types are supported. If a search parameter type is not listed, it is not supported.
The following standard search parameters are supported by the FHIR server when retrieving resource from the Resource Repository. If a parameter is not listed, it is not supported.
|_id||Fully supported as described in the FHIR specification|
|_lastUpdated||Fully supported as described in the FHIR specification|
|_tag||Fully supported as described in the FHIR specification|
|_profile||Fully supported as described in the FHIR specification|
|_security||Fully supported as described in the FHIR specification|
|_has||Fully supported as described in the FHIR specification|
Modifiers can be added to the end of a parameter to affect the results of the search. The following modifiers are supported.
|:exact||Supported for strings|
|:contains||Supported for strings|
|:above||Supported for uri|
|:below||Supported for uri|
|:type||Supported for references|
When using search parameters of type number, date, and quantity, you can add a prefix to the parameter’s value to affect what resources match the search. For example, [parameter]=le100 returns values that are less than exactly 100. The following prefixes are supported.
Search Result Parameters
Search result parameters help manage the resources returned by a search. The following search result parameters are supported. If a parameter is not listed, it is not supported.
|Search result parameter||Limitations/Notes|
|_sort||Fully supported as described in the FHIR specification|
|_count||Fully supported as described in the FHIR specification|
|_summary||Supports _summary=count only. For details, see the FHIR specification.|
|_include||Fully supported as described in the FHIR specification|
|_revinclude||Fully supported as described in the FHIR specification|
For InterSystems IRIS for Health using or extending the default Resource Repository, the following operations are supported:
The validation modes (create, update, delete) are supported.
Validation by profile is not supported.
When a FHIR $validate request includes a resource payload, the resource may be enclosed in a Parameters resource.
Migrating from Legacy Resource Repository
For FHIR servers developed using InterSystems IRIS for Health 2019.4 or earlier, the data in the legacy Resource Repository must be migrated before using the new FHIR server architecture. To migrate your FHIR data:
Open the InterSystems Terminal and navigate to the namespace of your legacy FHIR server.
Create a STU3 endpoint that will work with the data in the existing Resource Repository.
Run the installation and configuration utility:
do ##class(HS.FHIRServer.ConsoleSetup).Setup()Copy code to clipboard
Choose option 6) Migrate Data from pre-2020.1.
Select the STU3 endpoint and confirm the migration.