templates/cat1/_2.16.840.1.113883.10.20.24.3.23.cat1.erb in health-data-standards-3.1.0 vs templates/cat1/_2.16.840.1.113883.10.20.24.3.23.cat1.erb in health-data-standards-3.1.1

- old
+ new

@@ -12,10 +12,15 @@ <!-- We try to look for the admit/discharge times on the encounter if they are there. If not, we fall back to the typical start/end date. --> <low <%= value_or_null_flavor(entry.admit_time || entry.start_time) %>/> <high <%= value_or_null_flavor(entry.discharge_time || entry.end_time) %>/> </effectiveTime> + <% if entry.discharge_disposition.present? -%> + <sdtc:dischargeDispositionCode code="<%= entry.discharge_disposition['code'] %>" + codeSystem="<%= HealthDataStandards::Util::CodeSystemHelper.oid_for_code_system(entry.discharge_disposition['codeSystem'] || entry.discharge_disposition['code_system']) %>"/> + <% end -%> + <% if entry.respond_to?(:facility) && entry.facility.present? -%> <participant typeCode="LOC"> <!-- Facility Location template --> <templateId root="2.16.840.1.113883.10.20.24.3.100"/> <time> @@ -45,13 +50,10 @@ <name><%= entry.facility.name %></name> </playingEntity> </participantRole> </participant> <% end -%> - <% if entry.discharge_disposition.present? -%> - <sdtc:dischargeDispositionCode code="<%= entry.discharge_disposition['code'] %>" - codeSystem="<%= HealthDataStandards::Util::CodeSystemHelper.oid_for_code_system(entry.discharge_disposition['codeSystem'] || entry.discharge_disposition['code_system']) %>"/> - <% end -%> + <% if entry.reason.present? -%> <entryRelationship typeCode="RSON"> <observation classCode="OBS" moodCode="EVN"> <templateId root="2.16.840.1.113883.10.20.24.3.88"/> <code code="410666004" \ No newline at end of file