correctly handle complex Observations (ComponentValueQuantity - used by Blood Pressure - Diastolic vs Systolic)
This commit is contained in:
parent
441c8ab964
commit
83d6cdea08
|
@ -6,4 +6,6 @@
|
||||||
{{.ValueDate | date "2006-01-02" }}
|
{{.ValueDate | date "2006-01-02" }}
|
||||||
{{else if not (empty (.ValueConcept | parseList)) }}
|
{{else if not (empty (.ValueConcept | parseList)) }}
|
||||||
{{.ValueConcept}}
|
{{.ValueConcept}}
|
||||||
|
{{else if not (empty (.ComponentValueQuantity | parseList)) }}
|
||||||
|
{{.ComponentValueQuantity | parseList | pluckList "unit" | join "," }}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -9,4 +9,15 @@
|
||||||
{{.entry.ValueDate | date "2006-01-02" }}
|
{{.entry.ValueDate | date "2006-01-02" }}
|
||||||
{{else if not (empty (.entry.ValueConcept | parseList)) }}
|
{{else if not (empty (.entry.ValueConcept | parseList)) }}
|
||||||
{{.entry.ValueConcept}}
|
{{.entry.ValueConcept}}
|
||||||
|
{{else if not (empty (.entry.ComponentValueQuantity | parseList)) }}
|
||||||
|
{{$componentCodeText := $.entry.ComponentCode | parseList | pluckList "text" }}
|
||||||
|
{{$componentValueQuantity := $.entry.ComponentValueQuantity | parseList | pluckList "value" | roundList 2 }}
|
||||||
|
|
||||||
|
{{range $index, $text := $componentCodeText }}
|
||||||
|
{{$text}} - {{index $componentValueQuantity $index}}
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if (get . "include_unit")}}
|
||||||
|
{{.ComponentValueQuantity | parseList | pluckList "unit" | join "," }}
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in New Issue