HL7 CDA Core Principles: Unterschied zwischen den Versionen
Dammon (Diskussion | Beiträge) (→Object Identifiers (OIDs)) |
K |
||
(101 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
== Introduction == | == Introduction == | ||
− | This implementation guide specifies the ''Core Principles'' of using the ''Clinical Document Architecture'' <ref>Clinical Document Architecture Release 2 | + | This implementation guide specifies the ''Core Principles'' of using the ''Clinical Document Architecture'' <ref>Clinical Document Architecture Release 2: https://www.hl7.org/implement/standards/product_brief.cfm?product_id=7</ref>. |
=== Scope === | === Scope === | ||
− | This guide focuses on ''Data Types Release 1'' <ref>HL7 Data Types Release 1 http://www.hl7.org</ref>. Meanwhile an ISO specification ISO 21090 is out, also known as Data Type Release 2. The latter is subject to another | + | This guide focuses on ''Data Types Release 1'' <ref>HL7 Data Types Release 1: http://www.hl7.org</ref>. Meanwhile an ISO specification ISO 21090 is out, also known as Data Type Release 2. The latter is subject to another implementation guide that will be published when ISO data types are used. |
=== Focus of this document: HL7 Version 3 Data Types for CDA === | === Focus of this document: HL7 Version 3 Data Types for CDA === | ||
Zeile 17: | Zeile 17: | ||
=== Background === | === Background === | ||
− | In many (European) countries, implementation guides for the use of data types in HL7 V3 are published. They take into account country specific constraints on the data types. | + | In many (European) countries, implementation guides for the use of data types in HL7 V3 are published. They take into account country-specific constraints on the data types. |
=== Legend of symbols === | === Legend of symbols === | ||
Zeile 23: | Zeile 23: | ||
In this document several symbols are used. | In this document several symbols are used. | ||
− | {| class="hl7table" | + | {| class="hl7table" style="width:50%" |
| [[File:Pfeil_rechts.png|50px]] || This is an important item | | [[File:Pfeil_rechts.png|50px]] || This is an important item | ||
|- | |- | ||
Zeile 30: | Zeile 30: | ||
| [[File:Faq.svg|50px]] || This is a frequently asked question (FAQ) with answer | | [[File:Faq.svg|50px]] || This is a frequently asked question (FAQ) with answer | ||
|- | |- | ||
− | | [[File:Conformance.svg|50px]] || This is a constraint; in some situations | + | | [[File:Conformance.svg|50px]] || This is a constraint; in some situations the rule identification is also specified, e.g. dtr1-1-ANY, which links to the corresponding validation rule. |
|} | |} | ||
=== Version history === | === Version history === | ||
− | {| class="hl7table" | + | {| class="hl7table" style="width:50%" |
|+ | |+ | ||
! Version !! Date !! Description !! Author | ! Version !! Date !! Description !! Author | ||
|- | |- | ||
− | | 1.1 || 2019-04-24 || | + | | 1.1 || 2019-04-24 || Refurbished guide based on earlier work || Kai U. Heitmann |
|} | |} | ||
Zeile 46: | Zeile 46: | ||
=== Use of XML === | === Use of XML === | ||
− | HL7 Version 3 CDA uses the Extensible Markup Language (XML) as the exchange | + | HL7 Version 3 CDA uses the Extensible Markup Language (XML) as the exchange format. It is assumed that the reader is familiar with common XML aspects <ref>World Wide Web Consortium. Extensible Markup Language, 1.0, 2nd Edition: http://www.w3.org/TR/REC-xml</ref><ref>World Wide Web Consortium. XML Schema: http://www.w3.org/TR/xmlschema-0/, http://www.w3.org/TR/xmlschema-1/, http://www.w3.org/TR/xmlschema-2/</ref>. However, some constraints are made regarding the use of CDA. |
==== Character Set ==== | ==== Character Set ==== | ||
{{ConstraintBox| | {{ConstraintBox| | ||
− | The character encoding of any CDA document shall be | + | The character encoding of any CDA document shall be “UTF-8”.}} |
<center><span style="font-size:88%">''XML Example snippet''</span></center> | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
Zeile 61: | Zeile 61: | ||
The XML namespace for CDA Release 2 documents is ''<nowiki>urn:hl7-org:v3</nowiki>''. This must be correctly mentioned in every XML instance. | The XML namespace for CDA Release 2 documents is ''<nowiki>urn:hl7-org:v3</nowiki>''. This must be correctly mentioned in every XML instance. | ||
+ | |||
CDA XML documents starts with the root element ''ClinicalDocument''. | CDA XML documents starts with the root element ''ClinicalDocument''. | ||
Zeile 66: | Zeile 67: | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" | <ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" | ||
− | xmlns:xsi="http://www.w3.org/2001/ | + | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
<!-- CDA Header --> | <!-- CDA Header --> | ||
Zeile 85: | Zeile 86: | ||
The following chapter describes the typical data types used in CDA implementation guides. For further information please refer to the HL7 V3 standard and its two parts concerning data types: | The following chapter describes the typical data types used in CDA implementation guides. For further information please refer to the HL7 V3 standard and its two parts concerning data types: | ||
− | * Abstract Data type definition <ref>HL7 Version 3 Abstract Data type definition | + | * Abstract Data type definition <ref>HL7 Version 3 Abstract Data type definition: https://www.hl7.org/implement/standards/product_brief.cfm?product_id=264</ref> |
− | * XML ITS for data types <ref>XML ITS for data types | + | * XML ITS for data types <ref>XML ITS for data types: https://www.hl7.org/documentcenter/public_temp_682D4D16-1C23-BA17-0C789BA52BEDB68E/wg/inm/datatypes-its-xml20050714.htm</ref> |
− | Data types are properties of model class attributes and the basic building blocks of | + | Data types are properties of model class attributes and the basic building blocks of information in a CDA XML instance. For example, a model attribute named “time” has as its data type a time stamp “TS” (see Figure 1). |
[[File:CDA_Core_Principles_Figure_1_CDA_Structure_Data_Types.png|700px]] | [[File:CDA_Core_Principles_Figure_1_CDA_Structure_Data_Types.png|700px]] | ||
Zeile 96: | Zeile 97: | ||
Actual data is mostly carried in HL7 Version 3 by populating XML attributes and not as element content. Exceptions are names of persons and organizations as well as addresses. | Actual data is mostly carried in HL7 Version 3 by populating XML attributes and not as element content. Exceptions are names of persons and organizations as well as addresses. | ||
+ | |||
The XML elements have names like the model attributes. For example, a model attribute “id” has a corresponding XML element named <id…>. The model determines the sequence of elements and their hierarchy. The data type itself determines the XML attributes within the start tag. The notation here is as follows: | The XML elements have names like the model attributes. For example, a model attribute “id” has a corresponding XML element named <id…>. The model determines the sequence of elements and their hierarchy. The data type itself determines the XML attributes within the start tag. The notation here is as follows: | ||
+ | |||
{| class="hl7table" | {| class="hl7table" | ||
|+ | |+ | ||
− | ! | + | ! Attribute !! DT !! Conf !! Description |
|- | |- | ||
− | | (name of the model attribute or XML | + | | (name of the model attribute or XML element) || Data type || Conformance, i.e. O, R, M || Textual description |
|} | |} | ||
− | XML attributes (data type properties) are denoted as @attribute in order to distinguish their names from XML elements. | + | XML attributes (data type properties) are denoted as ''@attribute'' in order to distinguish their names from XML elements. |
− | Example: in the example model above, the data type of the id attribute's is II (Instance Identifier). The corresponding XML attributes for that data type include @root and @extension. | + | |
+ | Example: in the example model above, the data type of the ''id'' attribute's is ''II'' (Instance Identifier). The corresponding XML attributes for that data type include ''@root'' and ''@extension''. | ||
+ | |||
<center><span style="font-size:88%">''XML Example snippet''</span></center> | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
− | <id root=" | + | <id root="..." extension="..." /> |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
A description of the data types and their corresponding XML representation is contained in subsequent paragraphs of this guide. | A description of the data types and their corresponding XML representation is contained in subsequent paragraphs of this guide. | ||
==== Exceptions using XML element content ==== | ==== Exceptions using XML element content ==== | ||
+ | |||
For most data types, the actual data is conveyed in XML attributes. However, there are some exceptions. For the data types binary (BIN), Encapsulated Data (ED), Entity Name (EN), Person Name (PN), Organization Name (ON), Trivial Name (TN), Address (AD) and character string data (ST), information is carried as element content. | For most data types, the actual data is conveyed in XML attributes. However, there are some exceptions. For the data types binary (BIN), Encapsulated Data (ED), Entity Name (EN), Person Name (PN), Organization Name (ON), Trivial Name (TN), Address (AD) and character string data (ST), information is carried as element content. | ||
+ | |||
Example: the components of an address <addr> are represented by sub elements with the data as element content (in the example shown in black). | Example: the components of an address <addr> are represented by sub elements with the data as element content (in the example shown in black). | ||
+ | |||
<center><span style="font-size:88%">''XML Example snippet''</span></center> | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
Zeile 125: | Zeile 134: | ||
==== Combined data types ==== | ==== Combined data types ==== | ||
+ | |||
There are a number of so-called combined data types. For example, an interval with a lower and upper limit and a ratio that has a nominator and a denominator value. | There are a number of so-called combined data types. For example, an interval with a lower and upper limit and a ratio that has a nominator and a denominator value. | ||
− | In combined data types the substructure (e.g. <low> <high> in an interval) are | + | |
+ | In combined data types the substructure (e.g. <low> <high> in an interval) are represented as child elements of the relevant data type element. | ||
+ | |||
<center><span style="font-size:88%">''XML Example snippet''</span></center> | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
Zeile 136: | Zeile 148: | ||
==== Conformance information ==== | ==== Conformance information ==== | ||
+ | |||
The conformance indicators distinguish kinds of conformance information described shortly here. | The conformance indicators distinguish kinds of conformance information described shortly here. | ||
+ | |||
* '''O''': An optional item may be omitted if no data is present, i.e. no corresponding XML attribute or element is sent (marked as “O”) | * '''O''': An optional item may be omitted if no data is present, i.e. no corresponding XML attribute or element is sent (marked as “O”) | ||
* '''R''': For required items, lower cardinality is always zero or 1. | * '''R''': For required items, lower cardinality is always zero or 1. | ||
− | + | ** Elements must be present and populated with data if present in the sending system. If no data is available (yet), a null flavor (see below) indicates and possibly classifies the missing information (marked as R). | |
− | + | ** Attribute flagged as required must be present in the instance and populated. | |
* '''M''': For mandatory elements data must be sent and no missing values are allowed, i.e. if the sending system does not have information for mandatory elements the XML instance cannot be created and sent (marked as M). | * '''M''': For mandatory elements data must be sent and no missing values are allowed, i.e. if the sending system does not have information for mandatory elements the XML instance cannot be created and sent (marked as M). | ||
* '''NP''': no data may be present at all (not permitted) | * '''NP''': no data may be present at all (not permitted) | ||
− | * '''C''': conditional conformance; typically a conformance table shows the | + | * '''C''': conditional conformance; typically a conformance table shows the circumstances (conditions) derived from information in the instance and the corresponding cardinalities and conformance statements. |
=== Missing values (null flavor) === | === Missing values (null flavor) === | ||
− | For every data type it is possible to specify a missing value including a kind of reason why data is missing. Instead of specifying any attribute of the corresponding element, a @nullFlavor attribute expresses the omission of data. Note that missing data is not | + | |
+ | For every data type it is possible to specify a missing value including a kind of reason why data is missing. Instead of specifying any attribute of the corresponding element, a ''@nullFlavor'' attribute expresses the omission of data. Note that missing data is not allowed for mandatory elements (see above). | ||
+ | |||
<center><span style="font-size:88%">''XML Example snippet''</span></center> | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
Zeile 157: | Zeile 173: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | The codes for the @nullFlavor attribute are drawn from the following hierarchical code system. It is a Coded Simple (CS), which means it has no code system (attribute @codeSystem) specified. | + | The codes for the ''@nullFlavor'' attribute are drawn from the following hierarchical code system. It is a Coded Simple (CS), which means it has no code system (attribute ''@codeSystem'') specified. |
+ | |||
{| class="hl7table" | {| class="hl7table" | ||
|+<ref group="Table">NullFlavor</ref> ''NullFlavor'' | |+<ref group="Table">NullFlavor</ref> ''NullFlavor'' | ||
− | ! Code ! | + | ! Code |
+ | ! width=15% | Print Name | ||
+ | ! Definition / Description | ||
|- | |- | ||
− | | NI || No Information || No information whatsoever can be inferred from this exceptional value. This is the most general exceptional value. It is also the | + | | NI || No Information || No information whatsoever can be inferred from this exceptional value. This is the most general exceptional value. It is also the default exceptional value. |
|- | |- | ||
− | | OTH || other || The actual value is not an element in the value domain of a variable. (e.g., concept not provided by required code system). | + | | OTH || other || The actual value is not an element in the value domain of a variable. (e.g., concept not provided by required code system). |
|- | |- | ||
− | | NINF || negative infinity || Negative infinity of numbers. | + | | NINF || negative infinity || Negative infinity of numbers. |
|- | |- | ||
− | | PINF || positive infinity || Positive infinity of numbers. | + | | PINF || positive infinity || Positive infinity of numbers. |
|- | |- | ||
− | | UNK || unknown || A proper value is applicable, but not known. | + | | UNK || unknown || A proper value is applicable, but not known. |
|- | |- | ||
− | | ASKU || asked but unknown || Information was sought but not found (e.g., patient was asked but didn't know) | + | | ASKU || asked but unknown || Information was sought but not found (e.g., patient was asked but didn't know) |
|- | |- | ||
− | | NAV || temporarily unavailable || Information is not available at this time but it is expected that it will be available later. | + | | NAV || temporarily unavailable || Information is not available at this time but it is expected that it will be available later. |
|- | |- | ||
− | | NASK || not asked || This information has not been sought (e.g., patient was not asked) | + | | NASK || not asked || This information has not been sought (e.g., patient was not asked) |
|- | |- | ||
− | | TRC || trace || The content is greater than zero, but too small to be quantified. | + | | TRC || trace || The content is greater than zero, but too small to be quantified. |
|- | |- | ||
− | | MSK || masked || There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information. | + | | MSK || masked || There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information. |
− | Note: using this null flavour does provide information that may be a breach of | + | Note: using this null flavour does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail. |
|- | |- | ||
− | | NA || not applicable || No proper value is applicable in this context (e.g., last menstrual period for a male). | + | | NA || not applicable || No proper value is applicable in this context (e.g., last menstrual period for a male). |
|- | |- | ||
| NP || not present || Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults. | | NP || not present || Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults. | ||
Zeile 189: | Zeile 208: | ||
=== ANY as the generic data type === | === ANY as the generic data type === | ||
− | This abstract data type is the basis for all other data types. Not a single value within a CDA document has the effective data type ANY, but any data type within HL7v3 is a specialization of ANY. This also means that any other data type inherits all properties of ANY (see | + | |
− | The ANY type is occasionally found in HL7 models when it comes to clinical finding etc. where – at model time – the actual data type of the value is not known. At instantiation time however, the actual data type is known and ANY is always replaced by a particular data type in an instance. | + | This abstract data type is the basis for all other data types. Not a single value within a CDA document has the effective data type ANY, but any data type within HL7v3 is a specialization of ANY. This also means that any other data type inherits all properties of ANY (see [[#Missing_values_.28null_flavor.29|“Missing values (null flavor)”]]). |
− | One example is the observation value (child element value in an observation), where in the model the data type of value cannot be anticipated. When instantiation is taking place, the data type is specified by the XML instance attribute @xsi:type. This | + | |
+ | The ANY type is occasionally found in HL7 models when it comes to clinical finding etc. where – at model time – the actual data type of the value is not known. At instantiation time however, the actual data type ''is'' known and ANY is always replaced by a particular data type in an instance. | ||
+ | |||
+ | One example is the observation value (child element value in an observation), where in the model the data type of value cannot be anticipated. When instantiation is taking place, the data type is specified by the XML instance attribute ''@xsi:type''. This information can be used by the receiver to validate and process the value. | ||
+ | |||
Attributes of an element with this data type are | Attributes of an element with this data type are | ||
− | {| class="hl7table" | + | |
+ | {| class="hl7table" style="width:50%" | ||
|+ | |+ | ||
− | ! | + | ! width=20% | Core Attribute |
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
|- | |- | ||
− | | '''@nullFlavor''' || CS || | + | | '''@nullFlavor''' || <center>CS</center> || <center>–</center> || Classification of the missing value, see [[#Missing_values_.28null_flavor.29|3.3 Missing values (null flavor)]]. |
|} | |} | ||
+ | {| class="hl7table" style="width:100%" | ||
+ | | width=8% | <center>[[File:Conformance.svg|50px]]<br />dtr1-1-ANY</center> || If there is a ''nullFlavor'', there shall be no other attribute or element, unless it's ''nullFlavor="OTH"''. | ||
− | + | In that case ''@codeSystem'' or ''originalText'' (see “code” data types) may have a value. | |
− | |||
|} | |} | ||
− | <center><span style="font-size:88%">''XML Example | + | <center><span style="font-size:88%">''XML Example snippets''</span></center> |
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
− | A value of data type ANY in the model, instantiated as CE | + | <!-- A value of data type ANY in the model, instantiated as CE --> |
<value xsi:type="CE" code="N11.9" codeSystem="2.16.840.1.113883.6.3"/> | <value xsi:type="CE" code="N11.9" codeSystem="2.16.840.1.113883.6.3"/> | ||
− | A value of data type ANY in the model, instantiated as PQ | + | <!-- A value of data type ANY in the model, instantiated as PQ --> |
<value xsi:type="PQ" value="12" unit="mL"/> | <value xsi:type="PQ" value="12" unit="mL"/> | ||
− | A value of data type ANY in the model, instantiated as ED | + | <!-- A value of data type ANY in the model, instantiated as ED --> |
<value xsi:type="ED">this is text</value> | <value xsi:type="ED">this is text</value> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Boolean (BL) === | === Boolean (BL) === | ||
+ | |||
+ | Elements of this data type refer to Boolean logic and have an attribute ''@value''. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attribute | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@value''' || <center>BL</center> || <center>–</center> || Valued as “true” or “false” | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <negationInd value="false"/> | ||
+ | |||
+ | <deceasedInd value="true"/> | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | In some situations, the BL data does not apply to an XML element, but an attribute. In that case, the attribute carries the Boolean value directly. | ||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <support contextConductionInd ="false"> | ||
+ | ... | ||
+ | </support> | ||
+ | </syntaxhighlight> | ||
=== Instance Identifier (II) === | === Instance Identifier (II) === | ||
+ | |||
+ | This data type identifies instances of classes like observations or entities (persons, organizations). Attributes are | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attributes | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@extension''' || <center>ST</center> || <center>O</center> || Identification | ||
+ | |- | ||
+ | | '''@root''' || <center>OID</center> || <center>R</center> || Source of identification | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <id extension="13234453645" root="2.16.840.1.113883.2.6.15.3.427.1"/> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | The ''@root'' attribute is of type OID (object identifier), a unique identifier of the issuing authority or system. For example, a patient with a patient number 13234453645 created by a specific healthcare provider organization is uniquely identified by the number itself in ''@extension'' and the OID of the organization or the sending system, in the example 2.16.840.1.113883.2.6.15.3.427.1 in ''@root''. | ||
+ | |||
+ | In some cases, a single OID identifies an object uniquely. In that situation, only ''@root'' is populated and ''@extension'' is omitted. | ||
+ | |||
+ | {| class="hl7table" style="width:100%" | ||
+ | | width=5% | [[File:Conformance.svg|50px]]|| | ||
+ | All conformance statements applicable to this data type can be found at the [https://art-decor.org/mediawiki/index.php?title=Table_of_Version3_Datatypes ART-DECOR table of V3 data types]. | ||
+ | |} | ||
=== Encapsulated Data (ED) === | === Encapsulated Data (ED) === | ||
+ | |||
+ | Elements of this data type carry multimedia content. The actual multimedia content is represented as element content. There are two situations for the use of ED: | ||
+ | |||
+ | * Inline: The full data is transmitted in the type. This form is mainly used for text. | ||
+ | * By reference: a thumbnail is provided which links to the full data by reference. | ||
+ | |||
+ | In an instance, the data type is normally determined by an ''xsi:type'' specification and some attributes. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attributes | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@mediaType''' || <center>CS</center> || <center>O</center> || MIME media type classification. At time of writing this specification, the following MIME types are allowed: | ||
+ | * text/plain (plain text) | ||
+ | * text/html (text with html markup) | ||
+ | * image/jpeg (JPEG image) | ||
+ | * application/pdf (a PDF, portable document format) | ||
+ | * application/hl7-sda+xml (CDA documents). | ||
+ | |- | ||
+ | | '''@representation''' || <center>CS</center> || <center>O</center> || Representation of the multimedia content. At time of writing this specification, the following representations are allowed: | ||
+ | * TXT (text, this is the default) | ||
+ | * B64 base 64 encoded data, for example for embedded CDA documents). | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <text xsi:type="ED" mediaType="text/plain"> | ||
+ | Patient treated sucessfully | ||
+ | </text> | ||
+ | |||
+ | <text mediaType="application/hl7-sda+xml" representation="B64">PD94bWw..etc..==</text> | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | To include referenced data the two sub elements ''thumbnail'' and ''reference'' are used. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Elements | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''reference''' || <center>TEL</center> || <center>0..*</center> || <center>O</center> || Link (URI) to full data | ||
+ | |- | ||
+ | | '''thumbnail''' || <center>ED</center> || <center>0..*</center> || <center>O</center> || Thumbnail of referenced data | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <value xsi:type="ED" mediaType="image/png" representation="B64"> | ||
+ | <reference value="http://radiology.bergen.no/xrays/128s.png"/> | ||
+ | <thumbnail mediaType="image/jpeg" representation="B64"> MNY...83== </thumbnail> | ||
+ | </value> | ||
+ | </syntaxhighlight> | ||
=== Strings (ST) === | === Strings (ST) === | ||
+ | |||
+ | This data type is a specialization of the ED type where ''@mediaType'' is fixed “text/plain” and ''@representation'' is fixed “TXT”. It allows conveying a character string as '''element content'''. This data type is used in other data types it like the ''@extension'' in instance identifiers, or address and person name data type components. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <lotNumber> 143GT6DT </lotNumber> | ||
+ | </syntaxhighlight> | ||
=== Concept Descriptor (CD) === | === Concept Descriptor (CD) === | ||
+ | |||
+ | This data type specifies a concept by means of a code and its code system (except for situations where no code is available). | ||
+ | |||
+ | A couple of specializations of data type CD exist, which differ in the main characteristics (properties) of the data type that may or may not be supported. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+<ref group="Table">Properties of data types used for codes</ref> ''Properties of data types used for codes'' | ||
+ | ! <div style="text-align: right">DataType</div> !! CD !! CE !! CV !! CO !! CS | ||
+ | |- | ||
+ | ! <div style="text-align: left">Property</div> !! !! !! !! !! | ||
+ | |- | ||
+ | | '''@code''' || <center>X</center> || <center>X</center> || <center>X</center> || <center>X</center> ||<center>X</center> | ||
+ | |- | ||
+ | | '''@codeSystem''' || <center>X</center> || <center>X</center> || <center>X</center> || <center>X</center> || | ||
+ | |- | ||
+ | | '''@codeSystemVersion''' || <center>X</center> || <center>X</center> || <center>X</center>|| <center>X</center> || | ||
+ | |- | ||
+ | | '''@displayName''' || <center>X</center> || <center>X</center> || <center>X</center> || <center>X</center> || | ||
+ | |- | ||
+ | | '''originalText''' || <center>X</center> || <center>X</center> || <center>X</center> || <center>X</center> || | ||
+ | |- | ||
+ | | '''translation''' || <center>X</center> || <center>X</center> || || || | ||
+ | |- | ||
+ | | '''qualifier''' || <center>X</center> || || || || | ||
+ | |} | ||
+ | |||
+ | Because the CE variant is most used in practice, the general explanation of the properties will be given with de description of CE (see below). | ||
+ | |||
+ | The only attribute that is unique to CD is briefly explained here. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attribute | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@qualifier''' || <center>CR</center> || <center>O</center> || An additional qualifier for the code. | ||
+ | |} | ||
+ | |||
+ | Complex terminologies like SNOMED CT can be used only using data type CD. | ||
=== Coded with Equivalents (CE) === | === Coded with Equivalents (CE) === | ||
+ | |||
+ | With elements of this data type, a concept by means of a code and its coding system (except for situations where no code is available) can be specified. It optionally contains one or more equivalents using other code systems. | ||
+ | |||
+ | It may contain the following attributes: | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attributes | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@code''' || <center>ST</center> || <center>R</center> || The actual code | ||
+ | |- | ||
+ | | '''@codeSystem''' || <center>OID</center> || <center>R</center> || required to identify the code system were the code is drawn from. This is an OID (object identifier, see [[#Object_Identifiers_.28OIDs.29|Object Identifiers at 4.1]]) | ||
+ | |- | ||
+ | | '''@displayName''' || <center>ST</center> || <center>O</center> || Optional textual representation of code. A display name may be specified representing the plain text of the code. The information of this attribute may not be used by the receiving system for interpretation, but only for display purposes. The display name may never be transmitted without a code and must have the same meaning as the code. | ||
+ | |- | ||
+ | | '''@codeSystemName''' || <center>ST</center> || <center>O</center> || A textual representation of the name of the code system | ||
+ | |- | ||
+ | | '''@codeSystemVersion''' || <center>ST</center> || <center>O</center> || A textual representation of the version of the code system | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippets''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/> | ||
+ | |||
+ | <code code="AU" codeSystem="2.16.840.1.113883.5.33"/> | ||
+ | |||
+ | <storageCode code="AC" codeSystem="2.16.840.1.113883.5.34" displayName="active"/> | ||
+ | |||
+ | <code code="A45.0" displayName="Somatisierungsstörung" codeSystem="1.2.276.0.76.5.409" codeSystemName="ICD-10 GM 2012"/> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | There are some child elements of codes that can be used to express what the “original text” was that was used for the coding or to indicate that there are “translations” to other code systems than the primary code. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Element | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''originalText''' || <center>ST</center> || <center>0..*</center> || <center>O</center> || Textual representation of the concept, actually a description which was used to create the actual code | ||
+ | |} | ||
+ | |||
+ | No semantics may be assumed other than showing the ''@displayName'' to a user to clarify the code. A display name cannot occur without its code and must carry the same meaning. | ||
+ | |||
+ | In case no code is known, it is allowed to specify a ''@nullFlavor'' for the code element and to give information about the (not yet coded) concept in original text. However, this should be an exception. | ||
+ | |||
+ | If other codes than the primary code need to be conveyed adding a translation child element can be used. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippets''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <code code="K12.0" codeSystem="2.16.840.1.113883.6.3" codeSystemName="ICD10" displayName="Recurrent oral aphthae"> | ||
+ | <originalText>minor aphthous stomatitis</originalText> | ||
+ | </code> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Element | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''translation''' || <center>CD</center> || <center>0..*</center> || <center>O</center> || Alternative code(s) | ||
+ | |} | ||
+ | |||
+ | A ''translation'' element is also of type CD and shall have a code and a code system identified. It shall point to the same concept as the primary code. It is allowed that a translation conveys less conceptual details than the original code. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippets''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <code code="K12.0" codeSystem="2.16.840.1.113883.6.3" codeSystemName="ICD10" displayName="Recurrent oral aphthae"> | ||
+ | <translation code="528.2" codeSystem="2.16.840.1.113883.6.2" codeSystemName="ICD9" displayName="Oral aphthae"/> | ||
+ | </code> | ||
+ | </syntaxhighlight> | ||
=== Coded Value (CV) === | === Coded Value (CV) === | ||
+ | |||
+ | This is actually a specialization of CE (see above), with the exception that neither ''originalText'' nor ''translation'' child element are allowed. | ||
=== Coded Simple Value (CS) === | === Coded Simple Value (CS) === | ||
+ | |||
+ | This is actually a specialization of CE (see above), with no code system attribute and no original text or translation child element allowed. It specifies a concept by means of a code from a ''predefined'' code system (table) where the code is drawn from. This data type is usually applied in the context of fixed predefined HL7 tables. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <statusCode code="completed"/> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | In this example ''statusCode'' is bound in the underlying model to the specific code system ''ActStatus''. Because it is predefined by means of the vocabulary binding, ''@codeSystem'' is omitted. | ||
+ | |||
+ | {| class="hl7table" style="width:100%" | ||
+ | | width=5% | [[File:Conformance.svg|50px]]|| | ||
+ | All conformance statements applicable to this data type can be found at the [https://art-decor.org/mediawiki/index.php?title=Table_of_Version3_Datatypes ART-DECOR table of V3 data types]. | ||
+ | |} | ||
=== Telecommunication Address (TEL) === | === Telecommunication Address (TEL) === | ||
+ | |||
+ | Elements of this type have the following attributes. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attributes | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@value''' || <center>ST</center> || <center>R</center> || carries strings that represent telecommunication contact information | ||
+ | |- | ||
+ | | '''@use''' || <center>CS</center> || <center>O</center> || Represents the type of the telecommunication contact | ||
+ | |} | ||
+ | |||
+ | The actual data is preceded by the scheme (refer to Internet Standard “RFC 1738 Uniform Resource Locators (URL)” <ref>RFC 1738 Uniform Resource Locators (URL): http://www.ietf.org/rfc/rfc1738.txt</ref>. | ||
+ | |||
+ | Examples: | ||
+ | * telephone (tel:), | ||
+ | * fax (fax:), | ||
+ | * email (mailto:). | ||
+ | |||
+ | It must follow the rules defined in Internet “RFC 2806 URLs for Telephone Calls” <ref>RFC 2806 URLs for Telephone Calls: http://www.ietf.org/rfc/rfc2806.txt</ref>. | ||
+ | |||
+ | The following codes will be used in the “use” attribute: | ||
+ | * H – Home | ||
+ | * WP – Work | ||
+ | * MC can be used (in addition to H or WP) to denote that this is a mobile phone. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <telecom value="tel:55354257" /> | ||
+ | |||
+ | <telecom use="H" value="tel:55354257" /> | ||
+ | |||
+ | <telecom use="H" value="fax:56542558" /> | ||
+ | |||
+ | <telecom value="tel:+41.34.21.4765342"/> | ||
+ | |||
+ | <telecom value="mailto:opr@opr-sem.no"/> | ||
+ | |||
+ | <telecom use="WP MC" value="tel:97555786" /> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | It is possible to express the useable period of a telecommunication contact. A child element ''useablePeriod'' is used as a time interval to indicate this period. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Element | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''useablePeriod''' || <center>IVL_TS</center> || <center>0..*</center> || <center>O</center> || validity range of the telecommunication contact | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <telecom value="tel:55354257"> | ||
+ | <useablePeriod> | ||
+ | <high value="20111201"/> | ||
+ | </useablePeriod> | ||
+ | </telecom> | ||
+ | </syntaxhighlight> | ||
=== Postal Address (AD) === | === Postal Address (AD) === | ||
+ | |||
+ | Elements of this data type have a substructure in order to represent a structured address specification. In this implementation guide only a selection of all possible child elements is allowed, the original HL7 specification is richer. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Elements | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''streetAddressLine''' || <center>ST</center> || <center>0..*</center> || <center>O</center> || Street address, includes street name and house number | ||
+ | |- | ||
+ | | '''city''' || <center>ST</center> || <center>0..*</center> || <center>O</center> || City | ||
+ | |- | ||
+ | | '''postalCode''' || <center>ST</center> || <center>0..*</center> || <center>O</center> || Postal code | ||
+ | |- | ||
+ | | '''country''' || <center>ST</center> || <center>0..*</center> || <center>O</center> || Country | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | {| class="hl7table" style="width:100%" | ||
+ | | [[File:Pfeil_rechts.png|50px]] | ||
+ | |Please note that the sequence of the sub elements is country specific, i.e. it has to follow “common” rules how to write an address. For example, an UK address and a German address have different sequences of address representation. | ||
+ | |} | ||
+ | |||
+ | A ''@use'' attribute can also be specified. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attribute | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@use''' || <center>CS</center> || <center>O</center> || Represents the type of the telecommunication contact | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <addr use="WP"> | ||
+ | <streetAddressLine>Anna-Louisa-Karsch-Str. 2</streetAddressLine> | ||
+ | <postalCode>10178</postalCode> | ||
+ | <city>Berlin</city> | ||
+ | </addr> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <addr use="H WP"> | ||
+ | <streetAddressLine>Tatungasse 34</streetAddressLine> | ||
+ | <postalCode>10825</postalCode> | ||
+ | <city>Berlin</city> | ||
+ | </addr> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Also, a country may be specified using the element ''country''. | ||
=== Person Name (PN) === | === Person Name (PN) === | ||
+ | |||
+ | Elements of this data type do also have a substructure to represent the parts of a person name, like family or given name and prefixes. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <name> | ||
+ | <given>Franz</given> | ||
+ | <given>Ingrun</given> | ||
+ | <family>Nordmann</family> | ||
+ | </name> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Previous or birth or maiden names are supported using the ''validTime'' element. ''validTime'' (with child elements low and high, see data type [[#Interval_of_time_.28IVL_TS.29|IVL_TS at 3.21]]) specifies the validity range of the name. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Element | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''validTime''' || <center>IVL_TS</center> || <center>0..*</center> || <center>O</center> || validity range of the name | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <!-- Birthname, used/valid up to 1-1-2000 --> | ||
+ | <name> | ||
+ | <given>Jan</given> | ||
+ | <given>Olaf</given> | ||
+ | <family>Hendrikson</family> | ||
+ | <validTime> | ||
+ | <high value="20000101"/> | ||
+ | </validTime> | ||
+ | </name> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Note that the name attribute is repeating, i.e. multiple (types of) names could be sent. It is up to the receiver (based on the value of the ''@use'' attribute, and ''validTime'') to decide what name it wants to use or import in its database. | ||
=== Organisation Name (ON) === | === Organisation Name (ON) === | ||
+ | |||
+ | Elements of this data type represent a name of an organization. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <name> Charité Berlin </name> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | The optional ''validTime'' element (with child elements low and high, see data type [[#Interval_of_time_.28IVL_TS.29|IVL_TS at 3.21]] may be used to specify the validity range of the name of the organization. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Element | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''validTime''' || <center>IVL_TS</center> || <center>0..*</center> || <center>O</center> || validity range of the name of the organization | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <name>The old hospital | ||
+ | <validTime> | ||
+ | <high value="20111231235959"/> | ||
+ | </validTime> | ||
+ | </name> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Please note that the use of ''validTime'' yields XML mixed content which should be avoided if possible. | ||
=== Integer Number (INT) === | === Integer Number (INT) === | ||
+ | |||
+ | Elements of this data type are used to specify integer numbers and have one attribute. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attribute | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@value''' || <center>int</center> || <center>R</center> || Integer value | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <sequenceNumber value="24"/> | ||
+ | </syntaxhighlight> | ||
=== Physical Quantities (PQ) === | === Physical Quantities (PQ) === | ||
+ | |||
+ | Elements of this data type are physical quantities, i.e. a measurable quantity (or countable) value from the physical world. This is different from just a “number”, because there is a (natural) unit specified in which the measurable quantity is expressed. | ||
+ | Examples: | ||
+ | * an amount of blood 20 ml (sample volume) | ||
+ | * a cut with a length of 10 cm (result observation) | ||
+ | * a dose of 200 milligrams per administration (dosing) | ||
+ | * delivery of 60 pieces of a tablet (amount supplied). | ||
+ | Elements of this data type have the following attributes. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attributes | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@value''' || <center>real</center> || <center>R</center> || value of the measurement | ||
+ | |- | ||
+ | | '''@unit''' || <center>CS</center> || <center>R</center> || unit of measurement | ||
+ | |} | ||
+ | |||
+ | In the unit of measurement unit is expressed following the ''Unified Code for Units of Measure'' (UCUM) specification. This specification is a collection of atomic units, prefixes and a corresponding grammar for valid combinations to build all-natural units of measurement. For a complete description of possible units, see the ''Unified Code for Units of Measure'' <ref>Unified Code for Units of Measure: http://unitsofmeasure.org/</ref> specification. | ||
+ | |||
+ | If a value is not countable or if measurable, for example expressed in milligrams or liters, then this unit is a valid UCUM unit like “mg” or “L”. If a value is countable, for example the number of tablets, then this attribute contains “1”. | ||
+ | |||
+ | In HL7 it is required that all PQ data type units are valid UCUM units. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippets''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <value value="165" unit="cm"/> | ||
+ | |||
+ | <value value="81.1" unit="kg"/> | ||
+ | |||
+ | <value value="120" unit="mm[Hg]"/> | ||
+ | |||
+ | <value value="5" unit="1"/> | ||
+ | </syntaxhighlight> | ||
=== Point in Time (TS) === | === Point in Time (TS) === | ||
+ | |||
+ | Elements of this data type have the attribute | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Attribute | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Conf | ||
+ | ! width=64% | Description | ||
+ | |- | ||
+ | | '''@value''' || <center>TS</center> || <center>R</center> || Point in time | ||
+ | |} | ||
+ | |||
+ | and specify points in time in the format YYYYMMDDhhmmss±ZZZZ, where | ||
+ | * YYYY is the four-digit year, | ||
+ | * MM the two-digit month, | ||
+ | * DD the two-digit day, | ||
+ | * hh the two-digit hour, | ||
+ | * mm the two-digits minute and | ||
+ | * ss the two-digit second. | ||
+ | Optional a time zone ZZZZ, the four-digit time alignment with a preceding “-” or a “+” can be specified. If time zone is omitted, local time is assumed. | ||
+ | |||
+ | The point in time may be right truncated in respect to the precision of the information. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippets''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <effectiveTime value="20140412"/> | ||
+ | |||
+ | <effectiveTime value="201409091245"/> | ||
+ | |||
+ | <effectiveTime value="1996"/> | ||
+ | |||
+ | <birthTime value="19540714"/> | ||
+ | |||
+ | <effectiveTime value="20140412+0100"/> | ||
+ | </syntaxhighlight> | ||
=== Intervals (IVL) === | === Intervals (IVL) === | ||
Zeile 259: | Zeile 827: | ||
<ref group="Figure">Several possibilities to determine closed intervals</ref> ''Several possibilities to determine closed intervals'' | <ref group="Figure">Several possibilities to determine closed intervals</ref> ''Several possibilities to determine closed intervals'' | ||
+ | |||
+ | In addition, there is sometimes the need to specify incomplete intervals (open intervals). For example, an interval with only an upper limit to indicate a maximum dose or a start date and time only to express “since…”. | ||
+ | |||
+ | {{ConstraintBox| | ||
+ | To indicate an interval, only the following combinations are permitted. | ||
+ | (1) A lower and an upper boundary may not be identical, and their accuracy has to be equal. | ||
+ | |||
+ | Correct examples: | ||
+ | |||
+ | {{BeginGreenBox|}} | ||
+ | Interval from 5 to 6 | ||
+ | Interval from 20110607 until 20110612 | ||
+ | {{EndGreenBox}} | ||
+ | |||
+ | Incorrect examples: | ||
+ | |||
+ | {{BeginRedBox|}} | ||
+ | Interval from 5 to 6.0 | ||
+ | Interval from 20110101 to 2011 | ||
+ | {{EndRedBox|}} | ||
+ | |||
+ | (2) A lower boundary and a width | ||
+ | |||
+ | (3) A lower limit boundary | ||
+ | |||
+ | (4) A upper limit boundary | ||
+ | |||
+ | (5) Only the middle of the interval | ||
+ | |||
+ | (6) Only the width of an interval}} | ||
+ | |||
+ | Accordingly, four child elements are available. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Element | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''low''' || <center>''(T)''</center> || <center>0..1</center> || <center>C</center> || Lower boundary | ||
+ | |- | ||
+ | | '''high''' || <center>''(T)''</center> || <center>0..1</center> || <center>C</center> || Upper boundary | ||
+ | |- | ||
+ | | '''center''' || <center>''(T)''</center> || <center>0..1</center> || <center>C</center> || Center of an interval | ||
+ | |- | ||
+ | | '''width''' || <center>PQ</center> || <center>0..1</center> || <center>C</center> || Width of an interval | ||
+ | |} | ||
+ | |||
+ | Where ''(T)'' is defined in this specification as one of the data types “TS” or “PQ”. | ||
=== Interval of time (IVL_TS) === | === Interval of time (IVL_TS) === | ||
+ | |||
+ | Elements of this data type represent time intervals. There are four possible child elements. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Elements | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''low''' || <center>TS</center> || <center>0..1</center> || <center>C</center> || Lower boundary (start date/time) | ||
+ | |- | ||
+ | | '''high''' || <center>TS</center> || <center>0..1</center> || <center>C</center> || Upper boundary (end date/time) | ||
+ | |- | ||
+ | | '''center''' || <center>TS</center> || <center>0..1</center> || <center>C</center> || Center of an interval | ||
+ | |- | ||
+ | | '''width''' || <center>PQ</center> || <center>0..1</center> || <center>C</center> || Width of an interval | ||
+ | |} | ||
+ | |||
+ | Normally, a lower and an upper boundary is given, both are points in time. Also, it is possible to specify open intervals like “since June 14, 1999” (left boundary given only) or “until September 24, 2006” (right boundary given). | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <effectiveTime> | ||
+ | <low value="20110507"/> | ||
+ | <high value="20110909"/> | ||
+ | </effectiveTime> | ||
+ | |||
+ | <effectiveTime> | ||
+ | <low value="20110507"/> | ||
+ | </effectiveTime> | ||
+ | |||
+ | <value> | ||
+ | <low value="20110101"/> | ||
+ | <width value="120" unit="d"/> | ||
+ | </value> | ||
+ | |||
+ | <value> | ||
+ | <center value="20110101"/> | ||
+ | </value> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | {| class="hl7table" style="width:100%" | ||
+ | | [[File:Pfeil_rechts.png|50px]] | ||
+ | |It must be noted that intervals of time stamps in HL7 are equally treated as other interval types (e.g. integers). The statement, one may take 1–3 tablets (interval of integers), for example, says that you are allowed to take no more than three tablets, not 3½ or 3.5 tablets. On the other hand, when treat the words “until 12 June 2011” regarding the upper interval limit differently, particularly we assume that the entire day 12 June is still included in this time interval. | ||
+ | |||
+ | Thus, in human perception time intervals are handled differently compared to such as number intervals. This is a situation may lead to inconsistencies in standardized communication. As a conclusion, an upper limit “12 June 2011” means that only the very first moment of the 12 June is included in the interval, but not, for example, the 12 June 13:00 hours. | ||
+ | |||
+ | Interpretation does not depend on the accuracy of the time: | ||
+ | * “after 2004” means “from January 1, 2005 00:00:00.000”, | ||
+ | * “after 20041201” means “from 2 December 2004 00:00:00.000 hours”, | ||
+ | * and “after 200412011200” means “from 1 December 2004 12:01:00.000”. | ||
+ | |||
+ | As a result, you have to carefully consider the specification and implemen-tation of time intervals upper boundaries. In order to prevent mis-understandings intervals are always specified with the date and time for an upper limit that would cover the whole day. Accordingly, “201106122359” means 12 June 2011 throughout the day. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <effectiveTime> | ||
+ | <low value="201106122359"/> | ||
+ | </effectiveTime> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Because of the equal treatment of time intervals this is applied also to the lower limit boundaries of time intervals as “0000”. This means for example that “since 9 June 2011” is expressed as “201106090000”. | ||
+ | |} | ||
+ | |||
+ | The <width> element is of data type PQ (physical quantity). The value obviously shall relate to a period of time and it is required to include a “time” unit. These are the units “us” (microseconds), “ms” (milliseconds), “s” (seconds), “min” (minute), “h” (hours), “d” (day), “wk” (week), “mo” (month) and “a” (year). | ||
+ | |||
+ | {{ConstraintBox| | ||
+ | For interval of time stamps the @unit of a ''low'' or ''high'' child element shall use units | ||
+ | * us (microseconds), | ||
+ | * ms (milliseconds), | ||
+ | * s (seconds), | ||
+ | * min (minute), | ||
+ | * h (hours), | ||
+ | * d (day), | ||
+ | * wk (week), | ||
+ | * mo (month) or | ||
+ | * a (year). | ||
+ | }} | ||
=== Interval of physical quantities (IVL_PQ) === | === Interval of physical quantities (IVL_PQ) === | ||
+ | |||
+ | Elements of this data type are used to indicate intervals of physical quantities (see also [[#Physical Quantities (PQ)|3.18 Physical Quantities (PQ)]]). In general, an upper and a lower boundary is specified. It is also possible to use ''center'' instead of ''low'' and ''high''. | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Elements | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''low || <center>TS</center> || <center>0..1</center> || <center>C</center> || the lower limit of the interval (i.e. the minimum amount). | ||
+ | |- | ||
+ | | '''high || <center>TS</center> || <center>0..1</center> || <center>C</center> || the upper limit of the interval (i.e. the maximum amount). | ||
+ | |- | ||
+ | | '''center || <center>TS</center> || <center>0..1</center> || <center>C</center> || Center of the interval | ||
+ | |} | ||
+ | |||
+ | The ''center'' child element is used when there is no interval, but an exact value. Alternative would be to demote IVL_PQ to data type PQ and populate the element’s ''@value'' attribute, but this is more difficult to process in XML. That is why the use of the ''center'' child element is deprecated. | ||
+ | |||
+ | {| class="hl7table" style="width:100%" | ||
+ | | width=5% | [[File:Conformance.svg|50px]]|| | ||
+ | All conformance statements applicable to this data type can be found at the [https://art-decor.org/mediawiki/index.php?title=Table_of_Version3_Datatypes ART-DECOR table of V3 data types]. | ||
+ | |} | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippets''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <referenceRange> | ||
+ | <low value="7.5" unit="mmol/l"/> | ||
+ | <high value="10" unit="mmol/l"/> | ||
+ | </referenceRange> | ||
+ | |||
+ | <doseQuantity> | ||
+ | <center value="9" unit="1"/> | ||
+ | </doseQuantity> | ||
+ | </syntaxhighlight> | ||
=== Ratio of quantities (RTO_QTY_QTY) === | === Ratio of quantities (RTO_QTY_QTY) === | ||
+ | |||
+ | Elements of this data type specify ratios and have two child elements, a numerator and a denominator. The underlying QTY (Quantity) data type is an abstract data type and in a XML instance it has to be replaced by a specific data type using the ''@xsi:type'' instruction (see below). | ||
+ | |||
+ | In this specification only “PQ” or “INT” are allowed for the demotion of both ''numerator'' and ''denominator''. The relevant child elements are: | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+ | ||
+ | ! width=20% | Core Elements | ||
+ | ! width=8% | DT | ||
+ | ! width=8% | Card | ||
+ | ! width=8% | Conf | ||
+ | ! width=56% | Description | ||
+ | |- | ||
+ | | '''numerator || <center>(T)</center> || <center>1..1</center> || <center>R</center> || The amount of the numerator of the ratio | ||
+ | |- | ||
+ | | '''denominator || <center>(T)</center> || <center>1..1</center> || <center>R</center> || The amount of the denominator of the ratio | ||
+ | |} | ||
+ | |||
+ | If a model attribute already is a RTO_QTY_QTY, you need to specify (demote) the OTY abstract data type for both ''numerator'' and ''denominator'' by using an ''@xsi:type'' instruction. | ||
+ | In some cases where the model attribute is of type “ANY”, also the root element shall carry an ''@xsi:type'' RTO_QTY_QTY instruction. | ||
+ | |||
+ | <center><span style="font-size:88%">''XML Example snippet''</span></center> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <maxDoseQuantity> | ||
+ | <numerator xsi:type="PQ" value="6"/> | ||
+ | <denominator xsi:type="PQ" value="1" unit="d"/> | ||
+ | </maxDoseQuantity> | ||
+ | |||
+ | <maxDoseQuantity> | ||
+ | <numerator xsi:type="PQ" value="400" unit="mg"/> | ||
+ | <denominator xsi:type="PQ" value="1" unit="d"/> | ||
+ | </maxDoseQuantity> | ||
+ | |||
+ | <maxDoseQuantity> | ||
+ | <numerator xsi:type="PQ" value="5"/> | ||
+ | <denominator xsi:type="PQ" value="1" unit="h"/> | ||
+ | </maxDoseQuantity> | ||
+ | |||
+ | <value xsi:type="RTO_QTY_QTY"> | ||
+ | <numerator xsi:type="INT" value="1"/> | ||
+ | <denominator xsi:type="INT" value="10000"/> | ||
+ | </value> | ||
+ | </syntaxhighlight> | ||
== Identification mechanisms == | == Identification mechanisms == | ||
Zeile 271: | Zeile 1.049: | ||
Standardized exchange of information using messages or documents also deals with unique identifications of objects and concepts, especially in environments where sender and receiver do not “know” each other necessarily. | Standardized exchange of information using messages or documents also deals with unique identifications of objects and concepts, especially in environments where sender and receiver do not “know” each other necessarily. | ||
+ | |||
It is important to understand the difference between identification of instances (ids) and code concepts (classifications). Within the context of HL7 interactions OIDs are quite often used. | It is important to understand the difference between identification of instances (ids) and code concepts (classifications). Within the context of HL7 interactions OIDs are quite often used. | ||
− | An id points to a specific instance of an object or identification scheme (a particular methodology for the identification of a class of objects), for example a specific person as the patient or a physician, a specific lab observation or an X-ray photo. | + | |
+ | An id points to a specific instance of an object or identification scheme (a particular methodology for the identification of a class of objects), for example a specific person as the patient or a physician, a specific lab observation or an X-ray photo. | ||
+ | |||
In contrast to instance identifiers, a classification identifies a specific concept. The type of patient (inpatient, outpatient), the type of doctor (an anesthesiologist), the codes for gender or a lab observation (blood cell count) may serve as examples. | In contrast to instance identifiers, a classification identifies a specific concept. The type of patient (inpatient, outpatient), the type of doctor (an anesthesiologist), the codes for gender or a lab observation (blood cell count) may serve as examples. | ||
+ | |||
OIDs (object identifiers) are worldwide unique identifiers for objects. They are used in HL7 to specify identifications and classifications. An object in this sense is persistent, well-defined information, definitions or specifications and is represented with ids or codes. | OIDs (object identifiers) are worldwide unique identifiers for objects. They are used in HL7 to specify identifications and classifications. An object in this sense is persistent, well-defined information, definitions or specifications and is represented with ids or codes. | ||
+ | |||
Commonly used OIDs (i.e. used for a purpose that is wider in scope than the regional healthcare organization; used in communications between healthcare regions) can be found in OIDs registries such as | Commonly used OIDs (i.e. used for a purpose that is wider in scope than the regional healthcare organization; used in communications between healthcare regions) can be found in OIDs registries such as | ||
Zeile 282: | Zeile 1.065: | ||
* [https://www.dimdi.de/dynamic/de/klassifikationen/weitere-klassifikationen-und-standards/oid/ OID registry Germany]. | * [https://www.dimdi.de/dynamic/de/klassifikationen/weitere-klassifikationen-und-standards/oid/ OID registry Germany]. | ||
− | {| class="hl7table" | + | {| class="hl7table" style="width:100%" |
| [[File:Pfeil_rechts.png|50px]] | | [[File:Pfeil_rechts.png|50px]] | ||
− | |All OIDs with an element of 999 or 9999 are for documentation purposes only. They will be replaced by permanent OIDs once these have been | + | |All OIDs with an element of 999 or 9999 are for documentation purposes only. They will be replaced by permanent OIDs once these have been assigned/found/applied for. |
|} | |} | ||
− | OID (Object Identifiers) are unique identifiers for any kind of objects. They are defined in Rec. ITU-T X.660 | ISO/IEC 9834-1. This identification system for objects and concepts makes reliable electronic information exchange possible. Administration and | + | OID (Object Identifiers) are unique identifiers for any kind of objects. They are defined in Rec. ITU-T X.660 | ISO/IEC 9834-1. This identification system for objects and concepts makes reliable electronic information exchange possible. Administration and Registration is regulated by a set of rules, described in the corresponding chapter of this document. |
− | Every artefact in ART-DECOR has an Object Identifier (OID). There are recommendations for the management and the exchange of Object Identifiers, partially defined in ISO TS 13582 <ref>ISO TS 13582 https://www.iso.org/standard/69652.html</ref>. | + | |
+ | Every artefact in ART-DECOR has an Object Identifier (OID). There are recommendations for the management and the exchange of Object Identifiers, partially defined in ISO TS 13582 <ref>ISO TS 13582: https://www.iso.org/standard/69652.html</ref>. | ||
''HL7 International'' has created a type ontology for the OIDs in the HL7 registry to make it easier for the user community to search for OIDs they may be looking for and can be found at hl7.org. | ''HL7 International'' has created a type ontology for the OIDs in the HL7 registry to make it easier for the user community to search for OIDs they may be looking for and can be found at hl7.org. | ||
− | |||
− | {| style="width: | + | From a policy perspective it is common practice in several healthcare related OID registries (HL7 International at http://www.hl7.org, OID Registry Germany at http://www.dimdi.de, OID registry Switzerland at http://oid.refdata.ch, and OID registry Austria at https://www.gesundheit.gv.at/OID_Frontend) to distinguish at least between the following types of OIDs: |
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
|+<ref group="Table">Recommended OID sub-branches for different artefacts</ref> ''Recommended OID sub-branches for different artefacts'' | |+<ref group="Table">Recommended OID sub-branches for different artefacts</ref> ''Recommended OID sub-branches for different artefacts'' | ||
! Arc !! Description | ! Arc !! Description | ||
Zeile 319: | Zeile 1.104: | ||
In ART-DECOR a project typically is set into the .77 branch of a governance group. When setting up the project, the OID for that project also determines the artefact OIDs using throughout the ART-DECOR project. The following additional branches are used to distinguish between different OID types: | In ART-DECOR a project typically is set into the .77 branch of a governance group. When setting up the project, the OID for that project also determines the artefact OIDs using throughout the ART-DECOR project. The following additional branches are used to distinguish between different OID types: | ||
+ | |||
+ | {| class="hl7table" style="width:50%" | ||
+ | |+<ref group="Table">Recommended OID sub-branches for ART-DECOR projects</ref> ''Recommended OID sub-branches for ART-DECOR projects'' | ||
+ | ! Artefact code !! Description !! Recommended OID suffix | ||
+ | |- | ||
+ | | DS || dataset || .77.1 | ||
+ | |- | ||
+ | | DE || dataset concept || .77.2 | ||
+ | |- | ||
+ | | SC || scenario || .77.3 | ||
+ | |- | ||
+ | | TR || transaction in scenario || .77.4 | ||
+ | |- | ||
+ | | CS || code system || .77.5 | ||
+ | |- | ||
+ | | IS || issue || .77.6 | ||
+ | |- | ||
+ | | AC || actor in scenario || .77.7 | ||
+ | |- | ||
+ | | CL || concept list in dataset || .77.8 | ||
+ | |- | ||
+ | | EL || element in template || .77.9 | ||
+ | |- | ||
+ | | TM || template || .77.10 | ||
+ | |- | ||
+ | | VS || value set || .77.11 | ||
+ | |- | ||
+ | | RL || rule for instances || .77.12 | ||
+ | |- | ||
+ | | SX || test/example scenario || .77.18 | ||
+ | |- | ||
+ | | EX || test/example instance || .77.19 | ||
+ | |- | ||
+ | | QX || qualification test/example || .77.20 | ||
+ | |- | ||
+ | | TX || test/example data element || .77.21 | ||
+ | |- | ||
+ | | CM || community || .77.22 | ||
+ | |- | ||
+ | | MP || concept map || .77.24 | ||
+ | |} | ||
+ | |||
+ | In ART-DECOR a newly created project uses these OID branches automatically. | ||
=== Instance identification === | === Instance identification === | ||
+ | |||
+ | Instance identification is done with the id element of a class. Its type is II (instance identifier) and described in the data type section above. For example, a patient number can be represented as | ||
+ | * 2.16.578.1.34.1.5432.1, the root-OID of the issuing authority, for example a system/application in a hospital, and | ||
+ | * 67543242 as the ''@extension'', representing the patient number within the system defined by the ''@root'' attribute. | ||
=== Coding scheme identification === | === Coding scheme identification === | ||
+ | |||
+ | Coding schemes have to be uniquely identified using OIDs as well. All coding tables used in this implementation guide show the corresponding OID that has to be specified in the ''@codeSystem'' attribute of coded elements. Both attributes ''@code'' and ''@codeSystem'' together allows a correct interpretation of concept and code. | ||
=== List of identification schemes === | === List of identification schemes === | ||
+ | |||
+ | The following are OIDs for commonly used identification schemes. | ||
+ | |||
+ | {| class="hl7table" | ||
+ | |+<ref group="Table">Commonly used identification scheme OIDs</ref> ''Commonly used identification scheme OIDs'' | ||
+ | ! OID !! Identification System Name !! Description !! Issuer | ||
+ | |- | ||
+ | | 1.2.276.0.76.4.8 || KV-Nummer || Krankenversichertennummer || | ||
+ | |- | ||
+ | | 1.2.276.0.76.4.17 || BSNR || Betriebsstättennummer || | ||
+ | |- | ||
+ | | 1.2.276.0.76.4.16 || LANR || lebenslange Arztnummer || | ||
+ | |} | ||
=== List of code systems === | === List of code systems === | ||
+ | |||
+ | The following are OIDs for code systems. | ||
+ | |||
+ | {| class="hl7table" | ||
+ | |+<ref group="Table">Commonly used code system OIDs</ref> ''Commonly used code system OIDs'' | ||
+ | ! OID !! Code System Name !! Description !! Issuer | ||
+ | |- | ||
+ | | 2.16.840.1.113883.6.1 || LOINC || Logical Observation Identifiers Names and Codes (LOINC) || Regenstrief Institute | ||
+ | |- | ||
+ | | 2.16.840.1.113883.6.96 || SNOMED CT || Systemized Nomenclature in Medicine Reference Terminology (SNOMED CT) || SNOMED International | ||
+ | |- | ||
+ | | 1.0.3166.1.2 || ISO 3166-1 (second edition) || Country codes as per ISO 3166-1:2007 || ISO | ||
+ | |} | ||
== Vocabulary == | == Vocabulary == | ||
Zeile 333: | Zeile 1.193: | ||
Within HL7, a ''Code System'' is defined as a collection of codes with associated designations and meanings. Examples of code systems include ICD-10, SNOMED CT, and LOINC. | Within HL7, a ''Code System'' is defined as a collection of codes with associated designations and meanings. Examples of code systems include ICD-10, SNOMED CT, and LOINC. | ||
+ | |||
To meet the requirements of a code system as defined by HL7, a given code must resolve to one and only one meaning within the code system. Given this definition, each code table in the HL7 Version 3 standard represents a different code system since codes are sometimes used in different tables to have different meanings. | To meet the requirements of a code system as defined by HL7, a given code must resolve to one and only one meaning within the code system. Given this definition, each code table in the HL7 Version 3 standard represents a different code system since codes are sometimes used in different tables to have different meanings. | ||
+ | |||
For example, “M” in the administrative gender table (''AdministrativeGender'', OID 2.16.840.1.113883.5.1) means “male”, while “M” in the marital status table (''MaritalStatus'', OID 2.16.840.1.113883.5.2) means “married”. | For example, “M” in the administrative gender table (''AdministrativeGender'', OID 2.16.840.1.113883.5.1) means “male”, while “M” in the marital status table (''MaritalStatus'', OID 2.16.840.1.113883.5.2) means “married”. | ||
+ | |||
In this specification, code system tables are not presented in detail. | In this specification, code system tables are not presented in detail. | ||
Zeile 340: | Zeile 1.203: | ||
A ''Value Set'' represents a uniquely identifiable set of valid concept representations, where any concept representation can be tested to determine whether or not it is a member of the value set. | A ''Value Set'' represents a uniquely identifiable set of valid concept representations, where any concept representation can be tested to determine whether or not it is a member of the value set. | ||
− | Value set complexity may range from a simple flat list of concept codes drawn from a single code system, to an unbounded hierarchical set of possibly post-coordinated | + | |
+ | Value set complexity may range from a simple flat list of concept codes drawn from a single code system, to an unbounded hierarchical set of possibly post-coordinated expressions drawn from multiple code systems. | ||
+ | |||
Value sets exist to constrain the content for a coded element in an HL7 static model or data type property. Value sets cannot have null content and must contain at least one concept representation where any given concept is generally (but not required to be) represented by only a single code within the Value Set. | Value sets exist to constrain the content for a coded element in an HL7 static model or data type property. Value sets cannot have null content and must contain at least one concept representation where any given concept is generally (but not required to be) represented by only a single code within the Value Set. | ||
Zeile 347: | Zeile 1.212: | ||
<ref group="Figure">Example presentation of the value set “MaritalStatus”</ref> ''Example presentation of the value set “MaritalStatus”'' | <ref group="Figure">Example presentation of the value set “MaritalStatus”</ref> ''Example presentation of the value set “MaritalStatus”'' | ||
− | {| class="hl7table" | + | {| class="hl7table" style="width:100%" |
| [[File:Pfeil_rechts.png|50px]] | | [[File:Pfeil_rechts.png|50px]] | ||
|Please note that value set OIDs never appear in a CDA Release 2 document. They are used for constraint expressions, for example in implementation guides. | |Please note that value set OIDs never appear in a CDA Release 2 document. They are used for constraint expressions, for example in implementation guides. | ||
+ | |||
In order to send a specific code drawn from a value set, the corresponding code system has to be conveyed. | In order to send a specific code drawn from a value set, the corresponding code system has to be conveyed. | ||
+ | |||
An example, in the implementation specification the constraint on the model element ''maritalStatusCode'' is expressed as “to be drawn from value set 2.16.840.1.113883.5.2 ''MaritalStatus''”. | An example, in the implementation specification the constraint on the model element ''maritalStatusCode'' is expressed as “to be drawn from value set 2.16.840.1.113883.5.2 ''MaritalStatus''”. | ||
+ | |||
To actually send a marital status of “M” (married) that is shown in the value set figure above, the corresponding HL7 CDA instance would say: | To actually send a marital status of “M” (married) that is shown in the value set figure above, the corresponding HL7 CDA instance would say: | ||
+ | |||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<maritalStatusCode code="M" codeSystem="2.16.840.1.113883.5.2"/> | <maritalStatusCode code="M" codeSystem="2.16.840.1.113883.5.2"/> | ||
Zeile 362: | Zeile 1.231: | ||
==== Binding strength ==== | ==== Binding strength ==== | ||
− | There is an optional vocabulary strength for data types that support that feature ( | + | There is an optional vocabulary strength for data types that support that feature (coded concepts). Examples include CD, CE, CV and CO. Values are required, extensible, preferred and example. Default is required. |
− | Please note: the formerly supported values CNE (Coded No Extensibility) and CWE (Coded With Extensibility) in ART-DECOR are deprecated as of December 2017. | + | Please note: the formerly supported values CNE (Coded No Extensibility) and CWE (Coded With Extensibility) in ART-DECOR are deprecated as of December 2017. Specification CNE is handled as required and CWE is handled as extensible. |
− | {| class="hl7table" | + | {| class="hl7table" style="width:50%" |
|+<ref group="Table">Binding Strengths</ref> ''Binding Strengths'' | |+<ref group="Table">Binding Strengths</ref> ''Binding Strengths'' | ||
! Strength !! Description | ! Strength !! Description | ||
Zeile 379: | Zeile 1.248: | ||
|} | |} | ||
− | Mismatches with required lead to validation errors (SHALL logic). Mismatches with | + | Mismatches with required lead to validation errors (SHALL logic). Mismatches with extensible lead to validation warnings (SHOULD logic). Mismatches with preferred lead to validation information messages (MAY logic). Mismatches with example don't have any validation consequences. |
== Appendix == | == Appendix == |
Aktuelle Version vom 21. Juni 2019, 08:59 Uhr
Inhaltsverzeichnis
- 1 Introduction
- 2 Common aspects
- 3 Data types
- 3.1 Introduction
- 3.2 XML representation of data types
- 3.3 Missing values (null flavor)
- 3.4 ANY as the generic data type
- 3.5 Boolean (BL)
- 3.6 Instance Identifier (II)
- 3.7 Encapsulated Data (ED)
- 3.8 Strings (ST)
- 3.9 Concept Descriptor (CD)
- 3.10 Coded with Equivalents (CE)
- 3.11 Coded Value (CV)
- 3.12 Coded Simple Value (CS)
- 3.13 Telecommunication Address (TEL)
- 3.14 Postal Address (AD)
- 3.15 Person Name (PN)
- 3.16 Organisation Name (ON)
- 3.17 Integer Number (INT)
- 3.18 Physical Quantities (PQ)
- 3.19 Point in Time (TS)
- 3.20 Intervals (IVL)
- 3.21 Interval of time (IVL_TS)
- 3.22 Interval of physical quantities (IVL_PQ)
- 3.23 Ratio of quantities (RTO_QTY_QTY)
- 4 Identification mechanisms
- 5 Vocabulary
- 6 Appendix
Introduction
This implementation guide specifies the Core Principles of using the Clinical Document Architecture [1].
Scope
This guide focuses on Data Types Release 1 [2]. Meanwhile an ISO specification ISO 21090 is out, also known as Data Type Release 2. The latter is subject to another implementation guide that will be published when ISO data types are used.
Focus of this document: HL7 Version 3 Data Types for CDA
The following chapters of this document will focus on the description of the data types and associated material. It will highlight the essentials in four chapters, all focusing on the Norwegian situation.
- Common aspects: explains common aspects of use of CDA and XML
- Data types: gives an overview and detailed specification of all data types used in CDA
- Identification schemes: explains major aspects of identification and the use in CDA
- Use of vocabulary: explains major aspects of vocabulary use in CDA.
Background
In many (European) countries, implementation guides for the use of data types in HL7 V3 are published. They take into account country-specific constraints on the data types.
Legend of symbols
In this document several symbols are used.
Version history
Version | Date | Description | Author |
---|---|---|---|
1.1 | 2019-04-24 | Refurbished guide based on earlier work | Kai U. Heitmann |
Common aspects
Use of XML
HL7 Version 3 CDA uses the Extensible Markup Language (XML) as the exchange format. It is assumed that the reader is familiar with common XML aspects [3][4]. However, some constraints are made regarding the use of CDA.
Character Set
The character encoding of any CDA document shall be “UTF-8”. |
<?xml version="1.0" encoding="utf-8"?>
CDA document structure
The XML namespace for CDA Release 2 documents is urn:hl7-org:v3. This must be correctly mentioned in every XML instance.
CDA XML documents starts with the root element ClinicalDocument.
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- CDA Header -->
...
<!-- CDA Body -->
<component>
<structuredBody>
...
</structuredBody>
</component>
</ClinicalDocument>
Data types
Introduction
The following chapter describes the typical data types used in CDA implementation guides. For further information please refer to the HL7 V3 standard and its two parts concerning data types:
Data types are properties of model class attributes and the basic building blocks of information in a CDA XML instance. For example, a model attribute named “time” has as its data type a time stamp “TS” (see Figure 1).
[Figure 1] CDA structure (left) and the data type specification (right)
XML representation of data types
Actual data is mostly carried in HL7 Version 3 by populating XML attributes and not as element content. Exceptions are names of persons and organizations as well as addresses.
The XML elements have names like the model attributes. For example, a model attribute “id” has a corresponding XML element named <id…>. The model determines the sequence of elements and their hierarchy. The data type itself determines the XML attributes within the start tag. The notation here is as follows:
Attribute | DT | Conf | Description |
---|---|---|---|
(name of the model attribute or XML element) | Data type | Conformance, i.e. O, R, M | Textual description |
XML attributes (data type properties) are denoted as @attribute in order to distinguish their names from XML elements.
Example: in the example model above, the data type of the id attribute's is II (Instance Identifier). The corresponding XML attributes for that data type include @root and @extension.
<id root="..." extension="..." />
A description of the data types and their corresponding XML representation is contained in subsequent paragraphs of this guide.
Exceptions using XML element content
For most data types, the actual data is conveyed in XML attributes. However, there are some exceptions. For the data types binary (BIN), Encapsulated Data (ED), Entity Name (EN), Person Name (PN), Organization Name (ON), Trivial Name (TN), Address (AD) and character string data (ST), information is carried as element content.
Example: the components of an address <addr> are represented by sub elements with the data as element content (in the example shown in black).
<addr>
<streetAddressLine>Thormøhlens gate 12</streetAddressLine>
<postalCode>5006</postalCode>
<city>Bergen</city>
</addr>
Combined data types
There are a number of so-called combined data types. For example, an interval with a lower and upper limit and a ratio that has a nominator and a denominator value.
In combined data types the substructure (e.g. <low> <high> in an interval) are represented as child elements of the relevant data type element.
<effectiveTime>
<low value="20110701"/>
<high value="20110729"/>
</effectiveTime>
Conformance information
The conformance indicators distinguish kinds of conformance information described shortly here.
- O: An optional item may be omitted if no data is present, i.e. no corresponding XML attribute or element is sent (marked as “O”)
- R: For required items, lower cardinality is always zero or 1.
- Elements must be present and populated with data if present in the sending system. If no data is available (yet), a null flavor (see below) indicates and possibly classifies the missing information (marked as R).
- Attribute flagged as required must be present in the instance and populated.
- M: For mandatory elements data must be sent and no missing values are allowed, i.e. if the sending system does not have information for mandatory elements the XML instance cannot be created and sent (marked as M).
- NP: no data may be present at all (not permitted)
- C: conditional conformance; typically a conformance table shows the circumstances (conditions) derived from information in the instance and the corresponding cardinalities and conformance statements.
Missing values (null flavor)
For every data type it is possible to specify a missing value including a kind of reason why data is missing. Instead of specifying any attribute of the corresponding element, a @nullFlavor attribute expresses the omission of data. Note that missing data is not allowed for mandatory elements (see above).
<value nullFlavor="OTH"/>
<code nullFlavor="UNK"/>
<booleanInd nullFlavor="NI"/>
The codes for the @nullFlavor attribute are drawn from the following hierarchical code system. It is a Coded Simple (CS), which means it has no code system (attribute @codeSystem) specified.
Code | Print Name | Definition / Description |
---|---|---|
NI | No Information | No information whatsoever can be inferred from this exceptional value. This is the most general exceptional value. It is also the default exceptional value. |
OTH | other | The actual value is not an element in the value domain of a variable. (e.g., concept not provided by required code system). |
NINF | negative infinity | Negative infinity of numbers. |
PINF | positive infinity | Positive infinity of numbers. |
UNK | unknown | A proper value is applicable, but not known. |
ASKU | asked but unknown | Information was sought but not found (e.g., patient was asked but didn't know) |
NAV | temporarily unavailable | Information is not available at this time but it is expected that it will be available later. |
NASK | not asked | This information has not been sought (e.g., patient was not asked) |
TRC | trace | The content is greater than zero, but too small to be quantified. |
MSK | masked | There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information.
Note: using this null flavour does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail. |
NA | not applicable | No proper value is applicable in this context (e.g., last menstrual period for a male). |
NP | not present | Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults. |
ANY as the generic data type
This abstract data type is the basis for all other data types. Not a single value within a CDA document has the effective data type ANY, but any data type within HL7v3 is a specialization of ANY. This also means that any other data type inherits all properties of ANY (see “Missing values (null flavor)”).
The ANY type is occasionally found in HL7 models when it comes to clinical finding etc. where – at model time – the actual data type of the value is not known. At instantiation time however, the actual data type is known and ANY is always replaced by a particular data type in an instance.
One example is the observation value (child element value in an observation), where in the model the data type of value cannot be anticipated. When instantiation is taking place, the data type is specified by the XML instance attribute @xsi:type. This information can be used by the receiver to validate and process the value.
Attributes of an element with this data type are
Core Attribute | DT | Conf | Description |
---|---|---|---|
@nullFlavor | Classification of the missing value, see 3.3 Missing values (null flavor). |
dtr1-1-ANY |
If there is a nullFlavor, there shall be no other attribute or element, unless it's nullFlavor="OTH".
In that case @codeSystem or originalText (see “code” data types) may have a value. |
<!-- A value of data type ANY in the model, instantiated as CE -->
<value xsi:type="CE" code="N11.9" codeSystem="2.16.840.1.113883.6.3"/>
<!-- A value of data type ANY in the model, instantiated as PQ -->
<value xsi:type="PQ" value="12" unit="mL"/>
<!-- A value of data type ANY in the model, instantiated as ED -->
<value xsi:type="ED">this is text</value>
Boolean (BL)
Elements of this data type refer to Boolean logic and have an attribute @value.
Core Attribute | DT | Conf | Description |
---|---|---|---|
@value | Valued as “true” or “false” |
<negationInd value="false"/>
<deceasedInd value="true"/>
In some situations, the BL data does not apply to an XML element, but an attribute. In that case, the attribute carries the Boolean value directly.
<support contextConductionInd ="false">
...
</support>
Instance Identifier (II)
This data type identifies instances of classes like observations or entities (persons, organizations). Attributes are
Core Attributes | DT | Conf | Description |
---|---|---|---|
@extension | Identification | ||
@root | Source of identification |
<id extension="13234453645" root="2.16.840.1.113883.2.6.15.3.427.1"/>
The @root attribute is of type OID (object identifier), a unique identifier of the issuing authority or system. For example, a patient with a patient number 13234453645 created by a specific healthcare provider organization is uniquely identified by the number itself in @extension and the OID of the organization or the sending system, in the example 2.16.840.1.113883.2.6.15.3.427.1 in @root.
In some cases, a single OID identifies an object uniquely. In that situation, only @root is populated and @extension is omitted.
All conformance statements applicable to this data type can be found at the ART-DECOR table of V3 data types. |
Encapsulated Data (ED)
Elements of this data type carry multimedia content. The actual multimedia content is represented as element content. There are two situations for the use of ED:
- Inline: The full data is transmitted in the type. This form is mainly used for text.
- By reference: a thumbnail is provided which links to the full data by reference.
In an instance, the data type is normally determined by an xsi:type specification and some attributes.
Core Attributes | DT | Conf | Description |
---|---|---|---|
@mediaType | MIME media type classification. At time of writing this specification, the following MIME types are allowed:
| ||
@representation | Representation of the multimedia content. At time of writing this specification, the following representations are allowed:
|
<text xsi:type="ED" mediaType="text/plain">
Patient treated sucessfully
</text>
<text mediaType="application/hl7-sda+xml" representation="B64">PD94bWw..etc..==</text>
To include referenced data the two sub elements thumbnail and reference are used.
Core Elements | DT | Card | Conf | Description |
---|---|---|---|---|
reference | Link (URI) to full data | |||
thumbnail | Thumbnail of referenced data |
<value xsi:type="ED" mediaType="image/png" representation="B64">
<reference value="http://radiology.bergen.no/xrays/128s.png"/>
<thumbnail mediaType="image/jpeg" representation="B64"> MNY...83== </thumbnail>
</value>
Strings (ST)
This data type is a specialization of the ED type where @mediaType is fixed “text/plain” and @representation is fixed “TXT”. It allows conveying a character string as element content. This data type is used in other data types it like the @extension in instance identifiers, or address and person name data type components.
<lotNumber> 143GT6DT </lotNumber>
Concept Descriptor (CD)
This data type specifies a concept by means of a code and its code system (except for situations where no code is available).
A couple of specializations of data type CD exist, which differ in the main characteristics (properties) of the data type that may or may not be supported.
DataType |
CD | CE | CV | CO | CS |
---|---|---|---|---|---|
Property |
|||||
@code | |||||
@codeSystem | |||||
@codeSystemVersion | |||||
@displayName | |||||
originalText | |||||
translation | |||||
qualifier |
Because the CE variant is most used in practice, the general explanation of the properties will be given with de description of CE (see below).
The only attribute that is unique to CD is briefly explained here.
Core Attribute | DT | Conf | Description |
---|---|---|---|
@qualifier | An additional qualifier for the code. |
Complex terminologies like SNOMED CT can be used only using data type CD.
Coded with Equivalents (CE)
With elements of this data type, a concept by means of a code and its coding system (except for situations where no code is available) can be specified. It optionally contains one or more equivalents using other code systems.
It may contain the following attributes:
Core Attributes | DT | Conf | Description |
---|---|---|---|
@code | The actual code | ||
@codeSystem | required to identify the code system were the code is drawn from. This is an OID (object identifier, see Object Identifiers at 4.1) | ||
@displayName | Optional textual representation of code. A display name may be specified representing the plain text of the code. The information of this attribute may not be used by the receiving system for interpretation, but only for display purposes. The display name may never be transmitted without a code and must have the same meaning as the code. | ||
@codeSystemName | A textual representation of the name of the code system | ||
@codeSystemVersion | A textual representation of the version of the code system |
<administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
<code code="AU" codeSystem="2.16.840.1.113883.5.33"/>
<storageCode code="AC" codeSystem="2.16.840.1.113883.5.34" displayName="active"/>
<code code="A45.0" displayName="Somatisierungsstörung" codeSystem="1.2.276.0.76.5.409" codeSystemName="ICD-10 GM 2012"/>
There are some child elements of codes that can be used to express what the “original text” was that was used for the coding or to indicate that there are “translations” to other code systems than the primary code.
Core Element | DT | Card | Conf | Description |
---|---|---|---|---|
originalText | Textual representation of the concept, actually a description which was used to create the actual code |
No semantics may be assumed other than showing the @displayName to a user to clarify the code. A display name cannot occur without its code and must carry the same meaning.
In case no code is known, it is allowed to specify a @nullFlavor for the code element and to give information about the (not yet coded) concept in original text. However, this should be an exception.
If other codes than the primary code need to be conveyed adding a translation child element can be used.
<code code="K12.0" codeSystem="2.16.840.1.113883.6.3" codeSystemName="ICD10" displayName="Recurrent oral aphthae">
<originalText>minor aphthous stomatitis</originalText>
</code>
Core Element | DT | Card | Conf | Description |
---|---|---|---|---|
translation | Alternative code(s) |
A translation element is also of type CD and shall have a code and a code system identified. It shall point to the same concept as the primary code. It is allowed that a translation conveys less conceptual details than the original code.
<code code="K12.0" codeSystem="2.16.840.1.113883.6.3" codeSystemName="ICD10" displayName="Recurrent oral aphthae">
<translation code="528.2" codeSystem="2.16.840.1.113883.6.2" codeSystemName="ICD9" displayName="Oral aphthae"/>
</code>
Coded Value (CV)
This is actually a specialization of CE (see above), with the exception that neither originalText nor translation child element are allowed.
Coded Simple Value (CS)
This is actually a specialization of CE (see above), with no code system attribute and no original text or translation child element allowed. It specifies a concept by means of a code from a predefined code system (table) where the code is drawn from. This data type is usually applied in the context of fixed predefined HL7 tables.
<statusCode code="completed"/>
In this example statusCode is bound in the underlying model to the specific code system ActStatus. Because it is predefined by means of the vocabulary binding, @codeSystem is omitted.
All conformance statements applicable to this data type can be found at the ART-DECOR table of V3 data types. |
Telecommunication Address (TEL)
Elements of this type have the following attributes.
Core Attributes | DT | Conf | Description |
---|---|---|---|
@value | carries strings that represent telecommunication contact information | ||
@use | Represents the type of the telecommunication contact |
The actual data is preceded by the scheme (refer to Internet Standard “RFC 1738 Uniform Resource Locators (URL)” [7].
Examples:
- telephone (tel:),
- fax (fax:),
- email (mailto:).
It must follow the rules defined in Internet “RFC 2806 URLs for Telephone Calls” [8].
The following codes will be used in the “use” attribute:
- H – Home
- WP – Work
- MC can be used (in addition to H or WP) to denote that this is a mobile phone.
<telecom value="tel:55354257" />
<telecom use="H" value="tel:55354257" />
<telecom use="H" value="fax:56542558" />
<telecom value="tel:+41.34.21.4765342"/>
<telecom value="mailto:opr@opr-sem.no"/>
<telecom use="WP MC" value="tel:97555786" />
It is possible to express the useable period of a telecommunication contact. A child element useablePeriod is used as a time interval to indicate this period.
Core Element | DT | Card | Conf | Description |
---|---|---|---|---|
useablePeriod | validity range of the telecommunication contact |
<telecom value="tel:55354257">
<useablePeriod>
<high value="20111201"/>
</useablePeriod>
</telecom>
Postal Address (AD)
Elements of this data type have a substructure in order to represent a structured address specification. In this implementation guide only a selection of all possible child elements is allowed, the original HL7 specification is richer.
Core Elements | DT | Card | Conf | Description |
---|---|---|---|---|
streetAddressLine | Street address, includes street name and house number | |||
city | City | |||
postalCode | Postal code | |||
country | Country |
A @use attribute can also be specified.
Core Attribute | DT | Conf | Description |
---|---|---|---|
@use | Represents the type of the telecommunication contact |
<addr use="WP">
<streetAddressLine>Anna-Louisa-Karsch-Str. 2</streetAddressLine>
<postalCode>10178</postalCode>
<city>Berlin</city>
</addr>
<addr use="H WP">
<streetAddressLine>Tatungasse 34</streetAddressLine>
<postalCode>10825</postalCode>
<city>Berlin</city>
</addr>
Also, a country may be specified using the element country.
Person Name (PN)
Elements of this data type do also have a substructure to represent the parts of a person name, like family or given name and prefixes.
<name>
<given>Franz</given>
<given>Ingrun</given>
<family>Nordmann</family>
</name>
Previous or birth or maiden names are supported using the validTime element. validTime (with child elements low and high, see data type IVL_TS at 3.21) specifies the validity range of the name.
Core Element | DT | Card | Conf | Description |
---|---|---|---|---|
validTime | validity range of the name |
<!-- Birthname, used/valid up to 1-1-2000 -->
<name>
<given>Jan</given>
<given>Olaf</given>
<family>Hendrikson</family>
<validTime>
<high value="20000101"/>
</validTime>
</name>
Note that the name attribute is repeating, i.e. multiple (types of) names could be sent. It is up to the receiver (based on the value of the @use attribute, and validTime) to decide what name it wants to use or import in its database.
Organisation Name (ON)
Elements of this data type represent a name of an organization.
<name> Charité Berlin </name>
The optional validTime element (with child elements low and high, see data type IVL_TS at 3.21 may be used to specify the validity range of the name of the organization.
Core Element | DT | Card | Conf | Description |
---|---|---|---|---|
validTime | validity range of the name of the organization |
<name>The old hospital
<validTime>
<high value="20111231235959"/>
</validTime>
</name>
Please note that the use of validTime yields XML mixed content which should be avoided if possible.
Integer Number (INT)
Elements of this data type are used to specify integer numbers and have one attribute.
Core Attribute | DT | Conf | Description |
---|---|---|---|
@value | Integer value |
<sequenceNumber value="24"/>
Physical Quantities (PQ)
Elements of this data type are physical quantities, i.e. a measurable quantity (or countable) value from the physical world. This is different from just a “number”, because there is a (natural) unit specified in which the measurable quantity is expressed. Examples:
- an amount of blood 20 ml (sample volume)
- a cut with a length of 10 cm (result observation)
- a dose of 200 milligrams per administration (dosing)
- delivery of 60 pieces of a tablet (amount supplied).
Elements of this data type have the following attributes.
Core Attributes | DT | Conf | Description |
---|---|---|---|
@value | value of the measurement | ||
@unit | unit of measurement |
In the unit of measurement unit is expressed following the Unified Code for Units of Measure (UCUM) specification. This specification is a collection of atomic units, prefixes and a corresponding grammar for valid combinations to build all-natural units of measurement. For a complete description of possible units, see the Unified Code for Units of Measure [9] specification.
If a value is not countable or if measurable, for example expressed in milligrams or liters, then this unit is a valid UCUM unit like “mg” or “L”. If a value is countable, for example the number of tablets, then this attribute contains “1”.
In HL7 it is required that all PQ data type units are valid UCUM units.
<value value="165" unit="cm"/>
<value value="81.1" unit="kg"/>
<value value="120" unit="mm[Hg]"/>
<value value="5" unit="1"/>
Point in Time (TS)
Elements of this data type have the attribute
Core Attribute | DT | Conf | Description |
---|---|---|---|
@value | Point in time |
and specify points in time in the format YYYYMMDDhhmmss±ZZZZ, where
- YYYY is the four-digit year,
- MM the two-digit month,
- DD the two-digit day,
- hh the two-digit hour,
- mm the two-digits minute and
- ss the two-digit second.
Optional a time zone ZZZZ, the four-digit time alignment with a preceding “-” or a “+” can be specified. If time zone is omitted, local time is assumed.
The point in time may be right truncated in respect to the precision of the information.
<effectiveTime value="20140412"/>
<effectiveTime value="201409091245"/>
<effectiveTime value="1996"/>
<birthTime value="19540714"/>
<effectiveTime value="20140412+0100"/>
Intervals (IVL)
Intervals are defined only for data types with an ordinal or interval scale type. There are several possibilities to determine an interval (see Figure 2), for example to specify
- a lower <low> and an upper boundary <high> (a),
- a lower <low> boundary and width <width> (b)
- an upper boundary and width <width> (c) or
- the middle of the interval <center> and a width <width> (d).
[Figure 2] Several possibilities to determine closed intervals
In addition, there is sometimes the need to specify incomplete intervals (open intervals). For example, an interval with only an upper limit to indicate a maximum dose or a start date and time only to express “since…”.
Accordingly, four child elements are available.
Core Element | DT | Card | Conf | Description |
---|---|---|---|---|
low | Lower boundary | |||
high | Upper boundary | |||
center | Center of an interval | |||
width | Width of an interval |
Where (T) is defined in this specification as one of the data types “TS” or “PQ”.
Interval of time (IVL_TS)
Elements of this data type represent time intervals. There are four possible child elements.
Core Elements | DT | Card | Conf | Description |
---|---|---|---|---|
low | Lower boundary (start date/time) | |||
high | Upper boundary (end date/time) | |||
center | Center of an interval | |||
width | Width of an interval |
Normally, a lower and an upper boundary is given, both are points in time. Also, it is possible to specify open intervals like “since June 14, 1999” (left boundary given only) or “until September 24, 2006” (right boundary given).
<effectiveTime>
<low value="20110507"/>
<high value="20110909"/>
</effectiveTime>
<effectiveTime>
<low value="20110507"/>
</effectiveTime>
<value>
<low value="20110101"/>
<width value="120" unit="d"/>
</value>
<value>
<center value="20110101"/>
</value>
The <width> element is of data type PQ (physical quantity). The value obviously shall relate to a period of time and it is required to include a “time” unit. These are the units “us” (microseconds), “ms” (milliseconds), “s” (seconds), “min” (minute), “h” (hours), “d” (day), “wk” (week), “mo” (month) and “a” (year).
Interval of physical quantities (IVL_PQ)
Elements of this data type are used to indicate intervals of physical quantities (see also 3.18 Physical Quantities (PQ)). In general, an upper and a lower boundary is specified. It is also possible to use center instead of low and high.
Core Elements | DT | Card | Conf | Description |
---|---|---|---|---|
low | the lower limit of the interval (i.e. the minimum amount). | |||
high | the upper limit of the interval (i.e. the maximum amount). | |||
center | Center of the interval |
The center child element is used when there is no interval, but an exact value. Alternative would be to demote IVL_PQ to data type PQ and populate the element’s @value attribute, but this is more difficult to process in XML. That is why the use of the center child element is deprecated.
All conformance statements applicable to this data type can be found at the ART-DECOR table of V3 data types. |
<referenceRange>
<low value="7.5" unit="mmol/l"/>
<high value="10" unit="mmol/l"/>
</referenceRange>
<doseQuantity>
<center value="9" unit="1"/>
</doseQuantity>
Ratio of quantities (RTO_QTY_QTY)
Elements of this data type specify ratios and have two child elements, a numerator and a denominator. The underlying QTY (Quantity) data type is an abstract data type and in a XML instance it has to be replaced by a specific data type using the @xsi:type instruction (see below).
In this specification only “PQ” or “INT” are allowed for the demotion of both numerator and denominator. The relevant child elements are:
Core Elements | DT | Card | Conf | Description |
---|---|---|---|---|
numerator | The amount of the numerator of the ratio | |||
denominator | The amount of the denominator of the ratio |
If a model attribute already is a RTO_QTY_QTY, you need to specify (demote) the OTY abstract data type for both numerator and denominator by using an @xsi:type instruction. In some cases where the model attribute is of type “ANY”, also the root element shall carry an @xsi:type RTO_QTY_QTY instruction.
<maxDoseQuantity>
<numerator xsi:type="PQ" value="6"/>
<denominator xsi:type="PQ" value="1" unit="d"/>
</maxDoseQuantity>
<maxDoseQuantity>
<numerator xsi:type="PQ" value="400" unit="mg"/>
<denominator xsi:type="PQ" value="1" unit="d"/>
</maxDoseQuantity>
<maxDoseQuantity>
<numerator xsi:type="PQ" value="5"/>
<denominator xsi:type="PQ" value="1" unit="h"/>
</maxDoseQuantity>
<value xsi:type="RTO_QTY_QTY">
<numerator xsi:type="INT" value="1"/>
<denominator xsi:type="INT" value="10000"/>
</value>
Identification mechanisms
Object Identifiers (OIDs)
Standardized exchange of information using messages or documents also deals with unique identifications of objects and concepts, especially in environments where sender and receiver do not “know” each other necessarily.
It is important to understand the difference between identification of instances (ids) and code concepts (classifications). Within the context of HL7 interactions OIDs are quite often used.
An id points to a specific instance of an object or identification scheme (a particular methodology for the identification of a class of objects), for example a specific person as the patient or a physician, a specific lab observation or an X-ray photo.
In contrast to instance identifiers, a classification identifies a specific concept. The type of patient (inpatient, outpatient), the type of doctor (an anesthesiologist), the codes for gender or a lab observation (blood cell count) may serve as examples.
OIDs (object identifiers) are worldwide unique identifiers for objects. They are used in HL7 to specify identifications and classifications. An object in this sense is persistent, well-defined information, definitions or specifications and is represented with ids or codes.
Commonly used OIDs (i.e. used for a purpose that is wider in scope than the regional healthcare organization; used in communications between healthcare regions) can be found in OIDs registries such as
All OIDs with an element of 999 or 9999 are for documentation purposes only. They will be replaced by permanent OIDs once these have been assigned/found/applied for. |
OID (Object Identifiers) are unique identifiers for any kind of objects. They are defined in Rec. ITU-T X.660 | ISO/IEC 9834-1. This identification system for objects and concepts makes reliable electronic information exchange possible. Administration and Registration is regulated by a set of rules, described in the corresponding chapter of this document.
Every artefact in ART-DECOR has an Object Identifier (OID). There are recommendations for the management and the exchange of Object Identifiers, partially defined in ISO TS 13582 [10].
HL7 International has created a type ontology for the OIDs in the HL7 registry to make it easier for the user community to search for OIDs they may be looking for and can be found at hl7.org.
From a policy perspective it is common practice in several healthcare related OID registries (HL7 International at http://www.hl7.org, OID Registry Germany at http://www.dimdi.de, OID registry Switzerland at http://oid.refdata.ch, and OID registry Austria at https://www.gesundheit.gv.at/OID_Frontend) to distinguish at least between the following types of OIDs:
Arc | Description |
---|---|
.3 | organizational bodies and groups |
.4 | identifier systems and namespaces |
.5 | code systems |
.7 | document artefacts |
.9 | conformance profiles |
.10 | templates |
.11 | value sets |
.19 | examples |
.99 | experimental |
Example: given that “your” root OID is 1.2.3.4.5, the first value set of your governance group is then to be 1.2.3.4.5.11.1, with .11 as the value set “branch” and the last .1 as the first artefact of that kind.
In ART-DECOR a project typically is set into the .77 branch of a governance group. When setting up the project, the OID for that project also determines the artefact OIDs using throughout the ART-DECOR project. The following additional branches are used to distinguish between different OID types:
Artefact code | Description | Recommended OID suffix |
---|---|---|
DS | dataset | .77.1 |
DE | dataset concept | .77.2 |
SC | scenario | .77.3 |
TR | transaction in scenario | .77.4 |
CS | code system | .77.5 |
IS | issue | .77.6 |
AC | actor in scenario | .77.7 |
CL | concept list in dataset | .77.8 |
EL | element in template | .77.9 |
TM | template | .77.10 |
VS | value set | .77.11 |
RL | rule for instances | .77.12 |
SX | test/example scenario | .77.18 |
EX | test/example instance | .77.19 |
QX | qualification test/example | .77.20 |
TX | test/example data element | .77.21 |
CM | community | .77.22 |
MP | concept map | .77.24 |
In ART-DECOR a newly created project uses these OID branches automatically.
Instance identification
Instance identification is done with the id element of a class. Its type is II (instance identifier) and described in the data type section above. For example, a patient number can be represented as
- 2.16.578.1.34.1.5432.1, the root-OID of the issuing authority, for example a system/application in a hospital, and
- 67543242 as the @extension, representing the patient number within the system defined by the @root attribute.
Coding scheme identification
Coding schemes have to be uniquely identified using OIDs as well. All coding tables used in this implementation guide show the corresponding OID that has to be specified in the @codeSystem attribute of coded elements. Both attributes @code and @codeSystem together allows a correct interpretation of concept and code.
List of identification schemes
The following are OIDs for commonly used identification schemes.
OID | Identification System Name | Description | Issuer |
---|---|---|---|
1.2.276.0.76.4.8 | KV-Nummer | Krankenversichertennummer | |
1.2.276.0.76.4.17 | BSNR | Betriebsstättennummer | |
1.2.276.0.76.4.16 | LANR | lebenslange Arztnummer |
List of code systems
The following are OIDs for code systems.
OID | Code System Name | Description | Issuer |
---|---|---|---|
2.16.840.1.113883.6.1 | LOINC | Logical Observation Identifiers Names and Codes (LOINC) | Regenstrief Institute |
2.16.840.1.113883.6.96 | SNOMED CT | Systemized Nomenclature in Medicine Reference Terminology (SNOMED CT) | SNOMED International |
1.0.3166.1.2 | ISO 3166-1 (second edition) | Country codes as per ISO 3166-1:2007 | ISO |
Vocabulary
Code Systems
Within HL7, a Code System is defined as a collection of codes with associated designations and meanings. Examples of code systems include ICD-10, SNOMED CT, and LOINC.
To meet the requirements of a code system as defined by HL7, a given code must resolve to one and only one meaning within the code system. Given this definition, each code table in the HL7 Version 3 standard represents a different code system since codes are sometimes used in different tables to have different meanings.
For example, “M” in the administrative gender table (AdministrativeGender, OID 2.16.840.1.113883.5.1) means “male”, while “M” in the marital status table (MaritalStatus, OID 2.16.840.1.113883.5.2) means “married”.
In this specification, code system tables are not presented in detail.
Value Sets
A Value Set represents a uniquely identifiable set of valid concept representations, where any concept representation can be tested to determine whether or not it is a member of the value set.
Value set complexity may range from a simple flat list of concept codes drawn from a single code system, to an unbounded hierarchical set of possibly post-coordinated expressions drawn from multiple code systems.
Value sets exist to constrain the content for a coded element in an HL7 static model or data type property. Value sets cannot have null content and must contain at least one concept representation where any given concept is generally (but not required to be) represented by only a single code within the Value Set.
[Figure 3] Example presentation of the value set “MaritalStatus”
In this specification, value set tables are not presented in detail.
Binding strength
There is an optional vocabulary strength for data types that support that feature (coded concepts). Examples include CD, CE, CV and CO. Values are required, extensible, preferred and example. Default is required.
Please note: the formerly supported values CNE (Coded No Extensibility) and CWE (Coded With Extensibility) in ART-DECOR are deprecated as of December 2017. Specification CNE is handled as required and CWE is handled as extensible.
Strength | Description |
---|---|
required | Required/CNE. Coded with no exceptions; this element SHALL be from the specified value set |
extensible | Extensible/CWE. Coded with Exceptions; this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead. |
preferred | Preferred. Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant. |
example | Example. Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included. |
Mismatches with required lead to validation errors (SHALL logic). Mismatches with extensible lead to validation warnings (SHOULD logic). Mismatches with preferred lead to validation information messages (MAY logic). Mismatches with example don't have any validation consequences.
Appendix
References
- ↑ Clinical Document Architecture Release 2: https://www.hl7.org/implement/standards/product_brief.cfm?product_id=7
- ↑ HL7 Data Types Release 1: http://www.hl7.org
- ↑ World Wide Web Consortium. Extensible Markup Language, 1.0, 2nd Edition: http://www.w3.org/TR/REC-xml
- ↑ World Wide Web Consortium. XML Schema: http://www.w3.org/TR/xmlschema-0/, http://www.w3.org/TR/xmlschema-1/, http://www.w3.org/TR/xmlschema-2/
- ↑ HL7 Version 3 Abstract Data type definition: https://www.hl7.org/implement/standards/product_brief.cfm?product_id=264
- ↑ XML ITS for data types: https://www.hl7.org/documentcenter/public_temp_682D4D16-1C23-BA17-0C789BA52BEDB68E/wg/inm/datatypes-its-xml20050714.htm
- ↑ RFC 1738 Uniform Resource Locators (URL): http://www.ietf.org/rfc/rfc1738.txt
- ↑ RFC 2806 URLs for Telephone Calls: http://www.ietf.org/rfc/rfc2806.txt
- ↑ Unified Code for Units of Measure: http://unitsofmeasure.org/
- ↑ ISO TS 13582: https://www.iso.org/standard/69652.html