davinci_pas_test_kit 0.12.2 → 0.13.1
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/claim_response_decision/pas_claim_response_decision_test.rb +26 -75
- 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 +21 -10
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb +20 -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_pended_submit_test.rb +24 -14
- 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 +21 -9
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_create_test.rb +23 -13
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_pas_conformance_test.rb +5 -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 -1
- 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 -2
- 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 -1
- 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 -1
- 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_subscription_verification.rb +30 -0
- data/lib/davinci_pas_test_kit/requirements/generated/davinci-pas-test-kit_requirements_coverage.csv +58 -58
- 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/requirements_config.yaml +1 -1
- metadata +54 -8
- 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
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative '../../../urls'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class PASClientRegistrationConfigurationSMARTDisplay < Inferno::Test
|
6
|
+
include URLs
|
7
|
+
|
8
|
+
id :pas_client_v201_reg_config_smart_display
|
9
|
+
title 'Confirm client configuration'
|
10
|
+
description %(
|
11
|
+
This test provides all the information needed for testers to configure
|
12
|
+
the client under test to communicate with Inferno's simulated PAS server
|
13
|
+
including SMART endpoints to obtain access tokens.
|
14
|
+
)
|
15
|
+
|
16
|
+
input :client_id
|
17
|
+
|
18
|
+
run do
|
19
|
+
wait(
|
20
|
+
identifier: client_id,
|
21
|
+
message: %(
|
22
|
+
**Inferno Simulated Server Details**:
|
23
|
+
|
24
|
+
FHIR Base URL: `#{fhir_base_url}`
|
25
|
+
|
26
|
+
Authentication Details:
|
27
|
+
- SMART Client Id: `#{client_id}`
|
28
|
+
- Token endpoint: `#{token_url}`
|
29
|
+
|
30
|
+
[Click here](#{resume_pass_url}?token=#{client_id}) once you have configured
|
31
|
+
the client to connect to Inferno at the above endpoints.
|
32
|
+
)
|
33
|
+
)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative '../../../urls'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class PASClientRegistrationConfigurationUDAPDisplay < Inferno::Test
|
6
|
+
include URLs
|
7
|
+
|
8
|
+
id :pas_client_v201_reg_config_udap_display
|
9
|
+
title 'Confirm client configuration'
|
10
|
+
description %(
|
11
|
+
This test provides all the information needed for testers to configure
|
12
|
+
the client under test to communicate with Inferno's simulated PAS server
|
13
|
+
including UDAP endpoints to obtain access tokens.
|
14
|
+
)
|
15
|
+
|
16
|
+
input :client_id
|
17
|
+
|
18
|
+
run do
|
19
|
+
wait(
|
20
|
+
identifier: client_id,
|
21
|
+
message: %(
|
22
|
+
**Inferno Simulated Server Details**:
|
23
|
+
|
24
|
+
FHIR Base URL: `#{fhir_base_url}`
|
25
|
+
|
26
|
+
Authentication Details:
|
27
|
+
- UDAP Client Id: `#{client_id}`
|
28
|
+
- Token endpoint: `#{token_url}`
|
29
|
+
|
30
|
+
[Click here](#{resume_pass_url}?token=#{client_id}) once you have configured
|
31
|
+
the client to connect to Inferno at the above endpoints.
|
32
|
+
)
|
33
|
+
)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_registration/other_auth_attest_test.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative '../../../urls'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class PASClientRegistrationOtherAuthAttest < Inferno::Test
|
6
|
+
include URLs
|
7
|
+
|
8
|
+
id :pas_client_v201_reg_other_auth_attest
|
9
|
+
title 'Verify that the client supports an approach for authenticating itself to the server (Attestation)'
|
10
|
+
description %(
|
11
|
+
Since a standard auth approach was not chosen for this session, this test provides testers with an
|
12
|
+
opportunity to attest to their client's ability to authenticate itself to a server
|
13
|
+
using a method that this Inferno test suite does not support, such as mutual authentication
|
14
|
+
TLS.
|
15
|
+
)
|
16
|
+
|
17
|
+
run do
|
18
|
+
identifier = SecureRandom.hex(32)
|
19
|
+
wait(
|
20
|
+
identifier:,
|
21
|
+
message: %(
|
22
|
+
**Other Authentication Attestation**:
|
23
|
+
|
24
|
+
I attest that the client system can authenticate itself with a PAS server using
|
25
|
+
a mechanism other than the SMART Backend Services or UDAP B2B client credentials
|
26
|
+
flows.
|
27
|
+
|
28
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the above statement is true.
|
29
|
+
|
30
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the above statement is false.
|
31
|
+
)
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_test.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
require_relative '../../../urls'
|
2
|
+
require_relative '../../../descriptions'
|
2
3
|
require_relative '../../../user_input_response'
|
4
|
+
require_relative '../../../session_identification'
|
3
5
|
|
4
6
|
module DaVinciPASTestKit
|
5
7
|
module DaVinciPASV201
|
6
8
|
class PASClientApprovalSubmitTest < Inferno::Test
|
7
9
|
include URLs
|
8
10
|
include UserInputResponse
|
11
|
+
include SessionIdentification
|
9
12
|
|
10
13
|
id :pas_client_v201_approval_submit_test
|
11
14
|
title 'Client submits a claim using the $submit operation'
|
@@ -17,12 +20,6 @@ module DaVinciPASTestKit
|
|
17
20
|
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
18
21
|
'hl7.fhir.us.davinci-pas_2.0.1@70', 'hl7.fhir.us.davinci-pas_2.0.1@202'
|
19
22
|
|
20
|
-
input :access_token,
|
21
|
-
title: 'Access Token',
|
22
|
-
description: %(
|
23
|
-
Access token that the client will provide in the Authorization header of each request
|
24
|
-
made during this test.
|
25
|
-
)
|
26
23
|
input :approval_json_response,
|
27
24
|
title: 'Claim approved response JSON',
|
28
25
|
type: 'textarea',
|
@@ -34,6 +31,19 @@ module DaVinciPASTestKit
|
|
34
31
|
If not provided, an approval response will be generated from the submitted Claim.
|
35
32
|
In either case, the response will be validated against the PAS Response Bundle profile.
|
36
33
|
)
|
34
|
+
input :client_id,
|
35
|
+
title: 'Client Id',
|
36
|
+
type: 'text',
|
37
|
+
optional: true,
|
38
|
+
locked: true,
|
39
|
+
description: INPUT_CLIENT_ID_LOCKED
|
40
|
+
input :session_url_path,
|
41
|
+
title: 'Session-specific URL path extension',
|
42
|
+
type: 'text',
|
43
|
+
optional: true,
|
44
|
+
locked: true,
|
45
|
+
description: INPUT_SESSION_URL_PATH_LOCKED
|
46
|
+
|
37
47
|
submit_respond_with :approval_json_response
|
38
48
|
|
39
49
|
run do
|
@@ -47,16 +57,17 @@ module DaVinciPASTestKit
|
|
47
57
|
))
|
48
58
|
end
|
49
59
|
|
60
|
+
wait_identifier = session_wait_identifier(client_id, session_url_path)
|
61
|
+
submit_endpoint = session_endpont_url(:submit, client_id, session_url_path)
|
62
|
+
|
50
63
|
wait(
|
51
|
-
identifier:
|
64
|
+
identifier: wait_identifier,
|
52
65
|
message: %(
|
53
66
|
**Approval Workflow Test**:
|
54
67
|
|
55
68
|
Submit a PAS request to
|
56
69
|
|
57
|
-
`#{
|
58
|
-
|
59
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
70
|
+
`#{submit_endpoint}`
|
60
71
|
|
61
72
|
If the optional '**#{input_title(:approval_json_response)}**' input is populated, it will
|
62
73
|
be returned, updated with current timestamps. Otherwise, an approval response will
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
require_relative '../../../urls'
|
2
|
+
require_relative '../../../descriptions'
|
2
3
|
require_relative '../../../user_input_response'
|
4
|
+
require_relative '../../../session_identification'
|
3
5
|
|
4
6
|
module DaVinciPASTestKit
|
5
7
|
module DaVinciPASV201
|
6
8
|
class PASClientDenialSubmitTest < Inferno::Test
|
7
9
|
include URLs
|
10
|
+
include SessionIdentification
|
8
11
|
include UserInputResponse
|
9
12
|
|
10
13
|
id :pas_client_v201_denial_submit_test
|
@@ -17,12 +20,6 @@ module DaVinciPASTestKit
|
|
17
20
|
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
18
21
|
'hl7.fhir.us.davinci-pas_2.0.1@70', 'hl7.fhir.us.davinci-pas_2.0.1@202'
|
19
22
|
|
20
|
-
input :access_token,
|
21
|
-
title: 'Access Token',
|
22
|
-
description: %(
|
23
|
-
Access token that the client will provide in the Authorization header of each request
|
24
|
-
made during this test.
|
25
|
-
)
|
26
23
|
input :denial_json_response,
|
27
24
|
title: 'Claim denied response JSON',
|
28
25
|
type: 'textarea',
|
@@ -34,6 +31,18 @@ module DaVinciPASTestKit
|
|
34
31
|
If not provided, a denial response will be generated from the submitted Claim.
|
35
32
|
In either case, the response will be validated against the PAS Response Bundle profile.
|
36
33
|
)
|
34
|
+
input :client_id,
|
35
|
+
title: 'Client Id',
|
36
|
+
type: 'text',
|
37
|
+
optional: true,
|
38
|
+
locked: true,
|
39
|
+
description: INPUT_CLIENT_ID_LOCKED
|
40
|
+
input :session_url_path,
|
41
|
+
title: 'Session-specific URL path extension',
|
42
|
+
type: 'text',
|
43
|
+
optional: true,
|
44
|
+
locked: true,
|
45
|
+
description: INPUT_SESSION_URL_PATH_LOCKED
|
37
46
|
submit_respond_with :denial_json_response
|
38
47
|
|
39
48
|
run do
|
@@ -47,16 +56,17 @@ module DaVinciPASTestKit
|
|
47
56
|
))
|
48
57
|
end
|
49
58
|
|
59
|
+
wait_identifier = session_wait_identifier(client_id, session_url_path)
|
60
|
+
submit_endpoint = session_endpont_url(:submit, client_id, session_url_path)
|
61
|
+
|
50
62
|
wait(
|
51
|
-
identifier:
|
63
|
+
identifier: wait_identifier,
|
52
64
|
message: %(
|
53
65
|
**Denial Workflow Test**:
|
54
66
|
|
55
67
|
Submit a PAS request to
|
56
68
|
|
57
|
-
`#{
|
58
|
-
|
59
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
69
|
+
`#{submit_endpoint}`
|
60
70
|
|
61
71
|
If the optional '**#{input_title(:denial_json_response)}**' input is populated, it will
|
62
72
|
be returned, updated with current timestamps. Otherwise, a denial response will
|
@@ -1,9 +1,12 @@
|
|
1
1
|
require_relative '../../../urls'
|
2
|
+
require_relative '../../../descriptions'
|
3
|
+
require_relative '../../../session_identification'
|
2
4
|
|
3
5
|
module DaVinciPASTestKit
|
4
6
|
module DaVinciPASV201
|
5
7
|
class PASClientInquireMustSupportTest < Inferno::Test
|
6
8
|
include URLs
|
9
|
+
include SessionIdentification
|
7
10
|
|
8
11
|
id :pas_client_inquire_v201_must_support_test
|
9
12
|
title 'Client inquires about claims using the $inquire operation to demonstrate coverage of must support elements'
|
@@ -11,17 +14,26 @@ module DaVinciPASTestKit
|
|
11
14
|
This test allows the client to send $inquire requests in addition to any already sent in previous test groups
|
12
15
|
for Inferno to evaluate coverage of must support elements.
|
13
16
|
)
|
14
|
-
input :
|
15
|
-
title: '
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
input :client_id,
|
18
|
+
title: 'Client Id',
|
19
|
+
type: 'text',
|
20
|
+
optional: true,
|
21
|
+
locked: true,
|
22
|
+
description: INPUT_CLIENT_ID_LOCKED
|
23
|
+
input :session_url_path,
|
24
|
+
title: 'Session-specific URL path extension',
|
25
|
+
type: 'text',
|
26
|
+
optional: true,
|
27
|
+
locked: true,
|
28
|
+
description: INPUT_SESSION_URL_PATH_LOCKED
|
20
29
|
config options: { accepts_multiple_requests: true }
|
21
30
|
|
22
31
|
run do
|
32
|
+
wait_identifier = session_wait_identifier(client_id, session_url_path)
|
33
|
+
inquire_endpoint = session_endpont_url(:inquire, client_id, session_url_path)
|
34
|
+
|
23
35
|
wait(
|
24
|
-
identifier:
|
36
|
+
identifier: wait_identifier,
|
25
37
|
message: %(
|
26
38
|
The client system may now make multiple $inquire requests before continuing. These requests should
|
27
39
|
cumulatively demonstrate coverage of all required profiles and all must support elements within those
|
@@ -40,9 +52,9 @@ module DaVinciPASTestKit
|
|
40
52
|
|
41
53
|
Submit PAS requests to
|
42
54
|
|
43
|
-
`#{
|
55
|
+
`#{inquire_endpoint}`
|
44
56
|
|
45
|
-
and [click here](#{resume_pass_url}?token=#{
|
57
|
+
and [click here](#{resume_pass_url}?token=#{wait_identifier}) when done.
|
46
58
|
)
|
47
59
|
)
|
48
60
|
end
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_test.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
require_relative '../../../urls'
|
2
|
+
require_relative '../../../descriptions'
|
2
3
|
require_relative '../../../user_input_response'
|
3
4
|
require_relative '../../../pas_bundle_validation'
|
5
|
+
require_relative '../../../session_identification'
|
4
6
|
|
5
7
|
module DaVinciPASTestKit
|
6
8
|
module DaVinciPASV201
|
7
9
|
class PASClientPendedSubmitTest < Inferno::Test
|
8
10
|
include URLs
|
11
|
+
include SessionIdentification
|
9
12
|
include UserInputResponse
|
10
13
|
include PasBundleValidation
|
11
14
|
|
@@ -25,12 +28,6 @@ module DaVinciPASTestKit
|
|
25
28
|
'hl7.fhir.us.davinci-pas_2.0.1@203'
|
26
29
|
|
27
30
|
config options: { accepts_multiple_requests: true }
|
28
|
-
input :access_token,
|
29
|
-
title: 'Access Token',
|
30
|
-
description: %(
|
31
|
-
Access token that the client will provide in the Authorization header of each request
|
32
|
-
made during this test.
|
33
|
-
)
|
34
31
|
input :notification_bundle,
|
35
32
|
title: 'Claim updated notification JSON',
|
36
33
|
type: 'textarea',
|
@@ -77,6 +74,19 @@ module DaVinciPASTestKit
|
|
77
74
|
in the `channel.header` element. If a value for the `authorization` header is provided in
|
78
75
|
`channel.header`, this value will override it.
|
79
76
|
)
|
77
|
+
input :client_id,
|
78
|
+
title: 'Client Id',
|
79
|
+
type: 'text',
|
80
|
+
optional: true,
|
81
|
+
locked: true,
|
82
|
+
description: INPUT_CLIENT_ID_LOCKED
|
83
|
+
input :session_url_path,
|
84
|
+
title: 'Session-specific URL path extension',
|
85
|
+
type: 'text',
|
86
|
+
optional: true,
|
87
|
+
locked: true,
|
88
|
+
description: INPUT_SESSION_URL_PATH_LOCKED
|
89
|
+
|
80
90
|
submit_respond_with :pended_json_response
|
81
91
|
inquire_respond_with :inquire_json_response
|
82
92
|
|
@@ -120,17 +130,19 @@ module DaVinciPASTestKit
|
|
120
130
|
))
|
121
131
|
end
|
122
132
|
|
133
|
+
wait_identifier = session_wait_identifier(client_id, session_url_path)
|
134
|
+
submit_endpoint = session_endpont_url(:submit, client_id, session_url_path)
|
135
|
+
inquire_endpoint = session_endpont_url(:inquire, client_id, session_url_path)
|
136
|
+
|
123
137
|
wait(
|
124
|
-
identifier:
|
138
|
+
identifier: wait_identifier,
|
125
139
|
timeout: 600,
|
126
140
|
message: %(
|
127
141
|
**Pended Workflow Test**:
|
128
142
|
|
129
143
|
1. Submit a PAS request to
|
130
144
|
|
131
|
-
`#{
|
132
|
-
|
133
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
145
|
+
`#{submit_endpoint}`
|
134
146
|
|
135
147
|
If the optional '**#{input_title(:pended_json_response)}**' input is populated, it will
|
136
148
|
be returned, updated with current timestamps. Otherwise, a pended response will
|
@@ -144,9 +156,7 @@ module DaVinciPASTestKit
|
|
144
156
|
|
145
157
|
3. Once the notification has been received, submit a PAS inquiry request to
|
146
158
|
|
147
|
-
`#{
|
148
|
-
|
149
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
159
|
+
`#{inquire_endpoint}`
|
150
160
|
|
151
161
|
If the optional '**#{input_title(:inquire_json_response)}**' input is populated, it will
|
152
162
|
be returned, updated with current timestamps. Otherwise, an approval response will
|
@@ -158,7 +168,7 @@ module DaVinciPASTestKit
|
|
158
168
|
to be able to faithfully answer the attestations.
|
159
169
|
|
160
170
|
Once the client has completed these steps,
|
161
|
-
[click here to complete the test](#{resume_pass_url}?token=#{
|
171
|
+
[click here to complete the test](#{resume_pass_url}?token=#{wait_identifier})
|
162
172
|
and continue Inferno's evaluation of the interaction.
|
163
173
|
)
|
164
174
|
)
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_response_attest.rb
CHANGED
@@ -12,12 +12,6 @@ module DaVinciPASTestKit
|
|
12
12
|
the receipt of response and attest that users are able to see the appropriate
|
13
13
|
updates to the corresponding prior authorization request in their system.
|
14
14
|
)
|
15
|
-
input :access_token,
|
16
|
-
title: 'Access Token',
|
17
|
-
description: %(
|
18
|
-
Access token that the client will provide in the Authorization header of each request
|
19
|
-
made during this test.
|
20
|
-
)
|
21
15
|
|
22
16
|
def workflow_tag
|
23
17
|
config.options[:workflow_tag]
|
@@ -39,16 +33,17 @@ module DaVinciPASTestKit
|
|
39
33
|
end
|
40
34
|
|
41
35
|
run do
|
36
|
+
identifier = SecureRandom.hex(32)
|
42
37
|
wait(
|
43
|
-
identifier
|
38
|
+
identifier:,
|
44
39
|
message: %(
|
45
40
|
**#{workflow_name} Workflow Test**:
|
46
41
|
|
47
42
|
#{attest_message}
|
48
43
|
|
49
|
-
[Click here](#{resume_pass_url}?token=#{
|
44
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the above statement is **true**.
|
50
45
|
|
51
|
-
[Click here](#{resume_fail_url}?token=#{
|
46
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the above statement is **false**.
|
52
47
|
)
|
53
48
|
)
|
54
49
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
require_relative '../../../urls'
|
2
|
+
require_relative '../../../descriptions'
|
3
|
+
require_relative '../../../session_identification'
|
2
4
|
|
3
5
|
module DaVinciPASTestKit
|
4
6
|
module DaVinciPASV201
|
5
7
|
class PASClientSubmitMustSupportTest < Inferno::Test
|
6
8
|
include URLs
|
9
|
+
include SessionIdentification
|
7
10
|
|
8
11
|
id :pas_client_submit_v201_must_support_test
|
9
12
|
title 'Client submits claims using the $submit operation to demonstrate coverage of must support elements'
|
@@ -14,17 +17,26 @@ module DaVinciPASTestKit
|
|
14
17
|
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
15
18
|
'hl7.fhir.us.davinci-pas_2.0.1@70', 'hl7.fhir.us.davinci-pas_2.0.1@202'
|
16
19
|
|
17
|
-
input :
|
18
|
-
title: '
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
input :client_id,
|
21
|
+
title: 'Client Id',
|
22
|
+
type: 'text',
|
23
|
+
optional: true,
|
24
|
+
locked: true,
|
25
|
+
description: INPUT_CLIENT_ID_LOCKED
|
26
|
+
input :session_url_path,
|
27
|
+
title: 'Session-specific URL path extension',
|
28
|
+
type: 'text',
|
29
|
+
optional: true,
|
30
|
+
locked: true,
|
31
|
+
description: INPUT_SESSION_URL_PATH_LOCKED
|
23
32
|
config options: { accepts_multiple_requests: true }
|
24
33
|
|
25
34
|
run do
|
35
|
+
wait_identifier = session_wait_identifier(client_id, session_url_path)
|
36
|
+
submit_endpoint = session_endpont_url(:submit, client_id, session_url_path)
|
37
|
+
|
26
38
|
wait(
|
27
|
-
identifier:
|
39
|
+
identifier: wait_identifier,
|
28
40
|
message: %(
|
29
41
|
The client system may now make multiple $submit requests before continuing. These requests should
|
30
42
|
cumulatively demonstrate coverage of all required profiles and all must support elements within those
|
@@ -49,9 +61,9 @@ module DaVinciPASTestKit
|
|
49
61
|
|
50
62
|
Submit PAS requests to
|
51
63
|
|
52
|
-
`#{
|
64
|
+
`#{submit_endpoint}`
|
53
65
|
|
54
|
-
and [click here](#{resume_pass_url}?token=#{
|
66
|
+
and [click here](#{resume_pass_url}?token=#{wait_identifier}) when done.
|
55
67
|
)
|
56
68
|
)
|
57
69
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
require_relative '../../../urls'
|
2
|
+
require_relative '../../../descriptions'
|
3
|
+
require_relative '../../../session_identification'
|
2
4
|
|
3
5
|
module DaVinciPASTestKit
|
4
6
|
module DaVinciPASV201
|
5
7
|
class PASClientSubscriptionCreateTest < Inferno::Test
|
6
8
|
include URLs
|
9
|
+
include SessionIdentification
|
7
10
|
|
8
11
|
id :pas_client_v201_subscription_create_test
|
9
12
|
title 'Client submits a Subscription Creation Request'
|
@@ -14,33 +17,40 @@ module DaVinciPASTestKit
|
|
14
17
|
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@137', 'hl7.fhir.us.davinci-pas_2.0.1@140',
|
15
18
|
'hl7.fhir.us.davinci-pas_2.0.1@142'
|
16
19
|
|
17
|
-
input :
|
18
|
-
title: '
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
input :client_id,
|
21
|
+
title: 'Client Id',
|
22
|
+
type: 'text',
|
23
|
+
optional: true,
|
24
|
+
locked: true,
|
25
|
+
description: INPUT_CLIENT_ID_LOCKED
|
26
|
+
input :session_url_path,
|
27
|
+
title: 'Session-specific URL path extension',
|
28
|
+
type: 'text',
|
29
|
+
optional: true,
|
30
|
+
locked: true,
|
31
|
+
description: INPUT_SESSION_URL_PATH_LOCKED
|
23
32
|
input :client_endpoint_access_token,
|
24
33
|
optional: true,
|
25
34
|
title: 'Client Notification Access Token',
|
26
35
|
description: %(
|
27
36
|
The bearer token that Inferno will send on requests to the client under test's rest-hook notification
|
28
|
-
endpoint
|
29
|
-
|
30
|
-
`channel.header`, this value will override it.
|
37
|
+
endpoint, including handshake notifications sent after Subscription creation. Not needed if the client
|
38
|
+
under test will create a Subscription with an appropriate header value in the `channel.header` element.
|
39
|
+
If a value for the `authorization` header is provided in `channel.header`, this value will override it.
|
31
40
|
)
|
32
41
|
|
33
42
|
run do
|
43
|
+
wait_identifier = session_wait_identifier(client_id, session_url_path)
|
44
|
+
subscription_endpoint = session_endpont_url(:subscription, client_id, session_url_path)
|
45
|
+
|
34
46
|
wait(
|
35
|
-
identifier:
|
47
|
+
identifier: wait_identifier,
|
36
48
|
message: %(
|
37
49
|
**Subscription Creation Test**:
|
38
50
|
|
39
51
|
Submit a POST with a Subscription to:
|
40
52
|
|
41
|
-
`#{
|
42
|
-
|
43
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
53
|
+
`#{subscription_endpoint}`
|
44
54
|
|
45
55
|
Upon receipt, Inferno will send a handshake request to verify that notifications can be
|
46
56
|
delivered and continue the test with a pass or fail based on the result.
|
@@ -1,8 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../../../pas_subscription_verification'
|
4
|
+
|
3
5
|
module DaVinciPASTestKit
|
4
6
|
module DaVinciPASV201
|
5
7
|
class SubscriptionPASConformanceTest < Inferno::Test
|
8
|
+
include PASSubscriptionVerification
|
9
|
+
|
6
10
|
id :pas_client_v201_subscription_pas_conformance_test
|
7
11
|
title 'Client Subscription PAS Conformance Verification'
|
8
12
|
description %(
|
@@ -19,30 +23,7 @@ module DaVinciPASTestKit
|
|
19
23
|
skip_if(requests.none?, 'Inferno did not receive a Subscription creation request')
|
20
24
|
subscription_resource = request.request_body
|
21
25
|
|
22
|
-
|
23
|
-
subscription = JSON.parse(subscription_resource)
|
24
|
-
|
25
|
-
unless subscription['criteria'] == 'http://hl7.org/fhir/us/davinci-pas/SubscriptionTopic/PASSubscriptionTopic'
|
26
|
-
add_message('error', %(
|
27
|
-
The created Subscription must use the PAS-defined Subscription topic
|
28
|
-
`http://hl7.org/fhir/us/davinci-pas/SubscriptionTopic/PASSubscriptionTopic`
|
29
|
-
in the `Subscription.criteria` element.
|
30
|
-
))
|
31
|
-
end
|
32
|
-
|
33
|
-
filter_criteria = subscription.dig('_criteria', 'extension')
|
34
|
-
&.select do |ext|
|
35
|
-
ext['url'] == 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-filter-criteria'
|
36
|
-
end
|
37
|
-
unless filter_criteria&.length == 1
|
38
|
-
add_message('error', %(
|
39
|
-
The created Subscription must include a single filter on the submitting organization
|
40
|
-
in the `Subscription.criteria.extension` element.
|
41
|
-
))
|
42
|
-
end
|
43
|
-
|
44
|
-
assert messages.none? { |msg| msg[:type] == 'error' },
|
45
|
-
'The Created Subscription does not conform to PAS requirements - see messages for details.'
|
26
|
+
verify_pas_subscription(subscription_resource)
|
46
27
|
end
|
47
28
|
end
|
48
29
|
end
|
@@ -19,6 +19,7 @@ module DaVinciPASTestKit
|
|
19
19
|
via the error capability.
|
20
20
|
)
|
21
21
|
makes_request :pa_invalid_inquiry
|
22
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@112', 'hl7.fhir.us.davinci-pas_2.0.1@113'
|
22
23
|
|
23
24
|
run do
|
24
25
|
file_path = File.join(File.dirname(__FILE__), 'nonconformant_pas_bundle.json')
|
@@ -20,7 +20,9 @@ module DaVinciPASTestKit
|
|
20
20
|
|
21
21
|
The server SHOULD respond within 15 seconds.
|
22
22
|
}
|
23
|
-
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@
|
23
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@104', 'hl7.fhir.us.davinci-pas_2.0.1@105',
|
24
|
+
'hl7.fhir.us.davinci-pas_2.0.1@106', 'hl7.fhir.us.davinci-pas_2.0.1@112',
|
25
|
+
'hl7.fhir.us.davinci-pas_2.0.1@113'
|
24
26
|
|
25
27
|
output :response_time
|
26
28
|
makes_request :pa_invalid_request
|