diff --git a/backend/pkg/utils/ips/templates/includes/observation-unit.gohtml b/backend/pkg/utils/ips/templates/includes/observation-unit.gohtml index d6dac18d..10a0de7c 100644 --- a/backend/pkg/utils/ips/templates/includes/observation-unit.gohtml +++ b/backend/pkg/utils/ips/templates/includes/observation-unit.gohtml @@ -6,4 +6,6 @@ {{.ValueDate | date "2006-01-02" }} {{else if not (empty (.ValueConcept | parseList)) }} {{.ValueConcept}} +{{else if not (empty (.ComponentValueQuantity | parseList)) }} + {{.ComponentValueQuantity | parseList | pluckList "unit" | join "," }} {{end}} diff --git a/backend/pkg/utils/ips/templates/includes/observation-value.gohtml b/backend/pkg/utils/ips/templates/includes/observation-value.gohtml index 409f62e9..c57d17bb 100644 --- a/backend/pkg/utils/ips/templates/includes/observation-value.gohtml +++ b/backend/pkg/utils/ips/templates/includes/observation-value.gohtml @@ -9,4 +9,15 @@ {{.entry.ValueDate | date "2006-01-02" }} {{else if not (empty (.entry.ValueConcept | parseList)) }} {{.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}}