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.
working Observation components with/without units.
- Loading branch information
Showing
13 changed files
with
47 additions
and
38 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
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
12 changes: 6 additions & 6 deletions
12
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{{if not (empty .ValueString) }} | ||
{{if not (empty (.ValueString | parseMapList)) }} | ||
{{.ValueString}} | ||
{{else if not (empty (.ValueQuantity | parseList)) }} | ||
{{.ValueQuantity | parseList | pluckList "unit" | join "," }} | ||
{{else if not (empty (.ValueQuantity | parseMapList)) }} | ||
{{.ValueQuantity | parseMapList | pluckList "unit" | join "," }} | ||
{{else if not (empty .ValueDate) }} | ||
{{.ValueDate | date "2006-01-02" }} | ||
{{else if not (empty (.ValueConcept | parseList)) }} | ||
{{else if not (empty (.ValueConcept | parseMapList)) }} | ||
{{.ValueConcept}} | ||
{{else if not (empty (.ComponentValueQuantity | parseList)) }} | ||
{{.ComponentValueQuantity | parseList | pluckList "unit" | join "," }} | ||
{{else if not (empty (.ComponentValueQuantity | parseMapList)) }} | ||
{{.ComponentValueQuantity | parseMapList | pluckList "unit" | join "," }} | ||
{{end}} |
28 changes: 16 additions & 12 deletions
28
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 |
---|---|---|
@@ -1,23 +1,27 @@ | ||
{{if not (empty .entry.ValueString) }} | ||
{{.ValueString}} | ||
{{else if not (empty (.entry.ValueQuantity | parseList)) }} | ||
{{.entry.ValueQuantity | parseList | pluckList "value" | roundList 2 | join "," }} | ||
{{if not (empty (.entry.ValueString | parseMapList)) }} | ||
{{.entry.ValueString | parseStringList | join ","}} | ||
{{else if not (empty (.entry.ValueQuantity | parseMapList)) }} | ||
{{.entry.ValueQuantity | parseMapList | pluckList "value" | roundList 2 | join "," }} | ||
{{if (get . "include_unit")}} | ||
{{.entry.ValueQuantity | parseList | pluckList "unit" | join "," }} | ||
{{.entry.ValueQuantity | parseMapList | pluckList "unit" | join "," }} | ||
{{end}} | ||
{{else if not (empty .entry.ValueDate) }} | ||
{{.entry.ValueDate | date "2006-01-02" }} | ||
{{else if not (empty (.entry.ValueConcept | parseList)) }} | ||
{{else if not (empty (.entry.ValueConcept | parseMapList)) }} | ||
{{.entry.ValueConcept}} | ||
{{else if not (empty (.entry.ComponentValueQuantity | parseList)) }} | ||
{{$componentCodeText := $.entry.ComponentCode | parseList | pluckList "text" }} | ||
{{$componentValueQuantity := $.entry.ComponentValueQuantity | parseList | pluckList "value" | roundList 2 }} | ||
{{else if not (empty (.entry.ComponentValueQuantity | parseMapList)) }} | ||
{{$componentCodeText := .entry.ComponentCode | parseMapList | pluckList "text" }} | ||
{{$componentValueQuantity := .entry.ComponentValueQuantity | parseMapList | pluckList "value" | roundList 2 }} | ||
{{$componentValueQuantityUnit := .entry.ComponentValueQuantity | parseMapList | pluckList "unit" }} | ||
|
||
|
||
{{range $index, $text := $componentCodeText }} | ||
{{$text}} - {{index $componentValueQuantity $index}} | ||
{{if (get $ "include_unit")}} | ||
{{index $componentValueQuantityUnit $index}} | ||
{{end}} | ||
<br/> | ||
{{end}} | ||
|
||
{{if (get . "include_unit")}} | ||
{{.ComponentValueQuantity | parseList | pluckList "unit" | join "," }} | ||
{{end}} | ||
|
||
{{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
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