templates/cat1/r5/_2.16.840.1.113883.10.20.24.3.38.cat1.erb in health-data-standards-4.1.0 vs templates/cat1/r5/_2.16.840.1.113883.10.20.24.3.38.cat1.erb in health-data-standards-4.2.0
- old
+ new
@@ -17,7 +17,21 @@
<%== render(:partial => 'results', :locals => {:entry => entry, :result_oids => result_oids, :value_set_oid => value_set_oid}) %>
<% end %>
<% if entry.components -%>
<%== render(:partial => 'components', :locals => {:entry => entry} ) %>
<% end %>
- </observation>
-</entry>
\ No newline at end of file
+ <% if entry.referenceRangeHigh || entry.referenceRangeLow %>
+ <referenceRange>
+ <observationRange>
+ <value xsi:type="IVL_PQ">
+ <% if entry.referenceRangeLow %>
+ <low value="<%= entry.referenceRangeLow['scalar'] %>" <% if entry.referenceRangeLow['units'] && (entry.referenceRangeLow['units'] != "") -%>unit="<%= entry.referenceRangeLow['units'] %>"<% else -%>unit="1"<% end -%>/>
+ <% end %>
+ <% if entry.referenceRangeHigh %>
+ <high value="<%= entry.referenceRangeHigh['scalar'] %>" <% if entry.referenceRangeHigh['units'] && (entry.referenceRangeHigh['units'] != "") -%>unit="<%= entry.referenceRangeHigh['units'] %>"<% else -%>unit="1"<% end -%>/>
+ <% end %>
+ </value>
+ </observationRange>
+ </referenceRange>
+ <% end %>
+ </observation>
+</entry>