hqmf-parser 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hqmf-generator/attribute.xml.erb +11 -0
- data/lib/hqmf-generator/characteristic_criteria.xml.erb +21 -0
- data/lib/hqmf-generator/code.xml.erb +13 -0
- data/lib/hqmf-generator/condition_criteria.xml.erb +22 -0
- data/lib/hqmf-generator/derivation.xml.erb +6 -0
- data/lib/hqmf-generator/description.xml.erb +1 -0
- data/lib/hqmf-generator/document.xml.erb +63 -0
- data/lib/hqmf-generator/effective_time.xml.erb +4 -0
- data/lib/hqmf-generator/encounter_criteria.xml.erb +21 -0
- data/lib/hqmf-generator/field.xml.erb +28 -0
- data/lib/hqmf-generator/observation_criteria.xml.erb +25 -0
- data/lib/hqmf-generator/population_criteria.xml.erb +23 -0
- data/lib/hqmf-generator/precondition.xml.erb +14 -0
- data/lib/hqmf-generator/procedure_criteria.xml.erb +22 -0
- data/lib/hqmf-generator/reason.xml.erb +3 -0
- data/lib/hqmf-generator/reference.xml.erb +3 -0
- data/lib/hqmf-generator/source.xml.erb +6 -0
- data/lib/hqmf-generator/specific_occurrence.xml.erb +7 -0
- data/lib/hqmf-generator/subset.xml.erb +8 -0
- data/lib/hqmf-generator/substance_criteria.xml.erb +26 -0
- data/lib/hqmf-generator/supply_criteria.xml.erb +26 -0
- data/lib/hqmf-generator/template_id.xml.erb +5 -0
- data/lib/hqmf-generator/temporal_relationship.xml.erb +6 -0
- data/lib/hqmf-generator/value.xml.erb +24 -0
- data/lib/hqmf-generator/variable_criteria.xml.erb +12 -0
- metadata +26 -1
@@ -0,0 +1,11 @@
|
|
1
|
+
<subjectOf>
|
2
|
+
<measureAttribute>
|
3
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= attribute.id %>"/>
|
4
|
+
<code code="<%= attribute.code %>">
|
5
|
+
<displayName value="<%= attribute.name %>"/>
|
6
|
+
</code>
|
7
|
+
<%- if attribute.value -%>
|
8
|
+
<value xsi:type="ED" value="<%= attribute.value %>"/>
|
9
|
+
<%- end -%>
|
10
|
+
</measureAttribute>
|
11
|
+
</subjectOf>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<observationCriteria moodCode="EVN" classCode="OBS">
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_code(criteria) %>
|
8
|
+
<%= xml_for_description(criteria) %>
|
9
|
+
<%= xml_for_effective_time(criteria) %>
|
10
|
+
<%- if criteria.value -%>
|
11
|
+
<%= xml_for_value(criteria.value) %>
|
12
|
+
<%- end -%>
|
13
|
+
<definition>
|
14
|
+
<observationReference moodCode="EVN" classCode="OBS">
|
15
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
16
|
+
</observationReference>
|
17
|
+
</definition>
|
18
|
+
<%= xml_for_temporal_references(criteria) %>
|
19
|
+
<%= xml_for_fields(criteria) %>
|
20
|
+
</observationCriteria>
|
21
|
+
</entry>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%- if criteria.inline_code_list -%>
|
2
|
+
<%- code_system_name = criteria.inline_code_list.keys[0] -%>
|
3
|
+
<%- code = criteria.inline_code_list[code_system_name][0] -%>
|
4
|
+
<%- code_system_oid = oid_for_name(code_system_name) -%>
|
5
|
+
<<%= name %> codeSystemName="<%= code_system_name %>" codeSystem="<%= code_system_oid %>"
|
6
|
+
code="<%= code %>">
|
7
|
+
<displayName value="<%= criteria.title %>"/>
|
8
|
+
</<%= name %>>
|
9
|
+
<%- elsif criteria.code_list_id -%>
|
10
|
+
<<%= name %><%= " xsi:type=\"CD\"" if include_type %> valueSet="<%= criteria.code_list_id %>">
|
11
|
+
<displayName value="<%= criteria.title %>"/>
|
12
|
+
</<%= name %>>
|
13
|
+
<%- end -%>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<observationCriteria moodCode="EVN" classCode="OBS"<%= " actionNegationInd='true'" if criteria.negation %>>
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_description(criteria) %>
|
8
|
+
<%= "<statusCode code=\"#{criteria.status}\"/>" if criteria.status %>
|
9
|
+
<%= xml_for_effective_time(criteria) %>
|
10
|
+
<%= xml_for_reason(criteria) %>
|
11
|
+
<%= xml_for_code(criteria, 'value') %>
|
12
|
+
<definition>
|
13
|
+
<observationReference moodCode="EVN" classCode="OBS">
|
14
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
15
|
+
</observationReference>
|
16
|
+
</definition>
|
17
|
+
<%= xml_for_temporal_references(criteria) %>
|
18
|
+
<%= xml_for_fields(criteria) %>
|
19
|
+
<%= xml_for_derivation(criteria) %>
|
20
|
+
<%= xml_for_subsets(criteria) %>
|
21
|
+
</observationCriteria>
|
22
|
+
</entry>
|
@@ -0,0 +1 @@
|
|
1
|
+
<text value="<%= text %>"/>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<QualityMeasureDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
3
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= doc.hqmf_id %>" />
|
4
|
+
<code code="57024-2" codeSystem="2.16.840.1.113883.6.1"/>
|
5
|
+
<title value="<%= doc.title %>"/>
|
6
|
+
<text value="<%= doc.description %>"/>
|
7
|
+
<statusCode code="completed" />
|
8
|
+
<setId root="2.16.840.1.113883.3.100.1" extension="<%= doc.hqmf_set_id %>" />
|
9
|
+
<versionNumber value="<%= doc.hqmf_version_number %>"/>
|
10
|
+
<author typeCode="AUT" contextControlCode="OP">
|
11
|
+
<responsibleParty classCode="ASSIGNED" />
|
12
|
+
</author>
|
13
|
+
<custodian typeCode="CST">
|
14
|
+
<responsibleParty classCode="ASSIGNED" />
|
15
|
+
</custodian>
|
16
|
+
<controlVariable>
|
17
|
+
<measurePeriod>
|
18
|
+
<code code="MSRTP" codeSystem="2.16.840.1.113883.3.560">
|
19
|
+
<displayName value="Measurement period"/>
|
20
|
+
</code>
|
21
|
+
<value>
|
22
|
+
<low value="<%= doc.measure_period.low.value %>" />
|
23
|
+
<high value="<%= doc.measure_period.high.value %>" />
|
24
|
+
</value>
|
25
|
+
</measurePeriod>
|
26
|
+
</controlVariable>
|
27
|
+
<%- doc.attributes.each do |attribute| -%>
|
28
|
+
<%= xml_for_attribute(attribute) %>
|
29
|
+
<%- end -%>
|
30
|
+
<component>
|
31
|
+
<dataCriteriaSection>
|
32
|
+
<code code="57025-9" codeSystem="2.16.840.1.113883.6.1"/>
|
33
|
+
<title value="Data Criteria Section"/>
|
34
|
+
<text>This section describes the data criteria.</text>
|
35
|
+
<%- doc.all_data_criteria.each do |data_criteria| -%>
|
36
|
+
<%= xml_for_data_criteria(data_criteria, false) %>
|
37
|
+
<%- end -%>
|
38
|
+
<%- doc.source_data_criteria.each do |data_criteria| -%>
|
39
|
+
<%= xml_for_data_criteria(data_criteria, true) %>
|
40
|
+
<%- end -%>
|
41
|
+
</dataCriteriaSection>
|
42
|
+
</component>
|
43
|
+
<%- doc.populations.each_with_index do |population, population_index| -%>
|
44
|
+
<component>
|
45
|
+
<populationCriteriaSection>
|
46
|
+
<%- if population['stratification'] -%>
|
47
|
+
<templateId>
|
48
|
+
<item root="<%= HQMF::Document::STRATIFIED_POPULATION_TEMPLATE_ID %>" identifierName="<%= HQMF::Document::STRATIFIED_POPULATION_TEMPLATE_TITLE %>" controlInformationRoot="<%= population['stratification'] %>"/>
|
49
|
+
</templateId>
|
50
|
+
<%- end -%>
|
51
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= population['id'] || "Population#{population_index}" %>"/>
|
52
|
+
<code code="57026-7" codeSystem="2.16.840.1.113883.6.1"/>
|
53
|
+
<title value="<%= population['title'] %>"/>
|
54
|
+
<text>This section describes the Initial Patient Population,
|
55
|
+
Numerator, Denominator, Denominator Exceptions, and Measure
|
56
|
+
Populations</text>
|
57
|
+
<%- population.keys.each do |criteria_id| -%>
|
58
|
+
<%= xml_for_population_criteria(population, criteria_id) %>
|
59
|
+
<%- end -%>
|
60
|
+
</populationCriteriaSection>
|
61
|
+
</component>
|
62
|
+
<%- end -%>
|
63
|
+
</QualityMeasureDocument>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<encounterCriteria moodCode="EVN" classCode="ENC"<%= " actionNegationInd='true'" if criteria.negation %>>
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_code(criteria) %>
|
8
|
+
<%= xml_for_description(criteria) %>
|
9
|
+
<%= xml_for_effective_time(criteria) %>
|
10
|
+
<%= xml_for_reason(criteria) %>
|
11
|
+
<definition>
|
12
|
+
<encounterReference moodCode="EVN" classCode="ENC">
|
13
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
14
|
+
</encounterReference>
|
15
|
+
</definition>
|
16
|
+
<%= xml_for_temporal_references(criteria) %>
|
17
|
+
<%= xml_for_fields(criteria) %>
|
18
|
+
<%= xml_for_derivation(criteria) %>
|
19
|
+
<%= xml_for_subsets(criteria) %>
|
20
|
+
</encounterCriteria>
|
21
|
+
</entry>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<outboundRelationship typeCode="SUBJ">
|
2
|
+
<%- if details[:code] == 'SDLOC' -%>
|
3
|
+
<encounterCriteria classCode="ENC" moodCode="EVN">
|
4
|
+
<%- if details[:templateId] -%>
|
5
|
+
<templateId>
|
6
|
+
<item root="<%= details[:template_id] %>"/>
|
7
|
+
</templateId>
|
8
|
+
<%- end -%>
|
9
|
+
<participation typeCode="LOC">
|
10
|
+
<role classCode="SDLOC">
|
11
|
+
<%= xml_for_value(value, 'code') %>
|
12
|
+
</role>
|
13
|
+
</participation>
|
14
|
+
</encounterCriteria>
|
15
|
+
<%- else -%>
|
16
|
+
<observationCriteria classCode="OBS" moodCode="EVN">
|
17
|
+
<%- if details[:templateId] -%>
|
18
|
+
<templateId>
|
19
|
+
<item root="<%= details[:template_id] %>"/>
|
20
|
+
</templateId>
|
21
|
+
<%- end -%>
|
22
|
+
<code code="<%= details[:code] %>" codeSystem="<%= details[:code_system] %>" codeSystemName="<%= details[:code_system_name] %>">
|
23
|
+
<displayName value="<%= details[:title] %>"/>
|
24
|
+
</code>
|
25
|
+
<%= xml_for_value(value) %>
|
26
|
+
</observationCriteria>
|
27
|
+
<%- end -%>
|
28
|
+
</outboundRelationship>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<observationCriteria moodCode="EVN" classCode="OBS"<%= " actionNegationInd='true'" if criteria.negation %>>
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_code(criteria) %>
|
8
|
+
<%= xml_for_description(criteria) %>
|
9
|
+
<%= "<statusCode code=\"#{criteria.status}\"/>" if criteria.status %>
|
10
|
+
<%= xml_for_effective_time(criteria) %>
|
11
|
+
<%= xml_for_reason(criteria) %>
|
12
|
+
<%- if criteria.value -%>
|
13
|
+
<%= xml_for_value(criteria.value) %>
|
14
|
+
<%- end -%>
|
15
|
+
<definition>
|
16
|
+
<observationReference moodCode="EVN" classCode="OBS">
|
17
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
18
|
+
</observationReference>
|
19
|
+
</definition>
|
20
|
+
<%= xml_for_temporal_references(criteria) %>
|
21
|
+
<%= xml_for_fields(criteria) %>
|
22
|
+
<%= xml_for_derivation(criteria) %>
|
23
|
+
<%= xml_for_subsets(criteria) %>
|
24
|
+
</observationCriteria>
|
25
|
+
</entry>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<component typeCode="COMP">
|
2
|
+
<<%= population_element_prefix(criteria_id) %>Criteria classCode="OBS" moodCode="EVN">
|
3
|
+
<id root="c75181d0-73eb-11de-8a39-0800200c9a66"
|
4
|
+
extension="<%= population_criteria.hqmf_id %>"/>
|
5
|
+
<code codeSystem="2.16.840.1.113883.5.1063"
|
6
|
+
codeSystemName="HL7 Observation Value"
|
7
|
+
code="<%= population_criteria.type %>">
|
8
|
+
<displayName value="<%= population_criteria.title %>"/>
|
9
|
+
</code>
|
10
|
+
<isCriterionInd value="true"/>
|
11
|
+
<%- if population_criteria.preconditions.present? && population_criteria.preconditions.length > 0 -%>
|
12
|
+
<%- population_criteria.preconditions.each do |precondition| -%>
|
13
|
+
<%= xml_for_precondition(precondition) %>
|
14
|
+
<%- end -%>
|
15
|
+
<%- else -%>
|
16
|
+
<precondition typeCode="PRCN" nullFlavor="NA">
|
17
|
+
<allTrue>
|
18
|
+
<id/>
|
19
|
+
</allTrue>
|
20
|
+
</precondition>
|
21
|
+
<%- end -%>
|
22
|
+
</<%= population_element_prefix(criteria_id) %>Criteria>
|
23
|
+
</component>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<precondition typeCode="PRCN">
|
2
|
+
<%- if precondition.conjunction? -%>
|
3
|
+
<<%= precondition.conjunction_code_with_negation %>>
|
4
|
+
<id/>
|
5
|
+
<%- precondition.preconditions.each do |child| -%>
|
6
|
+
<%= xml_for_precondition(child) %>
|
7
|
+
<%- end -%>
|
8
|
+
</<%= precondition.conjunction_code_with_negation %>>
|
9
|
+
<%- else -%>
|
10
|
+
<<%= reference_element_name(precondition.reference.id) %>Reference moodCode="EVN" classCode="<%= reference_type_name(precondition.reference.id) %>">
|
11
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= precondition.reference.id %>"/>
|
12
|
+
</<%= reference_element_name(precondition.reference.id) %>Reference>
|
13
|
+
<%- end -%>
|
14
|
+
</precondition>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<procedureCriteria moodCode="EVN" classCode="PROC"<%= " actionNegationInd='true'" if criteria.negation %>>
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_code(criteria) %>
|
8
|
+
<%= xml_for_description(criteria) %>
|
9
|
+
<%= "<statusCode code=\"#{criteria.status}\"/>" if criteria.status %>
|
10
|
+
<%= xml_for_effective_time(criteria) %>
|
11
|
+
<%= xml_for_reason(criteria) %>
|
12
|
+
<definition>
|
13
|
+
<procedureReference moodCode="EVN" classCode="PROC">
|
14
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
15
|
+
</procedureReference>
|
16
|
+
</definition>
|
17
|
+
<%= xml_for_temporal_references(criteria) %>
|
18
|
+
<%= xml_for_fields(criteria) %>
|
19
|
+
<%= xml_for_derivation(criteria) %>
|
20
|
+
<%= xml_for_subsets(criteria) %>
|
21
|
+
</procedureCriteria>
|
22
|
+
</entry>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<outboundRelationship typeCode="SUBJ">
|
2
|
+
<localVariableName controlInformationRoot="<%= type %>" controlInformationExtension="<%= id %>"/>
|
3
|
+
<subsetCode code="SPECIFIC"/>
|
4
|
+
<observationReference classCode="OBS" moodCode="EVN">
|
5
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= source_criteria_id %>"/>
|
6
|
+
</observationReference>
|
7
|
+
</outboundRelationship>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<excerpt typeCode="XCRPT">
|
2
|
+
<subsetCode code="<%= subset.type %>"/>
|
3
|
+
<<%= element_name_prefix(criteria) %>Criteria moodCode="EVN" classCode="<%= reference_type_name(criteria.id) %>">
|
4
|
+
<%- if subset.value -%>
|
5
|
+
<%= xml_for_value(subset.value, 'repeatNumber') %>
|
6
|
+
<%- end -%>
|
7
|
+
</<%= element_name_prefix(criteria) %>Criteria>
|
8
|
+
</excerpt>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<substanceAdministrationCriteria moodCode="EVN" classCode="SBADM"<%= " actionNegationInd='true'" if criteria.negation %>>
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_description(criteria) %>
|
8
|
+
<%= "<statusCode code=\"#{criteria.status}\"/>" if criteria.status %>
|
9
|
+
<%= xml_for_effective_time(criteria) %>
|
10
|
+
<%= xml_for_reason(criteria) %>
|
11
|
+
<participation typeCode="CSM">
|
12
|
+
<role classCode="THER">
|
13
|
+
<%= xml_for_code(criteria, 'code', false) %>
|
14
|
+
</role>
|
15
|
+
</participation>
|
16
|
+
<definition>
|
17
|
+
<substanceAdministrationReference moodCode="EVN" classCode="SBADM">
|
18
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
19
|
+
</substanceAdministrationReference>
|
20
|
+
</definition>
|
21
|
+
<%= xml_for_temporal_references(criteria) %>
|
22
|
+
<%= xml_for_fields(criteria) %>
|
23
|
+
<%= xml_for_derivation(criteria) %>
|
24
|
+
<%= xml_for_subsets(criteria) %>
|
25
|
+
</substanceAdministrationCriteria>
|
26
|
+
</entry>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<supplyCriteria moodCode="EVN" classCode="SPLY"<%= " actionNegationInd='true'" if criteria.negation %>>
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_description(criteria) %>
|
8
|
+
<%= "<statusCode code=\"#{criteria.status}\"/>" if criteria.status %>
|
9
|
+
<%= xml_for_effective_time(criteria) %>
|
10
|
+
<%= xml_for_reason(criteria) %>
|
11
|
+
<participation typeCode="PRD">
|
12
|
+
<role classCode="THER">
|
13
|
+
<%= xml_for_code(criteria, 'code', false) %>
|
14
|
+
</role>
|
15
|
+
</participation>
|
16
|
+
<definition>
|
17
|
+
<supplyReference moodCode="EVN" classCode="SPLY">
|
18
|
+
<id root="2.16.840.1.113883.3.100.1" extension="<%= section_name(criteria) %>"/>
|
19
|
+
</supplyReference>
|
20
|
+
</definition>
|
21
|
+
<%= xml_for_temporal_references(criteria) %>
|
22
|
+
<%= xml_for_fields(criteria) %>
|
23
|
+
<%= xml_for_derivation(criteria) %>
|
24
|
+
<%= xml_for_subsets(criteria) %>
|
25
|
+
</supplyCriteria>
|
26
|
+
</entry>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%- if value.class==HQMF::Range -%>
|
2
|
+
<<%= name %> xsi:type="<%= value.type %>">
|
3
|
+
<%= xml_for_value(value.low, 'low', false) if value.low -%>
|
4
|
+
<%= xml_for_value(value.high, 'high', false) if value.high -%>
|
5
|
+
</<%= name %>>
|
6
|
+
<%- elsif value.class==HQMF::Coded -%>
|
7
|
+
<%- if value.code_list_id -%>
|
8
|
+
<<%= name %> xsi:type="<%= value.type %>" valueSet="<%= value.code_list_id %>">
|
9
|
+
<%- else -%>
|
10
|
+
<<%= name %> xsi:type="<%= value.type %>" codeSystem="<%= value.system %>" code="<%= value.code %>">
|
11
|
+
<%- end -%>
|
12
|
+
<displayName value="<%= value.title %>"/>
|
13
|
+
</<%= name %>>
|
14
|
+
<%- elsif value.class==HQMF::Value -%>
|
15
|
+
<%- if value.derived? -%>
|
16
|
+
<<%= name %> nullFlavor="DER">
|
17
|
+
<expression value="<%= value.expression %>"/>
|
18
|
+
</<%= name %>>
|
19
|
+
<%- else -%>
|
20
|
+
<<%= name %> <%= "xsi:type=\"#{value.type}\"" if include_type %> value="<%= value.value %>"<%= " unit=\"#{value.unit}\"" if value.unit %>/>
|
21
|
+
<%- end -%>
|
22
|
+
<%- elsif value.class==HQMF::AnyValue -%>
|
23
|
+
<<%= name %> xsi:type="ANY" nullFlavor="NI"/>
|
24
|
+
<%- end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<observationCriteria moodCode="EVN" classCode="OBS">
|
3
|
+
<%= xml_for_template(criteria, is_source_data_criteria) %>
|
4
|
+
<id>
|
5
|
+
<item root="2.16.840.1.113883.3.100.1" extension="<%= criteria.id %>"/>
|
6
|
+
</id>
|
7
|
+
<%= xml_for_description(criteria) %>
|
8
|
+
<%= xml_for_code(criteria) %>
|
9
|
+
<%= xml_for_effective_time(criteria) %>
|
10
|
+
<%= xml_for_value(criteria.value) %>
|
11
|
+
</observationCriteria>
|
12
|
+
</entry>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hqmf-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -129,6 +129,31 @@ files:
|
|
129
129
|
- lib/tasks/value_sets.rake
|
130
130
|
- lib/hqmf-model/data_criteria.json
|
131
131
|
- lib/hqmf-parser/1.0/data_criteria_oid_xpath.json
|
132
|
+
- lib/hqmf-generator/attribute.xml.erb
|
133
|
+
- lib/hqmf-generator/characteristic_criteria.xml.erb
|
134
|
+
- lib/hqmf-generator/code.xml.erb
|
135
|
+
- lib/hqmf-generator/condition_criteria.xml.erb
|
136
|
+
- lib/hqmf-generator/derivation.xml.erb
|
137
|
+
- lib/hqmf-generator/description.xml.erb
|
138
|
+
- lib/hqmf-generator/document.xml.erb
|
139
|
+
- lib/hqmf-generator/effective_time.xml.erb
|
140
|
+
- lib/hqmf-generator/encounter_criteria.xml.erb
|
141
|
+
- lib/hqmf-generator/field.xml.erb
|
142
|
+
- lib/hqmf-generator/observation_criteria.xml.erb
|
143
|
+
- lib/hqmf-generator/population_criteria.xml.erb
|
144
|
+
- lib/hqmf-generator/precondition.xml.erb
|
145
|
+
- lib/hqmf-generator/procedure_criteria.xml.erb
|
146
|
+
- lib/hqmf-generator/reason.xml.erb
|
147
|
+
- lib/hqmf-generator/reference.xml.erb
|
148
|
+
- lib/hqmf-generator/source.xml.erb
|
149
|
+
- lib/hqmf-generator/specific_occurrence.xml.erb
|
150
|
+
- lib/hqmf-generator/subset.xml.erb
|
151
|
+
- lib/hqmf-generator/substance_criteria.xml.erb
|
152
|
+
- lib/hqmf-generator/supply_criteria.xml.erb
|
153
|
+
- lib/hqmf-generator/template_id.xml.erb
|
154
|
+
- lib/hqmf-generator/temporal_relationship.xml.erb
|
155
|
+
- lib/hqmf-generator/value.xml.erb
|
156
|
+
- lib/hqmf-generator/variable_criteria.xml.erb
|
132
157
|
- Gemfile
|
133
158
|
- README.md
|
134
159
|
- Rakefile
|