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
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'
|
@@ -14,12 +17,9 @@ module DaVinciPASTestKit
|
|
14
17
|
from the client. Upon receipt, Inferno will generate and send a
|
15
18
|
response with an approved status.
|
16
19
|
)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
Access token that the client will provide in the Authorization header of each request
|
21
|
-
made during this test.
|
22
|
-
)
|
20
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
21
|
+
'hl7.fhir.us.davinci-pas_2.0.1@70', 'hl7.fhir.us.davinci-pas_2.0.1@202'
|
22
|
+
|
23
23
|
input :approval_json_response,
|
24
24
|
title: 'Claim approved response JSON',
|
25
25
|
type: 'textarea',
|
@@ -31,6 +31,19 @@ module DaVinciPASTestKit
|
|
31
31
|
If not provided, an approval response will be generated from the submitted Claim.
|
32
32
|
In either case, the response will be validated against the PAS Response Bundle profile.
|
33
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
|
+
|
34
47
|
submit_respond_with :approval_json_response
|
35
48
|
|
36
49
|
run do
|
@@ -44,16 +57,17 @@ module DaVinciPASTestKit
|
|
44
57
|
))
|
45
58
|
end
|
46
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
|
+
|
47
63
|
wait(
|
48
|
-
identifier:
|
64
|
+
identifier: wait_identifier,
|
49
65
|
message: %(
|
50
66
|
**Approval Workflow Test**:
|
51
67
|
|
52
68
|
Submit a PAS request to
|
53
69
|
|
54
|
-
`#{
|
55
|
-
|
56
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
70
|
+
`#{submit_endpoint}`
|
57
71
|
|
58
72
|
If the optional '**#{input_title(:approval_json_response)}**' input is populated, it will
|
59
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
|
@@ -14,12 +17,9 @@ module DaVinciPASTestKit
|
|
14
17
|
from the client. Upon receipt, Inferno will respond with the
|
15
18
|
provided denial response.
|
16
19
|
)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
Access token that the client will provide in the Authorization header of each request
|
21
|
-
made during this test.
|
22
|
-
)
|
20
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
21
|
+
'hl7.fhir.us.davinci-pas_2.0.1@70', 'hl7.fhir.us.davinci-pas_2.0.1@202'
|
22
|
+
|
23
23
|
input :denial_json_response,
|
24
24
|
title: 'Claim denied response JSON',
|
25
25
|
type: 'textarea',
|
@@ -31,6 +31,18 @@ module DaVinciPASTestKit
|
|
31
31
|
If not provided, a denial response will be generated from the submitted Claim.
|
32
32
|
In either case, the response will be validated against the PAS Response Bundle profile.
|
33
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
|
34
46
|
submit_respond_with :denial_json_response
|
35
47
|
|
36
48
|
run do
|
@@ -44,16 +56,17 @@ module DaVinciPASTestKit
|
|
44
56
|
))
|
45
57
|
end
|
46
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
|
+
|
47
62
|
wait(
|
48
|
-
identifier:
|
63
|
+
identifier: wait_identifier,
|
49
64
|
message: %(
|
50
65
|
**Denial Workflow Test**:
|
51
66
|
|
52
67
|
Submit a PAS request to
|
53
68
|
|
54
|
-
`#{
|
55
|
-
|
56
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
69
|
+
`#{submit_endpoint}`
|
57
70
|
|
58
71
|
If the optional '**#{input_title(:denial_json_response)}**' input is populated, it will
|
59
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
|
@@ -34,6 +34,10 @@ module DaVinciPASTestKit
|
|
34
34
|
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
|
35
35
|
for additional details.
|
36
36
|
)
|
37
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@75', 'hl7.fhir.us.davinci-pas_2.0.1@121',
|
38
|
+
'hl7.fhir.us.davinci-pas_2.0.1@122', 'hl7.fhir.us.davinci-pas_2.0.1@123',
|
39
|
+
'hl7.fhir.us.davinci-pas_2.0.1@125', 'hl7.fhir.us.davinci-pas_2.0.1@126',
|
40
|
+
'hl7.fhir.us.davinci-pas_2.0.1@127', 'hl7.fhir.us.davinci-pas_2.0.1@128'
|
37
41
|
|
38
42
|
def request_type_tag
|
39
43
|
INQUIRE_TAG
|
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
|
|
@@ -18,13 +21,13 @@ module DaVinciPASTestKit
|
|
18
21
|
notification that the claim has been finalized and expect the
|
19
22
|
client under test to send a follow-up inquiry.
|
20
23
|
)
|
24
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
25
|
+
'hl7.fhir.us.davinci-pas_2.0.1@67', 'hl7.fhir.us.davinci-pas_2.0.1@70',
|
26
|
+
'hl7.fhir.us.davinci-pas_2.0.1@119', 'hl7.fhir.us.davinci-pas_2.0.1@120',
|
27
|
+
'hl7.fhir.us.davinci-pas_2.0.1@153', 'hl7.fhir.us.davinci-pas_2.0.1@202',
|
28
|
+
'hl7.fhir.us.davinci-pas_2.0.1@203'
|
29
|
+
|
21
30
|
config options: { accepts_multiple_requests: true }
|
22
|
-
input :access_token,
|
23
|
-
title: 'Access Token',
|
24
|
-
description: %(
|
25
|
-
Access token that the client will provide in the Authorization header of each request
|
26
|
-
made during this test.
|
27
|
-
)
|
28
31
|
input :notification_bundle,
|
29
32
|
title: 'Claim updated notification JSON',
|
30
33
|
type: 'textarea',
|
@@ -71,6 +74,19 @@ module DaVinciPASTestKit
|
|
71
74
|
in the `channel.header` element. If a value for the `authorization` header is provided in
|
72
75
|
`channel.header`, this value will override it.
|
73
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
|
+
|
74
90
|
submit_respond_with :pended_json_response
|
75
91
|
inquire_respond_with :inquire_json_response
|
76
92
|
|
@@ -114,17 +130,19 @@ module DaVinciPASTestKit
|
|
114
130
|
))
|
115
131
|
end
|
116
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
|
+
|
117
137
|
wait(
|
118
|
-
identifier:
|
138
|
+
identifier: wait_identifier,
|
119
139
|
timeout: 600,
|
120
140
|
message: %(
|
121
141
|
**Pended Workflow Test**:
|
122
142
|
|
123
143
|
1. Submit a PAS request to
|
124
144
|
|
125
|
-
`#{
|
126
|
-
|
127
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
145
|
+
`#{submit_endpoint}`
|
128
146
|
|
129
147
|
If the optional '**#{input_title(:pended_json_response)}**' input is populated, it will
|
130
148
|
be returned, updated with current timestamps. Otherwise, a pended response will
|
@@ -138,9 +156,7 @@ module DaVinciPASTestKit
|
|
138
156
|
|
139
157
|
3. Once the notification has been received, submit a PAS inquiry request to
|
140
158
|
|
141
|
-
`#{
|
142
|
-
|
143
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
159
|
+
`#{inquire_endpoint}`
|
144
160
|
|
145
161
|
If the optional '**#{input_title(:inquire_json_response)}**' input is populated, it will
|
146
162
|
be returned, updated with current timestamps. Otherwise, an approval response will
|
@@ -152,7 +168,7 @@ module DaVinciPASTestKit
|
|
152
168
|
to be able to faithfully answer the attestations.
|
153
169
|
|
154
170
|
Once the client has completed these steps,
|
155
|
-
[click here to complete the test](#{resume_pass_url}?token=#{
|
171
|
+
[click here to complete the test](#{resume_pass_url}?token=#{wait_identifier})
|
156
172
|
and continue Inferno's evaluation of the interaction.
|
157
173
|
)
|
158
174
|
)
|
@@ -34,6 +34,12 @@ module DaVinciPASTestKit
|
|
34
34
|
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
|
35
35
|
for additional details.
|
36
36
|
)
|
37
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@59',
|
38
|
+
'hl7.fhir.us.davinci-pas_2.0.1@60', 'hl7.fhir.us.davinci-pas_2.0.1@74',
|
39
|
+
'hl7.fhir.us.davinci-pas_2.0.1@75', 'hl7.fhir.us.davinci-pas_2.0.1@76',
|
40
|
+
'hl7.fhir.us.davinci-pas_2.0.1@77', 'hl7.fhir.us.davinci-pas_2.0.1@78',
|
41
|
+
'hl7.fhir.us.davinci-pas_2.0.1@81', 'hl7.fhir.us.davinci-pas_2.0.1@85',
|
42
|
+
'hl7.fhir.us.davinci-pas_2.0.1@86'
|
37
43
|
|
38
44
|
def workflow_tag
|
39
45
|
config.options[:workflow_tag]
|
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'
|
@@ -11,17 +14,29 @@ module DaVinciPASTestKit
|
|
11
14
|
This test allows the client to send $submit 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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@58', 'hl7.fhir.us.davinci-pas_2.0.1@62',
|
18
|
+
'hl7.fhir.us.davinci-pas_2.0.1@70', 'hl7.fhir.us.davinci-pas_2.0.1@202'
|
19
|
+
|
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
|
20
32
|
config options: { accepts_multiple_requests: true }
|
21
33
|
|
22
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
|
+
|
23
38
|
wait(
|
24
|
-
identifier:
|
39
|
+
identifier: wait_identifier,
|
25
40
|
message: %(
|
26
41
|
The client system may now make multiple $submit requests before continuing. These requests should
|
27
42
|
cumulatively demonstrate coverage of all required profiles and all must support elements within those
|
@@ -46,9 +61,9 @@ module DaVinciPASTestKit
|
|
46
61
|
|
47
62
|
Submit PAS requests to
|
48
63
|
|
49
|
-
`#{
|
64
|
+
`#{submit_endpoint}`
|
50
65
|
|
51
|
-
and [click here](#{resume_pass_url}?token=#{
|
66
|
+
and [click here](#{resume_pass_url}?token=#{wait_identifier}) when done.
|
52
67
|
)
|
53
68
|
)
|
54
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'
|
@@ -11,33 +14,43 @@ module DaVinciPASTestKit
|
|
11
14
|
Inferno will wait for a Subscription Creation request
|
12
15
|
and then perform a handshake to activate the Subscription.
|
13
16
|
)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@137', 'hl7.fhir.us.davinci-pas_2.0.1@140',
|
18
|
+
'hl7.fhir.us.davinci-pas_2.0.1@142'
|
19
|
+
|
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
|
20
32
|
input :client_endpoint_access_token,
|
21
33
|
optional: true,
|
22
34
|
title: 'Client Notification Access Token',
|
23
35
|
description: %(
|
24
36
|
The bearer token that Inferno will send on requests to the client under test's rest-hook notification
|
25
|
-
endpoint
|
26
|
-
|
27
|
-
`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.
|
28
40
|
)
|
29
41
|
|
30
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
|
+
|
31
46
|
wait(
|
32
|
-
identifier:
|
47
|
+
identifier: wait_identifier,
|
33
48
|
message: %(
|
34
49
|
**Subscription Creation Test**:
|
35
50
|
|
36
51
|
Submit a POST with a Subscription to:
|
37
52
|
|
38
|
-
`#{
|
39
|
-
|
40
|
-
The request must have an `Authorization` header with the value `Bearer #{access_token}`.
|
53
|
+
`#{subscription_endpoint}`
|
41
54
|
|
42
55
|
Upon receipt, Inferno will send a handshake request to verify that notifications can be
|
43
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 %(
|
@@ -12,36 +16,14 @@ module DaVinciPASTestKit
|
|
12
16
|
Topic](https://hl7.org/fhir/us/davinci-pas/STU2/SubscriptionTopic-PASSubscriptionTopic.html), and
|
13
17
|
- Inclusion of filter criteria for the client's organization.
|
14
18
|
)
|
19
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@143'
|
15
20
|
|
16
21
|
run do
|
17
22
|
load_tagged_requests(SUBSCRIPTION_CREATE_TAG)
|
18
23
|
skip_if(requests.none?, 'Inferno did not receive a Subscription creation request')
|
19
24
|
subscription_resource = request.request_body
|
20
25
|
|
21
|
-
|
22
|
-
subscription = JSON.parse(subscription_resource)
|
23
|
-
|
24
|
-
unless subscription['criteria'] == 'http://hl7.org/fhir/us/davinci-pas/SubscriptionTopic/PASSubscriptionTopic'
|
25
|
-
add_message('error', %(
|
26
|
-
The created Subscription must use the PAS-defined Subscription topic
|
27
|
-
`http://hl7.org/fhir/us/davinci-pas/SubscriptionTopic/PASSubscriptionTopic`
|
28
|
-
in the `Subscription.criteria` element.
|
29
|
-
))
|
30
|
-
end
|
31
|
-
|
32
|
-
filter_criteria = subscription.dig('_criteria', 'extension')
|
33
|
-
&.select do |ext|
|
34
|
-
ext['url'] == 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-filter-criteria'
|
35
|
-
end
|
36
|
-
unless filter_criteria&.length == 1
|
37
|
-
add_message('error', %(
|
38
|
-
The created Subscription must include a single filter on the submitting organization
|
39
|
-
in the `Subscription.criteria.extension` element.
|
40
|
-
))
|
41
|
-
end
|
42
|
-
|
43
|
-
assert messages.none? { |msg| msg[:type] == 'error' },
|
44
|
-
'The Created Subscription does not conform to PAS requirements - see messages for details.'
|
26
|
+
verify_pas_subscription(subscription_resource)
|
45
27
|
end
|
46
28
|
end
|
47
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,6 +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@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'
|
23
26
|
|
24
27
|
output :response_time
|
25
28
|
makes_request :pa_invalid_request
|
@@ -1,40 +1,44 @@
|
|
1
|
+
require_relative '../../../urls'
|
2
|
+
|
1
3
|
module DaVinciPASTestKit
|
2
4
|
module DaVinciPASV201
|
5
|
+
# TODO: none of file name, class name, or ID match
|
3
6
|
class PasUpdateNotificationTest < Inferno::Test
|
7
|
+
include URLs
|
4
8
|
id :prior_auth_claim_response_update_notification_validation
|
5
9
|
title 'Server notifies the client that the pended claim was updated.'
|
6
10
|
description %(
|
7
11
|
This test validates that the server can notify the client that a final
|
8
12
|
decision has been made about a pended claim so that the client can query
|
9
|
-
for the details.
|
10
|
-
|
11
|
-
the pended workflow. In the future, Inferno will validate that the server
|
12
|
-
can accept requests for a subscription and send notifications alerting the client
|
13
|
-
to the availability of updates to the prior authorization request (see details on this limitation
|
14
|
-
[here](https://github.com/inferno-framework/davinci-pas-test-kit/blob/main/lib/davinci_pas_test_kit/docs/server_suite_description_v201.md#testing-limitations)).
|
13
|
+
for the details. This test depends on prior successful subscription creation in
|
14
|
+
Test Group **1 Subscription Setup**.
|
15
15
|
)
|
16
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@141'
|
17
|
+
|
18
|
+
input :access_token,
|
19
|
+
title: 'Notification Access Token',
|
20
|
+
description: %(
|
21
|
+
An access token that the server under test will send to Inferno on notifications
|
22
|
+
so that the request gets associated with this test session. The token must be
|
23
|
+
provided as a `Bearer` token in the `Authorization` header of HTTP requests
|
24
|
+
sent to Inferno.
|
25
|
+
)
|
16
26
|
|
17
27
|
run do
|
18
|
-
token = SecureRandom.hex(32)
|
19
|
-
# rubocop:disable Layout/LineLength
|
20
28
|
wait(
|
21
|
-
identifier:
|
29
|
+
identifier: "notification #{access_token}",
|
22
30
|
message: %(
|
23
|
-
Inferno has received a 'Pended' claim response indicating that a final decision
|
24
|
-
|
31
|
+
Inferno has received a 'Pended' claim response indicating that a final decision has not yet been made on the
|
32
|
+
prior authorization request.
|
25
33
|
|
26
|
-
|
27
|
-
|
28
|
-
here](#{Inferno::Application['base_url']}/custom/davinci_pas_server_suite_v201/resume_after_notification?token=#{token})**
|
29
|
-
when the status of this claim has been finalized to inform Inferno to resume testing.
|
34
|
+
Inferno will now wait for a notification at its rest-hook endpoint before making an $inquire request.
|
35
|
+
Inferno will automatically resume when a notification is received.
|
30
36
|
|
31
|
-
|
32
|
-
|
33
|
-
[here](
|
34
|
-
for more details on this current limitation).
|
37
|
+
_If the server is unable to send a notification or if Inferno has not automatically resumed after the server
|
38
|
+
attempted to send a notification, you may
|
39
|
+
**[click here](#{resume_skip_url}?token=notification+#{access_token})** to skip this test._
|
35
40
|
)
|
36
41
|
)
|
37
|
-
# rubocop:enable Layout/LineLength
|
38
42
|
end
|
39
43
|
end
|
40
44
|
end
|