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
data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb
CHANGED
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
require_relative '../../tagged_request_load_helper'
|
|
2
|
+
require_relative '../../cross_hook_helper'
|
|
2
3
|
require_relative '../client_urls'
|
|
3
4
|
|
|
4
5
|
module DaVinciCRDTestKit
|
|
5
6
|
module V221
|
|
6
7
|
class ClientPrefetchCompleteAndSubsetTest < Inferno::Test
|
|
7
8
|
include TaggedRequestLoadHelper
|
|
9
|
+
include CrossHookHelper
|
|
10
|
+
include ClientURLs
|
|
8
11
|
|
|
9
|
-
title '
|
|
12
|
+
title 'CRD client can provide both the complete standard prefetch data set and a subset'
|
|
10
13
|
id :crd_v221_client_prefetch_complete_and_subset
|
|
11
14
|
description <<~DESCRIPTION
|
|
12
|
-
The CRD IG requires clients
|
|
15
|
+
The CRD IG requires that CRD clients be able to prefetch a standard set of resources that
|
|
13
16
|
payers are expected to need to evaluate coverage requirements. They are also
|
|
14
17
|
required to be able to prefetch a subset of these standard prefetch requirements
|
|
15
18
|
if a payer requests fewer in their service discovery responses because the payer
|
|
16
19
|
does not always need the complete set of standard prefetch resources to evaluate
|
|
17
20
|
coverage.
|
|
18
21
|
|
|
19
|
-
During this test, Inferno will verify that the client has
|
|
20
|
-
-
|
|
21
|
-
one of which requests
|
|
22
|
-
other requests only a subset.
|
|
23
|
-
-
|
|
24
|
-
the two prefetch sets.
|
|
25
|
-
|
|
26
|
-
The CRD server that requests only a subset of the standard prefetch data does not request
|
|
27
|
-
resources referenced from the following elements. Request made to each Inferno service
|
|
28
|
-
endpoint with one of these elements populated with a reference to a resource not referenced
|
|
29
|
-
elsewhere will demonstrate the required capability.
|
|
30
|
-
- On an `appointment-book` hook request, an Appointment with a participant entry that
|
|
31
|
-
references a Practitioner or PractitionerRole resource in its actor element
|
|
32
|
-
- On an `encounter-start` or `encounter-discharge` hook request, an Encounter with a
|
|
33
|
-
referenced Location via the `location` element or referenced Organization via the
|
|
34
|
-
`serviceProvider` element.
|
|
35
|
-
- On an `order-select`, `order-sign`, or `order-dispatch` hook request, one of the following order resources:
|
|
36
|
-
- A CommunicationRequest, DeviceRequest, MedicationRequest, or ServiceRequest that references a Practitioner or PractitionerRole resource in its `requester` element, or
|
|
37
|
-
- A NutritionOrder that references a Practitioner or PractitionerRole resource in its `orderer` element
|
|
38
|
-
- A VisionPrescription that references a Practitioner or PractitionerRole resource in its `prescriber` element
|
|
22
|
+
During this test, Inferno will verify that the CRD client has made requests that:
|
|
23
|
+
- Target both of Inferno's simulated CRD servers,
|
|
24
|
+
[one of which requests all standard prefetch resources](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Prefetch-Verification#infernos-standard-services)
|
|
25
|
+
while the other [requests only a subset](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Prefetch-Verification#infernos-subset-services).
|
|
26
|
+
- Demonstrate the capability to [distinguish between the two prefetch sets](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Prefetch-Verification#demonstrating-prefetch-calculation).
|
|
39
27
|
|
|
40
28
|
This test relies on the evaluation performed by the "Hook requests include the
|
|
41
29
|
requested prefetch data" tests present in each hook-specific "Requests" group. One of these groups must
|
|
@@ -50,24 +38,14 @@ module DaVinciCRDTestKit
|
|
|
50
38
|
|
|
51
39
|
run do
|
|
52
40
|
subset_prefetch_requests, complete_prefetch_requests =
|
|
53
|
-
|
|
41
|
+
load_requests_for_cross_hook_analysis.partition { |request| prefetch_target(request) == :subset }
|
|
54
42
|
completeness_tests = find_completeness_tests
|
|
55
43
|
check_for_demonstration(subset_prefetch_requests, completeness_tests, :subset)
|
|
56
44
|
check_for_demonstration(complete_prefetch_requests, completeness_tests, :complete)
|
|
57
45
|
|
|
58
46
|
skip_if error_messages?,
|
|
59
|
-
'The client did not demonstrate both complete and subset prefetch capability.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def find_completeness_tests
|
|
63
|
-
hooks_group = self.class.parent.parent.groups.find do |group|
|
|
64
|
-
group.id.to_s.include?('crd_v221_client_hooks')
|
|
65
|
-
end
|
|
66
|
-
hooks_group.groups.map do |group|
|
|
67
|
-
group.groups.flat_map(&:tests).find do |test|
|
|
68
|
-
test.id.to_s.include?('crd_v221_hook_request_prefetch_complete')
|
|
69
|
-
end
|
|
70
|
-
end.compact
|
|
47
|
+
'The CRD client did not demonstrate both complete and subset prefetch capability. ' \
|
|
48
|
+
'See Messages for details.'
|
|
71
49
|
end
|
|
72
50
|
|
|
73
51
|
def check_for_demonstration(requests, completeness_tests, target_name)
|
data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/appointment_book_receive_request_test.rb
CHANGED
|
@@ -1,155 +1,56 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'base_hook_invocation_receive_request_test'
|
|
2
|
+
require_relative '../../client_input_helper'
|
|
2
3
|
|
|
3
4
|
module DaVinciCRDTestKit
|
|
4
5
|
module V221
|
|
5
|
-
class AppointmentBookReceiveRequestTest <
|
|
6
|
-
include ClientURLs
|
|
7
|
-
|
|
6
|
+
class AppointmentBookReceiveRequestTest < BaseHookInvocationReceiveRequestTest
|
|
8
7
|
id :crd_v221_appointment_book_request
|
|
9
|
-
title '
|
|
8
|
+
title 'CRD client invokes the appointment-book hook'
|
|
10
9
|
description %(
|
|
11
|
-
During this test, Inferno will wait while the client makes one or more [appointment-book](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#appointment-book)
|
|
10
|
+
During this test, Inferno will wait while the CRD client makes one or more [appointment-book](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#appointment-book)
|
|
12
11
|
hook requests against Inferno's simulated CRD servers. Inferno will respond
|
|
13
12
|
based on the response configuration provided when running the test.
|
|
14
13
|
For more details on how Inferno's simulated CRD servers behave during
|
|
15
|
-
hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-
|
|
14
|
+
hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
|
|
16
15
|
documentation.
|
|
17
16
|
|
|
18
17
|
Inferno will pause and wait for inbound requests until told explicitly to continue
|
|
19
18
|
by the tester by clicking on the link in the "User Action Required" dialog (NOTE: after
|
|
20
19
|
5 minutes the test will become inactive and unresponsive to anything except cancelation).
|
|
21
20
|
)
|
|
22
|
-
config options: { accepts_multiple_requests: true }
|
|
23
21
|
|
|
24
|
-
input :cds_jwt_iss,
|
|
25
|
-
title: 'CRD JWT Issuer',
|
|
26
|
-
description: %(
|
|
27
|
-
Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
|
|
28
|
-
request sent as the Bearer token in the `Authorization` header.
|
|
29
|
-
Run or re-run the "Registration" group to set or change this value.
|
|
30
|
-
),
|
|
31
|
-
locked: true
|
|
32
22
|
input :appointment_book_response_approach,
|
|
33
23
|
title: 'Response generation approach for appointment-book',
|
|
34
|
-
description:
|
|
35
|
-
Determines how Inferno will generate response for appoontment-book
|
|
36
|
-
hook invocations.
|
|
37
|
-
),
|
|
24
|
+
description: ClientInputHelper.response_approach_description('appointment-book'),
|
|
38
25
|
type: 'radio',
|
|
39
26
|
default: 'mocked',
|
|
40
|
-
options:
|
|
41
|
-
list_options: [
|
|
42
|
-
{
|
|
43
|
-
label: 'Create simple mocks based on selected response types',
|
|
44
|
-
value: 'mocked'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: 'Generate responses based on a tester-provided template',
|
|
48
|
-
value: 'custom'
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
27
|
+
options: ClientInputHelper.response_approach_options
|
|
52
28
|
input :appointment_book_selected_response_types,
|
|
53
29
|
title: 'Response types to return from appointment-book hook requests',
|
|
54
30
|
description: %(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
a [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
|
|
58
|
-
response for this primary hook.
|
|
31
|
+
#{ClientInputHelper.mocked_response_types_intro}
|
|
32
|
+
#{ClientInputHelper.coverage_information_always_included_note}
|
|
59
33
|
),
|
|
60
34
|
type: 'checkbox',
|
|
61
35
|
default: ['coverage_information', 'external_reference', 'instructions'],
|
|
62
36
|
optional: true,
|
|
63
|
-
options: {
|
|
64
|
-
list_options: [
|
|
65
|
-
{
|
|
66
|
-
label: 'External Reference',
|
|
67
|
-
value: 'external_reference'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
label: 'Instructions',
|
|
71
|
-
value: 'instructions'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: 'Coverage Information',
|
|
75
|
-
value: 'coverage_information'
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
label: 'Request Form Completion',
|
|
79
|
-
value: 'request_form_completion'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: 'Create/Update Coverage Information',
|
|
83
|
-
value: 'create_update_coverage_info'
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
label: 'Launch SMART Application',
|
|
87
|
-
value: 'launch_smart_app'
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
},
|
|
37
|
+
options: { list_options: RESPONSE_TYPE_OPTIONS },
|
|
91
38
|
enable_when: { input_name: 'appointment_book_response_approach', value: 'mocked' }
|
|
92
39
|
input :appointment_book_custom_response_template,
|
|
93
40
|
title: 'Custom response template for appointment-book hook requests',
|
|
94
|
-
description:
|
|
95
|
-
Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
|
|
96
|
-
in JSON form for Inferno to use when responding to hook invocations.
|
|
97
|
-
),
|
|
41
|
+
description: ClientInputHelper.custom_response_template_description,
|
|
98
42
|
type: 'textarea',
|
|
99
43
|
optional: true,
|
|
100
44
|
enable_when: { input_name: 'appointment_book_response_approach', value: 'custom' }
|
|
101
|
-
output :continuation_url
|
|
102
45
|
|
|
103
|
-
|
|
104
|
-
if appointment_book_response_approach == 'custom'
|
|
105
|
-
# rubocop:disable Layout/LineLength
|
|
106
|
-
'When responding, Inferno will evaluate the provided [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses) ' \
|
|
107
|
-
'from the **Custom response template for appointment-book hook requests** input ' \
|
|
108
|
-
'against the incoming request to create a response.'
|
|
109
|
-
# rubocop:enable Layout/LineLength
|
|
46
|
+
private
|
|
110
47
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
'When responding, Inferno will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses) ' \
|
|
114
|
-
'the following response types using the incoming request: ' \
|
|
115
|
-
"\n - #{selected_response_types_string}"
|
|
116
|
-
# rubocop:enable Layout/LineLength
|
|
117
|
-
end
|
|
48
|
+
def hook_key
|
|
49
|
+
'appointment_book'
|
|
118
50
|
end
|
|
119
51
|
|
|
120
|
-
def
|
|
121
|
-
|
|
122
|
-
appointment_book_selected_response_types.join("\n - ")
|
|
123
|
-
else
|
|
124
|
-
'Coverage Information' # primary hook default
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
run do
|
|
129
|
-
identifier = cds_jwt_iss
|
|
130
|
-
continuation_url = "#{resume_pass_url}?token=#{identifier}"
|
|
131
|
-
output(continuation_url:)
|
|
132
|
-
|
|
133
|
-
wait(
|
|
134
|
-
identifier:,
|
|
135
|
-
message: %(
|
|
136
|
-
**Invoke the `appointment-book` hook**:
|
|
137
|
-
|
|
138
|
-
Invoke the appointment-book hook by sending requests to
|
|
139
|
-
one or both of the two Inferno simulated CRD servers:
|
|
140
|
-
|
|
141
|
-
- Complete Prefetch: `#{appointment_book_url}`
|
|
142
|
-
- Subset Prefetch: `#{appointment_book_prefetch_subset_url}`
|
|
143
|
-
|
|
144
|
-
For Inferno to recognize these requests and associate them with this session,
|
|
145
|
-
the authentication JWT sent as a Bearer token in the Authorization header
|
|
146
|
-
must have `#{cds_jwt_iss}` as the `iss` claim in the JWT payload.
|
|
147
|
-
|
|
148
|
-
#{configured_response_details}
|
|
149
|
-
|
|
150
|
-
[Click here](#{continuation_url}) when you have finished submitting requests.
|
|
151
|
-
)
|
|
152
|
-
)
|
|
52
|
+
def primary_hook?
|
|
53
|
+
true
|
|
153
54
|
end
|
|
154
55
|
end
|
|
155
56
|
end
|
data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/base_hook_invocation_receive_request_test.rb
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
require_relative '../../client_wait_messages'
|
|
2
|
+
require_relative '../client_urls'
|
|
3
|
+
require_relative '../../../cross_suite/cards_identification'
|
|
4
|
+
require_relative '../../client_input_helper'
|
|
5
|
+
|
|
6
|
+
module DaVinciCRDTestKit
|
|
7
|
+
module V221
|
|
8
|
+
class BaseHookInvocationReceiveRequestTest < Inferno::Test
|
|
9
|
+
include ClientURLs
|
|
10
|
+
include DaVinciCRDTestKit::ClientWaitMessages
|
|
11
|
+
|
|
12
|
+
RESPONSE_TYPE_OPTIONS = [
|
|
13
|
+
{
|
|
14
|
+
label: 'External Reference (card)',
|
|
15
|
+
value: 'external_reference'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'Instructions (card)',
|
|
19
|
+
value: 'instructions'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: 'Coverage Information (systemAction)',
|
|
23
|
+
value: 'coverage_information'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: 'Request Form Completion (card)',
|
|
27
|
+
value: 'request_form_completion'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Create/Update Coverage Information (card)',
|
|
31
|
+
value: 'create_update_coverage_info'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: 'Launch SMART Application (card)',
|
|
35
|
+
value: 'launch_smart_app'
|
|
36
|
+
}
|
|
37
|
+
].freeze
|
|
38
|
+
|
|
39
|
+
ORDER_RESPONSE_TYPE_OPTIONS = (RESPONSE_TYPE_OPTIONS + [
|
|
40
|
+
{
|
|
41
|
+
label: 'Propose Alternate Request (card)',
|
|
42
|
+
value: 'propose_alternate_request'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: 'Additional Orders as Companions/Prerequisites (card)',
|
|
46
|
+
value: 'companions_prerequisites'
|
|
47
|
+
}
|
|
48
|
+
]).freeze
|
|
49
|
+
|
|
50
|
+
config options: { accepts_multiple_requests: true }
|
|
51
|
+
|
|
52
|
+
input :cds_jwt_iss,
|
|
53
|
+
title: 'CRD JWT Issuer',
|
|
54
|
+
description: ClientInputHelper.locked_cds_jwt_iss_description,
|
|
55
|
+
locked: true
|
|
56
|
+
payer_organization_id_inputs
|
|
57
|
+
output :continuation_url
|
|
58
|
+
flag_as_tester_initiated_exchange
|
|
59
|
+
|
|
60
|
+
def hook_key
|
|
61
|
+
raise NotImplementedError, "#{self.class} must implement #hook_key"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def primary_hook?
|
|
65
|
+
raise NotImplementedError, "#{self.class} must implement #primary_hook?"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def hook_slug
|
|
69
|
+
hook_key.to_s.tr('_', '-')
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def response_approach
|
|
73
|
+
send(:"#{hook_key}_response_approach")
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def selected_response_types
|
|
77
|
+
send(:"#{hook_key}_selected_response_types")
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def configured_response_details
|
|
81
|
+
if response_approach == 'custom'
|
|
82
|
+
# rubocop:disable Layout/LineLength
|
|
83
|
+
'When responding, Inferno will evaluate the provided [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses) ' \
|
|
84
|
+
"from the **Custom response template for #{hook_slug} hook requests** input " \
|
|
85
|
+
'against the incoming request to create a response.'
|
|
86
|
+
else
|
|
87
|
+
'When responding, Inferno will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses) ' \
|
|
88
|
+
'the following response types using the incoming request:' \
|
|
89
|
+
"\n\n- #{selected_response_types_string}"
|
|
90
|
+
# rubocop:enable Layout/LineLength
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def selected_response_types_string
|
|
95
|
+
response_types = selected_response_types.presence || []
|
|
96
|
+
# mocked responses on primary hooks always include Coverage Information, whether or not it was selected
|
|
97
|
+
response_types |= [DaVinciCRDTestKit::CardsIdentification::COVERAGE_INFORMATION_RESPONSE_TYPE] if primary_hook?
|
|
98
|
+
# an Instructions card is returned when nothing else would be
|
|
99
|
+
response_types = [DaVinciCRDTestKit::CardsIdentification::INSTRUCTIONS_RESPONSE_TYPE] if response_types.empty?
|
|
100
|
+
|
|
101
|
+
format_responded_response_types(response_types.map do |response_type|
|
|
102
|
+
if response_type == DaVinciCRDTestKit::CardsIdentification::COVERAGE_INFORMATION_RESPONSE_TYPE
|
|
103
|
+
"#{response_type}_action"
|
|
104
|
+
else
|
|
105
|
+
"#{response_type}_card"
|
|
106
|
+
end
|
|
107
|
+
end)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def format_responded_response_types(response_types)
|
|
111
|
+
response_types
|
|
112
|
+
.map do |response_type|
|
|
113
|
+
DaVinciCRDTestKit::CardsIdentification.humanize_response_type(response_type)
|
|
114
|
+
.sub('Card', '(card)')
|
|
115
|
+
.sub('Action', '(systemAction)')
|
|
116
|
+
end.join("\n- ")
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def invoke_heading
|
|
120
|
+
"Invoke the `#{hook_slug}` Hook"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def invoke_intro
|
|
124
|
+
"Invoke the `#{hook_slug}` hook by sending requests to one or both of the two Inferno simulated CRD servers."
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def complete_prefetch_url
|
|
128
|
+
send(:"#{hook_key}_url")
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def subset_prefetch_url
|
|
132
|
+
send(:"#{hook_key}_prefetch_subset_url")
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Overridden by a group whose additional requests are optional, so it can pass without waiting.
|
|
136
|
+
def skip_waiting_for_requests?
|
|
137
|
+
false
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def wait_message_endpoints_section
|
|
141
|
+
<<~ENDPOINTS
|
|
142
|
+
#### `#{hook_slug}` Service Endpoints
|
|
143
|
+
|
|
144
|
+
- Complete Prefetch `#{hook_slug}` Service#{complete_prefetch_payer_note}: `#{complete_prefetch_url}`
|
|
145
|
+
- Subset Prefetch `#{hook_slug}` Service#{subset_prefetch_payer_note}: `#{subset_prefetch_url}`
|
|
146
|
+
ENDPOINTS
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def message
|
|
150
|
+
<<~MESSAGE
|
|
151
|
+
#### #{invoke_heading}
|
|
152
|
+
|
|
153
|
+
#{invoke_intro}
|
|
154
|
+
|
|
155
|
+
[Click here](#{continuation_url}) when you have finished submitting requests.
|
|
156
|
+
|
|
157
|
+
#{wait_message_endpoints_section}
|
|
158
|
+
#### Authentication and Identification
|
|
159
|
+
|
|
160
|
+
#{session_identification_message}
|
|
161
|
+
|
|
162
|
+
#### Responses
|
|
163
|
+
|
|
164
|
+
#{configured_response_details}
|
|
165
|
+
MESSAGE
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
run do
|
|
169
|
+
next if skip_waiting_for_requests?
|
|
170
|
+
|
|
171
|
+
identifier = cds_jwt_iss
|
|
172
|
+
continuation_url = resume_pass_url_for(identifier)
|
|
173
|
+
output(continuation_url:)
|
|
174
|
+
|
|
175
|
+
wait(
|
|
176
|
+
identifier:,
|
|
177
|
+
message:
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
require_relative 'base_hook_invocation_receive_request_test'
|
|
2
|
+
require_relative '../../../cross_suite/short_circuit_interaction'
|
|
3
|
+
require_relative '../../client_input_helper'
|
|
4
|
+
|
|
5
|
+
module DaVinciCRDTestKit
|
|
6
|
+
module V221
|
|
7
|
+
class CrossHooksReceiveRequestTest < BaseHookInvocationReceiveRequestTest
|
|
8
|
+
include ShortCircuitInteraction
|
|
9
|
+
|
|
10
|
+
id :crd_v221_cross_hooks_request
|
|
11
|
+
title 'CRD client invokes any hook'
|
|
12
|
+
description %(
|
|
13
|
+
During this test, Inferno will wait while the CRD client makes one or more [hook](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html)
|
|
14
|
+
requests against Inferno's simulated CRD servers. Inferno will respond
|
|
15
|
+
based on the response configuration provided when running the test.
|
|
16
|
+
For more details on how Inferno's simulated CRD servers behave during
|
|
17
|
+
hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
|
|
18
|
+
documentation.
|
|
19
|
+
|
|
20
|
+
Inferno will pause and wait for inbound requests until told explicitly to continue
|
|
21
|
+
by the tester by clicking on the link in the "User Action Required" dialog (NOTE: after
|
|
22
|
+
5 minutes the test will become inactive and unresponsive to anything except cancelation).
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
input :make_additional_hook_requests,
|
|
26
|
+
title: 'Make additional hook requests?',
|
|
27
|
+
description: %(
|
|
28
|
+
Cross-invocation analysis considers every hook request made during the most recent execution
|
|
29
|
+
of each group in this session. Select `Yes` to send more requests now so that features
|
|
30
|
+
the earlier requests did not cover can be demonstrated. Otherwise select `No` to
|
|
31
|
+
evaluate the requests already received, and every test in the "Additional Hook Invocations"
|
|
32
|
+
group will pass without further requests. NOTE: if re-running this test, requests
|
|
33
|
+
made during its previous execution runs will no longer be considered, even if `No`
|
|
34
|
+
is selected.
|
|
35
|
+
),
|
|
36
|
+
type: 'radio',
|
|
37
|
+
default: 'false',
|
|
38
|
+
options: {
|
|
39
|
+
list_options: [
|
|
40
|
+
{ label: 'Yes, send more hook requests now.', value: 'true' },
|
|
41
|
+
{ label: 'No, the requests already made cover everything.', value: 'false' }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
input :cross_hooks_response_approach,
|
|
45
|
+
title: 'Response generation approach for all hooks',
|
|
46
|
+
description: ClientInputHelper.response_approach_description('all'),
|
|
47
|
+
type: 'radio',
|
|
48
|
+
default: 'mocked',
|
|
49
|
+
options: ClientInputHelper.response_approach_options,
|
|
50
|
+
enable_when: { input_name: 'make_additional_hook_requests', value: 'true' }
|
|
51
|
+
input :cross_hooks_selected_response_types,
|
|
52
|
+
title: 'Response types to return from all hook requests',
|
|
53
|
+
description: %(
|
|
54
|
+
#{ClientInputHelper.mocked_response_types_intro}
|
|
55
|
+
On the `appointment-book`, `order-sign`, and `order-dispatch`
|
|
56
|
+
hooks, for which CRD clients must support the [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
|
|
57
|
+
response type, Inferno will always include a Coverage Information response even if it
|
|
58
|
+
is not selected. If no types are selected, Inferno will mock and return an
|
|
59
|
+
[Instructions](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#instructions-response-type)
|
|
60
|
+
response on the other hooks.
|
|
61
|
+
),
|
|
62
|
+
type: 'checkbox',
|
|
63
|
+
default: ['coverage_information', 'external_reference', 'instructions'],
|
|
64
|
+
optional: true,
|
|
65
|
+
options: { list_options: ORDER_RESPONSE_TYPE_OPTIONS },
|
|
66
|
+
enable_when: { input_name: 'cross_hooks_response_approach', value: 'mocked' }
|
|
67
|
+
input :cross_hooks_custom_response_template,
|
|
68
|
+
title: 'Custom response template for all hook requests',
|
|
69
|
+
description: ClientInputHelper.custom_response_template_description,
|
|
70
|
+
type: 'textarea',
|
|
71
|
+
optional: true,
|
|
72
|
+
enable_when: { input_name: 'cross_hooks_response_approach', value: 'custom' }
|
|
73
|
+
|
|
74
|
+
# The tester may have demonstrated everything during the Hooks group, in which case there is
|
|
75
|
+
# nothing to wait for and the tests evaluating these requests have nothing to evaluate.
|
|
76
|
+
def skip_waiting_for_requests?
|
|
77
|
+
clear_short_circuit_flag
|
|
78
|
+
return false unless make_additional_hook_requests == 'false'
|
|
79
|
+
|
|
80
|
+
short_circuit_remaining_tests(:pass)
|
|
81
|
+
pass DEFAULT_SHORT_CIRCUIT_MESSAGE
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
private
|
|
85
|
+
|
|
86
|
+
def hook_key
|
|
87
|
+
'cross_hooks'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def hook_slug
|
|
91
|
+
'all'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Coverage Information is added based on the hook each request invokes, so it is described
|
|
95
|
+
# separately in the dialog rather than being treated as always present.
|
|
96
|
+
def primary_hook?
|
|
97
|
+
false
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def selected_response_types_string
|
|
101
|
+
coverage_information_note = 'Coverage Information (systemAction) on `appointment-book`, `order-sign`, ' \
|
|
102
|
+
'and `order-dispatch` requests'
|
|
103
|
+
if selected_response_types.blank?
|
|
104
|
+
return "#{coverage_information_note}\n- Instructions (card) on other hook requests"
|
|
105
|
+
end
|
|
106
|
+
if selected_response_types.include?(DaVinciCRDTestKit::CardsIdentification::COVERAGE_INFORMATION_RESPONSE_TYPE)
|
|
107
|
+
return super
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
"#{super}\n- #{coverage_information_note}"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def invoke_heading
|
|
114
|
+
'Invoke Any Hook'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def invoke_intro
|
|
118
|
+
'Invoke any hook by sending requests to one or both of the two Inferno simulated CRD servers.'
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def wait_message_endpoints_section
|
|
122
|
+
service_discovery_endpoints_section
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|