HL7 CDA Core Principles: Unterschied zwischen den Versionen
Dammon (Diskussion | Beiträge) (→Code Systems) |
Dammon (Diskussion | Beiträge) (→Value Sets) |
||
Zeile 288: | Zeile 288: | ||
=== Value Sets === | === 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 ex-pressions 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. | ||
== Appendix == | == Appendix == |
Version vom 14. Juni 2019, 08:20 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 im-plementation 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 | Refurnished 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 for-mat. It is assumed that the reader is familiar with common XML aspects. 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/XMLSchemma-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 in-formation in a CDA XML instance. For example, a model attribute named “time” has as its data type a time stamp “TS” (see Figure 1).
[Abbildung 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:
Attributte | DT | Conf | Description |
---|---|---|---|
(name of the model attribute or XML el-ement) | 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 repre-sented 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 send-ing 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 circum-stances (conditions) derived from information in the instance and the corre-sponding 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 al-lowed 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 de-fault 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 confi-dentiality, even though no detail data is pro-vided. Its primary purpose is for those cir-cumstances 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: nullFlavors"). 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 infor-mation can be used by the receiver to validate and process the value. Attributes of an element with this data type are
Attributte | DT | Conf | Description |
---|---|---|---|
@nullFlavor | CS | - | Classification of the missing value, see 3.3. |
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)
Instance Identifier (II)
Encapsulated Data (ED)
Strings (ST)
Concept Descriptor (CD)
Coded with Equivalents (CE)
Coded Value (CV)
Coded Simple Value (CS)
Telecommunication Address (TEL)
Postal Address (AD)
Person Name (PN)
Organisation Name (ON)
Integer Number (INT)
Physical Quantities (PQ)
Point in Time (TS)
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).
[Abbildung 2] Several possibilities to determine closed intervals
Interval of time (IVL_TS)
Interval of physical quantities (IVL_PQ)
Ratio of quantities (RTO_QTY_QTY)
Identification mechanisms
Object Identifiers (OIDs)
Instance identification
Coding scheme identification
List of identification schemes
List of code systems
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 ex-pressions 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.
Appendix
References
- ↑ Clinical Document Architecture Release 2 http://www.hl7.org
- ↑ HL7 Data Types Release 1 http://www.hl7.org
- ↑ HL7 Version 3 Abstract Data type definition http://www.hl7.org
- ↑ XML ITS for data types http://www.hl7.org