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,18 @@
|
|
1
|
+
<entry>
|
2
|
+
<!-- Patient Characteristic Payer -->
|
3
|
+
<observation classCode="OBS" moodCode="EVN">
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.55"/>
|
5
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
6
|
+
<code code="48768-6" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1" displayName="Payment source"/>
|
7
|
+
<statusCode code="completed"/>
|
8
|
+
<effectiveTime>
|
9
|
+
<!-- Attribute: Start Datetime -->
|
10
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
11
|
+
<% if entry.end_time %>
|
12
|
+
<high value="<%= time_if_not_nil(entry.end_time) %>" />
|
13
|
+
<% end %>
|
14
|
+
</effectiveTime>
|
15
|
+
<%== code_display(entry, 'preferred_code_sets' =>["SOP","Source of Payment Typology"] , 'tag_name' => 'value', 'extra_content' => "xsi:type=\"CD\" sdtc:valueSet=\"2.16.840.1.114222.4.11.3591\"") %>
|
16
|
+
|
17
|
+
</observation>
|
18
|
+
</entry>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
4
|
+
<entry>
|
5
|
+
<!-- Physical Exam Finding -->
|
6
|
+
<observation classCode="OBS" moodCode="EVN">
|
7
|
+
<!-- Result observation template -->
|
8
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.2" extension="2014-06-09"/>
|
9
|
+
<!-- Physical Exam, Finding template -->
|
10
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.57" extension="2014-12-01"/>
|
11
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
12
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['LOINC', 'SNOMED-CT'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
13
|
+
<text><%= entry.description %></text>
|
14
|
+
<statusCode code="completed"/>
|
15
|
+
|
16
|
+
<effectiveTime>
|
17
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
18
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
19
|
+
</effectiveTime>
|
20
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
21
|
+
</observation>
|
22
|
+
</entry>
|
23
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
4
|
+
<entry>
|
5
|
+
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
6
|
+
<!-- Procedure Activity Procedure (Consolidation) template -->
|
7
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.13" extension="2014-06-09"/>
|
8
|
+
<!-- Physical Exam, Performed template -->
|
9
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.59" extension="2016-02-01"/>
|
10
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
11
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM', 'LOINC'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
12
|
+
<text><%= entry.description %></text>
|
13
|
+
<statusCode code="completed"/>
|
14
|
+
<effectiveTime>
|
15
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
16
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
17
|
+
</effectiveTime>
|
18
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
19
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
20
|
+
</observation>
|
21
|
+
</entry>
|
22
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<entry>
|
2
|
+
<observation classCode="OBS" moodCode="EVN">
|
3
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.62" extension="2016-02-01"/>
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.104" extension="2016-02-01"/>
|
5
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
6
|
+
<code code="ASSERTION"
|
7
|
+
codeSystem="2.16.840.1.113883.5.4"
|
8
|
+
codeSystemName="ActCode"
|
9
|
+
displayName="Assertion"/>
|
10
|
+
<statusCode code="completed"/>
|
11
|
+
<effectiveTime>
|
12
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
13
|
+
</effectiveTime>
|
14
|
+
<value xsi:type="CD"
|
15
|
+
code="102460003"
|
16
|
+
codeSystem="2.16.840.1.113883.6.96"
|
17
|
+
codeSystemName="SNOMED CT"
|
18
|
+
displayName="Decreased tolerance"/>
|
19
|
+
<entryRelationship typeCode="CAUS" inversionInd="true">
|
20
|
+
<procedure classCode="PROC" moodCode="EVN">
|
21
|
+
<!-- Procedure performed template -->
|
22
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.64" extension="2016-02-01"/>
|
23
|
+
<!-- Procedure Activity Procedure-->
|
24
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
25
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
26
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['SNOMED-CT'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
27
|
+
<text><%= entry.description %></text>
|
28
|
+
<statusCode code="completed"/>
|
29
|
+
<effectiveTime>
|
30
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
31
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
32
|
+
</effectiveTime>
|
33
|
+
</procedure>
|
34
|
+
</entryRelationship>
|
35
|
+
</observation>
|
36
|
+
</entry>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<entry>
|
2
|
+
<procedure classCode="PROC" moodCode="RQO" <%== negation_indicator(entry) %>>
|
3
|
+
<!-- Consolidated Plan of Care Activity Procedure TemplateId (Implied Template) -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.41" extension="2014-06-09"/>
|
5
|
+
<!-- QRDA Procedure, Order TemplateId -->
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.63" extension="2016-02-01"/>
|
7
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
8
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['LOINC', 'SNOMED-CT', 'ICD-9-PCS', 'ICD-10-PCS'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
9
|
+
<text><%= entry.description %></text>
|
10
|
+
<statusCode code="active"/>
|
11
|
+
<!-- Attribute: datetime -->
|
12
|
+
<author>
|
13
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.119"/>
|
14
|
+
<time <%= value_or_null_flavor(entry.start_time) %>/>
|
15
|
+
<assignedAuthor>
|
16
|
+
<id nullFlavor="NA"/>
|
17
|
+
</assignedAuthor>
|
18
|
+
</author>
|
19
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
20
|
+
</procedure>
|
21
|
+
</entry>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<entry>
|
2
|
+
<procedure classCode="PROC" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
|
+
<!-- Procedure performed template -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.64" extension="2016-02-01"/>
|
5
|
+
<!-- Procedure Activity Procedure-->
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
7
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
8
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['*'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
9
|
+
<text><%= entry.description %></text>
|
10
|
+
<statusCode code="completed"/>
|
11
|
+
<effectiveTime>
|
12
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
13
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
14
|
+
</effectiveTime>
|
15
|
+
<%== render(:partial => 'ordinality', :locals => {:entry => entry, :ordinality_oids=>field_oids["ORDINAL"]}) %>
|
16
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
17
|
+
<% if entry.respond_to?(:incision_time) && entry.incision_time.present? -%>
|
18
|
+
<entryRelationship typeCode="REFR">
|
19
|
+
<procedure classCode="PROC" moodCode="EVN">
|
20
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.89"/>
|
21
|
+
<id root="1.3.6.1.4.1.115" extension="<%= identifier_for([entry.id, entry.incision_time]) %>" />
|
22
|
+
<code code="34896006"
|
23
|
+
codeSystem="2.16.840.1.113883.6.96"
|
24
|
+
codeSystemName="SNOMED CT"
|
25
|
+
displayName="incision"/>
|
26
|
+
<effectiveTime <%= value_or_null_flavor(entry.incision_time) %>/>
|
27
|
+
</procedure>
|
28
|
+
</entryRelationship>
|
29
|
+
<% end -%>
|
30
|
+
|
31
|
+
<% entry.values.each do |value| %>
|
32
|
+
<entryRelationship typeCode="REFR">
|
33
|
+
<observation classCode="OBS" moodCode="EVN">
|
34
|
+
<!-- Conforms to C-CDA R2 Result Observation (V2) -->
|
35
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.2" extension="2015-08-01"/>
|
36
|
+
<!-- Result (QRDA I R3) -->
|
37
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.87" extension="2016-02-01"/>
|
38
|
+
<id root="1.3.6.1.4.1.115" extension="<%= identifier_for(value) %>"/>
|
39
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['*'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
40
|
+
<statusCode code="completed"/>
|
41
|
+
<effectiveTime>
|
42
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
43
|
+
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
44
|
+
</effectiveTime>
|
45
|
+
<%== render(:partial=> 'result_value', :locals => {:values => [value]}) %>
|
46
|
+
|
47
|
+
</observation>
|
48
|
+
</entryRelationship>
|
49
|
+
<% end %>
|
50
|
+
</procedure>
|
51
|
+
</entry>
|
52
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<entry>
|
2
|
+
<procedure classCode="PROC" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
|
+
<!-- Procedure Activity Procedure -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
5
|
+
<!-- Device Applied -->
|
6
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.7" extension="2016-02-01"/>
|
7
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
8
|
+
<code code="360030002" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="application of device"/>
|
9
|
+
<text><%= entry.description %></text>
|
10
|
+
<statusCode code="completed"/>
|
11
|
+
|
12
|
+
<effectiveTime>
|
13
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
14
|
+
<high <%= value_or_null_flavor(entry.removal_time || entry.end_time) %>/>
|
15
|
+
</effectiveTime>
|
16
|
+
|
17
|
+
<% if entry.respond_to?(:anatomical_target) && entry.anatomical_target.present? -%>
|
18
|
+
<% vset = oid_for_code(entry.anatomical_target.code,field_oids["ANATOMICAL_LOCATION_SITE"], entry.record["bundle_id"]) %>
|
19
|
+
<% if vset %>
|
20
|
+
<targetSiteCode code="<%= entry.anatomical_target['code'] %>"
|
21
|
+
codeSystem="<%= HealthDataStandards::Util::CodeSystemHelper.oid_for_code_system(entry.anatomical_target['code_system']) %>" sdtc:valueSet="<%= vset %>"/>
|
22
|
+
<% end %>
|
23
|
+
<% end -%>
|
24
|
+
<participant typeCode="DEV">
|
25
|
+
<participantRole classCode="MANU">
|
26
|
+
<playingDevice classCode="DEV">
|
27
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['*'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
28
|
+
</playingDevice>
|
29
|
+
</participantRole>
|
30
|
+
</participant>
|
31
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
32
|
+
</procedure>
|
33
|
+
</entry>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<entry>
|
2
|
+
<act classCode="ACT" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
|
+
<!-- Transfer From Act -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.141"/>
|
5
|
+
<id root="<%= UUID.generate %>" />
|
6
|
+
<code code="ENC" codeSystem="2.16.840.1.113883.5.6" displayName="Encounter" codeSystemName="ActClass"/>
|
7
|
+
<entryRelationship typeCode="SUBJ">
|
8
|
+
<encounter classCode="ENC" moodCode="EVN">
|
9
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.81" extension="2016-02-01"/>
|
10
|
+
<id root="1.3.6.1.4.1.115" extension="<%= "#{entry.transferFrom.id}#{entry.id}".hash.abs.to_s(16) %>"/>
|
11
|
+
<code code="77305-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="transferred from"/>
|
12
|
+
<statusCode code="completed"/>
|
13
|
+
<participant typeCode="ORG">
|
14
|
+
<time>
|
15
|
+
<low <%= value_or_null_flavor(entry.transferFrom.time) %>/>
|
16
|
+
<high <%= value_or_null_flavor(entry.transferFrom.time) %>/>
|
17
|
+
</time>
|
18
|
+
<participantRole classCode="LOCE">
|
19
|
+
<%
|
20
|
+
entry.transferFrom.codes[entry.transferFrom.code_system] = [entry.transferFrom.code]
|
21
|
+
transfer_vs_map = [{"set"=>entry.transferFrom.code_system, "values"=>[entry.transferFrom.code]}]
|
22
|
+
transfer_oid = (data_criteria.field_values || {})['TRANSFER_FROM'].try(:code_list_id)
|
23
|
+
options = {'value_set_map' => transfer_vs_map, 'preferred_code_sets' => ['SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM', 'CPT']}
|
24
|
+
options['extra_content'] = "sdtc:valueSet=\"#{transfer_oid}\"" if transfer_oid
|
25
|
+
%>
|
26
|
+
<%== code_display(entry.transferFrom, options) %>
|
27
|
+
</participantRole>
|
28
|
+
</participant>
|
29
|
+
</encounter>
|
30
|
+
</entryRelationship>
|
31
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"], :r2_compatibility => r2_compatibility}) %>
|
32
|
+
</act>
|
33
|
+
</entry>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<entry>
|
2
|
+
<act classCode="ACT" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
|
+
<!-- Transfer To Act -->
|
4
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.142"/>
|
5
|
+
<id root="<%= UUID.generate %>" />
|
6
|
+
<code code="ENC" codeSystem="2.16.840.1.113883.5.6" displayName="Encounter" codeSystemName="ActClass"/>
|
7
|
+
<entryRelationship typeCode="SUBJ">
|
8
|
+
<encounter classCode="ENC" moodCode="EVN">
|
9
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.82" extension="2016-02-01"/>
|
10
|
+
<id root="1.3.6.1.4.1.115" extension="<%= "#{entry.transferTo.id}#{entry.id}".hash.abs.to_s(16) %>"/>
|
11
|
+
<code code="77306-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge disposition"/>
|
12
|
+
<statusCode code="completed"/>
|
13
|
+
<participant typeCode="DST">
|
14
|
+
<time>
|
15
|
+
<low <%= value_or_null_flavor(entry.transferTo.time) %>/>
|
16
|
+
<high <%= value_or_null_flavor(entry.transferTo.time) %>/>
|
17
|
+
</time>
|
18
|
+
<participantRole classCode="LOCE">
|
19
|
+
<%
|
20
|
+
entry.transferTo.codes[entry.transferTo.code_system] = [entry.transferTo.code]
|
21
|
+
transfer_vs_map = [{"set"=>entry.transferTo.code_system, "values"=>[entry.transferTo.code]}]
|
22
|
+
transfer_oid = (data_criteria.field_values || {})['TRANSFER_TO'].try(:code_list_id)
|
23
|
+
options = {'value_set_map' => transfer_vs_map, 'preferred_code_sets' => ['SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM', 'CPT']}
|
24
|
+
options['extra_content'] = "sdtc:valueSet=\"#{transfer_oid}\"" if transfer_oid
|
25
|
+
%>
|
26
|
+
<%== code_display(entry.transferTo, options) %>
|
27
|
+
</participantRole>
|
28
|
+
</participant>
|
29
|
+
</encounter>
|
30
|
+
</entryRelationship>
|
31
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"], :r2_compatibility => r2_compatibility}) %>
|
32
|
+
</act>
|
33
|
+
</entry>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<entry>
|
2
|
+
<act classCode="ACT" moodCode="RQO" <%== negation_indicator(entry) %>>
|
3
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.130"/>
|
4
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
5
|
+
<code code="SPLY" codeSystem="2.16.840.1.113883.5.6" displayName="Supply" codeSystemName="ActClass"/>
|
6
|
+
|
7
|
+
<entryRelationship typeCode="SUBJ">
|
8
|
+
<supply classCode="SPLY" moodCode="RQO">
|
9
|
+
<!-- Plan of Care Activity Supply -->
|
10
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.43" extension="2014-06-09"/>
|
11
|
+
<!-- Device, Order -->
|
12
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.9" extension="2016-02-01"/>
|
13
|
+
<id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
|
14
|
+
<text><%= entry.description %></text>
|
15
|
+
<statusCode code="active"/>
|
16
|
+
|
17
|
+
<effectiveTime xsi:type="IVL_TS">
|
18
|
+
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
19
|
+
<high <%= value_or_null_flavor(entry.removal_time || entry.end_time) %>/>
|
20
|
+
</effectiveTime>
|
21
|
+
|
22
|
+
<author>
|
23
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.119"/>
|
24
|
+
<time <%= value_or_null_flavor(entry.as_point_in_time) %>/>
|
25
|
+
<assignedAuthor>
|
26
|
+
<id nullFlavor="NA" root="<%= UUID.generate %>"/>
|
27
|
+
</assignedAuthor>
|
28
|
+
</author>
|
29
|
+
|
30
|
+
<participant typeCode="DEV">
|
31
|
+
<participantRole classCode="MANU">
|
32
|
+
<playingDevice classCode="DEV">
|
33
|
+
<%== code_display(entry, 'value_set_map' => filtered_vs_map, 'preferred_code_sets' => ['*'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
|
34
|
+
</playingDevice>
|
35
|
+
</participantRole>
|
36
|
+
</participant>
|
37
|
+
</supply>
|
38
|
+
</entryRelationship>
|
39
|
+
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
40
|
+
</act>
|
41
|
+
</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.51" 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="active" />
|
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,7 @@
|
|
1
|
+
<addr use="<%= address.use %>">
|
2
|
+
<streetAddressLine><%= address.street.join(' ') %></streetAddressLine>
|
3
|
+
<city><%= address.city %></city>
|
4
|
+
<state><%= address.state %></state>
|
5
|
+
<postalCode><%= address.zip %></postalCode>
|
6
|
+
<country><%= address.country %></country>
|
7
|
+
</addr>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<!-- SHALL have 1..* author. MAY be device or person.
|
2
|
+
The author of the CDA document in this example is a device at a data submission vendor/registry. -->
|
3
|
+
<author>
|
4
|
+
<time value="<%= author.time.to_formatted_s(:number) %>"/>
|
5
|
+
<assignedAuthor>
|
6
|
+
<!-- Registry author ID -->
|
7
|
+
<%== render :partial=>"id", :collection=>author.ids, :id=>"identifier" %>
|
8
|
+
<%== render :partial=>"address" , :collection=>author.addresses %>
|
9
|
+
<%== render :partial=>"telecom" , :collection=>author.telecoms %>
|
10
|
+
|
11
|
+
<% if author.person %>
|
12
|
+
<assignedPerson>
|
13
|
+
<name>
|
14
|
+
<given><%= author.person.given %></given>
|
15
|
+
<family><%= author.person.family %></family>
|
16
|
+
</name>
|
17
|
+
</assignedPerson>
|
18
|
+
<% elsif author.device %>
|
19
|
+
<assignedAuthoringDevice>
|
20
|
+
<manufacturerModelName><%= author.device.model %></manufacturerModelName>
|
21
|
+
<softwareName><%= author.device.name %></softwareName>
|
22
|
+
</assignedAuthoringDevice>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<%== render :partial=>"organization", :locals=>{organization: author.organization, tag_name: "representedOrganization"} %>
|
26
|
+
|
27
|
+
</assignedAuthor>
|
28
|
+
</author>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% if entry.references.present?
|
2
|
+
-%>
|
3
|
+
<% entry.references.each do |reference|
|
4
|
+
resolved_reference = reference.resolve_reference %>
|
5
|
+
<% if reference.type == "fulfills" %>
|
6
|
+
<sdtc:inFulfillmentOf1 typeCode="FLFS">
|
7
|
+
<sdtc:templateId root="2.16.840.1.113883.10.20.24.3.126" extension="2016-08-01"/>
|
8
|
+
<sdtc:actReference classCode="ACT" moodCode="<%= resolved_reference.mood_code %>">
|
9
|
+
<sdtc:id root="1.3.6.1.4.1.115" extension="<%= reference.referenced_id %>"/>
|
10
|
+
</sdtc:actReference>
|
11
|
+
</sdtc:inFulfillmentOf1>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
<% end -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
<id <%== identifier.root.nil? ? "" : "root='#{identifier.root}'" -%> extension="<%= identifier.extension %>"/>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
<component>
|
2
|
+
<section>
|
3
|
+
<!--
|
4
|
+
*****************************************************************
|
5
|
+
Measure Section
|
6
|
+
*****************************************************************
|
7
|
+
-->
|
8
|
+
<!-- This is the templateId for Measure Section -->
|
9
|
+
<templateId root="2.16.840.1.113883.10.20.24.2.2"/>
|
10
|
+
<!-- This is the templateId for Measure Section QDM -->
|
11
|
+
<templateId root="2.16.840.1.113883.10.20.24.2.3"/>
|
12
|
+
<!-- This is the LOINC code for "Measure document". This stays the same for all measure section required by QRDA standard -->
|
13
|
+
<code code="55186-1" codeSystem="2.16.840.1.113883.6.1"/>
|
14
|
+
<title>Measure Section</title>
|
15
|
+
<text>
|
16
|
+
<table border="1" width="100%">
|
17
|
+
<thead>
|
18
|
+
<tr>
|
19
|
+
<th>eMeasure Title</th>
|
20
|
+
<th>Version neutral identifier</th>
|
21
|
+
<th>eMeasure Version Number</th>
|
22
|
+
<th>Version specific identifier</th>
|
23
|
+
</tr>
|
24
|
+
</thead>
|
25
|
+
<tbody>
|
26
|
+
<% measures.each do |measure| -%>
|
27
|
+
<tr>
|
28
|
+
<td><%= measure.title %></td>
|
29
|
+
<td><%= measure.hqmf_set_id %></td>
|
30
|
+
<td><%= measure.hqmf_version_number %></td>
|
31
|
+
<td><%= measure.hqmf_id %></td>
|
32
|
+
<td></td>
|
33
|
+
</tr>
|
34
|
+
<% end -%>
|
35
|
+
</tbody>
|
36
|
+
</table>
|
37
|
+
</text>
|
38
|
+
<!-- 1..* Organizers, each containing a reference to an eMeasure -->
|
39
|
+
<% measures.each do |measure| -%>
|
40
|
+
<entry>
|
41
|
+
<organizer classCode="CLUSTER" moodCode="EVN">
|
42
|
+
<!-- This is the templateId for Measure Reference -->
|
43
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.98"/>
|
44
|
+
<!-- This is the templateId for eMeasure Reference QDM -->
|
45
|
+
<templateId root="2.16.840.1.113883.10.20.24.3.97"/>
|
46
|
+
<id root="1.3.6.1.4.1.115" extension="<%= measure['id'] %>"/>
|
47
|
+
<statusCode code="completed"/>
|
48
|
+
<!-- Containing isBranch external references -->
|
49
|
+
<reference typeCode="REFR">
|
50
|
+
<externalDocument classCode="DOC" moodCode="EVN">
|
51
|
+
<!-- SHALL: This is the version specific identifier for eMeasure: QualityMeasureDocument/id it is a GUID-->
|
52
|
+
<id root="2.16.840.1.113883.4.738" extension="<%= measure.hqmf_id %>"/>
|
53
|
+
<!-- SHOULD This is the title of the eMeasure -->
|
54
|
+
<text><%= measure.title %></text>
|
55
|
+
<!-- SHOULD: setId is the eMeasure version neutral id -->
|
56
|
+
<setId root="<%= measure.hqmf_set_id %>"/>
|
57
|
+
<!-- This is the sequential eMeasure Version number -->
|
58
|
+
<versionNumber value="<%= measure.hqmf_version_number %>"/>
|
59
|
+
</externalDocument>
|
60
|
+
</reference>
|
61
|
+
</organizer>
|
62
|
+
|
63
|
+
<% # Only want the epxected values when running from Bonnie
|
64
|
+
if patient.respond_to?('expected_values_for_qrda_export') -%>
|
65
|
+
<component>
|
66
|
+
<%
|
67
|
+
# # Going to assume that any expected_value > 0 is a TRUE
|
68
|
+
# # As per HL7 CDA R2:QRDA I, R1, STU Release 3.1, US Realm, Vol. 2 —Templates and Supporting Material
|
69
|
+
# # Set negationInd="false" to assert true (that the criteria are met by the included data). Set negationInd="true" to assert false (that the criteria are not met by the included data).
|
70
|
+
# # QRDA expects IPOP instead of IPP.
|
71
|
+
qrda_expected_values = patient.expected_values_for_qrda_export(measure)
|
72
|
+
qrda_expected_values.each do |qev| -%>
|
73
|
+
<observation classCode="OBS" moodCode="EVN" negationInd="<%= qev[:expected_value] == '0' ? 'true' : 'false' %>">
|
74
|
+
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
|
75
|
+
<value xsi:type="CD"
|
76
|
+
code="<%= qev[:code] == 'IPP' ? 'IPOP' : qev[:code] %>"
|
77
|
+
codeSystem="2.16.840.1.113883.5.4"
|
78
|
+
codeSystemName="ActCode"
|
79
|
+
displayName="<%= qev[:display_name] %>"/>
|
80
|
+
<!-- Explicit reference to the eMeasure population (because some eMeasures have multiple Numerators, etc -->
|
81
|
+
<reference typeCode="REFR">
|
82
|
+
<externalObservation classCode="OBS" moodCode="EVN">
|
83
|
+
<id root="<%= qev[:hqmf_id] %>"/>
|
84
|
+
</externalObservation>
|
85
|
+
</reference>
|
86
|
+
</observation>
|
87
|
+
<% end -%>
|
88
|
+
</component>
|
89
|
+
<% end -%>
|
90
|
+
</entry>
|
91
|
+
<% end -%>
|
92
|
+
</section>
|
93
|
+
</component>
|