-
Notifications
You must be signed in to change notification settings - Fork 180
/
Goal.liquid
53 lines (53 loc) · 1.51 KB
/
Goal.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
{% mergeDiff msg -%}
{
"contained" : [ {{msg.contained | to_array | batch_render : 'Resource', 'msg'}} ],
{% assign value = msg.status %}
{% if value == 'proposed' or value == 'planned' or value == 'accepted' or value == 'on-hold' or value == 'cancelled' or value == 'entered-in-error' or value == 'rejected' -%}
"lifecycleStatus" : "{{value}}",
{% elseif value == 'achieved' -%}
"lifecycleStatus" : "completed",
{% elseif value == 'in-progress' or value == 'sustaining' -%}
"lifecycleStatus" : "active",
"achievementStatus" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/goal-achievement",
"code" : "{{value}}"
}
]
},
{% elseif value == 'on-target' -%}
"lifecycleStatus" : "active",
"achievementStatus" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/goal-achievement",
"code" : "sustaining"
}
]
},
{% elseif value == 'ahead-of-target' -%}
"lifecycleStatus" : "active",
"achievementStatus" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/goal-achievement",
"code" : "improving"
}
]
},
{% elseif value == 'behind-target' -%}
"lifecycleStatus" : "active",
"achievementStatus" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/goal-achievement",
"code" : "worsening"
}
]
},
{% endif -%}
"target" : [{{msg.target | to_json_string | default : '""'}}],
"status" : ""
}
{% endmergeDiff -%}