cancer_registry_reporting_test_kit 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/config/presets/hdea_report_preset.json +14 -0
- data/config/presets/inferno_reference_server_preset.json.erb +84 -0
- data/lib/cancer_registry_reporting_test_kit/bundle_parse.rb +161 -0
- data/lib/cancer_registry_reporting_test_kit/docs/ehr_suite_description.md +134 -0
- data/lib/cancer_registry_reporting_test_kit/docs/hdea_suite_description.md +108 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/ehr_capability_statement/mcode_capability_statement_profile_support.rb +40 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/ehr_data_access_group.rb +131 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/medication_administration_must_support_test.rb +43 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/medication_administration_search_test.rb +51 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/medication_administration_validation_test.rb +41 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/metadata.yml +72 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration_group.rb +72 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/medication_request_must_support_test.rb +55 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/medication_request_search_test.rb +55 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/medication_request_validation_test.rb +38 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/metadata.yml +94 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request_group.rb +73 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_cancer_condition_group.rb +73 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/metadata.yml +100 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/primary_cancer_condition_must_support_test.rb +50 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/primary_cancer_condition_search_test.rb +70 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/primary_cancer_condition_validation_test.rb +39 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/metadata.yml +99 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/radiotherapy_procedure_must_support_test.rb +46 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/radiotherapy_procedure_search_test.rb +51 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/radiotherapy_procedure_validation_test.rb +37 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure_group.rb +83 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_cancer_condition_group.rb +68 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/metadata.yml +102 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/secondary_cancer_condition_must_support_test.rb +50 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/secondary_cancer_condition_search_test.rb +70 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/secondary_cancer_condition_validation_test.rb +39 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/metadata.yml +65 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/tnm_distant_metastases_category_must_support_test.rb +44 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/tnm_distant_metastases_category_search_test.rb +69 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/tnm_distant_metastases_category_validation_test.rb +39 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category_group.rb +74 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/metadata.yml +64 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/tnm_primary_tumor_category_must_support_test.rb +44 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/tnm_primary_tumor_category_search_test.rb +69 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/tnm_primary_tumor_category_validation_test.rb +39 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category_group.rb +73 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/metadata.yml +64 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/tnm_regional_nodes_category_must_support_test.rb +44 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/tnm_regional_nodes_category_search_test.rb +69 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/tnm_regional_nodes_category_validation_test.rb +39 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category_group.rb +73 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/metadata.yml +68 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/tnm_stage_group_must_support_test.rb +45 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/tnm_stage_group_search_test.rb +69 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/tnm_stage_group_validation_test.rb +39 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group_group.rb +72 -0
- data/lib/cancer_registry_reporting_test_kit/ehr_suite.rb +69 -0
- data/lib/cancer_registry_reporting_test_kit/fhir_resource_navigation.rb +174 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/group_generator.rb +47 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/group_metadata.rb +86 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/group_metadata_extractor.rb +205 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_loader.rb +78 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_metadata.rb +26 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_metadata_extractor.rb +78 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_resources.rb +56 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/must_support_metadata_extractor.rb +399 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/must_support_test_generator.rb +134 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/naming.rb +168 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/special_cases.rb +43 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/templates/must_support.rb.erb +41 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/templates/validation.rb.erb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/terminology_binding_metadata_extractor.rb +118 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/validation_test_generator.rb +125 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator/value_extractor.rb +134 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_generator.rb +66 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/author_validation_test.rb +61 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/organization_metadata.yml +47 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/organization_must_support_test.rb +73 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_metadata.yml +51 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_must_support_test.rb +73 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_role_metadata.yml +48 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_role_must_support_test.rb +66 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/bundle_resources_group.rb +213 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/ccrr_content_bundle_parse_and_validation_test.rb +67 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/allergy_intolerance/allergy_intolerance_must_support_test.rb +46 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/allergy_intolerance/allergy_intolerance_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/allergy_intolerance/metadata.yml +36 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/care_plan_must_support_test.rb +48 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/care_plan_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/metadata.yml +50 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/ccrr_content_bundle/ccrr_content_bundle_must_support_test.rb +43 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/ccrr_content_bundle/metadata.yml +36 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/central_cancer_registry_primary_cancer_condition/central_cancer_registry_primary_cancer_condition_must_support_test.rb +59 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/central_cancer_registry_primary_cancer_condition/central_cancer_registry_primary_cancer_condition_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/central_cancer_registry_primary_cancer_condition/metadata.yml +86 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/composition/composition_must_support_test.rb +109 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/composition/composition_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/composition/metadata.yml +272 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/condition/condition_must_support_test.rb +45 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/condition/condition_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/condition/metadata.yml +33 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_lab/diagnostic_report_lab_must_support_test.rb +49 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_lab/diagnostic_report_lab_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_lab/metadata.yml +57 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_note/diagnostic_report_note_must_support_test.rb +53 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_note/diagnostic_report_note_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_note/metadata.yml +75 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/document_reference/document_reference_must_support_test.rb +57 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/document_reference/document_reference_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/document_reference/metadata.yml +68 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/encounter/encounter_must_support_test.rb +59 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/encounter/encounter_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/encounter/metadata.yml +73 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_radiotherapy_course_summary/mcode_radiotherapy_course_summary_must_support_test.rb +52 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_radiotherapy_course_summary/mcode_radiotherapy_course_summary_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_radiotherapy_course_summary/metadata.yml +59 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_secondary_cancer_condition/mcode_secondary_cancer_condition_must_support_test.rb +56 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_secondary_cancer_condition/mcode_secondary_cancer_condition_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_secondary_cancer_condition/metadata.yml +77 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_tnm_stage_group/mcode_tnm_stage_group_must_support_test.rb +48 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_tnm_stage_group/mcode_tnm_stage_group_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_tnm_stage_group/metadata.yml +46 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication/medication_must_support_test.rb +41 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication/medication_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication/metadata.yml +26 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_administration/medication_administration_must_support_test.rb +48 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_administration/medication_administration_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_administration/metadata.yml +48 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_request/medication_request_must_support_test.rb +57 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_request/medication_request_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_request/metadata.yml +86 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_statement/medication_statement_must_support_test.rb +41 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_statement/medication_statement_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_statement/metadata.yml +26 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation/metadata.yml +26 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation/observation_must_support_test.rb +41 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation/observation_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation_lab/metadata.yml +53 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation_lab/observation_lab_must_support_test.rb +50 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation_lab/observation_lab_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/odh_usual_work/metadata.yml +81 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/odh_usual_work/odh_usual_work_must_support_test.rb +49 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/odh_usual_work/odh_usual_work_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/organization/metadata.yml +46 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/organization/organization_must_support_test.rb +55 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/organization/organization_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/patient/metadata.yml +51 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/patient/patient_must_support_test.rb +58 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/patient/patient_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner/metadata.yml +50 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner/practitioner_must_support_test.rb +55 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner/practitioner_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner_role/metadata.yml +47 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner_role/practitioner_role_must_support_test.rb +49 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner_role/practitioner_role_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/procedure/metadata.yml +37 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/procedure/procedure_must_support_test.rb +44 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/procedure/procedure_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/service_request/metadata.yml +26 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/service_request/service_request_must_support_test.rb +41 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/service_request/service_request_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/smokingstatus/metadata.yml +58 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/smokingstatus/smokingstatus_must_support_test.rb +47 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/smokingstatus/smokingstatus_validation_test.rb +35 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite.rb +80 -0
- data/lib/cancer_registry_reporting_test_kit/igs/README.md +21 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-cancer-related-medication-administration.json +1905 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-cancer-related-medication-request.json +3611 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-primary-cancer-condition.json +2246 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-radiotherapy-course-summary.json +2700 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-secondary-cancer-condition.json +2419 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-distant-metastases-category.json +2320 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-primary-tumor-category.json +2320 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-regional-nodes-category.json +2320 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-stage-group.json +2414 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-medicationstatement.profile.json +1578 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-observation.profile.json +3510 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-odh-UsualWork.json +7248 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-servicerequest.profile.json +3048 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-allergyintolerance.json +1842 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-careplan.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-condition.json +2154 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-diagnosticreport-lab.json +2002 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-diagnosticreport-note.json +2049 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-documentreference.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-encounter.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-medication.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-observation-lab.json +3153 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-organization.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-patient.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-practitioner.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-practitionerrole.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-procedure.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-smokingstatus.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100.tgz +0 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/.index.db +0 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/.index.json +4 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/CapabilityStatement-central-cancer-registry-reporting-ehr.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/ImplementationGuide-hl7.fhir.us.central-cancer-registry-reporting.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-cancer-encounter.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-cancer-patient.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-composition.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-content-bundle.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-plandefinition.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-reporting-bundle.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-central-cancer-registry-primary-cancer-condition.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-central-cancer-registry-reporting-messageheader.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-us-ph-patient.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-us-ph-tribal-affiliation-extension.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/ValueSet-cancer-core-reportability-codes.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/AllergyIntolerance-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/BodyStructure-jenny-m-chest-wall-lymph-nodes-treatment-volume.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/BodyStructure-jenny-m-chest-wall-treatment-volume.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Bundle-ccrr-content-bundle-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Bundle-central-cancer-registry-reporting-specification-bundle-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Bundle-reporting-bundle-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Composition-ccrr-composition-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Condition-primary-cancer-condition-breast.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Encounter-encounter-cancer-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Endpoint-example-healthcare-endpoint.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Endpoint-example-ph-endpoint.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/MedicationAdministration-cancer-related-medication-administration-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/MessageHeader-messageheader-example-reportheader.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-cancer-stage-group-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-tnm-clinical-distant-metastases-category-cM0.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-tnm-clinical-primary-tumor-category-cT3.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-tnm-clinical-regional-nodes-category-cN3.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Organization-example-healthcare-org.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Organization-example-pha-org.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Patient-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/PlanDefinition-plandefinition-central-cancer-registry-reporting-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Practitioner-1.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/example/Procedure-radiotherapy-example.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/openapi/central-cancer-registry-reporting-ehr.openapi.json +364 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/other/ig-r4.jsonX +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/other/spec.internals +293 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/other/validation-oo.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/other/validation-summary.json +1 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/package.json +30 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-cancer-encounter.sch +19 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-cancer-patient.sch +175 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-composition.sch +61 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-content-bundle.sch +12 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-plandefinition.sch +331 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-reporting-bundle.sch +12 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-central-cancer-registry-primary-cancer-condition.sch +31 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-central-cancer-registry-reporting-messageheader.sch +27 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-us-ph-patient.sch +217 -0
- data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-us-ph-tribal-affiliation-extension.sch +36 -0
- data/lib/cancer_registry_reporting_test_kit/metadata.rb +71 -0
- data/lib/cancer_registry_reporting_test_kit/must_support_test.rb +263 -0
- data/lib/cancer_registry_reporting_test_kit/primitive_type.rb +7 -0
- data/lib/cancer_registry_reporting_test_kit/requirements/cancer-registry-reporting-test-kit_out_of_scope_requirements.csv +77 -0
- data/lib/cancer_registry_reporting_test_kit/requirements/cancer-registry-reporting-test-kit_requirements.csv +162 -0
- data/lib/cancer_registry_reporting_test_kit/requirements/generated/cancer-registry-reporting-test-kit_requirements_coverage.csv +161 -0
- data/lib/cancer_registry_reporting_test_kit/search_test.rb +897 -0
- data/lib/cancer_registry_reporting_test_kit/search_test_properties.rb +58 -0
- data/lib/cancer_registry_reporting_test_kit/validation_test.rb +68 -0
- data/lib/cancer_registry_reporting_test_kit/version.rb +6 -0
- data/lib/cancer_registry_reporting_test_kit.rb +6 -0
- data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +284 -0
- data/lib/requirements_config.yaml +22 -0
- metadata +341 -0
@@ -0,0 +1,213 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'generated/v1.0.0/ccrr_content_bundle/ccrr_content_bundle_must_support_test'
|
4
|
+
require_relative 'ccrr_content_bundle_parse_and_validation_test'
|
5
|
+
require_relative 'generated/v1.0.0/composition/composition_validation_test'
|
6
|
+
require_relative 'generated/v1.0.0/composition/composition_must_support_test'
|
7
|
+
|
8
|
+
require_relative 'author/author_validation_test'
|
9
|
+
require_relative 'generated/v1.0.0/allergy_intolerance/allergy_intolerance_validation_test'
|
10
|
+
require_relative 'generated/v1.0.0/care_plan/care_plan_validation_test'
|
11
|
+
require_relative 'generated/v1.0.0/central_cancer_registry_primary_cancer_condition/central_cancer_registry_primary_cancer_condition_validation_test'
|
12
|
+
require_relative 'generated/v1.0.0/condition/condition_validation_test'
|
13
|
+
require_relative 'generated/v1.0.0/diagnostic_report_lab/diagnostic_report_lab_validation_test'
|
14
|
+
require_relative 'generated/v1.0.0/diagnostic_report_note/diagnostic_report_note_validation_test'
|
15
|
+
require_relative 'generated/v1.0.0/document_reference/document_reference_validation_test'
|
16
|
+
require_relative 'generated/v1.0.0/encounter/encounter_validation_test'
|
17
|
+
require_relative 'generated/v1.0.0/mcode_radiotherapy_course_summary/mcode_radiotherapy_course_summary_validation_test'
|
18
|
+
require_relative 'generated/v1.0.0/mcode_secondary_cancer_condition/mcode_secondary_cancer_condition_validation_test'
|
19
|
+
require_relative 'generated/v1.0.0/mcode_tnm_stage_group/mcode_tnm_stage_group_validation_test'
|
20
|
+
require_relative 'generated/v1.0.0/medication/medication_validation_test'
|
21
|
+
require_relative 'generated/v1.0.0/medication_administration/medication_administration_validation_test'
|
22
|
+
require_relative 'generated/v1.0.0/medication_request/medication_request_validation_test'
|
23
|
+
require_relative 'generated/v1.0.0/medication_statement/medication_statement_validation_test'
|
24
|
+
require_relative 'generated/v1.0.0/observation/observation_validation_test'
|
25
|
+
require_relative 'generated/v1.0.0/observation_lab/observation_lab_validation_test'
|
26
|
+
require_relative 'generated/v1.0.0/odh_usual_work/odh_usual_work_validation_test'
|
27
|
+
require_relative 'generated/v1.0.0/patient/patient_validation_test'
|
28
|
+
require_relative 'generated/v1.0.0/procedure/procedure_validation_test'
|
29
|
+
require_relative 'generated/v1.0.0/service_request/service_request_validation_test'
|
30
|
+
require_relative 'generated/v1.0.0/smokingstatus/smokingstatus_validation_test'
|
31
|
+
|
32
|
+
require_relative 'author/organization_must_support_test'
|
33
|
+
require_relative 'author/practitioner_must_support_test'
|
34
|
+
require_relative 'author/practitioner_role_must_support_test'
|
35
|
+
require_relative 'generated/v1.0.0/allergy_intolerance/allergy_intolerance_must_support_test'
|
36
|
+
require_relative 'generated/v1.0.0/care_plan/care_plan_must_support_test'
|
37
|
+
require_relative 'generated/v1.0.0/central_cancer_registry_primary_cancer_condition/central_cancer_registry_primary_cancer_condition_must_support_test' # rubocop:disable Layout/LineLength
|
38
|
+
require_relative 'generated/v1.0.0/condition/condition_must_support_test'
|
39
|
+
require_relative 'generated/v1.0.0/diagnostic_report_lab/diagnostic_report_lab_must_support_test'
|
40
|
+
require_relative 'generated/v1.0.0/diagnostic_report_note/diagnostic_report_note_must_support_test'
|
41
|
+
require_relative 'generated/v1.0.0/document_reference/document_reference_must_support_test'
|
42
|
+
require_relative 'generated/v1.0.0/encounter/encounter_must_support_test'
|
43
|
+
require_relative 'generated/v1.0.0/mcode_radiotherapy_course_summary/mcode_radiotherapy_course_summary_must_support_test'
|
44
|
+
require_relative 'generated/v1.0.0/mcode_secondary_cancer_condition/mcode_secondary_cancer_condition_must_support_test'
|
45
|
+
require_relative 'generated/v1.0.0/mcode_tnm_stage_group/mcode_tnm_stage_group_must_support_test'
|
46
|
+
require_relative 'generated/v1.0.0/medication/medication_must_support_test'
|
47
|
+
require_relative 'generated/v1.0.0/medication_administration/medication_administration_must_support_test'
|
48
|
+
require_relative 'generated/v1.0.0/medication_request/medication_request_must_support_test'
|
49
|
+
require_relative 'generated/v1.0.0/medication_statement/medication_statement_must_support_test'
|
50
|
+
require_relative 'generated/v1.0.0/observation/observation_must_support_test'
|
51
|
+
require_relative 'generated/v1.0.0/observation_lab/observation_lab_must_support_test'
|
52
|
+
require_relative 'generated/v1.0.0/odh_usual_work/odh_usual_work_must_support_test'
|
53
|
+
require_relative 'generated/v1.0.0/patient/patient_must_support_test'
|
54
|
+
require_relative 'generated/v1.0.0/procedure/procedure_must_support_test'
|
55
|
+
require_relative 'generated/v1.0.0/service_request/service_request_must_support_test'
|
56
|
+
require_relative 'generated/v1.0.0/smokingstatus/smokingstatus_must_support_test'
|
57
|
+
|
58
|
+
module CancerRegistryReportingTestKit
|
59
|
+
class ReportValidationTestsGroup < Inferno::TestGroup
|
60
|
+
title 'Cancer Registry Report Content'
|
61
|
+
short_description 'Verify report generation requirements are met.'
|
62
|
+
description %(
|
63
|
+
# Background
|
64
|
+
|
65
|
+
These tests verify that the system under test can generate conformant and complete cancer reports
|
66
|
+
following the requirements in the [Central Cancer Registry Reporting Content Bundle profile](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-content-bundle.html).
|
67
|
+
The tester will provide a list of Bundles generated by the system under test in the **Cancer Reports** input.
|
68
|
+
Inferno will verify the conformance of each report and that the set of reports contains examples
|
69
|
+
of all sections and each element that the Bundle profile and referenced profiles indicate must be supported.
|
70
|
+
|
71
|
+
# Testing Methodology
|
72
|
+
The provided Bundles are parsed and the individual resources within them are separated out
|
73
|
+
and assigned a target profile based on the section within the Composition in which they appear.
|
74
|
+
Bundles without Composition instances in the first entry will cause the tests to fail and
|
75
|
+
will not be analyzed.
|
76
|
+
|
77
|
+
## Profile Validation
|
78
|
+
Each resource extracted from the bundles is expected to conform to
|
79
|
+
its target profile. Each element in each resource is checked against
|
80
|
+
teminology binding and cardinality requirements by the HL7 FHIR validator.
|
81
|
+
|
82
|
+
## Must Support
|
83
|
+
Must Support tests in this group check that each element of the target profile marked
|
84
|
+
as "must support" is observed at least once across instances assigned to that profile.
|
85
|
+
If one or more elements are not observed, the test will fail.
|
86
|
+
)
|
87
|
+
|
88
|
+
verifies_requirements 'hl7.fhir.us.central-cancer-registry-reporting_1.0.0@68',
|
89
|
+
'hl7.fhir.us.central-cancer-registry-reporting_1.0.0@102'
|
90
|
+
|
91
|
+
id :ccrr_report_resources
|
92
|
+
run_as_group
|
93
|
+
|
94
|
+
group do
|
95
|
+
title 'Report'
|
96
|
+
test from: :ccrr_v100_ccrr_content_bundle_parse_and_validation_test
|
97
|
+
test from: :ccrr_v100_ccrr_content_bundle_must_support_test
|
98
|
+
test from: :ccrr_v100_composition_validation_test
|
99
|
+
test from: :ccrr_v100_composition_must_support_test
|
100
|
+
end
|
101
|
+
|
102
|
+
group do
|
103
|
+
title 'Referenced Patient'
|
104
|
+
test from: :ccrr_v100_patient_validation_test
|
105
|
+
test from: :ccrr_v100_patient_must_support_test
|
106
|
+
end
|
107
|
+
|
108
|
+
group do
|
109
|
+
title 'Referenced Encounter'
|
110
|
+
test from: :ccrr_v100_encounter_validation_test
|
111
|
+
test from: :ccrr_v100_encounter_must_support_test
|
112
|
+
end
|
113
|
+
|
114
|
+
group do
|
115
|
+
title 'Referenced Author'
|
116
|
+
test from: :ccrr_v100_author_validation_test
|
117
|
+
test from: :ccrr_v100_organization_must_support_test
|
118
|
+
test from: :ccrr_v100_practitioner_must_support_test
|
119
|
+
test from: :ccrr_v100_practitioner_role_must_support_test
|
120
|
+
end
|
121
|
+
|
122
|
+
group do
|
123
|
+
title 'Primary Cancer Condition Section'
|
124
|
+
test from: :ccrr_v100_central_cancer_registry_primary_cancer_condition_validation_test
|
125
|
+
test from: :ccrr_v100_central_cancer_registry_primary_cancer_condition_must_support_test
|
126
|
+
end
|
127
|
+
|
128
|
+
group do
|
129
|
+
title 'Secondary Cancer Condition Section'
|
130
|
+
test from: :ccrr_v100_mcode_secondary_cancer_condition_validation_test
|
131
|
+
test from: :ccrr_v100_mcode_secondary_cancer_condition_must_support_test
|
132
|
+
end
|
133
|
+
|
134
|
+
group do
|
135
|
+
title 'Cancer Stage Group Section'
|
136
|
+
test from: :ccrr_v100_mcode_tnm_stage_group_validation_test
|
137
|
+
test from: :ccrr_v100_mcode_tnm_stage_group_must_support_test
|
138
|
+
end
|
139
|
+
|
140
|
+
group do
|
141
|
+
title 'Radiotherapy Course Summary Section'
|
142
|
+
test from: :ccrr_v100_mcode_radiotherapy_course_summary_validation_test
|
143
|
+
test from: :ccrr_v100_mcode_radiotherapy_course_summary_must_support_test
|
144
|
+
end
|
145
|
+
|
146
|
+
group do
|
147
|
+
title 'Problems Section'
|
148
|
+
test from: :ccrr_v100_condition_validation_test
|
149
|
+
test from: :ccrr_v100_condition_must_support_test
|
150
|
+
end
|
151
|
+
|
152
|
+
group do
|
153
|
+
title 'Allergies Section'
|
154
|
+
test from: :ccrr_v100_allergy_intolerance_validation_test
|
155
|
+
test from: :ccrr_v100_allergy_intolerance_must_support_test
|
156
|
+
end
|
157
|
+
|
158
|
+
group do
|
159
|
+
title 'Medications Administered and Medications Sections'
|
160
|
+
test from: :ccrr_v100_medication_administration_validation_test
|
161
|
+
test from: :ccrr_v100_medication_administration_must_support_test
|
162
|
+
test from: :ccrr_v100_medication_statement_validation_test
|
163
|
+
test from: :ccrr_v100_medication_statement_must_support_test
|
164
|
+
test from: :ccrr_v100_medication_validation_test
|
165
|
+
test from: :ccrr_v100_medication_must_support_test
|
166
|
+
end
|
167
|
+
|
168
|
+
group do
|
169
|
+
title 'Occupational Data Section'
|
170
|
+
test from: :ccrr_v100_odh_usual_work_validation_test
|
171
|
+
test from: :ccrr_v100_odh_usual_work_must_support_test
|
172
|
+
end
|
173
|
+
|
174
|
+
group do
|
175
|
+
title 'Results Section'
|
176
|
+
test from: :ccrr_v100_observation_lab_validation_test
|
177
|
+
test from: :ccrr_v100_observation_lab_must_support_test
|
178
|
+
test from: :ccrr_v100_diagnostic_report_lab_validation_test
|
179
|
+
test from: :ccrr_v100_diagnostic_report_lab_must_support_test
|
180
|
+
end
|
181
|
+
|
182
|
+
group do
|
183
|
+
title 'Notes Section'
|
184
|
+
test from: :ccrr_v100_document_reference_validation_test
|
185
|
+
test from: :ccrr_v100_document_reference_must_support_test
|
186
|
+
test from: :ccrr_v100_diagnostic_report_note_validation_test
|
187
|
+
test from: :ccrr_v100_diagnostic_report_note_must_support_test
|
188
|
+
end
|
189
|
+
|
190
|
+
group do
|
191
|
+
title 'Plan of Treatment Section'
|
192
|
+
test from: :ccrr_v100_medication_request_validation_test
|
193
|
+
test from: :ccrr_v100_medication_request_must_support_test
|
194
|
+
test from: :ccrr_v100_service_request_validation_test
|
195
|
+
test from: :ccrr_v100_service_request_must_support_test
|
196
|
+
test from: :ccrr_v100_care_plan_validation_test
|
197
|
+
test from: :ccrr_v100_care_plan_must_support_test
|
198
|
+
test from: :ccrr_v100_procedure_validation_test
|
199
|
+
test from: :ccrr_v100_procedure_must_support_test
|
200
|
+
end
|
201
|
+
|
202
|
+
group do
|
203
|
+
title 'Vital Signs Section'
|
204
|
+
test from: :ccrr_v100_observation_validation_test
|
205
|
+
test from: :ccrr_v100_observation_must_support_test
|
206
|
+
end
|
207
|
+
group do
|
208
|
+
title 'Social History Section'
|
209
|
+
test from: :ccrr_v100_smokingstatus_validation_test
|
210
|
+
test from: :ccrr_v100_smokingstatus_must_support_test
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../validation_test'
|
4
|
+
require_relative '../hdea_generator/naming'
|
5
|
+
require_relative '../bundle_parse'
|
6
|
+
|
7
|
+
module CancerRegistryReportingTestKit
|
8
|
+
module HDEAV100
|
9
|
+
class CcrrContentBundleParseAndValidationTest < Inferno::Test
|
10
|
+
include CancerRegistryReportingTestKit::ValidationTest
|
11
|
+
include CancerRegistryReportingTestKit::HDEABundleParse
|
12
|
+
|
13
|
+
id :ccrr_v100_ccrr_content_bundle_parse_and_validation_test
|
14
|
+
title 'Central Cancer Registry Content Bundle profile conformance'
|
15
|
+
description %(
|
16
|
+
This test confirms that the tester provided one or more Bundles in the **Cancer Reports** input
|
17
|
+
and that they each follow the sturcture of and conform to the
|
18
|
+
[Central Cancer Registry Content Bundle profile](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-content-bundle.html).
|
19
|
+
Note that this test does not include conformance checks for the entries within the Bundle, which
|
20
|
+
are handled by subsequent tests.
|
21
|
+
)
|
22
|
+
|
23
|
+
def add_ms_resources_to_scratch(reports)
|
24
|
+
reports.each_with_index do |bundle, index|
|
25
|
+
parsed_bundle = parse_bundle(FHIR.from_contents(bundle.to_json), index).first
|
26
|
+
next unless parsed_bundle.present?
|
27
|
+
|
28
|
+
report_hash = url_keys_to_group_keys(parsed_bundle)
|
29
|
+
report_hash.each do |group, resources|
|
30
|
+
next unless resources.present?
|
31
|
+
|
32
|
+
scratch[group] ||= {}
|
33
|
+
scratch[group][:all] ||= []
|
34
|
+
scratch[group][:all].concat(resources)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def url_keys_to_group_keys(report_hash)
|
40
|
+
report_hash.transform_keys { |key| :"#{HdeaGenerator::Naming.snake_case_for_url(key)}" }
|
41
|
+
end
|
42
|
+
|
43
|
+
def resource_type
|
44
|
+
'Bundle'
|
45
|
+
end
|
46
|
+
|
47
|
+
def scratch_resources
|
48
|
+
scratch[:ccrr_content_bundle_resources] ||= {}
|
49
|
+
end
|
50
|
+
|
51
|
+
run do
|
52
|
+
add_ms_resources_to_scratch(JSON.parse("[#{reports}]").flatten.compact)
|
53
|
+
find_validation_errors(scratch_resources[:all] || [],
|
54
|
+
'http://hl7.org/fhir/us/central-cancer-registry-reporting/StructureDefinition/ccrr-content-bundle',
|
55
|
+
'1.0.0',
|
56
|
+
skip_if_empty: true)
|
57
|
+
|
58
|
+
# filter errors related to entry resources - these are handled elsewhere
|
59
|
+
messages.reject! { |message| /Bundle\.entry\[\d+\]\.resource/.match(message[:message]) }
|
60
|
+
|
61
|
+
errors_found = messages.any? { |message| message[:type] == 'error' }
|
62
|
+
|
63
|
+
assert !errors_found, 'Resource(s) do not conform to the profile http://hl7.org/fhir/us/central-cancer-registry-reporting/StructureDefinition/ccrr-content-bundle|1.0.0'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../../must_support_test'
|
4
|
+
require_relative '../../../../hdea_generator/group_metadata'
|
5
|
+
|
6
|
+
module CancerRegistryReportingTestKit
|
7
|
+
module HDEAV100
|
8
|
+
class AllergyIntoleranceMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'US Core AllergyIntolerance profile must support element coverage'
|
12
|
+
description %(
|
13
|
+
This test looks across all instances
|
14
|
+
associated with the [US Core AllergyIntolerance profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance|5.0.1)
|
15
|
+
found in the provided report Bundles and verifies that they
|
16
|
+
contain populated examples of the following must support elements
|
17
|
+
defined in the profile:
|
18
|
+
|
19
|
+
* AllergyIntolerance.clinicalStatus
|
20
|
+
* AllergyIntolerance.code
|
21
|
+
* AllergyIntolerance.patient
|
22
|
+
* AllergyIntolerance.reaction
|
23
|
+
* AllergyIntolerance.reaction.manifestation
|
24
|
+
* AllergyIntolerance.verificationStatus
|
25
|
+
)
|
26
|
+
|
27
|
+
id :ccrr_v100_allergy_intolerance_must_support_test
|
28
|
+
|
29
|
+
def resource_type
|
30
|
+
'AllergyIntolerance'
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.metadata
|
34
|
+
@metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
35
|
+
end
|
36
|
+
|
37
|
+
def scratch_resources
|
38
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
run do
|
42
|
+
perform_must_support_test(all_scratch_resources)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../../validation_test'
|
4
|
+
|
5
|
+
module CancerRegistryReportingTestKit
|
6
|
+
module HDEAV100
|
7
|
+
class AllergyIntoleranceValidationTest < Inferno::Test
|
8
|
+
include CancerRegistryReportingTestKit::ValidationTest
|
9
|
+
|
10
|
+
id :ccrr_v100_allergy_intolerance_validation_test
|
11
|
+
title 'US Core AllergyIntolerance profile conformance'
|
12
|
+
description %(
|
13
|
+
This test verifies that AllergyIntolerance instances
|
14
|
+
found in the Allergies sections of the provided reports conform to the
|
15
|
+
[US Core AllergyIntolerance profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance|5.0.1).
|
16
|
+
)
|
17
|
+
|
18
|
+
|
19
|
+
def resource_type
|
20
|
+
'AllergyIntolerance'
|
21
|
+
end
|
22
|
+
|
23
|
+
def scratch_resources
|
24
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
25
|
+
end
|
26
|
+
|
27
|
+
run do
|
28
|
+
perform_validation_test(scratch_resources[:all] || [],
|
29
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance',
|
30
|
+
'5.0.1',
|
31
|
+
skip_if_empty: true)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_allergyintolerance
|
3
|
+
:class_name: UsCoreAllergyintoleranceSequence
|
4
|
+
:version: v1.0.0
|
5
|
+
:reformatted_version: v100
|
6
|
+
:resource: AllergyIntolerance
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance
|
8
|
+
:profile_name: US Core AllergyIntolerance Profile
|
9
|
+
:profile_version: 5.0.1
|
10
|
+
:title: US Core AllergyIntolerance
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core AllergyIntolerance Profile.
|
13
|
+
:must_supports:
|
14
|
+
:extensions: []
|
15
|
+
:slices: []
|
16
|
+
:elements:
|
17
|
+
- :path: clinicalStatus
|
18
|
+
- :path: verificationStatus
|
19
|
+
- :path: code
|
20
|
+
- :path: patient
|
21
|
+
:types:
|
22
|
+
- Reference
|
23
|
+
:target_profiles:
|
24
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
25
|
+
- :path: reaction
|
26
|
+
- :path: reaction.manifestation
|
27
|
+
:mandatory_elements:
|
28
|
+
- AllergyIntolerance.code
|
29
|
+
- AllergyIntolerance.patient
|
30
|
+
- AllergyIntolerance.reaction.manifestation
|
31
|
+
:tests:
|
32
|
+
- :id: ccrr_v100_allergy_intolerance_must_support_test
|
33
|
+
:file_name: allergy_intolerance_must_support_test.rb
|
34
|
+
- :id: ccrr_v100_allergy_intolerance_validation_test
|
35
|
+
:file_name: allergy_intolerance_validation_test.rb
|
36
|
+
:id: ccrr_v100_allergy_intolerance
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../../must_support_test'
|
4
|
+
require_relative '../../../../hdea_generator/group_metadata'
|
5
|
+
|
6
|
+
module CancerRegistryReportingTestKit
|
7
|
+
module HDEAV100
|
8
|
+
class CarePlanMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'US Core CarePlan profile must support element coverage'
|
12
|
+
description %(
|
13
|
+
This test looks across all instances
|
14
|
+
associated with the [US Core CarePlan profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan|5.0.1)
|
15
|
+
found in the provided report Bundles and verifies that they
|
16
|
+
contain populated examples of the following must support elements
|
17
|
+
defined in the profile:
|
18
|
+
|
19
|
+
* CarePlan.category
|
20
|
+
* CarePlan.category:AssessPlan
|
21
|
+
* CarePlan.intent
|
22
|
+
* CarePlan.status
|
23
|
+
* CarePlan.subject
|
24
|
+
* CarePlan.text
|
25
|
+
* CarePlan.text.div
|
26
|
+
* CarePlan.text.status
|
27
|
+
)
|
28
|
+
|
29
|
+
id :ccrr_v100_care_plan_must_support_test
|
30
|
+
|
31
|
+
def resource_type
|
32
|
+
'CarePlan'
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.metadata
|
36
|
+
@metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
37
|
+
end
|
38
|
+
|
39
|
+
def scratch_resources
|
40
|
+
scratch[:care_plan_resources] ||= {}
|
41
|
+
end
|
42
|
+
|
43
|
+
run do
|
44
|
+
perform_must_support_test(all_scratch_resources)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../../validation_test'
|
4
|
+
|
5
|
+
module CancerRegistryReportingTestKit
|
6
|
+
module HDEAV100
|
7
|
+
class CarePlanValidationTest < Inferno::Test
|
8
|
+
include CancerRegistryReportingTestKit::ValidationTest
|
9
|
+
|
10
|
+
id :ccrr_v100_care_plan_validation_test
|
11
|
+
title 'US Core CarePlan profile conformance'
|
12
|
+
description %(
|
13
|
+
This test verifies that CarePlan instances
|
14
|
+
found in the Plan of Treatment sections of the provided reports conform to the
|
15
|
+
[US Core CarePlan profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan|5.0.1).
|
16
|
+
)
|
17
|
+
|
18
|
+
|
19
|
+
def resource_type
|
20
|
+
'CarePlan'
|
21
|
+
end
|
22
|
+
|
23
|
+
def scratch_resources
|
24
|
+
scratch[:care_plan_resources] ||= {}
|
25
|
+
end
|
26
|
+
|
27
|
+
run do
|
28
|
+
perform_validation_test(scratch_resources[:all] || [],
|
29
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan',
|
30
|
+
'5.0.1',
|
31
|
+
skip_if_empty: true)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/metadata.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_careplan
|
3
|
+
:class_name: UsCoreCareplanSequence
|
4
|
+
:version: v1.0.0
|
5
|
+
:reformatted_version: v100
|
6
|
+
:resource: CarePlan
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan
|
8
|
+
:profile_name: US Core CarePlan Profile
|
9
|
+
:profile_version: 5.0.1
|
10
|
+
:title: US Core CarePlan
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core CarePlan Profile.
|
13
|
+
:must_supports:
|
14
|
+
:extensions: []
|
15
|
+
:slices:
|
16
|
+
- :slice_id: CarePlan.category:AssessPlan
|
17
|
+
:slice_name: AssessPlan
|
18
|
+
:path: category
|
19
|
+
:discriminator:
|
20
|
+
:type: patternCodeableConcept
|
21
|
+
:path: ''
|
22
|
+
:code: assess-plan
|
23
|
+
:system: http://hl7.org/fhir/us/core/CodeSystem/careplan-category
|
24
|
+
:elements:
|
25
|
+
- :path: text
|
26
|
+
- :path: text.status
|
27
|
+
- :path: text.div
|
28
|
+
- :path: status
|
29
|
+
- :path: intent
|
30
|
+
- :path: category
|
31
|
+
- :path: subject
|
32
|
+
:types:
|
33
|
+
- Reference
|
34
|
+
:target_profiles:
|
35
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
36
|
+
:mandatory_elements:
|
37
|
+
- CarePlan.text
|
38
|
+
- CarePlan.text.status
|
39
|
+
- CarePlan.text.div
|
40
|
+
- CarePlan.status
|
41
|
+
- CarePlan.intent
|
42
|
+
- CarePlan.category
|
43
|
+
- CarePlan.subject
|
44
|
+
- CarePlan.activity.detail.status
|
45
|
+
:tests:
|
46
|
+
- :id: ccrr_v100_care_plan_must_support_test
|
47
|
+
:file_name: care_plan_must_support_test.rb
|
48
|
+
- :id: ccrr_v100_care_plan_validation_test
|
49
|
+
:file_name: care_plan_validation_test.rb
|
50
|
+
:id: ccrr_v100_care_plan
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../../must_support_test'
|
4
|
+
require_relative '../../../../hdea_generator/group_metadata'
|
5
|
+
|
6
|
+
module CancerRegistryReportingTestKit
|
7
|
+
module HDEAV100
|
8
|
+
class CcrrContentBundleMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'Central Cancer Registry Reporting Content Bundle profile must support element coverage'
|
12
|
+
description %(
|
13
|
+
This test looks across all instances
|
14
|
+
associated with the [Central Cancer Registry Reporting Content Bundle profile](http://hl7.org/fhir/us/central-cancer-registry-reporting/StructureDefinition/ccrr-content-bundle|1.0.0)
|
15
|
+
found in the provided report Bundles and verifies that they
|
16
|
+
contain populated examples of the following must support elements
|
17
|
+
defined in the profile:
|
18
|
+
|
19
|
+
* Bundle.entry
|
20
|
+
* Bundle.entry:composition
|
21
|
+
* Bundle.entry:composition.resource
|
22
|
+
)
|
23
|
+
|
24
|
+
id :ccrr_v100_ccrr_content_bundle_must_support_test
|
25
|
+
|
26
|
+
def resource_type
|
27
|
+
'Bundle'
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.metadata
|
31
|
+
@metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
32
|
+
end
|
33
|
+
|
34
|
+
def scratch_resources
|
35
|
+
scratch[:ccrr_content_bundle_resources] ||= {}
|
36
|
+
end
|
37
|
+
|
38
|
+
run do
|
39
|
+
perform_must_support_test(all_scratch_resources)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
:name: ccrr_content_bundle
|
3
|
+
:class_name: CcrrContentBundleSequence
|
4
|
+
:version: v1.0.0
|
5
|
+
:reformatted_version: v100
|
6
|
+
:resource: Bundle
|
7
|
+
:profile_url: http://hl7.org/fhir/us/central-cancer-registry-reporting/StructureDefinition/ccrr-content-bundle
|
8
|
+
:profile_name: Central Cancer Registry Reporting Content Bundle
|
9
|
+
:profile_version: 1.0.0
|
10
|
+
:title: Bundle Central Cancer Registry Reporting Content
|
11
|
+
:short_description: Verify support for the server capabilities required by the Central
|
12
|
+
Cancer Registry Reporting Content Bundle.
|
13
|
+
:must_supports:
|
14
|
+
:extensions: []
|
15
|
+
:slices:
|
16
|
+
- :slice_id: Bundle.entry:composition
|
17
|
+
:slice_name: composition
|
18
|
+
:path: entry
|
19
|
+
:discriminator:
|
20
|
+
:type: type
|
21
|
+
:code: Composition
|
22
|
+
:elements:
|
23
|
+
- :path: entry
|
24
|
+
- :path: entry:composition.resource
|
25
|
+
:mandatory_elements:
|
26
|
+
- Bundle.type
|
27
|
+
- Bundle.link.relation
|
28
|
+
- Bundle.link.url
|
29
|
+
- Bundle.entry
|
30
|
+
- Bundle.entry.request.method
|
31
|
+
- Bundle.entry.request.url
|
32
|
+
- Bundle.entry.response.status
|
33
|
+
:tests:
|
34
|
+
- :id: ccrr_v100_ccrr_content_bundle_must_support_test
|
35
|
+
:file_name: ccrr_content_bundle_must_support_test.rb
|
36
|
+
:id: ccrr_v100_ccrr_content_bundle
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../../must_support_test'
|
4
|
+
require_relative '../../../../hdea_generator/group_metadata'
|
5
|
+
|
6
|
+
module CancerRegistryReportingTestKit
|
7
|
+
module HDEAV100
|
8
|
+
class CentralCancerRegistryPrimaryCancerConditionMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'Central Cancer Registry Reporting Primary Cancer Condition profile must support element coverage'
|
12
|
+
description %(
|
13
|
+
This test looks across all instances
|
14
|
+
associated with the [Central Cancer Registry Reporting Primary Cancer Condition profile](http://hl7.org/fhir/us/central-cancer-registry-reporting/StructureDefinition/central-cancer-registry-primary-cancer-condition|1.0.0)
|
15
|
+
found in the provided report Bundles and verifies that they
|
16
|
+
contain populated examples of the following must support elements
|
17
|
+
defined in the profile:
|
18
|
+
|
19
|
+
* Condition.abatementDateTime
|
20
|
+
* Condition.bodySite
|
21
|
+
* Condition.bodySite.extension:data-absent-reason
|
22
|
+
* Condition.bodySite.extension:lateralityQualifier
|
23
|
+
* Condition.bodySite.extension:locationQualifier
|
24
|
+
* Condition.category
|
25
|
+
* Condition.category:sdoh
|
26
|
+
* Condition.category:us-core
|
27
|
+
* Condition.clinicalStatus
|
28
|
+
* Condition.code
|
29
|
+
* Condition.extension:assertedDate
|
30
|
+
* Condition.extension:histologyMorphologyBehavior
|
31
|
+
* Condition.extension:mcode-cancer-disease-type-evidence-type
|
32
|
+
* Condition.onsetDateTime
|
33
|
+
* Condition.recordedDate
|
34
|
+
* Condition.stage
|
35
|
+
* Condition.stage.assessment
|
36
|
+
* Condition.subject
|
37
|
+
* Condition.verificationStatus
|
38
|
+
)
|
39
|
+
|
40
|
+
id :ccrr_v100_central_cancer_registry_primary_cancer_condition_must_support_test
|
41
|
+
|
42
|
+
def resource_type
|
43
|
+
'Condition'
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.metadata
|
47
|
+
@metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
48
|
+
end
|
49
|
+
|
50
|
+
def scratch_resources
|
51
|
+
scratch[:central_cancer_registry_primary_cancer_condition_resources] ||= {}
|
52
|
+
end
|
53
|
+
|
54
|
+
run do
|
55
|
+
perform_must_support_test(all_scratch_resources)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|