cqm-reports 3.0.0.pre.alpha.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile +2 -1
- data/README.md +26 -0
- data/lib/cqm-reports.rb +3 -2
- data/lib/html-export/qdm-patient/data_element/_data_element_other_fields.mustache +129 -5
- data/lib/html-export/qdm-patient/data_element/_data_element_times.mustache +36 -1
- data/lib/html-export/qdm-patient/qdm_patient.rb +39 -5
- data/lib/qrda-export/catI-r5/_header.mustache +2 -2
- data/lib/qrda-export/catI-r5/qrda1_r5.mustache +10 -2
- data/lib/qrda-export/catI-r5/qrda1_r5.rb +33 -2
- data/lib/qrda-export/catI-r5/qrda_header/_record_target.mustache +24 -9
- data/lib/qrda-export/catI-r5/qrda_templates/adverse_event.mustache +8 -2
- data/lib/qrda-export/catI-r5/qrda_templates/allergy_intolerance.mustache +8 -8
- data/lib/qrda-export/catI-r5/qrda_templates/assessment_order.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/assessment_performed.mustache +17 -1
- data/lib/qrda-export/catI-r5/qrda_templates/assessment_recommended.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/communication_performed.mustache +12 -13
- data/lib/qrda-export/catI-r5/qrda_templates/device_applied.mustache +17 -5
- data/lib/qrda-export/catI-r5/qrda_templates/device_order.mustache +8 -2
- data/lib/qrda-export/catI-r5/qrda_templates/device_recommended.mustache +8 -2
- data/lib/qrda-export/catI-r5/qrda_templates/diagnosis.mustache +9 -9
- data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_order.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_performed.mustache +17 -5
- data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_recommended.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/encounter_order.mustache +11 -2
- data/lib/qrda-export/catI-r5/qrda_templates/encounter_performed.mustache +9 -3
- data/lib/qrda-export/catI-r5/qrda_templates/encounter_recommended.mustache +8 -2
- data/lib/qrda-export/catI-r5/qrda_templates/family_history.mustache +8 -2
- data/lib/qrda-export/catI-r5/qrda_templates/immunization_administered.mustache +22 -7
- data/lib/qrda-export/catI-r5/qrda_templates/immunization_order.mustache +8 -2
- data/lib/qrda-export/catI-r5/qrda_templates/intervention_order.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/intervention_performed.mustache +17 -5
- data/lib/qrda-export/catI-r5/qrda_templates/intervention_recommended.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_order.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_performed.mustache +17 -5
- data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_recommended.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/medication_active.mustache +17 -7
- data/lib/qrda-export/catI-r5/qrda_templates/medication_administered.mustache +17 -5
- data/lib/qrda-export/catI-r5/qrda_templates/medication_discharge.mustache +14 -2
- data/lib/qrda-export/catI-r5/qrda_templates/medication_dispensed.mustache +27 -16
- data/lib/qrda-export/catI-r5/qrda_templates/medication_order.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/patient_care_experience.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_order.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_performed.mustache +17 -5
- data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_recommended.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/procedure_order.mustache +11 -1
- data/lib/qrda-export/catI-r5/qrda_templates/procedure_performed.mustache +21 -5
- data/lib/qrda-export/catI-r5/qrda_templates/procedure_recommended.mustache +11 -1
- data/lib/qrda-export/catI-r5/qrda_templates/program_participation.mustache +21 -0
- data/lib/qrda-export/catI-r5/qrda_templates/provider_care_experience.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/related_person.mustache +18 -0
- data/lib/qrda-export/catI-r5/qrda_templates/substance_recommended.mustache +7 -1
- data/lib/qrda-export/catI-r5/qrda_templates/symptom.mustache +10 -8
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_author.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_diagnosis_qdm.mustache +24 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity.mustache +12 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_care_partner.mustache +11 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_organization.mustache +11 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_patient.mustache +6 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_entity_practitioner.mustache +19 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_immunization_supply_request.mustache +29 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_medication_supply_request.mustache +12 -1
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_rank.mustache +7 -0
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_related_to.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_results.mustache +8 -1
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_status.mustache +1 -1
- data/lib/qrda-export/helper/cat1_view_helper.rb +2 -0
- data/lib/qrda-export/helper/date_helper.rb +27 -4
- data/lib/qrda-import/base-importers/demographics_importer.rb +3 -3
- data/lib/qrda-import/base-importers/section_importer.rb +48 -5
- 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 +1 -0
- data/lib/qrda-import/data-element-importers/assessment_performed_importer.rb +3 -0
- data/lib/qrda-import/data-element-importers/assessment_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/communication_performed_importer.rb +7 -6
- data/lib/qrda-import/data-element-importers/device_applied_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/device_order_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/device_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/diagnosis_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/diagnostic_study_order_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/diagnostic_study_performed_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/diagnostic_study_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/encounter_order_importer.rb +3 -0
- data/lib/qrda-import/data-element-importers/encounter_performed_importer.rb +7 -3
- data/lib/qrda-import/data-element-importers/encounter_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/family_history_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/immunization_administered_importer.rb +3 -1
- data/lib/qrda-import/data-element-importers/immunization_order_importer.rb +4 -3
- data/lib/qrda-import/data-element-importers/intervention_order_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/intervention_performed_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/intervention_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/laboratory_test_order_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/laboratory_test_performed_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/laboratory_test_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/medication_active_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/medication_administered_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/medication_discharge_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/medication_dispensed_importer.rb +3 -4
- data/lib/qrda-import/data-element-importers/medication_order_importer.rb +2 -2
- data/lib/qrda-import/data-element-importers/patient_care_experience_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/physical_exam_order_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/physical_exam_performed_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/physical_exam_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/procedure_order_importer.rb +3 -0
- data/lib/qrda-import/data-element-importers/procedure_performed_importer.rb +4 -0
- data/lib/qrda-import/data-element-importers/procedure_recommended_importer.rb +3 -0
- data/lib/qrda-import/data-element-importers/program_participation_importer.rb +21 -0
- data/lib/qrda-import/data-element-importers/provider_care_experience_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/related_person_importer.rb +19 -0
- data/lib/qrda-import/data-element-importers/substance_administered_importer.rb +2 -0
- data/lib/qrda-import/data-element-importers/substance_order_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/substance_recommended_importer.rb +1 -0
- data/lib/qrda-import/data-element-importers/symptom_importer.rb +1 -0
- data/lib/qrda-import/patient_importer.rb +31 -11
- data/lib/util/entity_helper.rb +22 -0
- metadata +19 -9
- data/lib/ext/code.rb +0 -11
- data/lib/ext/data_element.rb +0 -24
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_diagnosis.mustache +0 -23
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_principal_diagnosis.mustache +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 86b46847a0a68ecf86611dce268e5a12f6d01af6
|
|
4
|
+
data.tar.gz: 906d1984866e314876ca0d713f6b08a01a6ab8f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc1e458ec8496af2e20bec1068f7acf723976bdfa92610cd2f1b99f36692a5cb7ddb3c6d1648be17704d820d0002b8b32c78d52881ea1d78d71643909ae0499f
|
|
7
|
+
data.tar.gz: 9f4fa410245d83fbd1beb11183461a4cd8442859bfc391b7bffd90c5d9afeb2c91cd3ca83d54e9bc7c6a49f8ad9b6c9fe55230167161fd03cc4fc188066aec95
|
data/Gemfile
CHANGED
|
@@ -17,6 +17,7 @@ group :development do
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
group :test do
|
|
20
|
+
gem 'cqm-models', git: 'https://github.com/projecttacoma/cqm-models', branch: 'master'
|
|
20
21
|
gem 'factory_girl', '~> 4.1.0'
|
|
21
22
|
gem 'tailor', '~> 1.1.2'
|
|
22
23
|
gem 'cane', '~> 2.3.0'
|
|
@@ -26,6 +27,6 @@ group :test do
|
|
|
26
27
|
gem 'minitest', '~> 5.3'
|
|
27
28
|
gem 'minitest-reporters'
|
|
28
29
|
gem 'awesome_print', :require => 'ap'
|
|
29
|
-
gem 'cqm-validators'
|
|
30
|
+
gem 'cqm-validators', git: 'https://github.com/projecttacoma/cqm-validators', branch: 'master'
|
|
30
31
|
gem 'nokogiri-diff'
|
|
31
32
|
end
|
data/README.md
CHANGED
|
@@ -18,6 +18,32 @@ Starting with version **2.0.0** released on 6/20/2019, cqm-reports versioning ha
|
|
|
18
18
|
|
|
19
19
|
For the versions available, see [tags on this repository](https://github.com/projecttacoma/cqm-validators/tags).
|
|
20
20
|
|
|
21
|
+
Importing QRDA
|
|
22
|
+
==========
|
|
23
|
+
|
|
24
|
+
A QRDA document can be imported into a CQM::Patient (defined in [cqm-models](https://github.com/projecttacoma/cqm-models)) using the following commands.
|
|
25
|
+
|
|
26
|
+
doc = Nokogiri::XML(file)
|
|
27
|
+
patient = QRDA::Cat1::PatientImporter.instance.parse_cat1(doc)
|
|
28
|
+
|
|
29
|
+
Exporting QRDA Category I
|
|
30
|
+
==========
|
|
31
|
+
|
|
32
|
+
Exporting a QRDA document from a CQM::Patient (defined in [cqm-models](https://github.com/projecttacoma/cqm-models)) using the following command.
|
|
33
|
+
|
|
34
|
+
Qrda1R5.new(patient, measures, options).render
|
|
35
|
+
* patient is a [CQM::Patient](https://github.com/projecttacoma/cqm-models/blob/master/app/models/cqm/patient.rb)
|
|
36
|
+
* measures is an array of [CQM::Measure](https://github.com/projecttacoma/cqm-models/blob/master/app/models/cqm/measure.rb)
|
|
37
|
+
* options is a hash that can be used to pass in:
|
|
38
|
+
* provider
|
|
39
|
+
* patient_addresses
|
|
40
|
+
* patient_telecoms
|
|
41
|
+
* start_time
|
|
42
|
+
* end_time
|
|
43
|
+
* submission_program
|
|
44
|
+
|
|
45
|
+
QRDA export requires the [mustache](https://github.com/mustache/mustache) gem
|
|
46
|
+
|
|
21
47
|
## License
|
|
22
48
|
|
|
23
49
|
Copyright 2019 The MITRE Corporation
|
data/lib/cqm-reports.rb
CHANGED
|
@@ -5,6 +5,7 @@ require 'ostruct'
|
|
|
5
5
|
require_relative 'util/code_system_helper'
|
|
6
6
|
require_relative 'util/hqmf_template_helper'
|
|
7
7
|
require_relative 'util/qrda_template_helper'
|
|
8
|
+
require_relative 'util/entity_helper.rb'
|
|
8
9
|
|
|
9
10
|
require_relative 'qrda-export/helper/frequency_helper.rb'
|
|
10
11
|
require_relative 'qrda-export/helper/aggregate_object_helper.rb'
|
|
@@ -66,11 +67,11 @@ require_relative 'qrda-import/data-element-importers/physical_exam_recommended_i
|
|
|
66
67
|
require_relative 'qrda-import/data-element-importers/procedure_order_importer.rb'
|
|
67
68
|
require_relative 'qrda-import/data-element-importers/procedure_performed_importer.rb'
|
|
68
69
|
require_relative 'qrda-import/data-element-importers/procedure_recommended_importer.rb'
|
|
70
|
+
require_relative 'qrda-import/data-element-importers/program_participation_importer.rb'
|
|
69
71
|
require_relative 'qrda-import/data-element-importers/provider_care_experience_importer.rb'
|
|
72
|
+
require_relative 'qrda-import/data-element-importers/related_person_importer.rb'
|
|
70
73
|
require_relative 'qrda-import/data-element-importers/substance_administered_importer.rb'
|
|
71
74
|
require_relative 'qrda-import/data-element-importers/substance_order_importer.rb'
|
|
72
75
|
require_relative 'qrda-import/data-element-importers/substance_recommended_importer.rb'
|
|
73
76
|
require_relative 'qrda-import/data-element-importers/symptom_importer.rb'
|
|
74
77
|
require_relative 'qrda-import/patient_importer.rb'
|
|
75
|
-
require_relative 'ext/data_element.rb'
|
|
76
|
-
require_relative 'ext/code.rb'
|
|
@@ -15,8 +15,18 @@
|
|
|
15
15
|
<div class="div-table-head--no-border"><span class="criteria-heading">Anatomical Location Site:</span> {{{code_code_system_string}}}</div>
|
|
16
16
|
</div>
|
|
17
17
|
{{/anatomicalLocationSite}}
|
|
18
|
+
{{#cause}}
|
|
19
|
+
<div class="div-head-row">
|
|
20
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Cause:</span> {{{code_code_system_string}}}</div>
|
|
21
|
+
</div>
|
|
22
|
+
{{/cause}}
|
|
23
|
+
{{#category}}
|
|
24
|
+
<div class="div-head-row">
|
|
25
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Category:</span> {{{code_code_system_string}}}</div>
|
|
26
|
+
</div>
|
|
27
|
+
{{/category}}
|
|
18
28
|
{{#components}}
|
|
19
|
-
{{#code}}
|
|
29
|
+
{{#code}}
|
|
20
30
|
<div class="div-head-row">
|
|
21
31
|
<div class="div-table-head--no-border"><span class="criteria-heading">Component Code:</span> {{{code_code_system_string}}}</div>
|
|
22
32
|
</div>
|
|
@@ -27,9 +37,14 @@
|
|
|
27
37
|
</div>
|
|
28
38
|
{{/result}}
|
|
29
39
|
{{/components}}
|
|
40
|
+
{{#daysSupplied}}
|
|
41
|
+
<div class="div-head-row">
|
|
42
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Days Supplied:</span> {{{daysSupplied}}}</div>
|
|
43
|
+
</div>
|
|
44
|
+
{{/daysSupplied}}
|
|
30
45
|
{{#diagnoses}}
|
|
31
46
|
<div class="div-head-row">
|
|
32
|
-
<div class="div-table-head--no-border"><span class="criteria-heading">Diagnosis:</span> {{{
|
|
47
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Diagnosis:</span> {{{nested_code_string}}}</div>
|
|
33
48
|
</div>
|
|
34
49
|
{{/diagnoses}}
|
|
35
50
|
{{#dischargeDisposition}}
|
|
@@ -37,14 +52,24 @@
|
|
|
37
52
|
<div class="div-table-head--no-border"><span class="criteria-heading">Discharge Disposition:</span> {{{code_code_system_string}}}</div>
|
|
38
53
|
</div>
|
|
39
54
|
{{/dischargeDisposition}}
|
|
55
|
+
{{#dispenser}}
|
|
56
|
+
<div class="div-head-row">
|
|
57
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Dispenser:</span> {{{entity_string}}}</div>
|
|
58
|
+
</div>
|
|
59
|
+
{{/dispenser}}
|
|
60
|
+
{{#dosage}}
|
|
61
|
+
<div class="div-head-row">
|
|
62
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Dosage:</span> {{{unit_string}}}</div>
|
|
63
|
+
</div>
|
|
64
|
+
{{/dosage}}
|
|
40
65
|
{{#facilityLocation}}
|
|
41
66
|
<div class="div-head-row">
|
|
42
|
-
<div class="div-table-head--no-border"><span class="criteria-heading">Facility Location:</span> {{{
|
|
67
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Facility Location:</span> {{{nested_code_string}}}</div>
|
|
43
68
|
</div>
|
|
44
69
|
{{/facilityLocation}}
|
|
45
70
|
{{#facilityLocations}}
|
|
46
71
|
<div class="div-head-row">
|
|
47
|
-
<div class="div-table-head--no-border"><span class="criteria-heading">Facility:</span> {{{
|
|
72
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Facility:</span> {{{nested_code_string}}}</div>
|
|
48
73
|
</div>
|
|
49
74
|
{{/facilityLocations}}
|
|
50
75
|
{{#frequency}}
|
|
@@ -52,11 +77,31 @@
|
|
|
52
77
|
<div class="div-table-head--no-border"><span class="criteria-heading">Frequency:</span> {{{code_code_system_string}}}</div>
|
|
53
78
|
</div>
|
|
54
79
|
{{/frequency}}
|
|
80
|
+
{{#identifier}}
|
|
81
|
+
<div class="div-head-row">
|
|
82
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Identifier:</span> {{{identifier_string}}}</div>
|
|
83
|
+
</div>
|
|
84
|
+
{{/identifier}}
|
|
55
85
|
{{#lengthOfStay}}
|
|
56
86
|
<div class="div-head-row">
|
|
57
87
|
<div class="div-table-head--no-border"><span class="criteria-heading">Length Of Stay:</span> {{{unit_string}}}</div>
|
|
58
88
|
</div>
|
|
59
89
|
{{/lengthOfStay}}
|
|
90
|
+
{{#linkedPatientId}}
|
|
91
|
+
<div class="div-head-row">
|
|
92
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Linked Patient Id:</span> {{{linkedPatientId}}}</div>
|
|
93
|
+
</div>
|
|
94
|
+
{{/linkedPatientId}}
|
|
95
|
+
{{#medium}}
|
|
96
|
+
<div class="div-head-row">
|
|
97
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Medium:</span> {{{code_code_system_string}}}</div>
|
|
98
|
+
</div>
|
|
99
|
+
{{/medium}}
|
|
100
|
+
{{#methodCode}}
|
|
101
|
+
<div class="div-head-row">
|
|
102
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Method:</span> {{{code_code_system_string}}}</div>
|
|
103
|
+
</div>
|
|
104
|
+
{{/methodCode}}
|
|
60
105
|
{{#negationRationale}}
|
|
61
106
|
<div class="div-head-row">
|
|
62
107
|
<div class="div-table-head--no-border"><span class="criteria-heading">Negation Reason:</span> {{{code_code_system_string}}}</div>
|
|
@@ -67,26 +112,105 @@
|
|
|
67
112
|
<div class="div-table-head--no-border"><span class="criteria-heading">Ordinality:</span> {{{code_code_system_string}}}</div>
|
|
68
113
|
</div>
|
|
69
114
|
{{/ordinality}}
|
|
115
|
+
{{#participant}}
|
|
116
|
+
<div class="div-head-row">
|
|
117
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Participant:</span> {{{entity_string}}}</div>
|
|
118
|
+
</div>
|
|
119
|
+
{{/participant}}
|
|
120
|
+
{{#performer}}
|
|
121
|
+
<div class="div-head-row">
|
|
122
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Performer:</span> {{{entity_string}}}</div>
|
|
123
|
+
</div>
|
|
124
|
+
{{/performer}}
|
|
125
|
+
{{#prescriber}}
|
|
126
|
+
<div class="div-head-row">
|
|
127
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Prescriber:</span> {{{entity_string}}}</div>
|
|
128
|
+
</div>
|
|
129
|
+
{{/prescriber}}
|
|
70
130
|
{{#principalDiagnosis}}
|
|
71
131
|
<div class="div-head-row">
|
|
72
132
|
<div class="div-table-head--no-border"><span class="criteria-heading">Principal Diagnosis:</span> {{{code_code_system_string}}}</div>
|
|
73
133
|
</div>
|
|
74
134
|
{{/principalDiagnosis}}
|
|
135
|
+
{{#priority}}
|
|
136
|
+
<div class="div-head-row">
|
|
137
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Priority:</span> {{{code_code_system_string}}}</div>
|
|
138
|
+
</div>
|
|
139
|
+
{{/priority}}
|
|
140
|
+
{{#rank}}
|
|
141
|
+
<div class="div-head-row">
|
|
142
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Rank:</span> {{{rank}}}</div>
|
|
143
|
+
</div>
|
|
144
|
+
{{/rank}}
|
|
75
145
|
{{#reason}}
|
|
76
146
|
<div class="div-head-row">
|
|
77
147
|
<div class="div-table-head--no-border"><span class="criteria-heading">Reason:</span> {{{code_code_system_string}}}</div>
|
|
78
148
|
</div>
|
|
79
149
|
{{/reason}}
|
|
150
|
+
{{#recipient}}
|
|
151
|
+
<div class="div-head-row">
|
|
152
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Recipient:</span> {{{entity_string}}}</div>
|
|
153
|
+
</div>
|
|
154
|
+
{{/recipient}}
|
|
155
|
+
{{#recorder}}
|
|
156
|
+
<div class="div-head-row">
|
|
157
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Recorder:</span> {{{entity_string}}}</div>
|
|
158
|
+
</div>
|
|
159
|
+
{{/recorder}}
|
|
160
|
+
{{#referenceRange}}
|
|
161
|
+
<div class="div-head-row">
|
|
162
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Reference Range Start:</span> {{{low}}}</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="div-head-row">
|
|
165
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Reference Range End:</span> {{{high}}}</div>
|
|
166
|
+
</div>
|
|
167
|
+
{{/referenceRange}}
|
|
168
|
+
{{#refills}}
|
|
169
|
+
<div class="div-head-row">
|
|
170
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Refills:</span> {{{refills}}}</div>
|
|
171
|
+
</div>
|
|
172
|
+
{{/refills}}
|
|
173
|
+
{{#relatedTo}}
|
|
174
|
+
{{! TODO: relatedTo is an array of strings, which are ids of dataElements, and not very useful to the user}}
|
|
175
|
+
<div class="div-head-row">
|
|
176
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Related To:</span> {{{relatedTo}}}</div>
|
|
177
|
+
</div>
|
|
178
|
+
{{/relatedTo}}
|
|
179
|
+
{{#relationship}}
|
|
180
|
+
<div class="div-head-row">
|
|
181
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Relationship:</span> {{{code_code_system_string}}}</div>
|
|
182
|
+
</div>
|
|
183
|
+
{{/relationship}}
|
|
184
|
+
{{#requester}}
|
|
185
|
+
<div class="div-head-row">
|
|
186
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Requester:</span> {{{entity_string}}}</div>
|
|
187
|
+
</div>
|
|
188
|
+
{{/requester}}
|
|
80
189
|
{{#route}}
|
|
81
190
|
<div class="div-head-row">
|
|
82
191
|
<div class="div-table-head--no-border"><span class="criteria-heading">Route:</span> {{{code_code_system_string}}}</div>
|
|
83
192
|
</div>
|
|
84
193
|
{{/route}}
|
|
194
|
+
{{#sender}}
|
|
195
|
+
<div class="div-head-row">
|
|
196
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Sender:</span> {{{entity_string}}}</div>
|
|
197
|
+
</div>
|
|
198
|
+
{{/sender}}
|
|
199
|
+
{{#setting}}
|
|
200
|
+
<div class="div-head-row">
|
|
201
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Setting:</span> {{{code_code_system_string}}}</div>
|
|
202
|
+
</div>
|
|
203
|
+
{{/setting}}
|
|
85
204
|
{{#severity}}
|
|
86
205
|
<div class="div-head-row">
|
|
87
206
|
<div class="div-table-head--no-border"><span class="criteria-heading">Severity:</span> {{{code_code_system_string}}}</div>
|
|
88
207
|
</div>
|
|
89
208
|
{{/severity}}
|
|
209
|
+
{{#supply}}
|
|
210
|
+
<div class="div-head-row">
|
|
211
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Supply:</span> {{{unit_string}}}</div>
|
|
212
|
+
</div>
|
|
213
|
+
{{/supply}}
|
|
90
214
|
{{#status}}
|
|
91
215
|
<div class="div-head-row">
|
|
92
216
|
<div class="div-table-head--no-border"><span class="criteria-heading">Status:</span> {{{code_code_system_string}}}</div>
|
|
@@ -103,4 +227,4 @@
|
|
|
103
227
|
</div>
|
|
104
228
|
{{/result}}
|
|
105
229
|
</div>
|
|
106
|
-
</div>
|
|
230
|
+
</div>
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
{{/end_time?}}
|
|
12
12
|
{{/relevantPeriod}}
|
|
13
|
+
{{#relevantDatetime}}
|
|
14
|
+
<div class="div-head-row">
|
|
15
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Relevant Date/Time:</span> {{{relevantDatetime}}}</div>
|
|
16
|
+
</div>
|
|
17
|
+
{{/relevantDatetime}}
|
|
13
18
|
{{#prevalencePeriod}}
|
|
14
19
|
<div class="div-head-row">
|
|
15
20
|
<div class="div-table-head--no-border"><span class="criteria-heading">Prevalence Period Start:</span> {{{low}}}</div>
|
|
@@ -20,6 +25,16 @@
|
|
|
20
25
|
</div>
|
|
21
26
|
{{/end_time?}}
|
|
22
27
|
{{/prevalencePeriod}}
|
|
28
|
+
{{#participationPeriod}}
|
|
29
|
+
<div class="div-head-row">
|
|
30
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Participation Period Start:</span> {{{low}}}</div>
|
|
31
|
+
</div>
|
|
32
|
+
{{#end_time?}}
|
|
33
|
+
<div class="div-head-row">
|
|
34
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Participation Period End:</span> {{{high}}}</div>
|
|
35
|
+
</div>
|
|
36
|
+
{{/end_time?}}
|
|
37
|
+
{{/participationPeriod}}
|
|
23
38
|
{{#authorDatetime}}
|
|
24
39
|
<div class="div-head-row">
|
|
25
40
|
<div class="div-table-head--no-border"><span class="criteria-heading">Author Date/Time:</span> {{{authorDatetime}}}</div>
|
|
@@ -40,5 +55,25 @@
|
|
|
40
55
|
<div class="div-table-head--no-border"><span class="criteria-heading">Incision Date/Time:</span> {{{incisionDatetime}}}</div>
|
|
41
56
|
</div>
|
|
42
57
|
{{/incisionDatetime}}
|
|
58
|
+
{{#receivedDatetime}}
|
|
59
|
+
<div class="div-head-row">
|
|
60
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Received Date/Time:</span> {{{receivedDatetime}}}</div>
|
|
61
|
+
</div>
|
|
62
|
+
{{/receivedDatetime}}
|
|
63
|
+
{{#sentDatetime}}
|
|
64
|
+
<div class="div-head-row">
|
|
65
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Sent Date/Time:</span> {{{sentDatetime}}}</div>
|
|
66
|
+
</div>
|
|
67
|
+
{{/sentDatetime}}
|
|
68
|
+
{{#birthDatetime}}
|
|
69
|
+
<div class="div-head-row">
|
|
70
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Birth Date/Time:</span> {{{birthDatetime}}}</div>
|
|
71
|
+
</div>
|
|
72
|
+
{{/birthDatetime}}
|
|
73
|
+
{{#expiredDatetime}}
|
|
74
|
+
<div class="div-head-row">
|
|
75
|
+
<div class="div-table-head--no-border"><span class="criteria-heading">Expired Date/Time:</span> {{{expiredDatetime}}}</div>
|
|
76
|
+
</div>
|
|
77
|
+
{{/expiredDatetime}}
|
|
78
|
+
</div>
|
|
43
79
|
</div>
|
|
44
|
-
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require 'mustache'
|
|
2
2
|
class QdmPatient < Mustache
|
|
3
3
|
include Qrda::Export::Helper::PatientViewHelper
|
|
4
|
+
include HQMF::Util::EntityHelper
|
|
4
5
|
|
|
5
6
|
self.template_path = __dir__
|
|
6
7
|
|
|
@@ -17,17 +18,50 @@ class QdmPatient < Mustache
|
|
|
17
18
|
def data_elements
|
|
18
19
|
de_hash = {}
|
|
19
20
|
@qdmPatient.dataElements.each do |data_element|
|
|
21
|
+
data_element['methodCode'] = data_element['method'] if data_element['method']
|
|
20
22
|
de_hash[data_element._type] ? de_hash[data_element._type][:element_list] << data_element : de_hash[data_element._type] = { title: data_element._type, element_list: [data_element] }
|
|
21
23
|
end
|
|
22
24
|
JSON.parse(de_hash.values.to_json)
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
def unit_string
|
|
28
|
+
return "#{self['value']} " unless self['unit']
|
|
26
29
|
"#{self['value']} #{self['unit']}"
|
|
27
30
|
end
|
|
28
31
|
|
|
32
|
+
def entity_string
|
|
33
|
+
if care_partner_entity?
|
|
34
|
+
"</br> Care Partner: #{identifier_for_element(self['identifier'])}
|
|
35
|
+
</br> Care Partner Relationship: #{code_for_element(self['relationship'])}"
|
|
36
|
+
elsif organization_entity?
|
|
37
|
+
"</br> Organization: #{identifier_for_element(self['identifier'])}
|
|
38
|
+
</br> Organization Type: #{code_for_element(self['type'])}"
|
|
39
|
+
elsif patient_entity?
|
|
40
|
+
"</br> Patient: #{identifier_for_element(self['identifier'])}"
|
|
41
|
+
elsif practitioner_entity?
|
|
42
|
+
"</br> Practitioner: #{identifier_for_element(self['identifier'])}
|
|
43
|
+
</br> Practitioner Role: #{code_for_element(self['role'])},
|
|
44
|
+
</br> Practitioner Specialty: #{code_for_element(self['specialty'])},
|
|
45
|
+
</br> Practitioner Qualification: #{code_for_element(self['qualification'])}"
|
|
46
|
+
else
|
|
47
|
+
"</br> Entity: #{identifier_for_element(self['identifier'])}"
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def identifier_string
|
|
52
|
+
identifier_for_element(self)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def identifier_for_element(identifier)
|
|
56
|
+
"#{identifier['value']} (#{identifier['namingSystem']})"
|
|
57
|
+
end
|
|
58
|
+
|
|
29
59
|
def code_code_system_string
|
|
30
|
-
|
|
60
|
+
code_for_element(self)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def code_for_element(element)
|
|
64
|
+
"#{element['code']} (#{HQMF::Util::CodeSystemHelper.code_system_for(element['system'])})"
|
|
31
65
|
end
|
|
32
66
|
|
|
33
67
|
def code_system_name
|
|
@@ -35,14 +69,14 @@ class QdmPatient < Mustache
|
|
|
35
69
|
end
|
|
36
70
|
|
|
37
71
|
def result_string
|
|
38
|
-
return unit_string if self['
|
|
72
|
+
return unit_string if self['value']
|
|
39
73
|
return code_code_system_string if self['code']
|
|
40
74
|
|
|
41
|
-
''
|
|
75
|
+
self['result']
|
|
42
76
|
end
|
|
43
77
|
|
|
44
|
-
def
|
|
45
|
-
|
|
78
|
+
def nested_code_string
|
|
79
|
+
code_for_element(self['code'])
|
|
46
80
|
end
|
|
47
81
|
|
|
48
82
|
def end_time?
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<!-- QRDA templateId -->
|
|
7
7
|
<templateId root="2.16.840.1.113883.10.20.24.1.1" extension="2017-08-01"/>
|
|
8
8
|
<!-- QDM-based QRDA templateId -->
|
|
9
|
-
<templateId root="2.16.840.1.113883.10.20.24.1.2" extension="
|
|
9
|
+
<templateId root="2.16.840.1.113883.10.20.24.1.2" extension="2019-12-01"/>
|
|
10
10
|
<!-- CMS QRDA templateId -->
|
|
11
|
-
<templateId root="2.16.840.1.113883.10.20.24.1.3" extension="
|
|
11
|
+
<templateId root="2.16.840.1.113883.10.20.24.1.3" extension="2020-02-01"/>
|
|
12
12
|
<!-- This is the globally unique identifier for this QRDA document -->
|
|
13
13
|
<id root="{{random_id}}"/>
|
|
14
14
|
<!-- QRDA document type code -->
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<!-- This is the templateId for Patient Data section -->
|
|
13
13
|
<templateId root="2.16.840.1.113883.10.20.17.2.4"/>
|
|
14
14
|
<!-- This is the templateId for Patient Data QDM section -->
|
|
15
|
-
<templateId extension="
|
|
16
|
-
<templateId extension="
|
|
15
|
+
<templateId extension="2019-12-01" root="2.16.840.1.113883.10.20.24.2.1"/>
|
|
16
|
+
<templateId extension="2020-02-01" root="2.16.840.1.113883.10.20.24.2.1.1"/>
|
|
17
17
|
<code code="55188-7" codeSystem="2.16.840.1.113883.6.1"/>
|
|
18
18
|
<title>Patient Data</title>
|
|
19
19
|
<text/>
|
|
@@ -174,10 +174,18 @@
|
|
|
174
174
|
{{> qrda_templates/procedure_recommended}}
|
|
175
175
|
{{/procedure_recommended}}
|
|
176
176
|
|
|
177
|
+
{{#program_participation}}
|
|
178
|
+
{{> qrda_templates/program_participation}}
|
|
179
|
+
{{/program_participation}}
|
|
180
|
+
|
|
177
181
|
{{#provider_care_experience}}
|
|
178
182
|
{{> qrda_templates/provider_care_experience}}
|
|
179
183
|
{{/provider_care_experience}}
|
|
180
184
|
|
|
185
|
+
{{#related_person}}
|
|
186
|
+
{{> qrda_templates/related_person}}
|
|
187
|
+
{{/related_person}}
|
|
188
|
+
|
|
181
189
|
{{#substance_administered}}
|
|
182
190
|
{{> qrda_templates/medication_administered}}
|
|
183
191
|
{{/substance_administered}}
|