visit the hl7 website The Demo site for our new HL7 Version 2+ (plus) Standard

18.3.80 CWE - coded with exceptions (2A.3.13)

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.

HL7 Component Table - CWE - Coded with Exceptions

Core Framework Base Standard Profile
Seq# Description Interpretation Flags Cardinality Length C.LEN Vocabulary Data Type Implement Cardinality Vocabulary
CWE
1 Identifier [0..1]     ST      
2 Text [0..1]     ST      
3
Name of Coding System
C

Condition defined for this element


[1..1]
[0..0]
  codingSystem (CD VS) ID MAY   (CS)
4 Alternate Identifier [0..1]     ST      
5 Alternate Text [0..1]     ST      
6
Name of Alternate Coding System
C

Condition defined for this element


[1..1]
[0..0]
  codingSystem (CD VS) ID MAY   (CS)
7
Coding System Version ID
C

Condition defined for this element


[1..1]
[0..0]
    ST MAY    
8 Alternate Coding System Version ID [0..1]     ST      
9 Original Text [0..1]     ST      
10 Second Alternate Identifier [0..1]     ST      
11 Second Alternate Text [0..1]     ST      
12
Name of Second Alternate Coding System
C

Condition defined for this element


[1..1]
[0..0]
  codingSystem (CD VS) ID MAY   (CS)
13 Second Alternate Coding System Version ID [0..1]     ST      
14
Coding System OID
C

Condition defined for this element


[1..1]
[0..0]
    ST MAY    
15 Value Set OID [0..1]     ST      
16
Value Set Version ID
C

Condition defined for this element


[1..1]
[0..0]
    DTM MAY    
17
Alternate Coding System OID
C

Condition defined for this element


[1..1]
[0..0]
    ST MAY    
18 Alternate Value Set OID [0..1]     ST      
19
Alternate Value Set Version ID
C

Condition defined for this element


[1..1]
[0..0]
    DTM MAY    
20
Second Alternate Coding System OID
C

Condition defined for this element


[1..1]
[0..0]
    ST MAY    
21 Second Alternate Value Set OID [0..1]     ST      
22 Second Alternate Value Set Version ID
C

Condition defined for this element


[1..1]
[0..0]
    DTM MAY    

Conditions/Invariants

The root for the expression is on the segment.

Seq. Referenced Elements Introduction Invariant Comment proposed Optionality
3 ? Name of Coding System
6 ? Name of Alternate Coding System
7 ? Coding System Version ID
12 ? Name of Second Alternate Coding System
14 ? Coding System OID
16 ? Value Set Version ID
17 ? Alternate Coding System OID
19 ? Alternate Value Set Version ID
20 ? Second Alternate Coding System OID
22 ? Second Alternate Value Set Version ID

Note: The Vocabulary TC is the steward of the CWE data type.

Definition: Specifies a coded element and its associated detail. The CWE data type is used when 1) more than one table may be applicable or 2) the specified HL7 or externally defined table may be extended with local values or 3) when text is in place, the code may be omitted.

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.

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:

Site-specific coding system.

Not supplied; but descriptive text is supplied.

Must not be populated.

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

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 populated

May be populated with descriptive text.

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:

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:

Descriptive Text (CWE.2)

ISO4217

Must not be populated.

Dollar

Entered by user

Sent in CWE

Code

Descriptive Text

Identifier Code (CWE.1)

Coding System (CWE.3)

GBP

Great Britain, Pound

GBP

Great Britain, Pound

GBP

Great Britain, Pound

99CUR (This option is NOT recommended)

HL7

HL7 Drink Ticket

HL7

HL7 Drink Ticket

99CUR

XXX

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.

Dollar

Must not be populated

Must not be populated.

Valued from HL7 Table 0353 (e.g., “U” for unkown)

Dollar

HL70353

Notes:

Where multiple valid options for sending the entered data exist, each alternative is depicted as a separate row.

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.

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.

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.

18.3.80.1 Identifier (ST) (2A.3.13.0)

