hl7.datatype.CodeableConcept.yml Maven / Gradle / Ivy
#
# (C) Copyright IBM Corp. 2020, 2022
#
# SPDX-License-Identifier: Apache-2.0
#
# Represents codeable concept that can be derived from CE/CNE/CWE
coding_1:
# coding requires code,display and system defined as variables from the resource that calls this resource
valueOf: datatype/Coding
generateList: true
expressionType: resource
condition: $code NOT_NULL && $coding NULL
specs: CE |CNE
vars:
code: CE.1 |CNE.1
system: CE.3 |CNE.3
version: CE.6 |CNE.7
coding_2:
condition: $code NOT_NULL && $coding NULL
type: CODING_SYSTEM_V2_IDENTIFIER
valueOf: ID |TX
generateList: true
expressionType: HL7Spec
vars:
code: ID |TX
# IS is different than ID | TX because we want to keep unknown (user-defined) codes
coding_3:
condition: $code NOT_NULL && $coding NULL
type: CODING_SYSTEM_V2_IS_USER_DEFINED_TABLE
valueOf: IS
generateList: true
expressionType: HL7Spec
vars:
code: IS
# Generalized CWE for alternate codes handles mismatched systems and codes
coding_4:
valueOf: $coding
generateList: true
condition: $coding NOT_NULL
specs: CWE
vars:
coding: CODING_SYSTEM_V2_ALTERNATE, CWE
# Generalized CWE through CODING_SYSTEM_V2 handles mismatched systems and codes
coding_5:
valueOf: $coding
generateList: true
condition: $coding NOT_NULL
specs: CWE
vars:
coding: CODING_SYSTEM_V2, CWE
coding_6:
valueOf: $coding
condition: $coding NOT_NULL
generateList: true
# Allows alternate coding to be added from hardcoded values
coding_7:
generateList: true
valueOf: datatype/Coding # uses values from vars
expressionType: resource
condition: $code NOT_NULL
vars:
code: $alternateCode
display: $alternateDisplay
system: $alternateSystem
# Require available text, and the absense of an identifierCoding
text:
condition: $displayText NOT_NULL && $identifierCoding NULL
type: STRING
valueOf: $displayText
vars:
displayText: $text | CWE.2 | CWE.9 | CE.2 | CNE.2| ST | TX | ID | CWE.5