hl7.datatype.ContactPoint.yml Maven / Gradle / Ivy
#
# (C) Copyright IBM Corp. 2021, 2022
#
# SPDX-License-Identifier: Apache-2.0
#
# HL7 FHIR Data Type ContactPoint was previously called Telecom
---
# system is phone or email depending on a value in email address (XTN.4)
system_1:
condition: $emailValue NULL
type: STRING
valueOf: "phone"
vars:
emailValue: XTN.4
system_2:
condition: $emailValue NOT_NULL
type: STRING
valueOf: "email"
vars:
emailValue: XTN.4
# value is phone number or email address depending on a value in email address (XTN.4)
value_1:
condition: $emailValue NULL
type: STRING
valueOf: 'GeneralUtils.getFormattedTelecomNumberValue( xtn1Old, xtn5Country, xtn6Area, xtn7Local, xtn8Extension, xtn12Unformatted )'
expressionType: JEXL
vars:
xtn1Old: String, XTN.1
xtn5Country: String, XTN.5
xtn6Area: String, XTN.6
xtn7Local: String, XTN.7
xtn8Extension: String, XTN.8
xtn12Unformatted: String, XTN.12
emailValue: XTN.4
value_2:
condition: $emailValue NOT_NULL
type: STRING
valueOf: $emailValue
vars:
emailValue: XTN.4
# Default use to "home" or "work", whatever is passed in
use_1:
type: STRING
valueOf: $use
expressionType: HL7Spec
# But if CP, then change use to "mobile"
use_2:
condition: $equipmentType EQUALS CP
type: STRING
valueOf: $mobile
expressionType: HL7Spec
vars:
equipmentType: String, XTN.3
constants:
mobile: "mobile"
period:
valueOf: datatype/Period
expressionType: resource
vars:
start: XTN.13
end: XTN.14
rank:
type: STRING
valueOf: XTN.18
expressionType: HL7Spec