-
Notifications
You must be signed in to change notification settings - Fork 33
/
ContactPoint.yml
72 lines (65 loc) · 1.73 KB
/
ContactPoint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# (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