MedMij:V2019.01 FHIR IG: verschil tussen versies
(Changes for 2019.01 April 2020 patch release) |
(Wijzigingen voor MM-1095) |
||
Regel 165: | Regel 165: | ||
* Literal (internal/external) references are preferred over logical references when a choice in resource type is available. | * Literal (internal/external) references are preferred over logical references when a choice in resource type is available. | ||
+ | |||
+ | == Usage of the <code>id</code> and <code>fullUrl</code> elements in FHIR instances == | ||
+ | |||
+ | === <code>id</code> versus <code>identifier</code> === | ||
+ | FHIR recognizes two fields that are used as identifier for instances: <code>id</code> and <code>identifier</code>. Although these are both identifiers, they are unrelated and serve a completely different purpose: | ||
+ | * <code>id</code> is the logical identifier, or technical identifier, akin to the id-field in a database. It is used as a unique handle for every instance on a particular server, and is needed to construct the URL to the instance. As such, it is used for referring between resources. The <code>id</code> has no further meaning outside of the server. | ||
+ | * <code>identifier</code> is a business identifier, which has a meaning ''outside'' of the server. Examples are a registration number of a healthcare provider, a BSN or social security number for citizens, ISBNs for books, etc. Any instance may have multiple kinds of identifiers. | ||
+ | |||
+ | This section is about the <code>id</code> field and more general about the concept of a logical/technical id to identify instances on a server. The usage of the <code>identifier</code> field, i.e. the business identifier, cannot be described in general terms and will be dictated one a use-case basis by the particular profiles. | ||
+ | |||
+ | === When is <code>id</code> expected? === | ||
+ | |||
+ | As stated above, the logical id is meant to uniquely identify instances on a particular server; it is a vital component when using FHIR within a RESTful context. So as a rule of thumb, the <code>id</code> element should always be present when dealing with instances that have a logical id, thus with instances on a server. This means: | ||
+ | * Any operation where an existing instance on the server is addressed, like reading or updating, ''needs'' a logical id to target said instance for the URL. In these cases, <code>id</code> field SHALL be populated in both the request and the response, and it SHALL match the id in the URL. | ||
+ | * When a client sends a ''new'' instance to a server using a create operation, the <code>id</code> element is ''not'' expected to be present, but the server SHALL populate it in the response. This is because upon sending, these new instances don't exist yet on the server, so a logical id has no meaning. But whenever it is created on the server, it should get a logical id assigned by the server. (Note: it is not strictly prohibited to populate the <code>id</code> field when sending a new instance, but the server SHOULD ignore it). | ||
+ | * When a client performs a search on a server, all instances in the returned searchset Bundle SHALL have the <code>id</code> field populated. Note that in some situations, servers might not support logical id's, for example when it is a stateless middleware server that gets its input from a non-FHIR XIS backend. If this is the case ''and'' if the use case doesn't require read support, [[#uuid-as-logical-id|a single use UUID]] or [[#oid-as-logical-id|an OID]] may be used to populate the <code>id</code> field; however, a server SHOULD try its best to populate it with a meaningful value. | ||
+ | |||
+ | === Logical ids, <code>fullUrl</code>s and references in Bundles === | ||
+ | |||
+ | There are several FHIR operations, like searching or batch create operations, where multiple instances are placed together in a Bundle. These instances will usually contain references to each other. These internal references cannot be resolved simply by inspecting the <code>id</code> element of every instance; it is not guaranteed that all instances have a logical id. Instead, Bundles allow an <code>entry.fullUrl</code> element for each instance which may be used for references. This is an additional mechanism to the logical id, not a replacement: | ||
+ | * The [[#When_is_id_expected.3F|guidelines above]] for populating the <code>id</code> field still apply. | ||
+ | * If <code>id</code> is present, <code>fullUrl</code> SHALL correspond with it (see below). | ||
+ | |||
+ | <code>fullUrl</code>s may be RESTful URLs, UUIDs or even OIDs, based on the situation (which may be mixed within the same Bundle): | ||
+ | ; Instances with a logical id: If an instance can be accessed on the server using RESTful operations, the <code>id</code> of that instance in the Bundle will be populated. The corresponding <code>fullUrl</code> in this case SHALL be the absolute URL to the instance on the server.<p>Instances within the Bundle may use relative references to each other, like they are on the same server. The FHIR machinery specifies how to find the matching instance based on the <code>fullUrl</code>.</p> | ||
+ | ; Instances without a logical id: When instances are to be created on a server or when the server doesn't support reading individual instances, they don't have a logical id. When these id-less instances need to be referenced from within a Bundle, there are two alternatives: | ||
+ | :* <span id="uuid-as-logical-id"></span>UUIDs can be used as single-use ids that will change each time the Bundle is generated. The <code>fullUrl</code> for the instance will be the UUID prefixed with <code><nowiki>urn:uuid:</nowiki></code>, while the <code>id</code> field (if present) is the unprefixed UUID. | ||
+ | :* <span id="oid-as-logical-id"></span>OIDs can be used if the instance has an OID-based ''business'' identifier (i.e. the <code>identifier</code> field), like the UZI number of a healthcare provider. The <code>fullUrl</code> will be the OID prefixed with <code><nowiki>urn:oid:</nowiki></code>, while the <code>id</code> field (if present) is the unprefixed OID. However, the use of OIDs as id has some limitations: | ||
+ | :** The <code>id</code> has a maximum length of 64 characters, so only OIDs that contain less than 64 characters can be used. | ||
+ | :** OID-based id's are expected to be stable, just like RESTful ids. Different Bundle instances SHALL always use the same OID-based ids. | ||
+ | : Instances within the Bundle should use the prefixed version of the UUID/OID for referencing. | ||
+ | |||
+ | ==== Example ==== | ||
+ | Consider a client that wants to send a new Observation instance to a server and simultaneously link it to an existing Task instance. This can be done using a transaction Bundle: | ||
+ | <syntaxhighlight lang="xml" highlight="7-8,11,23-24,27-28,33-34,41-42" style="max-height:400px; overflow: auto;"> | ||
+ | <Bundle xmlns="http://hl7.org/fhir"> | ||
+ | <!-- Transaction Bundle that will simultaneously create a new instance and update an existing one --> | ||
+ | <type value="transaction"/> | ||
+ | |||
+ | <!-- A new instance to create --> | ||
+ | <entry> | ||
+ | <!-- The new instance doesn't have a logical id yet, so a temporary UUID is used for references within the Bundle --> | ||
+ | <fullUrl value="urn:uuid:0e855422-b8ef-4247-9443-f3747e78747e"/> | ||
+ | <resource> | ||
+ | <Observation> | ||
+ | <!-- The id field is absent, because the instance doesn't exist yet on the server --> | ||
+ | ... | ||
+ | </Observation> | ||
+ | </resource> | ||
+ | </entry> | ||
+ | <request> | ||
+ | <method value="POST"/> | ||
+ | <url value="Observation"/> | ||
+ | </request> | ||
+ | |||
+ | <!-- An existing instance to update with a reference to the new instance --> | ||
+ | <entry> | ||
+ | <!-- RESTful URL of existing Task instance --> | ||
+ | <fullUrl value="http://example-xis.com/Task/1234"/> | ||
+ | <resource> | ||
+ | <Task> | ||
+ | <!-- Logical id of the instance, matches the fullUrl --> | ||
+ | <id value="1234"/> | ||
+ | ... | ||
+ | <output> | ||
+ | ... | ||
+ | <valueReference> | ||
+ | <!-- Reference to the fullUrl of the new instance --> | ||
+ | <reference value="urn:uuid:0e855422-b8ef-4247-9443-f3747e78747e"/> | ||
+ | </valueReference> | ||
+ | </output> | ||
+ | </Task> | ||
+ | </resource> | ||
+ | <request> | ||
+ | <method value="PUT"/> | ||
+ | <!-- The path on the server, consistent with fullUrl and id --> | ||
+ | <url value="Task/1234"/> | ||
+ | </request> | ||
+ | </entry> | ||
+ | </Bundle> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | The server response should then look like: | ||
+ | <syntaxhighlight lang="xml" highlight="5-6,9-10,28-29" style="max-height:400px; overflow: auto;"> | ||
+ | <Bundle xmlns="http://hl7.org/fhir"> | ||
+ | <type value="transaction-response"/> | ||
+ | |||
+ | <entry> | ||
+ | <!-- The newly created instance gets the logical id "5678" from the server --> | ||
+ | <fullUrl value="http://example-xis.com/QuestionnaireResponse/5678"/> | ||
+ | <resource> | ||
+ | <Observation> | ||
+ | <!-- The id matches the fullUrl --> | ||
+ | <id value="5678"/> | ||
+ | ... | ||
+ | </Observation> | ||
+ | </resource> | ||
+ | </entry> | ||
+ | <response> | ||
+ | .... | ||
+ | </request> | ||
+ | |||
+ | <entry> | ||
+ | <fullUrl value="http://example-xis.com/Task/1234"/> | ||
+ | <resource> | ||
+ | <Task> | ||
+ | <id value="1234"/> | ||
+ | ... | ||
+ | <output> | ||
+ | ... | ||
+ | <valueReference> | ||
+ | <!-- Reference to the relative URL of the created instance may be relative --> | ||
+ | <reference value="Observation/5678"/> | ||
+ | </valueReference> | ||
+ | </output> | ||
+ | </Task> | ||
+ | </resource> | ||
+ | <response> | ||
+ | .... | ||
+ | </response> | ||
+ | </entry> | ||
+ | </Bundle> | ||
+ | </syntaxhighlight> | ||
==Use of coded concepts== | ==Use of coded concepts== |
Versie van 28 mei 2020 10:52
{{#customtitle:MedMij FHIR Implementation Guide}}
Quick links
1 About the IG
This is the technical MedMij FHIR implementation guide based on HL7® FHIR® version STU3.
1.1 Purpose
An implementation guide for making use of FHIR in the Dutch context. This guide is developed specifically for the use of HL7® FHIR® between personal health records(PHR) and healthcare provider systems (XIS). PHR and XIS vendors that participate in MedMij conform to a framework of agreements, in Dutch this is called the 'afsprakenstelsel.' HL7 FHIR, or just 'FHIR', plays an important role among those agreements and is used as a standard to exchange health information between the involved parties. The purpose of this guide is to describe use cases and provide technical guidance on how to implement FHIR in these situations. This guide outlines the FHIR building blocks, or profiles, involved in these use cases. Moreover, this guide provides a textual explanation of these building blocks and describes their relationship and boundaries.
1.2 Scope
The scope of this guide includes requirements to enable PHR and XIS in the Dutch realm to use standardized structured data in a defined inter-organizational transaction. Health is a vast domain. Therefore, MedMij has made scoping choices for its roadmap. MedMij starts with a limited number of medical subdomains but has the vision to elaborate on more domains later. In scope domains are first described in the functional design that underlies this technical design.
1.3 Background
MedMij aims to stimulate electronic information exchange between patients and caregivers. Caregivers generally have access to software applications to help them support their work in treating patients. Software applications for patients are evolving as we speak, but patients typically are not yet enabled to be regarded as a true partner in the care process. MedMij delivers an agreements scheme to enable patients to become that true partner. The section #Afsprakenstelsel describes the relation to this implementation guide.
Information standards have a functional and technical component. The functional part contains definitions of relevant concepts (dataset) and scenario’s that define when to exchange which of those concepts. The technical part translates the functional scenario’s in an exchange format (such as HL7v3 or FHIR). The stakeholders in MedMij have chosen to introduce FHIR as a modern standard to exchange information in MedMij. A dutch factsheet that explains why FHIR is chosen is available on the MedMij website. MedMij delivers a FHIR representation (profiles) for each domain in scope.
The program ‘Registratie aan de bron’ (Data capture at the point of Care) has defined Health and Care Information models (zorginformatiebouwstenen or zibs) for The Netherlands. zibs contain definitions of healthcare concepts. MedMij information standards contain mappings to these zibs. MedMij creates FHIR profiles based on zibs which include mappings to the relevant zib concepts. As a result, the created profiles enable context-free implementation. Therefore, these profiles are applicable in a broader context than the described use cases or the MedMij context. Reuse of these profiles enables interoperability for health information.
1.4 Audience
The main target audience of this implementation guide is software vendors and developers that will implement FHIR as part of electronic information exchange under MedMij. This IG is intended for developers of PHR as well as XIS vendors. Users of this guide are expected to be familiar with the FHIR specification and resource processing. This guide provides links to relevant sections of the FHIR specification. This implementation guide is not intended to be a tutorial on that subject.
1.5 Language
This implementation guide is written in English, even though the majority of the documentation in MedMij is in Dutch. A Dutch translation of this document may become available. However, the English version is and remains leading. The rationale for choosing English is as follows. Implementers in healthcare are in many cases foreign, e.g., through outsourcing or because the company is a multinational. But even if they are Dutch native speakers, the educational tracks, their programming language of choice, and the implementer communities they are part of will largely be based on the English language. In creating the documentation for the target audience, we have received overwhelming preference from the MedMij implementer community for English. English documentation saves them investments and risks in getting a translation agency on a per vendor basis for each version of the documentation, while at the same time not alienating the native Dutch speaking audience. As a side effect it also helps Nictiz in the international realm in discussions with relevant initiatives such as Argonaut (US), Patients Know Best (UK), the Finnish PHR, and the HL7/FHIR community at large.
2 Afsprakenstelsel
The 'afsprakenstelsel' references the MedMij information standards. In addition, the MedMij information standards are specified in the context of the 'afsprakenstelsel.' This applies to the implementation guidance of the use cases described in this implementation guide.
For example, all use cases performed in the context of a specific authenticated patient, for which an OAuth2 token has been retrieved using the Authentication mechanisms described in the 'afsprakenstelsel'. This token must be passed in each call in the HTTP header named “Authorization”. Each XIS Gateway is required to perform filtering based on the patient associated with the OAuth2 token received for the request so that only the records associated with the authenticated patient are returned.
3 Functional design
All use cases described in this implementation guide have a functional counterpart. The functional design pages are written in Dutch. The main overarching wiki page of the functional designs can be found at here. From this page, you can link to the specific use case through the patient journey image or the table index. It is possible to link to the specific functional design page from the technical use case pages in this wiki by clicking on the functional circle in the top image.
4 Use cases
Implementation guidance is provided per use case on separate wiki pages. The next section provides implemenation guidance that apply for all use cases. The green circles represent the available use cases. Click on the circle to go to the use case page.
5 Use case overarching principles
5.1 Content Types and encodings
MedMij uses the FHIR RESTful framework. This framework defines at least three content-types to send/retrieve information. Clients may ask servers specifically for information in a given content-type. Servers SHALL support server-driven content negotiation as described in section 12 of the HTTP specification.
- XML: application/fhir+xml
- JSON: application/fhir+json
- RDF: text/turtle - Not supported in MedMij
Servers in MedMij SHALL support both XML and JSON. Clients MAY negotiate using the HTTP standard which they prefer. If a client does not request a specific content-type, then it is server discretion if they respond using XML or JSON content-type.
FHIR uses UTF-8 for all request and response bodies. Since the HTTP specification (section 3.7.1) defines a default character encoding of ISO-8859-1, requests and responses SHALL explicitly set the character encoding to UTF-8 using the charset parameter of the MIME-type in the Content-Type header. Requests MAY also specify this charset parameter in the Accept header and/or use the Accept-Charset header.
5.2 Retrieve information: what's new
Retrieving information that was added, changed, deleted relative to a date may be done using the search parameter _lastUpdated
available for any resource. Using the parameter _lastUpdated
a system may query for data that is new since the previous query. Any FHIR server is expected to support this parameter _lastUpdated
.
The search parameter _lastUpdated can be used to select resources based on the last time they were changed:
GET [base]/Observation?_lastUpdated=gt2018-10-01
This search finds any observations changed since Oct 1, 2018. More information may be found in the section _lastUpdated in the FHIR specification: http://hl7.org/fhir/STU3/search.html#lastUpdated.
An example search request is shown below.
GET [base]/Consent?category=http://snomed.info/sct|11291000146105&_lastUpdated=gt2018-10-01
This search finds all Consent resources with a category SNOMED code 11291000146105 that have been changed since Oct 1, 2018.
5.3 Use of the reference datatype
FHIR resources act like the internet where resources point to each other through references. The reference datatype is comparable to web pages pointing to other web pages, scripts and images. Each reference may be either internal or external. The datatype supports a display attribute, comparable to a link title in a web page, and an identifier. The identifier acts as a logical reference when the literal reference is not known. Literal references work based on the FHIR logical id, not the identifier, attribute.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Reference | Σ I | Element | A reference from one resource to another + SHALL have a contained resource if a local reference is provided + SHALL have a reference or identifier unless specified otherwise * | |
reference | Σ | 0..1 | string | Literal reference, Relative, internal or absolute (not preferred) URL |
identifier | Σ | 0..1 | Identifier | Logical reference, when literal reference is not known |
display | Σ | 1..1 | string | Text alternative for the resource |
In loosely coupled context it is usually good practice to include information rather than have systems progressively retrieve it. When the FHIR servers are in fact a facade on non-FHIR systems, it may not be possible to build external references from the resource id, as non-FHIR systems may not support that concept. Example: a resource for the general practitioner will have an AGB and/or UZI identifier in any information system, the id for the same resource might not be known anywhere. The expectation within MedMij is therefore that the vast majority of references will be based on internal references or identifier.
The basic requirements for using references in MedMij are:
- The reference, if used, SHALL be resolvable
- External references SHALL be regarded in the same context as the resource itself. For internal references, this is guaranteed by default. If the current security context is insufficient for retrieving the reference, then additional negotiation for appropriate privileges may be required.
- External references are preferably relative as opposed to absolute.
- The display attribute SHALL be used to provide a very short description of the target resource.
Note: there is a known weakness in the Reference datatype for FHIR STU3 which is fixed in FHIR R4. When the reference datatype element could point to multiple types of resources, e.g. Patient.generalPractitioner reference(Organization | Practitioner), you cannot know what type is meant when you only have an identifier for reference. For this reason:
* Note: the Reference datatype SHALL have a reference or identifier unless specified otherwise. There is a known limitation in some of the FHIR STU3 resources where the appropriate reference type is not available. Examples include PractitionerRole which is missing from Encounter.participant (prevents proper context of the attending physician) and Patient which is missing from Media.operator (prevents patient-generated Media). In such cases, an extension will contain the reference of the appropriate type. This leads to slight duplication: the original Reference.display will be duplicated into the Reference.extension.valueReference.display. Systems that do not know about the extension would thus still have access to the regular Reference.display.
- Literal (internal/external) references are preferred over logical references when a choice in resource type is available.
5.4 Usage of the id
and fullUrl
elements in FHIR instances
5.4.1 id
versus identifier
FHIR recognizes two fields that are used as identifier for instances: id
and identifier
. Although these are both identifiers, they are unrelated and serve a completely different purpose:
id
is the logical identifier, or technical identifier, akin to the id-field in a database. It is used as a unique handle for every instance on a particular server, and is needed to construct the URL to the instance. As such, it is used for referring between resources. Theid
has no further meaning outside of the server.identifier
is a business identifier, which has a meaning outside of the server. Examples are a registration number of a healthcare provider, a BSN or social security number for citizens, ISBNs for books, etc. Any instance may have multiple kinds of identifiers.
This section is about the id
field and more general about the concept of a logical/technical id to identify instances on a server. The usage of the identifier
field, i.e. the business identifier, cannot be described in general terms and will be dictated one a use-case basis by the particular profiles.
5.4.2 When is id
expected?
As stated above, the logical id is meant to uniquely identify instances on a particular server; it is a vital component when using FHIR within a RESTful context. So as a rule of thumb, the id
element should always be present when dealing with instances that have a logical id, thus with instances on a server. This means:
- Any operation where an existing instance on the server is addressed, like reading or updating, needs a logical id to target said instance for the URL. In these cases,
id
field SHALL be populated in both the request and the response, and it SHALL match the id in the URL. - When a client sends a new instance to a server using a create operation, the
id
element is not expected to be present, but the server SHALL populate it in the response. This is because upon sending, these new instances don't exist yet on the server, so a logical id has no meaning. But whenever it is created on the server, it should get a logical id assigned by the server. (Note: it is not strictly prohibited to populate theid
field when sending a new instance, but the server SHOULD ignore it). - When a client performs a search on a server, all instances in the returned searchset Bundle SHALL have the
id
field populated. Note that in some situations, servers might not support logical id's, for example when it is a stateless middleware server that gets its input from a non-FHIR XIS backend. If this is the case and if the use case doesn't require read support, a single use UUID or an OID may be used to populate theid
field; however, a server SHOULD try its best to populate it with a meaningful value.
5.4.3 Logical ids, fullUrl
s and references in Bundles
There are several FHIR operations, like searching or batch create operations, where multiple instances are placed together in a Bundle. These instances will usually contain references to each other. These internal references cannot be resolved simply by inspecting the id
element of every instance; it is not guaranteed that all instances have a logical id. Instead, Bundles allow an entry.fullUrl
element for each instance which may be used for references. This is an additional mechanism to the logical id, not a replacement:
- The guidelines above for populating the
id
field still apply. - If
id
is present,fullUrl
SHALL correspond with it (see below).
fullUrl
s may be RESTful URLs, UUIDs or even OIDs, based on the situation (which may be mixed within the same Bundle):
- Instances with a logical id
- If an instance can be accessed on the server using RESTful operations, the
id
of that instance in the Bundle will be populated. The correspondingfullUrl
in this case SHALL be the absolute URL to the instance on the server.Instances within the Bundle may use relative references to each other, like they are on the same server. The FHIR machinery specifies how to find the matching instance based on the
fullUrl
. - Instances without a logical id
- When instances are to be created on a server or when the server doesn't support reading individual instances, they don't have a logical id. When these id-less instances need to be referenced from within a Bundle, there are two alternatives:
- UUIDs can be used as single-use ids that will change each time the Bundle is generated. The
fullUrl
for the instance will be the UUID prefixed withurn:uuid:
, while theid
field (if present) is the unprefixed UUID. - OIDs can be used if the instance has an OID-based business identifier (i.e. the
identifier
field), like the UZI number of a healthcare provider. ThefullUrl
will be the OID prefixed withurn:oid:
, while theid
field (if present) is the unprefixed OID. However, the use of OIDs as id has some limitations:- The
id
has a maximum length of 64 characters, so only OIDs that contain less than 64 characters can be used. - OID-based id's are expected to be stable, just like RESTful ids. Different Bundle instances SHALL always use the same OID-based ids.
- The
- UUIDs can be used as single-use ids that will change each time the Bundle is generated. The
- Instances within the Bundle should use the prefixed version of the UUID/OID for referencing.
5.4.3.1 Example
Consider a client that wants to send a new Observation instance to a server and simultaneously link it to an existing Task instance. This can be done using a transaction Bundle:
<Bundle xmlns="http://hl7.org/fhir">
<!-- Transaction Bundle that will simultaneously create a new instance and update an existing one -->
<type value="transaction"/>
<!-- A new instance to create -->
<entry>
<!-- The new instance doesn't have a logical id yet, so a temporary UUID is used for references within the Bundle -->
<fullUrl value="urn:uuid:0e855422-b8ef-4247-9443-f3747e78747e"/>
<resource>
<Observation>
<!-- The id field is absent, because the instance doesn't exist yet on the server -->
...
</Observation>
</resource>
</entry>
<request>
<method value="POST"/>
<url value="Observation"/>
</request>
<!-- An existing instance to update with a reference to the new instance -->
<entry>
<!-- RESTful URL of existing Task instance -->
<fullUrl value="http://example-xis.com/Task/1234"/>
<resource>
<Task>
<!-- Logical id of the instance, matches the fullUrl -->
<id value="1234"/>
...
<output>
...
<valueReference>
<!-- Reference to the fullUrl of the new instance -->
<reference value="urn:uuid:0e855422-b8ef-4247-9443-f3747e78747e"/>
</valueReference>
</output>
</Task>
</resource>
<request>
<method value="PUT"/>
<!-- The path on the server, consistent with fullUrl and id -->
<url value="Task/1234"/>
</request>
</entry>
</Bundle>
The server response should then look like:
<Bundle xmlns="http://hl7.org/fhir">
<type value="transaction-response"/>
<entry>
<!-- The newly created instance gets the logical id "5678" from the server -->
<fullUrl value="http://example-xis.com/QuestionnaireResponse/5678"/>
<resource>
<Observation>
<!-- The id matches the fullUrl -->
<id value="5678"/>
...
</Observation>
</resource>
</entry>
<response>
....
</request>
<entry>
<fullUrl value="http://example-xis.com/Task/1234"/>
<resource>
<Task>
<id value="1234"/>
...
<output>
...
<valueReference>
<!-- Reference to the relative URL of the created instance may be relative -->
<reference value="Observation/5678"/>
</valueReference>
</output>
</Task>
</resource>
<response>
....
</response>
</entry>
</Bundle>
5.5 Use of coded concepts
Coded information is extremely important for interoperability between systems. It enables systems to act on information rather than have humans read everything for interpretation - it enables medication related alerts, exercise encouragements because of weight increase, and many more things. In the HCIMs and profiles, we therefore strive for complete coverage of all possible situations.
However it is likely that unknown codes present themselves in the communication, for example because the sending system has updated its medication codes to a newer version than the receiving system, or because an older record item is coded in a now deprecated way. Therefore, it is vital that the sender includes the semantics of the code in his communication using (CodeableConcept.)coding.display and/or CodeableConcept.text. Although it might be overkill for the generic profiles to use these fields in closely coupled situations. Within the loosely coupled MedMij context however, systems SHOULD include .display and/or .text for coded data in FHIR instances. Both could be absent for example in historic data or in data acquired without such info from a third party.
5.5.1 Mapping of coded concepts
Terminology from HCIMs or UCSDs (use case specific datasets) needs to be faithfully applied to the FHIR profiles, but this is not directly possible when the base FHIR resource defines required terminology that bears no direct relationship with the HCIM or UCSD. These cases include, but are not limited to, the FHIR resource elements of datatype 'code' (Patient.gender, status elements, structural type elements, etc.). This datatype always describes FHIR specific terminology, which usually doesn't align with the HCIM/UCSD terminology.
In these cases, a mapping will be provided to explain the relationship between de HCIM/UCSD terminology and the FHIR terminology. This is normally done through a FHIR ConceptMap, which can translate between the terminology used in the HCIM/UCSD, and the terminology that FHIR instances need to adhere to. Usually, the original terminology from the HCIM/UCSD will be communicated as well by adding the extension code-specification on the same element. This allows unambiguous interpretation on the receiver end.
Example snippet from an AllergyIntolerance where both the FHIR terminology high and the SNOMED CT 24484000 terminology are communicated. The FHIR terminology is obtained from the HCIM terminlogy using ConceptMap MateVanKritiekZijnCodelijst-to-allergy-intolerance-criticality:
<criticality value="high">
<extension url="http://nictiz.nl/fhir/StructureDefinition/code-specification">
<valueCodeableConcept>
<coding>
<system value="http://snomed.info/sct"/>
<display value="Severe"/>
</coding>
</valueCodeableConcept>
</extension>
</criticality>
Please note: Unfortunately, FHIR doesn't have a core structured way for indicating which ConceptMaps to use. Instead, mappings are documented in the description of the element in the profile and/or specifically on the mapping description contained in the element.
To retrieve the indicated ConceptMap on Simplifier, the canonical url from the description needs to be used as search term. We are still examining ways to make this more user friendly, for example by using the extension for ConceptMaps, but that does not work unless various third party tooling is updated.
5.6 Relating FHIR profiles with their functional definitions
All profiles have a traceable relationship with their functional counterpart(s) based on the element mapping mechanism in FHIR. This allows to:
- define one or more references from a FHIR profile to an external URL where the functional definition can be found
- define for each FHIR profile element to which concept within a functional definition it corresponds
The functional definition(s) underlying the profile can thus be resolved using the StructureDefinition.mapping metadata field of a profile. To relate a FHIR profile field to a concept from the functional description, the concept ID defined in the DataElement.mapping can be used to look up the concept in the functional definition. It is possible that a single profile element refers concepts from multiple functional descriptions. Simplifier will show an onverview of all the mappings for a FHIR profile on the dedicated 'mappings' tab, together with a clickable URL to the functional definition. In addition, on the 'overview' tab for each field the relevant mapping can be found.
For example, the profile nl-core-address defines a relationship with with four functional definitions, one of which is AddressInformation-v1.0(2017EN). This mapping is identified within the profile using 'hcim-addressinformation-v1.0-2017EN'. Looking at the 'Address.city' element in this profile, one of the mappings is defined as 'hcim-addressinformation-v1.0-2017EN:NL-CM:20.5.3'. This reveals that this element implements (amongst others) the concept from the HCIM AddressInformation-v1.0(2017EN) described using ID 'NL-CM:20.5.3'.
6 FHIR Packages
MedMij adopts the FHIR Packaging mechanism to support consistent versioning of profiles and related conformance resources such as OperationDefinitions. FHIR Packaging is based on the NPM Packaging mechanism and offers developers a convenient way to include the conformance resources in their favorite IDE. The relevant package version is indicated and linked in the information standards technical design page.
For even more background information:
- What is the problem that packaging could address
- Introducing the Simplifier FHIR Package Server (includes what problem packaging addresses)
- Firely Torinox introduction (this is one of the tools that's useful for working with FHIR packages)
- The HL7 wiki that outlines the base specification
It is not required to implement FHIR based information standards using the packaging mechanism. It is still possible to download all or selected resources from Simplifier on as-needed basis. You are however encouraged to invest in dealing with packages.
7 Relevant links
HL7 FHIR specification
Repository of MedMij FHIR artefacts
- Simplifier.net
- GitHub (similar to Simplifier.net)
8 Contact
MedMij
E: standaarden@medmij.nl
Nictiz
Feedback on content in open consultation
FHIR Questions and Discussions
9 Release notes
Release notes can be found on the functional design page.
10 Releases
Version
Date
Notes
2019.01
2019-03-11
Spring release containing fixes for all information standards
2018.06
2018-10-29
Added GGZ
2018.05
2018-09-24
Added GGZ for open consultation
2018.04
2018-08-29
eAfspraak fase 2
2018.03
2018-05-07
Published BgZ 2017 and GP Data
2018.02
2018-03-29
Added BgZ 2017
2018.01
2018-02-21
Added GP patient data
2017.04
2017-12-18
Added Appointments, Medication, Laboratory results, AllergyIntolerance, Self-measurements
2017.03
2017-11-07
Added PDF/A
2017.02
2017-10-11
Unchanged. No wiki pages created for FHIR
2017.01
2017-10-02
Initial version containing Patient Administration Resources, Patient Summary (BgZ),