davinci_pas_test_kit 0.12.1 → 0.13.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/pas_server_subscription_creation_against_pas_client.json +32 -0
- data/lib/davinci_pas_test_kit/certs/InfernoCA.key +52 -0
- data/lib/davinci_pas_test_kit/certs/InfernoCA.pem +35 -0
- data/lib/davinci_pas_test_kit/certs/TestKit.pem +32 -0
- data/lib/davinci_pas_test_kit/certs/TestKitPrivateKey.key +28 -0
- data/lib/davinci_pas_test_kit/client_suite.rb +141 -100
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_registration/configuration_other_display_test.rb +46 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_registration/configuration_smart_display_test.rb +37 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_registration/configuration_udap_display_test.rb +37 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_registration/other_auth_attest_test.rb +36 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_test.rb +24 -10
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb +23 -10
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_must_support_test.rb +21 -9
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_request_bundle_validation_test.rb +4 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_test.rb +30 -14
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_request_bundle_validation_test.rb +6 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_response_attest.rb +4 -9
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_submit_must_support_test.rb +24 -9
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_create_test.rb +26 -13
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_pas_conformance_test.rb +6 -24
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_inquiry_error_test.rb +1 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_submission_error_test.rb +3 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/notification/pas_subscription_notification_test.rb +24 -20
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_approval_group.rb +6 -4
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_auth_smart_group.rb +32 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_auth_udap_group.rb +31 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_denial_group.rb +10 -4
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_must_support_group.rb +29 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_options.rb +25 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_pended_group.rb +11 -4
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_registration_group.rb +63 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_subscription_setup_group.rb +23 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_workflows_group.rb +21 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_server_subscription_input_conformance.rb +35 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_server_subscription_setup.rb +43 -0
- data/lib/davinci_pas_test_kit/descriptions.rb +10 -0
- data/lib/davinci_pas_test_kit/docs/client_suite_description_v201.md +203 -79
- data/lib/davinci_pas_test_kit/docs/demo/PAS Client Suite Demonstration.postman_collection.json +246 -0
- data/lib/davinci_pas_test_kit/docs/server_suite_description_v201.md +21 -10
- data/lib/davinci_pas_test_kit/endpoints/claim_endpoint.rb +13 -1
- data/lib/davinci_pas_test_kit/endpoints/subscription_create_endpoint.rb +13 -1
- data/lib/davinci_pas_test_kit/endpoints/subscription_status_endpoint.rb +10 -1
- data/lib/davinci_pas_test_kit/endpoints/token_endpoint.rb +29 -15
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/metadata.yml +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/claim_operation_test.rb +1 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/metadata.yml +28 -17
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/claim_inquiry_operation_test.rb +1 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/client_inquire_request_claim_inquiry_must_support_test.rb +4 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/metadata.yml +7 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/server_inquire_request_claim_inquiry_must_support_test.rb +3 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/client_submit_request_claim_update_must_support_test.rb +9 -3
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/metadata.yml +28 -17
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/server_submit_request_claim_update_must_support_test.rb +9 -3
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/metadata.yml +6 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/server_inquire_response_claiminquiryresponse_must_support_test.rb +1 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/metadata.yml +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/server_submit_response_claimresponse_must_support_test.rb +1 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/metadata.yml +4 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/metadata.yml +11 -5
- data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/metadata.yml +2 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/metadata.yml +6 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/metadata.yml +4 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/metadata.yml +2 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/metadata.yml +153 -53
- data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/metadata.yml +2 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/metadata.yml +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test.rb +0 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/metadata.yml +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test.rb +2 -3
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/metadata.yml +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_pas_request_bundle_validation_test.rb +0 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/metadata.yml +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_pas_response_bundle_validation_test.rb +2 -3
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_approval_use_case_group.rb +0 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_denial_use_case_group.rb +0 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_must_support_use_case_group.rb +3 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_pended_use_case_group.rb +10 -3
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/metadata.yml +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/metadata.yml +4 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/metadata.yml +4 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/server_suite.rb +8 -5
- data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/metadata.yml +2 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/metadata.yml +4 -0
- data/lib/davinci_pas_test_kit/generator/group_generator.rb +20 -4
- data/lib/davinci_pas_test_kit/generator/group_metadata_extractor.rb +2 -2
- data/lib/davinci_pas_test_kit/generator/ig_resources.rb +4 -0
- data/lib/davinci_pas_test_kit/generator/must_support_test_generator.rb +14 -3
- data/lib/davinci_pas_test_kit/generator/operation_test_generator.rb +16 -3
- data/lib/davinci_pas_test_kit/generator/templates/group.rb.erb +10 -3
- data/lib/davinci_pas_test_kit/generator/templates/must_support.rb.erb +3 -0
- data/lib/davinci_pas_test_kit/generator/templates/operation.rb.erb +4 -1
- data/lib/davinci_pas_test_kit/generator/templates/suite.rb.erb +8 -5
- data/lib/davinci_pas_test_kit/generator/templates/validation.rb.erb +5 -4
- data/lib/davinci_pas_test_kit/generator/validation_test_generator.rb +12 -1
- data/lib/davinci_pas_test_kit/must_support_test.rb +2 -202
- data/lib/davinci_pas_test_kit/pas_bundle_validation.rb +4 -4
- data/lib/davinci_pas_test_kit/pas_subscription_verification.rb +30 -0
- data/lib/davinci_pas_test_kit/requirements/davinci-pas-test-kit_out_of_scope_requirements.csv +11 -0
- data/lib/davinci_pas_test_kit/requirements/davinci-pas-test-kit_requirements.csv +214 -0
- data/lib/davinci_pas_test_kit/requirements/generated/davinci-pas-test-kit_requirements_coverage.csv +214 -0
- data/lib/davinci_pas_test_kit/session_identification.rb +45 -0
- data/lib/davinci_pas_test_kit/tags.rb +1 -0
- data/lib/davinci_pas_test_kit/urls.rb +61 -9
- data/lib/davinci_pas_test_kit/version.rb +2 -2
- data/lib/davinci_pas_test_kit.rb +1 -0
- data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +284 -0
- data/lib/requirements_config.yaml +17 -0
- metadata +62 -10
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_request_test.rb +0 -31
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_validation_test.rb +0 -18
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_authentication_group.rb +0 -49
- data/lib/davinci_pas_test_kit/generator/must_support_metadata_extractor.rb +0 -327
@@ -8,10 +8,10 @@ module DaVinciPASTestKit
|
|
8
8
|
module DaVinciPASV201
|
9
9
|
class PASClientApprovalGroup < Inferno::TestGroup
|
10
10
|
id :pas_client_v201_approval_group
|
11
|
-
title '
|
11
|
+
title 'Approval Workflow'
|
12
12
|
description %(
|
13
|
-
|
14
|
-
request and respond appropriately to an 'approved' decision.
|
13
|
+
During these tests, the client will initiate a prior authorization
|
14
|
+
request and show it can respond appropriately to an 'approved' decision.
|
15
15
|
)
|
16
16
|
run_as_group
|
17
17
|
|
@@ -20,6 +20,7 @@ module DaVinciPASTestKit
|
|
20
20
|
test from: :pas_client_v201_approval_submit_test
|
21
21
|
test from: :pas_client_v201_request_bundle_validation_test,
|
22
22
|
config: { options: { workflow_tag: APPROVAL_WORKFLOW_TAG } }
|
23
|
+
|
23
24
|
test from: :pas_client_v201_response_bundle_validation_test,
|
24
25
|
config: { options: { workflow_tag: APPROVAL_WORKFLOW_TAG } }
|
25
26
|
test from: :pas_client_v201_response_attest,
|
@@ -31,7 +32,8 @@ module DaVinciPASTestKit
|
|
31
32
|
),
|
32
33
|
config: { options: {
|
33
34
|
workflow_tag: APPROVAL_WORKFLOW_TAG,
|
34
|
-
attest_message: "I attest that the client system displays the submitted claim as 'approved' meaning
|
35
|
+
attest_message: "I attest that the client system displays the submitted claim as 'approved' meaning " \
|
36
|
+
'that the user can proceed with ordering or providing the requested service.'
|
35
37
|
} }
|
36
38
|
end
|
37
39
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'smart_app_launch_test_kit'
|
2
|
+
require_relative 'pas_client_options'
|
3
|
+
require_relative '../../tags'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class PASClientAuthSMARTGroup < Inferno::TestGroup
|
8
|
+
id :pas_client_v201_auth_smart
|
9
|
+
title 'Review Authentication Interactions'
|
10
|
+
description %(
|
11
|
+
During these tests, Inferno will verify that the client interacted with Inferno's
|
12
|
+
simulated SMART authorization server in a conformant manner when requesting access tokens
|
13
|
+
and that the client under test was able to use provided access tokens to make PAS
|
14
|
+
requests.
|
15
|
+
|
16
|
+
Before running these tests, execute the tests for at least one "PAS workflows" sub-group
|
17
|
+
so that the client will request an access token and use it on a PAS request.
|
18
|
+
)
|
19
|
+
run_as_group
|
20
|
+
|
21
|
+
# smart auth verification
|
22
|
+
test from: :smart_client_token_request_bsca_verification,
|
23
|
+
config: {
|
24
|
+
options: { endpoint_suite_id: :davinci_pas_client_suite_v201 }
|
25
|
+
}
|
26
|
+
test from: :smart_client_token_use_verification,
|
27
|
+
config: {
|
28
|
+
options: { access_request_tags: [SUBMIT_TAG, INQUIRE_TAG] }
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'udap_security_test_kit'
|
2
|
+
require_relative '../../client_suite'
|
3
|
+
require_relative '../../tags'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class PASClientAuthUDAPGroup < Inferno::TestGroup
|
8
|
+
id :pas_client_v201_auth_udap
|
9
|
+
title 'Review UDAP Authentication Interactions'
|
10
|
+
description %(
|
11
|
+
During these tests, Inferno will verify that the client interacted with Inferno's
|
12
|
+
simulated UDAP authorization server in a conformant manner when requesting access tokens
|
13
|
+
and that the client under test was able to use provided access tokens to make PAS
|
14
|
+
requests.
|
15
|
+
|
16
|
+
Before running these tests, execute the tests for at least one "PAS workflows" sub-group
|
17
|
+
so that the client will request an access token and use it on a PAS request.
|
18
|
+
)
|
19
|
+
run_as_group
|
20
|
+
|
21
|
+
test from: :udap_client_token_request_cc_verification,
|
22
|
+
config: {
|
23
|
+
options: { endpoint_suite_id: :davinci_pas_client_suite_v201 }
|
24
|
+
}
|
25
|
+
test from: :udap_client_token_use_verification,
|
26
|
+
config: {
|
27
|
+
options: { access_request_tags: [SUBMIT_TAG, INQUIRE_TAG] }
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -10,15 +10,19 @@ module DaVinciPASTestKit
|
|
10
10
|
class PASClientDenialGroup < Inferno::TestGroup
|
11
11
|
include UserInputResponse
|
12
12
|
id :pas_client_v201_denial_group
|
13
|
-
title '
|
13
|
+
title 'Denial Workflow'
|
14
14
|
description %(
|
15
|
-
|
16
|
-
request and respond appropriately to a 'denied' decision.
|
15
|
+
During these tests, the client will initiate a prior authorization
|
16
|
+
request and show it can respond appropriately to a 'denied' decision.
|
17
17
|
)
|
18
18
|
run_as_group
|
19
19
|
|
20
20
|
input :denial_json_response, optional: true
|
21
21
|
|
22
|
+
input_order :denial_json_response,
|
23
|
+
:client_id,
|
24
|
+
:session_url_path
|
25
|
+
|
22
26
|
test from: :pas_client_v201_denial_submit_test
|
23
27
|
test from: :pas_client_v201_request_bundle_validation_test,
|
24
28
|
config: { options: { workflow_tag: DENIAL_WORKFLOW_TAG } }
|
@@ -33,7 +37,9 @@ module DaVinciPASTestKit
|
|
33
37
|
),
|
34
38
|
config: { options: {
|
35
39
|
workflow_tag: DENIAL_WORKFLOW_TAG,
|
36
|
-
attest_message: "I attest that the client system displays the submitted claim as 'denied'
|
40
|
+
attest_message: "I attest that the client system displays the submitted claim as 'denied', meaning " \
|
41
|
+
'that the user cannot proceed with ordering or providing the requested service without ' \
|
42
|
+
'making adjustments and submitting for further approval.'
|
37
43
|
} }
|
38
44
|
end
|
39
45
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative '../../generated/v2.0.1/pas_client_submit_must_support_use_case_group'
|
2
|
+
require_relative '../../generated/v2.0.1/pas_client_inquiry_must_support_use_case_group'
|
3
|
+
|
4
|
+
module DaVinciPASTestKit
|
5
|
+
module DaVinciPASV201
|
6
|
+
class PASClientMustSupportGroup < Inferno::TestGroup
|
7
|
+
id :pas_client_v201_must_support
|
8
|
+
title 'Must Support Elements'
|
9
|
+
description %(
|
10
|
+
During these tests, the client will show that it supports all PAS-defined profiles and the must support
|
11
|
+
elements defined in them. This includes
|
12
|
+
|
13
|
+
- The ability to make prior authorization submission and inquiry requests that contain all
|
14
|
+
PAS-defined profiles and their must support elements.
|
15
|
+
- The ability to receive in responses to those requests all PAS-defined profiles and their
|
16
|
+
must support elements and continue the prior authorization workflow as appropriate (not currently
|
17
|
+
implemented in these tests).
|
18
|
+
|
19
|
+
Clients under test will be asked to make additional requests to Inferno demonstrating coverage
|
20
|
+
of all must support items in the requests. Note that Inferno will consider requests made during
|
21
|
+
the workflow group of tests, so only profiles and must support elements not demonstrated during
|
22
|
+
those tests need to be submitted as a part of these.
|
23
|
+
)
|
24
|
+
|
25
|
+
group from: :pas_client_v201_submit_must_support_use_case
|
26
|
+
group from: :pas_client_v201_inquiry_must_support_use_case
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'smart_app_launch_test_kit'
|
4
|
+
require 'udap_security_test_kit'
|
5
|
+
require_relative '../../tags'
|
6
|
+
|
7
|
+
module DaVinciPASTestKit
|
8
|
+
module DaVinciPASV201
|
9
|
+
module PASClientOptions
|
10
|
+
module_function
|
11
|
+
|
12
|
+
SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC =
|
13
|
+
SMARTAppLaunch::SMARTClientOptions::SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC
|
14
|
+
UDAP_CLIENT_CREDENTIALS =
|
15
|
+
UDAPSecurityTestKit::UDAPClientOptions::UDAP_CLIENT_CREDENTIALS
|
16
|
+
OTHER_AUTH = OTHER_AUTH_TAG
|
17
|
+
|
18
|
+
def recursive_remove_input(runnable, input)
|
19
|
+
runnable.inputs.delete(input)
|
20
|
+
runnable.input_order.delete(input)
|
21
|
+
runnable.children.each { |child_runnable| recursive_remove_input(child_runnable, input) }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -12,10 +12,10 @@ module DaVinciPASTestKit
|
|
12
12
|
class PASClientPendedGroup < Inferno::TestGroup
|
13
13
|
include UserInputResponse
|
14
14
|
id :pas_client_v201_pended_group
|
15
|
-
title '
|
15
|
+
title 'Pended Workflow'
|
16
16
|
description %(
|
17
|
-
|
18
|
-
request and respond appropriately to a 'pended' decision, including
|
17
|
+
During these tests, the client will initiate a prior authorization
|
18
|
+
request and show it can respond appropriately to a 'pended' decision, including
|
19
19
|
waiting for a notification that an update has been made
|
20
20
|
and making an inquiry request to retrieve the final result.
|
21
21
|
)
|
@@ -24,6 +24,11 @@ module DaVinciPASTestKit
|
|
24
24
|
input :pended_json_response, optional: true
|
25
25
|
input :inquire_json_response, optional: true
|
26
26
|
|
27
|
+
input_order :pended_json_response,
|
28
|
+
:inquire_json_response,
|
29
|
+
:client_id,
|
30
|
+
:session_url_path
|
31
|
+
|
27
32
|
group do
|
28
33
|
title 'Perform the pended workflow'
|
29
34
|
description %(
|
@@ -55,7 +60,9 @@ module DaVinciPASTestKit
|
|
55
60
|
),
|
56
61
|
config: { options: {
|
57
62
|
workflow_tag: PENDED_WORKFLOW_TAG,
|
58
|
-
attest_message: "I attest that following the receipt of the 'pended' response to the submitted
|
63
|
+
attest_message: "I attest that following the receipt of the 'pended' response to the submitted " \
|
64
|
+
'claim, the client system indicates to users that a final decision on request ' \
|
65
|
+
'has not yet been made.'
|
59
66
|
} }
|
60
67
|
end
|
61
68
|
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'udap_security_test_kit'
|
2
|
+
require 'smart_app_launch_test_kit'
|
3
|
+
require_relative '../../client_suite'
|
4
|
+
require_relative 'pas_client_options'
|
5
|
+
require_relative 'client_registration/configuration_smart_display_test'
|
6
|
+
require_relative 'client_registration/configuration_udap_display_test'
|
7
|
+
require_relative 'client_registration/configuration_other_display_test'
|
8
|
+
require_relative 'client_registration/other_auth_attest_test'
|
9
|
+
|
10
|
+
module DaVinciPASTestKit
|
11
|
+
module DaVinciPASV201
|
12
|
+
class PASClientRegistrationGroup < Inferno::TestGroup
|
13
|
+
id :pas_client_v201_registration
|
14
|
+
title 'Client Registration'
|
15
|
+
description %(
|
16
|
+
Register the client under test with Inferno's simulated PAS Server,
|
17
|
+
including configuration of the system under test to make requests against
|
18
|
+
Inferno's simulated PAS endpoints and enable authentication and authorization of PAS requests.
|
19
|
+
)
|
20
|
+
run_as_group
|
21
|
+
|
22
|
+
# smart registration tests
|
23
|
+
test from: :smart_client_registration_bsca_verification,
|
24
|
+
required_suite_options: {
|
25
|
+
client_type: PASClientOptions::SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC
|
26
|
+
}
|
27
|
+
test from: :pas_client_v201_reg_config_smart_display,
|
28
|
+
required_suite_options: {
|
29
|
+
client_type: PASClientOptions::SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC
|
30
|
+
}
|
31
|
+
|
32
|
+
# udap registration tests
|
33
|
+
test from: :udap_client_registration_interaction,
|
34
|
+
required_suite_options: {
|
35
|
+
client_type: PASClientOptions::UDAP_CLIENT_CREDENTIALS
|
36
|
+
},
|
37
|
+
config: {
|
38
|
+
options: { endpoint_suite_id: :davinci_pas_client_suite_v201 }
|
39
|
+
}
|
40
|
+
test from: :udap_client_registration_cc_verification,
|
41
|
+
required_suite_options: {
|
42
|
+
client_type: PASClientOptions::UDAP_CLIENT_CREDENTIALS
|
43
|
+
},
|
44
|
+
config: {
|
45
|
+
options: { endpoint_suite_id: :davinci_pas_client_suite_v201 }
|
46
|
+
}
|
47
|
+
test from: :pas_client_v201_reg_config_udap_display,
|
48
|
+
required_suite_options: {
|
49
|
+
client_type: PASClientOptions::UDAP_CLIENT_CREDENTIALS
|
50
|
+
}
|
51
|
+
|
52
|
+
# other registration tests
|
53
|
+
test from: :pas_client_v201_reg_other_auth_attest,
|
54
|
+
required_suite_options: {
|
55
|
+
client_type: PASClientOptions::OTHER_AUTH
|
56
|
+
}
|
57
|
+
test from: :pas_client_v201_reg_config_other_display,
|
58
|
+
required_suite_options: {
|
59
|
+
client_type: PASClientOptions::OTHER_AUTH
|
60
|
+
}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'subscriptions_test_kit'
|
2
|
+
require_relative 'client_tests/pas_client_subscription_create_test'
|
3
|
+
require_relative 'client_tests/pas_client_subscription_pas_conformance_test'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class PASClientSubscriptionSetupGroup < Inferno::TestGroup
|
8
|
+
id :pas_client_v201_subscription_setup
|
9
|
+
title 'Subscription Setup'
|
10
|
+
description %(
|
11
|
+
These tests verify that the client can create a Subscription instance
|
12
|
+
that will tell the Payer how to notify the client when pended claims
|
13
|
+
are updated.
|
14
|
+
)
|
15
|
+
run_as_group
|
16
|
+
|
17
|
+
test from: :pas_client_v201_subscription_create_test
|
18
|
+
test from: :subscriptions_r4_client_subscription_verification
|
19
|
+
test from: :pas_client_v201_subscription_pas_conformance_test
|
20
|
+
test from: :subscriptions_r4_client_handshake_notification_verification
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'pas_client_approval_group'
|
2
|
+
require_relative 'pas_client_denial_group'
|
3
|
+
require_relative 'pas_client_pended_group'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class PASClientWorkflowsGroup < Inferno::TestGroup
|
8
|
+
id :pas_client_v201_workflows
|
9
|
+
title 'PAS Workflows'
|
10
|
+
description %(
|
11
|
+
The workflow tests verify that the client can participate in complete end-to-end prior
|
12
|
+
authorization interactions, initiating requests and reacting appropriately to the
|
13
|
+
responses returned.
|
14
|
+
)
|
15
|
+
|
16
|
+
group from: :pas_client_v201_approval_group
|
17
|
+
group from: :pas_client_v201_denial_group
|
18
|
+
group from: :pas_client_v201_pended_group
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_server_subscription_input_conformance.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative '../../pas_subscription_verification'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class PASServerSubscriptionInputConformance < Inferno::Test
|
6
|
+
include PASSubscriptionVerification
|
7
|
+
id :pas_server_subscription_input_conformance
|
8
|
+
title '[USER INPUT VERIFICATION] Verify Subscription PAS conformance'
|
9
|
+
description %(
|
10
|
+
This test accepts a Subscription resource as an input and verifies that it is conformant to PAS requirements on
|
11
|
+
the Subscriptions, including:
|
12
|
+
- The payload content type must be `id-only`
|
13
|
+
- The use of the [PAS-defined Subscription
|
14
|
+
Topic](https://hl7.org/fhir/us/davinci-pas/STU2/SubscriptionTopic-PASSubscriptionTopic.html), and
|
15
|
+
- Inclusion of filter criteria for the client's organization.
|
16
|
+
)
|
17
|
+
input :subscription_resource
|
18
|
+
|
19
|
+
run do
|
20
|
+
omit_if subscription_resource.blank?, 'Did not input a Subscription resource of this type.'
|
21
|
+
verify_pas_subscription(subscription_resource)
|
22
|
+
|
23
|
+
subscription = JSON.parse(subscription_resource)
|
24
|
+
payload_ext = subscription.dig('channel', '_payload', 'extension')
|
25
|
+
content_ext = payload_ext&.find do |ext|
|
26
|
+
ext['url'] == 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content'
|
27
|
+
end
|
28
|
+
|
29
|
+
payload_content = content_ext&.dig('valueCode')
|
30
|
+
assert payload_content == 'id-only',
|
31
|
+
"PAS Subscription payload content type is #{payload_content}, but must be id-only"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'subscriptions_test_kit'
|
2
|
+
require_relative 'pas_server_subscription_input_conformance'
|
3
|
+
|
4
|
+
module DaVinciPASTestKit
|
5
|
+
module DaVinciPASV201
|
6
|
+
class PASServerSubscriptionSetup < Inferno::TestGroup
|
7
|
+
id :pas_server_subscription_setup
|
8
|
+
title 'Subscription Setup'
|
9
|
+
description %(
|
10
|
+
The Subscription Setup tests verify that the server supports creation of a rest-hook Subscription. The
|
11
|
+
Subscription instance created in these tests will be used for a notification in the pended workflow tests
|
12
|
+
later.
|
13
|
+
)
|
14
|
+
config inputs: { url: { name: :server_endpoint } }
|
15
|
+
input_order :server_endpoint, :smart_credentials, :access_token, :subscription_resource
|
16
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@141'
|
17
|
+
run_as_group
|
18
|
+
|
19
|
+
test from: :subscriptions_r4_server_subscription_conformance do
|
20
|
+
input :subscription_resource,
|
21
|
+
title: 'Pended Prior Authorization Subscription',
|
22
|
+
description: %(
|
23
|
+
A Subscription resource in JSON format that Inferno will send to the server under test so that it
|
24
|
+
can demonstrate its ability to notify Inferno when pended prior authorization requests have been
|
25
|
+
updated. The instance must be conformant to the R4/B Topic-Based Subscription profile. Inferno may
|
26
|
+
modify the Subscription before submission, e.g., to point to Inferno's notification endpoint.
|
27
|
+
)
|
28
|
+
end
|
29
|
+
test from: :pas_server_subscription_input_conformance
|
30
|
+
test from: :subscriptions_r4_server_notification_delivery,
|
31
|
+
title: 'Send Subscription and Receive Handshake Notification from Server',
|
32
|
+
description: %(
|
33
|
+
This test sends a request to create the Subscription resource to the Subscriptions Backport FHIR Server.
|
34
|
+
If successful, it then waits for a handshake
|
35
|
+
[notification](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/notifications.html#notifications).
|
36
|
+
Other types of notifications, including heartbeat and event notifications, will be accepted by Inferno
|
37
|
+
but ignored by this test group.
|
38
|
+
)
|
39
|
+
test from: :subscriptions_r4_server_creation_response_conformance
|
40
|
+
test from: :subscriptions_r4_server_handshake_conformance
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
INPUT_CLIENT_ID_LOCKED =
|
5
|
+
'The client\'s registered Client Id for use in obtaining access tokens. ' \
|
6
|
+
'Run the **1** Client Registration group to configure this input.'
|
7
|
+
INPUT_SESSION_URL_PATH_LOCKED =
|
8
|
+
'The additional path used to create session-specific endpoints. Run the ' \
|
9
|
+
'**1** Client Registration group to configure this input.'
|
10
|
+
end
|