Definition: The first component contains the sequence of characters (the code) that uniquely identifies the item being referenced by the CWE.2. Different coding schemes will have different elements here.

In the context of “Data Missing”, described above in the Usage Note, refer to HL7 Table 0353 - CWE Statuses for valid values.

HL7 Table 0353 - CWE statuses

Refer to section 2.5.5.5 in Chapter 2, Control, for some discussion on the length of this component.

18.3.80.2 Text (ST) (2A.3.13.1)

Definition: The second component contains the descriptive or textual name of the identifier, e.g., "myocardial infarction" or "X-ray impression".

18.3.80.3 Name of Coding System (ID) (2A.3.13.2)

Definition: The third component contains the code for the name of the coding system from which the value in CWE.1 is obtained. Each coding system is assigned a unique identifier. As of v2.7 this component is required when CWE.1 is populated and CWE.14 is not populated. Both CWE.3 and CWE.14 may be populated. Receivers should not identify a code based on its position within the tuples (Identifier, Alternate Identifier, or Second Alternate Identifier) or position within a repeating field. Instead, the receiver should always examine the codingSystem as specified in CWE.3 and/or CWE.14, the "Coding System" component or the "Coding System OID" for the tuple.

Refer to HL7 Table 0396 - Coding System in Chapter 2C, section "Coding System Table" for valid values.

Refer to section 2.A.8.3, "Name of Coding System (ID)" for a discussion of coding system conventions.

18.3.80.4 Alternate Identifier (ST) (2A.3.13.3)

Definition: A sequence of characters that uniquely identifies an alternate code. Analogous to CWE.1- Identifier.

Usage Notes: The Alternate Identifier is used to represent the local or user seen code as described. If present, it obeys the same rules of use and interpretation as described for component 1. If both are present, the identifiers in component 4 and component 1 should have exactly the same meaning, i.e., they should be exact synonyms.

18.3.80.5 Alternate Text (ST) (2A.3.13.4)

Definition: The descriptive or textual name of the alternate identifier. Analogous to CWE.2 - Text. See usage note in section introduction.

18.3.80.6 Name of Alternate Coding System (ID) (2A.3.13.5)

Definition: Identifies the coding scheme being used in the alternate identifier component. Analogous to CWE.3 - Name of Coding System. See usage note in section introduction.

As of v2.7 this component is required when CWE.4 is populated and CWE.17 is not populated. Both CWE.6 and CWE.17 may be populated. Receivers should not identify a code based on its position within the tuples (Identifier, Alternate Identifier, or Second Alternate Identifier) or position within a repeating field. Instead, the receiver should always examine the coding System as specified in CWE.6 and/or CWE.17, the "Coding System" component or the "Coding System OID", for the tuple.

18.3.80.7 Coding System Version ID (ST) (2A.3.13.6)

Definition: This component carries the version for the coding system identified by components 1-3. If CWE.3 is populated with a value other than HL7nnnn or is of table type user-defined, version ID must be valued with an actual version ID. If CWE.3 is populated with a value of HL7nnnn and nnnn is of table type HL7, version ID may have an actual value or it may be absent. If version ID is absent, it will be interpreted to have the same value as the HL7 version number in the message header.

18.3.80.8 Alternate Coding System Version ID (ST) (2A.3.13.7)

Definition: This component carries the version for the coding system identified by components 4-6. Analogous To CWE.7 - Coding System Version ID.

18.3.80.9 Original Text (ST) (2A.3.13.8)

Definition: The text as seen and/or selected by the user who entered the data. Original text can be used in a structured user interface to capture what the user saw as a representation of the code on the data input screen, or in a situation where the user dictates or directly enters text, it is the text entered or uttered by the user. In a situation where the code is assigned sometime after the text was entered, original text is the text or phrase used as the basis for assigning the code.

18.3.80.10 Second Alternate Identifier (ST) (2A.3.13.9)

Definition: A sequence of characters that uniquely identifies a second alternate code. Analogous to CWE.1- Identifier.