FHIR Connector > Mappings and mapping tasks with FHIR > FHIR objects in mappings
  

FHIR objects in mappings

When you create a mapping, you can configure a Source or Target transformation to represent a FHIR source or target. In the transformation, select the FHIR connection and then configure the REST API operation and request message.

FHIR sources in mappings

When you configure a Source transformation, select the FHIR connection and use a GET operation to access a FHIR resource. You can configure the request message using the request message template.
The following table describes the FHIR source properties that you can configure in a Source transformation:
Property
Description
Connection
Name of the source connection.
Operation
REST API operation to perform on the FHIR resource. Select a GET operation.
The following table describes the advanced properties that you can configure in a Source transformation:
Property
Description
Path
Path to the FHIR resource, such as /Patient. This path is appended to the base path in the FHIR connection.
Request Body Type
Type of input to send in the request body. Select buffer or file.
Content Type
Media type of the request. Select one of the following options:
  • - application/fhir+xml
  • - application/fhir+json
  • - application/xml
  • - application/json
Overrides the media type of the request specified in the connection.
Accept
Media type of the response. Select one of the following options:
  • - application/fhir+xml
  • - application/fhir+json
  • - application/xml
  • - application/json
Overrides the media type of the response specified in the connection.
Additional Headers
Additional headers that the connection requires.
Define headers in JSON format. For example:
[{"Name":"Content-Type","Value":"application/fhir+json"},{"Name":"accept","Value":"text/xml"}]
Overrides the additional headers specified in the connection.
Convert request/response data format
Converts the data format in the GET response between XML and JSON. If the response is in XML format, this option converts it to JSON format. If the response is in JSON format, this option converts it to XML format.
Response Directory
Directory to store the response.
Response Headers Directory
Directory to store response headers.
Tracing Level
Amount of detail that appears in the log for the source. Use the following tracing levels:
  • - Terse
  • - Normal
  • - Verbose Initialization
  • - Verbose
Default is Normal.
Cache Size for Web Service Response (KB)
Memory available for the web service response.
If the web service response contains many rows or columns, you might want to increase the cache size. Default is 1024 KB. Maximum is 99999 KB.
Optimize Transformation
Select this option to improve performance for processing records from hierarchical to relational format or from relational to hierarchical format.

Request message

In the Source transformation, you can configure the request message to specify request headers, path parameters, and query parameters to access a resource on a FHIR server.
You can configure the following headers and parameters in the request message:
requestHeaders
Request headers are additional headers that the connection requires.
Define headers in JSON format. For example:
[{"Name":"Content-Type","Value":"application/fhir+json"},{"Name":"accept","Value":"text/xml"}]
Note: You can configure request headers in the request message, the FHIR connection properties, and the advanced properties of the Source transformation. When you define a header in the request message, it overrides the request headers in the connection properties and in the advanced properties.
pathParams
Path parameters are a sequence of values that replace the values in the path of the request message.
For example, you might want to access a FHIR resource at the following path:
https://hapi.fhir.org/baseR4/Patient/593251/_history/2
In the advanced properties, configure the following path:
/Patient/{id}/{history}/{version}
Then, in the request message, configure the following value for pathParams:
<pathParams>59321,_history,2<pathParams/>
queryParams
Query parameters are used to query resources on the FHIR server using search criteria that are available for the resource.
For example, you can use the following query parameters to access a patient in https://hapi.fhir.org/baseR4/Patient:
<queryParams>given=Benjamin;identifier=bcook74;gender=male
<queryParams/>
At run time, the query parameters resolve to https://hapi.fhir.org/baseR4/Patient?given=Benjamin&identifier=bcook74&gender=male.
You can find examples of search parameters and modifiers in the FHIR Specification documentation. However, not all search criteria and modifiers are available in mappings.

FHIR targets in mappings

When you configure a Target transformation, select the FHIR connection and use a REST API operation to update the FHIR resource.
The following table describes the FHIR target properties that you can configure in a Target transformation:
Property
Description
Connection
Name of the target connection.
Operation
REST API operation to perform on the FHIR resource. Select a POST, PUT, DELETE, or PATCH operation.
The following table describes the advanced properties that you can configure in a Target transformation:
Property
Description
Path
Path to the FHIR resource, such as /Patient. This path is appended to the base path in the FHIR connection.
For example, if the base URL of the FHIR server is https://hapi.fhir.org/baseR4, this property appends /Patient to access a patient resource.
Request Body Type
Type of input to send in the request body. Select buffer or file.
Content Type
Media type of the request. Select one of the following options:
  • - application/fhir+xml
  • - application/fhir+json
  • - application/xml
  • - application/json
Overrides the media type of the request specified in the connection.
Accept
Media type of the response. Select one of the following options:
  • - application/fhir+xml
  • - application/fhir+json
  • - application/xml
  • - application/json
Overrides the media type of the response specified in the connection.
Additional Headers
Additional headers that the connection requires.
Define headers in JSON format. For example:
[{"Name":"Content-Type","Value":"application/fhir+json"},{"Name":"accept","Value":"text/xml"}]
Overrides the additional headers specified in the connection.
Convert request/response data format
Converts the data format in the REST API request body between XML and JSON. If the request body is in XML format, this option converts it to JSON format. If the request body is in JSON format, this option converts it to XML format.
Response Directory
Directory to store the response.
Response Headers Directory
Directory to store response headers.
Tracing Level
Amount of detail that appears in the log for the source. Use the following tracing levels:
  • - Terse
  • - Normal
  • - Verbose Initialization
  • - Verbose
Default is Normal.
Cache Size for Web Service Response (KB)
Memory available for the web service response.
If the web service response contains many rows or columns, you might want to increase the cache size. Default is 1024 KB. Maximum is 99999 KB.
Transaction Commit Control
Control to commit or roll back transactions based on the set of rows that pass through the transformation. Use the transaction commit control if you have a large amount of data and you want to control how it is processed.
Transaction Scope
Scope of the transaction. Select all input or only the transaction.
Optimize Transformation
Select this option to improve performance for processing records from hierarchical to relational format or from relational to hierarchical format.