davinci_crd_test_kit 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/presets/{inferno_crd_server_suite.json.erb → client_against_inferno_crd_server_suite.json.erb} +0 -33
- data/config/presets/{ri_crd_request_generator.json.erb → client_against_ri_crd_request_generator.json.erb} +1 -14
- data/config/presets/client_v221_against_inferno_crd_server_suite.json.erb +96 -0
- data/config/presets/client_v221_against_ri_br_provider.json.erb +31 -0
- data/config/presets/{ri_crd_request_generator.json_v221.json.erb → client_v221_against_ri_crd_request_generator.json.erb} +1 -1
- data/config/presets/{inferno_crd_client_suite.json.erb → server_against_inferno_crd_client_suite.json.erb} +0 -43
- data/config/presets/{ri_crd_server.json.erb → server_against_ri_crd_server.json.erb} +1 -44
- data/config/presets/{inferno_crd_client_suite_v221.json.erb → server_v221_against_inferno_crd_client_suite.json.erb} +1 -62
- data/config/presets/{inferno_crd_client_suite_prefetch_subset_v221.json.erb → server_v221_against_inferno_crd_client_suite_prefetch_subset.json.erb} +1 -47
- data/config/presets/server_v221_against_inferno_g31_suite.json.erb +49 -0
- data/lib/davinci_crd_test_kit/client/client_base_urls.rb +5 -0
- data/lib/davinci_crd_test_kit/client/client_input_helper.rb +102 -0
- data/lib/davinci_crd_test_kit/client/client_wait_messages.rb +68 -0
- data/lib/davinci_crd_test_kit/client/cross_hook_helper.rb +26 -0
- data/lib/davinci_crd_test_kit/client/endpoints/custom_service_response.rb +32 -17
- data/lib/davinci_crd_test_kit/client/endpoints/hook_request_data_access.rb +228 -0
- data/lib/davinci_crd_test_kit/client/endpoints/hook_request_endpoint.rb +172 -56
- data/lib/davinci_crd_test_kit/client/endpoints/mock_service_response.rb +29 -29
- data/lib/davinci_crd_test_kit/client/endpoints/scenario_service_response.rb +54 -0
- data/lib/davinci_crd_test_kit/client/endpoints/v201_hook_request_data_gathering.rb +219 -0
- data/lib/davinci_crd_test_kit/client/endpoints/v221_hook_request_data_gathering.rb +172 -0
- data/lib/davinci_crd_test_kit/client/jwt_claim_types.rb +28 -0
- data/lib/davinci_crd_test_kit/client/multi_request_message_helper.rb +1 -1
- data/lib/davinci_crd_test_kit/client/prefetched_coverage_payer_helper.rb +81 -0
- data/lib/davinci_crd_test_kit/client/prefetched_coverage_value.rb +14 -0
- data/lib/davinci_crd_test_kit/client/tagged_request_load_helper.rb +14 -25
- data/lib/davinci_crd_test_kit/client/v2.0.1/auth/retrieve_jwks_test.rb +36 -24
- data/lib/davinci_crd_test_kit/client/v2.0.1/auth/token_header_test.rb +14 -4
- data/lib/davinci_crd_test_kit/client/v2.0.1/auth/token_payload_test.rb +42 -22
- data/lib/davinci_crd_test_kit/client/v2.0.1/cds-services-v201.json +21 -21
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_appointment_book_group.rb +12 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_encounter_discharge_group.rb +12 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_encounter_start_group.rb +12 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_fhir_api_group.rb +2 -2
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_hooks_group.rb +7 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_order_dispatch_group.rb +12 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_order_select_group.rb +12 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/client_order_sign_group.rb +12 -10
- data/lib/davinci_crd_test_kit/client/v2.0.1/crd_client_suite.rb +2 -2
- data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/appointment_book_receive_request_test.rb +10 -31
- data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/encounter_discharge_receive_request_test.rb +10 -31
- data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/encounter_start_receive_request_test.rb +8 -29
- data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/order_dispatch_receive_request_test.rb +10 -31
- data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/order_select_receive_request_test.rb +8 -29
- data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/order_sign_receive_request_test.rb +10 -31
- data/lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_coverage_information.rb +3 -36
- data/lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb +3 -36
- data/lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_instructions.rb +3 -36
- data/lib/davinci_crd_test_kit/client/v2.0.1/registration/client_registration_verification_test.rb +3 -7
- data/lib/davinci_crd_test_kit/client/v2.0.1/registration/client_service_registration_attestation_test.rb +11 -3
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_request/hook_request_fetched_data_test.rb +4 -13
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_request/hook_request_optional_fields_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_request/hook_request_prefetch_equals_queried_test.rb +3 -13
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/client_display_cards_attest.rb +7 -17
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/inferno_response_validation.rb +4 -14
- data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_coverage_info_update_test.rb +10 -10
- data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_crd_update_verification_group.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/attestation_instructions.rb +10 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_coverage_based_invocation_attestation_test.rb +44 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_data_element_expectations_attestation_test.rb +44 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_hook_invocation_logging_attestation_test.rb +43 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_use_attestation_test.rb +41 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_prefetch_key_omission_attestation_test.rb +43 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_resource_identifiers_attestation_test.rb +43 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_response_case_distinction_attestation_test.rb +43 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_security_and_privacy_attestation_test.rb +43 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_workflow_integration_attestation_test.rb +44 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/decode_auth_token_test.rb +4 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/retrieve_jwks_test.rb +47 -26
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/token_header_test.rb +32 -6
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/token_payload_test.rb +60 -33
- data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-prefetch-subset-v221.json +48 -48
- data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-v221.json +51 -51
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_appointment_book_group.rb +24 -15
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_attestations_group.rb +43 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_group.rb +28 -9
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_interaction_group.rb +106 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_discharge_group.rb +20 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_start_group.rb +20 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_fhir_api_group.rb +39 -15
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_hooks_group.rb +16 -19
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_long_running_hook_group.rb +5 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_multiple_payers_hook_group.rb +40 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_dispatch_group.rb +23 -14
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_select_group.rb +19 -10
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_sign_group.rb +23 -14
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_registration_group.rb +7 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_scenarios_group.rb +32 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_self_pay_hook_group.rb +34 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_unknown_content_hook_group.rb +34 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_user_access_level_group.rb +82 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/crd_client_suite.rb +26 -6
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_card_must_support_coverage_information_test.rb +5 -5
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_fhirpath_collection_as_comma_delimited_string_test.rb +7 -14
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_hook_instances_unique_test.rb +3 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_jwt_ids_unique_test.rb +89 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_location_address_propagation_test.rb +65 -31
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_order_types_signed_test.rb +101 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb +13 -35
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/appointment_book_receive_request_test.rb +17 -116
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/base_hook_invocation_receive_request_test.rb +182 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/cross_hooks_receive_request_test.rb +126 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_discharge_receive_request_test.rb +17 -117
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_start_receive_request_test.rb +17 -117
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_dispatch_receive_request_test.rb +17 -125
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_select_receive_request_test.rb +17 -125
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_sign_receive_request_test.rb +17 -125
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_long_running_receive_request_test.rb +52 -32
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_skip_long_running_attestation_test.rb +12 -12
- data/lib/davinci_crd_test_kit/client/v2.2.1/multiple_payers/client_multiple_payers_request_verification_test.rb +215 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/multiple_payers/client_multiple_payers_workflow_test.rb +71 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/appointment_must_support_test.rb +84 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/appointment_reference_resolution_test.rb +82 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/client_cross_hook_must_support_group.rb +181 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/communication_request_must_support_test.rb +69 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/communication_request_reference_resolution_test.rb +79 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/coverage_must_support_test.rb +73 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/coverage_reference_resolution_test.rb +67 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/device_must_support_test.rb +59 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/device_request_must_support_test.rb +72 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/device_request_reference_resolution_test.rb +76 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/encounter_must_support_test.rb +83 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/encounter_reference_resolution_test.rb +76 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/location_must_support_test.rb +63 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/location_reference_resolution_test.rb +60 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/medication_must_support_test.rb +54 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/medication_request_must_support_test.rb +95 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/medication_request_reference_resolution_test.rb +79 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/nutrition_order_must_support_test.rb +136 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/nutrition_order_reference_resolution_test.rb +67 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/organization_must_support_test.rb +66 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/organization_reference_resolution_test.rb +60 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/patient_must_support_test.rb +69 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/practitioner_must_support_test.rb +65 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/practitioner_role_must_support_test.rb +60 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/practitioner_role_reference_resolution_test.rb +66 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/service_request_must_support_test.rb +93 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/service_request_reference_resolution_test.rb +81 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/vision_prescription_must_support_test.rb +79 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/vision_prescription_reference_resolution_test.rb +65 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/request_must_support_reference_resolution.rb +379 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/request_must_support_scope.rb +66 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/request_must_support_with_attestation_option.rb +331 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/registration/client_registration_verification_test.rb +16 -30
- data/lib/davinci_crd_test_kit/client/v2.2.1/registration/client_service_registration_attestation_test.rb +84 -39
- data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_workflow_test.rb +62 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_attestation_test.rb +99 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_receive_request_test.rb +67 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_api_access_test.rb +124 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_prefetch_scope_test.rb +85 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_receive_request_test.rb +92 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_same_scenario_test.rb +340 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_target_reference.rb +16 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_conformance_test.rb +64 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_coverage_verification_test.rb +31 -73
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_data_fetch_verification_test.rb +13 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb +8 -8
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb +12 -14
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_profiles_test.rb +3 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_requested_version_test.rb +17 -5
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_secured_transport_test.rb +2 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/client_display_cards_attest.rb +59 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/hook_response_support_coverage_information_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/inferno_response_validation.rb +13 -11
- data/lib/davinci_crd_test_kit/cross_suite/base_urls.rb +12 -0
- data/lib/davinci_crd_test_kit/cross_suite/cards_identification.rb +18 -2
- data/lib/davinci_crd_test_kit/cross_suite/fhirpath_on_cds_request.rb +10 -9
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/appointment_with_order/metadata.yml +67 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/appointment_without_order/metadata.yml +150 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/communication_request/metadata.yml +71 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/coverage/metadata.yml +71 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/device/metadata.yml +22 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/device_request/metadata.yml +85 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/encounter/metadata.yml +82 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/hrex_organization/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/location/metadata.yml +27 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/medication/metadata.yml +17 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/medication_request/metadata.yml +166 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/nutrition_order/metadata.yml +166 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/organization/metadata.yml +42 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/patient/metadata.yml +29 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/practitioner/metadata.yml +37 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/practitioner_role/metadata.yml +36 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/service_request/metadata.yml +202 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_allergyintolerance/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_condition_encounter_diagnosis/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_condition_problems_health_concerns/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_diagnosticreport_lab/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_diagnosticreport_note/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_documentreference/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_location/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_organization/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_patient/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_practitioner/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_procedure/metadata.yml +6 -0
- data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/vision_prescription/metadata.yml +66 -0
- data/lib/davinci_crd_test_kit/cross_suite/hook_request_field_validation.rb +3 -2
- data/lib/davinci_crd_test_kit/cross_suite/hook_request_resource_extraction.rb +121 -0
- data/lib/davinci_crd_test_kit/cross_suite/logical_models_override_helper.rb +47 -22
- data/lib/davinci_crd_test_kit/cross_suite/must_support_references.rb +49 -0
- data/lib/davinci_crd_test_kit/cross_suite/must_support_slice_matching.rb +50 -0
- data/lib/davinci_crd_test_kit/cross_suite/prefetch_completeness_checker.rb +75 -39
- data/lib/davinci_crd_test_kit/cross_suite/prefetch_profile_validation.rb +2 -0
- data/lib/davinci_crd_test_kit/cross_suite/profile_metadata.rb +75 -0
- data/lib/davinci_crd_test_kit/cross_suite/requests_logical_model_validation.rb +45 -36
- data/lib/davinci_crd_test_kit/cross_suite/resource_identity.rb +183 -0
- data/lib/davinci_crd_test_kit/cross_suite/response_logical_model_validation.rb +48 -41
- data/lib/davinci_crd_test_kit/cross_suite/short_circuit_interaction.rb +28 -0
- data/lib/davinci_crd_test_kit/cross_suite/tags.rb +18 -1
- data/lib/davinci_crd_test_kit/generator/crd_must_support_metadata_extractor.rb +147 -0
- data/lib/davinci_crd_test_kit/generator/must_support_metadata_generator.rb +207 -0
- data/lib/davinci_crd_test_kit/generator/must_support_test_generator.rb +249 -0
- data/lib/davinci_crd_test_kit/generator/templates/must_support_group.rb.erb +118 -0
- data/lib/davinci_crd_test_kit/generator/templates/must_support_test.rb.erb +22 -0
- data/lib/davinci_crd_test_kit/generator/templates/reference_resolution_test.rb.erb +22 -0
- data/lib/davinci_crd_test_kit/igs/davinci_crd_2.2.1.tgz +0 -0
- data/lib/davinci_crd_test_kit/igs/davinci_hrex_1.2.0.tgz +0 -0
- data/lib/davinci_crd_test_kit/metadata.rb +2 -2
- data/lib/davinci_crd_test_kit/requirements/cds-hooks_3.0.0-ballot_requirements.xlsx +0 -0
- data/lib/davinci_crd_test_kit/requirements/davinci_crd_test_kit_requirements.csv +9 -4
- data/lib/davinci_crd_test_kit/requirements/generated/crd_client_requirements_coverage.csv +107 -107
- data/lib/davinci_crd_test_kit/requirements/generated/crd_client_v221_requirements_coverage.csv +107 -102
- data/lib/davinci_crd_test_kit/requirements/generated/crd_server_requirements_coverage.csv +18 -18
- data/lib/davinci_crd_test_kit/requirements/generated/crd_server_v221_requirements_coverage.csv +36 -32
- data/lib/davinci_crd_test_kit/requirements/hl7.fhir.us.davinci-crd_2.2.1_requirements.xlsx +0 -0
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_create_endpoint.rb +2 -0
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_delete_endpoint.rb +2 -0
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_read_endpoint.rb +2 -0
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_request_handler.rb +6 -0
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_search_endpoint.rb +21 -12
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_update_endpoint.rb +2 -0
- data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr_endpoints.rb +3 -0
- data/lib/davinci_crd_test_kit/server/server_abstract_invoke_hook_test.rb +2 -2
- data/lib/davinci_crd_test_kit/server/v2.0.1/crd_server_suite.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.0.1/server_hooks_group.rb +5 -5
- data/lib/davinci_crd_test_kit/server/v2.2.1/discovery/discovery_standard_prefetch_expressions_test.rb +1 -2
- data/lib/davinci_crd_test_kit/server/v2.2.1/must_support/supported_us_core_versions_test.rb +2 -2
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_appointment_book_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_demonstrate_hook_response_group.rb +3 -3
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_discharge_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_start_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_hooks_group.rb +5 -5
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_dispatch_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_select_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_sign_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_required_card_response_validation_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_not_found_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_active_coverage_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_member_found_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/technical_issues_group.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_context_validation_test.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_no_custom_extensions_test.rb +2 -2
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_optional_fields_validation_test.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_required_fields_validation_test.rb +1 -1
- data/lib/davinci_crd_test_kit/version.rb +2 -2
- metadata +132 -16
- data/config/presets/inferno_crd_server_suite_v221.json.erb +0 -94
- data/lib/davinci_crd_test_kit/client/endpoints/gather_response_generation_data.rb +0 -410
- data/lib/davinci_crd_test_kit/server/resource_extractor.rb +0 -68
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
require_relative '../../../cross_suite/cards_identification'
|
|
2
|
+
require_relative '../../tagged_request_load_helper'
|
|
3
|
+
require_relative '../../multi_request_message_helper'
|
|
4
|
+
require_relative '../../prefetched_coverage_payer_helper'
|
|
5
|
+
require_relative '../../client_input_helper'
|
|
6
|
+
|
|
7
|
+
module DaVinciCRDTestKit
|
|
8
|
+
module V221
|
|
9
|
+
class ClientMultiplePayersRequestVerificationTest < Inferno::Test
|
|
10
|
+
include CardsIdentification
|
|
11
|
+
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
12
|
+
include DaVinciCRDTestKit::MultiRequestMessageHelper
|
|
13
|
+
include DaVinciCRDTestKit::PrefetchedCoveragePayerHelper
|
|
14
|
+
|
|
15
|
+
# elements that may legitimately differ between the requests made to the two payers: unique
|
|
16
|
+
# request identifiers, authorization tokens, prefetched data carrying the payer's coverage,
|
|
17
|
+
# and the extension carrying the `davinci-crd.configuration` settings checked separately
|
|
18
|
+
IGNORED_COMPARISON_ELEMENTS = ['hookInstance', 'fhirAuthorization', 'prefetch', 'extension'].freeze
|
|
19
|
+
|
|
20
|
+
id :crd_v221_client_multiple_payers_request_verification
|
|
21
|
+
title 'CRD client solicits coverage information from only one payer'
|
|
22
|
+
description %(
|
|
23
|
+
When a patient has multiple active coverages that could be relevant to the current action,
|
|
24
|
+
the CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/deviations.html#ci-c-dev-28)
|
|
25
|
+
that CRD clients select from those coverages which is most likely to be primary and only
|
|
26
|
+
solicit coverage information for that one payer. If CRD clients invoke CRD on other payers, the
|
|
27
|
+
CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/deviations.html#ci-c-dev-30)
|
|
28
|
+
that response types that return coverage information are disabled for those 'likely
|
|
29
|
+
secondary' payers.
|
|
30
|
+
|
|
31
|
+
During this test, Inferno will verify that the CRD client made one or two hook
|
|
32
|
+
requests when the tester performed a workflow for a patient with two payer coverages during
|
|
33
|
+
the previous test. If a single request was received, it must not disable coverage
|
|
34
|
+
information responses. If two requests were received, each must have been made to a service
|
|
35
|
+
associated with a different payer, they must be the same except for their coverage details,
|
|
36
|
+
and exactly one of them must disable coverage information using the `coverage-info` key
|
|
37
|
+
in the `davinci-crd.configuration` extension.
|
|
38
|
+
|
|
39
|
+
Additionally, the CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/deviations.html#ci-c-dev-29)
|
|
40
|
+
that only the coverage selected for the payer be included in the prefetch content of a CRD request,
|
|
41
|
+
so Inferno verifies that each request's prefetched coverage contains exactly one Coverage and that its
|
|
42
|
+
payer is the Organization associated with the invoked simulated CRD server during the "Registration" group.
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@dev-26-A', 'hl7.fhir.us.davinci-crd_2.2.1@dev-28',
|
|
46
|
+
'hl7.fhir.us.davinci-crd_2.2.1@dev-29-A', 'hl7.fhir.us.davinci-crd_2.2.1@dev-30',
|
|
47
|
+
'hl7.fhir.us.davinci-crd_2.2.1@hook-1'
|
|
48
|
+
|
|
49
|
+
input :complete_prefetch_service_organization_id,
|
|
50
|
+
title: 'Complete Prefetch Service Organization id',
|
|
51
|
+
description: %(
|
|
52
|
+
#{ClientInputHelper.service_organization_id_intro('complete')}
|
|
53
|
+
One of the patient's two Coverages must reference
|
|
54
|
+
this Organization as its payer.
|
|
55
|
+
#{ClientInputHelper.rerun_registration_note}
|
|
56
|
+
),
|
|
57
|
+
type: 'text',
|
|
58
|
+
optional: true,
|
|
59
|
+
locked: true
|
|
60
|
+
input :subset_prefetch_service_organization_id,
|
|
61
|
+
title: 'Subset Prefetch Service Organization id',
|
|
62
|
+
description: %(
|
|
63
|
+
#{ClientInputHelper.service_organization_id_intro('subset')}
|
|
64
|
+
One of the patient's two Coverages must reference
|
|
65
|
+
this Organization as its payer.
|
|
66
|
+
#{ClientInputHelper.rerun_registration_note}
|
|
67
|
+
),
|
|
68
|
+
type: 'text',
|
|
69
|
+
optional: true,
|
|
70
|
+
locked: true
|
|
71
|
+
|
|
72
|
+
def parse_request_bodies(hook_requests)
|
|
73
|
+
hook_requests.map do |request|
|
|
74
|
+
# request_body is nil when the request had no body
|
|
75
|
+
body = JSON.parse(request.request_body.to_s)
|
|
76
|
+
body if body.is_a?(Hash)
|
|
77
|
+
rescue JSON::ParserError
|
|
78
|
+
nil
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Only the coverage selected for the invoked payer may be prefetched, and it must be issued by that payer.
|
|
83
|
+
def check_prefetched_coverages(hook_requests, request_bodies)
|
|
84
|
+
hook_requests.zip(request_bodies).each_with_index do |(request, request_body), request_index|
|
|
85
|
+
next unless single_prefetched_coverage?(request_body, request_index)
|
|
86
|
+
|
|
87
|
+
expected_payer_org_id = payer_org_id_for_request(request)
|
|
88
|
+
if expected_payer_org_id.blank?
|
|
89
|
+
add_request_message('error', 'No Inferno Payer Organization id configured for the invoked service, ' \
|
|
90
|
+
'so the payer of the prefetched Coverage could not be checked.',
|
|
91
|
+
request_index)
|
|
92
|
+
next
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if coverage_payer_reference(first_prefetched_coverage(request_body)).blank?
|
|
96
|
+
add_request_message('error', 'Coverage has no payer reference.', request_index)
|
|
97
|
+
next
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
check_payer_organization(request_body, request_index, expected_payer_org_id)
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def single_prefetched_coverage?(request_body, request_index)
|
|
105
|
+
coverage_count = prefetched_coverages(request_body).size
|
|
106
|
+
return true if coverage_count == 1
|
|
107
|
+
|
|
108
|
+
message = if coverage_count.zero?
|
|
109
|
+
'No Coverage was provided in the prefetched coverage data.'
|
|
110
|
+
else
|
|
111
|
+
"#{coverage_count} Coverages were provided in the prefetched coverage data. Only the " \
|
|
112
|
+
'coverage selected for the invoked payer may be included.'
|
|
113
|
+
end
|
|
114
|
+
add_request_message('error', message, request_index)
|
|
115
|
+
false
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def check_solitary_request(request_body)
|
|
119
|
+
return unless coverage_info_configuration_disabled?(request_body)
|
|
120
|
+
|
|
121
|
+
add_message('error',
|
|
122
|
+
'The hook request disables coverage information in its `davinci-crd.configuration` ' \
|
|
123
|
+
'extension. The CRD client must solicit coverage information from the payer associated ' \
|
|
124
|
+
'with the coverage most likely to be primary.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def check_request_pair(hook_requests, request_bodies)
|
|
128
|
+
check_distinct_payers(hook_requests)
|
|
129
|
+
check_matching_workflows(request_bodies)
|
|
130
|
+
check_single_solicitation(request_bodies)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def check_distinct_payers(hook_requests)
|
|
134
|
+
return if hook_requests.map { |request| prefetch_target(request) }.uniq.length == 2
|
|
135
|
+
|
|
136
|
+
add_message('error',
|
|
137
|
+
'Both hook requests were made to the same Inferno simulated CRD server. Each request ' \
|
|
138
|
+
'must be directed at a different payer: one to a service on each of the two simulated ' \
|
|
139
|
+
'CRD servers.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def check_matching_workflows(request_bodies)
|
|
143
|
+
first, second = request_bodies.map { |request_body| comparable_request_content(request_body) }
|
|
144
|
+
return if first == second
|
|
145
|
+
|
|
146
|
+
differing_elements = (first.keys | second.keys).reject { |key| first[key] == second[key] }
|
|
147
|
+
add_message('error',
|
|
148
|
+
"The two hook requests differ in #{quoted_list(differing_elements)} and so do not " \
|
|
149
|
+
'appear to invoke CRD for the same workflow action. The requests made to the two ' \
|
|
150
|
+
'payers must be the same except for their coverage details.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def check_single_solicitation(request_bodies)
|
|
154
|
+
disabled_count = request_bodies.count { |request_body| coverage_info_configuration_disabled?(request_body) }
|
|
155
|
+
if disabled_count.zero?
|
|
156
|
+
add_message('error',
|
|
157
|
+
'Neither hook request disables coverage information. The request made to the payer ' \
|
|
158
|
+
'associated with the likely secondary coverage must set `coverage-info` to `false` ' \
|
|
159
|
+
'in its `davinci-crd.configuration` extension.')
|
|
160
|
+
elsif disabled_count == 2
|
|
161
|
+
add_message('error',
|
|
162
|
+
'Both hook requests disable coverage information in their `davinci-crd.configuration` ' \
|
|
163
|
+
'extensions. The CRD client must solicit coverage information from the payer associated ' \
|
|
164
|
+
'with the coverage most likely to be primary.')
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def comparable_request_content(request_body)
|
|
169
|
+
strip_coverage_references(request_body.except(*IGNORED_COMPARISON_ELEMENTS))
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# `insurance` elements on resources within the hook context reference the coverage
|
|
173
|
+
# relevant to the request, so they may differ between the two payers' requests
|
|
174
|
+
def strip_coverage_references(value)
|
|
175
|
+
case value
|
|
176
|
+
when Hash
|
|
177
|
+
value.except('insurance').transform_values { |element| strip_coverage_references(element) }
|
|
178
|
+
when Array
|
|
179
|
+
value.map { |element| strip_coverage_references(element) }
|
|
180
|
+
else
|
|
181
|
+
value
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def quoted_list(names)
|
|
186
|
+
names.map { |name| "`#{name}`" }.to_sentence
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
run do
|
|
190
|
+
hook_requests = load_interaction_group_requests
|
|
191
|
+
|
|
192
|
+
assert hook_requests.present?,
|
|
193
|
+
'Inferno did not receive any hook requests during the previous test. The CRD client must ' \
|
|
194
|
+
'solicit coverage information from the payer associated with the coverage most likely ' \
|
|
195
|
+
'to be primary.'
|
|
196
|
+
assert hook_requests.length <= 2,
|
|
197
|
+
"Inferno received #{hook_requests.length} hook requests, but expected at most one for " \
|
|
198
|
+
'each of the two payers.'
|
|
199
|
+
|
|
200
|
+
request_bodies = parse_request_bodies(hook_requests)
|
|
201
|
+
assert request_bodies.all?(&:present?), 'Received hook requests do not contain valid JSON bodies.'
|
|
202
|
+
|
|
203
|
+
check_prefetched_coverages(hook_requests, request_bodies)
|
|
204
|
+
if hook_requests.one?
|
|
205
|
+
check_solitary_request(request_bodies.first)
|
|
206
|
+
else
|
|
207
|
+
check_request_pair(hook_requests, request_bodies)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
assert_no_error_messages('Received hook requests do not demonstrate conformant solicitation of coverage ' \
|
|
211
|
+
'information from a single payer. See Messages for details.')
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
data/lib/davinci_crd_test_kit/client/v2.2.1/multiple_payers/client_multiple_payers_workflow_test.rb
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
require_relative '../../client_wait_messages'
|
|
2
|
+
require_relative '../client_urls'
|
|
3
|
+
require_relative '../../client_input_helper'
|
|
4
|
+
|
|
5
|
+
module DaVinciCRDTestKit
|
|
6
|
+
module V221
|
|
7
|
+
class ClientMultiplePayersWorkflowTest < Inferno::Test
|
|
8
|
+
include ClientURLs
|
|
9
|
+
include DaVinciCRDTestKit::ClientWaitMessages
|
|
10
|
+
|
|
11
|
+
id :crd_v221_client_multiple_payers_workflow
|
|
12
|
+
title 'CRD client performs a workflow for a patient with multiple payer coverages'
|
|
13
|
+
description %(
|
|
14
|
+
During this test, the tester will perform a workflow that triggers hook invocations for a
|
|
15
|
+
request on a patient that has two active coverages associated with two different payers,
|
|
16
|
+
each associated with one of Inferno's simulated CRD servers. The CRD client is expected to solicit
|
|
17
|
+
coverage information from only the payer associated with the coverage most likely to be primary
|
|
18
|
+
and may also invoke the hook on the other payer with coverage information disabled using
|
|
19
|
+
the `coverage-info` key within the `davinci-crd.configuration` extension. Inferno will return
|
|
20
|
+
at most a fixed [mocked response](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
|
|
21
|
+
containing only a coverage information system action, but not if the hook request disables
|
|
22
|
+
coverage information responses through the configuration extension. Inferno will wait until
|
|
23
|
+
the tester acknowledges that all hook requests triggered by the workflow have been sent.
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
input :cds_jwt_iss,
|
|
27
|
+
title: 'CRD JWT Issuer',
|
|
28
|
+
description: ClientInputHelper.locked_cds_jwt_iss_description,
|
|
29
|
+
locked: true
|
|
30
|
+
payer_organization_id_inputs
|
|
31
|
+
output :continuation_url
|
|
32
|
+
flag_as_tester_initiated_exchange
|
|
33
|
+
flag_as_attestation
|
|
34
|
+
|
|
35
|
+
run do
|
|
36
|
+
identifier = cds_jwt_iss
|
|
37
|
+
continuation_url = resume_pass_url_for(identifier)
|
|
38
|
+
output(continuation_url:)
|
|
39
|
+
|
|
40
|
+
wait(
|
|
41
|
+
identifier:,
|
|
42
|
+
message: wait_message
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def wait_message
|
|
47
|
+
<<~MESSAGE
|
|
48
|
+
#### Multiple Payers Scenario Test
|
|
49
|
+
|
|
50
|
+
Perform actions in the CRD client that trigger hook invocation(s), such as
|
|
51
|
+
one performed during previous tests, for a patient that has two active
|
|
52
|
+
coverages associated with two different payers, each associated with one
|
|
53
|
+
of the two Inferno simulated CRD service endpoints.
|
|
54
|
+
|
|
55
|
+
Once all necessary actions are complete, [click here](#{continuation_url}) to attest
|
|
56
|
+
that the CRD client triggered hook invocation(s) for a patient with active coverages
|
|
57
|
+
from two different payers and that all resulting hook requests have been sent.
|
|
58
|
+
|
|
59
|
+
#{service_discovery_endpoints_section}
|
|
60
|
+
#### Authentication and Identification
|
|
61
|
+
|
|
62
|
+
#{session_identification_message}
|
|
63
|
+
|
|
64
|
+
#### Responses
|
|
65
|
+
|
|
66
|
+
Inferno will return a mocked coverage-information response.
|
|
67
|
+
MESSAGE
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/appointment_must_support_test.rb
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
require_relative '../request_must_support_with_attestation_option'
|
|
2
|
+
|
|
3
|
+
module DaVinciCRDTestKit
|
|
4
|
+
module V221
|
|
5
|
+
class AppointmentMustSupportTest < RequestMustSupportWithAttestationOption
|
|
6
|
+
id :crd_v221_appointment_must_support
|
|
7
|
+
title 'CRD Appointment must support elements are observed'
|
|
8
|
+
description <<~DESCRIPTION
|
|
9
|
+
The CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/conformance.html#ci-c-conf-3)
|
|
10
|
+
that when a client "maintains a mustSupport data element and surfaces it to users, then it
|
|
11
|
+
SHALL be exposed in their FHIR interface when the data exists and privacy constraints permit."
|
|
12
|
+
|
|
13
|
+
During this test, Inferno will verify that all must support elements defined in the
|
|
14
|
+
profile(s) listed below are demonstrated within hook requests made during this session.
|
|
15
|
+
This check may vacuously pass if the tester has attested that this resource type is not
|
|
16
|
+
supported by the CRD client.
|
|
17
|
+
|
|
18
|
+
If any must support elements are not demonstrated, the tester will have the option to attest
|
|
19
|
+
that these elements are not supported by the CRD client or surfaced to its users. Testers
|
|
20
|
+
must set up scenarios in which the "data exists and privacy constraints permit" Inferno to view
|
|
21
|
+
the must support information.
|
|
22
|
+
|
|
23
|
+
Inferno will consider resources present within the `context` and `prefetch` elements of all hook
|
|
24
|
+
requests made during the latest run of each "Hooks" subgroup and the "Additional Hook
|
|
25
|
+
Invocations" group, but not any made within the "Scenarios"
|
|
26
|
+
subgroups. If any of the considered groups are re-run, then requests made during prior runs will
|
|
27
|
+
no longer be considered and must support elements demonstrated only during that prior run must
|
|
28
|
+
be re-demonstrated on the new run or a subsequent one.
|
|
29
|
+
|
|
30
|
+
For additional details on this test, see the [Client Must Support Tests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support)
|
|
31
|
+
page and specifically the [Requests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support#requests)
|
|
32
|
+
section in the CRD Test Kit wiki.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### [CRD Appointment with Order](http://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-profile-appointment-with-order.html) or [CRD Appointment without Order](http://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-profile-appointment-no-order.html)
|
|
36
|
+
|
|
37
|
+
The elements below are drawn from both appointment profiles, and each may be demonstrated on
|
|
38
|
+
an instance of either of them. A CRD client that supports only one of these profiles can
|
|
39
|
+
attest to non-support of the related elements.
|
|
40
|
+
- `appointmentType`
|
|
41
|
+
- `basedOn`
|
|
42
|
+
- `basedOn.extension:AlternateReference`
|
|
43
|
+
- `contained`
|
|
44
|
+
- `end`
|
|
45
|
+
- `extension:Coverage-Information`
|
|
46
|
+
- `identifier`
|
|
47
|
+
- `participant.actor`
|
|
48
|
+
- `participant.status`
|
|
49
|
+
- `participant:Patient`
|
|
50
|
+
- `participant:Patient.actor`
|
|
51
|
+
- `participant:Patient.status`
|
|
52
|
+
- `participant:PrimaryPerformer`
|
|
53
|
+
- `participant:PrimaryPerformer.actor`
|
|
54
|
+
- `participant:PrimaryPerformer.status`
|
|
55
|
+
- `reasonReference`
|
|
56
|
+
- `requestedPeriod`
|
|
57
|
+
- `serviceCategory`
|
|
58
|
+
- `serviceCategory:encounterType`
|
|
59
|
+
- `serviceCategory:serviceType`
|
|
60
|
+
- `serviceCategory:us-core`
|
|
61
|
+
- `serviceType`
|
|
62
|
+
- `serviceType.extension:BillingOptions`
|
|
63
|
+
- `specialty`
|
|
64
|
+
- `start`
|
|
65
|
+
- `status`
|
|
66
|
+
DESCRIPTION
|
|
67
|
+
|
|
68
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@conf-3',
|
|
69
|
+
'hl7.fhir.us.davinci-crd_2.2.1@billopt-1'
|
|
70
|
+
|
|
71
|
+
config(
|
|
72
|
+
options: {
|
|
73
|
+
ig_version: 'v2.2.1',
|
|
74
|
+
profiles: [
|
|
75
|
+
{ resource_type: 'Appointment',
|
|
76
|
+
title: 'CRD Appointment',
|
|
77
|
+
supporting_profile: true,
|
|
78
|
+
profile_keys: ['appointment_with_order', 'appointment_without_order'] }
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
require_relative '../request_must_support_reference_resolution'
|
|
2
|
+
|
|
3
|
+
module DaVinciCRDTestKit
|
|
4
|
+
module V221
|
|
5
|
+
class AppointmentReferenceResolutionTest < RequestMustSupportReferenceResolution
|
|
6
|
+
id :crd_v221_appointment_must_support_reference_resolution
|
|
7
|
+
title 'CRD Appointment must support references resolve'
|
|
8
|
+
description <<~DESCRIPTION
|
|
9
|
+
The CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/conformance.html#ci-c-conf-3)
|
|
10
|
+
that when a client "maintains a mustSupport data element and surfaces it to users, then it
|
|
11
|
+
SHALL be exposed in their FHIR interface when the data exists and privacy constraints permit."
|
|
12
|
+
For a must support Reference element, this means that the referenced resource can be retrieved.
|
|
13
|
+
Additionally, when some of the element's target profiles are themselves marked must support
|
|
14
|
+
or the element has only one target profile, references to resources conforming to each of
|
|
15
|
+
those profiles must be observed. Otherwise, a referenced resource must conform to any one of
|
|
16
|
+
the element's target profiles.
|
|
17
|
+
|
|
18
|
+
During this test, Inferno will verify that for each must support Reference element listed
|
|
19
|
+
below that was populated, at least one of its references resolved to a resource
|
|
20
|
+
conforming to each target profile listed for the element, or to any one of them where the
|
|
21
|
+
list says so. Target profiles for resource types the tester indicated that the CRD client does
|
|
22
|
+
not support are not checked. The test will skip if Inferno does not observe all of the
|
|
23
|
+
required references, indicating that additional data is needed to demonstrate conformance.
|
|
24
|
+
|
|
25
|
+
Inferno will look at references found in resources in the same hook requests as the must support
|
|
26
|
+
element tests: those made during the latest run of each "Hooks" subgroup and the "Additional Hook
|
|
27
|
+
Invocations" group. If no instances of the tested resource type were observed, the test skips
|
|
28
|
+
unless the tester indicated that the CRD client does not support the resource type.
|
|
29
|
+
|
|
30
|
+
Inferno obtains the reference targets during the hook request by performing FHIR reads of
|
|
31
|
+
referenced resources whose absolute URL can be determined and that are not already present
|
|
32
|
+
in the `context` or `prefetch` fields of the hook request. See the wiki's documentation
|
|
33
|
+
on [reference resolution within hook requests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Prefetch-Verification#reference-resolution-within-hook-requests)
|
|
34
|
+
and [simulated CRD server behavior](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#prefetch-and-additional-data-retrieval)
|
|
35
|
+
for details on how Inferno identifies and obtains these resources.
|
|
36
|
+
|
|
37
|
+
For additional details on this test, see the [Client Must Support Tests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support)
|
|
38
|
+
page and specifically the [Must Support References](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support#must-support-references)
|
|
39
|
+
section in the CRD Test Kit wiki.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### CRD Appointment
|
|
43
|
+
|
|
44
|
+
- `basedOn`
|
|
45
|
+
- [CRD Service Request](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-profile-servicerequest.html)
|
|
46
|
+
- `participant.actor`, any one of:
|
|
47
|
+
- [Patient](https://hl7.org/fhir/R4/patient.html)
|
|
48
|
+
- [Practitioner](https://hl7.org/fhir/R4/practitioner.html)
|
|
49
|
+
- [PractitionerRole](https://hl7.org/fhir/R4/practitionerrole.html)
|
|
50
|
+
- [RelatedPerson](https://hl7.org/fhir/R4/relatedperson.html)
|
|
51
|
+
- [Device](https://hl7.org/fhir/R4/device.html)
|
|
52
|
+
- [HealthcareService](https://hl7.org/fhir/R4/healthcareservice.html)
|
|
53
|
+
- [Location](https://hl7.org/fhir/R4/location.html)
|
|
54
|
+
- `participant:Patient.actor`
|
|
55
|
+
- [CRD Patient](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-profile-patient.html)
|
|
56
|
+
- `participant:PrimaryPerformer.actor`, any one of:
|
|
57
|
+
- [CRD Practitioner](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-profile-practitioner.html)
|
|
58
|
+
- [HRex PractitionerRole Profile](https://hl7.org/fhir/us/davinci-hrex/1.2.0/StructureDefinition-hrex-practitionerrole.html)
|
|
59
|
+
- [CRD Location](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-profile-location.html)
|
|
60
|
+
- `reasonReference`, any one of:
|
|
61
|
+
- [Condition](https://hl7.org/fhir/R4/condition.html)
|
|
62
|
+
- [Procedure](https://hl7.org/fhir/R4/procedure.html)
|
|
63
|
+
- [Observation](https://hl7.org/fhir/R4/observation.html)
|
|
64
|
+
- [ImmunizationRecommendation](https://hl7.org/fhir/R4/immunizationrecommendation.html)
|
|
65
|
+
DESCRIPTION
|
|
66
|
+
|
|
67
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@conf-3'
|
|
68
|
+
|
|
69
|
+
config(
|
|
70
|
+
options: {
|
|
71
|
+
ig_version: 'v2.2.1',
|
|
72
|
+
profiles: [
|
|
73
|
+
{ resource_type: 'Appointment',
|
|
74
|
+
title: 'CRD Appointment',
|
|
75
|
+
supporting_profile: true,
|
|
76
|
+
profile_keys: ['appointment_with_order', 'appointment_without_order'] }
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
require_relative '../../cross_hook/client_card_must_support_coverage_information_test'
|
|
2
|
+
require_relative '../../cross_hook/client_order_types_signed_test'
|
|
3
|
+
require_relative 'appointment_must_support_test'
|
|
4
|
+
require_relative 'appointment_reference_resolution_test'
|
|
5
|
+
require_relative 'communication_request_must_support_test'
|
|
6
|
+
require_relative 'communication_request_reference_resolution_test'
|
|
7
|
+
require_relative 'coverage_must_support_test'
|
|
8
|
+
require_relative 'coverage_reference_resolution_test'
|
|
9
|
+
require_relative 'device_must_support_test'
|
|
10
|
+
require_relative 'device_request_must_support_test'
|
|
11
|
+
require_relative 'device_request_reference_resolution_test'
|
|
12
|
+
require_relative 'encounter_must_support_test'
|
|
13
|
+
require_relative 'encounter_reference_resolution_test'
|
|
14
|
+
require_relative 'location_must_support_test'
|
|
15
|
+
require_relative 'location_reference_resolution_test'
|
|
16
|
+
require_relative 'medication_must_support_test'
|
|
17
|
+
require_relative 'medication_request_must_support_test'
|
|
18
|
+
require_relative 'medication_request_reference_resolution_test'
|
|
19
|
+
require_relative 'nutrition_order_must_support_test'
|
|
20
|
+
require_relative 'nutrition_order_reference_resolution_test'
|
|
21
|
+
require_relative 'organization_must_support_test'
|
|
22
|
+
require_relative 'organization_reference_resolution_test'
|
|
23
|
+
require_relative 'patient_must_support_test'
|
|
24
|
+
require_relative 'practitioner_must_support_test'
|
|
25
|
+
require_relative 'practitioner_role_must_support_test'
|
|
26
|
+
require_relative 'practitioner_role_reference_resolution_test'
|
|
27
|
+
require_relative 'service_request_must_support_test'
|
|
28
|
+
require_relative 'service_request_reference_resolution_test'
|
|
29
|
+
require_relative 'vision_prescription_must_support_test'
|
|
30
|
+
require_relative 'vision_prescription_reference_resolution_test'
|
|
31
|
+
|
|
32
|
+
module DaVinciCRDTestKit
|
|
33
|
+
module V221
|
|
34
|
+
class ClientCrossHookMustSupportGroup < Inferno::TestGroup
|
|
35
|
+
title 'Must Support'
|
|
36
|
+
id :crd_v221_client_cross_hook_must_support
|
|
37
|
+
description <<~DESCRIPTION
|
|
38
|
+
These tests check that the CRD client supports the must support elements of the CRD profiles
|
|
39
|
+
that it sends within hook requests and that it receives within hook responses.
|
|
40
|
+
|
|
41
|
+
All requests made during the latest runs of each "Hooks" sub-group and the "Additional Hook
|
|
42
|
+
Invocations" group above are included in this analysis.
|
|
43
|
+
When re-running these groups, remember that requests made during the prior execution will fall
|
|
44
|
+
out of scope of this analysis, so elements only demonstrated during that execution will need to
|
|
45
|
+
be demonstrated again during the new test run.
|
|
46
|
+
|
|
47
|
+
For additional details on this group, see the [Client Must Support Tests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support)
|
|
48
|
+
page in the CRD Test Kit wiki.
|
|
49
|
+
DESCRIPTION
|
|
50
|
+
|
|
51
|
+
run_as_group
|
|
52
|
+
|
|
53
|
+
input_order :order_types_supported, :supporting_types_supported
|
|
54
|
+
|
|
55
|
+
ORDER_TYPE_OPTIONS = [
|
|
56
|
+
{ label: 'CommunicationRequest', value: 'CommunicationRequest' },
|
|
57
|
+
{ label: 'DeviceRequest', value: 'DeviceRequest' },
|
|
58
|
+
{ label: 'MedicationRequest', value: 'MedicationRequest' },
|
|
59
|
+
{ label: 'NutritionOrder', value: 'NutritionOrder' },
|
|
60
|
+
{ label: 'ServiceRequest', value: 'ServiceRequest' },
|
|
61
|
+
{ label: 'VisionPrescription', value: 'VisionPrescription' }
|
|
62
|
+
].freeze
|
|
63
|
+
|
|
64
|
+
# Patient and Coverage are required of every CRD client, so they are not listed here.
|
|
65
|
+
SUPPORTING_TYPE_OPTIONS = [
|
|
66
|
+
{ label: 'Appointment', value: 'Appointment' },
|
|
67
|
+
{ label: 'Device', value: 'Device' },
|
|
68
|
+
{ label: 'Encounter', value: 'Encounter' },
|
|
69
|
+
{ label: 'Location', value: 'Location' },
|
|
70
|
+
{ label: 'Medication', value: 'Medication' },
|
|
71
|
+
{ label: 'Organization', value: 'Organization' },
|
|
72
|
+
{ label: 'Practitioner', value: 'Practitioner' },
|
|
73
|
+
{ label: 'PractitionerRole', value: 'PractitionerRole' }
|
|
74
|
+
].freeze
|
|
75
|
+
|
|
76
|
+
# The hooks whose requests always carry a supporting resource type. Whether the type is expected
|
|
77
|
+
# is decided by the input above, but invoking one of these hooks while the type is deselected
|
|
78
|
+
# fails as a contradiction.
|
|
79
|
+
REQUIRING_HOOKS = {
|
|
80
|
+
'Appointment' => [APPOINTMENT_BOOK_TAG],
|
|
81
|
+
'Encounter' => [ENCOUNTER_START_TAG, ENCOUNTER_DISCHARGE_TAG]
|
|
82
|
+
}.freeze
|
|
83
|
+
|
|
84
|
+
input :order_types_supported,
|
|
85
|
+
title: 'Order types supported by the CRD client',
|
|
86
|
+
description: %(
|
|
87
|
+
Select the resource types that the CRD client supports placing orders for.
|
|
88
|
+
Inferno will expect those order types to be demonstrated within hook requests.
|
|
89
|
+
By unchecking a resource type, the tester attests that the CRD client does
|
|
90
|
+
not support placing orders for the kind of request represented by that FHIR resource type.
|
|
91
|
+
),
|
|
92
|
+
type: 'checkbox',
|
|
93
|
+
default: ORDER_TYPE_OPTIONS.map { |option| option[:value] },
|
|
94
|
+
optional: true,
|
|
95
|
+
options: { list_options: ORDER_TYPE_OPTIONS }
|
|
96
|
+
input :supporting_types_supported,
|
|
97
|
+
title: 'Supporting resource types populated by the CRD client',
|
|
98
|
+
description: %(
|
|
99
|
+
Select the resource types that the CRD client supports when representing information
|
|
100
|
+
related to requests sent as a part of CRD. Inferno will expect those resource types to be
|
|
101
|
+
demonstrated within hook requests. By unchecking a resource type, the tester attests
|
|
102
|
+
that the CRD client does not support the information represented by the resource type
|
|
103
|
+
or does not surface it to users. `Patient` and `Coverage` resource types are not listed
|
|
104
|
+
but must be demonstrated because CRD clients are required to support them.
|
|
105
|
+
),
|
|
106
|
+
type: 'checkbox',
|
|
107
|
+
default: SUPPORTING_TYPE_OPTIONS.map { |option| option[:value] },
|
|
108
|
+
optional: true,
|
|
109
|
+
options: { list_options: SUPPORTING_TYPE_OPTIONS }
|
|
110
|
+
|
|
111
|
+
group do
|
|
112
|
+
title 'Requests'
|
|
113
|
+
id :crd_v221_client_cross_hook_must_support_requests
|
|
114
|
+
description <<~DESCRIPTION
|
|
115
|
+
These tests check that the CRD profiles which can be sent within a hook request were
|
|
116
|
+
observed across the hook requests the CRD client made, and that the must support elements on
|
|
117
|
+
them were populated.
|
|
118
|
+
|
|
119
|
+
Inferno expects to see a resource type when it is selected in the **Order types supported by the
|
|
120
|
+
CRD client** or **Supporting resource types populated by the CRD client** input, and always expects
|
|
121
|
+
the `Patient` and `Coverage` resource types, which CRD clients are required to support. A
|
|
122
|
+
tester who deselects a resource type must not invoke the hooks whose requests always carry it:
|
|
123
|
+
`appointment-book` for `Appointment`, and `encounter-start` and `encounter-discharge` for
|
|
124
|
+
`Encounter`. Inferno will fail without
|
|
125
|
+
further analysis if an expected resource type is not observed or vice-versa. When a resource type
|
|
126
|
+
was observed but some of its must support elements were not, the tester is asked to attest
|
|
127
|
+
that the CRD client does not capture the represented data or does not surface it to users.
|
|
128
|
+
|
|
129
|
+
For additional details on this group, see the [Client Must Support Tests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support)
|
|
130
|
+
page and specifically the [Requests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support#requests)
|
|
131
|
+
section in the CRD Test Kit wiki.
|
|
132
|
+
DESCRIPTION
|
|
133
|
+
|
|
134
|
+
test from: :crd_v221_appointment_must_support
|
|
135
|
+
test from: :crd_v221_appointment_must_support_reference_resolution
|
|
136
|
+
test from: :crd_v221_communication_request_must_support
|
|
137
|
+
test from: :crd_v221_communication_request_must_support_reference_resolution
|
|
138
|
+
test from: :crd_v221_coverage_must_support
|
|
139
|
+
test from: :crd_v221_coverage_must_support_reference_resolution
|
|
140
|
+
test from: :crd_v221_device_must_support
|
|
141
|
+
test from: :crd_v221_device_request_must_support
|
|
142
|
+
test from: :crd_v221_device_request_must_support_reference_resolution
|
|
143
|
+
test from: :crd_v221_encounter_must_support
|
|
144
|
+
test from: :crd_v221_encounter_must_support_reference_resolution
|
|
145
|
+
test from: :crd_v221_location_must_support
|
|
146
|
+
test from: :crd_v221_location_must_support_reference_resolution
|
|
147
|
+
test from: :crd_v221_medication_must_support
|
|
148
|
+
test from: :crd_v221_medication_request_must_support
|
|
149
|
+
test from: :crd_v221_medication_request_must_support_reference_resolution
|
|
150
|
+
test from: :crd_v221_nutrition_order_must_support
|
|
151
|
+
test from: :crd_v221_nutrition_order_must_support_reference_resolution
|
|
152
|
+
test from: :crd_v221_organization_must_support
|
|
153
|
+
test from: :crd_v221_organization_must_support_reference_resolution
|
|
154
|
+
test from: :crd_v221_patient_must_support
|
|
155
|
+
test from: :crd_v221_practitioner_must_support
|
|
156
|
+
test from: :crd_v221_practitioner_role_must_support
|
|
157
|
+
test from: :crd_v221_practitioner_role_must_support_reference_resolution
|
|
158
|
+
test from: :crd_v221_service_request_must_support
|
|
159
|
+
test from: :crd_v221_service_request_must_support_reference_resolution
|
|
160
|
+
test from: :crd_v221_vision_prescription_must_support
|
|
161
|
+
test from: :crd_v221_vision_prescription_must_support_reference_resolution
|
|
162
|
+
test from: :crd_v221_client_order_types_signed
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
group do
|
|
166
|
+
title 'Responses'
|
|
167
|
+
id :crd_v221_client_cross_hook_must_support_responses
|
|
168
|
+
description <<~DESCRIPTION
|
|
169
|
+
These tests check that the CRD client supports the response types and the must support
|
|
170
|
+
elements within them that CRD clients are required to support when returned by a CRD server.
|
|
171
|
+
|
|
172
|
+
For additional details on this group, see the [Client Must Support Tests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support)
|
|
173
|
+
page and specifically the [Responses](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Must-Support#responses)
|
|
174
|
+
section in the CRD Test Kit wiki.
|
|
175
|
+
DESCRIPTION
|
|
176
|
+
|
|
177
|
+
test from: :crd_v221_client_card_must_support_coverage_information
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|