CTS2-LE Loader: FHIR: Unterschied zwischen den Versionen
Krebs (Diskussion | Beiträge) K |
Krebs (Diskussion | Beiträge) K (→FHIR value set definition file) |
||
| (12 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | This section describes the structural and semantical aspects of a FHIR value set definition | + | This section describes the structural and semantical aspects of a FHIR value set definition. |
| − | A background on FHIR | + | A background on FHIR and CTS2 entities is assumed since these subjects will not be presented in detail. |
== FHIR and CTS2 == | == FHIR and CTS2 == | ||
| Zeile 8: | Zeile 8: | ||
== FHIR value set definition file == | == FHIR value set definition file == | ||
| + | Find below the XML structure of a FHIR value set definition file with CTS expansions (highlighted). | ||
| + | The file was obtained from the [https://www.hl7.org/fhir/valueset.html FHIR website] and is presented with the following modifications: | ||
| + | * the element <expansion> is omitted | ||
| + | * comments are added for the sake of clarity | ||
| + | * FHIR-extensions are defined to add CTS attributes that are currently not represented through FHIR | ||
| + | |||
| + | |||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
| − | <ValueSet xmlns= | + | <ValueSet xmlns="http://hl7.org/fhir" xmlns:ext="http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#"> |
| − | + | <!-- in general, FHIR-extensions are used for items currently not present in FHIR. Then namespace http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#" (see above) has to be used --> | |
| − | + | <!-- 0..1 Logical id to reference this value set --> | |
| − | + | <!-- Attention: when 'defining' a code system, the 'identifier' element is not used/relevant because the defined code system is identified by '<define>/<system>' below; we do not build a wrapping VS so far --> | |
| − | extensions#" (see above) has to be used --> | ||
| − | |||
| − | |||
| − | '<define>/<system>' below; we do not build a wrapping VS so far --> | ||
<identifier value="[string]" /> | <identifier value="[string]" /> | ||
<!-- group corresponding to the terminology tree in the navigator: --> | <!-- group corresponding to the terminology tree in the navigator: --> | ||
<extension url="ext:groupName"> | <extension url="ext:groupName"> | ||
| − | + | <valueString value="[string]" /> | |
</extension> | </extension> | ||
| + | <!-- 0..1 Logical id for this version of the value set --> | ||
<version value="[string]" /> | <version value="[string]" /> | ||
| − | + | <!-- A free text natural language name describing the value set (in case of 'define' this will be internal name of the code system displayed in the navigator) --> | |
| − | |||
| − | |||
<name value="[string]" /> | <name value="[string]" /> | ||
| + | <!-- 0..1 Name of the publisher (Organization or individual) --> | ||
<publisher value="[string]" /> | <publisher value="[string]" /> | ||
| − | <telecom></telecom> | + | <telecom><!-- 0..* Contact Contact information of the publisher --></telecom> |
| − | <!-- A free text natural language description of the use of the defined | + | <!-- 1..1 A free text natural language description of the use of the defined code system or value set - reason for definition, conditions of use, etc.: --> |
| − | code system or value set - reason for definition, conditions of use, etc.: --> | ||
<description value="[string]" /> | <description value="[string]" /> | ||
| + | <!-- 0..1 About the value set or its content --> | ||
<copyright value="[string]" /> | <copyright value="[string]" /> | ||
| + | <!-- 1..1 draft | active | retired --> | ||
<status value="[code]" /> | <status value="[code]" /> | ||
| + | <!-- 0..1 If for testing purposes, not real usage --> | ||
<experimental value="[boolean]" /> | <experimental value="[boolean]" /> | ||
| + | <!-- 0..1 Whether this is intended to be used with an extensible binding --> | ||
<extensible value="[boolean]" /> | <extensible value="[boolean]" /> | ||
| + | <!-- 0..1 Date for given status --> | ||
<date value="[dateTime]" /> | <date value="[dateTime]" /> | ||
| + | |||
<!-- for CTS code system import --> | <!-- for CTS code system import --> | ||
<define> | <define> | ||
| − | <!-- IETF language tag (RFC 5646) restricted to 2-letter tags; so far | + | <!-- IETF language tag (RFC 5646) restricted to 2-letter tags; so far not checked; only relevant when 'define' a code system --> |
| − | not checked; only relevant when 'define' a code system --> | + | <extension url="ext:language"> |
| − | + | <valueCode value="[string]" /> | |
| − | + | </extension> | |
| − | + | <!-- URI to identify the code system --> | |
| − | + | <system value="[uri]" /> | |
| − | + | <!-- 0..1 Version of this system --> | |
| − | + | <version value="[string]" /> | |
| − | + | <!-- 0..1 If code comparison is case sensitive --> | |
| − | + | <caseSensitive value="[boolean]" /> | |
| − | + | <!-- 0..* Concepts in the code system --> | |
| − | + | <concept> | |
| − | + | <!-- 1..1 Code that identifies concept --> | |
| − | + | <code value="[code]" /> | |
| − | + | <!-- 0..1 If this code is not for use as a real concept --> | |
| − | + | <abstract value="[boolean]" /> | |
| − | + | <!-- 0..1 Text to Display to the user --> | |
| − | + | <display value="[string]" > | |
| + | <!-- 0..* extension for adding alternative designations --> | ||
| + | <extension url="ext:altDesignation"> | ||
| + | <valueString value="[string]" /> | ||
| + | </extension> | ||
| + | </display> | ||
| + | <!-- 0..1 Formal Definition --> | ||
| + | <definition value="[string]" /> | ||
| + | <concept> <!-- 0..* Content as for ValueSet.define.concept Child Concepts (is-a / contains) --> | ||
| + | </concept> | ||
| + | </concept> | ||
</define> | </define> | ||
<!-- for CTS value set import --> | <!-- for CTS value set import --> | ||
<compose> | <compose> | ||
| − | + | <import value="[uri]" /> | |
| − | + | <!-- 0..* Include one or more codes from a code system --> | |
| − | + | <include> | |
| − | + | <!-- 1..1 The system the codes come from --> | |
| − | + | <system value="[uri]" /> | |
| − | + | <!-- 0..1 Specific version of the code system referred to --> | |
| − | + | <version value="[string]" /> | |
| − | + | <!-- 0..* Code or concept from system --> | |
| − | + | <code value="[code]" /> | |
| − | + | <!-- 0..* Select codes/concepts by their properties (including relationships) --> | |
| − | + | <filter> | |
| − | + | <!-- 1..1 A property defined by the code system --> | |
| − | + | <property value="[code]" /> | |
| + | <!-- 1..1 = | is-a | is-not-a | regex | in | not in --> | ||
| + | <op value="[code]" /> | ||
| + | <!-- 1..1 Code from the system, or regex criteria --> | ||
| + | <value value="[code]" /> | ||
| + | </filter> | ||
| + | </include> | ||
| + | <exclude> | ||
| + | <!-- 0..* Content as for ValueSet.compose.include Explicitly exclude codes --> | ||
| + | </exclude> | ||
</compose> | </compose> | ||
| − | |||
| − | |||
</ValueSet> | </ValueSet> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | The following extensions are made: | |
| − | + | * ValueSet.extension url='''"ext:groupName"''' defines the group the value set belongs to, only relevant for viewing the value set in the navigator | |
| + | * ValueSet.define.extension url='''"ext:language"''' defines the default language of the value set | ||
| + | * ValueSet.define.display.extension url='''"ext:altDesignation"''' defines alternative terms for a concept | ||
| + | <!-- | ||
| + | The following elements do not have a CTS-Mapping so far and may remain empty: | ||
| + | * ValueSet.telecom | ||
| + | * ValueSet.copyright | ||
| + | * ValueSet.status | ||
| + | * ValueSet.experimental | ||
| + | * ValueSet.extensible | ||
| + | * ValueSet.date | ||
| + | * ValueSet.define.version | ||
| + | * ValueSet.define.caseSensitive | ||
| + | * ValueSet.define.concept.abstract | ||
| + | * ValueSet.compose.import | ||
| + | * ValueSet.compose.exclude | ||
| + | --> | ||
| + | As mentioned earlier, FHIR value sets may be mapped to either CTS code system or CTS value sets. The output is determined by the existence of the elements define and compose: a define-element leads to a code system (more precise: CodeSystemVersionCatalogEntry) being imported whereas compose hints that a value set (ValueSetDefinition) is the target CTS entity. | ||
| + | <!--Note that the current setting does not allow an import of definition files which contain both a define and a compose-element.--> | ||
| + | <!-- | ||
| + | === Code System Import === | ||
| + | The following figure presents how the FHIR XML elements are mapped to entities of the [[Mapping Terminologies to CTS2-LE|CTS2 information model]]. | ||
| + | [[Datei:FHIR2CTS CodeSystem.pdf|hochkant=5|FHIR mapping]] | ||
| + | --> | ||
<!-- | <!-- | ||
== Functional Scope == | == Functional Scope == | ||
Aktuelle Version vom 21. Juli 2015, 13:09 Uhr
This section describes the structural and semantical aspects of a FHIR value set definition. A background on FHIR and CTS2 entities is assumed since these subjects will not be presented in detail.
FHIR and CTS2
FHIR and CTS2 employ slightly different notions for value sets: Within FHIR, "A value set can define its own codes, and/or a value set can be composed of codes defined in other code systems, either by listing the codes or by providing a set of selection criteria […] Value set resources can be converted to CTS2 value set and code system resources." CTS2 explicitly distinguishes between value sets ("a set of entity references" ) and code systems ("a collection of codes or identifiers […] used for reporting, organizing, and/or reasoning about knowledge in some discipline, specialty, or domain"). When wanting to be precisely, either the suffix “FHIR” or “CTS” is given to indicate the indented meaning.
FHIR value set definition file
Find below the XML structure of a FHIR value set definition file with CTS expansions (highlighted). The file was obtained from the FHIR website and is presented with the following modifications:
- the element <expansion> is omitted
- comments are added for the sake of clarity
- FHIR-extensions are defined to add CTS attributes that are currently not represented through FHIR
<ValueSet xmlns="http://hl7.org/fhir" xmlns:ext="http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#">
<!-- in general, FHIR-extensions are used for items currently not present in FHIR. Then namespace http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#" (see above) has to be used -->
<!-- 0..1 Logical id to reference this value set -->
<!-- Attention: when 'defining' a code system, the 'identifier' element is not used/relevant because the defined code system is identified by '<define>/<system>' below; we do not build a wrapping VS so far -->
<identifier value="[string]" />
<!-- group corresponding to the terminology tree in the navigator: -->
<extension url="ext:groupName">
<valueString value="[string]" />
</extension>
<!-- 0..1 Logical id for this version of the value set -->
<version value="[string]" />
<!-- A free text natural language name describing the value set (in case of 'define' this will be internal name of the code system displayed in the navigator) -->
<name value="[string]" />
<!-- 0..1 Name of the publisher (Organization or individual) -->
<publisher value="[string]" />
<telecom><!-- 0..* Contact Contact information of the publisher --></telecom>
<!-- 1..1 A free text natural language description of the use of the defined code system or value set - reason for definition, conditions of use, etc.: -->
<description value="[string]" />
<!-- 0..1 About the value set or its content -->
<copyright value="[string]" />
<!-- 1..1 draft | active | retired -->
<status value="[code]" />
<!-- 0..1 If for testing purposes, not real usage -->
<experimental value="[boolean]" />
<!-- 0..1 Whether this is intended to be used with an extensible binding -->
<extensible value="[boolean]" />
<!-- 0..1 Date for given status -->
<date value="[dateTime]" />
<!-- for CTS code system import -->
<define>
<!-- IETF language tag (RFC 5646) restricted to 2-letter tags; so far not checked; only relevant when 'define' a code system -->
<extension url="ext:language">
<valueCode value="[string]" />
</extension>
<!-- URI to identify the code system -->
<system value="[uri]" />
<!-- 0..1 Version of this system -->
<version value="[string]" />
<!-- 0..1 If code comparison is case sensitive -->
<caseSensitive value="[boolean]" />
<!-- 0..* Concepts in the code system -->
<concept>
<!-- 1..1 Code that identifies concept -->
<code value="[code]" />
<!-- 0..1 If this code is not for use as a real concept -->
<abstract value="[boolean]" />
<!-- 0..1 Text to Display to the user -->
<display value="[string]" >
<!-- 0..* extension for adding alternative designations -->
<extension url="ext:altDesignation">
<valueString value="[string]" />
</extension>
</display>
<!-- 0..1 Formal Definition -->
<definition value="[string]" />
<concept> <!-- 0..* Content as for ValueSet.define.concept Child Concepts (is-a / contains) -->
</concept>
</concept>
</define>
<!-- for CTS value set import -->
<compose>
<import value="[uri]" />
<!-- 0..* Include one or more codes from a code system -->
<include>
<!-- 1..1 The system the codes come from -->
<system value="[uri]" />
<!-- 0..1 Specific version of the code system referred to -->
<version value="[string]" />
<!-- 0..* Code or concept from system -->
<code value="[code]" />
<!-- 0..* Select codes/concepts by their properties (including relationships) -->
<filter>
<!-- 1..1 A property defined by the code system -->
<property value="[code]" />
<!-- 1..1 = | is-a | is-not-a | regex | in | not in -->
<op value="[code]" />
<!-- 1..1 Code from the system, or regex criteria -->
<value value="[code]" />
</filter>
</include>
<exclude>
<!-- 0..* Content as for ValueSet.compose.include Explicitly exclude codes -->
</exclude>
</compose>
</ValueSet>
The following extensions are made:
- ValueSet.extension url="ext:groupName" defines the group the value set belongs to, only relevant for viewing the value set in the navigator
- ValueSet.define.extension url="ext:language" defines the default language of the value set
- ValueSet.define.display.extension url="ext:altDesignation" defines alternative terms for a concept
As mentioned earlier, FHIR value sets may be mapped to either CTS code system or CTS value sets. The output is determined by the existence of the elements define and compose: a define-element leads to a code system (more precise: CodeSystemVersionCatalogEntry) being imported whereas compose hints that a value set (ValueSetDefinition) is the target CTS entity.