Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
typeflat

Overview

The following operations allow you to work with history in FHIR. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with history, see Sample configuration

OperationDescription
historyRetrieves the history of a particular resource supported by the system.
historyAllRetrieves the history of all resources supported by the system.

historyType

Retrieves the history of all resources of a given type supported by the system.

Operation details

This section provides further details on the operations related to history in FHIR.

FHIR solutions are built from a set of modular components called "Resources". These resources can easily be assembled into working systems that solve real world clinical and administrative problems at a fraction of the price of existing alternatives.

Anchor
history
history
History

To retrieves the history of a particular resource supported by the system , use fhir.history and specify the following properties.

Code Block
languagexml
titlehistory
<fhir.history>
     <base>{$ctx:base}</base>
     <type>{$ctx:type}</type>
	 <idForHistory>{$ctx:idForHistory}</idForHistory>
     <format>{$ctx:format}</format>
     <id>{$ctx:id}</id>
     <content>{$ctx:content}</content>
     <lastUpdated>{$ctx:lastUpdated}</lastUpdated>
     <profile>{$ctx:profile}</profile>
     <query>{$ctx:query}</query>
     <security>{$ctx:security}</security>
     <tag>{$ctx:tag}</tag>
     <text>{$ctx:text}</text>
     <filter>{$ctx:filter}</filter>
 </fhir.history>
Properties
  • base: The Service Root URL.
  • type: The name of a resource type (e.g. "Patient").
  • idForHistory: The id of the history that need to retrieve.
  • format: The Mime Type.
  • id, content, lastUpdated, profile, query, security, tag, text, filter: These are the optional parameters and are common search parameters for all resources
Anchor
request
request
Sample request

Following is a sample REST request that can be handled by the history operation.

Code Block
languagexml
titleSample Request for history operation
{
  "base": "https://open-api.fhir.me",
  "type": "Patient",
  "idForHistory":1032702",
  "format": "json",
  "id":"%s(id)",
  "content":"%s(content)",
  "lastUpdated":"%s(lastUpdated)",
  "profile":"%s(profile)",
  "query":"%s(query)",
  "security":"%s(security)",
  "tag":"%s(tag)",
  "text":"%s(text)",
  "filter":"%s(filter)"
}
Related Salesforce REST Documentation

http://www.hl7.org/implement/standards/fhir/http.html#history

Anchor
historyAll
historyAll
HistoryAll

To retrieves the history of all resources supported by the system. , use fhir.historyAll and specify the following properties.

Code Block
languagexml
titlehistoryAll
<fhir.historyAll>
     <base>{$ctx:base}</base>
     <format>{$ctx:format}</format>
     <id>{$ctx:id}</id>
     <content>{$ctx:content}</content>
     <lastUpdated>{$ctx:lastUpdated}</lastUpdated>
     <profile>{$ctx:profile}</profile>
     <query>{$ctx:query}</query>
     <security>{$ctx:security}</security>
     <tag>{$ctx:tag}</tag>
     <text>{$ctx:text}</text>
     <filter>{$ctx:filter}</filter>
 </fhir.historyAll>
Properties
  • base: The Service Root URL.
  • format: The Mime Type.
  • id, content, lastUpdated, profile, query, security, tag, text, filter: These are the optional parameters and are common search parameters for all resources
Anchor
request
request
Sample request

Following is a sample REST request that can be handled by the historyAll operation.

Code Block
languagexml
titleSample Request for historyAll operation
{
  "base": "https://open-api.fhir.me",
  "format": "json",
  "id":"%s(id)",
  "content":"%s(content)",
  "lastUpdated":"%s(lastUpdated)",
  "profile":"%s(profile)",
  "query":"%s(query)",
  "security":"%s(security)",
  "tag":"%s(tag)",
  "text":"%s(text)",
  "filter":"%s(filter)"
}
Related Salesforce REST Documentation

http://www.hl7.org/implement/standards/fhir/http.html#history

Anchor
historyType
historyType
HistoryType

To retrieves the history of all resources of a given type supported by the system , use fhir.historyType and specify the following properties.

Code Block
languagexml
titlehistoryType
<fhir.historyType>
     <base>{$ctx:base}</base>
	 <type>{$ctx:type}</type>
     <format>{$ctx:format}</format>
     <id>{$ctx:id}</id>
     <content>{$ctx:content}</content>
     <lastUpdated>{$ctx:lastUpdated}</lastUpdated>
     <profile>{$ctx:profile}</profile>
     <query>{$ctx:query}</query>
     <security>{$ctx:security}</security>
     <tag>{$ctx:tag}</tag>
     <text>{$ctx:text}</text>
     <filter>{$ctx:filter}</filter>
 </fhir.historyType>
Properties
  • base: The Service Root URL.
  • type: The name of a resource type (e.g. "Patient").
  • format: The Mime Type.
  • id, content, lastUpdated, profile, query, security, tag, text, filter: These are the optional parameters and are common search parameters for all resources
Anchor
request
request
Sample request

Following is a sample REST request that can be handled by the historyType operation.

Code Block
languagexml
titleSample Request for historyType operation
{
  "base": "https://open-api.fhir.me",
  "type":"Patient"
  "format": "json",
  "id":"%s(id)",
  "content":"%s(content)",
  "lastUpdated":"%s(lastUpdated)",
  "profile":"%s(profile)",
  "query":"%s(query)",
  "security":"%s(security)",
  "tag":"%s(tag)",
  "text":"%s(text)",
  "filter":"%s(filter)"
}
Related Salesforce REST Documentation

http://www.hl7.org/implement/standards/fhir/http.html#history

Anchor
sample
sample
Sample configuration

Following is a sample proxy service that illustrates how to connect to fhir with init operation and use the history operation. The sample request for this proxy can be found in the create sample request.

Code Block
languagexml
titleSample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="history"
       statistics="disable" trace="disable" transports="https http">
    <target>
        <inSequence>
            <property name="base" expression="json-eval($.base)"/>
            <property name="type" expression="json-eval($.type)"/>
            <property name="idForHistory" expression="json-eval($.idForHistory)"/>
            <property name="format" expression="json-eval($.format)"/>
            <property name="id" expression="json-eval($.id)"/>
            <property name="content" expression="json-eval($.content)"/>
            <property name="lastUpdated" expression="json-eval($.lastUpdated)"/>
            <property name="profile" expression="json-eval($.profile)"/>
            <property name="query" expression="json-eval($.query)"/>
            <property name="security" expression="json-eval($.security)"/>
            <property name="tag" expression="json-eval($.tag)"/>
            <property name="text" expression="json-eval($.text)"/>
            <property name="filter" expression="json-eval($.filter)"/>
            <fhir.history>
                <base>{$ctx:base}</base>
                <type>{$ctx:type}</type>
                <idForHistory>{$ctx:idForHistory}</idForHistory>
                <format>{$ctx:format}</format>
                <id>{$ctx:id}</id>
                <content>{$ctx:content}</content>
                <lastUpdated>{$ctx:lastUpdated}</lastUpdated>
                <profile>{$ctx:profile}</profile>
                <que>{$ctx:query}</que>
                <security>{$ctx:security}</security>
                <tag>{$ctx:tag}</tag>
                <text>{$ctx:text}</text>
                <filter>{$ctx:filter}</filter>
            </fhir.history>
            <log category="INFO" level="full" separator=","/>
            <send/>
        </inSequence>
    </target>
    <description/>
</proxy>