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
|
@@ -22,7 +22,7 @@ module DaVinciCRDTestKit
|
|
|
22
22
|
title: 'CRD JSON Web Key Set (JWKS)',
|
|
23
23
|
type: 'textarea',
|
|
24
24
|
description: %(
|
|
25
|
-
The client's registered JWK Set containing
|
|
25
|
+
The client's registered JWK Set containing its public key, either
|
|
26
26
|
as a publicly accessible url containing the JWKS, or the raw JWKS.
|
|
27
27
|
Run or re-run the **Client Registration** group to set or
|
|
28
28
|
change this value. Used if the `jku` header is not found in the auth token jwt.
|
|
@@ -41,30 +41,17 @@ module DaVinciCRDTestKit
|
|
|
41
41
|
@request_number = index + 1
|
|
42
42
|
|
|
43
43
|
jku = JSON.parse(token_header)['jku']
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
jwks =
|
|
45
|
+
if jku.present?
|
|
46
|
+
fetch_jwks(jku, crd_jwks_json)
|
|
47
|
+
else
|
|
48
|
+
skip_if cds_jwk_set.blank?,
|
|
49
|
+
%(#{request_number}JWK Set must be inputted if the client's JWK Set is not available via a URL
|
|
50
|
+
identified by the jku header field)
|
|
51
|
+
|
|
52
|
+
parse_or_fetch_jwks(cds_jwk_set, crd_jwks_json)
|
|
52
53
|
end
|
|
53
|
-
|
|
54
|
-
@request_number = index + 1
|
|
55
|
-
jwks = json_parse(response[:body])
|
|
56
|
-
next if jwks.blank?
|
|
57
|
-
|
|
58
|
-
crd_jwks_json << response[:body]
|
|
59
|
-
|
|
60
|
-
jwks = JSON.parse(response[:body])
|
|
61
|
-
else
|
|
62
|
-
skip_if cds_jwk_set.blank?,
|
|
63
|
-
%(#{request_number}JWK Set must be inputted if the client's JWK Set is not available via a URL
|
|
64
|
-
identified by the jku header field)
|
|
65
|
-
|
|
66
|
-
jwks = JSON.parse(cds_jwk_set)
|
|
67
|
-
end
|
|
54
|
+
next if jwks.blank?
|
|
68
55
|
|
|
69
56
|
keys = jwks['keys']
|
|
70
57
|
unless keys.is_a?(Array)
|
|
@@ -104,6 +91,31 @@ module DaVinciCRDTestKit
|
|
|
104
91
|
|
|
105
92
|
no_error_validation('Retrieving JWKS failed.')
|
|
106
93
|
end
|
|
94
|
+
|
|
95
|
+
def fetch_jwks(uri, crd_jwks_json)
|
|
96
|
+
get(uri)
|
|
97
|
+
|
|
98
|
+
if response[:status] != 200
|
|
99
|
+
add_message('error', %(
|
|
100
|
+
#{request_number}Unexpected response status: expected 200, but received
|
|
101
|
+
#{response[:status]}))
|
|
102
|
+
return false
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
jwks = json_parse(response[:body])
|
|
106
|
+
return false if jwks.blank?
|
|
107
|
+
|
|
108
|
+
crd_jwks_json << response[:body]
|
|
109
|
+
jwks
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def parse_or_fetch_jwks(jwk_set_input, crd_jwks_json)
|
|
113
|
+
if jwk_set_input.match?(%r{\Ahttps?://})
|
|
114
|
+
fetch_jwks(jwk_set_input, crd_jwks_json)
|
|
115
|
+
else
|
|
116
|
+
json_parse(jwk_set_input)
|
|
117
|
+
end
|
|
118
|
+
end
|
|
107
119
|
end
|
|
108
120
|
end
|
|
109
121
|
end
|
|
@@ -10,11 +10,12 @@ module DaVinciCRDTestKit
|
|
|
10
10
|
description %(
|
|
11
11
|
Verify that the JWT header contains the header fields required by the
|
|
12
12
|
[CDS hooks spec](https://cds-hooks.hl7.org/2.0#trusting-cds-clients).
|
|
13
|
-
The `alg`, `kid`, and `typ` fields are required
|
|
14
|
-
`JWT` and that the key used to sign the token can be
|
|
13
|
+
The `alg`, `kid`, and `typ` fields are required, and `alg` and `kid` must be strings. This test
|
|
14
|
+
also verifies that the `typ` field is set to `JWT` and that the key used to sign the token can be
|
|
15
|
+
identified in the JWKS.
|
|
15
16
|
)
|
|
16
17
|
|
|
17
|
-
verifies_requirements 'cds-hooks_2.0@182', 'cds-hooks_2.0@184', 'cds-hooks_2.0@202'
|
|
18
|
+
verifies_requirements 'cds-hooks_2.0@181', 'cds-hooks_2.0@182', 'cds-hooks_2.0@184', 'cds-hooks_2.0@202'
|
|
18
19
|
|
|
19
20
|
input :auth_token_headers_json, :crd_jwks_keys_json
|
|
20
21
|
output :auth_tokens_jwk_json
|
|
@@ -32,7 +33,11 @@ module DaVinciCRDTestKit
|
|
|
32
33
|
header = JSON.parse(token_header)
|
|
33
34
|
algorithm = header['alg']
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
if algorithm.blank?
|
|
37
|
+
add_message('error', "#{request_number}Token header must have the `alg` field")
|
|
38
|
+
elsif !algorithm.is_a?(String)
|
|
39
|
+
add_message('error', "#{request_number}Token header `alg` field must be a string, got #{algorithm.to_json}")
|
|
40
|
+
end
|
|
36
41
|
|
|
37
42
|
add_message('error', "#{request_number}Token header `alg` field cannot be set to none") if algorithm == 'none'
|
|
38
43
|
|
|
@@ -50,6 +55,11 @@ module DaVinciCRDTestKit
|
|
|
50
55
|
end
|
|
51
56
|
|
|
52
57
|
kid = header['kid']
|
|
58
|
+
unless kid.is_a?(String)
|
|
59
|
+
add_message('error', "#{request_number}Token header `kid` field must be a string, got #{kid.to_json}")
|
|
60
|
+
next
|
|
61
|
+
end
|
|
62
|
+
|
|
53
63
|
keys = JSON.parse(crd_jwks_keys[index])
|
|
54
64
|
|
|
55
65
|
jwk = keys.find { |key| key['kid'] == kid }
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
require_relative '../../client_hook_request_validation'
|
|
2
|
+
require_relative '../../jwt_claim_types'
|
|
2
3
|
|
|
3
4
|
module DaVinciCRDTestKit
|
|
4
5
|
module V201
|
|
5
6
|
class TokenPayloadTest < Inferno::Test
|
|
6
7
|
include ClientHookRequestValidation
|
|
8
|
+
include DaVinciCRDTestKit::JwtClaimTypes
|
|
7
9
|
include ClientURLs
|
|
8
10
|
|
|
9
11
|
id :crd_v201_token_payload
|
|
@@ -18,9 +20,10 @@ module DaVinciCRDTestKit
|
|
|
18
20
|
- `aud` must match the URL of the CDS Service endpoint being invoked
|
|
19
21
|
- `exp` must represent a time in the future
|
|
20
22
|
- `jti` must be a non-blank string that uniquely identifies this authentication JWT
|
|
23
|
+
- `iss` must be a string, `aud` a string or an array of strings, and `exp` and `iat` numbers
|
|
21
24
|
)
|
|
22
25
|
|
|
23
|
-
verifies_requirements 'cds-hooks_2.0@180', 'cds-hooks_2.0@
|
|
26
|
+
verifies_requirements 'cds-hooks_2.0@180', 'cds-hooks_2.0@187', 'cds-hooks_2.0@189',
|
|
24
27
|
'cds-hooks_2.0@190', 'cds-hooks_2.0@191', 'cds-hooks_2.0@192', 'cds-hooks_2.0@196',
|
|
25
28
|
'cds-hooks_2.0@203'
|
|
26
29
|
|
|
@@ -49,34 +52,51 @@ module DaVinciCRDTestKit
|
|
|
49
52
|
|
|
50
53
|
begin
|
|
51
54
|
jwk = JSON.parse(auth_token_jwk).deep_symbolize_keys
|
|
52
|
-
|
|
53
|
-
payload, =
|
|
54
|
-
JWT.decode(
|
|
55
|
-
auth_tokens_list[index],
|
|
56
|
-
JWT::JWK.import(jwk).public_key,
|
|
57
|
-
true,
|
|
58
|
-
algorithms: [jwk[:alg]],
|
|
59
|
-
exp_leeway: 60,
|
|
60
|
-
iss: cds_jwt_iss,
|
|
61
|
-
aud: hook_url,
|
|
62
|
-
verify_not_before: false,
|
|
63
|
-
verify_iat: false,
|
|
64
|
-
verify_jti: true,
|
|
65
|
-
verify_iss: true,
|
|
66
|
-
verify_aud: true
|
|
67
|
-
)
|
|
55
|
+
unverified_payload, jwt_header = JWT.decode(auth_tokens_list[index], nil, false)
|
|
68
56
|
rescue StandardError => e
|
|
69
57
|
add_message('error', "#{request_number}Token validation error: #{e.message}")
|
|
70
58
|
next
|
|
71
59
|
end
|
|
72
60
|
|
|
73
|
-
|
|
74
|
-
missing_claims_string = missing_claims.map { |claim| "`#{claim}`" }.join(', ')
|
|
61
|
+
alg = jwk[:alg] || jwt_header['alg']
|
|
75
62
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
# Continue checking the rest of the token even when one check fails, so the tester sees every
|
|
64
|
+
# issue at once rather than fixing them one error at a time.
|
|
65
|
+
# CDS Hooks prohibits the `none` algorithm and symmetric (HMAC) algorithms for the authentication JWT.
|
|
66
|
+
if alg.to_s.match?(/\A(none|hs\d+)\z/i)
|
|
67
|
+
add_message('error',
|
|
68
|
+
"#{request_number}Token signature algorithm #{alg.inspect} is not permitted; CDS Hooks " \
|
|
69
|
+
'prohibits the `none` algorithm and symmetric (HMAC) algorithms.')
|
|
79
70
|
end
|
|
71
|
+
|
|
72
|
+
begin
|
|
73
|
+
JWT.decode(
|
|
74
|
+
auth_tokens_list[index],
|
|
75
|
+
JWT::JWK.import(jwk).public_key,
|
|
76
|
+
true,
|
|
77
|
+
algorithms: [alg],
|
|
78
|
+
exp_leeway: 60,
|
|
79
|
+
iss: cds_jwt_iss,
|
|
80
|
+
aud: hook_url,
|
|
81
|
+
verify_not_before: false,
|
|
82
|
+
verify_iat: false,
|
|
83
|
+
verify_jti: true,
|
|
84
|
+
verify_iss: true,
|
|
85
|
+
verify_aud: true
|
|
86
|
+
)
|
|
87
|
+
rescue StandardError => e
|
|
88
|
+
add_message('error', "#{request_number}Token validation error: #{e.message}")
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
jwt_claim_type_errors(unverified_payload).each do |message|
|
|
92
|
+
add_message('error', "#{request_number}#{message}")
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
missing_claims = required_claims - unverified_payload.keys
|
|
96
|
+
next if missing_claims.empty?
|
|
97
|
+
|
|
98
|
+
missing_claims_string = missing_claims.map { |claim| "`#{claim}`" }.join(', ')
|
|
99
|
+
add_message('error', "#{request_number}JWT payload missing required claims: #{missing_claims_string}")
|
|
80
100
|
end
|
|
81
101
|
no_error_validation('Token payload is missing required claims or does not have a valid signature.')
|
|
82
102
|
end
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"hook": "appointment-book",
|
|
6
6
|
"title": "Appointment Booking CDS Service",
|
|
7
|
-
"description": "An example of a CDS Service that is invoked when user
|
|
7
|
+
"description": "An example of a CDS Service that is invoked when user books a future appointment for a patient",
|
|
8
8
|
"id": "appointment-book-service",
|
|
9
9
|
"prefetch": {
|
|
10
10
|
"user": "{{context.userId}}",
|
|
@@ -25,48 +25,48 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"hook": "
|
|
29
|
-
"title": "
|
|
30
|
-
"description": "An example of a CDS Service that
|
|
31
|
-
"id": "
|
|
28
|
+
"hook": "order-select",
|
|
29
|
+
"title": "Order Select CDS Service",
|
|
30
|
+
"description": "An example of a CDS Service that fires when a clinician selects one or more orders to place for a patient",
|
|
31
|
+
"id": "order-select-service",
|
|
32
32
|
"prefetch": {
|
|
33
33
|
"user": "{{context.userId}}",
|
|
34
34
|
"patient": "Patient/{{context.patientId}}",
|
|
35
|
-
"encounter": "Encounter/{{context.encounterId}}",
|
|
36
35
|
"coverage": "Coverage?patient={{context.patientId}}&status=active"
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
38
|
{
|
|
40
|
-
"hook": "order-
|
|
41
|
-
"title": "Order
|
|
42
|
-
"description": "An example of a CDS Service that fires when a
|
|
43
|
-
"id": "order-
|
|
39
|
+
"hook": "order-sign",
|
|
40
|
+
"title": "Order Sign CDS Service",
|
|
41
|
+
"description": "An example of a CDS Service that fires when a clinician is ready to sign one or more orders for a patient",
|
|
42
|
+
"id": "order-sign-service",
|
|
44
43
|
"prefetch": {
|
|
44
|
+
"user": "{{context.userId}}",
|
|
45
45
|
"patient": "Patient/{{context.patientId}}",
|
|
46
|
-
"performer": "{{context.performer}}",
|
|
47
|
-
"order": "{{context.order}}",
|
|
48
46
|
"coverage": "Coverage?patient={{context.patientId}}&status=active"
|
|
49
47
|
}
|
|
50
48
|
},
|
|
51
49
|
{
|
|
52
|
-
"hook": "order-
|
|
53
|
-
"title": "Order
|
|
54
|
-
"description": "An example of a CDS Service that fires when a
|
|
55
|
-
"id": "order-
|
|
50
|
+
"hook": "order-dispatch",
|
|
51
|
+
"title": "Order Dispatch CDS Service Example",
|
|
52
|
+
"description": "An example of a CDS Service that fires when a practitioner is selecting a candidate performer for a pre-existing order that was not tied to a specific performer",
|
|
53
|
+
"id": "order-dispatch-service",
|
|
56
54
|
"prefetch": {
|
|
57
|
-
"user": "{{context.userId}}",
|
|
58
55
|
"patient": "Patient/{{context.patientId}}",
|
|
56
|
+
"performer": "{{context.performer}}",
|
|
57
|
+
"order": "{{context.order}}",
|
|
59
58
|
"coverage": "Coverage?patient={{context.patientId}}&status=active"
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
|
-
"hook": "
|
|
64
|
-
"title": "
|
|
65
|
-
"description": "An example of a CDS Service that
|
|
66
|
-
"id": "
|
|
62
|
+
"hook": "encounter-discharge",
|
|
63
|
+
"title": "Encounter Disharge CDS Service Example",
|
|
64
|
+
"description": "An example of a CDS Service that is invoked when the user is performing the discharge process for an encounter - typically an inpatient encounter.",
|
|
65
|
+
"id": "encounter-discharge-service",
|
|
67
66
|
"prefetch": {
|
|
68
67
|
"user": "{{context.userId}}",
|
|
69
68
|
"patient": "Patient/{{context.patientId}}",
|
|
69
|
+
"encounter": "Encounter/{{context.encounterId}}",
|
|
70
70
|
"coverage": "Coverage?patient={{context.patientId}}&status=active"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -59,7 +59,9 @@ module DaVinciCRDTestKit
|
|
|
59
59
|
},
|
|
60
60
|
options: {
|
|
61
61
|
hook_name: 'appointment-book',
|
|
62
|
-
hook_path: APPOINTMENT_BOOK_PATH
|
|
62
|
+
hook_path: APPOINTMENT_BOOK_PATH,
|
|
63
|
+
crd_interaction_group: 'hooks-appointment-book',
|
|
64
|
+
include_in_cross_hook_analysis: true
|
|
63
65
|
}
|
|
64
66
|
)
|
|
65
67
|
|
|
@@ -69,11 +71,10 @@ module DaVinciCRDTestKit
|
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
group do
|
|
72
|
-
title 'Verify
|
|
73
|
-
|
|
74
|
-
test from: :
|
|
75
|
-
test from: :
|
|
76
|
-
test from: :crd_v201_token_payload
|
|
74
|
+
title 'Verify Response Handling'
|
|
75
|
+
|
|
76
|
+
test from: :crd_v201_inferno_response_validation
|
|
77
|
+
test from: :crd_v201_card_display_attest_test
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
group do
|
|
@@ -98,10 +99,11 @@ module DaVinciCRDTestKit
|
|
|
98
99
|
end
|
|
99
100
|
|
|
100
101
|
group do
|
|
101
|
-
title 'Verify
|
|
102
|
-
|
|
103
|
-
test from: :
|
|
104
|
-
test from: :
|
|
102
|
+
title 'Verify Authorization'
|
|
103
|
+
test from: :crd_v201_decode_auth_token
|
|
104
|
+
test from: :crd_v201_retrieve_jwks
|
|
105
|
+
test from: :crd_v201_token_header
|
|
106
|
+
test from: :crd_v201_token_payload
|
|
105
107
|
end
|
|
106
108
|
end
|
|
107
109
|
end
|
|
@@ -59,7 +59,9 @@ module DaVinciCRDTestKit
|
|
|
59
59
|
},
|
|
60
60
|
options: {
|
|
61
61
|
hook_name: 'encounter-discharge',
|
|
62
|
-
hook_path: ENCOUNTER_DISCHARGE_PATH
|
|
62
|
+
hook_path: ENCOUNTER_DISCHARGE_PATH,
|
|
63
|
+
crd_interaction_group: 'hooks-encounter-discharge',
|
|
64
|
+
include_in_cross_hook_analysis: true
|
|
63
65
|
}
|
|
64
66
|
)
|
|
65
67
|
|
|
@@ -69,11 +71,10 @@ module DaVinciCRDTestKit
|
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
group do
|
|
72
|
-
title 'Verify
|
|
73
|
-
|
|
74
|
-
test from: :
|
|
75
|
-
test from: :
|
|
76
|
-
test from: :crd_v201_token_payload
|
|
74
|
+
title 'Verify Response Handling'
|
|
75
|
+
|
|
76
|
+
test from: :crd_v201_inferno_response_validation
|
|
77
|
+
test from: :crd_v201_card_display_attest_test
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
group do
|
|
@@ -95,10 +96,11 @@ module DaVinciCRDTestKit
|
|
|
95
96
|
end
|
|
96
97
|
|
|
97
98
|
group do
|
|
98
|
-
title 'Verify
|
|
99
|
-
|
|
100
|
-
test from: :
|
|
101
|
-
test from: :
|
|
99
|
+
title 'Verify Authorization'
|
|
100
|
+
test from: :crd_v201_decode_auth_token
|
|
101
|
+
test from: :crd_v201_retrieve_jwks
|
|
102
|
+
test from: :crd_v201_token_header
|
|
103
|
+
test from: :crd_v201_token_payload
|
|
102
104
|
end
|
|
103
105
|
end
|
|
104
106
|
end
|
|
@@ -59,7 +59,9 @@ module DaVinciCRDTestKit
|
|
|
59
59
|
},
|
|
60
60
|
options: {
|
|
61
61
|
hook_name: 'encounter-start',
|
|
62
|
-
hook_path: ENCOUNTER_START_PATH
|
|
62
|
+
hook_path: ENCOUNTER_START_PATH,
|
|
63
|
+
crd_interaction_group: 'hooks-encounter-start',
|
|
64
|
+
include_in_cross_hook_analysis: true
|
|
63
65
|
}
|
|
64
66
|
)
|
|
65
67
|
|
|
@@ -69,11 +71,10 @@ module DaVinciCRDTestKit
|
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
group do
|
|
72
|
-
title 'Verify
|
|
73
|
-
|
|
74
|
-
test from: :
|
|
75
|
-
test from: :
|
|
76
|
-
test from: :crd_v201_token_payload
|
|
74
|
+
title 'Verify Response Handling'
|
|
75
|
+
|
|
76
|
+
test from: :crd_v201_inferno_response_validation
|
|
77
|
+
test from: :crd_v201_card_display_attest_test
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
group do
|
|
@@ -95,10 +96,11 @@ module DaVinciCRDTestKit
|
|
|
95
96
|
end
|
|
96
97
|
|
|
97
98
|
group do
|
|
98
|
-
title 'Verify
|
|
99
|
-
|
|
100
|
-
test from: :
|
|
101
|
-
test from: :
|
|
99
|
+
title 'Verify Authorization'
|
|
100
|
+
test from: :crd_v201_decode_auth_token
|
|
101
|
+
test from: :crd_v201_retrieve_jwks
|
|
102
|
+
test from: :crd_v201_token_header
|
|
103
|
+
test from: :crd_v201_token_payload
|
|
102
104
|
end
|
|
103
105
|
end
|
|
104
106
|
end
|
|
@@ -74,7 +74,7 @@ module DaVinciCRDTestKit
|
|
|
74
74
|
Under [Privacy, Security, and Safety](https://hl7.org/fhir/us/davinci-crd/STU2/security.html),
|
|
75
75
|
the CRD Implementation Guide imposes the following rule about TLS:
|
|
76
76
|
|
|
77
|
-
As per the [CDS
|
|
77
|
+
As per the [CDS Hooks specification](https://cds-hooks.hl7.org/2.0/#security-and-safety),
|
|
78
78
|
communications between CRD clients and CRD servers SHALL
|
|
79
79
|
use TLS. Mutual TLS is not required by this specification but is permitted. CRD servers and
|
|
80
80
|
CRD clients SHOULD enforce a minimum version and other TLS configuration requirements based
|
|
@@ -104,7 +104,7 @@ module DaVinciCRDTestKit
|
|
|
104
104
|
Under [Privacy, Security, and Safety](https://hl7.org/fhir/us/davinci-crd/STU2/security.html),
|
|
105
105
|
the CRD Implementation Guide imposes the following rule about TLS:
|
|
106
106
|
|
|
107
|
-
As per the [CDS
|
|
107
|
+
As per the [CDS Hooks specification](https://cds-hooks.hl7.org/2.0/#security-and-safety),
|
|
108
108
|
communications between CRD clients and CRD servers SHALL
|
|
109
109
|
use TLS. Mutual TLS is not required by this specification but is permitted. CRD servers and
|
|
110
110
|
CRD clients SHOULD enforce a minimum version and other TLS configuration requirements based
|
|
@@ -4,6 +4,7 @@ require_relative 'client_encounter_start_group'
|
|
|
4
4
|
require_relative 'client_order_dispatch_group'
|
|
5
5
|
require_relative 'client_order_select_group'
|
|
6
6
|
require_relative 'client_order_sign_group'
|
|
7
|
+
require_relative '../client_input_helper'
|
|
7
8
|
|
|
8
9
|
module DaVinciCRDTestKit
|
|
9
10
|
module V201
|
|
@@ -14,10 +15,10 @@ module DaVinciCRDTestKit
|
|
|
14
15
|
[six hooks contained in the implementation guide](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html):
|
|
15
16
|
* [appointment-book](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#appointment-book)
|
|
16
17
|
* [encounter-start](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#encounter-start)
|
|
17
|
-
* [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#encounter-discharge)
|
|
18
18
|
* [order-select](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#order-select)
|
|
19
|
-
* [order-dispatch](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#order-dispatch)
|
|
20
19
|
* [order-sign](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#order-sign)
|
|
20
|
+
* [order-dispatch](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#order-dispatch)
|
|
21
|
+
* [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/STU2/hooks.html#encounter-discharge)
|
|
21
22
|
|
|
22
23
|
Each hook group contains a test which waits for incoming hook requests from the CRD client, and tests which
|
|
23
24
|
verify the incoming hook requests conform to the specific hook requirements specified the
|
|
@@ -43,11 +44,7 @@ module DaVinciCRDTestKit
|
|
|
43
44
|
|
|
44
45
|
input :cds_jwt_iss,
|
|
45
46
|
title: 'CRD JWT Issuer',
|
|
46
|
-
description:
|
|
47
|
-
Value of the `iss` claim that must be sent on the Bearer token in the `Authorization`
|
|
48
|
-
header of all requests. Run or re-run the **Client Registration** group to set or
|
|
49
|
-
change this value.
|
|
50
|
-
),
|
|
47
|
+
description: ClientInputHelper.v201_locked_cds_jwt_iss_description,
|
|
51
48
|
locked: true
|
|
52
49
|
|
|
53
50
|
input_order :cds_jwt_iss, :cds_jwk_set
|
|
@@ -58,16 +55,16 @@ module DaVinciCRDTestKit
|
|
|
58
55
|
group from: :crd_v201_client_encounter_start,
|
|
59
56
|
optional: true
|
|
60
57
|
|
|
61
|
-
group from: :
|
|
58
|
+
group from: :crd_v201_client_order_select,
|
|
62
59
|
optional: true
|
|
63
60
|
|
|
64
|
-
group from: :
|
|
61
|
+
group from: :crd_v201_client_order_sign,
|
|
65
62
|
optional: true
|
|
66
63
|
|
|
67
64
|
group from: :crd_v201_client_order_dispatch,
|
|
68
65
|
optional: true
|
|
69
66
|
|
|
70
|
-
group from: :
|
|
67
|
+
group from: :crd_v201_client_encounter_discharge,
|
|
71
68
|
optional: true
|
|
72
69
|
end
|
|
73
70
|
end
|
|
@@ -58,7 +58,9 @@ module DaVinciCRDTestKit
|
|
|
58
58
|
},
|
|
59
59
|
options: {
|
|
60
60
|
hook_name: 'order-dispatch',
|
|
61
|
-
hook_path: ORDER_DISPATCH_PATH
|
|
61
|
+
hook_path: ORDER_DISPATCH_PATH,
|
|
62
|
+
crd_interaction_group: 'hooks-order-dispatch',
|
|
63
|
+
include_in_cross_hook_analysis: true
|
|
62
64
|
}
|
|
63
65
|
)
|
|
64
66
|
|
|
@@ -68,11 +70,10 @@ module DaVinciCRDTestKit
|
|
|
68
70
|
end
|
|
69
71
|
|
|
70
72
|
group do
|
|
71
|
-
title 'Verify
|
|
72
|
-
|
|
73
|
-
test from: :
|
|
74
|
-
test from: :
|
|
75
|
-
test from: :crd_v201_token_payload
|
|
73
|
+
title 'Verify Response Handling'
|
|
74
|
+
|
|
75
|
+
test from: :crd_v201_inferno_response_validation
|
|
76
|
+
test from: :crd_v201_card_display_attest_test
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
group do
|
|
@@ -101,10 +102,11 @@ module DaVinciCRDTestKit
|
|
|
101
102
|
end
|
|
102
103
|
|
|
103
104
|
group do
|
|
104
|
-
title 'Verify
|
|
105
|
-
|
|
106
|
-
test from: :
|
|
107
|
-
test from: :
|
|
105
|
+
title 'Verify Authorization'
|
|
106
|
+
test from: :crd_v201_decode_auth_token
|
|
107
|
+
test from: :crd_v201_retrieve_jwks
|
|
108
|
+
test from: :crd_v201_token_header
|
|
109
|
+
test from: :crd_v201_token_payload
|
|
108
110
|
end
|
|
109
111
|
end
|
|
110
112
|
end
|
|
@@ -60,7 +60,9 @@ module DaVinciCRDTestKit
|
|
|
60
60
|
},
|
|
61
61
|
options: {
|
|
62
62
|
hook_name: 'order-select',
|
|
63
|
-
hook_path: ORDER_SELECT_PATH
|
|
63
|
+
hook_path: ORDER_SELECT_PATH,
|
|
64
|
+
crd_interaction_group: 'hooks-order-select',
|
|
65
|
+
include_in_cross_hook_analysis: true
|
|
64
66
|
}
|
|
65
67
|
)
|
|
66
68
|
|
|
@@ -70,11 +72,10 @@ module DaVinciCRDTestKit
|
|
|
70
72
|
end
|
|
71
73
|
|
|
72
74
|
group do
|
|
73
|
-
title 'Verify
|
|
74
|
-
|
|
75
|
-
test from: :
|
|
76
|
-
test from: :
|
|
77
|
-
test from: :crd_v201_token_payload
|
|
75
|
+
title 'Verify Response Handling'
|
|
76
|
+
|
|
77
|
+
test from: :crd_v201_inferno_response_validation
|
|
78
|
+
test from: :crd_v201_card_display_attest_test
|
|
78
79
|
end
|
|
79
80
|
|
|
80
81
|
group do
|
|
@@ -106,10 +107,11 @@ module DaVinciCRDTestKit
|
|
|
106
107
|
end
|
|
107
108
|
|
|
108
109
|
group do
|
|
109
|
-
title 'Verify
|
|
110
|
-
|
|
111
|
-
test from: :
|
|
112
|
-
test from: :
|
|
110
|
+
title 'Verify Authorization'
|
|
111
|
+
test from: :crd_v201_decode_auth_token
|
|
112
|
+
test from: :crd_v201_retrieve_jwks
|
|
113
|
+
test from: :crd_v201_token_header
|
|
114
|
+
test from: :crd_v201_token_payload
|
|
113
115
|
end
|
|
114
116
|
end
|
|
115
117
|
end
|
|
@@ -59,7 +59,9 @@ module DaVinciCRDTestKit
|
|
|
59
59
|
},
|
|
60
60
|
options: {
|
|
61
61
|
hook_name: 'order-sign',
|
|
62
|
-
hook_path: ORDER_SIGN_PATH
|
|
62
|
+
hook_path: ORDER_SIGN_PATH,
|
|
63
|
+
crd_interaction_group: 'hooks-order-sign',
|
|
64
|
+
include_in_cross_hook_analysis: true
|
|
63
65
|
}
|
|
64
66
|
)
|
|
65
67
|
|
|
@@ -69,11 +71,10 @@ module DaVinciCRDTestKit
|
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
group do
|
|
72
|
-
title 'Verify
|
|
73
|
-
|
|
74
|
-
test from: :
|
|
75
|
-
test from: :
|
|
76
|
-
test from: :crd_v201_token_payload
|
|
74
|
+
title 'Verify Response Handling'
|
|
75
|
+
|
|
76
|
+
test from: :crd_v201_inferno_response_validation
|
|
77
|
+
test from: :crd_v201_card_display_attest_test
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
group do
|
|
@@ -103,10 +104,11 @@ module DaVinciCRDTestKit
|
|
|
103
104
|
end
|
|
104
105
|
|
|
105
106
|
group do
|
|
106
|
-
title 'Verify
|
|
107
|
-
|
|
108
|
-
test from: :
|
|
109
|
-
test from: :
|
|
107
|
+
title 'Verify Authorization'
|
|
108
|
+
test from: :crd_v201_decode_auth_token
|
|
109
|
+
test from: :crd_v201_retrieve_jwks
|
|
110
|
+
test from: :crd_v201_token_header
|
|
111
|
+
test from: :crd_v201_token_payload
|
|
110
112
|
end
|
|
111
113
|
end
|
|
112
114
|
end
|
|
@@ -15,7 +15,7 @@ module DaVinciCRDTestKit
|
|
|
15
15
|
id :crd_client
|
|
16
16
|
title 'Da Vinci CRD Client v2.0.1 Test Suite'
|
|
17
17
|
description <<~DESCRIPTION
|
|
18
|
-
The Da Vinci CRD Client Test Suite tests the conformance of
|
|
18
|
+
The Da Vinci CRD Client Test Suite tests the conformance of CRD clients
|
|
19
19
|
to [version 2.0.1 of the Da Vinci Coverage Requirements Discovery (CRD)
|
|
20
20
|
Implementation Guide](https://hl7.org/fhir/us/davinci-crd/STU2).
|
|
21
21
|
|
|
@@ -30,7 +30,7 @@ module DaVinciCRDTestKit
|
|
|
30
30
|
DESCRIPTION
|
|
31
31
|
|
|
32
32
|
suite_summary <<~SUMMARY
|
|
33
|
-
The Da Vinci CRD Client Test Suite tests the conformance of
|
|
33
|
+
The Da Vinci CRD Client Test Suite tests the conformance of CRD clients
|
|
34
34
|
to [version 2.0.1 of the Da Vinci Coverage Requirements Discovery (CRD)
|
|
35
35
|
Implementation Guide](https://hl7.org/fhir/us/davinci-crd/STU2).
|
|
36
36
|
SUMMARY
|