lib/hqmf-generator/document.xml.erb in health-data-standards-3.4.6 vs lib/hqmf-generator/document.xml.erb in health-data-standards-3.5.0

- old
+ new

@@ -1,39 +1,55 @@ <?xml version="1.0" encoding="utf-8"?> <QualityMeasureDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <typeId root="2.16.840.1.113883.1.3" extension="POQM_MT000001UV03" /> + <templateId> + <item root="2.16.840.1.113883.10.20.28.1.1" /> + </templateId> <id root="2.16.840.1.113883.3.100.1" extension="<%= doc.hqmf_id %>" /> <code code="57024-2" codeSystem="2.16.840.1.113883.6.1"/> - <title value="<%= doc.title %>"/> - <text value="<%= doc.description %>"/> + <title value="<%=ERB::Util::h doc.title %>"/> + <text value="<%=ERB::Util::h doc.description %>"/> <statusCode code="completed" /> <setId root="2.16.840.1.113883.3.100.1" extension="<%= doc.hqmf_set_id %>" /> <versionNumber value="<%= doc.hqmf_version_number %>"/> - <author typeCode="AUT" contextControlCode="OP"> + <author typeCode="AUT"> <responsibleParty classCode="ASSIGNED" /> </author> <custodian typeCode="CST"> <responsibleParty classCode="ASSIGNED" /> </custodian> <controlVariable> <measurePeriod> <code code="MSRTP" codeSystem="2.16.840.1.113883.3.560"> <displayName value="Measurement period"/> </code> - <value> - <low value="<%= doc.measure_period.low.value %>" /> - <high value="<%= doc.measure_period.high.value %>" /> + <value xsi:type="PIVL_TS"> + <phase lowClosed="true" highClosed="true"> + <%- if doc.measure_period.low != nil -%> + <low value="<%= doc.measure_period.low.value %>" /> + <%- end -%> + <%- if doc.measure_period.high != nil -%> + <high value="<%= doc.measure_period.high.value %>" /> + <%- end -%> + <%- if doc.measure_period.width != nil -%> + <width xsi:type="PQ" value="<%= doc.measure_period.width.value %>" unit="a" /> + <%- end -%> + </phase> </value> </measurePeriod> </controlVariable> <%- doc.attributes.each do |attribute| -%> <%= xml_for_attribute(attribute) %> <%- end -%> <component> <dataCriteriaSection> + <templateId> + <item root="2.16.840.1.113883.10.20.28.2.2" /> + </templateId> <code code="57025-9" codeSystem="2.16.840.1.113883.6.1"/> <title value="Data Criteria Section"/> - <text>This section describes the data criteria.</text> + <text value="This section describes the data criteria."/> <%- doc.all_data_criteria.each do |data_criteria| -%> <%= xml_for_data_criteria(data_criteria, false) %> <%- end -%> <%- doc.source_data_criteria.each do |data_criteria| -%> <%= xml_for_data_criteria(data_criteria, true) %> @@ -45,19 +61,38 @@ <populationCriteriaSection> <%- if population['stratification'] -%> <templateId> <item root="<%= HQMF::Document::STRATIFIED_POPULATION_TEMPLATE_ID %>" identifierName="<%= HQMF::Document::STRATIFIED_POPULATION_TEMPLATE_TITLE %>" controlInformationRoot="<%= population['stratification'] %>"/> </templateId> + <%- else -%> + <templateId> + <item root="2.16.840.1.113883.10.20.28.2.1"/> + </templateId> <%- end -%> <id root="2.16.840.1.113883.3.100.1" extension="<%= population['id'] || "Population#{population_index}" %>"/> <code code="57026-7" codeSystem="2.16.840.1.113883.6.1"/> - <title value="<%= population['title'] %>"/> - <text>This section describes the Initial Patient Population, - Numerator, Denominator, Denominator Exceptions, and Measure - Populations</text> + <title value="<%=ERB::Util::h population['title'] %>"/> + <text value="This section describes the Initial Patient Population, Numerator, Denominator, Denominator Exceptions, and Measure Populations"/> <%- population.keys.each do |criteria_id| -%> <%= xml_for_population_criteria(population, criteria_id) %> <%- end -%> </populationCriteriaSection> </component> + <%- if doc.is_cv? -%> + + <component> + <measureObservationsSection> + <templateId> + <item root="2.16.840.1.113883.10.20.28.2.4" /> + </templateId> + <code code="57027-5" codeSystem="2.16.840.1.113883.6.1"> + <displayName value="Measure Observation" /> + </code> + <title value="Measure Observation Section" /> + <text></text> + <%= xml_for_measure_observation_definition(doc) %> + </measureObservationsSection> + </component> + + <%- end -%> <%- end -%> </QualityMeasureDocument>