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,268 @@
|
|
1
|
+
require_relative 'group_metadata'
|
2
|
+
require_relative 'ig_metadata'
|
3
|
+
require_relative 'must_support_metadata_extractor'
|
4
|
+
require_relative 'search_metadata_extractor'
|
5
|
+
require_relative 'terminology_binding_metadata_extractor'
|
6
|
+
|
7
|
+
module DaVinciPlanNetTestKit
|
8
|
+
class Generator
|
9
|
+
class GroupMetadataExtractor
|
10
|
+
attr_accessor :resource_capabilities, :profile_url, :ig_metadata, :ig_resources
|
11
|
+
|
12
|
+
def initialize(resource_capabilities, profile_url, ig_metadata, ig_resources)
|
13
|
+
self.resource_capabilities = resource_capabilities
|
14
|
+
self.profile_url = profile_url
|
15
|
+
self.ig_metadata = ig_metadata
|
16
|
+
self.ig_resources = ig_resources
|
17
|
+
end
|
18
|
+
|
19
|
+
def group_metadata
|
20
|
+
@group_metadata ||=
|
21
|
+
GroupMetadata.new(group_metadata_hash)
|
22
|
+
end
|
23
|
+
|
24
|
+
def group_metadata_hash
|
25
|
+
@group_metadata_hash ||=
|
26
|
+
{
|
27
|
+
name: name,
|
28
|
+
class_name: class_name,
|
29
|
+
version: version,
|
30
|
+
reformatted_version: reformatted_version,
|
31
|
+
# test_id_prefix: test_id_prefix,
|
32
|
+
resource: resource,
|
33
|
+
profile_url: profile_url,
|
34
|
+
versioned_profile_url: profile_url.gsub(/davinci-pdex-plan-net\/StructureDefinition\//, 'davinci-pdex-plan-net/STU1.1/StructureDefinition/'),
|
35
|
+
profile_name: profile_name,
|
36
|
+
profile_version: profile_version,
|
37
|
+
title: title,
|
38
|
+
short_description: short_description,
|
39
|
+
interactions: interactions,
|
40
|
+
operations: operations,
|
41
|
+
searches: searches,
|
42
|
+
search_definitions: search_definitions,
|
43
|
+
include_params: include_params,
|
44
|
+
revincludes: revincludes,
|
45
|
+
required_concepts: required_concepts,
|
46
|
+
must_supports: must_supports,
|
47
|
+
mandatory_elements: mandatory_elements,
|
48
|
+
bindings: bindings,
|
49
|
+
references: references
|
50
|
+
# tests: []
|
51
|
+
}
|
52
|
+
|
53
|
+
mark_mandatory_and_must_support_searches
|
54
|
+
handle_special_cases
|
55
|
+
|
56
|
+
@group_metadata_hash
|
57
|
+
end
|
58
|
+
|
59
|
+
def mark_mandatory_and_must_support_searches
|
60
|
+
searches.each do |search|
|
61
|
+
search[:names_not_must_support_or_mandatory] = search[:names].reject do |name|
|
62
|
+
full_paths = search_definitions[name.to_sym][:full_paths]
|
63
|
+
any_must_support_elements = (must_supports[:elements]).any? do |element|
|
64
|
+
full_must_support_paths = ["#{resource}.#{element[:original_path]}", "#{resource}.#{element[:path]}", element[:path]]
|
65
|
+
|
66
|
+
full_paths.any? do |path|
|
67
|
+
# allow for non-choice, choice types, _id
|
68
|
+
name == '_id' || full_must_support_paths.include?(path) || full_must_support_paths.include?("#{path}[x]")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
any_must_support_slices = must_supports[:slices].any? do |slice|
|
73
|
+
# only handle type slices because that is all we need for now
|
74
|
+
# for a slice like Observation.effective[x]:effectiveDateTime, the search parameter's expression could be
|
75
|
+
# either Observation.effective or Observation.effectiveDateTime.
|
76
|
+
if slice[:discriminator] && slice[:discriminator][:type] == 'type'
|
77
|
+
full_must_support_path = "#{resource}.#{slice[:path].sub('[x]', slice[:discriminator][:code])}"
|
78
|
+
base_must_support_path = "#{resource}.#{slice[:path].sub('[x]', '')}"
|
79
|
+
|
80
|
+
full_paths.intersection([full_must_support_path,base_must_support_path]).present?
|
81
|
+
else
|
82
|
+
false
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
any_must_support_extensions = must_supports[:extensions].any? do |extension|
|
87
|
+
extension[:url].present? && full_paths.any? { |path| extension[:url] == path[/(?<=where\(url=').*(?='\))/] }
|
88
|
+
end
|
89
|
+
|
90
|
+
any_mandatory_elements = mandatory_elements.any? do |element|
|
91
|
+
full_paths.include?(element)
|
92
|
+
end
|
93
|
+
|
94
|
+
any_must_support_elements || any_must_support_slices || any_mandatory_elements || any_must_support_extensions
|
95
|
+
end
|
96
|
+
|
97
|
+
search[:must_support_or_mandatory] = search[:names_not_must_support_or_mandatory].empty?
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
### BEGIN SPECIAL CASES ###
|
102
|
+
def first_search_params
|
103
|
+
# TODO
|
104
|
+
# I think we are still defining this? Shouldn't parameterless always be the first search at this point?
|
105
|
+
end
|
106
|
+
|
107
|
+
def handle_special_cases
|
108
|
+
set_first_search
|
109
|
+
end
|
110
|
+
|
111
|
+
def set_first_search
|
112
|
+
search = searches.find { |param| param[:names] == first_search_params }
|
113
|
+
return if search.nil?
|
114
|
+
|
115
|
+
searches.delete(search)
|
116
|
+
searches.unshift(search)
|
117
|
+
end
|
118
|
+
|
119
|
+
### END SPECIAL CASES ###
|
120
|
+
|
121
|
+
def profile
|
122
|
+
@profile ||= ig_resources.profile_by_url(profile_url)
|
123
|
+
end
|
124
|
+
|
125
|
+
def profile_elements
|
126
|
+
@profile_elements ||= profile.snapshot.element
|
127
|
+
end
|
128
|
+
|
129
|
+
def base_name
|
130
|
+
profile_url.split('StructureDefinition/').last
|
131
|
+
end
|
132
|
+
|
133
|
+
def name
|
134
|
+
base_name.tr('-', '_')
|
135
|
+
end
|
136
|
+
|
137
|
+
def class_name
|
138
|
+
base_name
|
139
|
+
.split('-')
|
140
|
+
.map(&:capitalize)
|
141
|
+
.join
|
142
|
+
.concat('Sequence')
|
143
|
+
end
|
144
|
+
|
145
|
+
def version
|
146
|
+
ig_metadata.ig_version
|
147
|
+
end
|
148
|
+
|
149
|
+
def reformatted_version
|
150
|
+
ig_metadata.reformatted_version
|
151
|
+
end
|
152
|
+
|
153
|
+
def resource
|
154
|
+
resource_capabilities.type
|
155
|
+
end
|
156
|
+
|
157
|
+
def profile_name
|
158
|
+
profile.title.gsub(' ', ' ')
|
159
|
+
end
|
160
|
+
|
161
|
+
def profile_version
|
162
|
+
profile.version
|
163
|
+
end
|
164
|
+
|
165
|
+
def title
|
166
|
+
title = profile.title.gsub(/\s*Profile/, '').strip
|
167
|
+
title
|
168
|
+
end
|
169
|
+
|
170
|
+
def short_description
|
171
|
+
"Verify support for the server capabilities required by the #{profile_name}."
|
172
|
+
end
|
173
|
+
|
174
|
+
def interactions
|
175
|
+
@interactions ||=
|
176
|
+
resource_capabilities.interaction.map do |interaction|
|
177
|
+
{
|
178
|
+
code: interaction.code,
|
179
|
+
expectation: interaction.extension.first.valueCode # TODO: fix expectation extension finding
|
180
|
+
}
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
def operations
|
185
|
+
@operations ||=
|
186
|
+
resource_capabilities.operation.map do |operation|
|
187
|
+
{
|
188
|
+
code: operation.name,
|
189
|
+
expectation: operation.extension.first.valueCode # TODO: fix expectation extension finding
|
190
|
+
}
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
def search_metadata_extractor
|
195
|
+
@search_metadata_extractor ||=
|
196
|
+
SearchMetadataExtractor.new(resource_capabilities, ig_resources, resource, profile_elements)
|
197
|
+
end
|
198
|
+
|
199
|
+
def searches
|
200
|
+
@searches ||= search_metadata_extractor.searches
|
201
|
+
end
|
202
|
+
|
203
|
+
def search_definitions
|
204
|
+
@search_definitions ||= search_metadata_extractor.search_definitions
|
205
|
+
end
|
206
|
+
|
207
|
+
def include_params
|
208
|
+
resource_capabilities.searchInclude || []
|
209
|
+
end
|
210
|
+
|
211
|
+
def revincludes
|
212
|
+
resource_capabilities.searchRevInclude || []
|
213
|
+
end
|
214
|
+
|
215
|
+
def required_concepts
|
216
|
+
# The base FHIR vital signs profile has a required binding that isn't
|
217
|
+
# relevant for any of its child profiles
|
218
|
+
return [] if resource == 'Observation'
|
219
|
+
|
220
|
+
profile_elements
|
221
|
+
.select { |element| element.type&.any? { |type| type.code == 'CodeableConcept' } }
|
222
|
+
.select { |element| element.binding&.strength == 'required' }
|
223
|
+
.map { |element| element.path.gsub("#{resource}.", '').gsub('[x]', 'CodeableConcept') }
|
224
|
+
.uniq
|
225
|
+
end
|
226
|
+
|
227
|
+
def terminology_binding_metadata_extractor
|
228
|
+
@terminology_binding_metadata_extractor ||=
|
229
|
+
TerminologyBindingMetadataExtractor.new(profile_elements, ig_resources, resource)
|
230
|
+
end
|
231
|
+
|
232
|
+
def bindings
|
233
|
+
@bindings ||=
|
234
|
+
terminology_binding_metadata_extractor.terminology_bindings
|
235
|
+
end
|
236
|
+
|
237
|
+
def must_support_metadata_extractor
|
238
|
+
@must_support_metadata_extractor ||=
|
239
|
+
MustSupportMetadataExtractor.new(profile_elements, profile, resource, ig_resources)
|
240
|
+
end
|
241
|
+
|
242
|
+
def must_supports
|
243
|
+
@must_supports ||=
|
244
|
+
must_support_metadata_extractor.must_supports
|
245
|
+
end
|
246
|
+
|
247
|
+
def mandatory_elements
|
248
|
+
@mandatory_elements ||=
|
249
|
+
profile_elements
|
250
|
+
.select { |element| element.min.positive? }
|
251
|
+
.map { |element| element.path }
|
252
|
+
.uniq
|
253
|
+
end
|
254
|
+
|
255
|
+
def references
|
256
|
+
@references ||=
|
257
|
+
profile_elements
|
258
|
+
.select { |element| element.type&.first&.code == 'Reference' }
|
259
|
+
.map do |reference_definition|
|
260
|
+
{
|
261
|
+
path: reference_definition.path,
|
262
|
+
profiles: reference_definition.type.first.targetProfile
|
263
|
+
}
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'active_support/all'
|
2
|
+
require 'fhir_models'
|
3
|
+
require 'pathname'
|
4
|
+
require 'rubygems/package'
|
5
|
+
require 'zlib'
|
6
|
+
require_relative 'ig_resources'
|
7
|
+
|
8
|
+
module DaVinciPlanNetTestKit
|
9
|
+
class Generator
|
10
|
+
class IGLoader
|
11
|
+
attr_accessor :ig_file_name
|
12
|
+
|
13
|
+
def initialize(ig_file_name)
|
14
|
+
self.ig_file_name = ig_file_name
|
15
|
+
end
|
16
|
+
|
17
|
+
def ig_resources
|
18
|
+
@ig_resources ||= IGResources.new
|
19
|
+
end
|
20
|
+
|
21
|
+
def load
|
22
|
+
load_ig
|
23
|
+
load_standalone_resources
|
24
|
+
end
|
25
|
+
|
26
|
+
def load_ig
|
27
|
+
tar = Gem::Package::TarReader.new(
|
28
|
+
Zlib::GzipReader.open(ig_file_name)
|
29
|
+
)
|
30
|
+
|
31
|
+
tar.each do |entry|
|
32
|
+
next if entry.directory?
|
33
|
+
|
34
|
+
file_name = entry.full_name.split('/').last
|
35
|
+
|
36
|
+
next unless file_name.end_with? '.json'
|
37
|
+
|
38
|
+
next unless entry.full_name.start_with? 'package/'
|
39
|
+
|
40
|
+
begin
|
41
|
+
resource = FHIR.from_contents(entry.read)
|
42
|
+
next if resource.nil?
|
43
|
+
rescue StandardError
|
44
|
+
puts "#{file_name} does not appear to be a FHIR resource."
|
45
|
+
next
|
46
|
+
end
|
47
|
+
|
48
|
+
ig_resources.add(resource)
|
49
|
+
end
|
50
|
+
|
51
|
+
ig_resources
|
52
|
+
end
|
53
|
+
|
54
|
+
def load_standalone_resources
|
55
|
+
ig_directory = ig_file_name.chomp('.tgz')
|
56
|
+
|
57
|
+
return ig_resources unless File.exist? ig_directory
|
58
|
+
|
59
|
+
Dir.glob(File.join(ig_directory, '*.json')).each do |file_path|
|
60
|
+
begin
|
61
|
+
resource = FHIR.from_contents(File.read(file_path))
|
62
|
+
next if resource.nil?
|
63
|
+
rescue StandardError
|
64
|
+
file_name = file_path.split('/').last
|
65
|
+
puts "#{file_name} does not appear to be a FHIR resource."
|
66
|
+
next
|
67
|
+
end
|
68
|
+
|
69
|
+
ig_resources.add(resource)
|
70
|
+
end
|
71
|
+
|
72
|
+
ig_resources
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require_relative 'special_cases'
|
2
|
+
|
3
|
+
module DaVinciPlanNetTestKit
|
4
|
+
class Generator
|
5
|
+
class IGMetadata
|
6
|
+
attr_accessor :ig_version, :groups
|
7
|
+
|
8
|
+
def reformatted_version
|
9
|
+
@reformatted_version ||= ig_version.delete('.').gsub('-', '_')
|
10
|
+
end
|
11
|
+
|
12
|
+
def ordered_groups
|
13
|
+
|
14
|
+
if SpecialCases.has_explicit_group_order()
|
15
|
+
@ordered_groups ||=
|
16
|
+
groups.sort_by { |group| SpecialCases.group_index(group.name) }
|
17
|
+
else
|
18
|
+
@ordered_groups ||=
|
19
|
+
non_delayed_groups + delayed_groups
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def delayed_groups
|
24
|
+
@delayed_groups ||=
|
25
|
+
groups.select { |group| group.delayed? }
|
26
|
+
end
|
27
|
+
|
28
|
+
def non_delayed_groups
|
29
|
+
@non_delayed_groups ||=
|
30
|
+
groups.reject { |group| group.delayed? }
|
31
|
+
end
|
32
|
+
|
33
|
+
def delayed_profiles
|
34
|
+
@delayed_profiles ||=
|
35
|
+
delayed_groups.map(&:profile_url)
|
36
|
+
end
|
37
|
+
|
38
|
+
def postprocess_groups(ig_resources)
|
39
|
+
groups.each do |group|
|
40
|
+
group.add_delayed_references(delayed_profiles, ig_resources)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_hash
|
45
|
+
{
|
46
|
+
ig_version: ig_version,
|
47
|
+
groups: groups.map(&:to_hash)
|
48
|
+
}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require_relative 'ig_metadata'
|
2
|
+
require_relative 'group_metadata_extractor'
|
3
|
+
|
4
|
+
module DaVinciPlanNetTestKit
|
5
|
+
class Generator
|
6
|
+
class IGMetadataExtractor
|
7
|
+
attr_accessor :ig_resources, :metadata
|
8
|
+
|
9
|
+
def initialize(ig_resources)
|
10
|
+
self.ig_resources = ig_resources
|
11
|
+
add_missing_supported_profiles
|
12
|
+
#remove_extra_supported_profiles
|
13
|
+
self.metadata = IGMetadata.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def extract
|
17
|
+
add_metadata_from_ig
|
18
|
+
add_metadata_from_resources
|
19
|
+
metadata
|
20
|
+
end
|
21
|
+
|
22
|
+
def add_metadata_from_ig
|
23
|
+
metadata.ig_version = "v#{ig_resources.ig.version}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def resources_in_capability_statement
|
27
|
+
ig_resources.capability_statement.rest.first.resource
|
28
|
+
end
|
29
|
+
|
30
|
+
def add_missing_supported_profiles
|
31
|
+
case ig_resources.ig.version
|
32
|
+
when '1.1.0'
|
33
|
+
# This is the only expected version currently, just leaving this blank for now.
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def remove_extra_supported_profiles
|
38
|
+
ig_resources.capability_statement.rest.first.resource
|
39
|
+
.find { |resource| resource.type == 'Observation' }
|
40
|
+
.supportedProfile.delete_if do |profile_url|
|
41
|
+
SpecialCases::PROFILES_TO_EXCLUDE.include?(profile_url)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def add_metadata_from_resources
|
46
|
+
metadata.groups =
|
47
|
+
resources_in_capability_statement.flat_map do |resource|
|
48
|
+
resource.supportedProfile&.map do |supported_profile|
|
49
|
+
next if supported_profile == 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire'
|
50
|
+
GroupMetadataExtractor.new(resource, supported_profile, metadata, ig_resources).group_metadata
|
51
|
+
end
|
52
|
+
end.compact
|
53
|
+
metadata.postprocess_groups(ig_resources)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module DaVinciPlanNetTestKit
|
2
|
+
class Generator
|
3
|
+
class IGResources
|
4
|
+
def add(resource)
|
5
|
+
resources_by_type[resource.resourceType] << resource
|
6
|
+
end
|
7
|
+
|
8
|
+
def capability_statement(mode = 'server')
|
9
|
+
resources_by_type['CapabilityStatement'].find do |capability_statement_resource|
|
10
|
+
capability_statement_resource.rest.any? { |r| r.mode == mode }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def ig
|
15
|
+
resources_by_type['ImplementationGuide'].first
|
16
|
+
end
|
17
|
+
|
18
|
+
def inspect
|
19
|
+
'IGResources'
|
20
|
+
end
|
21
|
+
|
22
|
+
def profile_by_url(url)
|
23
|
+
resources_by_type['StructureDefinition'].find { |profile| profile.url == url }
|
24
|
+
end
|
25
|
+
|
26
|
+
def resource_for_profile(url)
|
27
|
+
resources_by_type['StructureDefinition'].find { |profile| profile.url == url }.type
|
28
|
+
end
|
29
|
+
|
30
|
+
def value_set_by_url(url)
|
31
|
+
resources_by_type['ValueSet'].find { |profile| profile.url == url }
|
32
|
+
end
|
33
|
+
|
34
|
+
def code_system_by_url(url)
|
35
|
+
resources_by_type['CodeSystem'].find { |system| system.url == url }
|
36
|
+
end
|
37
|
+
|
38
|
+
def search_param_by_resource_and_name(resource, name)
|
39
|
+
# remove '_' from search parameter name, such as _id or _tag
|
40
|
+
normalized_name = normalized_name = name.to_s.delete_prefix('_')
|
41
|
+
|
42
|
+
if ['family', 'given'].include?(normalized_name) && resource == 'Practitioner'
|
43
|
+
normalized_name += '-name'
|
44
|
+
end
|
45
|
+
|
46
|
+
param = resources_by_type['SearchParameter']
|
47
|
+
.find { |param| param.id == "#{resource.downcase}-#{normalized_name}" }
|
48
|
+
|
49
|
+
if param.nil?
|
50
|
+
param = resources_by_type['SearchParameter']
|
51
|
+
.find { |param| param.id == "Resource-#{normalized_name}" }
|
52
|
+
end
|
53
|
+
|
54
|
+
return param
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def resources_by_type
|
60
|
+
@resources_by_type ||= Hash.new { |hash, key| hash[key] = [] }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|