Skip to content

Commit 3cf77b2

Browse files
committed
safer handling of componentValueQuantity.
1 parent 63314aa commit 3cf77b2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

backend/pkg/utils/ips/templates/includes/observation-value.gohtml

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@
1616

1717

1818
{{range $index, $text := $componentCodeText }}
19-
{{$text}} - {{index $componentValueQuantity $index}}
19+
{{$text}}
20+
{{if lt $index (len $componentValueQuantity)}}
21+
- {{index $componentValueQuantity $index}}
22+
{{end}}
2023
{{if (get $ "include_unit")}}
21-
{{index $componentValueQuantityUnit $index}}
24+
{{if lt $index (len $componentValueQuantityUnit)}}
25+
{{index $componentValueQuantityUnit $index}}
26+
{{end}}
2227
{{end}}
2328
<br/>
2429
{{end}}

0 commit comments

Comments
 (0)