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,134 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CancerRegistryReportingTestKit
|
4
|
+
class HdeaGenerator
|
5
|
+
class ValueExactor
|
6
|
+
attr_accessor :ig_resources, :resource, :profile_elements
|
7
|
+
|
8
|
+
def initialize(ig_resources, resource, profile_elements)
|
9
|
+
self.ig_resources = ig_resources
|
10
|
+
self.resource = resource
|
11
|
+
self.profile_elements = profile_elements
|
12
|
+
end
|
13
|
+
|
14
|
+
def values_from_fixed_codes(profile_element, type)
|
15
|
+
return [] unless type == 'CodeableConcept'
|
16
|
+
|
17
|
+
elements = profile_elements.select do |element|
|
18
|
+
element.path == "#{profile_element.path}.coding.code" && element.fixedCode.present?
|
19
|
+
end
|
20
|
+
|
21
|
+
elements.map(&:fixedCode)
|
22
|
+
end
|
23
|
+
|
24
|
+
def values_from_pattern_coding(profile_element, type)
|
25
|
+
return [] unless type == 'CodeableConcept'
|
26
|
+
|
27
|
+
elements = profile_elements.select do |element|
|
28
|
+
element.path == "#{profile_element.path}.coding" && element.patternCoding.present?
|
29
|
+
end
|
30
|
+
|
31
|
+
elements.map { |element| element.patternCoding.code }
|
32
|
+
end
|
33
|
+
|
34
|
+
def values_from_pattern_codeable_concept(profile_element, type)
|
35
|
+
return [] unless type == 'CodeableConcept'
|
36
|
+
|
37
|
+
elements = profile_elements.select do |element|
|
38
|
+
element.path == profile_element.path && element.patternCodeableConcept.present? && element.min.positive?
|
39
|
+
end
|
40
|
+
|
41
|
+
elements.map { |element| element.patternCodeableConcept.coding.first.code }
|
42
|
+
end
|
43
|
+
|
44
|
+
def value_set_binding(the_element)
|
45
|
+
the_element&.binding
|
46
|
+
end
|
47
|
+
|
48
|
+
def value_set(the_element)
|
49
|
+
ig_resources.value_set_by_url(value_set_binding(the_element)&.valueSet)
|
50
|
+
end
|
51
|
+
|
52
|
+
def bound_systems(the_element)
|
53
|
+
bound_systems_from_valueset(value_set(the_element))
|
54
|
+
end
|
55
|
+
|
56
|
+
def bound_systems_from_valueset(value_set)
|
57
|
+
value_set&.compose&.include&.map do |include_element|
|
58
|
+
if include_element.concept.present?
|
59
|
+
include_element
|
60
|
+
elsif include_element.system.present? && include_element.filter&.empty?
|
61
|
+
# Cannot process intensional value set with filters
|
62
|
+
ig_resources.code_system_by_url(include_element.system)
|
63
|
+
elsif include_element.valueSet.present?
|
64
|
+
include_element.valueSet.map do |vs|
|
65
|
+
a_value_set = ig_resources.value_set_by_url(vs)
|
66
|
+
bound_systems_from_valueset(a_value_set)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end&.flatten&.compact
|
70
|
+
end
|
71
|
+
|
72
|
+
def codes_from_value_set_binding(the_element)
|
73
|
+
codes_from_system_code_pair(codings_from_value_set_binding(the_element))
|
74
|
+
end
|
75
|
+
|
76
|
+
def codes_from_system_code_pair(codings)
|
77
|
+
codings.present? ? codings.map { |coding| coding[:code] }.compact.uniq : []
|
78
|
+
end
|
79
|
+
|
80
|
+
def codings_from_value_set_binding(the_element)
|
81
|
+
return [] if the_element.nil?
|
82
|
+
|
83
|
+
bound_systems = bound_systems(the_element)
|
84
|
+
|
85
|
+
return codings_from_bound_systems(bound_systems) if bound_systems.present?
|
86
|
+
|
87
|
+
expansion_contains = value_set_expansion_contains(the_element)
|
88
|
+
|
89
|
+
return [] if expansion_contains.blank?
|
90
|
+
|
91
|
+
expansion_contains.map { |contains| { system: contains.system, code: contains.code } }.compact.uniq
|
92
|
+
end
|
93
|
+
|
94
|
+
def codings_from_bound_systems(bound_systems)
|
95
|
+
return [] unless bound_systems.present?
|
96
|
+
|
97
|
+
bound_systems.flat_map do |bound_system|
|
98
|
+
case bound_system
|
99
|
+
when FHIR::ValueSet::Compose::Include
|
100
|
+
bound_system.concept.map { |concept| { system: bound_system.system, code: concept.code } }
|
101
|
+
when FHIR::CodeSystem
|
102
|
+
bound_system.concept.map { |concept| { system: bound_system.url, code: concept.code } }
|
103
|
+
else
|
104
|
+
[]
|
105
|
+
end
|
106
|
+
end.uniq
|
107
|
+
end
|
108
|
+
|
109
|
+
def value_set_expansion_contains(element)
|
110
|
+
value_set(element)&.expansion&.contains
|
111
|
+
end
|
112
|
+
|
113
|
+
def fhir_metadata(current_path)
|
114
|
+
FHIR.const_get(resource)::METADATA[current_path]
|
115
|
+
end
|
116
|
+
|
117
|
+
def values_from_resource_metadata(paths)
|
118
|
+
values = []
|
119
|
+
|
120
|
+
paths.each do |current_path|
|
121
|
+
current_metadata = fhir_metadata(current_path)
|
122
|
+
|
123
|
+
next unless current_metadata&.dig('valid_codes').present?
|
124
|
+
|
125
|
+
values += current_metadata['valid_codes'].flat_map do |system, codes|
|
126
|
+
codes.map { |code| { system:, code: } }
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
values
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'fhir_models'
|
4
|
+
require 'inferno/ext/fhir_models'
|
5
|
+
|
6
|
+
require_relative 'hdea_generator/ig_loader'
|
7
|
+
require_relative 'hdea_generator/ig_metadata_extractor'
|
8
|
+
require_relative 'hdea_generator/group_generator'
|
9
|
+
require_relative 'hdea_generator/must_support_test_generator'
|
10
|
+
require_relative 'hdea_generator/validation_test_generator'
|
11
|
+
require_relative 'hdea_generator/special_cases'
|
12
|
+
|
13
|
+
module CancerRegistryReportingTestKit
|
14
|
+
class HdeaGenerator
|
15
|
+
def self.generate
|
16
|
+
ig_packages = Dir.glob(File.join(Dir.pwd, 'lib', 'cancer_registry_reporting_test_kit', 'igs', '*.tgz'))
|
17
|
+
|
18
|
+
ig_packages.each do |ig_package|
|
19
|
+
new(ig_package).generate
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
attr_accessor :ig_resources, :ig_metadata, :ig_file_name
|
24
|
+
|
25
|
+
def initialize(ig_file_name)
|
26
|
+
self.ig_file_name = ig_file_name
|
27
|
+
end
|
28
|
+
|
29
|
+
def generate
|
30
|
+
puts "Generating tests for IG #{File.basename(ig_file_name)}"
|
31
|
+
load_ig_package
|
32
|
+
extract_metadata
|
33
|
+
generate_must_support_tests
|
34
|
+
generate_validation_tests
|
35
|
+
generate_groups
|
36
|
+
end
|
37
|
+
|
38
|
+
def extract_metadata
|
39
|
+
self.ig_metadata = IGMetadataExtractor.new(ig_resources).extract
|
40
|
+
|
41
|
+
FileUtils.mkdir_p(base_output_dir)
|
42
|
+
end
|
43
|
+
|
44
|
+
def base_output_dir
|
45
|
+
File.join(__dir__, 'hdea_suite', 'generated', ig_metadata.ig_version)
|
46
|
+
end
|
47
|
+
|
48
|
+
def load_ig_package
|
49
|
+
FHIR.logger = Logger.new(File::NULL)
|
50
|
+
self.ig_resources = IGLoader.new(ig_file_name).load
|
51
|
+
end
|
52
|
+
|
53
|
+
def generate_validation_tests
|
54
|
+
ValidationTestGenerator.generate(ig_metadata, base_output_dir)
|
55
|
+
end
|
56
|
+
|
57
|
+
def generate_must_support_tests
|
58
|
+
MustSupportTestGenerator.generate(ig_metadata, base_output_dir)
|
59
|
+
end
|
60
|
+
|
61
|
+
def generate_groups
|
62
|
+
# SpecialCases.move_ms_and_validation(ig_metadata)
|
63
|
+
GroupGenerator.generate(ig_metadata, base_output_dir)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../validation_test'
|
4
|
+
|
5
|
+
module CancerRegistryReportingTestKit
|
6
|
+
module HDEAV100
|
7
|
+
class AuthorValidationTest < Inferno::Test
|
8
|
+
include CancerRegistryReportingTestKit::ValidationTest
|
9
|
+
|
10
|
+
id :ccrr_v100_author_validation_test
|
11
|
+
title 'Author resources returned during previous tests conform to the US Core Practitioner Role, Practitioner, or Organization Profile'
|
12
|
+
description %(
|
13
|
+
This test verifies that author resources referenced in the provided cancer report conform to
|
14
|
+
the [US Core PractitionerRole Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole),
|
15
|
+
[US Core Practitioner Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner), or
|
16
|
+
[US Core Organization Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization).
|
17
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
18
|
+
|
19
|
+
It verifies the presence of mandatory elements and that elements with
|
20
|
+
required bindings contain appropriate values. CodeableConcept element
|
21
|
+
bindings will fail if none of their codings have a code/system belonging
|
22
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
23
|
+
fail if their code/system are not found in the valueset.
|
24
|
+
|
25
|
+
)
|
26
|
+
|
27
|
+
def scratch_resources
|
28
|
+
scratch[:author_resources] ||= {}
|
29
|
+
end
|
30
|
+
|
31
|
+
AUTHOR_PROFILES = {
|
32
|
+
'PractitionerRole' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole',
|
33
|
+
'Practitioner' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner',
|
34
|
+
'Organization' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization'
|
35
|
+
}.freeze
|
36
|
+
|
37
|
+
run do
|
38
|
+
resources_by_type = {
|
39
|
+
'PractitionerRole' => [],
|
40
|
+
'Practitioner' => [],
|
41
|
+
'Organization' => []
|
42
|
+
}
|
43
|
+
|
44
|
+
scratch_resources[:all]&.each do |author|
|
45
|
+
resources_by_type[author.resourceType] << author
|
46
|
+
end
|
47
|
+
|
48
|
+
resources_by_type.each do |resource_type, resources|
|
49
|
+
next if resources.blank?
|
50
|
+
|
51
|
+
perform_validation_test(
|
52
|
+
resource_type,
|
53
|
+
resources,
|
54
|
+
AUTHOR_PROFILES[resource_type],
|
55
|
+
'3.1.1'
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_organization
|
3
|
+
:class_name: UsCoreOrganizationSequence
|
4
|
+
:version: v1.0.0
|
5
|
+
:reformatted_version: v100
|
6
|
+
:resource: Organization
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
8
|
+
:profile_name: US Core Organization Profile
|
9
|
+
:profile_version: 5.0.1
|
10
|
+
:title: US Core Organization
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core Organization Profile.
|
13
|
+
:must_supports:
|
14
|
+
:extensions: []
|
15
|
+
:slices:
|
16
|
+
- :slice_id: Organization.identifier:NPI
|
17
|
+
:slice_name: NPI
|
18
|
+
:path: identifier
|
19
|
+
:discriminator:
|
20
|
+
:type: patternIdentifier
|
21
|
+
:path: ''
|
22
|
+
:system: http://hl7.org/fhir/sid/us-npi
|
23
|
+
:elements:
|
24
|
+
- :path: identifier
|
25
|
+
- :path: identifier.system
|
26
|
+
- :path: identifier.value
|
27
|
+
- :path: active
|
28
|
+
- :path: name
|
29
|
+
- :path: telecom
|
30
|
+
- :path: telecom.system
|
31
|
+
- :path: telecom.value
|
32
|
+
- :path: address
|
33
|
+
- :path: address.line
|
34
|
+
- :path: address.city
|
35
|
+
- :path: address.state
|
36
|
+
- :path: address.postalCode
|
37
|
+
- :path: address.country
|
38
|
+
:mandatory_elements:
|
39
|
+
- Organization.active
|
40
|
+
- Organization.name
|
41
|
+
:tests:
|
42
|
+
- :id: ccrr_v100_organization_must_support_test
|
43
|
+
:file_name: organization_must_support_test.rb
|
44
|
+
- :id: ccrr_v100_organization_validation_test
|
45
|
+
:file_name: organization_validation_test.rb
|
46
|
+
:id: ccrr_v100_organization
|
47
|
+
:file_name: organization_group.rb
|
data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/organization_must_support_test.rb
ADDED
@@ -0,0 +1,73 @@
|
|
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 OrganizationMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'All must support elements are provided in the Organization resources returned'
|
12
|
+
description %(
|
13
|
+
US Core Responders SHALL be capable of populating all data elements as
|
14
|
+
part of the query results as specified by the US Core Server Capability
|
15
|
+
Statement. This test will look through the Organization resources
|
16
|
+
found previously for the following must support elements:
|
17
|
+
|
18
|
+
* Organization.active
|
19
|
+
* Organization.address
|
20
|
+
* Organization.address.city
|
21
|
+
* Organization.address.country
|
22
|
+
* Organization.address.line
|
23
|
+
* Organization.address.postalCode
|
24
|
+
* Organization.address.state
|
25
|
+
* Organization.identifier
|
26
|
+
* Organization.identifier.system
|
27
|
+
* Organization.identifier.value
|
28
|
+
* Organization.identifier:NPI
|
29
|
+
* Organization.name
|
30
|
+
* Organization.telecom
|
31
|
+
* Organization.telecom.system
|
32
|
+
* Organization.telecom.value
|
33
|
+
)
|
34
|
+
|
35
|
+
id :ccrr_v100_organization_must_support_test
|
36
|
+
|
37
|
+
def resource_type
|
38
|
+
'Organization'
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'organization_metadata.yml'),
|
43
|
+
aliases: true))
|
44
|
+
end
|
45
|
+
|
46
|
+
def scratch_resources
|
47
|
+
scratch[:author_resources] ||= {}
|
48
|
+
end
|
49
|
+
|
50
|
+
AUTHOR_PROFILES = {
|
51
|
+
'PractitionerRole' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole',
|
52
|
+
'Practitioner' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner',
|
53
|
+
'Organization' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization'
|
54
|
+
}.freeze
|
55
|
+
|
56
|
+
run do
|
57
|
+
resources_by_type = {
|
58
|
+
'PractitionerRole' => [],
|
59
|
+
'Practitioner' => [],
|
60
|
+
'Organization' => []
|
61
|
+
}
|
62
|
+
|
63
|
+
scratch_resources[:all]&.each do |author|
|
64
|
+
resources_by_type[author.resourceType] << author
|
65
|
+
end
|
66
|
+
|
67
|
+
skip if resources_by_type['Practitioner'].empty? && resources_by_type['PractitionerRole'].empty? && resources_by_type['Organization'].empty?
|
68
|
+
omit if resources_by_type['Organization'].empty?
|
69
|
+
perform_must_support_test(resources_by_type['Organization'])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_practitioner
|
3
|
+
:class_name: UsCorePractitionerSequence
|
4
|
+
:version: v1.0.0
|
5
|
+
:reformatted_version: v100
|
6
|
+
:resource: Practitioner
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
8
|
+
:profile_name: US Core Practitioner Profile
|
9
|
+
:profile_version: 5.0.1
|
10
|
+
:title: US Core Practitioner
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core Practitioner Profile.
|
13
|
+
:must_supports:
|
14
|
+
:extensions: []
|
15
|
+
:slices:
|
16
|
+
- :slice_id: Practitioner.identifier:NPI
|
17
|
+
:slice_name: NPI
|
18
|
+
:path: identifier
|
19
|
+
:discriminator:
|
20
|
+
:type: patternIdentifier
|
21
|
+
:path: ''
|
22
|
+
:system: http://hl7.org/fhir/sid/us-npi
|
23
|
+
:elements:
|
24
|
+
- :path: identifier
|
25
|
+
- :path: identifier.system
|
26
|
+
- :path: identifier.value
|
27
|
+
- :path: name
|
28
|
+
- :path: name.family
|
29
|
+
- :path: telecom
|
30
|
+
- :path: telecom.system
|
31
|
+
- :path: telecom.value
|
32
|
+
- :path: address
|
33
|
+
- :path: address.line
|
34
|
+
- :path: address.city
|
35
|
+
- :path: address.state
|
36
|
+
- :path: address.postalCode
|
37
|
+
- :path: address.country
|
38
|
+
:mandatory_elements:
|
39
|
+
- Practitioner.identifier
|
40
|
+
- Practitioner.identifier.system
|
41
|
+
- Practitioner.identifier.value
|
42
|
+
- Practitioner.name
|
43
|
+
- Practitioner.name.family
|
44
|
+
- Practitioner.qualification.code
|
45
|
+
:tests:
|
46
|
+
- :id: ccrr_v100_practitioner_must_support_test
|
47
|
+
:file_name: practitioner_must_support_test.rb
|
48
|
+
- :id: ccrr_v100_practitioner_validation_test
|
49
|
+
:file_name: practitioner_validation_test.rb
|
50
|
+
:id: ccrr_v100_practitioner
|
51
|
+
:file_name: practitioner_group.rb
|
data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_must_support_test.rb
ADDED
@@ -0,0 +1,73 @@
|
|
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 PractitionerMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'All must support elements are provided in the Practitioner resources returned'
|
12
|
+
description %(
|
13
|
+
US Core Responders SHALL be capable of populating all data elements as
|
14
|
+
part of the query results as specified by the US Core Server Capability
|
15
|
+
Statement. This test will look through the Practitioner resources
|
16
|
+
found previously for the following must support elements:
|
17
|
+
|
18
|
+
* Practitioner.address
|
19
|
+
* Practitioner.address.city
|
20
|
+
* Practitioner.address.country
|
21
|
+
* Practitioner.address.line
|
22
|
+
* Practitioner.address.postalCode
|
23
|
+
* Practitioner.address.state
|
24
|
+
* Practitioner.identifier
|
25
|
+
* Practitioner.identifier.system
|
26
|
+
* Practitioner.identifier.value
|
27
|
+
* Practitioner.identifier:NPI
|
28
|
+
* Practitioner.name
|
29
|
+
* Practitioner.name.family
|
30
|
+
* Practitioner.telecom
|
31
|
+
* Practitioner.telecom.system
|
32
|
+
* Practitioner.telecom.value
|
33
|
+
)
|
34
|
+
|
35
|
+
id :ccrr_v100_practitioner_must_support_test
|
36
|
+
|
37
|
+
def resource_type
|
38
|
+
'Practitioner'
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'practitioner_metadata.yml'),
|
43
|
+
aliases: true))
|
44
|
+
end
|
45
|
+
|
46
|
+
def scratch_resources
|
47
|
+
scratch[:author_resources] ||= {}
|
48
|
+
end
|
49
|
+
|
50
|
+
AUTHOR_PROFILES = {
|
51
|
+
'PractitionerRole' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole',
|
52
|
+
'Practitioner' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner',
|
53
|
+
'Organization' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization'
|
54
|
+
}.freeze
|
55
|
+
|
56
|
+
run do
|
57
|
+
resources_by_type = {
|
58
|
+
'PractitionerRole' => [],
|
59
|
+
'Practitioner' => [],
|
60
|
+
'Organization' => []
|
61
|
+
}
|
62
|
+
|
63
|
+
scratch_resources[:all]&.each do |author|
|
64
|
+
resources_by_type[author.resourceType] << author
|
65
|
+
end
|
66
|
+
|
67
|
+
skip if resources_by_type['Practitioner'].empty? && resources_by_type['PractitionerRole'].empty? && resources_by_type['Organization'].empty?
|
68
|
+
omit if resources_by_type['Practitioner'].empty?
|
69
|
+
perform_must_support_test(resources_by_type['Practitioner'])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_practitionerrole
|
3
|
+
:class_name: UsCorePractitionerroleSequence
|
4
|
+
:version: v1.0.0
|
5
|
+
:reformatted_version: v100
|
6
|
+
:resource: PractitionerRole
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole
|
8
|
+
:profile_name: US Core PractitionerRole Profile
|
9
|
+
:profile_version: 5.0.1
|
10
|
+
:title: US Core PractitionerRole
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core PractitionerRole Profile.
|
13
|
+
:must_supports:
|
14
|
+
:extensions: []
|
15
|
+
:slices: []
|
16
|
+
:elements:
|
17
|
+
- :path: practitioner
|
18
|
+
:types:
|
19
|
+
- Reference
|
20
|
+
:target_profiles:
|
21
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
22
|
+
- :path: organization
|
23
|
+
:types:
|
24
|
+
- Reference
|
25
|
+
:target_profiles:
|
26
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
27
|
+
- :path: code
|
28
|
+
- :path: specialty
|
29
|
+
- :path: location
|
30
|
+
:types:
|
31
|
+
- Reference
|
32
|
+
- :path: telecom
|
33
|
+
- :path: telecom.system
|
34
|
+
- :path: telecom.value
|
35
|
+
- :path: endpoint
|
36
|
+
:types:
|
37
|
+
- Reference
|
38
|
+
:mandatory_elements:
|
39
|
+
- PractitionerRole.telecom.system
|
40
|
+
- PractitionerRole.telecom.value
|
41
|
+
- PractitionerRole.notAvailable.description
|
42
|
+
:tests:
|
43
|
+
- :id: ccrr_v100_practitioner_role_must_support_test
|
44
|
+
:file_name: practitioner_role_must_support_test.rb
|
45
|
+
- :id: ccrr_v100_practitioner_role_validation_test
|
46
|
+
:file_name: practitioner_role_validation_test.rb
|
47
|
+
:id: ccrr_v100_practitioner_role
|
48
|
+
:file_name: practitioner_role_group.rb
|
data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_role_must_support_test.rb
ADDED
@@ -0,0 +1,66 @@
|
|
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 PractitionerRoleMustSupportTest < Inferno::Test
|
9
|
+
include CancerRegistryReportingTestKit::MustSupportTest
|
10
|
+
|
11
|
+
title 'All must support elements are provided in the Practitioner Role resources returned'
|
12
|
+
description %(
|
13
|
+
US Core Responders SHALL be capable of populating all data elements as
|
14
|
+
part of the query results as specified by the US Core Server Capability
|
15
|
+
Statement. This test will look through the PractitionerRole resources
|
16
|
+
found previously for the following must support elements:
|
17
|
+
|
18
|
+
* PractitionerRole.code
|
19
|
+
* PractitionerRole.endpoint
|
20
|
+
* PractitionerRole.location
|
21
|
+
* PractitionerRole.organization
|
22
|
+
* PractitionerRole.practitioner
|
23
|
+
* PractitionerRole.specialty
|
24
|
+
* PractitionerRole.telecom
|
25
|
+
* PractitionerRole.telecom.system
|
26
|
+
* PractitionerRole.telecom.value
|
27
|
+
)
|
28
|
+
|
29
|
+
id :ccrr_v100_practitioner_role_must_support_test
|
30
|
+
|
31
|
+
def resource_type
|
32
|
+
'PractitionerRole'
|
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[:author_resources] ||= {}
|
41
|
+
end
|
42
|
+
|
43
|
+
AUTHOR_PROFILES = {
|
44
|
+
'PractitionerRole' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole',
|
45
|
+
'Practitioner' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner',
|
46
|
+
'Organization' => 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization'
|
47
|
+
}.freeze
|
48
|
+
|
49
|
+
run do
|
50
|
+
resources_by_type = {
|
51
|
+
'PractitionerRole' => [],
|
52
|
+
'Practitioner' => [],
|
53
|
+
'Organization' => []
|
54
|
+
}
|
55
|
+
|
56
|
+
scratch_resources[:all]&.each do |author|
|
57
|
+
resources_by_type[author.resourceType] << author
|
58
|
+
end
|
59
|
+
|
60
|
+
skip if resources_by_type['Practitioner'].empty? && resources_by_type['PractitionerRole'].empty? && resources_by_type['Organization'].empty?
|
61
|
+
omit if resources_by_type['PractitionerRole'].empty?
|
62
|
+
perform_must_support_test(resources_by_type['PractitionerRole'])
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|