-
Notifications
You must be signed in to change notification settings - Fork 183
/
Copy pathExamplePatient.liquid
55 lines (55 loc) · 1.48 KB
/
ExamplePatient.liquid
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
{
"resourceType": "Patient",
"id": "{{ msg.PatientId | to_json_string | generate_uuid }}",
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "urn:oid:2.16.840.1.113883.19.5",
"value": "{{ msg.MRN }}"
}
],
"active": true,
"name": [
{
"family": "{{ msg.LastName }}",
"given": [
"{{ msg.FirstName }}"
]
}
],
"telecom": [
{% comment -%} use "[]" to access value if the key contains spaces or other special characters {% endcomment -%}
{% for p in msg["Phone Number"] -%}
{
"system": "phone",
"value": "{{ p }}",
},
{% endfor -%}
],
"gender":
{% if msg.Gender == 'M' -%}
"male",
{% elsif msg.Gender == 'F' -%}
"female",
{% elsif msg.Gender == 'U' -%}
"unknown",
{% elsif code -%}
"other",
{% else %}
"",
{% endif -%}
"birthDate": "{{ msg.DOB | add_hyphens_date }}",
"managingOrganization": {
"reference": "Organization/2.16.840.1.113883.19.5",
"display": "Good Health Clinic"
},
"deceasedDateTime": "{{ msg.TimeOfDeath }}"
}