generated from PackagrIO/goweb-template
-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathdiagnostic_results.gohtml
88 lines (86 loc) · 3.79 KB
/
diagnostic_results.gohtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!--/* DiagnosticResults -->
<!--
TABLE 1: Observations
Code: Observation.code.text || Observation.code.coding[x].display (separated by <br />)
Result: Observation.valueQuantity || Observation.valueDateTime || Observation.valueCodeableConcept.text || Observation.valueCodeableConcept.coding[x].display (separated by <br />) || Observation.valueString
Unit: Observation.valueQuantity.unit
Interpretation: Observation.interpretation[0].text || Observation.interpretation[0].coding[x].display (separated by <br />)
Reference Range: Observation.referenceRange[x]{ text || low.value && “-“ && high.value} (concatenate with comma, e.g. x, y, z)
Comments: Observation.note[x].text (separated by <br />)
Date: Observation.effectiveDateTime || Observation.effectivePeriod.start
TABLE 2: Diagnostic Reports
Code: DiagnosticReport.code.text || DiagnosticReport.code.coding[x].display (separated by <br />)
Date: DiagnosticReport.effectiveDateTime || DiagnosticReport.effectivePeriod.start
*/-->
<div xmlns:th="http://www.thymeleaf.org">
<th:block th:if="${narrativeUtil.bundleHasEntriesWithResourceType(resource, 'Observation')}">
<h5>Diagnostic Results: Observations</h5>
<table class="hapiPropertyTable">
<thead>
<tr>
<th>Code</th>
<th>Result</th>
<th>Unit</th>
<th>Interpretation</th>
<th>Reference Range</th>
<th>Comments</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<th:block th:each="entry : ${resource.entry}" th:object="${entry.getResource()}">
<th:block th:if='*{getResourceType().name() == "Observation"}'>
<th:block th:unless='*{getResourceType().name() == "Composition"}'>
<th:block
th:with="extension=${entry.getResource().getExtensionByUrl('http://hl7.org/fhir/StructureDefinition/narrativeLink').getValue().getValue()}">
<tr th:id="${#strings.arraySplit(extension, '#')[1]}">
<td th:insert="~{IpsUtilityFragments :: codeableConcept (cc=*{getCode()},attr='display')}">Code
</td>
<td th:insert="~{IpsUtilityFragments :: renderValue (value=*{getValue()})}">Result</td>
<td th:insert="~{IpsUtilityFragments :: renderValueUnit (value=*{getValue()})}">Unit</td>
<td
th:insert="~{IpsUtilityFragments :: firstFromCodeableConceptList (list=*{getInterpretation()})}">
Interpretation
</td>
<td th:insert="~{IpsUtilityFragments :: concatReferenceRange (list=*{getReferenceRange()})}">
Reference
Range
</td>
<td th:insert="~{IpsUtilityFragments :: concat (list=*{getNote()},attr='text')}">Comments</td>
<td th:insert="~{IpsUtilityFragments :: renderEffective (effective=*{getEffective()})}">Date</td>
</tr>
</th:block>
</th:block>
</th:block>
</th:block>
</tbody>
</table>
</th:block>
<th:block th:if="${narrativeUtil.bundleHasEntriesWithResourceType(resource, 'DiagnosticReport')}">
<h5>Diagnostic Results: Diagnostic Reports</h5>
<table class="hapiPropertyTable">
<thead>
<tr>
<th>Code</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<th:block th:each="entry : ${resource.entry}" th:object="${entry.getResource()}">
<th:block th:if='*{getResourceType().name() == "DiagnosticReport"}'>
<th:block th:unless='*{getResourceType().name() == "Composition"}'>
<th:block
th:with="extension=${entry.getResource().getExtensionByUrl('http://hl7.org/fhir/StructureDefinition/narrativeLink').getValue().getValue()}">
<tr th:id="${#strings.arraySplit(extension, '#')[1]}">
<td th:insert="~{IpsUtilityFragments :: codeableConcept (cc=*{getCode()},attr='display')}">Device
</td>
<td th:insert="~{IpsUtilityFragments :: renderEffective (effective=*{getEffective()})}">Date</td>
</tr>
</th:block>
</th:block>
</th:block>
</th:block>
</tbody>
</table>
</th:block>
</div>