davinci_crd_test_kit 0.14.0 → 0.14.2
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 +84 -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} +48 -45
- data/config/presets/{inferno_crd_client_suite_prefetch_subset_v221.json.erb → server_v221_against_inferno_crd_client_suite_prefetch_subset.json.erb} +0 -46
- data/config/presets/server_v221_against_inferno_g31_suite.json.erb +49 -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 +7 -7
- data/lib/davinci_crd_test_kit/client/endpoints/gather_response_generation_data.rb +4 -1
- data/lib/davinci_crd_test_kit/client/endpoints/hook_request_endpoint.rb +70 -39
- data/lib/davinci_crd_test_kit/client/endpoints/mock_service_response.rb +26 -7
- data/lib/davinci_crd_test_kit/client/endpoints/mocked_card_responses/external_reference.json +1 -1
- data/lib/davinci_crd_test_kit/client/endpoints/mocked_card_responses/launch_smart_app.json +0 -7
- data/lib/davinci_crd_test_kit/client/endpoints/scenario_service_response.rb +54 -0
- data/lib/davinci_crd_test_kit/client/tagged_request_load_helper.rb +8 -27
- data/lib/davinci_crd_test_kit/client/v2.0.1/auth/retrieve_jwks_test.rb +35 -23
- data/lib/davinci_crd_test_kit/client/v2.0.1/auth/token_payload_test.rb +34 -21
- data/lib/davinci_crd_test_kit/client/v2.0.1/cds-services-v201.json +20 -20
- 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_hooks_group.rb +5 -5
- 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/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/verify_request/hook_request_fetched_data_test.rb +4 -13
- 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 +3 -13
- data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/inferno_response_validation.rb +3 -13
- data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_coverage_info_update_test.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_authorized_scope_attestation_test.rb +45 -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_exposure_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_order_sign_support_attestation_test.rb +42 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_prefetch_key_omission_attestation_test.rb +42 -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 +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/retrieve_jwks_test.rb +29 -18
- data/lib/davinci_crd_test_kit/client/v2.2.1/auth/token_payload_test.rb +35 -22
- data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-prefetch-subset-v221.json +47 -47
- data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-v221.json +50 -50
- 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 +49 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_group.rb +22 -6
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_interaction_group.rb +98 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_discharge_group.rb +19 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_start_group.rb +19 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_fhir_api_group.rb +14 -12
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_hooks_group.rb +25 -5
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_long_running_hook_group.rb +3 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_dispatch_group.rb +23 -15
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_select_group.rb +19 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_sign_group.rb +23 -15
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_registration_group.rb +6 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_scenarios_group.rb +26 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_self_pay_hook_group.rb +36 -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/crd_client_suite.rb +24 -3
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_card_must_support_coverage_information_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_fhirpath_collection_as_comma_delimited_string_test.rb +4 -11
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_hook_instances_unique_test.rb +1 -9
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_location_address_propagation_test.rb +6 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb +3 -12
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/appointment_book_receive_request_test.rb +8 -89
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/base_hook_invocation_receive_request_test.rb +163 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/cross_hooks_receive_request_test.rb +97 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_discharge_receive_request_test.rb +8 -90
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_start_receive_request_test.rb +8 -90
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_dispatch_receive_request_test.rb +8 -98
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_select_receive_request_test.rb +8 -98
- data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_sign_receive_request_test.rb +8 -98
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_long_running_receive_request_test.rb +10 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_skip_long_running_attestation_test.rb +11 -6
- data/lib/davinci_crd_test_kit/client/v2.2.1/registration/client_service_registration_attestation_test.rb +2 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_no_request_test.rb +30 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_workflow_test.rb +55 -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 +62 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_conformance_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_coverage_verification_test.rb +10 -2
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_data_fetch_verification_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb +7 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_profiles_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_requested_version_test.rb +1 -1
- 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 +54 -21
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/hook_response_support_coverage_information_test.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/inferno_response_validation.rb +6 -3
- data/lib/davinci_crd_test_kit/cross_suite/cards_identification.rb +18 -0
- data/lib/davinci_crd_test_kit/cross_suite/logical_models_override_helper.rb +30 -13
- data/lib/davinci_crd_test_kit/cross_suite/prefetch_completeness_checker.rb +25 -11
- data/lib/davinci_crd_test_kit/cross_suite/prefetch_profile_validation.rb +2 -0
- data/lib/davinci_crd_test_kit/cross_suite/requests_logical_model_validation.rb +28 -28
- data/lib/davinci_crd_test_kit/cross_suite/response_logical_model_validation.rb +211 -43
- data/lib/davinci_crd_test_kit/cross_suite/tags.rb +7 -0
- 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 +6 -2
- 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 +101 -97
- 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 +43 -39
- 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/jobs/invoke_hook.rb +3 -3
- data/lib/davinci_crd_test_kit/server/jobs/invoke_hook_no_special_requests.rb +17 -0
- data/lib/davinci_crd_test_kit/server/jobs/invoke_hook_with_bad_auth.rb +14 -0
- data/lib/davinci_crd_test_kit/server/server_abstract_invoke_hook_test.rb +24 -6
- data/lib/davinci_crd_test_kit/server/server_hook_helper.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/crd_server_suite.rb +3 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/discovery/discovery_standard_prefetch_expressions_test.rb +165 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/interaction/server_invoke_hook_single_request_test.rb +22 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_appointment_book_group.rb +10 -102
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_demonstrate_hook_response_group.rb +3 -2
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_discovery_group.rb +2 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_discharge_group.rb +10 -97
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_start_group.rb +10 -97
- 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 +10 -103
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_select_group.rb +12 -116
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_sign_group.rb +12 -121
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_response_group.rb +23 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_info_reason_test.rb +108 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_not_found_group.rb +116 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_active_coverage_group.rb +115 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_member_found_group.rb +117 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/technical_issues_group.rb +121 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/technical_issues_invoke_test.rb +22 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_context_validation_test.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_optional_fields_validation_test.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_required_fields_validation_test.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/additional_orders_validation_test.rb +78 -35
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/coverage_information_card_absence_test.rb +76 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/coverage_information_system_action_validation_test.rb +70 -124
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/create_or_update_coverage_info_response_validation_test.rb +83 -39
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/external_reference_card_validation_test.rb +59 -17
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/form_completion_response_validation_test.rb +80 -45
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/hook_request_resource_resolution.rb +37 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/instructions_card_received_test.rb +57 -6
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/launch_smart_app_card_validation_test.rb +56 -17
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/propose_alternate_request_card_validation_test.rb +52 -25
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/service_response_validation_test.rb +17 -51
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/unknown_cds_hooks_elements_test.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/unknown_configuration_test.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/unknown_context_test.rb +1 -1
- data/lib/davinci_crd_test_kit/version.rb +2 -2
- metadata +54 -16
- data/config/presets/inferno_crd_server_suite_v221.json.erb +0 -94
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/card_optional_fields_validation_test.rb +0 -57
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/coverage_information_system_action_received_test.rb +0 -65
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'base_hook_invocation_receive_request_test'
|
|
2
2
|
|
|
3
3
|
module DaVinciCRDTestKit
|
|
4
4
|
module V221
|
|
5
|
-
class OrderSelectReceiveRequestTest <
|
|
6
|
-
include ClientURLs
|
|
7
|
-
|
|
5
|
+
class OrderSelectReceiveRequestTest < BaseHookInvocationReceiveRequestTest
|
|
8
6
|
id :crd_v221_order_select_request
|
|
9
7
|
title 'Client invokes the order-select hook'
|
|
10
8
|
description %(
|
|
@@ -20,16 +18,6 @@ module DaVinciCRDTestKit
|
|
|
20
18
|
5 minutes the test will become inactive and unresponsive to anything except cancelation).
|
|
21
19
|
)
|
|
22
20
|
|
|
23
|
-
config options: { accepts_multiple_requests: true }
|
|
24
|
-
|
|
25
|
-
input :cds_jwt_iss,
|
|
26
|
-
title: 'CRD JWT Issuer',
|
|
27
|
-
description: %(
|
|
28
|
-
Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
|
|
29
|
-
request sent as the Bearer token in the `Authorization` header.
|
|
30
|
-
Run or re-run the "Registration" group to set or change this value.
|
|
31
|
-
),
|
|
32
|
-
locked: true
|
|
33
21
|
input :order_select_response_approach,
|
|
34
22
|
title: 'Response generation approach for order-select',
|
|
35
23
|
description: %(
|
|
@@ -61,42 +49,7 @@ module DaVinciCRDTestKit
|
|
|
61
49
|
type: 'checkbox',
|
|
62
50
|
default: ['coverage_information', 'external_reference', 'instructions'],
|
|
63
51
|
optional: true,
|
|
64
|
-
options: {
|
|
65
|
-
list_options: [
|
|
66
|
-
{
|
|
67
|
-
label: 'External Reference',
|
|
68
|
-
value: 'external_reference'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: 'Instructions',
|
|
72
|
-
value: 'instructions'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: 'Coverage Information',
|
|
76
|
-
value: 'coverage_information'
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: 'Request Form Completion',
|
|
80
|
-
value: 'request_form_completion'
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: 'Create/Update Coverage Information',
|
|
84
|
-
value: 'create_update_coverage_info'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: 'Launch SMART Application',
|
|
88
|
-
value: 'launch_smart_app'
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
label: 'Propose Alternate Request',
|
|
92
|
-
value: 'propose_alternate_request'
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
label: 'Additional Orders as Companions/Prerequisites',
|
|
96
|
-
value: 'companions_prerequisites'
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
},
|
|
52
|
+
options: { list_options: ORDER_RESPONSE_TYPE_OPTIONS },
|
|
100
53
|
enable_when: { input_name: 'order_select_response_approach', value: 'mocked' }
|
|
101
54
|
input :order_select_custom_response_template,
|
|
102
55
|
title: 'Custom response template for order-select hook requests',
|
|
@@ -107,58 +60,15 @@ module DaVinciCRDTestKit
|
|
|
107
60
|
type: 'textarea',
|
|
108
61
|
optional: true,
|
|
109
62
|
enable_when: { input_name: 'order_select_response_approach', value: 'custom' }
|
|
110
|
-
output :continuation_url
|
|
111
63
|
|
|
112
|
-
|
|
113
|
-
if order_select_response_approach == 'custom'
|
|
114
|
-
# rubocop:disable Layout/LineLength
|
|
115
|
-
'When responding, Inferno will evaluate the provided [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses) ' \
|
|
116
|
-
'from the **Custom response template for order-select hook requests** input ' \
|
|
117
|
-
'against the incoming request to create a response.'
|
|
118
|
-
# rubocop:enable Layout/LineLength
|
|
64
|
+
private
|
|
119
65
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'When responding, Inferno will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses) ' \
|
|
123
|
-
'the following response types using the incoming request: ' \
|
|
124
|
-
"\n - #{selected_response_types_string}"
|
|
125
|
-
# rubocop:enable Layout/LineLength
|
|
126
|
-
end
|
|
66
|
+
def hook_key
|
|
67
|
+
'order_select'
|
|
127
68
|
end
|
|
128
69
|
|
|
129
|
-
def
|
|
130
|
-
|
|
131
|
-
order_select_selected_response_types.join("\n - ")
|
|
132
|
-
else
|
|
133
|
-
'Instructions' # secondary hook default
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
run do
|
|
138
|
-
identifier = cds_jwt_iss
|
|
139
|
-
continuation_url = "#{resume_pass_url}?token=#{identifier}"
|
|
140
|
-
output(continuation_url:)
|
|
141
|
-
|
|
142
|
-
wait(
|
|
143
|
-
identifier:,
|
|
144
|
-
message: %(
|
|
145
|
-
**Invoke the `order-select` hook**:
|
|
146
|
-
|
|
147
|
-
Invoke the order-select hook by sending requests to
|
|
148
|
-
one or both of the two Inferno simulated CRD servers:
|
|
149
|
-
|
|
150
|
-
- Complete Prefetch: `#{order_select_url}`
|
|
151
|
-
- Subset Prefetch: `#{order_select_prefetch_subset_url}`
|
|
152
|
-
|
|
153
|
-
For Inferno to recognize these requests and associate them with this session,
|
|
154
|
-
the authentication JWT sent as a Bearer token in the Authorization header
|
|
155
|
-
must have `#{cds_jwt_iss}` as the `iss` claim in the JWT payload.
|
|
156
|
-
|
|
157
|
-
#{configured_response_details}
|
|
158
|
-
|
|
159
|
-
[Click here](#{continuation_url}) when you have finished submitting requests.
|
|
160
|
-
)
|
|
161
|
-
)
|
|
70
|
+
def primary_hook?
|
|
71
|
+
false
|
|
162
72
|
end
|
|
163
73
|
end
|
|
164
74
|
end
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'base_hook_invocation_receive_request_test'
|
|
2
2
|
|
|
3
3
|
module DaVinciCRDTestKit
|
|
4
4
|
module V221
|
|
5
|
-
class OrderSignReceiveRequestTest <
|
|
6
|
-
include ClientURLs
|
|
7
|
-
|
|
5
|
+
class OrderSignReceiveRequestTest < BaseHookInvocationReceiveRequestTest
|
|
8
6
|
id :crd_v221_order_sign_request
|
|
9
7
|
title 'Client invokes the order-sign hook'
|
|
10
8
|
description %(
|
|
@@ -20,16 +18,6 @@ module DaVinciCRDTestKit
|
|
|
20
18
|
5 minutes the test will become inactive and unresponsive to anything except cancelation).
|
|
21
19
|
)
|
|
22
20
|
|
|
23
|
-
config options: { accepts_multiple_requests: true }
|
|
24
|
-
|
|
25
|
-
input :cds_jwt_iss,
|
|
26
|
-
title: 'CRD JWT Issuer',
|
|
27
|
-
description: %(
|
|
28
|
-
Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
|
|
29
|
-
request sent as the Bearer token in the `Authorization` header.
|
|
30
|
-
Run or re-run the "Registration" group to set or change this value.
|
|
31
|
-
),
|
|
32
|
-
locked: true
|
|
33
21
|
input :order_sign_response_approach,
|
|
34
22
|
title: 'Response generation approach for order-sign',
|
|
35
23
|
description: %(
|
|
@@ -61,42 +49,7 @@ module DaVinciCRDTestKit
|
|
|
61
49
|
type: 'checkbox',
|
|
62
50
|
default: ['coverage_information', 'external_reference', 'instructions'],
|
|
63
51
|
optional: true,
|
|
64
|
-
options: {
|
|
65
|
-
list_options: [
|
|
66
|
-
{
|
|
67
|
-
label: 'External Reference',
|
|
68
|
-
value: 'external_reference'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: 'Instructions',
|
|
72
|
-
value: 'instructions'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: 'Coverage Information',
|
|
76
|
-
value: 'coverage_information'
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: 'Request Form Completion',
|
|
80
|
-
value: 'request_form_completion'
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: 'Create/Update Coverage Information',
|
|
84
|
-
value: 'create_update_coverage_info'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: 'Launch SMART Application',
|
|
88
|
-
value: 'launch_smart_app'
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
label: 'Propose Alternate Request',
|
|
92
|
-
value: 'propose_alternate_request'
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
label: 'Additional Orders as Companions/Prerequisites',
|
|
96
|
-
value: 'companions_prerequisites'
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
},
|
|
52
|
+
options: { list_options: ORDER_RESPONSE_TYPE_OPTIONS },
|
|
100
53
|
enable_when: { input_name: 'order_sign_response_approach', value: 'mocked' }
|
|
101
54
|
input :order_sign_custom_response_template,
|
|
102
55
|
title: 'Custom response template for order-sign hook requests',
|
|
@@ -107,58 +60,15 @@ module DaVinciCRDTestKit
|
|
|
107
60
|
type: 'textarea',
|
|
108
61
|
optional: true,
|
|
109
62
|
enable_when: { input_name: 'order_sign_response_approach', value: 'custom' }
|
|
110
|
-
output :continuation_url
|
|
111
63
|
|
|
112
|
-
|
|
113
|
-
if order_sign_response_approach == 'custom'
|
|
114
|
-
# rubocop:disable Layout/LineLength
|
|
115
|
-
'When responding, Inferno will evaluate the provided [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses) ' \
|
|
116
|
-
'from the **Custom response template for order-sign hook requests** input ' \
|
|
117
|
-
'against the incoming request to create a response.'
|
|
118
|
-
# rubocop:enable Layout/LineLength
|
|
64
|
+
private
|
|
119
65
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'When responding, Inferno will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses) ' \
|
|
123
|
-
'the following response types using the incoming request: ' \
|
|
124
|
-
"\n - #{selected_response_types_string}"
|
|
125
|
-
# rubocop:enable Layout/LineLength
|
|
126
|
-
end
|
|
66
|
+
def hook_key
|
|
67
|
+
'order_sign'
|
|
127
68
|
end
|
|
128
69
|
|
|
129
|
-
def
|
|
130
|
-
|
|
131
|
-
order_sign_selected_response_types.join("\n - ")
|
|
132
|
-
else
|
|
133
|
-
'Coverage Information' # primary hook default
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
run do
|
|
138
|
-
identifier = cds_jwt_iss
|
|
139
|
-
continuation_url = "#{resume_pass_url}?token=#{identifier}"
|
|
140
|
-
output(continuation_url:)
|
|
141
|
-
|
|
142
|
-
wait(
|
|
143
|
-
identifier:,
|
|
144
|
-
message: %(
|
|
145
|
-
**Invoke the `order-sign` hook**:
|
|
146
|
-
|
|
147
|
-
Invoke the order-sign hook by sending requests to
|
|
148
|
-
one or both of the two Inferno simulated CRD servers:
|
|
149
|
-
|
|
150
|
-
- Complete Prefetch: `#{order_sign_url}`
|
|
151
|
-
- Subset Prefetch: `#{order_sign_prefetch_subset_url}`
|
|
152
|
-
|
|
153
|
-
For Inferno to recognize these requests and associate them with this session,
|
|
154
|
-
the authentication JWT sent as a Bearer token in the Authorization header
|
|
155
|
-
must have `#{cds_jwt_iss}` as the `iss` claim in the JWT payload.
|
|
156
|
-
|
|
157
|
-
#{configured_response_details}
|
|
158
|
-
|
|
159
|
-
[Click here](#{continuation_url}) when you have finished submitting requests.
|
|
160
|
-
)
|
|
161
|
-
)
|
|
70
|
+
def primary_hook?
|
|
71
|
+
true
|
|
162
72
|
end
|
|
163
73
|
end
|
|
164
74
|
end
|
data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_long_running_receive_request_test.rb
CHANGED
|
@@ -44,8 +44,16 @@ module DaVinciCRDTestKit
|
|
|
44
44
|
message: %(
|
|
45
45
|
**Long Running Hook Request Test**:
|
|
46
46
|
|
|
47
|
-
Invoke any supported hook
|
|
48
|
-
|
|
47
|
+
Invoke any supported hook on one of the two Inferno simulated
|
|
48
|
+
CRD servers discoverable at the following endpoints:
|
|
49
|
+
|
|
50
|
+
- Complete Prefetch: `#{discovery_url}`
|
|
51
|
+
- Subset Prefetch: `#{prefetch_subset_discovery_url}`
|
|
52
|
+
|
|
53
|
+
For Inferno to recognize these requests and associate them with this session,
|
|
54
|
+
the authentication JWT sent as a Bearer token in the Authorization header
|
|
55
|
+
must have `#{cds_jwt_iss}` as the `iss` claim in the JWT payload. This test
|
|
56
|
+
will automatically continue once Inferno has received a request, paused
|
|
49
57
|
for #{long_running_pause_time.to_i} seconds, and returned a response.
|
|
50
58
|
|
|
51
59
|
Users must have the option to continue
|
|
@@ -8,12 +8,17 @@ module DaVinciCRDTestKit
|
|
|
8
8
|
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
9
9
|
|
|
10
10
|
id :crd_v221_client_skip_long_running_attestation_test
|
|
11
|
-
title 'Client allows the user to continue their workflow during long-running requests
|
|
11
|
+
title 'Client allows the user to continue their workflow during long-running requests'
|
|
12
12
|
description %(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
The CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#ci-c-found-6)
|
|
14
|
+
that client systems not block their users while waiting for long-running CRD Hook calls.
|
|
15
|
+
During this test, the tester will confirm that the client system allows users to continue
|
|
16
|
+
with their workflow when a hook request is long-running. This could be accomplished,
|
|
17
|
+
for example, by providing a bypass/continue mechanism when a CRD server is taking too long
|
|
18
|
+
to respond, or by always running hooks requests in the background and notifying users when they
|
|
19
|
+
return pertinent information.
|
|
16
20
|
)
|
|
21
|
+
attestation
|
|
17
22
|
|
|
18
23
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@found-6'
|
|
19
24
|
|
|
@@ -21,7 +26,7 @@ module DaVinciCRDTestKit
|
|
|
21
26
|
output :attest_false_url
|
|
22
27
|
|
|
23
28
|
run do
|
|
24
|
-
long_running_requests =
|
|
29
|
+
long_running_requests = load_interaction_group_requests
|
|
25
30
|
skip_if long_running_requests.blank?, 'Long-running requests not demonstrated: ' \
|
|
26
31
|
'no hook requests sent during the previous wait.'
|
|
27
32
|
|
|
@@ -35,7 +40,7 @@ module DaVinciCRDTestKit
|
|
|
35
40
|
message: <<~MESSAGE
|
|
36
41
|
**Long Running Request Attestation**:
|
|
37
42
|
|
|
38
|
-
I attest that the user
|
|
43
|
+
I attest that the user was able to continue their workflow
|
|
39
44
|
while waiting for the long-running hook request to return a response:
|
|
40
45
|
|
|
41
46
|
[Click here](#{attest_true_url}) if the above statement is **true**.
|
|
@@ -4,7 +4,7 @@ module DaVinciCRDTestKit
|
|
|
4
4
|
include ClientURLs
|
|
5
5
|
|
|
6
6
|
id :crd_v221_client_service_registration_attestation
|
|
7
|
-
title 'CRD client registers Inferno
|
|
7
|
+
title 'CRD client registers Inferno'
|
|
8
8
|
description %(
|
|
9
9
|
Inferno simulates two CRD servers which can be discovered at the following endpoints:
|
|
10
10
|
- Complete Prefetch Service Discovery Endpoint: #{ClientURLs.discovery_url}
|
|
@@ -21,6 +21,7 @@ module DaVinciCRDTestKit
|
|
|
21
21
|
of the US Core FHIR API and used to verify the `fhirAuthorization.scope`
|
|
22
22
|
hook request field).
|
|
23
23
|
)
|
|
24
|
+
attestation
|
|
24
25
|
verifies_requirements 'cds-hooks_3.0.0-ballot@174'
|
|
25
26
|
|
|
26
27
|
input :complete_prefetch_service_organization_id,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require_relative '../../tagged_request_load_helper'
|
|
2
|
+
|
|
3
|
+
module DaVinciCRDTestKit
|
|
4
|
+
module V221
|
|
5
|
+
class ClientSelfPayNoRequestTest < Inferno::Test
|
|
6
|
+
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
7
|
+
|
|
8
|
+
id :crd_v221_client_self_pay_no_request
|
|
9
|
+
title 'Client does not invoke hooks during self-pay workflows'
|
|
10
|
+
description %(
|
|
11
|
+
The CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/deviations.html#ci-c-dev-26)
|
|
12
|
+
that client systems only invoke hooks on payer services where the patient record indicates
|
|
13
|
+
active coverage with the payer associated with the service and where there is no recorded
|
|
14
|
+
indication the patient intends to bypass insurance coverage, i.e., the service or product
|
|
15
|
+
is not flagged as 'self-pay'. During this test, Inferno verifies that the client did not
|
|
16
|
+
make any hook requests when the tester performed a self-pay workflow during the
|
|
17
|
+
previous test.
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@dev-26'
|
|
21
|
+
|
|
22
|
+
run do
|
|
23
|
+
self_pay_requests = load_interaction_group_requests
|
|
24
|
+
|
|
25
|
+
assert self_pay_requests.blank?,
|
|
26
|
+
'Inferno incorrectly received a hook request for a service marked as self-pay.'
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
require_relative '../client_urls'
|
|
2
|
+
|
|
3
|
+
module DaVinciCRDTestKit
|
|
4
|
+
module V221
|
|
5
|
+
class ClientSelfPayWorkflowTest < Inferno::Test
|
|
6
|
+
include ClientURLs
|
|
7
|
+
|
|
8
|
+
id :crd_v221_client_self_pay_workflow
|
|
9
|
+
title 'Client performs a self-pay workflow'
|
|
10
|
+
description %(
|
|
11
|
+
During this test, the tester will perform a self-pay scenario in which a patient has indicated
|
|
12
|
+
that they will pay for a service instead of asking their insurance to cover it. Because there
|
|
13
|
+
is a recorded indication that the patient intends to bypass insurance coverage, the client
|
|
14
|
+
is required to not invoke any hooks that would send details of the service to the payer.
|
|
15
|
+
The scenario must include an action related to the service that would normally trigger a
|
|
16
|
+
hook request and Inferno will verify that no hook requests are received.
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
input :cds_jwt_iss,
|
|
20
|
+
title: 'CRD JWT Issuer',
|
|
21
|
+
description: %(
|
|
22
|
+
Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
|
|
23
|
+
request sent as the Bearer token in the `Authorization` header.
|
|
24
|
+
Run or re-run the "Registration" group to set or change this value.
|
|
25
|
+
),
|
|
26
|
+
locked: true
|
|
27
|
+
output :continuation_url
|
|
28
|
+
|
|
29
|
+
run do
|
|
30
|
+
identifier = cds_jwt_iss
|
|
31
|
+
continuation_url = "#{resume_pass_url}?token=#{identifier}"
|
|
32
|
+
output(continuation_url:)
|
|
33
|
+
|
|
34
|
+
wait(
|
|
35
|
+
identifier:,
|
|
36
|
+
message: %(
|
|
37
|
+
**Self-Pay Workflow Test**:
|
|
38
|
+
|
|
39
|
+
Perform a workflow that would normally trigger a hook request, such as one
|
|
40
|
+
performed during previous tests, but for a service or product where the patient
|
|
41
|
+
record contains an indication that the patient intends to self-pay. The client must
|
|
42
|
+
not send any hook requests to Inferno during the workflow.
|
|
43
|
+
|
|
44
|
+
By [clicking here](#{continuation_url}) I attest that a user completed a workflow
|
|
45
|
+
in the client system that would normally trigger a hook request for a service that
|
|
46
|
+
has been marked as self-pay.
|
|
47
|
+
|
|
48
|
+
If Inferno receives a hook request, this test will automatically continue
|
|
49
|
+
and the next test will fail.
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
require_relative '../client_urls'
|
|
2
|
+
require_relative '../../../cross_suite/cards_identification'
|
|
3
|
+
require_relative '../../tagged_request_load_helper'
|
|
4
|
+
|
|
5
|
+
module DaVinciCRDTestKit
|
|
6
|
+
module V221
|
|
7
|
+
class ClientUnknownContentAttestationTest < Inferno::Test
|
|
8
|
+
include ClientURLs
|
|
9
|
+
include CardsIdentification
|
|
10
|
+
include DaVinciCRDTestKit::TaggedRequestLoadHelper
|
|
11
|
+
|
|
12
|
+
KNOWN_ACTION_ELEMENTS = ['type', 'description', 'resource', 'resourceId', 'extension'].freeze
|
|
13
|
+
|
|
14
|
+
id :crd_v221_client_unknown_content_attestation_test
|
|
15
|
+
title 'Client processes coverage information returned with unknown content'
|
|
16
|
+
description %(
|
|
17
|
+
The CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#ci-c-found-33)
|
|
18
|
+
that client systems ignore unexpected elements within CDS Hooks structures when processing
|
|
19
|
+
instances. During this test, the tester will confirm that the unknown element and custom extension
|
|
20
|
+
included in the CDS section of the previous response did not prevent the client system from
|
|
21
|
+
processing the returned coverage information and making it available to the user.
|
|
22
|
+
)
|
|
23
|
+
attestation
|
|
24
|
+
|
|
25
|
+
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@found-33'
|
|
26
|
+
|
|
27
|
+
output :attest_true_url
|
|
28
|
+
output :attest_false_url
|
|
29
|
+
|
|
30
|
+
def response_bodies(hook_requests)
|
|
31
|
+
hook_requests.filter_map do |request|
|
|
32
|
+
body = JSON.parse(request.response_body)
|
|
33
|
+
body if body.is_a?(Hash)
|
|
34
|
+
rescue JSON::ParserError
|
|
35
|
+
nil
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def unknown_action_elements(bodies)
|
|
40
|
+
bodies.flat_map do |body|
|
|
41
|
+
body['systemActions'].to_a.flat_map { |action| action.keys - KNOWN_ACTION_ELEMENTS }
|
|
42
|
+
end.uniq
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def unknown_extensions(bodies)
|
|
46
|
+
bodies.flat_map { |body| body['extension'].is_a?(Hash) ? body['extension'].keys : [] }.uniq
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def format_unknown_content(bodies)
|
|
50
|
+
[
|
|
51
|
+
format_unknown_names('System action element name', unknown_action_elements(bodies)),
|
|
52
|
+
format_unknown_names('Response extension name', unknown_extensions(bodies))
|
|
53
|
+
].compact.join("\n")
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def format_unknown_names(label, names)
|
|
57
|
+
return if names.blank?
|
|
58
|
+
|
|
59
|
+
"- #{label}: #{names.map { |name| "`#{name}`" }.join(', ')}"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
run do
|
|
63
|
+
hook_requests = load_interaction_group_requests
|
|
64
|
+
skip_if hook_requests.blank?, 'Unknown response content not demonstrated: ' \
|
|
65
|
+
'no hook requests sent during the previous wait.'
|
|
66
|
+
|
|
67
|
+
bodies = response_bodies(hook_requests)
|
|
68
|
+
skip_if bodies.none? { |body| coverage_info_system_action_response?(body) },
|
|
69
|
+
'Unknown response content not demonstrated: ' \
|
|
70
|
+
'no coverage information system action was returned.'
|
|
71
|
+
|
|
72
|
+
identifier = SecureRandom.hex(32)
|
|
73
|
+
attest_true_url = "#{resume_pass_url}?token=#{identifier}"
|
|
74
|
+
attest_false_url = "#{resume_fail_url}?token=#{identifier}"
|
|
75
|
+
output(attest_true_url:)
|
|
76
|
+
output(attest_false_url:)
|
|
77
|
+
wait(
|
|
78
|
+
identifier:,
|
|
79
|
+
message: <<~MESSAGE
|
|
80
|
+
**Unknown Response Content Attestation**:
|
|
81
|
+
|
|
82
|
+
Inferno returned coverage information along with the following content that is
|
|
83
|
+
not defined by CRD or CDS Hooks:
|
|
84
|
+
|
|
85
|
+
#{format_unknown_content(bodies)}
|
|
86
|
+
|
|
87
|
+
I attest that this unexpected content did not prevent the client system from
|
|
88
|
+
processing the coverage information returned in the same response and that the
|
|
89
|
+
coverage information was displayed or otherwise made available to the user:
|
|
90
|
+
|
|
91
|
+
[Click here](#{attest_true_url}) if the above statement is **true**.
|
|
92
|
+
|
|
93
|
+
[Click here](#{attest_false_url}) if the above statement is **false**.
|
|
94
|
+
MESSAGE
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_relative '../client_urls'
|
|
2
|
+
|
|
3
|
+
module DaVinciCRDTestKit
|
|
4
|
+
module V221
|
|
5
|
+
class ClientUnknownContentReceiveRequestTest < Inferno::Test
|
|
6
|
+
include ClientURLs
|
|
7
|
+
|
|
8
|
+
id :crd_v221_client_unknown_content_receive_request
|
|
9
|
+
title 'Client invokes any hook'
|
|
10
|
+
description %(
|
|
11
|
+
During this test, Inferno will wait while the client makes a single hook request of any type.
|
|
12
|
+
Inferno will return a fixed [mocked response](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
|
|
13
|
+
containing a coverage information system action along with content that the client is not
|
|
14
|
+
expected to recognize: an element added to the system action and a custom extension added to
|
|
15
|
+
the response, both with randomly generated names. This content is added at the CRD response
|
|
16
|
+
level rather than within the FHIR resources carried in the response, and testers cannot change
|
|
17
|
+
the response that is returned. The details of the request and its response do not matter for
|
|
18
|
+
the purposes of this test and they will not be evaluated, checked for conformance, or included
|
|
19
|
+
in cross-hook evaluations. The test will automatically continue after Inferno receives a hook
|
|
20
|
+
request and returns a response.
|
|
21
|
+
)
|
|
22
|
+
config options: { accepts_multiple_requests: true }
|
|
23
|
+
|
|
24
|
+
input :cds_jwt_iss,
|
|
25
|
+
title: 'CRD JWT Issuer',
|
|
26
|
+
description: %(
|
|
27
|
+
Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
|
|
28
|
+
request sent as the Bearer token in the `Authorization` header.
|
|
29
|
+
Run or re-run the "Registration" group to set or change this value.
|
|
30
|
+
),
|
|
31
|
+
locked: true
|
|
32
|
+
|
|
33
|
+
run do
|
|
34
|
+
identifier = cds_jwt_iss
|
|
35
|
+
wait(
|
|
36
|
+
identifier:,
|
|
37
|
+
message: %(
|
|
38
|
+
**Unknown Response Content Test**:
|
|
39
|
+
|
|
40
|
+
Invoke any supported hook on one of the two Inferno simulated
|
|
41
|
+
CRD servers discoverable at the following endpoints:
|
|
42
|
+
|
|
43
|
+
- Complete Prefetch: `#{discovery_url}`
|
|
44
|
+
- Subset Prefetch: `#{prefetch_subset_discovery_url}`
|
|
45
|
+
|
|
46
|
+
For Inferno to recognize these requests and associate them with this session,
|
|
47
|
+
the authentication JWT sent as a Bearer token in the Authorization header
|
|
48
|
+
must have `#{cds_jwt_iss}` as the `iss` claim in the JWT payload. The test
|
|
49
|
+
will automatically continue once Inferno has received a request and returned
|
|
50
|
+
a response.
|
|
51
|
+
|
|
52
|
+
The response will include coverage information alongside an element and a
|
|
53
|
+
custom extension whose names are not defined by CRD or CDS Hooks. Clients
|
|
54
|
+
must ignore the content they do not recognize and process the coverage
|
|
55
|
+
information as usual. Testers will be asked to attest that this was
|
|
56
|
+
demonstrated in the next test.
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -24,7 +24,7 @@ module DaVinciCRDTestKit
|
|
|
24
24
|
'hl7.fhir.us.davinci-crd_2.2.1@hook-20', 'hl7.fhir.us.davinci-crd_2.2.1@hook-21'
|
|
25
25
|
|
|
26
26
|
run do
|
|
27
|
-
hook_requests =
|
|
27
|
+
hook_requests = load_interaction_group_requests
|
|
28
28
|
|
|
29
29
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
30
30
|
|
|
@@ -97,15 +97,23 @@ module DaVinciCRDTestKit
|
|
|
97
97
|
request_index)
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
+
check_payer_resource_conformance(payer_resource, request_index)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def check_payer_resource_conformance(payer_resource, request_index)
|
|
100
104
|
validator_response_details = []
|
|
101
105
|
resource_is_valid?(resource: payer_resource, profile_url: 'http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-organization|2.2.1',
|
|
102
106
|
add_messages_to_runnable: false, validator_response_details:)
|
|
103
107
|
|
|
104
|
-
validator_response_details.each
|
|
108
|
+
validator_response_details.each do |issue|
|
|
109
|
+
next if issue.filtered
|
|
110
|
+
|
|
111
|
+
add_request_message(issue.severity, issue.message, request_index)
|
|
112
|
+
end
|
|
105
113
|
end
|
|
106
114
|
|
|
107
115
|
run do
|
|
108
|
-
hook_requests =
|
|
116
|
+
hook_requests = load_interaction_group_requests
|
|
109
117
|
|
|
110
118
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
111
119
|
|
data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb
CHANGED
|
@@ -29,7 +29,7 @@ module DaVinciCRDTestKit
|
|
|
29
29
|
verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@found-21'
|
|
30
30
|
|
|
31
31
|
run do
|
|
32
|
-
hook_requests =
|
|
32
|
+
hook_requests = load_interaction_group_requests
|
|
33
33
|
|
|
34
34
|
skip_if hook_requests.blank?, "No #{hook_name} hook requests received."
|
|
35
35
|
|