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
@@ -0,0 +1,56 @@
|
|
1
|
+
<recordTarget>
|
2
|
+
<patientRole>
|
3
|
+
<% if (patient.medical_record_number && patient.medical_record_assigner) %>
|
4
|
+
<id extension="<%= patient.medical_record_number %>" root="<%= patient.medical_record_assigner %>"/>
|
5
|
+
<% if cms_compatibility %>
|
6
|
+
<id extension="<%= patient.medical_record_number %>" root="1.3.6.1.4.1.115" />
|
7
|
+
<% end %>
|
8
|
+
<% else -%>
|
9
|
+
<id extension="12345" root="PlaceholderOrganization" />
|
10
|
+
<% end -%>
|
11
|
+
<addr use="HP">
|
12
|
+
<% if patient.addresses.present?
|
13
|
+
patient.addresses.each do |address| -%>
|
14
|
+
<% address.street.each do |street| -%>
|
15
|
+
<streetAddressLine><%= street %></streetAddressLine>
|
16
|
+
<% end %>
|
17
|
+
<city><%= address.city %></city>
|
18
|
+
<state><%= address.state %></state>
|
19
|
+
<postalCode><%= address.zip %></postalCode>
|
20
|
+
<country><%= address.country %></country>
|
21
|
+
<% end -%>
|
22
|
+
<% else -%>
|
23
|
+
<streetAddressLine>202 Burlington Rd.</streetAddressLine>
|
24
|
+
<city>Bedford</city>
|
25
|
+
<state>MA</state>
|
26
|
+
<postalCode>01730</postalCode>
|
27
|
+
<country>US</country>
|
28
|
+
<% end -%>
|
29
|
+
</addr>
|
30
|
+
<telecom use="WP" value="tel:+1-781-271-3000"/>
|
31
|
+
<patient>
|
32
|
+
<name>
|
33
|
+
<given><%= patient.first %></given>
|
34
|
+
<family><%= patient.last %></family>
|
35
|
+
</name>
|
36
|
+
<administrativeGenderCode code="<%= patient.gender %>" codeSystem="2.16.840.1.113883.5.1" codeSystemName="HL7 AdministrativeGender"/>
|
37
|
+
<birthTime value="<%= Time.at(patient.birthdate).utc.to_formatted_s(:number) %>"/>
|
38
|
+
<% if (patient.race) %>
|
39
|
+
<raceCode code="<%= patient.race['code'] %>" <% if patient.race['name']%>displayName="<%= patient.race['name'] %>"<% end %> codeSystemName="CDC Race and Ethnicity" codeSystem="2.16.840.1.113883.6.238"/>
|
40
|
+
<% end %>
|
41
|
+
<% if (patient.ethnicity) %>
|
42
|
+
<ethnicGroupCode code="<%= patient.ethnicity['code'] %>" <% if patient.ethnicity['name']%>displayName="<%= patient.ethnicity['name'] %>"<% end %> codeSystemName="CDC Race and Ethnicity" codeSystem="2.16.840.1.113883.6.238"/>
|
43
|
+
<% end %>
|
44
|
+
<%
|
45
|
+
languages = patient.languages
|
46
|
+
languages = ["eng"] if languages.nil? or languages.empty?
|
47
|
+
languages.each do |language|%>
|
48
|
+
<languageCommunication>
|
49
|
+
<templateId root="2.16.840.1.113883.3.88.11.83.2" assigningAuthorityName="HITSP/C83"/>
|
50
|
+
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.1" assigningAuthorityName="IHE/PCC"/>
|
51
|
+
<languageCode code="<%= language %>"/>
|
52
|
+
</languageCommunication>
|
53
|
+
<% end %>
|
54
|
+
</patient>
|
55
|
+
</patientRole>
|
56
|
+
</recordTarget>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<component>
|
2
|
+
<section>
|
3
|
+
<!-- This is the templateId for Reporting Parameters section -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.17.2.1" />
|
5
|
+
<% if cms_compatibility %>
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.17.2.1" extension="2015-07-01" />
|
7
|
+
<% end %>
|
8
|
+
<code code="55187-9" codeSystem="2.16.840.1.113883.6.1"/>
|
9
|
+
<title>Reporting Parameters</title>
|
10
|
+
<text>
|
11
|
+
<list>
|
12
|
+
<item>Reporting period: <%= start_date.to_formatted_s(:long_ordinal) %> - <%= end_date.to_formatted_s(:long_ordinal) %></item>
|
13
|
+
</list>
|
14
|
+
</text>
|
15
|
+
<entry typeCode="DRIV">
|
16
|
+
<act classCode="ACT" moodCode="EVN">
|
17
|
+
<!-- This is the templateId for Reporting Parameteres Act -->
|
18
|
+
<templateId root="2.16.840.1.113883.10.20.17.3.8" />
|
19
|
+
<% if cms_compatibility %>
|
20
|
+
<templateId root="2.16.840.1.113883.10.20.17.3.8" extension="2015-07-01" />
|
21
|
+
<% end %>
|
22
|
+
<id root="1.3.6.1.4.1.115" extension="<%= identifier_for([start_date, end_date]) %>" />
|
23
|
+
<code code="252116004" codeSystem="2.16.840.1.113883.6.96" displayName="Observation Parameters"/>
|
24
|
+
<effectiveTime>
|
25
|
+
<low value="<%= start_date.to_formatted_s(:number) %>"/>
|
26
|
+
<high value="<%= end_date.to_formatted_s(:number) %>"/>
|
27
|
+
</effectiveTime>
|
28
|
+
</act>
|
29
|
+
</entry>
|
30
|
+
</section>
|
31
|
+
</component>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% values.compact!
|
2
|
+
if !values.empty?
|
3
|
+
values.each do |ev|
|
4
|
+
if ev.respond_to?(:codes)
|
5
|
+
extra_content = 'xsi:type="CD"'
|
6
|
+
if defined? result_oids
|
7
|
+
preferred_code = ev.preferred_code(['LOINC', 'SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM'])
|
8
|
+
oid = oid_for_code(preferred_code,result_oids, ev.entry.record["bundle_id"])
|
9
|
+
if oid
|
10
|
+
extra_content += " sdtc:valueSet='#{oid}'"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
-%>
|
14
|
+
<%== code_display(ev, 'preferred_code_sets' => ['LOINC', 'SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM'], 'tag_name' => 'value', 'extra_content' => extra_content) %>
|
15
|
+
<% elsif ev.respond_to?(:scalar) -%>
|
16
|
+
<% if is_num?(ev.scalar) -%>
|
17
|
+
<value xsi:type="PQ" value="<%= ev.scalar %>" <% if ev.units && (ev.units != "") -%>unit="<%= ev.units %>"<% else -%>unit="1"<% end -%>/>
|
18
|
+
<% elsif is_bool?(ev.scalar)%>
|
19
|
+
<value xsi:type="BL" value="<%= ev.scalar %>" />
|
20
|
+
<% else -%>
|
21
|
+
<value xsi:type="ST" ><%= ev.scalar %></value>
|
22
|
+
<% end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
# else is empty
|
26
|
+
else -%>
|
27
|
+
<value xsi:type="CD" nullFlavor="UNK"/>
|
28
|
+
<% end -%>
|
File without changes
|
@@ -0,0 +1,183 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<% if !measures.empty? %>
|
3
|
+
<% reporting_program = if measures.first.type == 'ep'
|
4
|
+
'PQRS_MU_INDIVIDUAL'
|
5
|
+
else
|
6
|
+
'HQR_EHR'
|
7
|
+
end -%>
|
8
|
+
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
9
|
+
xmlns="urn:hl7-org:v3"
|
10
|
+
xmlns:voc="urn:hl7-org:v3/voc"
|
11
|
+
xmlns:sdtc="urn:hl7-org:sdtc">
|
12
|
+
<!-- QRDA Header -->
|
13
|
+
<realmCode code="US"/>
|
14
|
+
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
|
15
|
+
<!-- US Realm Header Template Id -->
|
16
|
+
<templateId root="2.16.840.1.113883.10.20.22.1.1" extension="2014-06-09"/>
|
17
|
+
<!-- QRDA templateId -->
|
18
|
+
<templateId root="2.16.840.1.113883.10.20.24.1.1" extension="2014-12-01" />
|
19
|
+
<!-- QDM-based QRDA templateId -->
|
20
|
+
<templateId root="2.16.840.1.113883.10.20.24.1.2" extension="2014-12-01" />
|
21
|
+
<% if cms_compatibility %>
|
22
|
+
<!-- CMS QRDA templateId -->
|
23
|
+
<templateId root="2.16.840.1.113883.10.20.24.1.3" extension="2015-07-01" />
|
24
|
+
<% end %>
|
25
|
+
<!-- This is the globally unique identifier for this QRDA document -->
|
26
|
+
<id root="<%= UUID.generate %>"/>
|
27
|
+
<!-- QRDA document type code -->
|
28
|
+
<code code="55182-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Quality Measure Report"/>
|
29
|
+
<title>QRDA Incidence Report</title>
|
30
|
+
<!-- This is the document creation time -->
|
31
|
+
<effectiveTime value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
|
32
|
+
<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
|
33
|
+
<languageCode code="en"/>
|
34
|
+
<!-- reported patient -->
|
35
|
+
<%== render :partial => 'record_target', :locals => {:patient => patient, :cms_compatibility => cms_compatibility} %>
|
36
|
+
<!-- Example of an author who is a device -->
|
37
|
+
<% if header %>
|
38
|
+
<%== render :partial=>"author", :collection=>header.authors %>
|
39
|
+
<!-- SHALL have 1..* author. MAY be device or person.
|
40
|
+
The author of the CDA document in this example is a device at a data submission vendor/registry. -->
|
41
|
+
|
42
|
+
<!-- The custodian of the CDA document is the same as the legal authenticator in this
|
43
|
+
example and represents the reporting organization. -->
|
44
|
+
<!-- SHALL -->
|
45
|
+
<custodian>
|
46
|
+
<assignedCustodian>
|
47
|
+
<%== render :partial=>"organization", :locals=>{organization: header.custodian.organization, tag_name: "representedCustodianOrganization"} %>
|
48
|
+
</assignedCustodian>
|
49
|
+
</custodian>
|
50
|
+
<!-- This needs to take reporting program into account EH/EP-->
|
51
|
+
<% if cms_compatibility %>
|
52
|
+
<informationRecipient>
|
53
|
+
<intendedRecipient>
|
54
|
+
<id root="2.16.840.1.113883.3.249.7" extension="<%= reporting_program %>"/>
|
55
|
+
</intendedRecipient>
|
56
|
+
</informationRecipient>
|
57
|
+
<% end %>
|
58
|
+
<!-- The legal authenticator of the CDA document is a single person who is at the
|
59
|
+
same organization as the custodian in this example. This element must be present. -->
|
60
|
+
<!-- SHALL -->
|
61
|
+
<legalAuthenticator>
|
62
|
+
<!-- SHALL -->
|
63
|
+
<time value="<%= header.legal_authenticator.time.utc.to_formatted_s(:number) %>"/>
|
64
|
+
<!-- SHALL -->
|
65
|
+
<signatureCode code="S"/>
|
66
|
+
<assignedEntity>
|
67
|
+
<!-- SHALL ID -->
|
68
|
+
<%== render :partial=>"id", :collection=>header.legal_authenticator.ids, :id=>"identifier" %>
|
69
|
+
<%== render :partial=>"address" , :collection=>header.legal_authenticator.addresses %>
|
70
|
+
<%== render :partial => "telecom", :collection => header.legal_authenticator.telecoms %>
|
71
|
+
<assignedPerson>
|
72
|
+
<name>
|
73
|
+
<given><%= header.legal_authenticator.person.given %></given>
|
74
|
+
<family><%= header.legal_authenticator.person.family %></family>
|
75
|
+
</name>
|
76
|
+
</assignedPerson>
|
77
|
+
|
78
|
+
<%== render :partial=>"organization", :locals=>{organization: header.legal_authenticator.organization, tag_name: "representedOrganization"} %>
|
79
|
+
</assignedEntity>
|
80
|
+
</legalAuthenticator>
|
81
|
+
<% else %>
|
82
|
+
<author>
|
83
|
+
<time value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
|
84
|
+
<assignedAuthor>
|
85
|
+
<!-- id extension="Cypress" root="2.16.840.1.113883.19.5"/ -->
|
86
|
+
<!-- NPI -->
|
87
|
+
<% if cms_compatibility %>
|
88
|
+
<% patient.provider_performances.each do |pp| -%>
|
89
|
+
<% pp.provider.cda_identifiers.each do |cda_id| -%>
|
90
|
+
<% if cda_id.root.eql?('2.16.840.1.113883.4.6') -%>
|
91
|
+
<id root="2.16.840.1.113883.4.6" extension="<%= cda_id.extension %>" />
|
92
|
+
<% end -%>
|
93
|
+
<% end -%>
|
94
|
+
<% end -%>
|
95
|
+
<% else %>
|
96
|
+
<id extension="FakeNPI" root="2.16.840.1.113883.4.6"/>
|
97
|
+
<% end %>
|
98
|
+
<addr>
|
99
|
+
<streetAddressLine>202 Burlington Rd.</streetAddressLine>
|
100
|
+
<city>Bedford</city>
|
101
|
+
<state>MA</state>
|
102
|
+
<postalCode>01730</postalCode>
|
103
|
+
<country>US</country>
|
104
|
+
</addr>
|
105
|
+
<telecom use="WP" value="tel:(781)271-3000"/>
|
106
|
+
<assignedAuthoringDevice>
|
107
|
+
<manufacturerModelName>Cypress</manufacturerModelName >
|
108
|
+
<softwareName>Cypress</softwareName >
|
109
|
+
</assignedAuthoringDevice >
|
110
|
+
</assignedAuthor>
|
111
|
+
</author>
|
112
|
+
<custodian>
|
113
|
+
<assignedCustodian>
|
114
|
+
<representedCustodianOrganization>
|
115
|
+
<!-- HQR Only -->
|
116
|
+
<% if cms_compatibility && reporting_program == 'HQR_EHR' %>
|
117
|
+
<id root="2.16.840.1.113883.4.336" extension="800890"/>
|
118
|
+
<% else %>
|
119
|
+
<id root="2.16.840.1.113883.19.5"/>
|
120
|
+
<% end %>
|
121
|
+
<name>Cypress Test Deck</name>
|
122
|
+
<telecom use="WP" value="tel:(781)271-3000"/>
|
123
|
+
<addr>
|
124
|
+
<streetAddressLine>202 Burlington Rd.</streetAddressLine>
|
125
|
+
<city>Bedford</city>
|
126
|
+
<state>MA</state>
|
127
|
+
<postalCode>01730</postalCode>
|
128
|
+
<country>US</country>
|
129
|
+
</addr>
|
130
|
+
</representedCustodianOrganization>
|
131
|
+
</assignedCustodian>
|
132
|
+
</custodian>
|
133
|
+
<!-- This needs to take reporting program into account EH/EP-->
|
134
|
+
<% if cms_compatibility %>
|
135
|
+
<informationRecipient>
|
136
|
+
<intendedRecipient>
|
137
|
+
<id root="2.16.840.1.113883.3.249.7" extension="<%= reporting_program %>"/>
|
138
|
+
</intendedRecipient>
|
139
|
+
</informationRecipient>
|
140
|
+
<% end %>
|
141
|
+
<legalAuthenticator>
|
142
|
+
<time value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
|
143
|
+
<signatureCode code="S"/>
|
144
|
+
<assignedEntity>
|
145
|
+
<id root="bc01a5d1-3a34-4286-82cc-43eb04c972a7"/>
|
146
|
+
<addr>
|
147
|
+
<streetAddressLine>202 Burlington Rd.</streetAddressLine>
|
148
|
+
<city>Bedford</city>
|
149
|
+
<state>MA</state>
|
150
|
+
<postalCode>01730</postalCode>
|
151
|
+
<country>US</country>
|
152
|
+
</addr>
|
153
|
+
<telecom use="WP" value="tel:(781)271-3000"/>
|
154
|
+
<assignedPerson>
|
155
|
+
<name>
|
156
|
+
<given>Henry</given>
|
157
|
+
<family>Seven</family>
|
158
|
+
</name>
|
159
|
+
</assignedPerson>
|
160
|
+
<representedOrganization>
|
161
|
+
<id root="2.16.840.1.113883.19.5"/>
|
162
|
+
<name>Cypress</name>
|
163
|
+
</representedOrganization>
|
164
|
+
</assignedEntity>
|
165
|
+
</legalAuthenticator>
|
166
|
+
<% end %>
|
167
|
+
|
168
|
+
<%== render :partial => 'providers', :locals => {:patient => patient} %>
|
169
|
+
|
170
|
+
<component>
|
171
|
+
<structuredBody>
|
172
|
+
<%== render :partial => 'measures', :locals => {:measures => measures, :patient => patient} %>
|
173
|
+
<%== render :partial => 'reporting_parameters', :locals => {:start_date => start_date, :end_date => end_date, :cms_compatibility => cms_compatibility} %>
|
174
|
+
<%== render :partial => 'patient_data', :locals => {:measures => measures, :patient => patient, :cms_compatibility => cms_compatibility, :qrda_version => qrda_version} %>
|
175
|
+
</structuredBody>
|
176
|
+
</component>
|
177
|
+
</ClinicalDocument>
|
178
|
+
<% else %>
|
179
|
+
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
180
|
+
xmlns="urn:hl7-org:v3"
|
181
|
+
xmlns:voc="urn:hl7-org:v3/voc"
|
182
|
+
xmlns:sdtc="urn:hl7-org:sdtc"/>
|
183
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<entry>
|
2
|
+
<observation classCode="OBS" moodCode="GOL">
|
3
|
+
<!-- Conforms to C-CDA R2 Goal Observation -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.121" />
|
5
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.1" extension="2016-02-01"/>
|
6
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
7
|
+
<%== code_display(entry,'value_set_map' => filtered_vs_map, 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
8
|
+
<text><%= entry.description %></text>
|
9
|
+
<statusCode code="active"/>
|
10
|
+
<effectiveTime>
|
11
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
12
|
+
</effectiveTime>
|
13
|
+
</observation>
|
14
|
+
</entry>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<entry>
|
2
|
+
<observation classCode="OBS" moodCode="EVN">
|
3
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.103" extension="2016-02-01"/>
|
4
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
5
|
+
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" />
|
6
|
+
<statusCode code="completed" />
|
7
|
+
<effectiveTime>
|
8
|
+
<!-- Attribute: Start Datetime -->
|
9
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
10
|
+
<!-- Attribute: Stop Datetime -->
|
11
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
12
|
+
</effectiveTime>
|
13
|
+
<%== code_display(entry, 'preferred_code_sets' => ['*'],
|
14
|
+
'tag_name' => 'value','value_set_map' => filtered_vs_map,
|
15
|
+
'extra_content' => "xsi:type=\"CD\" sdtc:valueSet=\"#{value_set_oid}\"") %>
|
16
|
+
</observation>
|
17
|
+
</entry>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<entry>
|
2
|
+
<act classCode="ACT" moodCode="RQO" <%== negation_indicator(entry) %>>
|
3
|
+
<!-- Discharge Medication Entry -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.105" extension="2016-02-01"/>
|
5
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
6
|
+
<code code="75311-1"
|
7
|
+
codeSystem="2.16.840.1.113883.6.1"
|
8
|
+
codeSystemName="LOINC"
|
9
|
+
displayName="Discharge medications"/>
|
10
|
+
<statusCode code="active"/>
|
11
|
+
<effectiveTime>
|
12
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
13
|
+
</effectiveTime>
|
14
|
+
<entryRelationship typeCode="SUBJ">
|
15
|
+
<substanceAdministration moodCode="EVN" classCode="SBADM">
|
16
|
+
<!-- Medication Activity (consolidation) template -->
|
17
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.16" extension="2014-06-09"/>
|
18
|
+
<!-- Medication, Active template -->
|
19
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.41" extension="2016-02-01"/>
|
20
|
+
|
21
|
+
<id root="<%= UUID.generate %>"/>
|
22
|
+
<text><%= entry.description %></text>
|
23
|
+
<statusCode code="active"/>
|
24
|
+
<effectiveTime xsi:type="IVL_TS">
|
25
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
26
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
27
|
+
</effectiveTime>
|
28
|
+
<% if entry.administrationTiming.present?
|
29
|
+
period = entry.administrationTiming['period'] %>
|
30
|
+
<effectiveTime xsi:type="PIVL_TS" institutionSpecified="true" operator="A">
|
31
|
+
<period value="<%= period['value']%>" unit="<%= period['unit']%>"/>
|
32
|
+
</effectiveTime>
|
33
|
+
<% end %>
|
34
|
+
<% if entry.route.present? -%>
|
35
|
+
<!-- Attribute: route -->
|
36
|
+
<% vset = oid_for_code(entry.route.code,field_oids["ROUTE"], entry.record["bundle_id"]) %>
|
37
|
+
<% if vset %>
|
38
|
+
<routeCode code="<%= entry.route['code'] %>" codeSystem="<%= HealthDataStandards::Util::CodeSystemHelper.oid_for_code_system(entry.route['code_system']) %>" sdtc:valueSet="<%= vset %>"/>
|
39
|
+
<% end %>
|
40
|
+
<% end -%>
|
41
|
+
|
42
|
+
<!-- Attribute: dose -->
|
43
|
+
<% if entry.dose.present? -%>
|
44
|
+
<doseQuantity value="<%= entry.dose['value']%>"/>
|
45
|
+
<% end -%>
|
46
|
+
|
47
|
+
<% if entry.product_form.present? -%>
|
48
|
+
<administrationUnitCode code="<%= entry.product_form['code'] %>" codeSystem="<%= entry.product_form['codeSystem'] %>"/>
|
49
|
+
<% end -%>
|
50
|
+
|
51
|
+
<consumable>
|
52
|
+
<manufacturedProduct classCode="MANU">
|
53
|
+
<!-- Medication Information (consolidation) template -->
|
54
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
|
55
|
+
<id root="<%= UUID.generate %>"/>
|
56
|
+
<manufacturedMaterial>
|
57
|
+
<%== code_display(entry,'preferred_code_sets' => ['RxNorm'],'value_set_map' => filtered_vs_map, 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
58
|
+
</manufacturedMaterial>
|
59
|
+
<manufacturerOrganization>
|
60
|
+
<name>Medication Factory Inc.</name>
|
61
|
+
</manufacturerOrganization>
|
62
|
+
</manufacturedProduct>
|
63
|
+
</consumable>
|
64
|
+
</substanceAdministration>
|
65
|
+
</entryRelationship>
|
66
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
67
|
+
</act>
|
68
|
+
</entry>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<entry typeCode="DRIV">
|
2
|
+
<organizer moodCode="EVN" classCode="CLUSTER">
|
3
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.45" extension="2015-08-01"/>
|
4
|
+
<!-- Family history organizer template -->
|
5
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.12" extension="2016-02-01"/>
|
6
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
7
|
+
<statusCode code="completed"/>
|
8
|
+
<effectiveTime>
|
9
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
10
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
11
|
+
</effectiveTime>
|
12
|
+
<!-- The subject is currently hardcoded to father -->
|
13
|
+
<subject>
|
14
|
+
<relatedSubject classCode="PRS">
|
15
|
+
<code code="FTH" displayName="Father"
|
16
|
+
codeSystemName="HL7RoleCode"
|
17
|
+
codeSystem="2.16.840.1.113883.5.111">
|
18
|
+
<translation code="9947008"
|
19
|
+
displayName="Biological father"
|
20
|
+
codeSystemName="SNOMED CT"
|
21
|
+
codeSystem="2.16.840.1.113883.6.96"/>
|
22
|
+
</code>
|
23
|
+
<subject>
|
24
|
+
<administrativeGenderCode
|
25
|
+
code="M" codeSystem="2.16.840.1.113883.5.1"
|
26
|
+
codeSystemName="HL7AdministrativeGender"
|
27
|
+
displayName="Male"/>
|
28
|
+
<birthTime value="1912"/>
|
29
|
+
</subject>
|
30
|
+
</relatedSubject>
|
31
|
+
</subject>
|
32
|
+
<component>
|
33
|
+
<observation classCode="OBS" moodCode="EVN">
|
34
|
+
<!-- Conforms to C-CDA R2.1 Family History Observation (V3) -->
|
35
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.46" extension="2015-08-01"/>
|
36
|
+
<!-- Family History QDM (V2) -->
|
37
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.112" extension="2016-12-01"/>
|
38
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
39
|
+
<code code="55607006" displayName="Problem" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96">
|
40
|
+
<translation code="55607006" displayName="Problem" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
|
41
|
+
</code>
|
42
|
+
<statusCode code="completed"/>
|
43
|
+
<effectiveTime>
|
44
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
45
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
46
|
+
</effectiveTime>
|
47
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map,'preferred_code_sets' => ['SNOMED-CT'],
|
48
|
+
'tag_name' => 'value',
|
49
|
+
'extra_content' => "xsi:type=\"CD\" sdtc:valueSet=\"#{value_set_oid}\"") %>
|
50
|
+
</observation>
|
51
|
+
</component>
|
52
|
+
</organizer>
|
53
|
+
</entry>
|