davinci_plan_net_test_kit 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/capability_statement/conformance_support_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/capability_statement/fhir_version_test.rb +15 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/capability_statement/instantiate_test.rb +19 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/capability_statement/json_support_test.rb +39 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/capability_statement/profile_support_test.rb +38 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/combination_searches/examples.json +40 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/data_absent_reason_group.rb +59 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/reverse_chain_tests/examples.json +60 -0
- data/lib/davinci_plan_net_test_kit/custom_groups/v1.1.0/capability_statement_group.rb +75 -0
- data/lib/davinci_plan_net_test_kit/date_search_validation.rb +108 -0
- data/lib/davinci_plan_net_test_kit/fhir_resource_navigation.rb +75 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/davinci_plan_net_test_suite.rb +231 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_forward_chain_organization_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_forward_chain_organization_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_forward_chain_organization_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_forward_chain_organization_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_include_endpoint_organization_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_must_support_test.rb +47 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_organization_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_reference_resolution_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/endpoint_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint/metadata.yml +171 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/endpoint_group.rb +168 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_combination_list_specialty_covered_by_network_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_coverage_area_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_endpoint_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_endpoint_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_location_address_city_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_location_address_postalcode_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_location_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_location_address_state_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_location_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_location_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_organization_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_organization_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_organization_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_forward_chain_organization_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_include_healthcare_service_coverage_area_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_include_healthcare_service_endpoint_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_include_healthcare_service_location_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_include_healthcare_service_organization_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_location_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_must_support_test.rb +65 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_name_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_organization_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_reference_resolution_test.rb +45 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_revinclude_organization_affiliation_service_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_revinclude_practitioner_role_service_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_service_category_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_service_type_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_specialty_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/healthcare_service_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service/metadata.yml +1377 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/healthcare_service_group.rb +240 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_administered_by_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_coverage_area_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_forward_chain_administered_by_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_forward_chain_administered_by_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_forward_chain_owned_by_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_forward_chain_owned_by_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_identifier_search_test.rb +44 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_include_insurance_plan_administered_by_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_include_insurance_plan_coverage_area_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_include_insurance_plan_owned_by_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_must_support_test.rb +57 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_name_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_owned_by_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_plan_type_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_reference_resolution_test.rb +48 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_type_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/insurance_plan_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan/metadata.yml +368 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/insurance_plan_group.rb +193 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_address_city_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_address_postalcode_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_address_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_address_state_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_endpoint_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_endpoint_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_organization_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_organization_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_organization_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_organization_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_partof_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_partof_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_forward_chain_partof_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_include_location_endpoint_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_include_location_organization_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_include_location_partof_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_must_support_test.rb +66 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_organization_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_partof_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_reference_resolution_test.rb +44 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_reverse_chain_insurance_plan_coverage_area_owned_by_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_revinclude_healthcare_service_location_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_revinclude_insurance_plan_coverage_area_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_revinclude_organization_affiliation_location_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_revinclude_practitioner_role_location_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_type_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/location_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location/metadata.yml +395 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/location_group.rb +262 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/metadata.yml +5214 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/metadata.yml +304 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_address_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_coverage_area_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_endpoint_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_forward_chain_endpoint_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_forward_chain_partof_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_forward_chain_partof_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_forward_chain_partof_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_include_organization_coverage_area_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_include_organization_endpoint_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_include_organization_partof_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_must_support_test.rb +58 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_name_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_partof_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_reference_resolution_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_reverse_chain_practitioner_role_network_location_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_revinclude_practitioner_role_network_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_type_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network/network_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/network_group.rb +238 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/metadata.yml +1296 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_endpoint_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_endpoint_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_location_address_city_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_location_address_postalcode_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_location_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_location_address_state_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_location_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_location_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_network_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_network_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_participating_organization_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_participating_organization_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_participating_organization_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_participating_organization_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_primary_organization_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_primary_organization_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_primary_organization_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_primary_organization_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_service_location_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_service_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_forward_chain_service_service_category_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_include_organization_affiliation_endpoint_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_include_organization_affiliation_location_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_include_organization_affiliation_network_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_include_organization_affiliation_participating_organization_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_include_organization_affiliation_primary_organization_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_include_organization_affiliation_service_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_location_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_must_support_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_network_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_participating_organization_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_primary_organization_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_reference_resolution_test.rb +47 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_role_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_service_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_specialty_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil/org_affil_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/org_affil_group.rb +241 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/metadata.yml +384 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_address_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_coverage_area_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_endpoint_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_forward_chain_endpoint_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_forward_chain_partof_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_forward_chain_partof_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_forward_chain_partof_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_include_organization_coverage_area_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_include_organization_endpoint_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_include_organization_partof_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_must_support_test.rb +68 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_name_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_partof_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_reference_resolution_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_reverse_chain_insurance_plan_owned_by_coverage_area_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_reverse_chain_org_affil_participating_organization_location_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_reverse_chain_org_affil_participating_organization_network_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_reverse_chain_org_affil_participating_organization_specialty_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_endpoint_organization_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_healthcare_service_organization_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_insurance_plan_administered_by_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_insurance_plan_owned_by_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_organization_affiliation_participating_organization_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_organization_affiliation_primary_organization_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_revinclude_practitioner_role_organization_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_type_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization/organization_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/organization_group.rb +265 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/metadata.yml +253 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_family_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_given_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_must_support_test.rb +57 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_name_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_reference_resolution_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_reverse_chain_practitioner_role_practitioner_location_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_reverse_chain_practitioner_role_practitioner_network_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_reverse_chain_practitioner_role_practitioner_role_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_reverse_chain_practitioner_role_practitioner_specialty_search_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_revinclude_practitioner_role_practitioner_search_test.rb +60 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner/practitioner_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_group.rb +188 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/metadata.yml +1198 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_combination_list_practitioners_with_specialty_and_location_search_test.rb +50 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_endpoint_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_endpoint_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_location_address_city_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_location_address_postalcode_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_location_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_location_address_state_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_location_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_location_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_network_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_network_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_network_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_network_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_organization_address_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_organization_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_organization_partof_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_organization_type_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_practitioner_name_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_service_location_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_service_organization_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_forward_chain_service_service_category_search_test.rb +55 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_id_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_include_practitioner_role_endpoint_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_include_practitioner_role_location_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_include_practitioner_role_network_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_include_practitioner_role_organization_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_include_practitioner_role_practitioner_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_include_practitioner_role_service_search_test.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_lastupdated_search_test.rb +43 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_location_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_must_support_test.rb +70 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_network_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_no_params_search_test.rb +49 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_organization_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_read_test.rb +26 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_reference_resolution_test.rb +46 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_role_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_service_search_test.rb +41 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_specialty_search_test.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role/practitioner_role_validation_test.rb +40 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/practitioner_role_group.rb +241 -0
- data/lib/davinci_plan_net_test_kit/generated/v1.1.0/resource_list.rb +16 -0
- data/lib/davinci_plan_net_test_kit/generator/combination_search_test_generator.rb +215 -0
- data/lib/davinci_plan_net_test_kit/generator/forward_chain_test_generator.rb +198 -0
- data/lib/davinci_plan_net_test_kit/generator/group_generator.rb +377 -0
- data/lib/davinci_plan_net_test_kit/generator/group_metadata.rb +77 -0
- data/lib/davinci_plan_net_test_kit/generator/group_metadata_extractor.rb +268 -0
- data/lib/davinci_plan_net_test_kit/generator/ig_loader.rb +76 -0
- data/lib/davinci_plan_net_test_kit/generator/ig_metadata.rb +52 -0
- data/lib/davinci_plan_net_test_kit/generator/ig_metadata_extractor.rb +57 -0
- data/lib/davinci_plan_net_test_kit/generator/ig_resources.rb +64 -0
- data/lib/davinci_plan_net_test_kit/generator/include_search_test_generator.rb +205 -0
- data/lib/davinci_plan_net_test_kit/generator/must_support_metadata_extractor.rb +337 -0
- data/lib/davinci_plan_net_test_kit/generator/must_support_metadata_extractor_us_core_3.rb +25 -0
- data/lib/davinci_plan_net_test_kit/generator/must_support_test_generator.rb +116 -0
- data/lib/davinci_plan_net_test_kit/generator/naming.rb +34 -0
- data/lib/davinci_plan_net_test_kit/generator/read_test_generator.rb +86 -0
- data/lib/davinci_plan_net_test_kit/generator/reference_resolution_test_generator.rb +92 -0
- data/lib/davinci_plan_net_test_kit/generator/resource_list_generator.rb +42 -0
- data/lib/davinci_plan_net_test_kit/generator/reverse_chain_search_test_generator.rb +194 -0
- data/lib/davinci_plan_net_test_kit/generator/revinclude_search_test_generator.rb +204 -0
- data/lib/davinci_plan_net_test_kit/generator/search_definition_metadata_extractor.rb +193 -0
- data/lib/davinci_plan_net_test_kit/generator/search_metadata_extractor.rb +74 -0
- data/lib/davinci_plan_net_test_kit/generator/search_no_params_test_generator.rb +124 -0
- data/lib/davinci_plan_net_test_kit/generator/search_test_generator.rb +276 -0
- data/lib/davinci_plan_net_test_kit/generator/special_cases.rb +92 -0
- data/lib/davinci_plan_net_test_kit/generator/suite_generator.rb +93 -0
- data/lib/davinci_plan_net_test_kit/generator/terminology_binding_metadata_extractor.rb +120 -0
- data/lib/davinci_plan_net_test_kit/generator/validation_test_generator.rb +140 -0
- data/lib/davinci_plan_net_test_kit/generator/value_extractor.rb +117 -0
- data/lib/davinci_plan_net_test_kit/generator.rb +143 -0
- data/lib/davinci_plan_net_test_kit/igs/package/SearchParameter-Resource-id.json +1 -0
- data/lib/davinci_plan_net_test_kit/igs/package/SearchParameter-Resource-lastUpdated.json +1 -0
- data/lib/davinci_plan_net_test_kit/igs/package.tgz +0 -0
- data/lib/davinci_plan_net_test_kit/must_support_test.rb +211 -0
- data/lib/davinci_plan_net_test_kit/provenance_validator.rb +37 -0
- data/lib/davinci_plan_net_test_kit/read_test.rb +62 -0
- data/lib/davinci_plan_net_test_kit/reference_resolution_test.rb +179 -0
- data/lib/davinci_plan_net_test_kit/request_logger.rb +46 -0
- data/lib/davinci_plan_net_test_kit/search_test.rb +1252 -0
- data/lib/davinci_plan_net_test_kit/search_test_properties.rb +66 -0
- data/lib/davinci_plan_net_test_kit/validation_test.rb +56 -0
- data/lib/davinci_plan_net_test_kit/version.rb +5 -0
- data/lib/davinci_plan_net_test_kit.rb +1 -0
- metadata +452 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
module DaVinciPlanNetTestKit
|
2
|
+
class Generator
|
3
|
+
module SpecialCases
|
4
|
+
RESOURCES_TO_EXCLUDE = [].freeze
|
5
|
+
|
6
|
+
PROFILES_TO_EXCLUDE = [].freeze
|
7
|
+
|
8
|
+
GROUP_SORT_ORDER = ["plannet_Endpoint",
|
9
|
+
"plannet_InsurancePlan",
|
10
|
+
"plannet_OrganizationAffiliation",
|
11
|
+
"plannet_PractitionerRole",
|
12
|
+
"plannet_Practitioner",
|
13
|
+
"plannet_HealthcareService",
|
14
|
+
"plannet_Location",
|
15
|
+
"plannet_Network",
|
16
|
+
"plannet_Organization"].freeze
|
17
|
+
|
18
|
+
PARAMETERLESS_FILTER_DESCRIPTION = {
|
19
|
+
"Plan-Net Network" => "In order to gather only Organization instances expected to conform to the Plan-Net Network profile, instances where `type` does not equal `ntwk` will be discarded. ",
|
20
|
+
"Plan-Net Organization" => "In order to gather only Organization instances expected to conform to the Plan-Net Organization profile, instances where `type` equals `ntwk` will be discarded. "
|
21
|
+
}.freeze
|
22
|
+
|
23
|
+
class << self
|
24
|
+
def exclude_group?(group)
|
25
|
+
RESOURCES_TO_EXCLUDE.include?(group.resource)
|
26
|
+
end
|
27
|
+
|
28
|
+
def group_index(group_name)
|
29
|
+
GROUP_SORT_ORDER.index(group_name)
|
30
|
+
end
|
31
|
+
|
32
|
+
def has_explicit_group_order()
|
33
|
+
GROUP_SORT_ORDER.size > 0
|
34
|
+
end
|
35
|
+
|
36
|
+
def has_parameterless_filter?(profile_name)
|
37
|
+
PARAMETERLESS_FILTER_DESCRIPTION.key?(profile_name)
|
38
|
+
end
|
39
|
+
|
40
|
+
def parameterless_filter_description(profile_name)
|
41
|
+
PARAMETERLESS_FILTER_DESCRIPTION[profile_name]
|
42
|
+
end
|
43
|
+
|
44
|
+
def run_special_cases(ig_metadata)
|
45
|
+
fix_network_must_support(ig_metadata)
|
46
|
+
fix_revincludes_for_organization(ig_metadata)
|
47
|
+
end
|
48
|
+
|
49
|
+
def fix_network_must_support(ig_metadata)
|
50
|
+
# The Network profile is based on USCore Organization, since there was no contradiction between the USCore profile
|
51
|
+
# and the Plan-Net requirements. However, the NPI and CLIA identifier types, which are Must-Support, are clearly
|
52
|
+
# intended for provider organizations only and are not expected to be populated for other organization types.
|
53
|
+
network_group = ig_metadata.groups.find { |group| group.name == 'plannet_Network'}
|
54
|
+
adjusted_must_supports = network_group.must_supports[:slices].dup.delete_if {|slice| slice[:name] == 'Organization.identifier:NPI'}
|
55
|
+
network_group.must_supports[:slices] = adjusted_must_supports
|
56
|
+
end
|
57
|
+
|
58
|
+
def fix_revincludes_for_organization(ig_metadata)
|
59
|
+
# Revincludes are listed in the capability statement at the resource level,
|
60
|
+
# but resources that support multiple profiles do not make the distinction of which tests are for which
|
61
|
+
# This separates the revinclude lists for Network and Organization profiles from the Organization resource
|
62
|
+
# For Plan Net PDEX v1.1.0
|
63
|
+
organization_group = ig_metadata.groups.find { |group| group.name == 'plannet_Organization'}
|
64
|
+
network_group = ig_metadata.groups.find { |group| group.name == 'plannet_Network'}
|
65
|
+
|
66
|
+
network_revincludes, corrected_revinclude_list = organization_group.revincludes.partition do |revinclude|
|
67
|
+
revinclude.split(/:/)[1] == "network"
|
68
|
+
end
|
69
|
+
|
70
|
+
organization_group.revincludes = corrected_revinclude_list
|
71
|
+
network_group.revincludes = network_revincludes
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
module SpecialCases
|
78
|
+
def self.filter_instance_for_parameterless_gathering?(profile_url, instance)
|
79
|
+
case profile_url
|
80
|
+
when 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-Organization'
|
81
|
+
# filter if we see the network type
|
82
|
+
instance.type.reduce(false) { |outer_result, a_type| outer_result || a_type.coding.reduce(false) { |result, a_coding| result || (a_coding.code == 'ntwk' && a_coding.system == 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS') } }
|
83
|
+
when 'http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-Network'
|
84
|
+
# filter unless we see the network type
|
85
|
+
instance.type.reduce(true) { |outer_result, a_type| outer_result && a_type.coding.reduce(true) { |result, a_coding| result && !(a_coding.code == 'ntwk' && a_coding.system == 'http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS') } }
|
86
|
+
else
|
87
|
+
false
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require_relative 'naming'
|
2
|
+
require_relative 'special_cases'
|
3
|
+
|
4
|
+
module DaVinciPlanNetTestKit
|
5
|
+
class Generator
|
6
|
+
class SuiteGenerator
|
7
|
+
class << self
|
8
|
+
def generate(ig_metadata, base_output_dir)
|
9
|
+
new(ig_metadata, base_output_dir).generate
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_accessor :ig_metadata, :base_output_dir
|
14
|
+
|
15
|
+
def initialize(ig_metadata, base_output_dir)
|
16
|
+
self.ig_metadata = ig_metadata
|
17
|
+
self.base_output_dir = base_output_dir
|
18
|
+
end
|
19
|
+
|
20
|
+
def version_specific_message_filters
|
21
|
+
[]
|
22
|
+
end
|
23
|
+
|
24
|
+
def template
|
25
|
+
@template ||= File.read(File.join(__dir__, 'templates', 'suite.rb.erb'))
|
26
|
+
end
|
27
|
+
|
28
|
+
def output
|
29
|
+
@output ||= ERB.new(template).result(binding)
|
30
|
+
end
|
31
|
+
|
32
|
+
def base_output_file_name
|
33
|
+
"davinci_plan_net_test_suite.rb"
|
34
|
+
end
|
35
|
+
|
36
|
+
def class_name
|
37
|
+
"DaVinciPlanNetServerTestSuite"
|
38
|
+
end
|
39
|
+
|
40
|
+
def module_name
|
41
|
+
"DaVinciPlanNetServer#{ig_metadata.reformatted_version.upcase}"
|
42
|
+
end
|
43
|
+
|
44
|
+
def output_file_name
|
45
|
+
File.join(base_output_dir, base_output_file_name)
|
46
|
+
end
|
47
|
+
|
48
|
+
def suite_id
|
49
|
+
"davinci_plan_net_server_#{ig_metadata.reformatted_version}"
|
50
|
+
end
|
51
|
+
|
52
|
+
def title
|
53
|
+
"DaVinci Plan Net #{ig_metadata.ig_version} Server Test Suite"
|
54
|
+
end
|
55
|
+
|
56
|
+
def validator_env_name
|
57
|
+
"#{ig_metadata.reformatted_version.upcase}_VALIDATOR_URL"
|
58
|
+
end
|
59
|
+
|
60
|
+
def ig_link
|
61
|
+
"https://hl7.org/fhir/us/davinci-pdex-plan-net/STU1.1"
|
62
|
+
end
|
63
|
+
|
64
|
+
def generate
|
65
|
+
File.open(output_file_name, 'w') { |f| f.write(output) }
|
66
|
+
end
|
67
|
+
|
68
|
+
def groups
|
69
|
+
ig_metadata.ordered_groups
|
70
|
+
.reject { |group| SpecialCases.exclude_group? group }
|
71
|
+
end
|
72
|
+
|
73
|
+
def group_id_list
|
74
|
+
@group_id_list ||=
|
75
|
+
groups.map(&:id)
|
76
|
+
end
|
77
|
+
|
78
|
+
def group_file_list
|
79
|
+
@group_file_list ||=
|
80
|
+
groups.map { |group| group.file_name.delete_suffix('.rb') }
|
81
|
+
end
|
82
|
+
|
83
|
+
def capability_statement_file_name
|
84
|
+
"../../custom_groups/#{ig_metadata.ig_version}/capability_statement_group"
|
85
|
+
end
|
86
|
+
|
87
|
+
def capability_statement_group_id
|
88
|
+
"davinci_plan_net_#{ig_metadata.reformatted_version}_capability_statement"
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
module DaVinciPlanNetTestKit
|
2
|
+
class Generator
|
3
|
+
class TerminologyBindingMetadataExtractor
|
4
|
+
attr_accessor :profile_elements, :ig_resources, :resource
|
5
|
+
|
6
|
+
def initialize(profile_elements, ig_resources, resource)
|
7
|
+
self.profile_elements = profile_elements
|
8
|
+
self.ig_resources = ig_resources
|
9
|
+
self.resource = resource
|
10
|
+
end
|
11
|
+
|
12
|
+
def terminology_bindings
|
13
|
+
(element_terminology_bindings + extension_terminology_bindings).compact
|
14
|
+
# add_terminology_bindings_from_extensions
|
15
|
+
# profile_elements.select { |element| element.type&.first&.code == 'Extension' }
|
16
|
+
# .each { |extension| add_terminology_bindings_from_extension(extension) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def element_has_fixed_value?(element)
|
20
|
+
case element.type.first.code
|
21
|
+
when 'Quantity'
|
22
|
+
code = profile_elements.find { |e| e.path == "#{element.path}.code" }
|
23
|
+
system = profile_elements.find { |e| e.path == "#{element.path}.system" }
|
24
|
+
code&.fixedCode || system&.fixedUri
|
25
|
+
when 'code'
|
26
|
+
element.fixedCode.present?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def element_has_optional_binding_slice?(element)
|
31
|
+
element.sliceName.present? && element.min == 0
|
32
|
+
end
|
33
|
+
|
34
|
+
def profile_elements_with_bindings
|
35
|
+
profile_elements
|
36
|
+
.select { |element| element.binding.present? && element.binding.strength == 'required'}
|
37
|
+
.reject { |element| element_has_fixed_value?(element) || element_has_optional_binding_slice?(element) }
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
def element_terminology_bindings
|
43
|
+
profile_elements_with_bindings.map do |element|
|
44
|
+
binding = {
|
45
|
+
type: element.type.first.code,
|
46
|
+
strength: element.binding.strength,
|
47
|
+
# Goal.target.detail has an unbound binding
|
48
|
+
system: element.binding.valueSet&.split('|')&.first,
|
49
|
+
path: element.path.gsub('[x]', '').gsub("#{resource}.", '')
|
50
|
+
}
|
51
|
+
|
52
|
+
if element.sliceName.present? && element.min > 0
|
53
|
+
binding[:required_binding_slice] = true
|
54
|
+
end
|
55
|
+
|
56
|
+
binding
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def extension_profile_elements
|
61
|
+
profile_elements
|
62
|
+
.select { |element| element.type&.first&.code == 'Extension' }
|
63
|
+
.select { |element| extension_profile_url(element).present? }
|
64
|
+
end
|
65
|
+
|
66
|
+
def extension_profile_url(extension)
|
67
|
+
extension.type.first.profile&.first
|
68
|
+
end
|
69
|
+
|
70
|
+
def extension_terminology_bindings
|
71
|
+
extension_profile_elements
|
72
|
+
.flat_map do |extension_profile_element|
|
73
|
+
url = extension_profile_url(extension_profile_element)
|
74
|
+
extension = ig_resources.profile_by_url(url)
|
75
|
+
|
76
|
+
# TODO: Temporaray fix for extension defined out of US Core. FI-1623
|
77
|
+
next if extension.nil?
|
78
|
+
|
79
|
+
elements = extension.snapshot.element
|
80
|
+
elements_with_bindings = elements.select do |element|
|
81
|
+
element.binding.present? && !element.id.include?('Extension.extension')
|
82
|
+
end
|
83
|
+
|
84
|
+
elements_with_bindings.map do |element|
|
85
|
+
{
|
86
|
+
type: element.type.first.code,
|
87
|
+
strength: element.binding.strength,
|
88
|
+
system: element.binding.valueSet&.split('|')&.first,
|
89
|
+
path: element.path.gsub('[x]', '').gsub('Extension.', ''),
|
90
|
+
extensions: [url]
|
91
|
+
}
|
92
|
+
end + nested_extension_terminology_bindings(elements, url)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def nested_extension_terminology_bindings(elements, extension_url)
|
97
|
+
nested_extensions = elements.select { |element| element.path == 'Extension.extension' }
|
98
|
+
nested_extensions.flat_map do |nested_extension|
|
99
|
+
nested_extension_element = elements.find { |element| element.id == "#{nested_extension.id}.url" }
|
100
|
+
next unless nested_extension_element.present?
|
101
|
+
|
102
|
+
nested_extension_url = nested_extension_element.fixedUri
|
103
|
+
nested_elements_with_bindings = elements.select do |element|
|
104
|
+
element.id.include?(nested_extension.id) && element.binding.present?
|
105
|
+
end
|
106
|
+
|
107
|
+
nested_elements_with_bindings.map do |element|
|
108
|
+
{
|
109
|
+
type: element.type.first.code,
|
110
|
+
strength: element.binding.strength,
|
111
|
+
system: element.binding.valueSet&.split('|')&.first,
|
112
|
+
path: element.path.gsub('[x]', '').gsub('Extension.extension.', ''),
|
113
|
+
extensions: [extension_url, nested_extension_url]
|
114
|
+
}
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
require_relative 'naming'
|
2
|
+
require_relative 'special_cases'
|
3
|
+
|
4
|
+
module DaVinciPlanNetTestKit
|
5
|
+
class Generator
|
6
|
+
class ValidationTestGenerator
|
7
|
+
class << self
|
8
|
+
def generate(ig_metadata, base_output_dir)
|
9
|
+
ig_metadata.groups
|
10
|
+
.reject { |group| SpecialCases.exclude_group? group }
|
11
|
+
.each do |group|
|
12
|
+
new(group, base_output_dir: base_output_dir).generate
|
13
|
+
next unless group.resource == 'MedicationRequest'
|
14
|
+
|
15
|
+
# The Medication validation test lives in the MedicationRequest
|
16
|
+
# group, so we need to pass in that group's metadata
|
17
|
+
medication_group_metadata = ig_metadata.groups.find { |group| group.resource == 'Medication' }
|
18
|
+
new(medication_group_metadata, group, base_output_dir: base_output_dir).generate
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
attr_accessor :group_metadata, :medication_request_metadata, :base_output_dir
|
24
|
+
|
25
|
+
def initialize(group_metadata, medication_request_metadata = nil, base_output_dir:)
|
26
|
+
self.group_metadata = group_metadata
|
27
|
+
self.medication_request_metadata = medication_request_metadata
|
28
|
+
self.base_output_dir = base_output_dir
|
29
|
+
end
|
30
|
+
|
31
|
+
def template
|
32
|
+
@template ||= File.read(File.join(__dir__, 'templates', 'validation.rb.erb'))
|
33
|
+
end
|
34
|
+
|
35
|
+
def output
|
36
|
+
@output ||= ERB.new(template).result(binding)
|
37
|
+
end
|
38
|
+
|
39
|
+
def base_output_file_name
|
40
|
+
"#{class_name.underscore}.rb"
|
41
|
+
end
|
42
|
+
|
43
|
+
def output_file_directory
|
44
|
+
File.join(base_output_dir, directory_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def output_file_name
|
48
|
+
File.join(output_file_directory, base_output_file_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
def directory_name
|
52
|
+
Naming.snake_case_for_profile(medication_request_metadata || group_metadata)
|
53
|
+
end
|
54
|
+
|
55
|
+
def profile_identifier
|
56
|
+
Naming.snake_case_for_profile(group_metadata)
|
57
|
+
end
|
58
|
+
|
59
|
+
def profile_url
|
60
|
+
group_metadata.profile_url
|
61
|
+
end
|
62
|
+
|
63
|
+
def profile_name
|
64
|
+
group_metadata.profile_name
|
65
|
+
end
|
66
|
+
|
67
|
+
def profile_version
|
68
|
+
group_metadata.profile_version
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_id
|
72
|
+
"davinci_plan_net_#{group_metadata.reformatted_version}_#{profile_identifier}_validation_test"
|
73
|
+
end
|
74
|
+
|
75
|
+
def class_name
|
76
|
+
"#{Naming.upper_camel_case_for_profile(group_metadata)}ValidationTest"
|
77
|
+
end
|
78
|
+
|
79
|
+
def module_name
|
80
|
+
"DaVinciPlanNet#{group_metadata.reformatted_version.upcase}"
|
81
|
+
end
|
82
|
+
|
83
|
+
def resource_type
|
84
|
+
group_metadata.resource
|
85
|
+
end
|
86
|
+
|
87
|
+
def conformance_expectation
|
88
|
+
read_interaction[:expectation]
|
89
|
+
end
|
90
|
+
|
91
|
+
def skip_if_empty
|
92
|
+
# Return true if a system must demonstrate at least one example of the resource type.
|
93
|
+
# This drives omit vs. skip result statuses in this test.
|
94
|
+
resource_type != 'Medication'
|
95
|
+
end
|
96
|
+
|
97
|
+
def generate
|
98
|
+
FileUtils.mkdir_p(output_file_directory)
|
99
|
+
File.open(output_file_name, 'w') { |f| f.write(output) }
|
100
|
+
|
101
|
+
test_metadata = {
|
102
|
+
id: test_id,
|
103
|
+
file_name: base_output_file_name
|
104
|
+
}
|
105
|
+
|
106
|
+
if resource_type == 'Medication'
|
107
|
+
medication_request_metadata.add_test(**test_metadata)
|
108
|
+
else
|
109
|
+
group_metadata.add_test(**test_metadata)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def description
|
114
|
+
<<~DESCRIPTION
|
115
|
+
#{description_intro}
|
116
|
+
It verifies the presence of mandatory elements and that elements with
|
117
|
+
required bindings contain appropriate values. CodeableConcept element
|
118
|
+
bindings will fail if none of their codings have a code/system belonging
|
119
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
120
|
+
fail if their code/system are not found in the valueset.
|
121
|
+
DESCRIPTION
|
122
|
+
end
|
123
|
+
|
124
|
+
def description_intro
|
125
|
+
if resource_type == 'Medication'
|
126
|
+
<<~MEDICATION_INTRO
|
127
|
+
This test verifies resources returned from previous tests conform to
|
128
|
+
the [#{profile_name}](#{group_metadata.versioned_profile_url}).
|
129
|
+
MEDICATION_INTRO
|
130
|
+
else
|
131
|
+
<<~GENERIC_INTRO
|
132
|
+
This test verifies resources returned from the first search conform to
|
133
|
+
the [#{profile_name}](#{group_metadata.versioned_profile_url}).
|
134
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
135
|
+
GENERIC_INTRO
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
module DaVinciPlanNetTestKit
|
2
|
+
class Generator
|
3
|
+
class ValueExactor
|
4
|
+
attr_accessor :ig_resources, :resource, :profile_elements
|
5
|
+
|
6
|
+
def initialize(ig_resources, resource, profile_elements)
|
7
|
+
self.ig_resources = ig_resources
|
8
|
+
self.resource = resource
|
9
|
+
self.profile_elements = profile_elements
|
10
|
+
end
|
11
|
+
|
12
|
+
def values_from_slicing(profile_element, type)
|
13
|
+
(
|
14
|
+
values_from_fixed_codes(profile_element, type) +
|
15
|
+
values_from_pattern_coding(profile_element, type) +
|
16
|
+
values_from_pattern_codeable_concept(profile_element, type)
|
17
|
+
).uniq
|
18
|
+
end
|
19
|
+
|
20
|
+
def values_from_required_binding(profile_element)
|
21
|
+
return [] unless profile_element&.max == '*'
|
22
|
+
|
23
|
+
profile_elements
|
24
|
+
.select do |element|
|
25
|
+
element.path == profile_element.path && element.binding&.strength == 'required'
|
26
|
+
end
|
27
|
+
.map { |element| values_from_value_set_binding(element) }
|
28
|
+
.flatten.compact
|
29
|
+
end
|
30
|
+
|
31
|
+
def values_from_fixed_codes(profile_element, type)
|
32
|
+
return [] unless type == 'CodeableConcept'
|
33
|
+
|
34
|
+
profile_elements
|
35
|
+
.select do
|
36
|
+
|element| element.path == "#{profile_element.path}.coding.code" && element.fixedCode.present?
|
37
|
+
end
|
38
|
+
.map { |element| element.fixedCode }
|
39
|
+
end
|
40
|
+
|
41
|
+
def values_from_pattern_coding(profile_element, type)
|
42
|
+
return [] unless type == 'CodeableConcept'
|
43
|
+
|
44
|
+
profile_elements
|
45
|
+
.select do |element|
|
46
|
+
element.path == "#{profile_element.path}.coding" && element.patternCoding.present?
|
47
|
+
end
|
48
|
+
.map { |element| element.patternCoding.code }
|
49
|
+
end
|
50
|
+
|
51
|
+
def values_from_pattern_codeable_concept(profile_element, type)
|
52
|
+
return [] unless type == 'CodeableConcept'
|
53
|
+
|
54
|
+
profile_elements
|
55
|
+
.select do |element|
|
56
|
+
element.path == profile_element.path && element.patternCodeableConcept.present? && element.min > 0
|
57
|
+
end
|
58
|
+
.map { |element| element.patternCodeableConcept.coding.first.code }
|
59
|
+
end
|
60
|
+
|
61
|
+
def value_set_binding(the_element)
|
62
|
+
the_element&.binding
|
63
|
+
end
|
64
|
+
|
65
|
+
def value_set(the_element)
|
66
|
+
ig_resources.value_set_by_url(value_set_binding(the_element)&.valueSet)
|
67
|
+
end
|
68
|
+
|
69
|
+
def bound_systems(the_element)
|
70
|
+
bound_systems_from_valueset(value_set(the_element))
|
71
|
+
end
|
72
|
+
|
73
|
+
def bound_systems_from_valueset(value_set)
|
74
|
+
systems = value_set&.compose&.include&.map do |include|
|
75
|
+
if include.concept.present?
|
76
|
+
include
|
77
|
+
elsif include.system.present? && include.filter&.empty? # Cannot process intensional value set with filters
|
78
|
+
ig_resources.code_system_by_url(include.system)
|
79
|
+
elsif include.valueSet.present?
|
80
|
+
include.valueSet.map do |vs|
|
81
|
+
a_value_set = ig_resources.value_set_by_url(vs)
|
82
|
+
bound_systems_from_valueset(a_value_set)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end&.flatten&.compact
|
86
|
+
|
87
|
+
systems
|
88
|
+
end
|
89
|
+
|
90
|
+
def values_from_value_set_binding(the_element)
|
91
|
+
bound_systems = bound_systems(the_element)
|
92
|
+
|
93
|
+
return [] if bound_systems.blank?
|
94
|
+
|
95
|
+
bound_systems.flat_map { |system| system.concept.map { |code| code.code } }.uniq
|
96
|
+
end
|
97
|
+
|
98
|
+
def fhir_metadata(current_path)
|
99
|
+
FHIR.const_get(resource)::METADATA[current_path]
|
100
|
+
end
|
101
|
+
|
102
|
+
def values_from_resource_metadata(paths)
|
103
|
+
values = []
|
104
|
+
|
105
|
+
paths.each do |current_path|
|
106
|
+
current_metadata = fhir_metadata(current_path)
|
107
|
+
|
108
|
+
if current_metadata&.dig('valid_codes').present?
|
109
|
+
values = values + current_metadata['valid_codes'].values.flatten
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
values
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|