templates/cat1/_2.16.840.1.113883.10.20.24.3.54.cat1.erb in health-data-standards-3.0.6 vs templates/cat1/_2.16.840.1.113883.10.20.24.3.54.cat1.erb in health-data-standards-3.1.0

- old
+ new

@@ -3,14 +3,29 @@ <observation classCode="OBS" moodCode="EVN"> <!-- Consolidation Deceased Observation templateId --> <templateId root="2.16.840.1.113883.10.20.22.4.79"/> <!-- Patient Characteristic Expired --> <templateId root="2.16.840.1.113883.10.20.24.3.54"/> - <id root="<%= UUID.generate %>"/> + <id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/> <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode"/> <statusCode code="completed"/> <effectiveTime> <low <%= value_or_null_flavor(entry.start_time) %>/> </effectiveTime> <value code="419099009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Dead" sdtc:valueSet="2.16.840.1.113883.3.666.5.539" xsi:type="CD"/> + <% if entry.respond_to? :code + # Currently, Record does not support coded cause of death, but this should allow it to work + # when Record supports it. + -%> + <entryRelationship typeCode="CAUS"> + <observation classCode="OBS" moodCode="EVN"> + <id root="<%= UUID.generate %>"/> + <code code="ASSERTION" + codeSystem="2.16.840.1.113883.5.4" + codeSystemName="HL7ActCode"/> + <statusCode code="completed"/> + <%== code_display(entry, 'tag_name' => 'value', 'preferred_code_sets' => ['SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM'], 'extra_content' => "xsi:type=\"CD\"") %> + </observation> + </entryRelationship> + <% end -%> </observation> </entry> \ No newline at end of file