health-data-standards 3.6.1 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -2
- data/Rakefile +2 -1
- data/lib/health-data-standards.rb +22 -1
- data/lib/health-data-standards/export/cat_1.rb +25 -6
- data/lib/health-data-standards/export/cat_1_r2.rb +8 -2
- data/lib/health-data-standards/export/cat_3.rb +8 -7
- data/lib/health-data-standards/export/exceptions.rb +13 -0
- data/lib/health-data-standards/export/helper/cat1_view_helper.rb +17 -11
- data/lib/health-data-standards/export/helper/html_view_helper.rb +13 -7
- data/lib/health-data-standards/export/helper/scooped_view_helper.rb +68 -25
- data/lib/health-data-standards/export/html.rb +9 -4
- data/lib/health-data-standards/export/qrda/entry_template_resolver.rb +29 -11
- data/lib/health-data-standards/export/qrda/hqmf-qrda-oids.json +89 -5
- data/lib/health-data-standards/export/rendering_context.rb +2 -2
- data/lib/health-data-standards/export/template_helper.rb +7 -2
- data/lib/health-data-standards/export/view_helper.rb +107 -39
- data/lib/health-data-standards/import/bulk_record_importer.rb +8 -5
- data/lib/health-data-standards/import/bundle/importer.rb +21 -14
- data/lib/health-data-standards/import/c32/care_goal_importer.rb +1 -1
- data/lib/health-data-standards/import/c32/immunization_importer.rb +1 -1
- data/lib/health-data-standards/import/cat1/clinical_trial_participant_importer.rb +20 -0
- data/lib/health-data-standards/import/cat1/device_order_importer.rb +20 -0
- data/lib/health-data-standards/import/cat1/diagnosis_active_importer.rb +4 -9
- data/lib/health-data-standards/import/cat1/diagnosis_importer.rb +15 -0
- data/lib/health-data-standards/import/cat1/diagnosis_inactive_importer.rb +1 -1
- data/lib/health-data-standards/import/cat1/diagnostic_study_order_importer.rb +6 -0
- data/lib/health-data-standards/import/cat1/encounter_order_act_importer.rb +19 -0
- data/lib/health-data-standards/import/cat1/encounter_performed_act_importer.rb +19 -0
- data/lib/health-data-standards/import/cat1/encounter_performed_importer.rb +16 -0
- data/lib/health-data-standards/import/cat1/immunization_administered_importer.rb +14 -0
- data/lib/health-data-standards/import/cat1/medication_dispensed_act_importer.rb +18 -0
- data/lib/health-data-standards/import/cat1/patient_importer.rb +44 -17
- data/lib/health-data-standards/import/cat1/procedure_order_importer.rb +4 -4
- data/lib/health-data-standards/import/cat1/procedure_performed_importer.rb +1 -0
- data/lib/health-data-standards/import/cat1/transfer_from_act_importer.rb +18 -0
- data/lib/health-data-standards/import/cat1/transfer_from_importer.rb +24 -0
- data/lib/health-data-standards/import/cat1/transfer_to_act_importer.rb +18 -0
- data/lib/health-data-standards/import/cat1/transfer_to_importer.rb +23 -0
- data/lib/health-data-standards/import/cda/allergy_importer.rb +1 -1
- data/lib/health-data-standards/import/cda/communication_importer.rb +55 -0
- data/lib/health-data-standards/import/cda/condition_importer.rb +17 -1
- data/lib/health-data-standards/import/cda/encounter_importer.rb +23 -21
- data/lib/health-data-standards/import/cda/medical_equipment_importer.rb +1 -0
- data/lib/health-data-standards/import/cda/medication_importer.rb +14 -4
- data/lib/health-data-standards/import/cda/procedure_importer.rb +4 -4
- data/lib/health-data-standards/import/cda/result_importer.rb +1 -1
- data/lib/health-data-standards/import/cda/section_importer.rb +59 -18
- data/lib/health-data-standards/models/assessment.rb +3 -0
- data/lib/health-data-standards/models/care_experience.rb +2 -0
- data/lib/health-data-standards/models/care_goal.rb +4 -0
- data/lib/health-data-standards/models/communication.rb +3 -0
- data/lib/health-data-standards/models/condition.rb +12 -9
- data/lib/health-data-standards/models/cqm/bundle.rb +2 -1
- data/lib/health-data-standards/models/cqm/measure.rb +2 -1
- data/lib/health-data-standards/models/cqm/patient_cache.rb +7 -3
- data/lib/health-data-standards/models/cqm/query_cache.rb +2 -0
- data/lib/health-data-standards/models/encounter.rb +14 -1
- data/lib/health-data-standards/models/encounter_principal_diagnosis.rb +36 -0
- data/lib/health-data-standards/models/entry.rb +5 -1
- data/lib/health-data-standards/models/family_history.rb +4 -0
- data/lib/health-data-standards/models/immunization.rb +1 -0
- data/lib/health-data-standards/models/lab_result.rb +10 -1
- data/lib/health-data-standards/models/medical_equipment.rb +2 -1
- data/lib/health-data-standards/models/medication.rb +19 -2
- data/lib/health-data-standards/models/patient_preference.rb +5 -0
- data/lib/health-data-standards/models/procedure.rb +16 -3
- data/lib/health-data-standards/models/provider.rb +17 -1
- data/lib/health-data-standards/models/provider_preference.rb +5 -0
- data/lib/health-data-standards/models/record.rb +8 -9
- data/lib/health-data-standards/models/reference.rb +1 -1
- data/lib/health-data-standards/models/svs/value_set.rb +28 -10
- data/lib/health-data-standards/models/transfer.rb +6 -1
- data/lib/health-data-standards/tasks/bundle.rake +5 -3
- data/lib/health-data-standards/util/hqmf_template_helper.rb +20 -14
- data/lib/health-data-standards/util/hqmfr2_template_oid_map.json +382 -0
- data/lib/health-data-standards/util/nlm_helper.rb +14 -0
- data/lib/health-data-standards/util/vs_api.rb +72 -54
- data/lib/health-data-standards/validate/measure_validator.rb +8 -3
- data/lib/health-data-standards/validate/performance_rate_validator.rb +1 -1
- data/lib/health-data-standards/validate/qrda_qdm_template_validator.rb +253 -0
- data/lib/health-data-standards/validate/reported_result_extractor.rb +5 -1
- data/lib/health-data-standards/validate/schematron_validator.rb +6 -0
- data/lib/health-data-standards/validate/validators.rb +49 -1
- data/lib/hqmf-generator/document.xml.erb +6 -5
- data/lib/hqmf-generator/field.xml.erb +1 -0
- data/lib/hqmf-generator/hqmf-generator.rb +85 -41
- data/lib/hqmf-generator/subset.xml.erb +15 -0
- data/lib/hqmf-generator/temporal_relationship.xml.erb +8 -3
- data/lib/hqmf-generator/temporal_relationship_attribute.xml.erb +10 -0
- data/lib/hqmf-generator/value.xml.erb +2 -2
- data/lib/hqmf-model/data_criteria.json +88 -17
- data/lib/hqmf-model/data_criteria.rb +144 -72
- data/lib/hqmf-model/population_criteria.rb +20 -18
- data/lib/hqmf-model/precondition.rb +6 -3
- data/lib/hqmf-model/types.rb +1 -1
- data/lib/hqmf-parser.rb +9 -0
- data/lib/hqmf-parser/1.0/utilities.rb +1 -1
- data/lib/hqmf-parser/2.0/data_criteria.rb +293 -319
- data/lib/hqmf-parser/2.0/data_criteria_helpers/dc_base_extract.rb +80 -0
- data/lib/hqmf-parser/2.0/data_criteria_helpers/dc_definition_from_template_or_type_extract.rb +201 -0
- data/lib/hqmf-parser/2.0/data_criteria_helpers/dc_post_processing.rb +85 -0
- data/lib/hqmf-parser/2.0/data_criteria_helpers/dc_specific_occurrences_and_source_data_criteria_extract.rb +117 -0
- data/lib/hqmf-parser/2.0/document.rb +246 -222
- data/lib/hqmf-parser/2.0/document_helpers/doc_population_helper.rb +175 -0
- data/lib/hqmf-parser/2.0/document_helpers/doc_utilities.rb +131 -0
- data/lib/hqmf-parser/2.0/field_value_helper.rb +251 -0
- data/lib/hqmf-parser/2.0/population_criteria.rb +101 -32
- data/lib/hqmf-parser/2.0/precondition.rb +61 -35
- data/lib/hqmf-parser/2.0/source_data_criteria_helper.rb +112 -0
- data/lib/hqmf-parser/2.0/types.rb +253 -73
- data/lib/hqmf-parser/2.0/utilities.rb +27 -12
- data/lib/hqmf-parser/2.0/value_set_helper.rb +101 -0
- data/lib/hqmf-parser/converter/pass1/data_criteria_converter.rb +6 -1
- data/lib/hqmf-parser/converter/pass1/population_criteria_converter.rb +34 -30
- data/lib/hqmf-parser/parser.rb +5 -5
- data/resources/schematron/qrda/cat_1/{CDAR2_QRDA_I_R1_D3_2015MAY_Schematron.sch → HL7_CDAR2_QRDA_Category_I_2_12_16.sch} +4692 -4675
- data/resources/schematron/qrda/cat_1_r3_1/HL7 QRDA Category I STU 3.1.sch +3573 -0
- data/resources/schematron/qrda/cat_1_r3_1/HL7 QRDA Category III STU 1.1.sch +464 -0
- data/resources/schematron/qrda/cat_1_r3_1/QRDA Category I STU Release 3.1.sch +5394 -0
- data/resources/schematron/qrda/cat_1_r3_1/voc.xml +1229 -0
- data/resources/schematron/qrda/cat_1_r4/HL7 QRDA Category I STU 4.sch +3526 -0
- data/resources/schematron/qrda/cat_1_r4/voc.xml +1186 -0
- data/resources/schematron/qrda/cat_3_r1_1/HL7 QRDA Category III STU 1.1.sch +528 -0
- data/resources/schematron/qrda/cat_3_r1_1/voc.xml +8 -0
- data/resources/schematron/qrda/cat_3_r2/HL7 QRDA Category III STU 2.sch +677 -0
- data/resources/schematron/qrda/cat_3_r2/voc.xml +1186 -0
- data/resources/schematron/qrda/cat_3_r2_1/HL7 QRDA Category III STU 2.1.sch +678 -0
- data/resources/schematron/qrda/cat_3_r2_1/voc.xml +1186 -0
- data/templates/c32/_medical_equipment.c32.erb +1 -1
- data/templates/c32/_vital_signs.c32.erb +1 -1
- data/templates/cat1/{_2.16.840.1.113883.10.20.22.4.85.cat1.erb → r2/_2.16.840.1.113883.10.20.22.4.85.cat1.erb} +1 -1
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.1.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.1.cat1.erb} +3 -3
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.101.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.101.cat1.erb} +1 -1
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.103.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.103.cat1.erb} +9 -5
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.105.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.105.cat1.erb} +18 -10
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.11.cat1.erb +88 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.12.cat1.erb +50 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.13.cat1.erb +54 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.135.cat1.erb +70 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.136.cat1.erb +52 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.14.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.14.cat1.erb} +24 -6
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.140.cat1.erb +39 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.17.cat1.erb +23 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.18.cat1.erb +25 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.2.cat1.erb +29 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.20.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.20.cat1.erb} +4 -4
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.22.cat1.erb +22 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.23.cat1.erb +114 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.26.cat1.erb +20 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.28.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.28.cat1.erb} +2 -2
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.3.cat1.erb +25 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.31.cat1.erb +23 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.32.cat1.erb +20 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.34.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.34.cat1.erb} +6 -6
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.37.cat1.erb +22 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.38.cat1.erb +20 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.4.cat1.erb +29 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.40.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.40.cat1.erb} +3 -3
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.41.cat1.erb +46 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.42.cat1.erb +38 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.43.cat1.erb +24 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.44.cat1.erb +25 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.45.cat1.erb +26 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.46.cat1.erb +30 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.47.cat1.erb +47 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.51.cat1.erb +14 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.54.cat1.erb +32 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.55.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.55.cat1.erb} +0 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.57.cat1.erb +23 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.59.cat1.erb +22 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.62.cat1.erb +36 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.63.cat1.erb +21 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.64.cat1.erb +52 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.66.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.66.cat1.erb} +6 -6
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.69.cat1.erb +23 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.7.cat1.erb +33 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.76.cat1.erb → r2/_2.16.840.1.113883.10.20.24.3.76.cat1.erb} +5 -3
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.81.cat1.erb +23 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.82.cat1.erb +23 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.24.3.9.cat1.erb +64 -0
- data/templates/cat1/r2/_2.16.840.1.113883.10.20.28.3.6.cat1.erb +17 -0
- data/templates/cat1/{_address.cat1.erb → r2/_address.cat1.erb} +0 -0
- data/templates/cat1/{_author.cat1.erb → r2/_author.cat1.erb} +0 -0
- data/templates/cat1/r2/_fulfills.cat1.erb +14 -0
- data/templates/cat1/{_id.cat1.erb → r2/_id.cat1.erb} +0 -0
- data/templates/cat1/{_measures.cat1.erb → r2/_measures.cat1.erb} +1 -1
- data/templates/cat1/{_medication_details.cat1.erb → r2/_medication_details.cat1.erb} +3 -2
- data/templates/cat1/r2/_medication_dispense.cat1.erb +22 -0
- data/templates/cat1/{_ordinality.cat1.erb → r2/_ordinality.cat1.erb} +0 -0
- data/templates/cat1/{_organization.cat1.erb → r2/_organization.cat1.erb} +0 -0
- data/templates/cat1/{_patient_data.cat1.erb → r2/_patient_data.cat1.erb} +4 -1
- data/templates/cat1/r2/_patient_data_r3_1.cat1.erb +17 -0
- data/templates/cat1/r2/_providers.cat1.erb +76 -0
- data/templates/cat1/r2/_reason.cat1.erb +45 -0
- data/templates/cat1/{_record_target.cat1.erb → r2/_record_target.cat1.erb} +3 -0
- data/templates/cat1/r2/_reporting_parameters.cat1.erb +31 -0
- data/templates/cat1/{_result_value.cat1.erb → r2/_result_value.cat1.erb} +1 -1
- data/templates/cat1/{_telecom.cat1.erb → r2/_telecom.cat1.erb} +0 -0
- data/templates/cat1/{show.cat1.erb → r2/show.cat1.erb} +52 -5
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.1.cat1.erb +14 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.103.cat1.erb +17 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.105.cat1.erb +68 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.11.cat1.erb +58 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.12.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.12.cat1.erb} +4 -5
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.13.cat1.erb +39 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.14.cat1.erb +39 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.17.cat1.erb +23 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.18.cat1.erb +25 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.2.cat1.erb +29 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.22.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.22.cat1.erb} +6 -5
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.23.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.23.cat1.erb} +26 -30
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.26.cat1.erb +20 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.3.cat1.erb +25 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.31.cat1.erb +23 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.32.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.32.cat1.erb} +4 -4
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.37.cat1.erb +22 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.38.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.38.cat1.erb} +3 -3
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.4.cat1.erb +29 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.41.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.41.cat1.erb} +8 -10
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.42.cat1.erb +38 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.43.cat1.erb +24 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.44.cat1.erb +25 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.45.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.45.cat1.erb} +5 -5
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.46.cat1.erb +30 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.47.cat1.erb +47 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.51.cat1.erb +14 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.54.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.54.cat1.erb} +4 -4
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.55.cat1.erb +18 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.57.cat1.erb +23 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.59.cat1.erb +22 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.62.cat1.erb +36 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.63.cat1.erb → r3/_2.16.840.1.113883.10.20.24.3.63.cat1.erb} +6 -8
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.64.cat1.erb +51 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.69.cat1.erb +23 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.7.cat1.erb +33 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.76.cat1.erb +19 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.81.cat1.erb +24 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.82.cat1.erb +24 -0
- data/templates/cat1/r3/_2.16.840.1.113883.10.20.24.3.9.cat1.erb +57 -0
- data/templates/cat1/r3/_address.cat1.erb +9 -0
- data/templates/{cat3/_author.cat3.erb → cat1/r3/_author.cat1.erb} +0 -0
- data/templates/cat1/{_fulfills.cat1.erb → r3/_fulfills.cat1.erb} +0 -0
- data/templates/{cat3/_id.cat3.erb → cat1/r3/_id.cat1.erb} +0 -0
- data/templates/cat1/r3/_measures.cat1.erb +93 -0
- data/templates/cat1/r3/_medication_details.cat1.erb +16 -0
- data/templates/cat1/{_medication_dispense.cat1.erb → r3/_medication_dispense.cat1.erb} +3 -3
- data/templates/cat1/r3/_ordinality.cat1.erb +10 -0
- data/templates/cat1/r3/_organization.cat1.erb +9 -0
- data/templates/cat1/r3/_patient_data.cat1.erb +17 -0
- data/templates/cat1/r3/_providers.cat1.erb +76 -0
- data/templates/cat1/r3/_reason.cat1.erb +34 -0
- data/templates/cat1/r3/_record_target.cat1.erb +56 -0
- data/templates/cat1/r3/_reporting_parameters.cat1.erb +31 -0
- data/templates/cat1/r3/_result_value.cat1.erb +28 -0
- data/templates/{cat3/_telecom.cat3.erb → cat1/r3/_telecom.cat1.erb} +0 -0
- data/templates/cat1/r3/show.cat1.erb +183 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.1.cat1.erb +14 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.103.cat1.erb +17 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.105.cat1.erb +68 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.12.cat1.erb +53 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.135.cat1.erb +71 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.136.cat1.erb +52 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.140.cat1.erb +39 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.17.cat1.erb +23 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.18.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.18.cat1.erb} +3 -3
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.2.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.2.cat1.erb} +2 -2
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.22.cat1.erb +30 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.23.cat1.erb +116 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.26.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.26.cat1.erb} +4 -2
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.3.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.3.cat1.erb} +2 -2
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.31.cat1.erb +24 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.32.cat1.erb +21 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.37.cat1.erb +22 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.38.cat1.erb +21 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.4.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.4.cat1.erb} +2 -2
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.41.cat1.erb +45 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.42.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.42.cat1.erb} +4 -4
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.43.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.43.cat1.erb} +3 -3
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.44.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.44.cat1.erb} +3 -3
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.45.cat1.erb +35 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.46.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.46.cat1.erb} +4 -4
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.47.cat1.erb +47 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.51.cat1.erb +14 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.54.cat1.erb +32 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.55.cat1.erb +18 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.57.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.57.cat1.erb} +3 -3
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.59.cat1.erb +22 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.62.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.62.cat1.erb} +5 -5
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.63.cat1.erb +21 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.64.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.64.cat1.erb} +7 -7
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.69.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.69.cat1.erb} +2 -2
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.7.cat1.erb → r3_1/_2.16.840.1.113883.10.20.24.3.7.cat1.erb} +12 -9
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.81.cat1.erb +33 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.82.cat1.erb +33 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.24.3.9.cat1.erb +41 -0
- data/templates/cat1/r3_1/_2.16.840.1.113883.10.20.28.3.6.cat1.erb +17 -0
- data/templates/cat1/r3_1/_address.cat1.erb +9 -0
- data/templates/cat1/r3_1/_author.cat1.erb +28 -0
- data/templates/cat1/r3_1/_fulfills.cat1.erb +14 -0
- data/templates/cat1/r3_1/_id.cat1.erb +1 -0
- data/templates/cat1/r3_1/_measures.cat1.erb +93 -0
- data/templates/cat1/r3_1/_medication_details.cat1.erb +16 -0
- data/templates/cat1/r3_1/_medication_dispense.cat1.erb +22 -0
- data/templates/cat1/r3_1/_ordinality.cat1.erb +10 -0
- data/templates/cat1/r3_1/_organization.cat1.erb +9 -0
- data/templates/cat1/r3_1/_patient_data.cat1.erb +17 -0
- data/templates/cat1/r3_1/_providers.cat1.erb +76 -0
- data/templates/cat1/r3_1/_reason.cat1.erb +34 -0
- data/templates/cat1/r3_1/_record_target.cat1.erb +56 -0
- data/templates/cat1/r3_1/_reporting_parameters.cat1.erb +31 -0
- data/templates/cat1/r3_1/_result_value.cat1.erb +28 -0
- data/templates/cat1/r3_1/_telecom.cat1.erb +1 -0
- data/templates/cat1/r3_1/show.cat1.erb +183 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.1.cat1.erb +14 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.103.cat1.erb +17 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.105.cat1.erb +68 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.12.cat1.erb +53 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.135.cat1.erb +75 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.136.cat1.erb +52 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.140.cat1.erb +39 -0
- data/templates/cat1/{_2.16.840.1.113883.10.20.24.3.59.cat1.erb → r4/_2.16.840.1.113883.10.20.24.3.144.cat1.erb} +6 -6
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.145.cat1.erb +24 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.17.cat1.erb +23 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.18.cat1.erb +25 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.2.cat1.erb +29 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.22.cat1.erb +30 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.23.cat1.erb +116 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.3.cat1.erb +25 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.31.cat1.erb +24 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.32.cat1.erb +21 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.37.cat1.erb +22 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.38.cat1.erb +21 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.4.cat1.erb +29 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.41.cat1.erb +45 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.42.cat1.erb +38 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.43.cat1.erb +24 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.44.cat1.erb +25 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.45.cat1.erb +35 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.46.cat1.erb +30 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.47.cat1.erb +47 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.51.cat1.erb +14 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.54.cat1.erb +32 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.55.cat1.erb +18 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.57.cat1.erb +23 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.59.cat1.erb +22 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.62.cat1.erb +36 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.63.cat1.erb +21 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.64.cat1.erb +52 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.7.cat1.erb +33 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.81.cat1.erb +33 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.82.cat1.erb +33 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.24.3.9.cat1.erb +41 -0
- data/templates/cat1/r4/_2.16.840.1.113883.10.20.28.3.6.cat1.erb +17 -0
- data/templates/cat1/r4/_address.cat1.erb +7 -0
- data/templates/cat1/r4/_author.cat1.erb +28 -0
- data/templates/cat1/r4/_fulfills.cat1.erb +14 -0
- data/templates/cat1/r4/_id.cat1.erb +1 -0
- data/templates/cat1/r4/_measures.cat1.erb +93 -0
- data/templates/cat1/r4/_medication_details.cat1.erb +16 -0
- data/templates/cat1/r4/_medication_dispense.cat1.erb +22 -0
- data/templates/cat1/r4/_ordinality.cat1.erb +10 -0
- data/templates/cat1/r4/_organization.cat1.erb +9 -0
- data/templates/cat1/r4/_patient_data.cat1.erb +17 -0
- data/templates/cat1/r4/_providers.cat1.erb +76 -0
- data/templates/cat1/r4/_reason.cat1.erb +34 -0
- data/templates/cat1/r4/_record_target.cat1.erb +54 -0
- data/templates/cat1/r4/_reporting_parameters.cat1.erb +31 -0
- data/templates/cat1/r4/_result_value.cat1.erb +28 -0
- data/templates/cat1/r4/_telecom.cat1.erb +1 -0
- data/templates/cat1/r4/show.cat1.erb +192 -0
- data/templates/cat3/{_address.cat3.erb → r1/_address.cat3.erb} +0 -0
- data/templates/cat3/r1/_author.cat3.erb +28 -0
- data/templates/cat3/{_continuous_variable_value.cat3.erb → r1/_continuous_variable_value.cat3.erb} +0 -0
- data/templates/cat3/r1/_id.cat3.erb +1 -0
- data/templates/cat3/{_measure_data.cat3.erb → r1/_measure_data.cat3.erb} +7 -6
- data/templates/cat3/{_organization.cat3.erb → r1/_organization.cat3.erb} +0 -0
- data/templates/cat3/{_performance_rate.cat3.erb → r1/_performance_rate.cat3.erb} +1 -3
- data/templates/cat3/{_providers.cat3.erb → r1/_providers.cat3.erb} +0 -0
- data/templates/cat3/{_reporting_parameters.cat3.erb → r1/_reporting_parameters.cat3.erb} +0 -0
- data/templates/cat3/{_supplemental_data.cat3.erb → r1/_supplemental_data.cat3.erb} +2 -0
- data/templates/cat3/r1/_telecom.cat3.erb +1 -0
- data/templates/cat3/{show.cat3.erb → r1/show.cat3.erb} +5 -5
- data/templates/cat3/r1_1/_address.cat3.erb +9 -0
- data/templates/cat3/r1_1/_author.cat3.erb +28 -0
- data/templates/cat3/r1_1/_continuous_variable_value.cat3.erb +20 -0
- data/templates/cat3/r1_1/_id.cat3.erb +1 -0
- data/templates/cat3/r1_1/_measure_data.cat3.erb +136 -0
- data/templates/cat3/r1_1/_organization.cat3.erb +6 -0
- data/templates/cat3/r1_1/_performance_rate.cat3.erb +18 -0
- data/templates/{cat1/_providers.cat1.erb → cat3/r1_1/_providers.cat3.erb} +18 -18
- data/templates/{cat1/_reporting_parameters.cat1.erb → cat3/r1_1/_reporting_parameters.cat3.erb} +5 -1
- data/templates/cat3/r1_1/_supplemental_data.cat3.erb +38 -0
- data/templates/cat3/r1_1/_telecom.cat3.erb +1 -0
- data/templates/cat3/r1_1/show.cat3.erb +150 -0
- data/templates/cat3/r2/_address.cat3.erb +9 -0
- data/templates/cat3/r2/_author.cat3.erb +28 -0
- data/templates/cat3/r2/_continuous_variable_value.cat3.erb +20 -0
- data/templates/cat3/r2/_id.cat3.erb +1 -0
- data/templates/cat3/r2/_measure_data.cat3.erb +136 -0
- data/templates/cat3/r2/_organization.cat3.erb +6 -0
- data/templates/cat3/r2/_performance_rate.cat3.erb +19 -0
- data/templates/cat3/r2/_providers.cat3.erb +57 -0
- data/templates/cat3/r2/_reporting_parameters.cat3.erb +29 -0
- data/templates/cat3/r2/_supplemental_data.cat3.erb +38 -0
- data/templates/cat3/r2/_telecom.cat3.erb +1 -0
- data/templates/cat3/r2/show.cat3.erb +150 -0
- data/templates/cat3/r2_1/_address.cat3.erb +9 -0
- data/templates/cat3/r2_1/_author.cat3.erb +28 -0
- data/templates/cat3/r2_1/_continuous_variable_value.cat3.erb +20 -0
- data/templates/cat3/r2_1/_id.cat3.erb +1 -0
- data/templates/cat3/r2_1/_measure_data.cat3.erb +136 -0
- data/templates/cat3/r2_1/_organization.cat3.erb +6 -0
- data/templates/cat3/r2_1/_performance_rate.cat3.erb +19 -0
- data/templates/cat3/r2_1/_providers.cat3.erb +57 -0
- data/templates/cat3/r2_1/_reporting_parameters.cat3.erb +20 -0
- data/templates/cat3/r2_1/_reporting_parameters_act.cat3.erb +10 -0
- data/templates/cat3/r2_1/_supplemental_data.cat3.erb +38 -0
- data/templates/cat3/r2_1/_telecom.cat3.erb +1 -0
- data/templates/cat3/r2_1/show.cat3.erb +153 -0
- data/templates/ccda/_medical_equipment.ccda.erb +1 -1
- data/templates/ccda/_social_history.ccda.erb +2 -2
- data/templates/ccda/_vital_signs.ccda.erb +1 -1
- data/templates/html/_entries_by_section.html.erb +1 -1
- metadata +425 -153
- data/lib/health-data-standards/import/cat1/procedure_importer.rb +0 -42
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.11.cat1.erb +0 -55
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.13.cat1.erb +0 -38
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.17.cat1.erb +0 -22
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.31.cat1.erb +0 -22
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.37.cat1.erb +0 -20
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.47.cat1.erb +0 -27
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.51.cat1.erb +0 -13
- data/templates/cat1/_reason.cat1.erb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ef5b18109b56fc92d3ed2097aee343760bf477c
|
4
|
+
data.tar.gz: '008f520093afb25e312ecbed501c3bfdf4cb2761'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3632559346961e5110f26aae8949d7a3d85cdeb937379e11850cbc40dcde4ec3d5bfc14f5aa010c1fd6f403d734efba052fd5bfafb4992001cdd0f30313b4c39
|
7
|
+
data.tar.gz: c211b9f4922b81411fbce83bf193c22a003a12561a86bef90b9c022c54531776f7ad3072e9aca165c4320a6f8c3a5f9887fc59ffa690fb5e029b46d2dc5ff155
|
data/Gemfile
CHANGED
@@ -2,10 +2,13 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec :development_group => :test
|
4
4
|
|
5
|
+
group :development, :test do
|
6
|
+
gem 'bundler-audit'
|
7
|
+
end
|
8
|
+
|
5
9
|
group :development do
|
6
10
|
gem 'rake'
|
7
|
-
gem '
|
8
|
-
gem 'pry-nav', '~> 0.2.2', platforms: [:ruby_21, :ruby_22]
|
11
|
+
gem 'byebug', '~> 6.0.2', platforms: [:ruby_20, :ruby_21, :ruby_22]
|
9
12
|
end
|
10
13
|
|
11
14
|
group :test do
|
@@ -19,4 +22,6 @@ group :test do
|
|
19
22
|
gem 'minitest-reporters'
|
20
23
|
gem 'awesome_print', :require => 'ap'
|
21
24
|
|
25
|
+
gem 'simplexml_parser', :git => 'https://github.com/projecttacoma/simplexml_parser.git', :branch => 'master'
|
26
|
+
|
22
27
|
end
|
data/Rakefile
CHANGED
@@ -16,6 +16,7 @@ require_relative 'health-data-standards/ext/symbol'
|
|
16
16
|
require_relative 'health-data-standards/ext/string'
|
17
17
|
require_relative 'health-data-standards/ext/node'
|
18
18
|
|
19
|
+
require_relative 'health-data-standards/util/nlm_helper'
|
19
20
|
require_relative 'health-data-standards/util/hl7_helper'
|
20
21
|
require_relative 'health-data-standards/util/code_system_helper'
|
21
22
|
require_relative 'health-data-standards/util/hqmf_template_helper'
|
@@ -28,6 +29,7 @@ require_relative 'health-data-standards/export/c32'
|
|
28
29
|
require_relative 'health-data-standards/export/ccda'
|
29
30
|
require_relative 'health-data-standards/export/csv'
|
30
31
|
require_relative 'health-data-standards/export/hdata/metadata'
|
32
|
+
require_relative 'health-data-standards/export/exceptions'
|
31
33
|
|
32
34
|
require_relative 'health-data-standards/import/provider_import_utils'
|
33
35
|
require_relative 'health-data-standards/import/hdata/metadata_importer'
|
@@ -42,13 +44,16 @@ require_relative 'health-data-standards/models/entry'
|
|
42
44
|
require_relative 'health-data-standards/models/allergy'
|
43
45
|
require_relative 'health-data-standards/models/encounter'
|
44
46
|
require_relative 'health-data-standards/models/condition'
|
47
|
+
require_relative 'health-data-standards/models/communication'
|
45
48
|
require_relative 'health-data-standards/models/immunization'
|
46
49
|
require_relative 'health-data-standards/models/fulfillment_history'
|
47
50
|
require_relative 'health-data-standards/models/order_information'
|
48
51
|
require_relative 'health-data-standards/models/medication'
|
49
52
|
require_relative 'health-data-standards/models/procedure'
|
50
53
|
require_relative 'health-data-standards/models/lab_result'
|
54
|
+
require_relative 'health-data-standards/models/family_history'
|
51
55
|
require_relative 'health-data-standards/models/functional_status'
|
56
|
+
require_relative 'health-data-standards/models/care_experience'
|
52
57
|
require_relative 'health-data-standards/models/medical_equipment'
|
53
58
|
require_relative 'health-data-standards/models/record'
|
54
59
|
require_relative 'health-data-standards/models/personable'
|
@@ -71,6 +76,11 @@ require_relative 'health-data-standards/models/metadata/author'
|
|
71
76
|
require_relative 'health-data-standards/models/metadata/change_info'
|
72
77
|
require_relative 'health-data-standards/models/metadata/link_info'
|
73
78
|
require_relative 'health-data-standards/models/metadata/pedigree'
|
79
|
+
require_relative 'health-data-standards/models/provider_preference'
|
80
|
+
require_relative 'health-data-standards/models/patient_preference'
|
81
|
+
require_relative 'health-data-standards/models/care_goal'
|
82
|
+
require_relative 'health-data-standards/models/encounter_principal_diagnosis'
|
83
|
+
require_relative 'health-data-standards/models/assessment'
|
74
84
|
|
75
85
|
require_relative 'health-data-standards/models/qrda/id'
|
76
86
|
require_relative 'health-data-standards/models/qrda/device'
|
@@ -111,6 +121,7 @@ require_relative 'health-data-standards/import/cda/medication_importer'
|
|
111
121
|
require_relative 'health-data-standards/import/cda/procedure_importer'
|
112
122
|
require_relative 'health-data-standards/import/cda/result_importer'
|
113
123
|
require_relative 'health-data-standards/import/cda/vital_sign_importer'
|
124
|
+
require_relative 'health-data-standards/import/cda/communication_importer'
|
114
125
|
|
115
126
|
require_relative 'health-data-standards/import/c32/condition_importer'
|
116
127
|
require_relative 'health-data-standards/import/c32/immunization_importer'
|
@@ -131,18 +142,24 @@ require_relative 'health-data-standards/import/ccda/care_goal_importer'
|
|
131
142
|
require_relative 'health-data-standards/import/ccda/medical_equipment_importer'
|
132
143
|
require_relative 'health-data-standards/import/ccda/insurance_provider_importer'
|
133
144
|
|
145
|
+
require_relative 'health-data-standards/import/cat1/device_order_importer'
|
134
146
|
require_relative 'health-data-standards/import/cat1/gestational_age_importer'
|
135
147
|
require_relative 'health-data-standards/import/cat1/procedure_intolerance_importer'
|
136
148
|
require_relative 'health-data-standards/import/cat1/procedure_performed_importer'
|
137
149
|
require_relative 'health-data-standards/import/cat1/procedure_order_importer'
|
138
150
|
require_relative 'health-data-standards/import/cat1/diagnosis_active_importer'
|
151
|
+
require_relative 'health-data-standards/import/cat1/diagnosis_importer'
|
139
152
|
require_relative 'health-data-standards/import/cat1/diagnosis_inactive_importer'
|
140
153
|
require_relative 'health-data-standards/import/cat1/patient_importer'
|
141
154
|
require_relative 'health-data-standards/import/cat1/lab_order_importer'
|
155
|
+
require_relative 'health-data-standards/import/cat1/immunization_administered_importer'
|
142
156
|
require_relative 'health-data-standards/import/cat1/medication_active_importer'
|
143
157
|
require_relative 'health-data-standards/import/cat1/medication_dispensed_importer'
|
158
|
+
require_relative 'health-data-standards/import/cat1/medication_dispensed_act_importer'
|
144
159
|
require_relative 'health-data-standards/import/cat1/encounter_order_importer'
|
160
|
+
require_relative 'health-data-standards/import/cat1/encounter_order_act_importer'
|
145
161
|
require_relative 'health-data-standards/import/cat1/encounter_performed_importer'
|
162
|
+
require_relative 'health-data-standards/import/cat1/encounter_performed_act_importer'
|
146
163
|
require_relative 'health-data-standards/import/cat1/diagnostic_study_order_importer'
|
147
164
|
require_relative 'health-data-standards/import/cat1/tobacco_use_importer'
|
148
165
|
require_relative 'health-data-standards/import/cat1/entry_package'
|
@@ -150,7 +167,11 @@ require_relative 'health-data-standards/import/cat1/lab_result_importer'
|
|
150
167
|
require_relative 'health-data-standards/import/cat1/ecog_status_importer'
|
151
168
|
require_relative 'health-data-standards/import/cat1/symptom_active_importer'
|
152
169
|
require_relative 'health-data-standards/import/cat1/insurance_provider_importer'
|
153
|
-
require_relative 'health-data-standards/import/cat1/
|
170
|
+
require_relative 'health-data-standards/import/cat1/clinical_trial_participant_importer'
|
171
|
+
require_relative 'health-data-standards/import/cat1/transfer_from_importer.rb'
|
172
|
+
require_relative 'health-data-standards/import/cat1/transfer_to_importer.rb'
|
173
|
+
require_relative 'health-data-standards/import/cat1/transfer_from_act_importer.rb'
|
174
|
+
require_relative 'health-data-standards/import/cat1/transfer_to_act_importer.rb'
|
154
175
|
|
155
176
|
require_relative 'health-data-standards/import/bundle/importer'
|
156
177
|
|
@@ -1,18 +1,37 @@
|
|
1
1
|
module HealthDataStandards
|
2
2
|
module Export
|
3
3
|
class Cat1
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
def initialize(qrda_version = nil)
|
6
|
+
template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1', nil, qrda_version)
|
6
7
|
@rendering_context = HealthDataStandards::Export::RenderingContext.new
|
7
8
|
@rendering_context.template_helper = template_helper
|
8
9
|
@rendering_context.extensions = [HealthDataStandards::Export::Helper::Cat1ViewHelper]
|
9
10
|
end
|
10
11
|
|
12
|
+
|
11
13
|
@@vs_map = nil
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
|
15
|
+
@@most_recent_qrda_version = 'r4'
|
16
|
+
@@valid_qrda_versions = ['r4', 'r3_1', 'r3', 'r2']
|
17
|
+
|
18
|
+
#default qrda_version should default to latest version
|
19
|
+
def export(patient, measures, start_date, end_date, header=nil, qrda_version='r4', cms_compatibility=false)
|
20
|
+
qrda_version = qrda_version.nil? ? @@most_recent_qrda_version : qrda_version
|
21
|
+
|
22
|
+
if (!@@valid_qrda_versions.include? qrda_version)
|
23
|
+
raise "Unknown QRDA version provided"
|
24
|
+
end
|
25
|
+
|
26
|
+
qrda_template = 'show'
|
27
|
+
r2_compatibility = false
|
28
|
+
|
29
|
+
if qrda_version == 'r2'
|
30
|
+
r2_compatibility = true
|
31
|
+
end
|
32
|
+
@rendering_context.render(:template => qrda_template, :locals => {:patient => patient, :measures => measures,
|
33
|
+
:start_date => start_date, :end_date => end_date, :header => header, :qrda_version => qrda_version,
|
34
|
+
:r2_compatibility => r2_compatibility, :cms_compatibility => cms_compatibility})
|
16
35
|
end
|
17
36
|
end
|
18
37
|
end
|
@@ -3,8 +3,14 @@
|
|
3
3
|
module HealthDataStandards
|
4
4
|
module Export
|
5
5
|
class Cat1R2 < Cat1
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
super("r2")
|
9
|
+
end
|
10
|
+
|
11
|
+
def export(patient, measures, start_date, end_date, header=nil, qrda_version=nil, cms_compatibility=false)
|
12
|
+
# QRDA version is always 'r2'
|
13
|
+
super(patient, measures, start_date, end_date, header, 'r2', cms_compatibility)
|
8
14
|
end
|
9
15
|
end
|
10
16
|
end
|
@@ -1,23 +1,24 @@
|
|
1
1
|
module HealthDataStandards
|
2
2
|
module Export
|
3
3
|
class Cat3
|
4
|
-
def initialize
|
5
|
-
template_helper = HealthDataStandards::Export::TemplateHelper.new('cat3', 'cat3')
|
4
|
+
def initialize(qrda_version = nil)
|
5
|
+
template_helper = HealthDataStandards::Export::TemplateHelper.new('cat3', 'cat3', nil, qrda_version)
|
6
6
|
@rendering_context = HealthDataStandards::Export::RenderingContext.new
|
7
7
|
@rendering_context.template_helper = template_helper
|
8
|
-
@cat1_renderer = HealthDataStandards::Export::RenderingContext.new
|
9
|
-
@cat1_renderer.template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1')
|
10
8
|
end
|
11
9
|
|
12
|
-
|
10
|
+
@@most_recent_qrda_version = 'r2_1'
|
11
|
+
@@valid_qrda_versions = ['r1', 'r1_1', 'r2', 'r2_1']
|
12
|
+
|
13
|
+
def export(measures, header, effective_date, start_date, end_date, qrda3_version=nil, filter=nil,test_id=nil)
|
13
14
|
results = {}
|
14
15
|
measures.each do |measure|
|
15
16
|
results[measure['hqmf_id']] = HealthDataStandards::CQM::QueryCache.aggregate_measure(measure['hqmf_id'], effective_date, filter, test_id)
|
16
17
|
end
|
17
18
|
@rendering_context.render(:template => 'show',
|
18
19
|
:locals => {:measures => measures, :start_date => start_date,
|
19
|
-
:end_date => end_date,
|
20
|
-
:results => results,
|
20
|
+
:end_date => end_date,
|
21
|
+
:results => results, :qrda3_version => qrda3_version,
|
21
22
|
:header=>header})
|
22
23
|
end
|
23
24
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module HealthDataStandards
|
2
|
+
module Export
|
3
|
+
class PatientExportDataCriteriaException < Exception
|
4
|
+
attr_reader :patient, :data_criteria, :entries
|
5
|
+
def initialize(string, patient, data_criteria, entries)
|
6
|
+
@patient = patient
|
7
|
+
@data_criteria = data_criteria
|
8
|
+
@entries = entries
|
9
|
+
super(string)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -4,27 +4,33 @@ module HealthDataStandards
|
|
4
4
|
module Cat1ViewHelper
|
5
5
|
include HealthDataStandards::Export::Helper::ScoopedViewHelper
|
6
6
|
|
7
|
-
def render_data_criteria(dc, entries)
|
7
|
+
def render_data_criteria(dc, entries, r2_compatibility, qrda_version = nil)
|
8
8
|
html_array = entries.map do |entry|
|
9
9
|
bundle_id = entry.record ? entry.record["bundle_id"] : nil
|
10
10
|
vs_map = (value_set_map(bundle_id) || {})[dc['value_set_oid']]
|
11
|
-
render(:partial => HealthDataStandards::Export::QRDA::EntryTemplateResolver.partial_for(dc['data_criteria_oid'], dc['value_set_oid']), :locals => {:entry => entry,
|
11
|
+
render(:partial => HealthDataStandards::Export::QRDA::EntryTemplateResolver.partial_for(dc['data_criteria_oid'], dc['value_set_oid'], qrda_version), :locals => {:entry => entry,
|
12
12
|
:data_criteria => dc['data_criteria'],
|
13
13
|
:value_set_oid => dc['value_set_oid'],
|
14
|
-
:
|
14
|
+
:filtered_vs_map => vs_map,
|
15
15
|
:result_oids => dc["result_oids"],
|
16
|
-
:field_oids => dc["field_oids"]
|
16
|
+
:field_oids => dc["field_oids"],
|
17
|
+
:r2_compatibility => r2_compatibility,
|
18
|
+
:bundle_id => bundle_id})
|
17
19
|
end
|
18
20
|
html_array.join("\n")
|
19
21
|
end
|
20
22
|
|
21
|
-
def render_patient_data(patient, measures)
|
23
|
+
def render_patient_data(patient, measures, r2_compatibility, qrda_version = nil)
|
22
24
|
HealthDataStandards.logger.warn("Generating CAT I for #{patient.first} #{patient.last}")
|
23
|
-
udcs = unique_data_criteria(measures)
|
24
|
-
|
25
|
+
udcs = unique_data_criteria(measures, r2_compatibility)
|
25
26
|
data_criteria_html = udcs.map do |udc|
|
26
|
-
|
27
|
-
|
27
|
+
# If there's an error exporting particular criteria, re-raise an error that includes useful debugging info
|
28
|
+
begin
|
29
|
+
entries = entries_for_data_criteria(udc['data_criteria'], patient)
|
30
|
+
render_data_criteria(udc, entries, r2_compatibility, qrda_version)
|
31
|
+
rescue => e
|
32
|
+
raise HealthDataStandards::Export::PatientExportDataCriteriaException.new(e.message, patient, udc['data_criteria'], entries)
|
33
|
+
end
|
28
34
|
end
|
29
35
|
data_criteria_html.compact.join("\n")
|
30
36
|
end
|
@@ -46,7 +52,7 @@ module HealthDataStandards
|
|
46
52
|
valueset_oids.each do |vs_oid|
|
47
53
|
oid_list = (vs_map[vs_oid] || [])
|
48
54
|
oid_map = Hash[oid_list.collect{|x| [x["set"],x["values"]]}]
|
49
|
-
if (oid_map[code_system] || []).
|
55
|
+
if (oid_map[code_system] || []).include? code
|
50
56
|
return vs_oid
|
51
57
|
end
|
52
58
|
end
|
@@ -56,4 +62,4 @@ module HealthDataStandards
|
|
56
62
|
end
|
57
63
|
end
|
58
64
|
end
|
59
|
-
end
|
65
|
+
end
|
@@ -6,7 +6,9 @@ module HealthDataStandards
|
|
6
6
|
|
7
7
|
def decode_hqmf_section(section, oid)
|
8
8
|
if oid
|
9
|
-
|
9
|
+
definition = HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid)
|
10
|
+
definition ||= HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid, 'r2')
|
11
|
+
definition['definition'].pluralize.to_sym
|
10
12
|
else
|
11
13
|
section
|
12
14
|
end
|
@@ -14,7 +16,9 @@ module HealthDataStandards
|
|
14
16
|
|
15
17
|
def decode_hqmf_status(status, oid)
|
16
18
|
if oid
|
17
|
-
|
19
|
+
definition = HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid)
|
20
|
+
definition ||= HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid, 'r2')
|
21
|
+
definition['status']
|
18
22
|
else
|
19
23
|
status
|
20
24
|
end
|
@@ -22,12 +26,14 @@ module HealthDataStandards
|
|
22
26
|
|
23
27
|
def decode_hqmf_description(description, oid)
|
24
28
|
if oid
|
25
|
-
|
26
|
-
|
29
|
+
definition = HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid)
|
30
|
+
definition ||= HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid, 'r2')
|
31
|
+
definition_text = definition['definition']
|
32
|
+
status_text = definition['status']
|
27
33
|
unless status.blank?
|
28
|
-
|
34
|
+
"#{definition_text.titleize}, #{status_text.titleize}".to_sym
|
29
35
|
else
|
30
|
-
|
36
|
+
"#{definition_text.titleize}".to_sym
|
31
37
|
end
|
32
38
|
else
|
33
39
|
description
|
@@ -36,4 +42,4 @@ module HealthDataStandards
|
|
36
42
|
end
|
37
43
|
end
|
38
44
|
end
|
39
|
-
end
|
45
|
+
end
|
@@ -20,17 +20,32 @@ module HealthDataStandards
|
|
20
20
|
# Given a set of measures, find the data criteria/value set pairs that are unique across all of them
|
21
21
|
# Returns an Array of Hashes. Hashes will have a three key/value pairs. One for the data criteria oid,
|
22
22
|
# one for the value set oid and one for the data criteria itself
|
23
|
-
def unique_data_criteria(measures)
|
23
|
+
def unique_data_criteria(measures, r2_compatibility)
|
24
24
|
all_data_criteria = measures.map {|measure| measure.all_data_criteria}.flatten
|
25
25
|
mapped_data_criteria = {}
|
26
|
+
|
26
27
|
all_data_criteria.each do |data_criteria|
|
27
28
|
data_criteria_oid = HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
|
28
29
|
(data_criteria.status || ""),
|
29
30
|
data_criteria.negation)
|
31
|
+
data_criteria_oid ||= HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
|
32
|
+
(data_criteria.status || ""),
|
33
|
+
data_criteria.negation, "r2")
|
34
|
+
|
35
|
+
# change a transfer to an encounter since we pull back and write encounters
|
36
|
+
if r2_compatibility
|
37
|
+
if ['2.16.840.1.113883.3.560.1.71', '2.16.840.1.113883.3.560.1.72'].include? data_criteria_oid
|
38
|
+
data_criteria_oid = '2.16.840.1.113883.3.560.1.79'
|
39
|
+
end
|
40
|
+
end
|
30
41
|
value_set_oid = data_criteria.code_list_id
|
42
|
+
if data_criteria_oid == '2.16.840.1.113883.3.560.1.71'
|
43
|
+
value_set_oid = data_criteria.field_values['TRANSFER_FROM'].code_list_id
|
44
|
+
elsif data_criteria_oid == '2.16.840.1.113883.3.560.1.72'
|
45
|
+
value_set_oid = data_criteria.field_values['TRANSFER_TO'].code_list_id
|
46
|
+
end
|
31
47
|
dc = {'data_criteria_oid' => data_criteria_oid, 'value_set_oid' => value_set_oid}
|
32
48
|
mapping = mapped_data_criteria[dc] ||= {'result_oids' => [], 'field_oids' =>{}, 'data_criteria' => data_criteria}
|
33
|
-
|
34
49
|
if data_criteria.field_values
|
35
50
|
data_criteria.field_values.each_pair do |field,descr|
|
36
51
|
if descr && descr.type == "CD"
|
@@ -38,7 +53,9 @@ module HealthDataStandards
|
|
38
53
|
end
|
39
54
|
end
|
40
55
|
end
|
41
|
-
|
56
|
+
if data_criteria.negation
|
57
|
+
(mapping['field_oids']["REASON"] ||= []) << data_criteria.negation_code_list_id
|
58
|
+
end
|
42
59
|
if data_criteria.value && data_criteria.value.type == "CD"
|
43
60
|
mapping["result_oids"] << data_criteria.value.code_list_id
|
44
61
|
end
|
@@ -56,6 +73,10 @@ module HealthDataStandards
|
|
56
73
|
data_criteria_oid = HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
|
57
74
|
data_criteria.status || '',
|
58
75
|
data_criteria.negation)
|
76
|
+
data_criteria_oid ||= HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
|
77
|
+
data_criteria.status || '',
|
78
|
+
data_criteria.negation, "r2")
|
79
|
+
|
59
80
|
if entry.respond_to?(:oid) && (entry.oid == data_criteria_oid)
|
60
81
|
codes = *(value_set_map(entry.record["bundle_id"])[data_criteria_info['value_set_oid']] || [])
|
61
82
|
if codes.empty?
|
@@ -73,39 +94,50 @@ module HealthDataStandards
|
|
73
94
|
|
74
95
|
# Find all of the entries on a patient that match the given data criteria
|
75
96
|
def entries_for_data_criteria(data_criteria, patient)
|
97
|
+
|
76
98
|
data_criteria_oid = HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
|
77
99
|
data_criteria.status || '',
|
78
100
|
data_criteria.negation)
|
79
|
-
|
101
|
+
is_hqmfr2 = true unless data_criteria_oid
|
102
|
+
data_criteria_oid ||= HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
|
103
|
+
data_criteria.status || '',
|
104
|
+
data_criteria.negation, "r2")
|
105
|
+
HealthDataStandards.logger.debug("Looking for dc [#{data_criteria_oid}]")
|
80
106
|
filtered_entries = []
|
81
107
|
entries = []
|
108
|
+
|
82
109
|
case data_criteria_oid
|
83
110
|
when '2.16.840.1.113883.3.560.1.404'
|
84
111
|
filtered_entries = handle_patient_expired(patient)
|
85
|
-
when '2.16.840.1.113883.3.560.1.401'
|
86
|
-
filtered_entries = handle_clinical_trial_participant(patient)
|
87
112
|
when '2.16.840.1.113883.3.560.1.405'
|
88
113
|
filtered_entries = handle_payer_information(patient)
|
89
114
|
else
|
90
115
|
entries.concat patient.entries_for_oid(data_criteria_oid)
|
91
116
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
117
|
+
case data_criteria_oid
|
118
|
+
when '2.16.840.1.113883.3.560.1.5'
|
119
|
+
#special case handling for Lab Test: Performed being implicitly available through a Lab Test: Result
|
120
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.12')
|
121
|
+
when '2.16.840.1.113883.3.560.1.12'
|
122
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.5')
|
123
|
+
when '2.16.840.1.113883.3.560.1.6'
|
124
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.63')
|
125
|
+
when '2.16.840.1.113883.3.560.1.63'
|
126
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.6')
|
127
|
+
when '2.16.840.1.113883.3.560.1.3'
|
128
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.11')
|
129
|
+
when '2.16.840.1.113883.3.560.1.11'
|
130
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.3')
|
131
|
+
when '2.16.840.1.113883.3.560.1.71', '2.16.840.1.113883.3.560.1.72'
|
132
|
+
# transfers
|
133
|
+
entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.79')
|
134
|
+
if (data_criteria.field_values)
|
135
|
+
code_list_id = data_criteria.field_values['TRANSFER_FROM'].try(:code_list_id) || data_criteria.field_values['TRANSFER_TO'].try(:code_list_id)
|
136
|
+
codes = (value_set_map(patient["bundle_id"])[code_list_id] || [])
|
106
137
|
end
|
138
|
+
end
|
107
139
|
|
108
|
-
codes
|
140
|
+
codes ||= (value_set_map(patient["bundle_id"])[data_criteria.code_list_id] || [])
|
109
141
|
if codes.empty?
|
110
142
|
HealthDataStandards.logger.warn("No codes for #{data_criteria.code_list_id}")
|
111
143
|
end
|
@@ -114,16 +146,27 @@ module HealthDataStandards
|
|
114
146
|
# This special case is for when the code list is a reason
|
115
147
|
if data_criteria.code_list_id =~ /2\.16\.840\.1\.113883\.3\.526\.3\.100[7-9]/
|
116
148
|
entry.negation_reason.present? && codes.first['values'].include?(entry.negation_reason['code'])
|
149
|
+
elsif data_criteria_oid == '2.16.840.1.113883.3.560.1.71'
|
150
|
+
if (entry.transferFrom)
|
151
|
+
entry.transferFrom.codes[entry.transferFrom.code_system] = [entry.transferFrom.code]
|
152
|
+
tfc = entry.transferFrom.codes_in_code_set(codes).values.first
|
153
|
+
tfc && !tfc.empty?
|
154
|
+
end
|
155
|
+
elsif data_criteria_oid == '2.16.840.1.113883.3.560.1.72'
|
156
|
+
if (entry.transferTo)
|
157
|
+
entry.transferTo.codes[entry.transferTo.code_system] = [entry.transferTo.code]
|
158
|
+
ttc = entry.transferTo.codes_in_code_set(codes).values.first
|
159
|
+
ttc && !ttc.empty?
|
160
|
+
end
|
117
161
|
else
|
118
|
-
# The !! hack makes sure that negation_ind is a boolean
|
119
|
-
entry.is_in_code_set?(codes) && !!entry.negation_ind == data_criteria.negation
|
162
|
+
# The !! hack makes sure that negation_ind is a boolean. negations use the same hqmf templates in r2
|
163
|
+
entry.is_in_code_set?(codes) && (is_hqmfr2 || !!entry.negation_ind == data_criteria.negation)
|
120
164
|
end
|
121
165
|
end
|
122
166
|
end
|
123
167
|
if filtered_entries.empty?
|
124
168
|
HealthDataStandards.logger.debug("No entries for #{data_criteria.title}")
|
125
169
|
end
|
126
|
-
|
127
170
|
filtered_entries
|
128
171
|
end
|
129
172
|
|
@@ -137,7 +180,7 @@ module HealthDataStandards
|
|
137
180
|
|
138
181
|
def handle_patient_expired(patient)
|
139
182
|
if patient.expired
|
140
|
-
[OpenStruct.new(
|
183
|
+
[OpenStruct.new(start_time: patient.deathdate, id: UUID.generate)]
|
141
184
|
else
|
142
185
|
[]
|
143
186
|
end
|