cqm-reports 3.1.10 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/cqm-reports.rb +1 -2
- data/lib/html-export/qdm-patient/data_element/_data_element_other_fields.mustache +10 -0
- data/lib/html-export/qdm-patient/qdm_patient.rb +7 -7
- data/lib/qrda-export/catI-r5/_header.mustache +2 -1
- data/lib/qrda-export/catI-r5/qrda1_r5.mustache +2 -5
- data/lib/qrda-export/catI-r5/qrda_templates/adverse_event.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/allergy_intolerance.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/assessment_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/assessment_performed.mustache +7 -3
- data/lib/qrda-export/catI-r5/qrda_templates/assessment_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/communication_performed.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/device_order.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/device_recommended.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/diagnosis.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_performed.mustache +9 -1
- data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/encounter_order.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/encounter_performed.mustache +11 -7
- data/lib/qrda-export/catI-r5/qrda_templates/encounter_recommended.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/family_history.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/immunization_administered.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/immunization_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/intervention_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/intervention_performed.mustache +5 -1
- data/lib/qrda-export/catI-r5/qrda_templates/intervention_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_performed.mustache +3 -3
- data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/medication_active.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/medication_administered.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/medication_discharge.mustache +2 -4
- data/lib/qrda-export/catI-r5/qrda_templates/medication_dispensed.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/medication_order.mustache +5 -1
- data/lib/qrda-export/catI-r5/qrda_templates/patient_care_experience.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_performed.mustache +3 -3
- data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/procedure_order.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/procedure_performed.mustache +5 -1
- data/lib/qrda-export/catI-r5/qrda_templates/procedure_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/program_participation.mustache +1 -7
- data/lib/qrda-export/catI-r5/qrda_templates/provider_care_experience.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/substance_recommended.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/symptom.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_class.mustache +6 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_diagnosis_qdm.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity.mustache +3 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_location.mustache +11 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_organization.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_interpretation.mustache +1 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_continuous_variable_value.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_header.mustache +1 -5
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_measure_data.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_measure_section.mustache +3 -3
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_reporting_period.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_stratification.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/_supplemental_data.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1/qrda3_r21.mustache → catIII/qrda3.mustache} +0 -0
- data/lib/qrda-export/{catIII-r2-1/qrda3_r21.rb → catIII/qrda3.rb} +1 -1
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_author.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_custodian.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_documentation_of_service_event.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_information_recipient.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_legal_authenticator.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_participant_ehr.mustache +0 -0
- data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_participant_location.mustache +0 -0
- data/lib/qrda-import/base-importers/section_importer.rb +53 -35
- data/lib/qrda-import/data-element-importers/adverse_event_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/allergy_intolerance_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/assessment_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/assessment_performed_importer.rb +6 -1
- data/lib/qrda-import/data-element-importers/assessment_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/communication_performed_importer.rb +4 -2
- data/lib/qrda-import/data-element-importers/device_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/device_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/diagnosis_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/diagnostic_study_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/diagnostic_study_performed_importer.rb +6 -1
- data/lib/qrda-import/data-element-importers/diagnostic_study_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/encounter_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/encounter_performed_importer.rb +6 -1
- data/lib/qrda-import/data-element-importers/encounter_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/family_history_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/immunization_administered_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/immunization_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/intervention_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/intervention_performed_importer.rb +4 -1
- data/lib/qrda-import/data-element-importers/intervention_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/laboratory_test_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/laboratory_test_performed_importer.rb +4 -1
- data/lib/qrda-import/data-element-importers/laboratory_test_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/medication_active_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/medication_administered_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/medication_discharge_importer.rb +5 -3
- data/lib/qrda-import/data-element-importers/medication_dispensed_importer.rb +4 -2
- data/lib/qrda-import/data-element-importers/medication_order_importer.rb +4 -1
- data/lib/qrda-import/data-element-importers/patient_care_experience_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/physical_exam_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/physical_exam_performed_importer.rb +4 -1
- data/lib/qrda-import/data-element-importers/physical_exam_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/procedure_order_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/procedure_performed_importer.rb +4 -1
- data/lib/qrda-import/data-element-importers/procedure_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/program_participation_importer.rb +0 -1
- data/lib/qrda-import/data-element-importers/provider_care_experience_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/substance_administered_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/substance_recommended_importer.rb +2 -1
- data/lib/qrda-import/data-element-importers/symptom_importer.rb +2 -1
- data/lib/qrda-import/patient_importer.rb +0 -1
- data/lib/util/entity_helper.rb +4 -0
- metadata +28 -27
- data/lib/qrda-export/catI-r5/qrda_templates/device_applied.mustache +0 -44
- data/lib/qrda-import/data-element-importers/device_applied_importer.rb +0 -26
@@ -1,7 +1,7 @@
|
|
1
1
|
<entry>
|
2
2
|
<observation classCode="OBS" moodCode="EVN">
|
3
3
|
<!-- Patient Care Experience (V4) -->
|
4
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.48" extension="
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.48" extension="2021-08-01"/>
|
5
5
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
6
6
|
<code code="77218-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Patient satisfaction with healthcare delivery"/>
|
7
7
|
<statusCode code="completed"/>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Conforms to C-CDA R2.1 Planned Observation (V2) -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.44" extension="2014-06-09"/>
|
5
5
|
<!-- Physical Exam Order (V4) -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.58" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.58" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
<code code="29545-1" codeSystem="2.16.840.1.113883.6.1" displayName="physical examination" codeSystemName="LOINC"/>
|
9
9
|
<text>{{description}}</text>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Procedure Activity Procedure (Consolidation) template -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.13" extension="2014-06-09"/>
|
5
5
|
<!-- Physical Exam, Performed template -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.59" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.59" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
<!-- QDM Attribute: Code -->
|
9
9
|
{{> _codes}}
|
@@ -48,9 +48,9 @@
|
|
48
48
|
<!-- QDM Attribute: Components -->
|
49
49
|
{{> qrda_templates/template_partials/_component}}
|
50
50
|
{{/components}}
|
51
|
-
{{#
|
51
|
+
{{#relatedTo}}
|
52
52
|
<!-- QDM Attribute: relatedTo -->
|
53
53
|
{{> qrda_templates/template_partials/_related_to}}
|
54
|
-
{{/
|
54
|
+
{{/relatedTo}}
|
55
55
|
</observation>
|
56
56
|
</entry>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Conforms to C-CDA R2.1 Planned Observation (V2) -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.44" extension="2014-06-09"/>
|
5
5
|
<!-- Physical Exam Recommeded (V4) -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.60" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.60" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
<code code="29545-1" codeSystem="2.16.840.1.113883.6.1" displayName="physical examination" codeSystemName="LOINC"/>
|
9
9
|
<text>{{description}}</text>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Consolidated Plan of Care Activity Procedure TemplateId (Implied Template) -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.41" extension="2014-06-09"/>
|
5
5
|
<!-- QRDA Procedure, Order TemplateId -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.63" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.63" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
{{> _codes}}
|
9
9
|
<text>{{description}}</text>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<entry>
|
2
2
|
<procedure classCode="PROC" moodCode="EVN" {{{negation_ind}}}>
|
3
3
|
<!-- Procedure performed template -->
|
4
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.64" extension="
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.64" extension="2021-08-01"/>
|
5
5
|
<!-- Procedure Activity Procedure-->
|
6
6
|
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
@@ -62,6 +62,10 @@
|
|
62
62
|
<!-- QDM Attribute: Components -->
|
63
63
|
{{> qrda_templates/template_partials/_component}}
|
64
64
|
{{/components}}
|
65
|
+
{{#relatedTo}}
|
66
|
+
<!-- QDM Attribute: relatedTo -->
|
67
|
+
{{> qrda_templates/template_partials/_related_to}}
|
68
|
+
{{/relatedTo}}
|
65
69
|
</procedure>
|
66
70
|
</entry>
|
67
71
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Conforms to C-CDA R2.1 Planned Procedure (V2) -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.41" extension="2014-06-09"/>
|
5
5
|
<!-- Procedure Recommended (V5) -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.65" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.65" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
<!-- QDM Attribute: Code -->
|
9
9
|
{{> _codes}}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<entry>
|
2
2
|
<observation classCode="OBS" moodCode="EVN">
|
3
3
|
<!-- Program Participation (V2) -->
|
4
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.154" extension="
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.154" extension="2021-08-01"/>
|
5
5
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
6
6
|
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
|
7
7
|
<statusCode code="completed" />
|
@@ -11,11 +11,5 @@
|
|
11
11
|
{{/participationPeriod}}
|
12
12
|
<!-- QDM Attribute: Code -->
|
13
13
|
{{> qrda_templates/template_partials/_data_element_codes_as_values}}
|
14
|
-
{{#recorder}}
|
15
|
-
<!-- QDM Attribute: Recorder -->
|
16
|
-
<participant typeCode="PRF">
|
17
|
-
{{> qrda_templates/template_partials/_entity}}
|
18
|
-
</participant>
|
19
|
-
{{/recorder}}
|
20
14
|
</observation>
|
21
15
|
</entry>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<entry>
|
2
2
|
<observation classCode="OBS" moodCode="EVN">
|
3
3
|
<!-- Provider Care Experience (V4) -->
|
4
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.67" extension="
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.67" extension="2021-08-01"/>
|
5
5
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
6
6
|
<code code="77219-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Provider satisfaction with healthcare delivery"/>
|
7
7
|
<statusCode code="completed" />
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Conforms to C-CDA R2.1 Planned Medication Activity (V2) -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.42" extension="2014-06-09"/>
|
5
5
|
<!-- Substance Recommended (V4) -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.75" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.75" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
<statusCode code="active"/>
|
9
9
|
<effectiveTime xsi:type="IVL_TS">
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<!-- Conforms to C-CDA 2.1 Problem Concern Act (V3) -->
|
4
4
|
<templateId root="2.16.840.1.113883.10.20.22.4.3" extension="2015-08-01"/>
|
5
5
|
<!-- Symptom Concern Act (V3) -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.138" extension="
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.138" extension="2021-08-01"/>
|
7
7
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
8
|
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" displayName="Concern"/>
|
9
9
|
{{#prevalencePeriod}}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<!-- Conforms to C-CDA R2.1 Problem Observation (V3) -->
|
22
22
|
<templateId root="2.16.840.1.113883.10.20.22.4.4" extension="2015-08-01"/>
|
23
23
|
<!-- Symptom (V2) -->
|
24
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.136" extension="
|
24
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.136" extension="2021-08-01"/>
|
25
25
|
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
26
26
|
<code code="75325-1" codeSystem="2.16.840.1.113883.6.1">
|
27
27
|
<translation code="418799008" displayName="Symptom" codeSystem="2.16.840.1.113883.6.96"/>
|
data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_diagnosis_qdm.mustache
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<entryRelationship typeCode="REFR">
|
2
2
|
<observation classCode="OBS" moodCode="EVN">
|
3
3
|
<!-- Encounter Diagnosis QDM -->
|
4
|
-
<templateId extension="
|
4
|
+
<templateId extension="2021-08-01" root="2.16.840.1.113883.10.20.24.3.168"/>
|
5
5
|
<code code="29308-4" codeSystem="2.16.840.1.113883.6.1"/>
|
6
6
|
<statusCode code="completed"/>
|
7
7
|
{{#code}}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
{{#presentOnAdmissionIndicator}}
|
15
15
|
<entryRelationship typeCode="REFR">
|
16
16
|
<observation classCode="OBS" moodCode="EVN">
|
17
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.169" extension="
|
17
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.169" extension="2021-08-01"/>
|
18
18
|
<code code="78026-2" displayName="Present on admission" codeSystem="2.16.840.1.113883.6.1"/>
|
19
19
|
<value {{> _code}} xsi:type="CD"/>
|
20
20
|
</observation>
|
@@ -1,6 +1,9 @@
|
|
1
1
|
{{#care_partner_entity?}}
|
2
2
|
{{> qrda_templates/template_partials/_entity_care_partner}}
|
3
3
|
{{/care_partner_entity?}}
|
4
|
+
{{#location_entity?}}
|
5
|
+
{{> qrda_templates/template_partials/_entity_location}}
|
6
|
+
{{/location_entity?}}
|
4
7
|
{{#patient_entity?}}
|
5
8
|
{{> qrda_templates/template_partials/_entity_patient}}
|
6
9
|
{{/patient_entity?}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<participantRole>
|
2
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.172" extension="2021-08-01" />
|
3
|
+
{{#identifier}}
|
4
|
+
<id root="{{{namingSystem}}}" extension="{{{value}}}"/>
|
5
|
+
{{/identifier}}
|
6
|
+
{{#locationType}}
|
7
|
+
<playingEntity>
|
8
|
+
<code {{> _code}}/>
|
9
|
+
</playingEntity>
|
10
|
+
{{/locationType}}
|
11
|
+
</participantRole>
|
@@ -0,0 +1 @@
|
|
1
|
+
<interpretationCode {{> _code}}/>
|
File without changes
|
@@ -2,15 +2,11 @@
|
|
2
2
|
<realmCode code="US"/>
|
3
3
|
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
|
4
4
|
<!-- US Realm Header Template Id -->
|
5
|
-
<templateId root="2.16.840.1.113883.10.20.27.1.1" extension="
|
5
|
+
<templateId root="2.16.840.1.113883.10.20.27.1.1" extension="2020-12-01"/>
|
6
6
|
{{#ry2022_submission?}}
|
7
7
|
<!-- QRDA Category III Report - CMS (V6) -->
|
8
8
|
<templateId root="2.16.840.1.113883.10.20.27.1.2" extension="2021-07-01"/>
|
9
9
|
{{/ry2022_submission?}}
|
10
|
-
{{^ry2022_submission?}}
|
11
|
-
<!-- QRDA Category III Report - CMS (V5) -->
|
12
|
-
<templateId root="2.16.840.1.113883.10.20.27.1.2" extension="2020-05-01"/>
|
13
|
-
{{/ry2022_submission?}}
|
14
10
|
<!-- This is the globally unique identifier for this QRDA document -->
|
15
11
|
<id root="{{random_id}}"/>
|
16
12
|
<!-- QRDA III document type code -->
|
File without changes
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<templateId root="2.16.840.1.113883.10.20.24.2.2"/>
|
10
10
|
<!-- In this case the query is using an eMeasure -->
|
11
11
|
<!-- QRDA Category III Measure Section template -->
|
12
|
-
<templateId extension="
|
12
|
+
<templateId extension="2020-12-01" root="2.16.840.1.113883.10.20.27.2.1"/>
|
13
13
|
<!-- QRDA Category III Measure Section - CMS (V4) -->
|
14
14
|
<templateId extension="2019-05-01" root="2.16.840.1.113883.10.20.27.2.3"/>
|
15
15
|
<code code="55186-1" codeSystem="2.16.840.1.113883.6.1"/>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<!-- Implied template Measure Reference templateId -->
|
41
41
|
<templateId root="2.16.840.1.113883.10.20.24.3.98"/>
|
42
42
|
<!-- SHALL 1..* (one for each referenced measure) Measure Reference and Results template -->
|
43
|
-
<templateId extension="
|
43
|
+
<templateId extension="2020-12-01" root="2.16.840.1.113883.10.20.27.3.1"/>
|
44
44
|
<templateId extension="2019-05-01" root="2.16.840.1.113883.10.20.27.3.17"/>
|
45
45
|
<id extension="{{random_id}}" root="1.3.6.1.4.1.115"/>
|
46
46
|
<statusCode code="completed"/>
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<entry>
|
65
65
|
<act classCode="ACT" moodCode="EVN">
|
66
66
|
<!-- This is the templateId for Reporting Parameteres Act -->
|
67
|
-
<templateId root="2.16.840.1.113883.10.20.17.3.8"/>
|
67
|
+
<templateId root="2.16.840.1.113883.10.20.17.3.8" extension="2020-12-01"/>
|
68
68
|
<id extension="{{random_id}}" root="1.3.6.1.4.1.115"/>
|
69
69
|
<code code="252116004" codeSystem="2.16.840.1.113883.6.96" displayName="Observation Parameters"/>
|
70
70
|
<effectiveTime>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/qrda-export/{catIII-r2-1 → catIII}/qrda_header/_documentation_of_service_event.mustache
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module QRDA
|
2
2
|
module Cat1
|
3
3
|
class SectionImporter
|
4
|
+
require 'validation_error'
|
5
|
+
|
4
6
|
attr_accessor :check_for_usable, :status_xpath, :code_xpath, :warnings, :codes, :codes_modifiers
|
5
7
|
|
6
8
|
def initialize(entry_finder)
|
@@ -75,12 +77,7 @@ module QRDA
|
|
75
77
|
code_list << code_if_present(code_element)
|
76
78
|
translations = code_element.xpath('cda:translation')
|
77
79
|
translations.each do |translation|
|
78
|
-
|
79
|
-
next unless translation_code
|
80
|
-
|
81
|
-
code_list << translation_code
|
82
|
-
@warnings << ValidationError.new(message: "Translation code #{translation_code.system}:#{translation_code.code} may not be used for eCQM calculation by a receiving system. Ensure that the root code includes a code from the eCQM valueset.",
|
83
|
-
location: coded_element.path)
|
80
|
+
code_list << code_if_present(translation)
|
84
81
|
end
|
85
82
|
end
|
86
83
|
code_list.compact
|
@@ -292,43 +289,64 @@ module QRDA
|
|
292
289
|
end
|
293
290
|
|
294
291
|
def extract_entity(parent_element, entity_xpath)
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
292
|
+
entities = []
|
293
|
+
care_partner_entity_element = parent_element.xpath(entity_xpath + "/cda:participantRole[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.160']")
|
294
|
+
patient_entity_element = parent_element.xpath(entity_xpath + "/cda:participantRole[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.161']")
|
295
|
+
practitioner_entity_element = parent_element.xpath(entity_xpath + "/cda:participantRole[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.162']")
|
296
|
+
organization_entity_element = parent_element.xpath(entity_xpath + "/cda:participantRole[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.163']")
|
297
|
+
location_entity_element = parent_element.xpath(entity_xpath + "/cda:participantRole[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.172']")
|
298
|
+
extract_care_partner_entity(care_partner_entity_element, entities) if care_partner_entity_element
|
299
|
+
extract_patient_entity(patient_entity_element, entities) if patient_entity_element
|
300
|
+
extract_practitioner_entity(practitioner_entity_element, entities) if practitioner_entity_element
|
301
|
+
extract_organization_entity(organization_entity_element, entities) if organization_entity_element
|
302
|
+
extract_location_entity(location_entity_element, entities) if location_entity_element
|
303
|
+
entities.empty? ? nil : entities
|
303
304
|
end
|
304
305
|
|
305
|
-
def extract_care_partner_entity(
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
306
|
+
def extract_care_partner_entity(care_partner_entity_elements, entities)
|
307
|
+
care_partner_entity_elements&.each do |care_partner_entity_element|
|
308
|
+
care_partner_entity = QDM::CarePartner.new
|
309
|
+
care_partner_entity.identifier = extract_id(care_partner_entity_element, './cda:id')
|
310
|
+
care_partner_entity.relationship = code_if_present(care_partner_entity_element.at_xpath('./cda:playingEntity/cda:code'))
|
311
|
+
entities << care_partner_entity
|
312
|
+
end
|
310
313
|
end
|
311
314
|
|
312
|
-
def extract_patient_entity(
|
313
|
-
|
314
|
-
|
315
|
-
|
315
|
+
def extract_patient_entity(patient_entity_elements, entities)
|
316
|
+
patient_entity_elements&.each do |patient_entity_element|
|
317
|
+
patient_entity = QDM::PatientEntity.new
|
318
|
+
patient_entity.identifier = extract_id(patient_entity_element, './cda:id')
|
319
|
+
entities << patient_entity
|
320
|
+
end
|
316
321
|
end
|
317
322
|
|
318
|
-
def extract_practitioner_entity(
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
323
|
+
def extract_practitioner_entity(practitioner_entity_elements, entities)
|
324
|
+
practitioner_entity_elements&.each do |practitioner_entity_element|
|
325
|
+
practitioner_entity = QDM::Practitioner.new
|
326
|
+
practitioner_entity.identifier = extract_id(practitioner_entity_element, './cda:id')
|
327
|
+
practitioner_entity.role = code_if_present(practitioner_entity_element.at_xpath('./cda:code'))
|
328
|
+
practitioner_entity.specialty = code_if_present(practitioner_entity_element.at_xpath('./cda:playingEntity/cda:code'))
|
329
|
+
practitioner_entity.qualification = code_if_present(practitioner_entity_element.at_xpath('./cda:scopingEntity/cda:code'))
|
330
|
+
entities << practitioner_entity
|
331
|
+
end
|
325
332
|
end
|
326
333
|
|
327
|
-
def extract_organization_entity(
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
334
|
+
def extract_organization_entity(organization_entity_elements, entities)
|
335
|
+
organization_entity_elements&.each do |organization_entity_element|
|
336
|
+
organization_entity = QDM::Organization.new
|
337
|
+
organization_entity.identifier = extract_id(organization_entity_element, './cda:id')
|
338
|
+
organization_entity.organizationType = code_if_present(organization_entity_element.at_xpath('./cda:playingEntity/cda:code'))
|
339
|
+
entities << organization_entity
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
def extract_location_entity(location_entity_elements, entities)
|
344
|
+
location_entity_elements&.each do |location_entity_element|
|
345
|
+
location_entity = QDM::Location.new
|
346
|
+
location_entity.identifier = extract_id(location_entity_element, './cda:id')
|
347
|
+
location_entity.locationType = code_if_present(location_entity_element.at_xpath('./cda:playingEntity/cda:code'))
|
348
|
+
entities << location_entity
|
349
|
+
end
|
332
350
|
end
|
333
351
|
end
|
334
352
|
end
|
@@ -18,7 +18,8 @@ module QRDA
|
|
18
18
|
adverse_event.severity = code_if_present(entry_element.at_xpath(@severity_xpath))
|
19
19
|
adverse_event.type = code_if_present(entry_element.at_xpath(@type_xpath))
|
20
20
|
adverse_event.facilityLocation = extract_facility_locations(entry_element)[0]
|
21
|
-
|
21
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
22
|
+
adverse_event.recorder.concat(entity) if entity
|
22
23
|
adverse_event
|
23
24
|
end
|
24
25
|
|
@@ -16,7 +16,8 @@ module QRDA
|
|
16
16
|
allergy_intolerance = super
|
17
17
|
allergy_intolerance.severity = code_if_present(entry_element.at_xpath(@severity_xpath))
|
18
18
|
allergy_intolerance.type = code_if_present(entry_element.at_xpath(@type_xpath))
|
19
|
-
|
19
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
20
|
+
allergy_intolerance.recorder.concat(entity) if entity
|
20
21
|
allergy_intolerance
|
21
22
|
end
|
22
23
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
assessment_order = super
|
15
15
|
assessment_order.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
assessment_order.requester.concat(entity) if entity
|
17
18
|
assessment_order
|
18
19
|
end
|
19
20
|
|
@@ -8,19 +8,24 @@ module QRDA
|
|
8
8
|
@author_datetime_xpath = "./cda:author[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.155']/cda:time"
|
9
9
|
@result_xpath = "./cda:value"
|
10
10
|
@method_xpath = './cda:methodCode'
|
11
|
+
@interpretation_xpath = './cda:interpretationCode'
|
11
12
|
@components_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.149']"
|
12
13
|
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
13
14
|
@relevant_period_xpath = "./cda:effectiveTime"
|
14
15
|
@relevant_date_time_xpath = './cda:effectiveTime[@value]'
|
16
|
+
@related_to_xpath = "./sdtc:inFulfillmentOf1/sdtc:actReference"
|
15
17
|
@entry_class = QDM::AssessmentPerformed
|
16
18
|
end
|
17
19
|
|
18
20
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
19
21
|
assessment_performed = super
|
20
22
|
assessment_performed.method = code_if_present(entry_element.at_xpath(@method_xpath))
|
23
|
+
assessment_performed.interpretation = code_if_present(entry_element.at_xpath(@interpretation_xpath))
|
21
24
|
assessment_performed.components = extract_components(entry_element)
|
22
25
|
assessment_performed.reason = extract_reason(entry_element)
|
23
|
-
|
26
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
27
|
+
assessment_performed.performer.concat(entity) if entity
|
28
|
+
assessment_performed.relatedTo = extract_related_to(entry_element)
|
24
29
|
assessment_performed
|
25
30
|
end
|
26
31
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
assessment_recommended = super
|
15
15
|
assessment_recommended.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
assessment_recommended.requester.concat(entity) if entity
|
17
18
|
assessment_recommended
|
18
19
|
end
|
19
20
|
|
@@ -20,8 +20,10 @@ module QRDA
|
|
20
20
|
communication_performed.medium = code_if_present(entry_element.at_xpath(@medium_xpath))
|
21
21
|
communication_performed.sentDatetime = extract_time(entry_element, @sent_datetime_xpath)
|
22
22
|
communication_performed.receivedDatetime = extract_time(entry_element, @received_datetime_xpath)
|
23
|
-
|
24
|
-
communication_performed.
|
23
|
+
entity1 = extract_entity(entry_element, "./cda:participant[@typeCode='AUT']")
|
24
|
+
communication_performed.sender.concat(entity1) if entity1
|
25
|
+
entity2 = extract_entity(entry_element, "./cda:participant[@typeCode='IRCP']")
|
26
|
+
communication_performed.recipient.concat(entity2) if entity2
|
25
27
|
communication_performed.relatedTo = extract_related_to(entry_element)
|
26
28
|
communication_performed
|
27
29
|
end
|
@@ -12,7 +12,8 @@ module QRDA
|
|
12
12
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
device_order = super
|
15
|
-
|
15
|
+
entity = extract_entity(entry_element, "./cda:entryRelationship/cda:supply//cda:participant[@typeCode='PRF']")
|
16
|
+
device_order.requester.concat(entity) if entity
|
16
17
|
device_order.reason = extract_reason(entry_element)
|
17
18
|
device_order
|
18
19
|
end
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
device_recommended = super
|
15
15
|
device_recommended.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:entryRelationship/cda:supply//cda:participant[@typeCode='PRF']")
|
17
|
+
device_recommended.requester.concat(entity) if entity
|
17
18
|
device_recommended
|
18
19
|
end
|
19
20
|
|
@@ -16,7 +16,8 @@ module QRDA
|
|
16
16
|
diagnosis = super
|
17
17
|
diagnosis.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
18
18
|
diagnosis.severity = code_if_present(entry_element.at_xpath(@severity_xpath))
|
19
|
-
|
19
|
+
entity = extract_entity(entry_element, "./cda:entryRelationship/cda:observation//cda:participant[@typeCode='PRF']")
|
20
|
+
diagnosis.recorder.concat(entity) if entity
|
20
21
|
diagnosis
|
21
22
|
end
|
22
23
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
diagnostic_study_order = super
|
15
15
|
diagnostic_study_order.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
diagnostic_study_order.requester.concat(entity) if entity
|
17
18
|
diagnostic_study_order
|
18
19
|
end
|
19
20
|
|
@@ -12,9 +12,11 @@ module QRDA
|
|
12
12
|
@result_datetime_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.2']/cda:effectiveTime"
|
13
13
|
@status_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.93']/cda:value"
|
14
14
|
@method_xpath = './cda:methodCode'
|
15
|
+
@interpretation_xpath = './cda:interpretationCode'
|
15
16
|
@facility_locations_xpath = "./cda:participant[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.100']"
|
16
17
|
@components_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.149']"
|
17
18
|
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
19
|
+
@related_to_xpath = "./sdtc:inFulfillmentOf1/sdtc:actReference"
|
18
20
|
@entry_class = QDM::DiagnosticStudyPerformed
|
19
21
|
end
|
20
22
|
|
@@ -24,10 +26,13 @@ module QRDA
|
|
24
26
|
diagnostic_study_performed.resultDatetime ||= extract_interval(entry_element, @result_datetime_xpath)&.low
|
25
27
|
diagnostic_study_performed.status = code_if_present(entry_element.at_xpath(@status_xpath))
|
26
28
|
diagnostic_study_performed.method = code_if_present(entry_element.at_xpath(@method_xpath))
|
29
|
+
diagnostic_study_performed.interpretation = code_if_present(entry_element.at_xpath(@interpretation_xpath))
|
27
30
|
diagnostic_study_performed.facilityLocation = extract_facility_locations(entry_element)[0]
|
28
31
|
diagnostic_study_performed.components = extract_components(entry_element)
|
29
32
|
diagnostic_study_performed.reason = extract_reason(entry_element)
|
30
|
-
|
33
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
34
|
+
diagnostic_study_performed.performer.concat(entity) if entity
|
35
|
+
diagnostic_study_performed.relatedTo = extract_related_to(entry_element)
|
31
36
|
diagnostic_study_performed
|
32
37
|
end
|
33
38
|
|
@@ -11,7 +11,8 @@ module QRDA
|
|
11
11
|
|
12
12
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
13
13
|
diagnostic_study_recommended = super
|
14
|
-
|
14
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
15
|
+
diagnostic_study_recommended.requester.concat(entity) if entity
|
15
16
|
diagnostic_study_recommended
|
16
17
|
end
|
17
18
|
|
@@ -17,7 +17,8 @@ module QRDA
|
|
17
17
|
encounter_order.facilityLocation = extract_facility_locations(entry_element)[0]
|
18
18
|
encounter_order.reason = extract_reason(entry_element)
|
19
19
|
encounter_order.priority = code_if_present(entry_element.at_xpath(@priority_xpath))
|
20
|
-
|
20
|
+
entity = extract_entity(entry_element, "./cda:entryRelationship/cda:encounter//cda:participant[@typeCode='PRF']")
|
21
|
+
encounter_order.requester.concat(entity) if entity
|
21
22
|
encounter_order
|
22
23
|
end
|
23
24
|
|