templates/_results.c32.erb in health-data-standards-0.8.1 vs templates/_results.c32.erb in health-data-standards-1.0.0
- old
+ new
@@ -43,11 +43,17 @@
<text>
<reference value="#results-desc-<%= i %>"/>
</text>
<statusCode code="completed"/>
<effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
- <% if entry.value -%>
- <value xsi:type="PQ" value="<%= entry.value["scalar"] %>" <% if entry.value["units"]-%>unit="<%= entry.value["units"] %>"<% end -%>/>
+ <% if entry.value -%>
+ <% if is_num?(entry.value['scalar']) -%>
+ <value xsi:type="PQ" value="<%= entry.value["scalar"] %>" <% if entry.value["units"]-%>unit="<%= entry.value["units"] %>"<% end -%>/>
+ <% elsif is_bool?(entry.value['scalar'])%>
+ <value xsi:type="BL" value="<%= entry.value["scalar"] %>" />
+ <% else -%>
+ <value xsi:type="ST" ><%= entry.value["scalar"] %></value>
+ <% end -%>
<% else -%>
<value xsi:type="PQ" nullFlavor="UNK"/>
<% end -%>
</observation>
</component>
\ No newline at end of file