Skip to main content

Supported FHIR Interactions and Operations

When using the Resource Repository storage strategy provided with the FHIR® server, the server supports the following interactions and operations. If your custom FHIR server extends the Resource Repository, it also supports these interactions and operations by default.

Interactions

FHIR interactionsOpens in a new tab 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. Click on an interaction to see how it is defined in the HL7 REST API and how to use it.

Interaction Level of Support
createOpens in a new tab Fully supported, including conditional create.
readOpens in a new tab

Conditional read is not supported.

vreadOpens in a new tab

Conditional read is not supported.

updateOpens in a new tab Fully supported, including conditional update.
patchOpens in a new tab Only JSON Patch documents are supported.
deleteOpens in a new tab Fully supported, including conditional delete.
historyOpens in a new tab

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.

batchOpens in a new tab Fully supported
transactionOpens in a new tab Circular references within the bundle are not supported.
search Supported with some limitations. For details, see Search Interaction.

Operations

For FHIR servers using or extending the default Resource Repository, the following operations are supported:

Operation Level of Support
$everything

Fully supported for Patient and Encounter.

Not supported for EpisodeOfCare, Group, MedicinalProduct, or MedicinalProductDefinition.

$validate

Partially supported. See “Profile Validation”.

$lastn Fully supported

Operation Query Parameters

For specific operations, certain operation query parameters are supported:

Operation Query Parameter
$everything
$lastn max is supported.

Recursive Behavior of the _type Operation Query Parameter for $everything

When a list of resource types is provided in the _type query parameter for the $everything operation, the compartment search will return only resources of the type listed. Recursive resource reference retrieval in the compartment will skip over references to resource types that are not specified in the _types parameter. Some examples illustrate how the _type query parameter for $everything operates on the PatientOpens in a new tab compartment:

  1. /Patient/123/$everything?_type=DiagnosticReport,Observation — returns DiagnosticReport and Observation resources but not the Patient resource.

  2. /Patient/123/$everything?_type=Observation — returns the patient's Observation resources, even though the referring DiagnosticReport resources are not included, because Observation is also in the Patient compartment.

  3. /Patient/123/$everything?_type=Practitioner — returns nothing. Practitioner is not in the Patient compartment, and no other resource type that could refer to Practitioner was specified.

  4. /Patient/123/$everything?_type=Patient,DiagnosticReport,Practitioner — returns the Patient resource, all of the DiagnosticReport resources, and only the Practitioner resources directly referred to by the returned DiagnosticReport resources.

Profile Validation

Note:

Profile validation is currently designed to work only with FHIR version R4. Later releases will target R5.

Intersystems IRIS for Health supports profile validation by implementing part of the FHIR standardOpens in a new tab for the $validate operation, which checks a resource against the most recent version of a specified profile.

The following query syntax options are supported:

  • You can specify the profile in the query URL:

    Query URL POST <FHIR Endpoint>/<Resource Type>/$validate?profile=<Profile URL>|<Profile Version Number>
    Body Resource details in XML or JSON format

    <Profile Version Number> is required. Note that the character separating <Profile URL> from <Profile Version Number> is a pipe, not a slash.

  • You can provide the profile in the query body, optionally specifying a supported mode:

    Query URL POST <FHIR Endpoint>/<Resource Type>/<Optional Resource ID>/$validate
    Body A Parameters block, which must include the resource details, and which may include the mode and a profile, in XML or JSON format.

    Providing a profile is optional. If no profile is provided, validation is performed based on the core schema for the resource type.

    <Optional Resource ID> may be required or forbidden, based on the value of the mode parameter, as follows:

    Value of mode ID Required? Checks Performed by $validate
    create Forbidden $validate operation confirms that no resource ID is included, and compares the potential new resource to the profile or the core schema for the resource type, if no profile is provided.
    update Required $validate operation checks that a resource ID is included in the request URL and matches the ID in the query body, that the resource URL resource type matches the resource included in the query body, and compares the potential outcome of the update to the profile or the core schema for the resource type, if no profile is provided.
    delete Required $validate operation checks to ensure that a resource ID is included in the request URL. This ID is required for the deletion operation, but no profile validation occurs.
    profile N/A Not Supported
    unspecified Forbidden $validate operation checks the resource in the query body against the profile or the core schema for the resource type, if no profile is provided.

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:

  1. In the Management Portal, switch to the namespace of your legacy FHIR server, and then create a STU3 endpoint.

  2. Open the InterSystems Terminal and navigate to the namespace of your legacy FHIR server.

  3. Run:

     do ##class(HS.FHIRServer.ConsoleSetup).Migrate()
  4. Select the STU3 endpoint and confirm the migration.

FeedbackOpens in a new tab