cqm-reports 3.1.8 → 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 +5 -5
- 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 +52 -29
- 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 +25 -24
- 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
@@ -15,7 +15,8 @@ module QRDA
|
|
15
15
|
encounter_recommended = super
|
16
16
|
encounter_recommended.facilityLocation = extract_facility_locations(entry_element)[0]
|
17
17
|
encounter_recommended.reason = extract_reason(entry_element)
|
18
|
-
|
18
|
+
entity = extract_entity(entry_element, "./cda:entryRelationship/cda:encounter//cda:participant[@typeCode='PRF']")
|
19
|
+
encounter_recommended.requester.concat(entity) if entity
|
19
20
|
encounter_recommended
|
20
21
|
end
|
21
22
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
family_history = super
|
15
15
|
family_history.relationship = code_if_present(entry_element.at_xpath(@relationship_xpath))
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:component/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.112']//cda:participant[@typeCode='PRF']")
|
17
|
+
family_history.recorder.concat(entity) if entity
|
17
18
|
family_history
|
18
19
|
end
|
19
20
|
|
@@ -18,7 +18,8 @@ module QRDA
|
|
18
18
|
immunization_administered.dosage = extract_scalar(entry_element, @dosage_xpath)
|
19
19
|
immunization_administered.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
20
20
|
immunization_administered.reason = extract_reason(entry_element)
|
21
|
-
|
21
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
22
|
+
immunization_administered.performer.concat(entity) if entity
|
22
23
|
immunization_administered
|
23
24
|
end
|
24
25
|
|
@@ -21,7 +21,8 @@ module QRDA
|
|
21
21
|
immunization_order.supply = extract_scalar(entry_element, @supply_xpath)
|
22
22
|
immunization_order.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
23
23
|
immunization_order.reason = extract_reason(entry_element)
|
24
|
-
|
24
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
25
|
+
immunization_order.requester.concat(entity) if entity
|
25
26
|
immunization_order
|
26
27
|
end
|
27
28
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
intervention_order = super
|
15
15
|
intervention_order.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
intervention_order.requester.concat(entity) if entity
|
17
18
|
intervention_order
|
18
19
|
end
|
19
20
|
|
@@ -11,6 +11,7 @@ module QRDA
|
|
11
11
|
@result_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.2']/cda:value"
|
12
12
|
@status_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.93']/cda:value"
|
13
13
|
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
14
|
+
@related_to_xpath = "./sdtc:inFulfillmentOf1/sdtc:actReference"
|
14
15
|
@entry_class = QDM::InterventionPerformed
|
15
16
|
end
|
16
17
|
|
@@ -18,7 +19,9 @@ module QRDA
|
|
18
19
|
intervention_performed = super
|
19
20
|
intervention_performed.status = code_if_present(entry_element.at_xpath(@status_xpath))
|
20
21
|
intervention_performed.reason = extract_reason(entry_element)
|
21
|
-
|
22
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
23
|
+
intervention_performed.performer.concat(entity) if entity
|
24
|
+
intervention_performed.relatedTo = extract_related_to(entry_element)
|
22
25
|
intervention_performed
|
23
26
|
end
|
24
27
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
intervention_recommended = super
|
15
15
|
intervention_recommended.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
intervention_recommended.requester.concat(entity) if entity
|
17
18
|
intervention_recommended
|
18
19
|
end
|
19
20
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
laboratory_test_order = super
|
15
15
|
laboratory_test_order.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
laboratory_test_order.requester.concat(entity) if entity
|
17
18
|
laboratory_test_order
|
18
19
|
end
|
19
20
|
|
@@ -14,6 +14,7 @@ module QRDA
|
|
14
14
|
@result_datetime_xpath = "./cda:entryRelationship[@typeCode='REFR']/cda:observation/cda:effectiveTime"
|
15
15
|
@components_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.149']"
|
16
16
|
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
17
|
+
@related_to_xpath = "./sdtc:inFulfillmentOf1/sdtc:actReference"
|
17
18
|
@entry_class = QDM::LaboratoryTestPerformed
|
18
19
|
end
|
19
20
|
|
@@ -24,7 +25,9 @@ module QRDA
|
|
24
25
|
laboratory_test_performed.resultDatetime = extract_time(entry_element, @result_datetime_xpath)
|
25
26
|
laboratory_test_performed.components = extract_components(entry_element)
|
26
27
|
laboratory_test_performed.reason = extract_reason(entry_element)
|
27
|
-
|
28
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
29
|
+
laboratory_test_performed.performer.concat(entity) if entity
|
30
|
+
laboratory_test_performed.relatedTo = extract_related_to(entry_element)
|
28
31
|
laboratory_test_performed
|
29
32
|
end
|
30
33
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
laboratory_test_recommended = super
|
15
15
|
laboratory_test_recommended.reason = extract_reason(entry_element)
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
17
|
+
laboratory_test_recommended.requester.concat(entity) if entity
|
17
18
|
laboratory_test_recommended
|
18
19
|
end
|
19
20
|
|
@@ -18,7 +18,8 @@ module QRDA
|
|
18
18
|
medication_active.dosage = extract_scalar(entry_element, @dosage_xpath)
|
19
19
|
medication_active.frequency = frequency_as_coded_value(entry_element, @frequency_xpath)
|
20
20
|
medication_active.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
21
|
-
|
21
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
22
|
+
medication_active.recorder.concat(entity) if entity
|
22
23
|
medication_active
|
23
24
|
end
|
24
25
|
|
@@ -21,7 +21,8 @@ module QRDA
|
|
21
21
|
medication_administered.frequency = frequency_as_coded_value(entry_element, @frequency_xpath)
|
22
22
|
medication_administered.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
23
23
|
medication_administered.reason = extract_reason(entry_element)
|
24
|
-
|
24
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
25
|
+
medication_administered.performer.concat(entity) if entity
|
25
26
|
medication_administered
|
26
27
|
end
|
27
28
|
|
@@ -5,7 +5,7 @@ module QRDA
|
|
5
5
|
super(entry_finder)
|
6
6
|
@id_xpath = './cda:entryRelationship/cda:substanceAdministration/cda:id'
|
7
7
|
@code_xpath = "./cda:entryRelationship/cda:substanceAdministration[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.16']/cda:consumable/cda:manufacturedProduct/cda:manufacturedMaterial/cda:code"
|
8
|
-
@author_datetime_xpath = "./cda:entryRelationship/cda:substanceAdministration[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.16']/cda:author[cda:templateId/@root='2.16.840.1.113883.10.20.
|
8
|
+
@author_datetime_xpath = "./cda:entryRelationship/cda:substanceAdministration[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.16']/cda:author[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.155']/cda:time"
|
9
9
|
@refills_xpath = "./cda:entryRelationship/cda:substanceAdministration[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.16']/cda:repeatNumber"
|
10
10
|
@dosage_xpath = "./cda:entryRelationship/cda:substanceAdministration[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.16']/cda:doseQuantity"
|
11
11
|
@supply_xpath = "./cda:entryRelationship/cda:supply[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.99']/cda:quantity"
|
@@ -24,8 +24,10 @@ module QRDA
|
|
24
24
|
medication_discharge.frequency = frequency_as_coded_value(entry_element, @frequency_xpath)
|
25
25
|
medication_discharge.daysSupplied = extract_scalar(entry_element, @days_supplied_xpath)&.value
|
26
26
|
medication_discharge.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
27
|
-
|
28
|
-
medication_discharge.
|
27
|
+
entity1 = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
28
|
+
medication_discharge.prescriber.concat(entity1) if entity1
|
29
|
+
entity2 = extract_entity(entry_element, "./cda:participant[@typeCode='AUT']")
|
30
|
+
medication_discharge.recorder.concat(entity2) if entity2
|
29
31
|
medication_discharge
|
30
32
|
end
|
31
33
|
|
@@ -25,8 +25,10 @@ module QRDA
|
|
25
25
|
medication_dispensed.frequency = frequency_as_coded_value(entry_element, @frequency_xpath)
|
26
26
|
medication_dispensed.daysSupplied = extract_scalar(entry_element, @days_supplied_xpath)&.value
|
27
27
|
medication_dispensed.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
28
|
-
|
29
|
-
medication_dispensed.
|
28
|
+
entity1 = extract_entity(entry_element, "./cda:entryRelationship/cda:supply[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.18']//cda:participant[@typeCode='PRF']")
|
29
|
+
medication_dispensed.prescriber.concat(entity1) if entity1
|
30
|
+
entity2 = extract_entity(entry_element, "./cda:entryRelationship/cda:supply[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.18']/cda:participant[@typeCode='DIST']")
|
31
|
+
medication_dispensed.dispenser.concat(entity2) if entity2
|
30
32
|
medication_dispensed
|
31
33
|
end
|
32
34
|
|
@@ -16,6 +16,7 @@ module QRDA
|
|
16
16
|
@prescriber_id_xpath = "./cda:author/cda:assignedAuthor/cda:id"
|
17
17
|
@days_supplied_xpath = "./cda:entryRelationship/cda:supply[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.157']/cda:quantity"
|
18
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"
|
19
20
|
@entry_class = QDM::MedicationOrder
|
20
21
|
end
|
21
22
|
|
@@ -29,7 +30,9 @@ module QRDA
|
|
29
30
|
medication_order.setting = code_if_present(entry_element.at_xpath(@setting_xpath))
|
30
31
|
medication_order.daysSupplied = extract_scalar(entry_element, @days_supplied_xpath)&.value
|
31
32
|
medication_order.reason = extract_reason(entry_element)
|
32
|
-
|
33
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
34
|
+
medication_order.prescriber.concat(entity) if entity
|
35
|
+
medication_order.relatedTo = extract_related_to(entry_element)
|
33
36
|
medication_order
|
34
37
|
end
|
35
38
|
|
@@ -11,7 +11,8 @@ module QRDA
|
|
11
11
|
|
12
12
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
13
13
|
patient_care_experience = super
|
14
|
-
|
14
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
15
|
+
patient_care_experience.recorder.concat(entity) if entity
|
15
16
|
patient_care_experience
|
16
17
|
end
|
17
18
|
|
@@ -15,7 +15,8 @@ module QRDA
|
|
15
15
|
physical_exam_order = super
|
16
16
|
physical_exam_order.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
17
17
|
physical_exam_order.reason = extract_reason(entry_element)
|
18
|
-
|
18
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
19
|
+
physical_exam_order.requester.concat(entity) if entity
|
19
20
|
physical_exam_order
|
20
21
|
end
|
21
22
|
|
@@ -13,6 +13,7 @@ module QRDA
|
|
13
13
|
@anatomical_location_site_xpath = "./cda:targetSiteCode"
|
14
14
|
@components_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.149']"
|
15
15
|
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
16
|
+
@related_to_xpath = "./sdtc:inFulfillmentOf1/sdtc:actReference"
|
16
17
|
@entry_class = QDM::PhysicalExamPerformed
|
17
18
|
end
|
18
19
|
|
@@ -22,7 +23,9 @@ module QRDA
|
|
22
23
|
physical_exam_performed.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
23
24
|
physical_exam_performed.components = extract_components(entry_element)
|
24
25
|
physical_exam_performed.reason = extract_reason(entry_element)
|
25
|
-
|
26
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
27
|
+
physical_exam_performed.performer.concat(entity) if entity
|
28
|
+
physical_exam_performed.relatedTo = extract_related_to(entry_element)
|
26
29
|
physical_exam_performed
|
27
30
|
end
|
28
31
|
|
@@ -15,7 +15,8 @@ module QRDA
|
|
15
15
|
physical_exam_recommended = super
|
16
16
|
physical_exam_recommended.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
17
17
|
physical_exam_recommended.reason = extract_reason(entry_element)
|
18
|
-
|
18
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
19
|
+
physical_exam_recommended.requester.concat(entity) if entity
|
19
20
|
physical_exam_recommended
|
20
21
|
end
|
21
22
|
|
@@ -16,7 +16,8 @@ module QRDA
|
|
16
16
|
procedure_order = super
|
17
17
|
procedure_order.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
18
18
|
procedure_order.reason = extract_reason(entry_element)
|
19
|
-
|
19
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
20
|
+
procedure_order.requester.concat(entity) if entity
|
20
21
|
procedure_order.rank = entry_element.at_xpath(@rank_xpath)&.value&.strip.to_i if entry_element.at_xpath(@rank_xpath)&.value
|
21
22
|
procedure_order
|
22
23
|
end
|
@@ -16,6 +16,7 @@ module QRDA
|
|
16
16
|
@components_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.149']"
|
17
17
|
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
18
18
|
@rank_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.166']/cda:value/@value"
|
19
|
+
@related_to_xpath = "./sdtc:inFulfillmentOf1/sdtc:actReference"
|
19
20
|
@entry_class = QDM::ProcedurePerformed
|
20
21
|
end
|
21
22
|
|
@@ -27,8 +28,10 @@ module QRDA
|
|
27
28
|
procedure_performed.incisionDatetime = extract_time(entry_element, @incision_datetime_xpath)
|
28
29
|
procedure_performed.components = extract_components(entry_element)
|
29
30
|
procedure_performed.reason = extract_reason(entry_element)
|
30
|
-
|
31
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
32
|
+
procedure_performed.performer.concat(entity) if entity
|
31
33
|
procedure_performed.rank = entry_element.at_xpath(@rank_xpath)&.value&.strip.to_i if entry_element.at_xpath(@rank_xpath)&.value
|
34
|
+
procedure_performed.relatedTo = extract_related_to(entry_element)
|
32
35
|
procedure_performed
|
33
36
|
end
|
34
37
|
|
@@ -16,7 +16,8 @@ module QRDA
|
|
16
16
|
procedure_recommended = super
|
17
17
|
procedure_recommended.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
18
18
|
procedure_recommended.reason = extract_reason(entry_element)
|
19
|
-
|
19
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
20
|
+
procedure_recommended.requester.concat(entity) if entity
|
20
21
|
procedure_recommended.rank = entry_element.at_xpath(@rank_xpath)&.value&.strip.to_i if entry_element.at_xpath(@rank_xpath)&.value
|
21
22
|
procedure_recommended
|
22
23
|
end
|
@@ -12,7 +12,6 @@ module QRDA
|
|
12
12
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
13
13
|
program_participation = super
|
14
14
|
program_participation.participationPeriod = extract_interval(entry_element, @participation_period_xpath)
|
15
|
-
program_participation.recorder = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
16
15
|
program_participation
|
17
16
|
end
|
18
17
|
|
@@ -11,7 +11,8 @@ module QRDA
|
|
11
11
|
|
12
12
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
13
13
|
provider_care_experience = super
|
14
|
-
|
14
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
15
|
+
provider_care_experience.recorder.concat(entity) if entity
|
15
16
|
provider_care_experience
|
16
17
|
end
|
17
18
|
|
@@ -19,7 +19,8 @@ module QRDA
|
|
19
19
|
substance_administered.dosage = extract_scalar(entry_element, @dosage_xpath)
|
20
20
|
substance_administered.frequency = frequency_as_coded_value(entry_element, @frequency_xpath)
|
21
21
|
substance_administered.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
22
|
-
|
22
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
23
|
+
substance_administered.performer.concat(entity) if entity
|
23
24
|
substance_administered
|
24
25
|
end
|
25
26
|
|
@@ -21,7 +21,8 @@ module QRDA
|
|
21
21
|
substance_recommended.refills = extract_scalar(entry_element, @refills_xpath)&.value
|
22
22
|
substance_recommended.route = code_if_present(entry_element.at_xpath(@route_xpath))
|
23
23
|
substance_recommended.reason = extract_reason(entry_element)
|
24
|
-
|
24
|
+
entity = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
25
|
+
substance_recommended.requester.concat(entity) if entity
|
25
26
|
substance_recommended
|
26
27
|
end
|
27
28
|
|
@@ -13,7 +13,8 @@ module QRDA
|
|
13
13
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
14
|
symptom = super
|
15
15
|
symptom.severity = code_if_present(entry_element.at_xpath(@severity_xpath))
|
16
|
-
|
16
|
+
entity = extract_entity(entry_element, "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.136']//cda:participant[@typeCode='PRF']")
|
17
|
+
symptom.recorder.concat(entity) if entity
|
17
18
|
symptom
|
18
19
|
end
|
19
20
|
|
@@ -18,7 +18,6 @@ module QRDA
|
|
18
18
|
@data_element_importers << AssessmentPerformedImporter.new
|
19
19
|
@data_element_importers << AssessmentRecommendedImporter.new
|
20
20
|
@data_element_importers << CommunicationPerformedImporter.new
|
21
|
-
@data_element_importers << DeviceAppliedImporter.new
|
22
21
|
@data_element_importers << DeviceOrderImporter.new
|
23
22
|
@data_element_importers << DeviceRecommendedImporter.new
|
24
23
|
@data_element_importers << DiagnosisImporter.new
|
data/lib/util/entity_helper.rb
CHANGED
@@ -10,6 +10,10 @@ module HQMF
|
|
10
10
|
self[:hqmfOid] == '2.16.840.1.113883.10.20.28.4.134'
|
11
11
|
end
|
12
12
|
|
13
|
+
def location_entity?
|
14
|
+
self[:hqmfOid] == '2.16.840.1.113883.10.20.28.4.142'
|
15
|
+
end
|
16
|
+
|
13
17
|
def organization_entity?
|
14
18
|
self[:hqmfOid] == '2.16.840.1.113883.10.20.28.4.135'
|
15
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cqm-reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The MITRE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cqm-models
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cqm-validators
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mustache
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,7 +195,6 @@ files:
|
|
195
195
|
- lib/qrda-export/catI-r5/qrda_templates/assessment_performed.mustache
|
196
196
|
- lib/qrda-export/catI-r5/qrda_templates/assessment_recommended.mustache
|
197
197
|
- lib/qrda-export/catI-r5/qrda_templates/communication_performed.mustache
|
198
|
-
- lib/qrda-export/catI-r5/qrda_templates/device_applied.mustache
|
199
198
|
- lib/qrda-export/catI-r5/qrda_templates/device_order.mustache
|
200
199
|
- lib/qrda-export/catI-r5/qrda_templates/device_recommended.mustache
|
201
200
|
- lib/qrda-export/catI-r5/qrda_templates/diagnosis.mustache
|
@@ -241,15 +240,18 @@ files:
|
|
241
240
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_component.mustache
|
242
241
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_data_element_codes_as_values.mustache
|
243
242
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_days_supplied.mustache
|
243
|
+
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_class.mustache
|
244
244
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_diagnosis_qdm.mustache
|
245
245
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity.mustache
|
246
246
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_care_partner.mustache
|
247
|
+
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_location.mustache
|
247
248
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_organization.mustache
|
248
249
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_patient.mustache
|
249
250
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_practitioner.mustache
|
250
251
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_facility_location.mustache
|
251
252
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_immunization_details.mustache
|
252
253
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_immunization_supply_request.mustache
|
254
|
+
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_interpretation.mustache
|
253
255
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_medication_details.mustache
|
254
256
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_medication_supply_request.mustache
|
255
257
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_method.mustache
|
@@ -261,22 +263,22 @@ files:
|
|
261
263
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_results.mustache
|
262
264
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_severity.mustache
|
263
265
|
- lib/qrda-export/catI-r5/qrda_templates/template_partials/_status.mustache
|
264
|
-
- lib/qrda-export/catIII
|
265
|
-
- lib/qrda-export/catIII
|
266
|
-
- lib/qrda-export/catIII
|
267
|
-
- lib/qrda-export/catIII
|
268
|
-
- lib/qrda-export/catIII
|
269
|
-
- lib/qrda-export/catIII
|
270
|
-
- lib/qrda-export/catIII
|
271
|
-
- lib/qrda-export/catIII
|
272
|
-
- lib/qrda-export/catIII
|
273
|
-
- lib/qrda-export/catIII
|
274
|
-
- lib/qrda-export/catIII
|
275
|
-
- lib/qrda-export/catIII
|
276
|
-
- lib/qrda-export/catIII
|
277
|
-
- lib/qrda-export/catIII
|
278
|
-
- lib/qrda-export/catIII
|
279
|
-
- lib/qrda-export/catIII
|
266
|
+
- lib/qrda-export/catIII/_continuous_variable_value.mustache
|
267
|
+
- lib/qrda-export/catIII/_header.mustache
|
268
|
+
- lib/qrda-export/catIII/_measure_data.mustache
|
269
|
+
- lib/qrda-export/catIII/_measure_section.mustache
|
270
|
+
- lib/qrda-export/catIII/_reporting_period.mustache
|
271
|
+
- lib/qrda-export/catIII/_stratification.mustache
|
272
|
+
- lib/qrda-export/catIII/_supplemental_data.mustache
|
273
|
+
- lib/qrda-export/catIII/qrda3.mustache
|
274
|
+
- lib/qrda-export/catIII/qrda3.rb
|
275
|
+
- lib/qrda-export/catIII/qrda_header/_author.mustache
|
276
|
+
- lib/qrda-export/catIII/qrda_header/_custodian.mustache
|
277
|
+
- lib/qrda-export/catIII/qrda_header/_documentation_of_service_event.mustache
|
278
|
+
- lib/qrda-export/catIII/qrda_header/_information_recipient.mustache
|
279
|
+
- lib/qrda-export/catIII/qrda_header/_legal_authenticator.mustache
|
280
|
+
- lib/qrda-export/catIII/qrda_header/_participant_ehr.mustache
|
281
|
+
- lib/qrda-export/catIII/qrda_header/_participant_location.mustache
|
280
282
|
- lib/qrda-export/helper/aggregate_object_helper.rb
|
281
283
|
- lib/qrda-export/helper/cat1_view_helper.rb
|
282
284
|
- lib/qrda-export/helper/date_helper.rb
|
@@ -292,7 +294,6 @@ files:
|
|
292
294
|
- lib/qrda-import/data-element-importers/assessment_performed_importer.rb
|
293
295
|
- lib/qrda-import/data-element-importers/assessment_recommended_importer.rb
|
294
296
|
- lib/qrda-import/data-element-importers/communication_performed_importer.rb
|
295
|
-
- lib/qrda-import/data-element-importers/device_applied_importer.rb
|
296
297
|
- lib/qrda-import/data-element-importers/device_order_importer.rb
|
297
298
|
- lib/qrda-import/data-element-importers/device_recommended_importer.rb
|
298
299
|
- lib/qrda-import/data-element-importers/diagnosis_importer.rb
|
@@ -1,44 +0,0 @@
|
|
1
|
-
<entry>
|
2
|
-
<procedure classCode="PROC" moodCode="EVN" {{{negation_ind}}}>
|
3
|
-
<!-- Procedure Activity Procedure -->
|
4
|
-
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
5
|
-
<!-- Device Applied -->
|
6
|
-
<templateId root="2.16.840.1.113883.10.20.24.3.7" extension="2019-12-01"/>
|
7
|
-
<id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
|
8
|
-
<code code="360030002" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="application of device"/>
|
9
|
-
<text>{{description}}</text>
|
10
|
-
<statusCode code="completed"/>
|
11
|
-
{{{relevant_date_period_or_null_flavor}}}
|
12
|
-
{{#anatomicalLocationSite}}
|
13
|
-
<!-- QDM Attribute: Anatomical Location Site -->
|
14
|
-
{{> qrda_templates/template_partials/_anatomical_location_site}}
|
15
|
-
{{/anatomicalLocationSite}}
|
16
|
-
{{#authorDatetime}}
|
17
|
-
<!-- QDM Attribute: Author dateTime -->
|
18
|
-
{{> qrda_templates/template_partials/_author}}
|
19
|
-
{{/authorDatetime}}
|
20
|
-
<participant typeCode="DEV">
|
21
|
-
<participantRole classCode="MANU">
|
22
|
-
<playingDevice classCode="DEV">
|
23
|
-
<!-- QDM Attribute: Code -->
|
24
|
-
{{> _codes}}
|
25
|
-
</playingDevice>
|
26
|
-
</participantRole>
|
27
|
-
</participant>
|
28
|
-
{{#performer}}
|
29
|
-
<!-- QDM Attribute: Performer -->
|
30
|
-
<participant typeCode="PRF">
|
31
|
-
{{> qrda_templates/template_partials/_entity}}
|
32
|
-
</participant>
|
33
|
-
{{/performer}}
|
34
|
-
{{#reason}}
|
35
|
-
<!-- QDM Attribute: Reason -->
|
36
|
-
{{> qrda_templates/template_partials/_reason}}
|
37
|
-
{{/reason}}
|
38
|
-
{{#negationRationale}}
|
39
|
-
<!-- QDM Attribute: Negation Rationale -->
|
40
|
-
{{> qrda_templates/template_partials/_reason}}
|
41
|
-
{{/negationRationale}}
|
42
|
-
</procedure>
|
43
|
-
</entry>
|
44
|
-
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module QRDA
|
2
|
-
module Cat1
|
3
|
-
class DeviceAppliedImporter < SectionImporter
|
4
|
-
def initialize(entry_finder = QRDA::Cat1::EntryFinder.new("./cda:entry/cda:procedure[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.7']"))
|
5
|
-
super(entry_finder)
|
6
|
-
@id_xpath = './cda:id'
|
7
|
-
@code_xpath = './cda:participant/cda:participantRole/cda:playingDevice/cda:code'
|
8
|
-
@author_datetime_xpath = "./cda:author[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.155']/cda:time"
|
9
|
-
@relevant_period_xpath = "./cda:effectiveTime"
|
10
|
-
@relevant_date_time_xpath = './cda:effectiveTime[@value]'
|
11
|
-
@anatomical_location_site_xpath = "./cda:targetSiteCode"
|
12
|
-
@reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
|
13
|
-
@entry_class = QDM::DeviceApplied
|
14
|
-
end
|
15
|
-
|
16
|
-
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
17
|
-
device_applied = super
|
18
|
-
device_applied.anatomicalLocationSite = code_if_present(entry_element.at_xpath(@anatomical_location_site_xpath))
|
19
|
-
device_applied.reason = extract_reason(entry_element)
|
20
|
-
device_applied.performer = extract_entity(entry_element, "./cda:participant[@typeCode='PRF']")
|
21
|
-
device_applied
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|