cqm-reports 3.0.0.pre.alpha.2 → 3.1.2
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 +4 -4
- data/Gemfile +1 -1
- data/README.md +27 -0
- data/lib/cqm-reports.rb +3 -3
- 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.mustache +9 -7
- data/lib/html-export/qdm-patient/qdm_patient.rb +69 -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 +25 -10
- 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 +8 -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 +8 -5
- data/lib/qrda-export/catI-r5/qrda_templates/device_order.mustache +8 -3
- 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 +8 -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 -3
- 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 +8 -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 +8 -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 -3
- data/lib/qrda-export/catI-r5/qrda_templates/medication_dispensed.mustache +30 -17
- 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 +8 -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 +12 -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 +10 -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/_reason.mustache +0 -1
- 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/catIII-r2-1/_header.mustache +1 -1
- data/lib/qrda-export/helper/cat1_view_helper.rb +2 -0
- data/lib/qrda-export/helper/date_helper.rb +25 -6
- data/lib/qrda-export/helper/patient_view_helper.rb +39 -0
- data/lib/qrda-import/base-importers/demographics_importer.rb +3 -3
- data/lib/qrda-import/base-importers/section_importer.rb +89 -14
- 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 +3 -1
- 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 +2 -1
- 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 +3 -1
- data/lib/qrda-import/data-element-importers/medication_dispensed_importer.rb +4 -5
- 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 +86 -68
- data/lib/util/entity_helper.rb +22 -0
- metadata +35 -13
- 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
- data/lib/qrda-import/entry_package.rb +0 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d999a13b64a6a37c2ad61c53c5325162a31eb948e95556a421474eb22cca735
|
|
4
|
+
data.tar.gz: f4d69a6e256859b77ea3da62a332f48e358ca4a3589d1d08bbf57889b6977f20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99e4bb97fe1ecbcb0a4f336b0e2e6d0f5d6d85dd05f539a4ea71ad28fbb091b9cf78c2c23605f0e1344c736b4fdc38e0cda8bc12efb2ca52f4f393f158f979c6
|
|
7
|
+
data.tar.gz: 5c0b2e94fa51e623b071aecfc34537bc16efed7069d1bac433b178491462679fde863b24b6ee7cce9191b27e320d24fdfa004b0077f6e5be8492524f23cc89e5
|
data/Gemfile
CHANGED
|
@@ -17,6 +17,7 @@ group :development do
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
group :test do
|
|
20
|
+
gem 'cqm-models', '~> 3.0.3'
|
|
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,5 @@ 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
30
|
gem 'nokogiri-diff'
|
|
31
31
|
end
|
data/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Starting with version **2.0.0** released on 6/20/2019, cqm-reports versioning ha
|
|
|
11
11
|
| X | QRDA Cat 1 | QRDA Cat 3 |
|
|
12
12
|
| --- | --- | --- |
|
|
13
13
|
| 2 | R1 STU5.1 | R1 STU2.1 |
|
|
14
|
+
| 3 | R1 STU5.2 | R1 STU2.1 |
|
|
14
15
|
|
|
15
16
|
* **Y** indicates major changes (incompatible API changes)
|
|
16
17
|
|
|
@@ -18,6 +19,32 @@ Starting with version **2.0.0** released on 6/20/2019, cqm-reports versioning ha
|
|
|
18
19
|
|
|
19
20
|
For the versions available, see [tags on this repository](https://github.com/projecttacoma/cqm-validators/tags).
|
|
20
21
|
|
|
22
|
+
Importing QRDA
|
|
23
|
+
==========
|
|
24
|
+
|
|
25
|
+
A QRDA document can be imported into a CQM::Patient (defined in [cqm-models](https://github.com/projecttacoma/cqm-models)) using the following commands.
|
|
26
|
+
|
|
27
|
+
doc = Nokogiri::XML(file)
|
|
28
|
+
patient, warnings = QRDA::Cat1::PatientImporter.instance.parse_cat1(doc)
|
|
29
|
+
|
|
30
|
+
Exporting QRDA Category I
|
|
31
|
+
==========
|
|
32
|
+
|
|
33
|
+
Exporting a QRDA document from a CQM::Patient (defined in [cqm-models](https://github.com/projecttacoma/cqm-models)) using the following command.
|
|
34
|
+
|
|
35
|
+
Qrda1R5.new(patient, measures, options).render
|
|
36
|
+
* patient is a [CQM::Patient](https://github.com/projecttacoma/cqm-models/blob/master/app/models/cqm/patient.rb)
|
|
37
|
+
* measures is an array of [CQM::Measure](https://github.com/projecttacoma/cqm-models/blob/master/app/models/cqm/measure.rb)
|
|
38
|
+
* options is a hash that can be used to pass in:
|
|
39
|
+
* provider
|
|
40
|
+
* patient_addresses
|
|
41
|
+
* patient_telecoms
|
|
42
|
+
* start_time
|
|
43
|
+
* end_time
|
|
44
|
+
* submission_program
|
|
45
|
+
|
|
46
|
+
QRDA export requires the [mustache](https://github.com/mustache/mustache) gem
|
|
47
|
+
|
|
21
48
|
## License
|
|
22
49
|
|
|
23
50
|
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'
|
|
@@ -18,7 +19,6 @@ require_relative 'html-export/qdm-patient/qdm_patient.rb'
|
|
|
18
19
|
require_relative 'qrda-export/catI-r5/qrda1_r5.rb'
|
|
19
20
|
require_relative 'qrda-export/catIII-r2-1/qrda3_r21.rb'
|
|
20
21
|
|
|
21
|
-
require_relative 'qrda-import/entry_package.rb'
|
|
22
22
|
require_relative 'qrda-import/cda_identifier.rb'
|
|
23
23
|
require_relative 'qrda-import/narrative_reference_handler.rb'
|
|
24
24
|
require_relative 'qrda-import/entry_finder.rb'
|
|
@@ -66,11 +66,11 @@ require_relative 'qrda-import/data-element-importers/physical_exam_recommended_i
|
|
|
66
66
|
require_relative 'qrda-import/data-element-importers/procedure_order_importer.rb'
|
|
67
67
|
require_relative 'qrda-import/data-element-importers/procedure_performed_importer.rb'
|
|
68
68
|
require_relative 'qrda-import/data-element-importers/procedure_recommended_importer.rb'
|
|
69
|
+
require_relative 'qrda-import/data-element-importers/program_participation_importer.rb'
|
|
69
70
|
require_relative 'qrda-import/data-element-importers/provider_care_experience_importer.rb'
|
|
71
|
+
require_relative 'qrda-import/data-element-importers/related_person_importer.rb'
|
|
70
72
|
require_relative 'qrda-import/data-element-importers/substance_administered_importer.rb'
|
|
71
73
|
require_relative 'qrda-import/data-element-importers/substance_order_importer.rb'
|
|
72
74
|
require_relative 'qrda-import/data-element-importers/substance_recommended_importer.rb'
|
|
73
75
|
require_relative 'qrda-import/data-element-importers/symptom_importer.rb'
|
|
74
76
|
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>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
5
5
|
{{#patient}}
|
|
6
|
-
<title>Cypress Certification Patient Test Record: {{
|
|
6
|
+
<title>Cypress Certification Patient Test Record: {{given_name}} {{familyName}}</title>
|
|
7
7
|
{{/patient}}
|
|
8
8
|
{{#include_style?}}
|
|
9
9
|
{{> _header_css}}
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
{{#patient}}
|
|
14
|
-
<h1 class="h1center">Cypress Certification Patient Test Record: {{
|
|
14
|
+
<h1 class="h1center">Cypress Certification Patient Test Record: {{given_name}} {{familyName}}</h1>
|
|
15
15
|
<div class="div-table">
|
|
16
16
|
<div class="div-table-body">
|
|
17
17
|
<div class="div-head-row patient_narr_tr panel panel-default patient-details">
|
|
18
18
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Patient</span></div>
|
|
19
|
-
<div class="div-table-head">{{
|
|
19
|
+
<div class="div-table-head">{{given_name}} {{familyName}}</div>
|
|
20
20
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Sex</span></div>
|
|
21
21
|
<div class="div-table-head">{{{gender}}}</div>
|
|
22
22
|
</div>
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Date of birth</span></div>
|
|
25
25
|
<div class="div-table-head">{{{birthdate}}}</div>
|
|
26
26
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Date of expiration</span></div>
|
|
27
|
-
<div class="div-table-head"
|
|
27
|
+
<div class="div-table-head">{{{expiration}}}</div>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="div-head-row patient_narr_tr panel panel-default patient-details">
|
|
30
30
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Race</span></div>
|
|
31
31
|
<div class="div-table-head">{{{race}}}</div>
|
|
32
32
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Ethnicity</span></div>
|
|
33
33
|
<div class="div-table-head">{{{ethnic_group}}}</div>
|
|
34
|
-
</div>
|
|
34
|
+
</div>
|
|
35
35
|
<div class="div-head-row patient_narr_tr panel panel-default patient-details">
|
|
36
36
|
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Insurance Providers</span></div>
|
|
37
37
|
<div class="div-table-head">{{{payer}}}</div>
|
|
@@ -39,8 +39,10 @@
|
|
|
39
39
|
<div class="div-table-head">{{{mrn}}} Cypress</div>
|
|
40
40
|
</div>
|
|
41
41
|
<div class="div-head-row patient_narr_tr panel panel-default patient-details">
|
|
42
|
-
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">
|
|
43
|
-
<div class="div-table-head"
|
|
42
|
+
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Address</span></div>
|
|
43
|
+
<div class="div-table-head">{{{patient_addresses}}}</div>
|
|
44
|
+
<div class="div-table-head patient_narr_th panel-heading"><span class="td_label">Telecom</span></div>
|
|
45
|
+
<div class="div-table-head">{{{patient_telecoms}}}</div>
|
|
44
46
|
</div>
|
|
45
47
|
</div>
|
|
46
48
|
</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
|
|
|
@@ -8,6 +9,36 @@ class QdmPatient < Mustache
|
|
|
8
9
|
@include_style = include_style
|
|
9
10
|
@patient = patient
|
|
10
11
|
@qdmPatient = patient.qdmPatient
|
|
12
|
+
@patient_addresses = patient['addresses']
|
|
13
|
+
@patient_telecoms = patient['telecoms']
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def patient_addresses
|
|
17
|
+
@patient_addresses ||= [CQM::Address.new(
|
|
18
|
+
use: 'HP',
|
|
19
|
+
street: ['202 Burlington Rd.'],
|
|
20
|
+
city: 'Bedford',
|
|
21
|
+
state: 'MA',
|
|
22
|
+
zip: '01730',
|
|
23
|
+
country: 'US'
|
|
24
|
+
)]
|
|
25
|
+
address_str = ""
|
|
26
|
+
@patient_addresses.each do |address|
|
|
27
|
+
# create formatted address
|
|
28
|
+
address_str += "<address>"
|
|
29
|
+
address['street'].each { |street| address_str += "#{street}<br>" }
|
|
30
|
+
address_str += "#{address['city']}, #{address['state']} #{address['zip']}<br> #{address['country']} </address>"
|
|
31
|
+
end
|
|
32
|
+
address_str
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def patient_telecoms
|
|
36
|
+
@patient_telecoms ||= [CQM::Telecom.new(
|
|
37
|
+
use: 'HP',
|
|
38
|
+
value: '555-555-2003'
|
|
39
|
+
)]
|
|
40
|
+
# create formatted telecoms
|
|
41
|
+
@patient_telecoms.map { |telecom| "(#{telecom['use']}) #{telecom['value']}" }.join("<br>")
|
|
11
42
|
end
|
|
12
43
|
|
|
13
44
|
def include_style?
|
|
@@ -17,17 +48,50 @@ class QdmPatient < Mustache
|
|
|
17
48
|
def data_elements
|
|
18
49
|
de_hash = {}
|
|
19
50
|
@qdmPatient.dataElements.each do |data_element|
|
|
51
|
+
data_element['methodCode'] = data_element['method'] if data_element['method']
|
|
20
52
|
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
53
|
end
|
|
22
54
|
JSON.parse(de_hash.values.to_json)
|
|
23
55
|
end
|
|
24
56
|
|
|
25
57
|
def unit_string
|
|
58
|
+
return "#{self['value']} " if !self['unit'] || self['unit'] == '1'
|
|
26
59
|
"#{self['value']} #{self['unit']}"
|
|
27
60
|
end
|
|
28
61
|
|
|
62
|
+
def entity_string
|
|
63
|
+
if care_partner_entity?
|
|
64
|
+
"</br> Care Partner: #{identifier_for_element(self['identifier'])}
|
|
65
|
+
</br> Care Partner Relationship: #{code_for_element(self['relationship'])}"
|
|
66
|
+
elsif organization_entity?
|
|
67
|
+
"</br> Organization: #{identifier_for_element(self['identifier'])}
|
|
68
|
+
</br> Organization Type: #{code_for_element(self['type'])}"
|
|
69
|
+
elsif patient_entity?
|
|
70
|
+
"</br> Patient: #{identifier_for_element(self['identifier'])}"
|
|
71
|
+
elsif practitioner_entity?
|
|
72
|
+
"</br> Practitioner: #{identifier_for_element(self['identifier'])}
|
|
73
|
+
</br> Practitioner Role: #{code_for_element(self['role'])},
|
|
74
|
+
</br> Practitioner Specialty: #{code_for_element(self['specialty'])},
|
|
75
|
+
</br> Practitioner Qualification: #{code_for_element(self['qualification'])}"
|
|
76
|
+
else
|
|
77
|
+
"</br> Entity: #{identifier_for_element(self['identifier'])}"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def identifier_string
|
|
82
|
+
identifier_for_element(self)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def identifier_for_element(identifier)
|
|
86
|
+
"#{identifier['value']} (#{identifier['namingSystem']})"
|
|
87
|
+
end
|
|
88
|
+
|
|
29
89
|
def code_code_system_string
|
|
30
|
-
|
|
90
|
+
code_for_element(self)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def code_for_element(element)
|
|
94
|
+
"#{element['code']} (#{HQMF::Util::CodeSystemHelper.code_system_for(element['system'])})"
|
|
31
95
|
end
|
|
32
96
|
|
|
33
97
|
def code_system_name
|
|
@@ -35,14 +99,14 @@ class QdmPatient < Mustache
|
|
|
35
99
|
end
|
|
36
100
|
|
|
37
101
|
def result_string
|
|
38
|
-
return unit_string if self['
|
|
102
|
+
return unit_string if self['value']
|
|
39
103
|
return code_code_system_string if self['code']
|
|
40
104
|
|
|
41
|
-
''
|
|
105
|
+
self['result']
|
|
42
106
|
end
|
|
43
107
|
|
|
44
|
-
def
|
|
45
|
-
|
|
108
|
+
def nested_code_string
|
|
109
|
+
code_for_element(self['code'])
|
|
46
110
|
end
|
|
47
111
|
|
|
48
112
|
def end_time?
|