davinci_crd_test_kit 0.14.2 → 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/client_v221_against_inferno_crd_server_suite.json.erb +13 -1
- data/config/presets/server_v221_against_inferno_crd_client_suite.json.erb +1 -1
- data/config/presets/server_v221_against_inferno_crd_client_suite_prefetch_subset.json.erb +1 -1
- 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/endpoints/custom_service_response.rb +25 -10
- 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 +116 -25
- data/lib/davinci_crd_test_kit/client/endpoints/mock_service_response.rb +5 -24
- data/lib/davinci_crd_test_kit/client/endpoints/scenario_service_response.rb +1 -1
- 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 +8 -0
- data/lib/davinci_crd_test_kit/client/v2.0.1/auth/retrieve_jwks_test.rb +1 -1
- 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 +8 -1
- data/lib/davinci_crd_test_kit/client/v2.0.1/cds-services-v201.json +1 -1
- 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 +2 -5
- 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/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_optional_fields_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/client_display_cards_attest.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/inferno_response_validation.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_coverage_info_update_test.rb +9 -9
- 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/client_coverage_based_invocation_attestation_test.rb +10 -10
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_data_element_expectations_attestation_test.rb +7 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_hook_invocation_logging_attestation_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_use_attestation_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_prefetch_key_omission_attestation_test.rb +6 -5
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_resource_identifiers_attestation_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_response_case_distinction_attestation_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_security_and_privacy_attestation_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_workflow_integration_attestation_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/decode_auth_token_test.rb +3 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/retrieve_jwks_test.rb +23 -13
- 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 +25 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-prefetch-subset-v221.json +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-v221.json +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_appointment_book_group.rb +10 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_attestations_group.rb +1 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_group.rb +13 -10
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_interaction_group.rb +12 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_discharge_group.rb +9 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_start_group.rb +9 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_fhir_api_group.rb +25 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_hooks_group.rb +7 -10
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_long_running_hook_group.rb +3 -3
- 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 +9 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_select_group.rb +8 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_sign_group.rb +9 -2
- 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 +10 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_self_pay_hook_group.rb +2 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_unknown_content_hook_group.rb +3 -3
- 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 +7 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_card_must_support_coverage_information_test.rb +4 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_fhirpath_collection_as_comma_delimited_string_test.rb +3 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_hook_instances_unique_test.rb +2 -2
- 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 +59 -29
- 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 +11 -24
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/appointment_book_receive_request_test.rb +9 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/base_hook_invocation_receive_request_test.rb +59 -40
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/cross_hooks_receive_request_test.rb +64 -35
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_discharge_receive_request_test.rb +9 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_start_receive_request_test.rb +9 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_dispatch_receive_request_test.rb +9 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_select_receive_request_test.rb +9 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_sign_receive_request_test.rb +9 -27
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_long_running_receive_request_test.rb +50 -38
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_skip_long_running_attestation_test.rb +11 -11
- 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 +27 -20
- data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_attestation_test.rb +7 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_receive_request_test.rb +38 -33
- 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 +63 -6
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_coverage_verification_test.rb +23 -73
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_data_fetch_verification_test.rb +12 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb +7 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb +11 -13
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_profiles_test.rb +2 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_requested_version_test.rb +16 -4
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_secured_transport_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/client_display_cards_attest.rb +8 -8
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/hook_response_support_coverage_information_test.rb +3 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/inferno_response_validation.rb +8 -9
- data/lib/davinci_crd_test_kit/cross_suite/base_urls.rb +12 -0
- data/lib/davinci_crd_test_kit/cross_suite/cards_identification.rb +9 -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 +17 -9
- 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/profile_metadata.rb +75 -0
- data/lib/davinci_crd_test_kit/cross_suite/requests_logical_model_validation.rb +19 -9
- data/lib/davinci_crd_test_kit/cross_suite/resource_identity.rb +183 -0
- data/lib/davinci_crd_test_kit/cross_suite/short_circuit_interaction.rb +28 -0
- data/lib/davinci_crd_test_kit/cross_suite/tags.rb +15 -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/davinci_crd_test_kit_requirements.csv +3 -2
- data/lib/davinci_crd_test_kit/requirements/generated/crd_client_requirements_coverage.csv +1 -1
- data/lib/davinci_crd_test_kit/requirements/generated/crd_client_v221_requirements_coverage.csv +90 -89
- 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.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 +1 -1
- 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_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 +100 -12
- data/lib/davinci_crd_test_kit/client/endpoints/gather_response_generation_data.rb +0 -413
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_authorized_scope_attestation_test.rb +0 -45
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_exposure_attestation_test.rb +0 -43
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_order_sign_support_attestation_test.rb +0 -42
- data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_no_request_test.rb +0 -30
- data/lib/davinci_crd_test_kit/server/resource_extractor.rb +0 -68
|
@@ -4,22 +4,22 @@ module DaVinciCRDTestKit
|
|
|
4
4
|
module V221
|
|
5
5
|
class ResourceIdentifiersAttestationTest < Inferno::Test
|
|
6
6
|
id :crd_v221_resource_identifiers_attestation
|
|
7
|
-
ATTESTATION_TITLE = '
|
|
7
|
+
ATTESTATION_TITLE = 'CRD client does not use business identifiers in resource identifiers'.freeze
|
|
8
8
|
title ATTESTATION_TITLE
|
|
9
9
|
description %(
|
|
10
|
-
During this test, the tester will confirm that the
|
|
10
|
+
During this test, the tester will confirm that the CRD client does not expose resource identifiers
|
|
11
11
|
that have a determinable relationship with business identifiers.
|
|
12
12
|
To see the specifics of the attested requirements, click the "View Specification Requirements" link for this
|
|
13
13
|
test.
|
|
14
14
|
)
|
|
15
|
-
|
|
15
|
+
flag_as_attestation
|
|
16
16
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@sec-7'
|
|
17
17
|
input_instructions ATTESTATION_INPUT_INSTRUCTIONS
|
|
18
18
|
|
|
19
19
|
input :resource_identifiers_attestation,
|
|
20
20
|
title: ATTESTATION_TITLE,
|
|
21
21
|
description: %(
|
|
22
|
-
I attest that the
|
|
22
|
+
I attest that the CRD client does not expose resource identifiers that have a determinable
|
|
23
23
|
relationship with business identifiers.
|
|
24
24
|
),
|
|
25
25
|
type: 'radio',
|
|
@@ -4,22 +4,22 @@ module DaVinciCRDTestKit
|
|
|
4
4
|
module V221
|
|
5
5
|
class ResponseCaseDistinctionAttestationTest < Inferno::Test
|
|
6
6
|
id :crd_v221_response_case_distinction_attestation
|
|
7
|
-
ATTESTATION_TITLE = '
|
|
7
|
+
ATTESTATION_TITLE = 'CRD client distinguishes different response cases to users'.freeze
|
|
8
8
|
title ATTESTATION_TITLE
|
|
9
9
|
description %(
|
|
10
|
-
During this test, the tester will confirm that the
|
|
10
|
+
During this test, the tester will confirm that the CRD client distinguishes the different CRD
|
|
11
11
|
response cases when presenting results to users.
|
|
12
12
|
To see the specifics of the attested requirements, click the "View Specification Requirements" link for this
|
|
13
13
|
test.
|
|
14
14
|
)
|
|
15
|
-
|
|
15
|
+
flag_as_attestation
|
|
16
16
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@impl-1'
|
|
17
17
|
input_instructions ATTESTATION_INPUT_INSTRUCTIONS
|
|
18
18
|
|
|
19
19
|
input :response_case_distinction_attestation,
|
|
20
20
|
title: ATTESTATION_TITLE,
|
|
21
21
|
description: %(
|
|
22
|
-
I attest that the
|
|
22
|
+
I attest that the CRD client distinguishes the different CRD response cases when presenting
|
|
23
23
|
results to users.
|
|
24
24
|
),
|
|
25
25
|
type: 'radio',
|
|
@@ -4,22 +4,22 @@ module DaVinciCRDTestKit
|
|
|
4
4
|
module V221
|
|
5
5
|
class SecurityAndPrivacyAttestationTest < Inferno::Test
|
|
6
6
|
id :crd_v221_security_and_privacy_attestation
|
|
7
|
-
ATTESTATION_TITLE = '
|
|
7
|
+
ATTESTATION_TITLE = 'CRD client adheres to security and privacy requirements'.freeze
|
|
8
8
|
title ATTESTATION_TITLE
|
|
9
9
|
description %(
|
|
10
|
-
During this test, the tester will confirm that the
|
|
10
|
+
During this test, the tester will confirm that the CRD client adheres to the security and privacy
|
|
11
11
|
rules that CRD inherits from the specifications it builds on.
|
|
12
12
|
To see the specifics of the attested requirements, click the "View Specification Requirements" link for this
|
|
13
13
|
test.
|
|
14
14
|
)
|
|
15
|
-
|
|
15
|
+
flag_as_attestation
|
|
16
16
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@sec-1'
|
|
17
17
|
input_instructions ATTESTATION_INPUT_INSTRUCTIONS
|
|
18
18
|
|
|
19
19
|
input :security_and_privacy_attestation,
|
|
20
20
|
title: ATTESTATION_TITLE,
|
|
21
21
|
description: %(
|
|
22
|
-
I attest that the
|
|
22
|
+
I attest that the CRD client adheres to the security and privacy rules that CRD inherits from
|
|
23
23
|
the specifications it builds on.
|
|
24
24
|
),
|
|
25
25
|
type: 'radio',
|
|
@@ -4,15 +4,15 @@ module DaVinciCRDTestKit
|
|
|
4
4
|
module V221
|
|
5
5
|
class WorkflowIntegrationAttestationTest < Inferno::Test
|
|
6
6
|
id :crd_v221_workflow_integration_attestation
|
|
7
|
-
ATTESTATION_TITLE = '
|
|
7
|
+
ATTESTATION_TITLE = 'CRD client integrates hook invocations transparently into user workflows'.freeze
|
|
8
8
|
title ATTESTATION_TITLE
|
|
9
9
|
description %(
|
|
10
|
-
During this test, the tester will confirm that the
|
|
10
|
+
During this test, the tester will confirm that the CRD client integrates CRD hook invocations
|
|
11
11
|
transparently into the regular user workflow.
|
|
12
12
|
To see the specifics of the attested requirements, click the "View Specification Requirements" link for this
|
|
13
13
|
test.
|
|
14
14
|
)
|
|
15
|
-
|
|
15
|
+
flag_as_attestation
|
|
16
16
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-7', 'hl7.fhir.us.davinci-crd_2.2.1@hook-8',
|
|
17
17
|
'hl7.fhir.us.davinci-crd_2.2.1@resp-48'
|
|
18
18
|
input_instructions ATTESTATION_INPUT_INSTRUCTIONS
|
|
@@ -20,7 +20,7 @@ module DaVinciCRDTestKit
|
|
|
20
20
|
input :workflow_integration_attestation,
|
|
21
21
|
title: ATTESTATION_TITLE,
|
|
22
22
|
description: %(
|
|
23
|
-
I attest that the
|
|
23
|
+
I attest that the CRD client integrates CRD hook invocations transparently into the regular
|
|
24
24
|
user workflow.
|
|
25
25
|
),
|
|
26
26
|
type: 'radio',
|
|
@@ -8,7 +8,7 @@ module DaVinciCRDTestKit
|
|
|
8
8
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
9
9
|
|
|
10
10
|
id :crd_v221_decode_auth_token
|
|
11
|
-
title '
|
|
11
|
+
title 'Authorization tokens can be decoded as JWTs'
|
|
12
12
|
description %(
|
|
13
13
|
During this test, Inferno will verify that for each request the Bearer token is a properly constructed JWT.
|
|
14
14
|
As per the [CDS hooks specification](https://cds-hooks.hl7.org/2026Jan/en/#trusting-cds-clients),
|
|
@@ -22,6 +22,8 @@ module DaVinciCRDTestKit
|
|
|
22
22
|
|
|
23
23
|
run do
|
|
24
24
|
load_interaction_group_requests
|
|
25
|
+
# replace any outputs from an earlier run so that later tests skip rather than reuse stale tokens
|
|
26
|
+
output auth_tokens: '[]', auth_token_payloads_json: '[]', auth_token_headers_json: '[]'
|
|
25
27
|
skip_if requests.empty?, "No #{hook_name} requests were made in a previous test as expected."
|
|
26
28
|
auth_tokens = []
|
|
27
29
|
auth_token_payloads_json = []
|
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
require_relative '../../multi_request_message_helper'
|
|
2
|
+
require_relative '../../../cross_suite/short_circuit_interaction'
|
|
2
3
|
|
|
3
4
|
module DaVinciCRDTestKit
|
|
4
5
|
module V221
|
|
5
6
|
class RetrieveJWKSTest < Inferno::Test
|
|
6
7
|
include DaVinciCRDTestKit::MultiRequestMessageHelper
|
|
8
|
+
include DaVinciCRDTestKit::ShortCircuitInteraction
|
|
7
9
|
|
|
8
10
|
id :crd_v221_retrieve_jwks
|
|
9
|
-
title '
|
|
11
|
+
title 'CRD client JWKS can be retrieved'
|
|
10
12
|
description %(
|
|
11
|
-
During this test, Inferno will verify that for each request the JWKS can be retrieved
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
During this test, Inferno will verify that for each request the CRD client's JWKS can be retrieved
|
|
14
|
+
from the URL in the `jku` field of the JWT header, when present. If the JWT header has no `jku`
|
|
15
|
+
field, Inferno uses the JWKS provided in the "Registration" group instead, either retrieving it
|
|
16
|
+
from the provided URL or reading the raw JWKS JSON. The keys in the JWKS are then saved as an output
|
|
17
|
+
for use in subsequent tests.
|
|
16
18
|
)
|
|
17
19
|
|
|
18
20
|
verifies_requirements 'cds-hooks_3.0.0-ballot@183', 'cds-hooks_3.0.0-ballot@185', 'cds-hooks_3.0.0-ballot@197',
|
|
19
21
|
'cds-hooks_3.0.0-ballot@199'
|
|
20
22
|
|
|
21
|
-
input
|
|
23
|
+
# Optional so that a group whose requests were declined can pass rather than skip on an input
|
|
24
|
+
# the short circuited test before it never produced. The run block still skips when empty.
|
|
25
|
+
# The default only pre-fills the UI, so a missing value still arrives as nil.
|
|
26
|
+
input :auth_token_headers_json, optional: true, default: '[]'
|
|
22
27
|
input :cds_jwk_set,
|
|
23
28
|
title: 'CRD JSON Web Key Set (JWKS)',
|
|
24
29
|
type: 'textarea',
|
|
25
30
|
description: %(
|
|
26
|
-
The client's registered JWK Set, provided during the "Registration" group, containing
|
|
27
|
-
|
|
28
|
-
header. May be either a publicly accessible
|
|
31
|
+
The CRD client's registered JWK Set, provided during the "Registration" group, containing
|
|
32
|
+
its public key. Used only when a request was received with a JWT without the `jku`
|
|
33
|
+
header. May be either a publicly accessible URL containing the JWKS, or the raw JWKS
|
|
29
34
|
JSON. Run or re-run the "Registration" group to set or change this value.
|
|
30
35
|
),
|
|
31
36
|
locked: true,
|
|
@@ -33,10 +38,15 @@ module DaVinciCRDTestKit
|
|
|
33
38
|
output :crd_jwks_keys_json
|
|
34
39
|
|
|
35
40
|
run do
|
|
36
|
-
|
|
41
|
+
check_for_short_circuit
|
|
42
|
+
|
|
43
|
+
# replace any output from an earlier run so that later tests skip rather than reuse stale keys
|
|
44
|
+
output crd_jwks_keys_json: '[]'
|
|
45
|
+
auth_token_headers = JSON.parse(auth_token_headers_json.presence || '[]') # NOTE: pre-verified json
|
|
37
46
|
skip_if auth_token_headers.compact.empty?, 'No Authorization tokens produced from the previous test.'
|
|
38
47
|
skip_if cds_jwk_set.blank? && cds_jwk_set_input_needed?(auth_token_headers),
|
|
39
|
-
|
|
48
|
+
'A request JWT has no `jku` header, so the CRD client\'s JWKS must be provided in the ' \
|
|
49
|
+
'**CRD JSON Web Key Set (JWKS)** input. Re-run the "Registration" group to provide it.'
|
|
40
50
|
|
|
41
51
|
crd_jwks_keys_json = []
|
|
42
52
|
auth_token_headers.each_with_index do |token_header, index|
|
|
@@ -87,7 +97,7 @@ module DaVinciCRDTestKit
|
|
|
87
97
|
|
|
88
98
|
kid_uniqueness = keys.map { |key| key['kid'] }.uniq.length == keys.length
|
|
89
99
|
if kid_uniqueness.blank?
|
|
90
|
-
add_request_message('error', "`kid` must be unique within the client's JWK Set.", index)
|
|
100
|
+
add_request_message('error', "`kid` must be unique within the CRD client's JWK Set.", index)
|
|
91
101
|
crd_jwks_keys_json << nil
|
|
92
102
|
next
|
|
93
103
|
end
|
|
@@ -1,29 +1,43 @@
|
|
|
1
1
|
require_relative '../../multi_request_message_helper'
|
|
2
|
+
require_relative '../../../cross_suite/short_circuit_interaction'
|
|
2
3
|
|
|
3
4
|
module DaVinciCRDTestKit
|
|
4
5
|
module V221
|
|
5
6
|
class TokenHeaderTest < Inferno::Test
|
|
6
7
|
include DaVinciCRDTestKit::MultiRequestMessageHelper
|
|
8
|
+
include DaVinciCRDTestKit::ShortCircuitInteraction
|
|
7
9
|
|
|
8
10
|
id :crd_v221_token_header
|
|
9
11
|
title 'Authorization token headers contain required information'
|
|
10
12
|
description %(
|
|
11
13
|
During this test, Inferno will verify that for each request the JWT header is conformant to the
|
|
12
|
-
requirements in the [CDS
|
|
14
|
+
requirements in the [CDS Hooks specification](https://cds-hooks.hl7.org/2026Jan/en/#trusting-cds-clients),
|
|
13
15
|
including the following:
|
|
14
16
|
- The `alg`, `kid`, and `typ` fields are required.
|
|
17
|
+
- The `alg` and `kid` fields must be strings.
|
|
18
|
+
- The `alg` field must not be `none`.
|
|
15
19
|
- The `typ` field must be "JWT".
|
|
16
|
-
- The
|
|
20
|
+
- The JWKS retrieved for the request in the previous test must contain a key whose `kid` matches
|
|
21
|
+
the header's `kid`. That key is used to verify the token's signature in the next test.
|
|
17
22
|
)
|
|
18
23
|
|
|
19
|
-
verifies_requirements 'cds-hooks_3.0.0-ballot@
|
|
24
|
+
verifies_requirements 'cds-hooks_3.0.0-ballot@181', 'cds-hooks_3.0.0-ballot@182', 'cds-hooks_3.0.0-ballot@184',
|
|
25
|
+
'cds-hooks_3.0.0-ballot@202'
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
# Optional so that a group whose requests were declined can pass rather than skip on inputs
|
|
28
|
+
# the short circuited tests before it never produced. The run block still skips when empty.
|
|
29
|
+
# The defaults only pre-fill the UI, so a missing value still arrives as nil.
|
|
30
|
+
input :auth_token_headers_json, optional: true, default: '[]'
|
|
31
|
+
input :crd_jwks_keys_json, optional: true, default: '[]'
|
|
22
32
|
output :auth_tokens_jwk_json
|
|
23
33
|
|
|
24
34
|
run do
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
check_for_short_circuit
|
|
36
|
+
|
|
37
|
+
# replace any output from an earlier run so that later tests skip rather than reuse stale keys
|
|
38
|
+
output auth_tokens_jwk_json: '[]'
|
|
39
|
+
auth_token_headers = JSON.parse(auth_token_headers_json.presence || '[]')
|
|
40
|
+
crd_jwks_keys = JSON.parse(crd_jwks_keys_json.presence || '[]')
|
|
27
41
|
skip_if auth_token_headers.compact.empty?, 'No Authorization tokens produced from the previous tests.'
|
|
28
42
|
skip_if crd_jwks_keys.compact.empty?, 'No JWKS keys produced from the previous test.'
|
|
29
43
|
|
|
@@ -43,6 +57,12 @@ module DaVinciCRDTestKit
|
|
|
43
57
|
next
|
|
44
58
|
end
|
|
45
59
|
|
|
60
|
+
unless algorithm.is_a?(String)
|
|
61
|
+
add_request_message('error', "Token header `alg` field must be a string, got #{algorithm.to_json}", index)
|
|
62
|
+
auth_tokens_jwk_json << nil
|
|
63
|
+
next
|
|
64
|
+
end
|
|
65
|
+
|
|
46
66
|
if algorithm == 'none'
|
|
47
67
|
add_request_message('error', 'Token header `alg` field cannot be set to none', index)
|
|
48
68
|
auth_tokens_jwk_json << nil
|
|
@@ -64,6 +84,12 @@ module DaVinciCRDTestKit
|
|
|
64
84
|
end
|
|
65
85
|
|
|
66
86
|
kid = header['kid']
|
|
87
|
+
unless kid.is_a?(String)
|
|
88
|
+
add_request_message('error', "Token header `kid` field must be a string, got #{kid.to_json}", index)
|
|
89
|
+
auth_tokens_jwk_json << nil
|
|
90
|
+
next
|
|
91
|
+
end
|
|
92
|
+
|
|
67
93
|
if crd_jwks_keys[index].nil?
|
|
68
94
|
add_request_message('error', 'No JWKS keys available for this request', index)
|
|
69
95
|
auth_tokens_jwk_json << nil
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
require_relative '../../multi_request_message_helper'
|
|
2
2
|
require_relative '../../tagged_request_load_helper'
|
|
3
|
+
require_relative '../../jwt_claim_types'
|
|
3
4
|
|
|
4
5
|
module DaVinciCRDTestKit
|
|
5
6
|
module V221
|
|
6
7
|
class TokenPayloadTest < Inferno::Test
|
|
7
8
|
include DaVinciCRDTestKit::MultiRequestMessageHelper
|
|
8
9
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
10
|
+
include DaVinciCRDTestKit::JwtClaimTypes
|
|
9
11
|
include ClientURLs
|
|
10
12
|
|
|
11
13
|
id :crd_v221_token_payload
|
|
12
14
|
title 'Authorization token payloads have required claims and valid signatures'
|
|
13
15
|
description %(
|
|
14
|
-
During this test, Inferno will verify that for each request the JWT
|
|
15
|
-
requirements in the [CDS
|
|
16
|
+
During this test, Inferno will verify that for each request the JWT is signed and its payload is
|
|
17
|
+
conformant to the requirements in the [CDS Hooks specification](https://cds-hooks.hl7.org/2026Jan/en/#trusting-cds-clients),
|
|
16
18
|
including the following:
|
|
19
|
+
- The JWT signature must be valid when verified using the key from the CRD client's JWKS
|
|
20
|
+
identified by the `kid` header in the previous test.
|
|
21
|
+
- The signing algorithm, taken from the key's `alg` or, if absent, the JWT header's `alg`, must not
|
|
22
|
+
be `none` or a symmetric (HMAC) algorithm such as `HS256`.
|
|
17
23
|
- The `iss`, `aud`, `exp`, `iat`, and `jti` claims are required.
|
|
18
|
-
- `iss` must
|
|
24
|
+
- `iss` must equal the value of the **CRD JWT Issuer** input.
|
|
19
25
|
- `aud` must match the URL of the CDS Service endpoint being invoked.
|
|
20
|
-
- `exp` must represent a time in the future.
|
|
21
|
-
- `jti` must be a non-blank string
|
|
26
|
+
- `exp` must represent a time in the future (allowing 60 seconds of clock skew).
|
|
27
|
+
- `jti` must be a non-blank string.
|
|
28
|
+
- `iss` and `jti` must be strings, `aud` a string or an array of strings, and `exp` and `iat` numbers.
|
|
22
29
|
)
|
|
23
30
|
|
|
24
|
-
verifies_requirements 'cds-hooks_3.0.0-ballot@180', 'cds-hooks_3.0.0-ballot@
|
|
31
|
+
verifies_requirements 'cds-hooks_3.0.0-ballot@180', 'cds-hooks_3.0.0-ballot@187',
|
|
25
32
|
'cds-hooks_3.0.0-ballot@189', 'cds-hooks_3.0.0-ballot@190', 'cds-hooks_3.0.0-ballot@191',
|
|
26
33
|
'cds-hooks_3.0.0-ballot@192', 'cds-hooks_3.0.0-ballot@196', 'cds-hooks_3.0.0-ballot@203'
|
|
27
34
|
|
|
@@ -38,13 +45,18 @@ module DaVinciCRDTestKit
|
|
|
38
45
|
inferno_base_url + hook_suffix
|
|
39
46
|
end
|
|
40
47
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
# Optional so that a group whose requests were declined can pass rather than skip on inputs
|
|
49
|
+
# the short circuited tests before it never produced. The run block still skips when empty.
|
|
50
|
+
# The defaults only pre-fill the UI, so a missing value still arrives as nil.
|
|
51
|
+
input :auth_tokens, optional: true, default: '[]'
|
|
52
|
+
input :auth_tokens_jwk_json, optional: true, default: '[]'
|
|
53
|
+
input :cds_jwt_iss
|
|
44
54
|
|
|
45
55
|
run do
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
check_for_short_circuit
|
|
57
|
+
|
|
58
|
+
auth_tokens_list = JSON.parse(auth_tokens.presence || '[]')
|
|
59
|
+
auth_tokens_jwk = JSON.parse(auth_tokens_jwk_json.presence || '[]')
|
|
48
60
|
requests = load_interaction_group_requests
|
|
49
61
|
skip_if auth_tokens_list.compact.empty?, 'No Authorization tokens produced from the previous tests.'
|
|
50
62
|
skip_if auth_tokens_jwk.compact.empty?, 'No Authorization token JWK produced from the previous test.'
|
|
@@ -92,6 +104,8 @@ module DaVinciCRDTestKit
|
|
|
92
104
|
add_request_message('error', "Token validation error: #{e.message}", index)
|
|
93
105
|
end
|
|
94
106
|
|
|
107
|
+
jwt_claim_type_errors(unverified_payload).each { |message| add_request_message('error', message, index) }
|
|
108
|
+
|
|
95
109
|
missing_claims = required_claims - unverified_payload.keys
|
|
96
110
|
next if missing_claims.empty?
|
|
97
111
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"hook": "appointment-book",
|
|
6
6
|
"title": "Appointment Booking CDS Service",
|
|
7
|
-
"description": "A simulated CDS Service requesting a subset of the standard prefetches that is invoked when user
|
|
7
|
+
"description": "A simulated CDS Service requesting a subset of the standard prefetches that is invoked when user books a future appointment for a patient",
|
|
8
8
|
"id": "appointment-book-subset",
|
|
9
9
|
"prefetch" : {
|
|
10
10
|
"pat": "Patient/{{context.patientId}}",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"hook": "appointment-book",
|
|
6
6
|
"title": "Appointment Booking CDS Service",
|
|
7
|
-
"description": "A simulated CDS Service that is invoked when user
|
|
7
|
+
"description": "A simulated 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
|
"patient": "Patient/{{context.patientId}}",
|
|
@@ -24,7 +24,7 @@ module DaVinciCRDTestKit
|
|
|
24
24
|
description <<~DESCRIPTION
|
|
25
25
|
The [appointment-book](https://cds-hooks.hl7.org/hooks/STU1/appointment-book.html) hook is invoked when
|
|
26
26
|
the user is scheduling one or more future encounters/visits for the patient.
|
|
27
|
-
The CRD IG places [additional constraints on the use of the
|
|
27
|
+
The CRD IG places [additional constraints on the use of the appointment-book hook](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#appointment-book),
|
|
28
28
|
including the profiles that resources in each request must conform to.
|
|
29
29
|
|
|
30
30
|
Inferno's simulated `appointment-book` hook endpoints are available at:
|
|
@@ -47,7 +47,7 @@ module DaVinciCRDTestKit
|
|
|
47
47
|
client_access_token: { name: :appointment_book_client_access_token },
|
|
48
48
|
client_fhir_server: { name: :appointment_book_client_fhir_server },
|
|
49
49
|
crd_jwks_keys_json: { name: :appointment_book_crd_jwks_keys_json },
|
|
50
|
-
|
|
50
|
+
response_approach: { name: :appointment_book_response_approach },
|
|
51
51
|
selected_response_types: { name: :appointment_book_selected_response_types }
|
|
52
52
|
},
|
|
53
53
|
outputs: {
|
|
@@ -68,22 +68,27 @@ module DaVinciCRDTestKit
|
|
|
68
68
|
|
|
69
69
|
group do
|
|
70
70
|
title 'Interaction'
|
|
71
|
+
id :crd_v221_appointment_book_interaction
|
|
72
|
+
|
|
71
73
|
test from: :crd_v221_appointment_book_request
|
|
72
74
|
end
|
|
73
75
|
|
|
74
76
|
group do
|
|
75
77
|
title 'Response Handling'
|
|
78
|
+
id :crd_v221_appointment_book_responses
|
|
76
79
|
|
|
77
80
|
test from: :crd_v221_card_display_attest_test
|
|
78
81
|
test from: :crd_v221_inferno_response_validation
|
|
79
82
|
test from: :crd_v221_client_hook_response_support_coverage_information do
|
|
80
|
-
title '
|
|
83
|
+
title 'CRD client supports the Coverage Information response type on the appointment-book hook'
|
|
81
84
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-26'
|
|
82
85
|
end
|
|
83
86
|
end
|
|
84
87
|
|
|
85
88
|
group do
|
|
86
89
|
title 'Requests'
|
|
90
|
+
id :crd_v221_appointment_book_requests
|
|
91
|
+
|
|
87
92
|
test from: :crd_v221_hook_request_conformance do
|
|
88
93
|
verifies_requirements(*HookRequestConformanceTest.verifies_requirements,
|
|
89
94
|
'hl7.fhir.us.davinci-crd_2.2.1@hook-24',
|
|
@@ -101,6 +106,8 @@ module DaVinciCRDTestKit
|
|
|
101
106
|
|
|
102
107
|
group do
|
|
103
108
|
title 'Authorization'
|
|
109
|
+
id :crd_v221_appointment_book_auth
|
|
110
|
+
|
|
104
111
|
test from: :crd_v221_decode_auth_token
|
|
105
112
|
test from: :crd_v221_retrieve_jwks
|
|
106
113
|
test from: :crd_v221_token_header
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
require_relative 'attestations/attestation_instructions'
|
|
2
|
-
require_relative 'attestations/client_authorized_scope_attestation_test'
|
|
3
2
|
require_relative 'attestations/client_coverage_based_invocation_attestation_test'
|
|
4
3
|
require_relative 'attestations/client_data_element_expectations_attestation_test'
|
|
5
4
|
require_relative 'attestations/client_hook_invocation_logging_attestation_test'
|
|
6
|
-
require_relative 'attestations/client_must_support_exposure_attestation_test'
|
|
7
5
|
require_relative 'attestations/client_must_support_use_attestation_test'
|
|
8
|
-
require_relative 'attestations/client_order_sign_support_attestation_test'
|
|
9
6
|
require_relative 'attestations/client_prefetch_key_omission_attestation_test'
|
|
10
7
|
require_relative 'attestations/client_resource_identifiers_attestation_test'
|
|
11
8
|
require_relative 'attestations/client_response_case_distinction_attestation_test'
|
|
@@ -21,7 +18,7 @@ module DaVinciCRDTestKit
|
|
|
21
18
|
Each test in this group asks the tester to confirm system conformance to one or more
|
|
22
19
|
**SHALL** requirements from the [CRD v2.2.1 Implementation Guide](https://hl7.org/fhir/us/davinci-crd/2.2.1)
|
|
23
20
|
or the [CDS Hooks specification](https://cds-hooks.hl7.org/2026Jan/en/).
|
|
24
|
-
The tester attests that the client
|
|
21
|
+
The tester attests that the CRD client meets the statement by selecting "Yes",
|
|
25
22
|
and may record supporting details in the accompanying notes field. Selecting "No" fails the
|
|
26
23
|
test. Notes provided are recorded in the test result.
|
|
27
24
|
|
|
@@ -36,13 +33,10 @@ module DaVinciCRDTestKit
|
|
|
36
33
|
test from: :crd_v221_response_case_distinction_attestation
|
|
37
34
|
test from: :crd_v221_data_element_expectations_attestation
|
|
38
35
|
test from: :crd_v221_resource_identifiers_attestation
|
|
39
|
-
test from: :crd_v221_must_support_exposure_attestation
|
|
40
36
|
test from: :crd_v221_workflow_integration_attestation
|
|
41
37
|
test from: :crd_v221_coverage_based_invocation_attestation
|
|
42
38
|
test from: :crd_v221_prefetch_key_omission_attestation
|
|
43
39
|
test from: :crd_v221_hook_invocation_logging_attestation
|
|
44
|
-
test from: :crd_v221_order_sign_support_attestation
|
|
45
|
-
test from: :crd_v221_authorized_scope_attestation
|
|
46
40
|
test from: :crd_v221_must_support_use_attestation
|
|
47
41
|
end
|
|
48
42
|
end
|
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'must_support/generated/client_cross_hook_must_support_group'
|
|
2
2
|
require_relative 'cross_hook/client_location_address_propagation_test'
|
|
3
3
|
require_relative 'cross_hook/client_fhirpath_collection_as_comma_delimited_string_test'
|
|
4
4
|
require_relative 'cross_hook/client_hook_instances_unique_test'
|
|
5
|
+
require_relative 'cross_hook/client_jwt_ids_unique_test'
|
|
5
6
|
require_relative 'cross_hook/client_prefetch_complete_and_subset_test'
|
|
6
7
|
require_relative 'client_cross_hook_interaction_group'
|
|
7
8
|
|
|
8
9
|
module DaVinciCRDTestKit
|
|
9
10
|
module V221
|
|
10
11
|
class ClientCrossHookGroup < Inferno::TestGroup
|
|
11
|
-
title 'Cross
|
|
12
|
+
title 'Cross-Invocation Requirements'
|
|
12
13
|
id :crd_v221_client_cross_hook
|
|
13
14
|
description <<~DESCRIPTION
|
|
14
15
|
This group checks CRD requirements that pertain across all hooks
|
|
15
16
|
and hook requests rather than specific ones.
|
|
16
17
|
|
|
17
18
|
These tests must be run after the tests in the "Hooks" group are run.
|
|
18
|
-
|
|
19
|
+
The CRD client may, but is not required to, make additional hook requests
|
|
19
20
|
during these tests to show additional features not demonstrated during
|
|
20
21
|
previous hook requests. Note that only the requests made during the
|
|
21
22
|
most recent execution of a given group will be included in the analysis.
|
|
22
23
|
DESCRIPTION
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
input_order :make_additional_hook_requests,
|
|
26
|
+
:cross_hooks_response_approach,
|
|
27
|
+
:cross_hooks_selected_response_types,
|
|
28
|
+
:cross_hooks_custom_response_template,
|
|
29
|
+
:order_types_supported,
|
|
30
|
+
:supporting_types_supported
|
|
25
31
|
|
|
26
32
|
group from: :crd_v221_client_cross_hook_interaction
|
|
27
|
-
group
|
|
28
|
-
id :crd_v221_client_cross_hook_must_support
|
|
29
|
-
title 'Must Support'
|
|
30
|
-
|
|
31
|
-
test from: :crd_v221_client_card_must_support_coverage_information
|
|
32
|
-
end
|
|
33
|
+
group from: :crd_v221_client_cross_hook_must_support
|
|
33
34
|
group do
|
|
34
35
|
id :crd_v221_client_cross_hook_additional_capabilities
|
|
35
36
|
title 'Additional Capabilities'
|
|
37
|
+
run_as_group
|
|
36
38
|
|
|
37
39
|
test from: :crd_v221_client_location_address_propagation
|
|
38
40
|
test from: :crd_v221_client_fhir_path_collection_as_comma_delimited_string
|
|
39
41
|
test from: :crd_v221_client_hook_instances_unique
|
|
40
42
|
test from: :crd_v221_client_prefetch_complete_and_subset
|
|
43
|
+
test from: :crd_v221_client_jwt_ids_unique
|
|
41
44
|
end
|
|
42
45
|
end
|
|
43
46
|
end
|
|
@@ -19,10 +19,10 @@ require_relative 'client_urls'
|
|
|
19
19
|
module DaVinciCRDTestKit
|
|
20
20
|
module V221
|
|
21
21
|
class ClientCrossHookInteractionGroup < Inferno::TestGroup
|
|
22
|
-
title 'Additional Hook Invocations
|
|
22
|
+
title 'Additional Hook Invocations'
|
|
23
23
|
id :crd_v221_client_cross_hook_interaction
|
|
24
24
|
description <<~DESCRIPTION
|
|
25
|
-
Optionally send more hook requests demonstrating additional cross-
|
|
25
|
+
Optionally send more hook requests demonstrating additional cross-invocation
|
|
26
26
|
features.
|
|
27
27
|
|
|
28
28
|
Inferno's simulated hook endpoints can be discovered at:
|
|
@@ -31,7 +31,8 @@ module DaVinciCRDTestKit
|
|
|
31
31
|
DESCRIPTION
|
|
32
32
|
run_as_group
|
|
33
33
|
|
|
34
|
-
input_order :
|
|
34
|
+
input_order :make_additional_hook_requests,
|
|
35
|
+
:cross_hooks_response_approach,
|
|
35
36
|
:cross_hooks_selected_response_types,
|
|
36
37
|
:cross_hooks_custom_response_template
|
|
37
38
|
|
|
@@ -43,7 +44,7 @@ module DaVinciCRDTestKit
|
|
|
43
44
|
client_access_token: { name: :cross_hooks_client_access_token },
|
|
44
45
|
client_fhir_server: { name: :cross_hooks_client_fhir_server },
|
|
45
46
|
crd_jwks_keys_json: { name: :cross_hooks_crd_jwks_keys_json },
|
|
46
|
-
|
|
47
|
+
response_approach: { name: :cross_hooks_response_approach },
|
|
47
48
|
selected_response_types: { name: :cross_hooks_selected_response_types }
|
|
48
49
|
},
|
|
49
50
|
outputs: {
|
|
@@ -64,11 +65,14 @@ module DaVinciCRDTestKit
|
|
|
64
65
|
|
|
65
66
|
group do
|
|
66
67
|
title 'Interaction'
|
|
68
|
+
id :crd_v221_cross_hook_interaction
|
|
69
|
+
|
|
67
70
|
test from: :crd_v221_cross_hooks_request
|
|
68
71
|
end
|
|
69
72
|
|
|
70
73
|
group do
|
|
71
74
|
title 'Response Handling'
|
|
75
|
+
id :crd_v221_cross_hook_responses
|
|
72
76
|
|
|
73
77
|
test from: :crd_v221_card_display_attest_test
|
|
74
78
|
test from: :crd_v221_inferno_response_validation
|
|
@@ -76,6 +80,8 @@ module DaVinciCRDTestKit
|
|
|
76
80
|
|
|
77
81
|
group do
|
|
78
82
|
title 'Requests'
|
|
83
|
+
id :crd_v221_cross_hook_requests
|
|
84
|
+
|
|
79
85
|
test from: :crd_v221_hook_request_conformance
|
|
80
86
|
test from: :crd_v221_hook_request_requested_version
|
|
81
87
|
test from: :crd_v221_hook_request_prefetch_profiles
|
|
@@ -88,6 +94,8 @@ module DaVinciCRDTestKit
|
|
|
88
94
|
|
|
89
95
|
group do
|
|
90
96
|
title 'Authorization'
|
|
97
|
+
id :crd_v221_cross_hook_auth
|
|
98
|
+
|
|
91
99
|
test from: :crd_v221_decode_auth_token
|
|
92
100
|
test from: :crd_v221_retrieve_jwks
|
|
93
101
|
test from: :crd_v221_token_header
|
|
@@ -46,7 +46,7 @@ module DaVinciCRDTestKit
|
|
|
46
46
|
client_access_token: { name: :encounter_discharge_client_access_token },
|
|
47
47
|
client_fhir_server: { name: :encounter_discharge_client_fhir_server },
|
|
48
48
|
crd_jwks_keys_json: { name: :encounter_discharge_crd_jwks_keys_json },
|
|
49
|
-
|
|
49
|
+
response_approach: { name: :encounter_discharge_response_approach },
|
|
50
50
|
selected_response_types: { name: :encounter_discharge_selected_response_types }
|
|
51
51
|
},
|
|
52
52
|
outputs: {
|
|
@@ -67,11 +67,14 @@ module DaVinciCRDTestKit
|
|
|
67
67
|
|
|
68
68
|
group do
|
|
69
69
|
title 'Interaction'
|
|
70
|
+
id :crd_v221_encounter_discharge_interaction
|
|
71
|
+
|
|
70
72
|
test from: :crd_v221_encounter_discharge_request
|
|
71
73
|
end
|
|
72
74
|
|
|
73
75
|
group do
|
|
74
76
|
title 'Response Handling'
|
|
77
|
+
id :crd_v221_encounter_discharge_responses
|
|
75
78
|
|
|
76
79
|
test from: :crd_v221_card_display_attest_test
|
|
77
80
|
test from: :crd_v221_inferno_response_validation
|
|
@@ -79,9 +82,11 @@ module DaVinciCRDTestKit
|
|
|
79
82
|
|
|
80
83
|
group do
|
|
81
84
|
title 'Requests'
|
|
85
|
+
id :crd_v221_encounter_discharge_requests
|
|
86
|
+
|
|
82
87
|
test from: :crd_v221_hook_request_conformance do
|
|
83
88
|
verifies_requirements(*HookRequestConformanceTest.verifies_requirements,
|
|
84
|
-
'hl7.fhir.us.davinci-crd_2.2.1@hook-
|
|
89
|
+
'hl7.fhir.us.davinci-crd_2.2.1@hook-29')
|
|
85
90
|
end
|
|
86
91
|
test from: :crd_v221_hook_request_requested_version
|
|
87
92
|
test from: :crd_v221_hook_request_prefetch_profiles
|
|
@@ -94,6 +99,8 @@ module DaVinciCRDTestKit
|
|
|
94
99
|
|
|
95
100
|
group do
|
|
96
101
|
title 'Authorization'
|
|
102
|
+
id :crd_v221_encounter_discharge_auth
|
|
103
|
+
|
|
97
104
|
test from: :crd_v221_decode_auth_token
|
|
98
105
|
test from: :crd_v221_retrieve_jwks
|
|
99
106
|
test from: :crd_v221_token_header
|