generated from PackagrIO/goweb-template
-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better Observation value export & unit export - centralized in single…
… include. Added support for value rounding.
- Loading branch information
Showing
7 changed files
with
40 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
backend/pkg/utils/ips/templates/includes/observation-unit.gohtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{if not (empty .ValueString) }} | ||
{{.ValueString}} | ||
{{else if not (empty (.ValueQuantity | parseList)) }} | ||
{{.ValueQuantity | parseList | pluckList "unit" | join "," }} | ||
{{else if not (empty .ValueDate) }} | ||
{{.ValueDate | date "2006-01-02" }} | ||
{{else if not (empty (.ValueConcept | parseList)) }} | ||
{{.ValueConcept}} | ||
{{end}} |
12 changes: 12 additions & 0 deletions
12
backend/pkg/utils/ips/templates/includes/observation-value.gohtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{if not (empty .entry.ValueString) }} | ||
{{.ValueString}} | ||
{{else if not (empty (.entry.ValueQuantity | parseList)) }} | ||
{{.entry.ValueQuantity | parseList | pluckList "value" | roundList 2 | join "," }} | ||
{{if (get . "include_unit")}} | ||
{{.entry.ValueQuantity | parseList | pluckList "unit" | join "," }} | ||
{{end}} | ||
{{else if not (empty .entry.ValueDate) }} | ||
{{.entry.ValueDate | date "2006-01-02" }} | ||
{{else if not (empty (.entry.ValueConcept | parseList)) }} | ||
{{.entry.ValueConcept}} | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters