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
|
@@ -7,12 +7,21 @@ module DaVinciCRDTestKit
|
|
|
7
7
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
8
8
|
|
|
9
9
|
id :crd_v221_hook_data_fetch_verification
|
|
10
|
-
title '
|
|
10
|
+
title 'CRD client made additional FHIR data available during hook request processing'
|
|
11
11
|
description %(
|
|
12
12
|
During this test, Inferno will verify that for at least one hook request it was successfully
|
|
13
13
|
able to use the FHIR API and access token indicated in that hook request to gather additional data during
|
|
14
14
|
hook invocation. For this test to pass, at least one additional data request across
|
|
15
15
|
all hook invocations must succeed and return a FHIR resource.
|
|
16
|
+
|
|
17
|
+
See the [Prefetch and Additional Data Retrieval](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#prefetch-and-additional-data-retrieval)
|
|
18
|
+
section of the CRD Test Kit wiki for details on what requests Inferno will make while processing
|
|
19
|
+
a hook invocation. Note that requests made to a FHIR endpoint other than the `fhirServer`
|
|
20
|
+
indicated in the hook request body do not send the provided access token and do not serve as
|
|
21
|
+
evidence that the CRD client can make FHIR data available for the purposes of this test.
|
|
22
|
+
These requests will not be listed in the Requests tab of this test after execution. To
|
|
23
|
+
pass this test, send hook requests that include references to resources on the CRD client's
|
|
24
|
+
FHIR server within the set that Inferno will fetch as detailed in the wiki.
|
|
16
25
|
)
|
|
17
26
|
|
|
18
27
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@found-20'
|
|
@@ -33,7 +42,7 @@ module DaVinciCRDTestKit
|
|
|
33
42
|
end
|
|
34
43
|
|
|
35
44
|
run do
|
|
36
|
-
hook_requests =
|
|
45
|
+
hook_requests = load_interaction_group_requests
|
|
37
46
|
|
|
38
47
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
39
48
|
|
|
@@ -48,7 +57,8 @@ module DaVinciCRDTestKit
|
|
|
48
57
|
end
|
|
49
58
|
|
|
50
59
|
assert data_returned,
|
|
51
|
-
'Inferno was never able to successfully obtain additional FHIR data
|
|
60
|
+
'Inferno was never able to successfully obtain additional FHIR data from the CRD client using the ' \
|
|
61
|
+
'provided access token during hook processing.'
|
|
52
62
|
end
|
|
53
63
|
end
|
|
54
64
|
end
|
data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb
CHANGED
|
@@ -14,22 +14,22 @@ module DaVinciCRDTestKit
|
|
|
14
14
|
As a part of registration, CRD clients and servers agree on a set of scopes that the server needs
|
|
15
15
|
to obtain all data that goes into creating hook responses. For the purposes of simulating a
|
|
16
16
|
payer CRD server acting as a part of these tests that evaluate conformance to the CRD specification,
|
|
17
|
-
Inferno requires access to all US Core resource types. While in a real exchange scenario,
|
|
18
|
-
|
|
19
|
-
must grant these scopes in order for Inferno to verify its conformance.
|
|
17
|
+
Inferno requires access to all US Core resource types. While in a real exchange scenario, an organization
|
|
18
|
+
operating CRD clients might well reject such a set of scopes as too large, for the purposes of testing,
|
|
19
|
+
the CRD client must grant these scopes in order for Inferno to verify its conformance.
|
|
20
20
|
|
|
21
21
|
During this test, Inferno will verify that the requested scopes covering all resource types profiled in
|
|
22
|
-
the selected version of the US Core IG are granted and no more.
|
|
23
|
-
or patient scopes. If choosing patient scopes, note that the token is used by default for complete
|
|
24
|
-
of the client's US Core FHIR API, so either that single patient would need to
|
|
22
|
+
the selected version of the US Core IG are granted and no more. The CRD client may choose to grant either user
|
|
23
|
+
scopes or patient scopes. If choosing patient scopes, note that the token is used by default for complete
|
|
24
|
+
testing of the CRD client's US Core FHIR API, so either that single patient would need to
|
|
25
25
|
demonstrate all US Core resources and must support elements or another access token would need
|
|
26
|
-
to be provided when testing the client's FHIR API.
|
|
26
|
+
to be provided when testing the CRD client's FHIR API.
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@found-21'
|
|
30
30
|
|
|
31
31
|
run do
|
|
32
|
-
hook_requests =
|
|
32
|
+
hook_requests = load_interaction_group_requests
|
|
33
33
|
|
|
34
34
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
35
35
|
|
data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb
CHANGED
|
@@ -8,6 +8,7 @@ module DaVinciCRDTestKit
|
|
|
8
8
|
class HookRequestPrefetchCompleteTest < Inferno::Test
|
|
9
9
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
10
10
|
include DaVinciCRDTestKit::MultiRequestMessageHelper
|
|
11
|
+
include ClientURLs
|
|
11
12
|
|
|
12
13
|
id :crd_v221_hook_request_prefetch_complete
|
|
13
14
|
title 'Hook requests include the requested prefetch data'
|
|
@@ -19,7 +20,7 @@ module DaVinciCRDTestKit
|
|
|
19
20
|
See the [Prefetch Template](https://cds-hooks.hl7.org/2026Jan/en/#prefetch-template)
|
|
20
21
|
section for more information about the format of `prefetch` templates.
|
|
21
22
|
|
|
22
|
-
[The CRD IG requires
|
|
23
|
+
[The CRD IG requires that CRD clients support prefetch](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#prefetch)
|
|
23
24
|
including the ability to provide all data in and subsets of the [standard prefetch templates](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch),
|
|
24
25
|
when they are requested by the invoked CRD server. Inferno simulates two CRD servers,
|
|
25
26
|
one at `#{ClientURLs.discovery_url}` requiring the [complete set of standard prefetches](https://github.com/inferno-framework/davinci-crd-test-kit/blob/main/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-v221.json)
|
|
@@ -28,10 +29,12 @@ module DaVinciCRDTestKit
|
|
|
28
29
|
|
|
29
30
|
During this test, Inferno will verify that each hook request body includes a `prefetch` field populated with
|
|
30
31
|
valid JSON that contains exactly the requested prefetch keys and data sets described in the service description
|
|
31
|
-
for the invoked service as calculated by Inferno based on the resources provided in the request
|
|
32
|
+
for the invoked service as calculated by Inferno based on the resources provided in the request (see [Reference
|
|
33
|
+
Resolution Within Hook Requests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Prefetch-Verification#reference-resolution-within-hook-requests)
|
|
34
|
+
in the CRD Test Kit wiki for details of resource identity, reference resolution, and FHIRPath execution).
|
|
32
35
|
|
|
33
36
|
Note that Inferno requires **all** requested prefetch keys to be present in the request even if there is no
|
|
34
|
-
data for that key. This because the [CDS
|
|
37
|
+
data for that key. This is because the [CDS Hooks specification requires](https://cds-hooks.hl7.org/2026Jan/en/#example-of-pagination-in-prefetch)
|
|
35
38
|
that if "the CDS Client has no data to populate a template prefetch key, the prefetch template key MUST have a
|
|
36
39
|
value of null." For templates that request the results of a FHIR search interaction, an empty Bundle is also
|
|
37
40
|
acceptable.
|
|
@@ -89,7 +92,7 @@ module DaVinciCRDTestKit
|
|
|
89
92
|
end
|
|
90
93
|
|
|
91
94
|
run do
|
|
92
|
-
hook_requests =
|
|
95
|
+
hook_requests = load_interaction_group_requests
|
|
93
96
|
|
|
94
97
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
95
98
|
|
|
@@ -97,13 +100,8 @@ module DaVinciCRDTestKit
|
|
|
97
100
|
hook_request = parse_json_request_entity(request.request_body, 'Request body', request_index)
|
|
98
101
|
next unless hook_request.present?
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
else
|
|
103
|
-
:complete
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
services_path = service_path_for_target(prefetch_target)
|
|
103
|
+
target = prefetch_target(request)
|
|
104
|
+
services_path = service_path_for_target(target)
|
|
107
105
|
checker = PrefetchCompletenessChecker.new(hook_request, request_index, services_path)
|
|
108
106
|
completeness_errors = checker.check_prefetched_data
|
|
109
107
|
completeness_errors.each do |error|
|
|
@@ -114,10 +112,10 @@ module DaVinciCRDTestKit
|
|
|
114
112
|
end
|
|
115
113
|
if completeness_errors.blank? &&
|
|
116
114
|
checker.data_set_different_with_alternate_service?(
|
|
117
|
-
service_path_for_opposite(
|
|
118
|
-
key_comparison_map_for_target(
|
|
115
|
+
service_path_for_opposite(target),
|
|
116
|
+
key_comparison_map_for_target(target)
|
|
119
117
|
)
|
|
120
|
-
if
|
|
118
|
+
if target == :subset
|
|
121
119
|
output demonstrates_prefetch_subset_distinct_from_complete: true
|
|
122
120
|
else
|
|
123
121
|
output demonstrates_prefetch_complete_distinct_from_subset: true
|
data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_profiles_test.rb
CHANGED
|
@@ -19,11 +19,11 @@ module DaVinciCRDTestKit
|
|
|
19
19
|
See the [Prefetch Template](https://cds-hooks.hl7.org/2026Jan/en/#prefetch-template)
|
|
20
20
|
section for more information about the format of `prefetch` templates.
|
|
21
21
|
|
|
22
|
-
[The CRD IG requires
|
|
22
|
+
[The CRD IG requires that CRD clients support prefetch](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#prefetch)
|
|
23
23
|
including that the provided resources, which are part of the data included in the hook invocation,
|
|
24
24
|
[conform to the appropriate CRD profile](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#ci-c-hook-21).
|
|
25
25
|
|
|
26
|
-
During this test, Inferno will verify that each FHIR
|
|
26
|
+
During this test, Inferno will verify that each FHIR resource found under the `prefetch`
|
|
27
27
|
field of each request body conforms to the appropriate CRD profile.
|
|
28
28
|
)
|
|
29
29
|
|
|
@@ -34,7 +34,7 @@ module DaVinciCRDTestKit
|
|
|
34
34
|
'hl7.fhir.us.davinci-crd_2.2.1@prof-10', 'hl7.fhir.us.davinci-crd_2.2.1@prof-11',
|
|
35
35
|
'hl7.fhir.us.davinci-crd_2.2.1@prof-12'
|
|
36
36
|
run do
|
|
37
|
-
hook_requests =
|
|
37
|
+
hook_requests = load_interaction_group_requests
|
|
38
38
|
|
|
39
39
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
40
40
|
|
data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_requested_version_test.rb
CHANGED
|
@@ -8,20 +8,19 @@ module DaVinciCRDTestKit
|
|
|
8
8
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
9
9
|
|
|
10
10
|
id :crd_v221_hook_request_requested_version
|
|
11
|
-
title 'Hook requests
|
|
11
|
+
title 'Hook requests contain the CRD version extension'
|
|
12
12
|
description %(
|
|
13
|
-
Inferno's CRD service supports multiple versions of CRD, so [clients are required](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/conformancedetails.html#ci-c-dev-3)
|
|
13
|
+
Inferno's CRD service supports multiple versions of CRD, so [CRD clients are required](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/conformancedetails.html#ci-c-dev-3)
|
|
14
14
|
to specify the requested version using the `davinci-crd.requestedVersion` extension on each request.
|
|
15
15
|
|
|
16
16
|
During this test, Inferno will verify that the body of each hook request contains
|
|
17
17
|
the `davinci-crd.requestedVersion` extension with the correct value: "2.2".
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
verifies_requirements 'cds-hooks_3.0.0-ballot@214', 'hl7.fhir.us.davinci-crd_2.2.1@dev-3-A'
|
|
21
|
-
'hl7.fhir.us.davinci-crd_2.2.1@dev-12'
|
|
20
|
+
verifies_requirements 'cds-hooks_3.0.0-ballot@214', 'hl7.fhir.us.davinci-crd_2.2.1@dev-3-A'
|
|
22
21
|
|
|
23
22
|
run do
|
|
24
|
-
hook_requests =
|
|
23
|
+
hook_requests = load_interaction_group_requests
|
|
25
24
|
|
|
26
25
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
27
26
|
|
|
@@ -29,6 +28,19 @@ module DaVinciCRDTestKit
|
|
|
29
28
|
request_body = parse_json_request_entity(request.request_body, 'Request body', request_index)
|
|
30
29
|
next unless request_body.present?
|
|
31
30
|
|
|
31
|
+
unless request_body.is_a?(Hash)
|
|
32
|
+
add_request_message('error', "Request body must be a JSON object, got #{request_body.class}.",
|
|
33
|
+
request_index)
|
|
34
|
+
next
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
if request_body.key?('extension') && !request_body['extension'].is_a?(Hash)
|
|
38
|
+
add_request_message('error',
|
|
39
|
+
"`extension` must be a JSON object, got #{request_body['extension'].class}.",
|
|
40
|
+
request_index)
|
|
41
|
+
next
|
|
42
|
+
end
|
|
43
|
+
|
|
32
44
|
requested_version = request_body.dig('extension', 'davinci-crd.requestedVersion')
|
|
33
45
|
if requested_version.blank?
|
|
34
46
|
add_request_message('error', "Required extension 'davinci-crd.requestedVersion' is not present.",
|
data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_secured_transport_test.rb
CHANGED
|
@@ -11,14 +11,14 @@ module DaVinciCRDTestKit
|
|
|
11
11
|
title 'Hook request interactions use TLS'
|
|
12
12
|
description %(
|
|
13
13
|
During this test, Inferno will verify that
|
|
14
|
-
requests made by both the client and Inferno's simulated CRD servers are made against
|
|
14
|
+
requests made by both the CRD client and Inferno's simulated CRD servers are made against
|
|
15
15
|
TLS-secured endpoints using the `https` protocol.
|
|
16
16
|
)
|
|
17
17
|
verifies_requirements 'cds-hooks_3.0.0-ballot@2', 'cds-hooks_3.0.0-ballot@168', 'cds-hooks_3.0.0-ballot@172',
|
|
18
18
|
'hl7.fhir.us.davinci-crd_2.2.1@sec-2'
|
|
19
19
|
|
|
20
20
|
run do
|
|
21
|
-
hook_requests =
|
|
21
|
+
hook_requests = load_interaction_group_requests
|
|
22
22
|
|
|
23
23
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
24
24
|
|
|
@@ -10,46 +10,78 @@ module DaVinciCRDTestKit
|
|
|
10
10
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
11
11
|
|
|
12
12
|
id :crd_v221_card_display_attest_test
|
|
13
|
-
title '
|
|
13
|
+
title 'CRD client displays returned decision support details to the user'
|
|
14
14
|
description %(
|
|
15
15
|
During this test, the tester will confirm that the received cards and actions in the
|
|
16
|
-
hook responses have been displayed or otherwise made available to users of the client
|
|
17
|
-
in an
|
|
16
|
+
hook responses have been displayed or otherwise made available to users of the CRD client
|
|
17
|
+
in an appropriate way that allows for consideration and action if warranted.
|
|
18
18
|
)
|
|
19
|
-
|
|
19
|
+
flag_as_attestation
|
|
20
|
+
|
|
21
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@resp-49'
|
|
20
22
|
|
|
21
23
|
def responded_card_types
|
|
22
|
-
list_card_types_in_requests(requests)
|
|
24
|
+
@responded_card_types ||= list_card_types_in_requests(requests)
|
|
23
25
|
end
|
|
24
26
|
|
|
25
|
-
def format_responded_response_types
|
|
26
|
-
|
|
27
|
+
def format_responded_response_types(response_types = responded_card_types)
|
|
28
|
+
response_types
|
|
27
29
|
.map do |response_type|
|
|
28
|
-
|
|
29
|
-
response_type.split('_')
|
|
30
|
-
.map(&:capitalize)
|
|
31
|
-
.join(' ')
|
|
30
|
+
DaVinciCRDTestKit::CardsIdentification.humanize_response_type(response_type)
|
|
32
31
|
.prepend('- ')
|
|
33
|
-
.sub('
|
|
34
|
-
.sub('
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
.sub(' Card', '')
|
|
33
|
+
.sub(' Action', '')
|
|
34
|
+
end.join("\n")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def format_responded_card_types
|
|
38
|
+
@format_responded_card_types ||=
|
|
39
|
+
format_responded_response_types(responded_card_types.select do |type|
|
|
40
|
+
type.end_with?('_card')
|
|
41
|
+
end)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def format_responded_system_action_types
|
|
45
|
+
@format_responded_system_action_types ||=
|
|
46
|
+
format_responded_response_types(responded_card_types.select do |type|
|
|
47
|
+
type.end_with?('_action')
|
|
48
|
+
end)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
CARD_AND_SYSTEM_ACTION_DISPLAY_PREFIX = "\n\n By attesting true, ".freeze
|
|
52
|
+
CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_PREFIX = 'you confirm that the following '.freeze
|
|
53
|
+
CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_CONNECTOR = "\n\n Additionally, ".freeze
|
|
54
|
+
CARD_AND_SYSTEM_ACTION_DISPLAY_CARD_CLAUSE =
|
|
55
|
+
'card types observed in Inferno\'s responses were displayed to users:'.freeze
|
|
56
|
+
CARD_AND_SYSTEM_ACTION_DISPLAY_SYSTEM_ACTION_CLAUSE =
|
|
57
|
+
'system action types observed in Inferno\'s responses were displayed to users ' \
|
|
58
|
+
'through standard card display, icons, flyovers, or another alternate mechanism:'.freeze
|
|
59
|
+
|
|
60
|
+
def card_and_system_action_details_display
|
|
61
|
+
if format_responded_card_types.present? && format_responded_system_action_types.present?
|
|
62
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_PREFIX}#{CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_PREFIX}" \
|
|
63
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_CARD_CLAUSE}\n#{format_responded_card_types}" \
|
|
64
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_CONNECTOR}#{CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_PREFIX}" \
|
|
65
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_SYSTEM_ACTION_CLAUSE}\n#{format_responded_system_action_types}"
|
|
66
|
+
elsif format_responded_card_types.present?
|
|
67
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_PREFIX}#{CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_PREFIX}" \
|
|
68
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_CARD_CLAUSE}\n#{format_responded_card_types}"
|
|
69
|
+
else
|
|
70
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_PREFIX}#{CARD_AND_SYSTEM_ACTION_DISPLAY_CLAUSE_PREFIX}" \
|
|
71
|
+
"#{CARD_AND_SYSTEM_ACTION_DISPLAY_SYSTEM_ACTION_CLAUSE}\n#{format_responded_system_action_types}"
|
|
39
72
|
end
|
|
40
|
-
.join("\n")
|
|
41
73
|
end
|
|
42
74
|
|
|
43
75
|
output :attest_true_url
|
|
44
76
|
output :attest_false_url
|
|
45
77
|
|
|
46
78
|
run do
|
|
47
|
-
|
|
48
|
-
skip_if responded_card_types.blank?, 'No responses sent to the client.'
|
|
79
|
+
load_interaction_group_requests
|
|
80
|
+
skip_if responded_card_types.blank?, 'No responses sent to the CRD client.'
|
|
49
81
|
|
|
50
82
|
identifier = SecureRandom.hex(32)
|
|
51
|
-
attest_true_url =
|
|
52
|
-
attest_false_url =
|
|
83
|
+
attest_true_url = resume_pass_url_for(identifier)
|
|
84
|
+
attest_false_url = resume_fail_url_for(identifier)
|
|
53
85
|
output(attest_true_url:)
|
|
54
86
|
output(attest_false_url:)
|
|
55
87
|
wait(
|
|
@@ -57,12 +89,12 @@ module DaVinciCRDTestKit
|
|
|
57
89
|
message: <<~MESSAGE
|
|
58
90
|
**Card Display Attestation**:
|
|
59
91
|
|
|
60
|
-
I attest that the
|
|
61
|
-
|
|
62
|
-
available to users of the
|
|
63
|
-
|
|
92
|
+
I attest that the simulated CRD responses returned by Inferno during this
|
|
93
|
+
group were successfully processed by the CRD client and that they were
|
|
94
|
+
made available to users of the system in an appropriate way that allowed for
|
|
95
|
+
user review and action if warranted.
|
|
64
96
|
|
|
65
|
-
#{
|
|
97
|
+
#{card_and_system_action_details_display}
|
|
66
98
|
|
|
67
99
|
[Click here](#{attest_true_url}) if the above statement is **true**.
|
|
68
100
|
|
|
@@ -7,18 +7,18 @@ module DaVinciCRDTestKit
|
|
|
7
7
|
include CardsIdentification
|
|
8
8
|
include TaggedRequestLoadHelper
|
|
9
9
|
|
|
10
|
-
title '
|
|
10
|
+
title 'CRD client supports the Coverage Information response type on this hook'
|
|
11
11
|
id :crd_v221_client_hook_response_support_coverage_information
|
|
12
12
|
description <<~DESCRIPTION
|
|
13
|
-
During this test, Inferno will verify that the client demonstrated support for the [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information)
|
|
13
|
+
During this test, Inferno will verify that the CRD client demonstrated support for the [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
|
|
14
14
|
response type. At least one hook invocation performed during this group must have returned a Coverage Information action.
|
|
15
15
|
|
|
16
16
|
If this test fails, adjust the [cards returned by Inferno's simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses)
|
|
17
|
-
and/or the hook requests made by the client during this group such that a Coverage Information action is returned.
|
|
17
|
+
and/or the hook requests made by the CRD client during this group such that a Coverage Information action is returned.
|
|
18
18
|
DESCRIPTION
|
|
19
19
|
|
|
20
20
|
run do
|
|
21
|
-
hook_requests =
|
|
21
|
+
hook_requests = load_interaction_group_requests
|
|
22
22
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
23
23
|
|
|
24
24
|
sorted_cards = sorted_cards_from_requests(hook_requests)
|
|
@@ -12,13 +12,15 @@ module DaVinciCRDTestKit
|
|
|
12
12
|
title 'Hook responses have the correct structure and content'
|
|
13
13
|
description %(
|
|
14
14
|
During this test, Inferno will verify that each hook response built by Inferno's simulated CRD servers
|
|
15
|
-
and returned to the client conforms to CDS Hooks and CRD requirements. These responses must be conformant
|
|
16
|
-
for the client to demonstrate its ability to accept and process valid CRD responses.
|
|
15
|
+
and returned to the CRD client conforms to CDS Hooks and CRD requirements. These responses must be conformant
|
|
16
|
+
for the CRD client to demonstrate its ability to accept and process valid CRD responses.
|
|
17
|
+
To prevent the injection of non-standard information into Inferno responses, these validations will
|
|
18
|
+
strictly check that all extensions are allowed at the locations they appear by the CRD specification.
|
|
17
19
|
|
|
18
|
-
If this test fails when
|
|
20
|
+
If this test fails when responses were generated from a tester-provided template, adjust the
|
|
19
21
|
provided template and the submitted requests so that the response built by Inferno
|
|
20
22
|
is conformant. If this test fails when Inferno mocked the response based on selected
|
|
21
|
-
|
|
23
|
+
response types, first ensure that the CRD client's request is conformant. If the request is conformant
|
|
22
24
|
but Inferno's response(s) are still not conformant, please report this failure to the
|
|
23
25
|
Inferno team via [GitHub Issues](https://github.com/inferno-framework/davinci-crd-test-kit/issues).
|
|
24
26
|
For more details on how Inferno builds responses, see the
|
|
@@ -26,15 +28,14 @@ module DaVinciCRDTestKit
|
|
|
26
28
|
section of the [CRD Test Kit Wiki](https://github.com/inferno-framework/davinci-crd-test-kit/wiki).
|
|
27
29
|
)
|
|
28
30
|
id :crd_v221_inferno_response_validation
|
|
29
|
-
|
|
31
|
+
flag_as_simulation_verification
|
|
30
32
|
|
|
31
|
-
verifies_requirements '
|
|
32
|
-
'cds-hooks_3.0.0-ballot@224'
|
|
33
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@conf-10'
|
|
33
34
|
|
|
34
|
-
input :
|
|
35
|
+
input :response_approach, optional: true
|
|
35
36
|
|
|
36
37
|
def response_label(index = nil)
|
|
37
|
-
response_type = (
|
|
38
|
+
response_type = (response_approach == 'custom' ? 'Custom built' : 'Mocked')
|
|
38
39
|
"#{response_type} response#{" #{index}" if index.present?}"
|
|
39
40
|
end
|
|
40
41
|
|
|
@@ -45,7 +46,7 @@ module DaVinciCRDTestKit
|
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
run do
|
|
48
|
-
|
|
49
|
+
load_interaction_group_requests
|
|
49
50
|
|
|
50
51
|
skip_if request.blank?, "No #{response_label.downcase}s to verify."
|
|
51
52
|
|
|
@@ -62,7 +63,8 @@ module DaVinciCRDTestKit
|
|
|
62
63
|
response_hash['systemActions'],
|
|
63
64
|
request_hash,
|
|
64
65
|
index,
|
|
65
|
-
'2.2.1'
|
|
66
|
+
'2.2.1',
|
|
67
|
+
validator: :no_custom_extensions)
|
|
66
68
|
rescue JSON::ParserError
|
|
67
69
|
next
|
|
68
70
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'erb'
|
|
2
|
+
|
|
1
3
|
module DaVinciCRDTestKit
|
|
2
4
|
RESUME_PASS_PATH = '/resume_pass'.freeze
|
|
3
5
|
RESUME_FAIL_PATH = '/resume_fail'.freeze
|
|
@@ -16,5 +18,15 @@ module DaVinciCRDTestKit
|
|
|
16
18
|
def resume_fail_url
|
|
17
19
|
@resume_fail_url ||= inferno_base_url + RESUME_FAIL_PATH
|
|
18
20
|
end
|
|
21
|
+
|
|
22
|
+
# tokens such as a JWT issuer may contain characters that are reserved in a query string
|
|
23
|
+
def resume_pass_url_for(token)
|
|
24
|
+
"#{resume_pass_url}?token=#{ERB::Util.url_encode(token)}"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def resume_fail_url_for(token, message: nil)
|
|
28
|
+
url = "#{resume_fail_url}?token=#{ERB::Util.url_encode(token)}"
|
|
29
|
+
message.present? ? "#{url}&message=#{ERB::Util.url_encode(message)}" : url
|
|
30
|
+
end
|
|
19
31
|
end
|
|
20
32
|
end
|
|
@@ -35,6 +35,15 @@ module DaVinciCRDTestKit
|
|
|
35
35
|
NutritionOrder ServiceRequest VisionPrescription
|
|
36
36
|
].freeze
|
|
37
37
|
|
|
38
|
+
def self.humanize_response_type(response_type)
|
|
39
|
+
response_type.split('_')
|
|
40
|
+
.map(&:capitalize)
|
|
41
|
+
.join(' ')
|
|
42
|
+
.sub('Smart', 'SMART')
|
|
43
|
+
.sub('Create Update', 'Create/Update')
|
|
44
|
+
.sub('Companions Prerequisites', 'Companions/Prerequisites')
|
|
45
|
+
end
|
|
46
|
+
|
|
38
47
|
def identify_card_type(card) # rubocop:disable Metrics/CyclomaticComplexity
|
|
39
48
|
return nil if card['type'].present? # action, not a card
|
|
40
49
|
return ADDITIONAL_ORDERS_RESPONSE_TYPE if additional_orders_response_type?(card)
|
|
@@ -102,9 +111,16 @@ module DaVinciCRDTestKit
|
|
|
102
111
|
cards.present? || actions.present?
|
|
103
112
|
end
|
|
104
113
|
|
|
114
|
+
# the value of the named hook request extension, or nil when the request or its `extension` is not
|
|
115
|
+
# an object
|
|
116
|
+
def request_extension(request_body, name)
|
|
117
|
+
extension = request_body['extension'] if request_body.is_a?(Hash)
|
|
118
|
+
extension[name] if extension.is_a?(Hash)
|
|
119
|
+
end
|
|
120
|
+
|
|
105
121
|
def coverage_info_configuration_disabled?(request_body)
|
|
106
|
-
request_body.
|
|
107
|
-
|
|
122
|
+
configuration = request_extension(request_body, 'davinci-crd.configuration')
|
|
123
|
+
configuration.is_a?(Hash) && configuration[COVERAGE_INFO_CONFIGURATION_CODE] == false
|
|
108
124
|
end
|
|
109
125
|
|
|
110
126
|
def disable_coverage_info_configuration!(request_body)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'date'
|
|
2
2
|
require 'uri'
|
|
3
|
+
require_relative 'resource_identity'
|
|
3
4
|
|
|
4
5
|
module DaVinciCRDTestKit
|
|
5
6
|
class FhirpathServiceError < StandardError; end
|
|
@@ -25,13 +26,15 @@ module DaVinciCRDTestKit
|
|
|
25
26
|
cds_component, remaining_query = identify_cds_component(fhirpath_query)
|
|
26
27
|
execution_targets = cds_component.present? ? get_cds_field(hook_request, cds_component) : hook_request
|
|
27
28
|
|
|
29
|
+
@current_fhirpath_query = fhirpath_query
|
|
28
30
|
execution_targets.map do |execution_target|
|
|
29
|
-
@current_base_fhir_server = hook_request
|
|
31
|
+
@current_base_fhir_server = ResourceIdentity.fhir_server_base(hook_request)
|
|
30
32
|
execute(execution_target, remaining_query)
|
|
31
33
|
end.flatten.compact
|
|
32
34
|
ensure
|
|
33
35
|
# clean-up identity
|
|
34
36
|
@current_base_fhir_server = nil
|
|
37
|
+
@current_fhirpath_query = nil
|
|
35
38
|
end
|
|
36
39
|
|
|
37
40
|
private
|
|
@@ -112,11 +115,16 @@ module DaVinciCRDTestKit
|
|
|
112
115
|
end.flatten.compact
|
|
113
116
|
end
|
|
114
117
|
|
|
118
|
+
# resolve() makes the resolved resource's server the base for the references that follow it, so
|
|
119
|
+
# the base is restored afterwards for any sibling references
|
|
115
120
|
def execute_resolve(execution_target, fhirpath_query)
|
|
121
|
+
saved_base_fhir_server = @current_base_fhir_server
|
|
116
122
|
referenced = resolve(execution_target)
|
|
117
123
|
return nil unless referenced.present?
|
|
118
124
|
|
|
119
125
|
execute(referenced, fhirpath_query[10..])
|
|
126
|
+
ensure
|
|
127
|
+
@current_base_fhir_server = saved_base_fhir_server
|
|
120
128
|
end
|
|
121
129
|
|
|
122
130
|
def execute_entry_resource_step(execution_target, fhirpath_query)
|
|
@@ -142,14 +150,7 @@ module DaVinciCRDTestKit
|
|
|
142
150
|
end
|
|
143
151
|
|
|
144
152
|
def base_fhir_server_for_identity(current_resource_identity)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
parsed_identity = URI.parse(current_resource_identity)
|
|
148
|
-
return nil unless ['http', 'https'].include?(parsed_identity.scheme)
|
|
149
|
-
|
|
150
|
-
current_resource_identity.split('/')[0..-3].join('/')
|
|
151
|
-
rescue URI::InvalidURIError
|
|
152
|
-
nil
|
|
153
|
+
ResourceIdentity.base_for(current_resource_identity)
|
|
153
154
|
end
|
|
154
155
|
|
|
155
156
|
# -------------------------------------------------------------------------
|
data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/appointment_with_order/metadata.yml
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
:resource: Appointment
|
|
3
|
+
:profile_url: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-appointment-with-order
|
|
4
|
+
:profile_name: CRD Appointment with Order
|
|
5
|
+
:profile_version: 2.2.1
|
|
6
|
+
:must_supports:
|
|
7
|
+
:extensions:
|
|
8
|
+
- :id: Appointment.basedOn.extension:AlternateReference
|
|
9
|
+
:slice_name: AlternateReference
|
|
10
|
+
:path: basedOn.extension
|
|
11
|
+
:url: http://hl7.org/fhir/StructureDefinition/alternate-reference
|
|
12
|
+
:modifier_extension: false
|
|
13
|
+
:slices:
|
|
14
|
+
- :slice_id: Appointment.participant:Patient
|
|
15
|
+
:slice_name: Patient
|
|
16
|
+
:path: participant
|
|
17
|
+
:discriminator:
|
|
18
|
+
:type: referenceTarget
|
|
19
|
+
:path: type
|
|
20
|
+
:resource_type: Patient
|
|
21
|
+
- :slice_id: Appointment.participant:PrimaryPerformer
|
|
22
|
+
:slice_name: PrimaryPerformer
|
|
23
|
+
:path: participant
|
|
24
|
+
:discriminator:
|
|
25
|
+
:type: patternCodeableConcept
|
|
26
|
+
:path: type
|
|
27
|
+
:code: PPRF
|
|
28
|
+
:system: http://terminology.hl7.org/CodeSystem/v3-ParticipationType
|
|
29
|
+
:elements:
|
|
30
|
+
- :path: basedOn
|
|
31
|
+
:types:
|
|
32
|
+
- Reference
|
|
33
|
+
:target_profiles:
|
|
34
|
+
- http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-servicerequest
|
|
35
|
+
- :path: contained
|
|
36
|
+
- :path: end
|
|
37
|
+
- :path: participant.actor
|
|
38
|
+
:types:
|
|
39
|
+
- Reference
|
|
40
|
+
:allowed_target_profiles:
|
|
41
|
+
- http://hl7.org/fhir/StructureDefinition/Patient|4.0.1
|
|
42
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner|4.0.1
|
|
43
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole|4.0.1
|
|
44
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1
|
|
45
|
+
- http://hl7.org/fhir/StructureDefinition/Device|4.0.1
|
|
46
|
+
- http://hl7.org/fhir/StructureDefinition/HealthcareService|4.0.1
|
|
47
|
+
- http://hl7.org/fhir/StructureDefinition/Location|4.0.1
|
|
48
|
+
- :path: participant.status
|
|
49
|
+
- :path: participant:Patient.actor
|
|
50
|
+
:types:
|
|
51
|
+
- Reference
|
|
52
|
+
:target_profiles:
|
|
53
|
+
- http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-patient
|
|
54
|
+
- :path: participant:Patient.status
|
|
55
|
+
- :path: participant:PrimaryPerformer.actor
|
|
56
|
+
:types:
|
|
57
|
+
- Reference
|
|
58
|
+
:allowed_target_profiles:
|
|
59
|
+
- http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-practitioner
|
|
60
|
+
- http://hl7.org/fhir/us/davinci-hrex/StructureDefinition/hrex-practitionerrole
|
|
61
|
+
- http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-location
|
|
62
|
+
- :path: participant:PrimaryPerformer.status
|
|
63
|
+
- :path: requestedPeriod
|
|
64
|
+
- :path: start
|
|
65
|
+
- :path: status
|
|
66
|
+
:choices: []
|
|
67
|
+
:recursive_elements: []
|