HL7 v2+ Specification
0.0.0 - draft
HL7 v2+ Specification, published by HL7 International. This guide is not an authorized publication; it is the continuous build for version 0.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/v2ig/ and changes regularly. See the Directory of published versions
Official URL: http://hl7.org/v2/StructureDefinition/CWE | Version: 0.0.0 | |||
Standards status: Informative | Computable Name: CWE |
As of v2.7 a third tuple, formerly known as triplet, has been added to the CWE data type. Additionally, 3 new components were added to each tuple such that each tuple now has a total of 7 components. The Original Text component applies to the CWE as a whole.
Note: The Vocabulary TC is the steward of the CWE data type.
The presence of two sets of equivalent codes in this data type is semantically different from a repetition of a CWE-type field. With repetition, several distinct codes (with distinct meanings) may be transmitted.
[#CWE_UsageNote .anchor]##Usage Notes: The CWE data type should be used for coded fields with one or more of the following characteristics:
• The identifier code (CWE.1) component is optional
• The set of allowable values from which the identifier code is drawn may be extended on a site-specific basis
• An exception identifier code may be encountered; that is, a code that is not defined in the value set (either model or site-extended).
This is in contrast to the CNE data type, which requires a code from a non-extendable value set be sent in the identifier code component (CNE.1) in all cases (except, of course, if the entire field is empty and defined as optional at the segment level).
The rules for populating CWE components are governed by the status of the identifier code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
*Identifier Code Status* | *Identifier Code (CWE.1)* | *Descriptive Text (CWE.2)* | *Coding System (CWE.3)* |
---|---|---|---|
Contained in model value set | Populated | May be populated | Must be populated with model coding system, or (not recommended) site-specific coding system that is a superset containing model values. |
Contained in site-specific extensions to model value set | Populated | May be populated | Site-specific coding system. |
Contained in neither model nor extended value sets | Not populated | May be populated with the identifier code, free-text description, or a concatenation of the two. Should be human interpretable. | Must not be populated. |
Not supplied; but descriptive text is supplied. | Not populated | May be populated with descriptive text. | Must not be populated. |
As an example, consider “currency” codes where:
• The model values are defined by the ISO 4217 value set,
• The value set is extended on site to include the code HL7 – “HL7 Drink Ticket”, and
• The data entry screen on the sending system does not enforce any edits for the currency code.
And so the value set used on site is:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Identifier Code Status | Identifier Code | Descriptive Text |
---|---|---|
Model values from ISO 4217 external table | AED | United Arab Emirates, Dirhams |
AFA | Afghanistan, Afghanis | |
ALL | Albania, Leke | |
… | ||
ZAR | South Africa, Rand | |
ZMK | Zambia, Kwacha | |
ZWD | Zimbabwe, Zimbabwe Dollars | |
Site-specific extension | HL7 | HL7 Events, Drink Ticket |
Collectively, this value set must be referred to with a local coding system ID, because “HL7” does not exist in ISO 4217. According to the rules, the site assigns the coding system ID “99CUR” to the value set.
Based on the code and descriptive text entered by the user on the sending system, the CWE would be populated as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
*Entered by user* | *Sent in CWE* | |||
---|---|---|---|---|
*Code* | *Descriptive Text* | *Identifier Code (CWE.1)* | *Descriptive Text (CWE.2)* | *Coding System (CWE.3)* |
GBP | Great Britain, Pound | GBP | Great Britain, Pound | ISO4217 |
GBP | Great Britain, Pound | 99CUR (This option is NOT recommended) | ||
HL7 | HL7 Drink Ticket | HL7 | HL7 Drink Ticket | 99CUR |
XXX | <Bogus entry> | Must not be populated | XXX | Must not be populated. |
Must not be populated | Bogus entry | Must not be populated. | ||
Must not be populated | XXX: Bogus entry | Must not be populated. | ||
Must not be populated | anything – or nothing. | Must not be populated. | ||
Dollar | Must not be populated | Dollar | Must not be populated. | |
Valued from HL7 Table 0353 (e.g., “U” for unknown) | Dollar | HL70353 |
Notes:
{empty}1. Where multiple valid options for sending the entered data exist, each alternative is depicted as a separate row.
{empty}2. CWE.2 - Descriptive Text is never required, and there are no hard and fast rules on what text may be sent in this component. Of course, common sense suggests that if valued, the text should complement the identifier code of CWE.1.
It follows that where CWE.1 cannot be valued because the entered code does not exist in the value set, the entered code may be sent in CWE.2; with or without additional descriptive text. However, this is not required by HL7.
{empty}3. The example with GBP shows two options for the code set: ISO4217 or 99CUR. While it is now technically possible to send 99CUR on the basis that this code may exist on its own in the extended local code set, HL7 urges that where a code is a member of the standard code set, that code set should be named in CWE.3. HL7 intends to mandate this in a future release.
{empty}4. While there are no formal rules regarding the valuation of CWE.2 - Descriptive Text, it is expected that any value contained therein be meaningful to a human reader.
Usage:
Description of Profiles, Differentials, Snapshots and how the different presentations work.
This structure is derived from V2ComplexDataType
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CWE | 0..* | V2ComplexDataType | coded with exceptions Instances of this logical model are not marked to be the target of a Reference | |
1 | 0..1 | string | Identifier | |
2 | 0..1 | string | Text | |
3 | 0..1 | code | Name of Coding System Binding: hl7VS-codingSystem (required) | |
4 | 0..1 | string | Alternate Identifier | |
5 | 0..1 | string | Alternate Text | |
6 | 0..1 | code | Name of Alternate Coding System Binding: hl7VS-codingSystem (required) | |
7 | 0..1 | string | Coding System Version ID | |
8 | 0..1 | string | Alternate Coding System Version ID | |
9 | 0..1 | string | Original Text | |
10 | 0..1 | string | Second Alternate Identifier | |
11 | 0..1 | string | Second Alternate Text | |
12 | 0..1 | code | Name of Second Alternate Coding System Binding: hl7VS-codingSystem (required) | |
13 | 0..1 | string | Second Alternate Coding System Version ID | |
14 | 0..1 | string | Coding System OID | |
15 | 0..1 | string | Value Set OID | |
16 | 0..1 | dateTime | Value Set Version ID | |
17 | 0..1 | string | Alternate Coding System OID | |
18 | 0..1 | string | Alternate Value Set OID | |
19 | 0..1 | dateTime | Alternate Value Set Version ID | |
20 | 0..1 | string | Second Alternate Coding System OID | |
21 | 0..1 | string | Second Alternate Value Set OID | |
22 | 0..1 | dateTime | Second Alternate Value Set Version ID | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
CWE.3 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.6 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.12 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 |
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CWE | 0..* | V2ComplexDataType | coded with exceptions Instances of this logical model are not marked to be the target of a Reference | |
1 | 0..1 | string | Identifier | |
2 | 0..1 | string | Text | |
3 | 0..1 | code | Name of Coding System Binding: hl7VS-codingSystem (required) | |
4 | 0..1 | string | Alternate Identifier | |
5 | 0..1 | string | Alternate Text | |
6 | 0..1 | code | Name of Alternate Coding System Binding: hl7VS-codingSystem (required) | |
7 | 0..1 | string | Coding System Version ID | |
8 | 0..1 | string | Alternate Coding System Version ID | |
9 | 0..1 | string | Original Text | |
10 | 0..1 | string | Second Alternate Identifier | |
11 | 0..1 | string | Second Alternate Text | |
12 | 0..1 | code | Name of Second Alternate Coding System Binding: hl7VS-codingSystem (required) | |
13 | 0..1 | string | Second Alternate Coding System Version ID | |
14 | 0..1 | string | Coding System OID | |
15 | 0..1 | string | Value Set OID | |
16 | 0..1 | dateTime | Value Set Version ID | |
17 | 0..1 | string | Alternate Coding System OID | |
18 | 0..1 | string | Alternate Value Set OID | |
19 | 0..1 | dateTime | Alternate Value Set Version ID | |
20 | 0..1 | string | Second Alternate Coding System OID | |
21 | 0..1 | string | Second Alternate Value Set OID | |
22 | 0..1 | dateTime | Second Alternate Value Set Version ID | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
CWE.3 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.6 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.12 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 |
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CWE | 0..* | V2ComplexDataType | coded with exceptions Instances of this logical model are not marked to be the target of a Reference | |
1 | 0..1 | string | Identifier | |
2 | 0..1 | string | Text | |
3 | 0..1 | code | Name of Coding System Binding: hl7VS-codingSystem (required) | |
4 | 0..1 | string | Alternate Identifier | |
5 | 0..1 | string | Alternate Text | |
6 | 0..1 | code | Name of Alternate Coding System Binding: hl7VS-codingSystem (required) | |
7 | 0..1 | string | Coding System Version ID | |
8 | 0..1 | string | Alternate Coding System Version ID | |
9 | 0..1 | string | Original Text | |
10 | 0..1 | string | Second Alternate Identifier | |
11 | 0..1 | string | Second Alternate Text | |
12 | 0..1 | code | Name of Second Alternate Coding System Binding: hl7VS-codingSystem (required) | |
13 | 0..1 | string | Second Alternate Coding System Version ID | |
14 | 0..1 | string | Coding System OID | |
15 | 0..1 | string | Value Set OID | |
16 | 0..1 | dateTime | Value Set Version ID | |
17 | 0..1 | string | Alternate Coding System OID | |
18 | 0..1 | string | Alternate Value Set OID | |
19 | 0..1 | dateTime | Alternate Value Set Version ID | |
20 | 0..1 | string | Second Alternate Coding System OID | |
21 | 0..1 | string | Second Alternate Value Set OID | |
22 | 0..1 | dateTime | Second Alternate Value Set Version ID | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
CWE.3 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.6 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.12 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 |
This structure is derived from V2ComplexDataType
Differential View
This structure is derived from V2ComplexDataType
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CWE | 0..* | V2ComplexDataType | coded with exceptions Instances of this logical model are not marked to be the target of a Reference | |
1 | 0..1 | string | Identifier | |
2 | 0..1 | string | Text | |
3 | 0..1 | code | Name of Coding System Binding: hl7VS-codingSystem (required) | |
4 | 0..1 | string | Alternate Identifier | |
5 | 0..1 | string | Alternate Text | |
6 | 0..1 | code | Name of Alternate Coding System Binding: hl7VS-codingSystem (required) | |
7 | 0..1 | string | Coding System Version ID | |
8 | 0..1 | string | Alternate Coding System Version ID | |
9 | 0..1 | string | Original Text | |
10 | 0..1 | string | Second Alternate Identifier | |
11 | 0..1 | string | Second Alternate Text | |
12 | 0..1 | code | Name of Second Alternate Coding System Binding: hl7VS-codingSystem (required) | |
13 | 0..1 | string | Second Alternate Coding System Version ID | |
14 | 0..1 | string | Coding System OID | |
15 | 0..1 | string | Value Set OID | |
16 | 0..1 | dateTime | Value Set Version ID | |
17 | 0..1 | string | Alternate Coding System OID | |
18 | 0..1 | string | Alternate Value Set OID | |
19 | 0..1 | dateTime | Alternate Value Set Version ID | |
20 | 0..1 | string | Second Alternate Coding System OID | |
21 | 0..1 | string | Second Alternate Value Set OID | |
22 | 0..1 | dateTime | Second Alternate Value Set Version ID | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
CWE.3 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.6 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.12 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 |
Key Elements View
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CWE | 0..* | V2ComplexDataType | coded with exceptions Instances of this logical model are not marked to be the target of a Reference | |
1 | 0..1 | string | Identifier | |
2 | 0..1 | string | Text | |
3 | 0..1 | code | Name of Coding System Binding: hl7VS-codingSystem (required) | |
4 | 0..1 | string | Alternate Identifier | |
5 | 0..1 | string | Alternate Text | |
6 | 0..1 | code | Name of Alternate Coding System Binding: hl7VS-codingSystem (required) | |
7 | 0..1 | string | Coding System Version ID | |
8 | 0..1 | string | Alternate Coding System Version ID | |
9 | 0..1 | string | Original Text | |
10 | 0..1 | string | Second Alternate Identifier | |
11 | 0..1 | string | Second Alternate Text | |
12 | 0..1 | code | Name of Second Alternate Coding System Binding: hl7VS-codingSystem (required) | |
13 | 0..1 | string | Second Alternate Coding System Version ID | |
14 | 0..1 | string | Coding System OID | |
15 | 0..1 | string | Value Set OID | |
16 | 0..1 | dateTime | Value Set Version ID | |
17 | 0..1 | string | Alternate Coding System OID | |
18 | 0..1 | string | Alternate Value Set OID | |
19 | 0..1 | dateTime | Alternate Value Set Version ID | |
20 | 0..1 | string | Second Alternate Coding System OID | |
21 | 0..1 | string | Second Alternate Value Set OID | |
22 | 0..1 | dateTime | Second Alternate Value Set Version ID | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
CWE.3 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.6 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.12 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 |
Snapshot View
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CWE | 0..* | V2ComplexDataType | coded with exceptions Instances of this logical model are not marked to be the target of a Reference | |
1 | 0..1 | string | Identifier | |
2 | 0..1 | string | Text | |
3 | 0..1 | code | Name of Coding System Binding: hl7VS-codingSystem (required) | |
4 | 0..1 | string | Alternate Identifier | |
5 | 0..1 | string | Alternate Text | |
6 | 0..1 | code | Name of Alternate Coding System Binding: hl7VS-codingSystem (required) | |
7 | 0..1 | string | Coding System Version ID | |
8 | 0..1 | string | Alternate Coding System Version ID | |
9 | 0..1 | string | Original Text | |
10 | 0..1 | string | Second Alternate Identifier | |
11 | 0..1 | string | Second Alternate Text | |
12 | 0..1 | code | Name of Second Alternate Coding System Binding: hl7VS-codingSystem (required) | |
13 | 0..1 | string | Second Alternate Coding System Version ID | |
14 | 0..1 | string | Coding System OID | |
15 | 0..1 | string | Value Set OID | |
16 | 0..1 | dateTime | Value Set Version ID | |
17 | 0..1 | string | Alternate Coding System OID | |
18 | 0..1 | string | Alternate Value Set OID | |
19 | 0..1 | dateTime | Alternate Value Set Version ID | |
20 | 0..1 | string | Second Alternate Coding System OID | |
21 | 0..1 | string | Second Alternate Value Set OID | |
22 | 0..1 | dateTime | Second Alternate Value Set Version ID | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
CWE.3 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.6 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 | |
CWE.12 | required | Hl7VSCodingSystemhttp://terminology.hl7.org/ValueSet/v2-0396 |
This structure is derived from V2ComplexDataType