davinci_pas_test_kit 0.10.0 → 0.11.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/lib/davinci_pas_test_kit/custom_groups/v2.0.1/notification/pas_subscription_notification_test.rb +3 -2
- data/lib/davinci_pas_test_kit/docs/client_suite_description_v201.md +8 -1
- data/lib/davinci_pas_test_kit/docs/server_suite_description_v201.md +8 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/{client_inquiry_request_beneficiary_must_support_test.rb → client_inquire_request_beneficiary_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/client_submit_request_beneficiary_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/metadata.yml +6 -6
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/{server_inquiry_request_beneficiary_must_support_test.rb → server_inquire_request_beneficiary_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/{server_inquiry_response_beneficiary_must_support_test.rb → server_inquire_response_beneficiary_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_submit_request_beneficiary_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_submit_response_beneficiary_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/{client_inquiry_request_claim_inquiry_must_support_test.rb → client_inquire_request_claim_inquiry_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/metadata.yml +4 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/{server_inquiry_request_claim_inquiry_must_support_test.rb → server_inquire_request_claim_inquiry_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/client_submit_request_claim_update_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/server_submit_request_claim_update_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/metadata.yml +2 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/{server_inquiry_response_claiminquiryresponse_must_support_test.rb → server_inquire_response_claiminquiryresponse_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/server_submit_response_claimresponse_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_denial_pas_response_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pas_request_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_inquiry_request_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_response_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/server_submit_response_communication_request_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/{client_inquiry_request_coverage_must_support_test.rb → client_inquire_request_coverage_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/client_submit_request_coverage_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/metadata.yml +4 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/{server_inquiry_request_coverage_must_support_test.rb → server_inquire_request_coverage_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/server_submit_request_coverage_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/client_submit_request_device_request_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/server_submit_request_device_request_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/client_submit_request_encounter_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/server_submit_request_encounter_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/{client_inquiry_request_insurer_must_support_test.rb → client_inquire_request_insurer_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/client_submit_request_insurer_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/metadata.yml +6 -6
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/{server_inquiry_request_insurer_must_support_test.rb → server_inquire_request_insurer_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/{server_inquiry_response_insurer_must_support_test.rb → server_inquire_response_insurer_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_submit_request_insurer_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_submit_response_insurer_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/client_submit_request_medication_request_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/server_submit_request_medication_request_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/client_submit_request_nutrition_order_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/server_submit_request_nutrition_order_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_client_inquiry_must_support_use_case_group.rb +18 -18
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/{client_inquiry_request_pas_inquiry_request_bundle_must_support_test.rb → client_inquire_request_pas_inquiry_request_bundle_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/metadata.yml +4 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/{server_inquiry_request_pas_inquiry_request_bundle_must_support_test.rb → server_inquire_request_pas_inquiry_request_bundle_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/metadata.yml +2 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/{server_inquiry_response_pas_inquiry_response_bundle_must_support_test.rb → server_inquire_response_pas_inquiry_response_bundle_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/client_submit_request_pas_request_bundle_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_pas_request_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_submit_request_pas_request_bundle_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_pas_response_bundle_validation_test.rb +8 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_submit_response_pas_response_bundle_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_must_support_use_case_group.rb +34 -34
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/{client_inquiry_request_practitioner_must_support_test.rb → client_inquire_request_practitioner_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/client_submit_request_practitioner_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/metadata.yml +6 -6
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/{server_inquiry_request_practitioner_must_support_test.rb → server_inquire_request_practitioner_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/{server_inquiry_response_practitioner_must_support_test.rb → server_inquire_response_practitioner_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_submit_request_practitioner_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_submit_response_practitioner_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/{client_inquiry_request_practitioner_role_must_support_test.rb → client_inquire_request_practitioner_role_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/client_submit_request_practitioner_role_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/metadata.yml +6 -6
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/{server_inquiry_request_practitioner_role_must_support_test.rb → server_inquire_request_practitioner_role_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/{server_inquiry_response_practitioner_role_must_support_test.rb → server_inquire_response_practitioner_role_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_submit_request_practitioner_role_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_submit_response_practitioner_role_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/{client_inquiry_request_requestor_must_support_test.rb → client_inquire_request_requestor_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/client_submit_request_requestor_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/metadata.yml +6 -6
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/{server_inquiry_request_requestor_must_support_test.rb → server_inquire_request_requestor_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/{server_inquiry_response_requestor_must_support_test.rb → server_inquire_response_requestor_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_submit_request_requestor_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_submit_response_requestor_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/server_suite.rb +18 -9
- data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/client_submit_request_service_request_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/server_submit_request_service_request_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/{client_inquiry_request_subscriber_must_support_test.rb → client_inquire_request_subscriber_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/client_submit_request_subscriber_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/metadata.yml +4 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/{server_inquiry_request_subscriber_must_support_test.rb → server_inquire_request_subscriber_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/server_submit_request_subscriber_must_support_test.rb +3 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/metadata.yml +2 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/{server_inquiry_response_task_must_support_test.rb → server_inquire_response_task_must_support_test.rb} +5 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/server_submit_response_task_must_support_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generator/group_generator.rb +3 -3
- data/lib/davinci_pas_test_kit/generator/must_support_test_generator.rb +3 -3
- data/lib/davinci_pas_test_kit/generator/validation_test_generator.rb +8 -0
- data/lib/davinci_pas_test_kit/pas_bundle_validation.rb +7 -31
- data/lib/davinci_pas_test_kit/version.rb +2 -2
- metadata +30 -30
|
@@ -4,7 +4,7 @@ require_relative '../../../tags'
|
|
|
4
4
|
|
|
5
5
|
module DaVinciPASTestKit
|
|
6
6
|
module DaVinciPASV201
|
|
7
|
-
class
|
|
7
|
+
class ServerInquireResponseRequestorMustSupportTest < Inferno::Test
|
|
8
8
|
include DaVinciPASTestKit::MustSupportTest
|
|
9
9
|
|
|
10
10
|
title 'All must support elements for Profile PAS Requestor Organization are observed across all instances returned'
|
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
responses, including instances of the PAS Requestor Organization Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Requestor Organization
|
|
17
|
-
Profile on responses returned by the server to ensure that the following
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* Organization.active
|
|
@@ -35,7 +35,7 @@ module DaVinciPASTestKit
|
|
|
35
35
|
* Organization.type
|
|
36
36
|
)
|
|
37
37
|
|
|
38
|
-
id :
|
|
38
|
+
id :pas_server_inquire_response_v201_requestor_must_support_test
|
|
39
39
|
|
|
40
40
|
def resource_type
|
|
41
41
|
'Organization'
|
|
@@ -50,7 +50,8 @@ module DaVinciPASTestKit
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def scratch_resources
|
|
53
|
-
scratch
|
|
53
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
54
|
+
scratch[:inquire_response_resources] ||= {}
|
|
54
55
|
end
|
|
55
56
|
|
|
56
57
|
def resources_of_interest
|
|
@@ -11,12 +11,12 @@ module DaVinciPASTestKit
|
|
|
11
11
|
description %(
|
|
12
12
|
|
|
13
13
|
**USER INPUT VALIDATION**: This test validates input provided by the user instead of the system under test. Errors encountered will be treated as a skip instead of a failure.
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
PAS server systems are required to be able to receive all
|
|
16
16
|
must support elements on instances of all profiles included in
|
|
17
17
|
requests, including instances of the PAS Requestor Organization Profile.
|
|
18
18
|
This test checks all identified instances of the PAS Requestor Organization
|
|
19
|
-
Profile on requests sent to the server to ensure that the following
|
|
19
|
+
Profile on requests sent to the server to ensure that the following
|
|
20
20
|
must support elements are observed:
|
|
21
21
|
|
|
22
22
|
* Organization.active
|
|
@@ -52,6 +52,7 @@ module DaVinciPASTestKit
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def scratch_resources
|
|
55
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
55
56
|
scratch[:submit_request_resources] ||= {}
|
|
56
57
|
end
|
|
57
58
|
|
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
responses, including instances of the PAS Requestor Organization Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Requestor Organization
|
|
17
|
-
Profile on responses returned by the server to ensure that the following
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* Organization.active
|
|
@@ -50,6 +50,7 @@ module DaVinciPASTestKit
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def scratch_resources
|
|
53
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
53
54
|
scratch[:submit_response_resources] ||= {}
|
|
54
55
|
end
|
|
55
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require_relative '../../validator_suppressions'
|
|
2
2
|
require_relative '../../custom_groups/v2.0.1/pas_error_group'
|
|
3
|
-
require_relative '../../version
|
|
3
|
+
require_relative '../../version'
|
|
4
4
|
require_relative 'pas_server_approval_use_case_group'
|
|
5
5
|
require_relative 'pas_server_denial_use_case_group'
|
|
6
6
|
require_relative 'pas_server_pended_use_case_group'
|
|
@@ -15,12 +15,12 @@ module DaVinciPASTestKit
|
|
|
15
15
|
description File.read(File.join(__dir__, '..', '..', 'docs', 'server_suite_description_v201.md'))
|
|
16
16
|
|
|
17
17
|
links [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
{
|
|
19
|
+
label: 'Report Issue',
|
|
20
|
+
url: 'https://github.com/inferno-framework/davinci-pas-test-kit/issues/'
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
|
|
23
|
+
label: 'Open Source',
|
|
24
24
|
url: 'https://github.com/inferno-framework/davinci-pas-test-kit/'
|
|
25
25
|
},
|
|
26
26
|
{
|
|
@@ -30,7 +30,7 @@ module DaVinciPASTestKit
|
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
resume_test_route :get, '/resume_after_notification' do |request|
|
|
33
|
-
request.query_parameters['
|
|
33
|
+
request.query_parameters['token']
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
fhir_resource_validator do
|
|
@@ -50,12 +50,21 @@ module DaVinciPASTestKit
|
|
|
50
50
|
|
|
51
51
|
input :smart_credentials,
|
|
52
52
|
title: 'OAuth Credentials',
|
|
53
|
-
type: :
|
|
53
|
+
type: :auth_info,
|
|
54
|
+
options: {
|
|
55
|
+
mode: 'access',
|
|
56
|
+
components: [
|
|
57
|
+
{
|
|
58
|
+
name: :auth_type,
|
|
59
|
+
default: 'backend_services'
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
54
63
|
optional: true
|
|
55
64
|
|
|
56
65
|
fhir_client do
|
|
57
66
|
url :server_endpoint
|
|
58
|
-
|
|
67
|
+
auth_info :smart_credentials
|
|
59
68
|
end
|
|
60
69
|
|
|
61
70
|
# Used for attestation experiment - see pas_claim_response_decision_test.rb
|
|
@@ -66,7 +75,7 @@ module DaVinciPASTestKit
|
|
|
66
75
|
# resume_test_route :get, RESUME_FAIL_PATH, result: 'fail' do |request|
|
|
67
76
|
# request.query_parameters['token']
|
|
68
77
|
# end
|
|
69
|
-
|
|
78
|
+
|
|
70
79
|
group 'Demonstrate Workflow Support' do
|
|
71
80
|
description %(
|
|
72
81
|
The workflow tests validate that the server can participate in complete
|
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
requests, including instances of the PAS Service Request Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Service Request
|
|
17
|
-
Profile on requests sent by the client to ensure that the following
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* ServiceRequest.code
|
|
@@ -40,6 +40,7 @@ module DaVinciPASTestKit
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def scratch_resources
|
|
43
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
43
44
|
scratch[:submit_request_resources] ||= {}
|
|
44
45
|
end
|
|
45
46
|
|
|
@@ -11,12 +11,12 @@ module DaVinciPASTestKit
|
|
|
11
11
|
description %(
|
|
12
12
|
|
|
13
13
|
**USER INPUT VALIDATION**: This test validates input provided by the user instead of the system under test. Errors encountered will be treated as a skip instead of a failure.
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
PAS server systems are required to be able to receive all
|
|
16
16
|
must support elements on instances of all profiles included in
|
|
17
17
|
requests, including instances of the PAS Service Request Profile.
|
|
18
18
|
This test checks all identified instances of the PAS Service Request
|
|
19
|
-
Profile on requests sent to the server to ensure that the following
|
|
19
|
+
Profile on requests sent to the server to ensure that the following
|
|
20
20
|
must support elements are observed:
|
|
21
21
|
|
|
22
22
|
* ServiceRequest.code
|
|
@@ -42,6 +42,7 @@ module DaVinciPASTestKit
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def scratch_resources
|
|
45
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
45
46
|
scratch[:submit_request_resources] ||= {}
|
|
46
47
|
end
|
|
47
48
|
|
|
@@ -4,7 +4,7 @@ require_relative '../../../tags'
|
|
|
4
4
|
|
|
5
5
|
module DaVinciPASTestKit
|
|
6
6
|
module DaVinciPASV201
|
|
7
|
-
class
|
|
7
|
+
class ClientInquireRequestSubscriberMustSupportTest < Inferno::Test
|
|
8
8
|
include DaVinciPASTestKit::MustSupportTest
|
|
9
9
|
|
|
10
10
|
title 'All must support elements for Profile PAS Subscriber Patient are observed across all instances submitted'
|
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
requests, including instances of the PAS Subscriber Patient Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Subscriber Patient
|
|
17
|
-
Profile on requests sent by the client to ensure that the following
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* Patient.address
|
|
@@ -46,7 +46,7 @@ module DaVinciPASTestKit
|
|
|
46
46
|
* Patient.telecom.value
|
|
47
47
|
)
|
|
48
48
|
|
|
49
|
-
id :
|
|
49
|
+
id :pas_client_inquire_request_v201_subscriber_must_support_test
|
|
50
50
|
|
|
51
51
|
def resource_type
|
|
52
52
|
'Patient'
|
|
@@ -61,7 +61,8 @@ module DaVinciPASTestKit
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def scratch_resources
|
|
64
|
-
scratch
|
|
64
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
65
|
+
scratch[:inquire_request_resources] ||= {}
|
|
65
66
|
end
|
|
66
67
|
|
|
67
68
|
def resources_of_interest
|
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
requests, including instances of the PAS Subscriber Patient Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Subscriber Patient
|
|
17
|
-
Profile on requests sent by the client to ensure that the following
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* Patient.address
|
|
@@ -61,6 +61,7 @@ module DaVinciPASTestKit
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def scratch_resources
|
|
64
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
64
65
|
scratch[:submit_request_resources] ||= {}
|
|
65
66
|
end
|
|
66
67
|
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
:file_name: server_submit_request_subscriber_must_support_test.rb
|
|
153
153
|
- :id: pas_client_submit_request_v201_subscriber_must_support_test
|
|
154
154
|
:file_name: client_submit_request_subscriber_must_support_test.rb
|
|
155
|
-
- :id:
|
|
156
|
-
:file_name:
|
|
157
|
-
- :id:
|
|
158
|
-
:file_name:
|
|
155
|
+
- :id: pas_server_inquire_request_v201_subscriber_must_support_test
|
|
156
|
+
:file_name: server_inquire_request_subscriber_must_support_test.rb
|
|
157
|
+
- :id: pas_client_inquire_request_v201_subscriber_must_support_test
|
|
158
|
+
:file_name: client_inquire_request_subscriber_must_support_test.rb
|
|
159
159
|
:delayed_references: []
|
|
@@ -4,19 +4,19 @@ require_relative '../../../tags'
|
|
|
4
4
|
|
|
5
5
|
module DaVinciPASTestKit
|
|
6
6
|
module DaVinciPASV201
|
|
7
|
-
class
|
|
7
|
+
class ServerInquireRequestSubscriberMustSupportTest < Inferno::Test
|
|
8
8
|
include DaVinciPASTestKit::MustSupportTest
|
|
9
9
|
|
|
10
10
|
title 'All must support elements for Profile PAS Subscriber Patient are observed across all instances submitted'
|
|
11
11
|
description %(
|
|
12
12
|
|
|
13
13
|
**USER INPUT VALIDATION**: This test validates input provided by the user instead of the system under test. Errors encountered will be treated as a skip instead of a failure.
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
PAS server systems are required to be able to receive all
|
|
16
16
|
must support elements on instances of all profiles included in
|
|
17
17
|
requests, including instances of the PAS Subscriber Patient Profile.
|
|
18
18
|
This test checks all identified instances of the PAS Subscriber Patient
|
|
19
|
-
Profile on requests sent to the server to ensure that the following
|
|
19
|
+
Profile on requests sent to the server to ensure that the following
|
|
20
20
|
must support elements are observed:
|
|
21
21
|
|
|
22
22
|
* Patient.address
|
|
@@ -48,7 +48,7 @@ module DaVinciPASTestKit
|
|
|
48
48
|
* Patient.telecom.value
|
|
49
49
|
)
|
|
50
50
|
|
|
51
|
-
id :
|
|
51
|
+
id :pas_server_inquire_request_v201_subscriber_must_support_test
|
|
52
52
|
|
|
53
53
|
def resource_type
|
|
54
54
|
'Patient'
|
|
@@ -63,6 +63,7 @@ module DaVinciPASTestKit
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def scratch_resources
|
|
66
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
66
67
|
scratch[:inquire_request_resources] ||= {}
|
|
67
68
|
end
|
|
68
69
|
|
|
@@ -11,12 +11,12 @@ module DaVinciPASTestKit
|
|
|
11
11
|
description %(
|
|
12
12
|
|
|
13
13
|
**USER INPUT VALIDATION**: This test validates input provided by the user instead of the system under test. Errors encountered will be treated as a skip instead of a failure.
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
PAS server systems are required to be able to receive all
|
|
16
16
|
must support elements on instances of all profiles included in
|
|
17
17
|
requests, including instances of the PAS Subscriber Patient Profile.
|
|
18
18
|
This test checks all identified instances of the PAS Subscriber Patient
|
|
19
|
-
Profile on requests sent to the server to ensure that the following
|
|
19
|
+
Profile on requests sent to the server to ensure that the following
|
|
20
20
|
must support elements are observed:
|
|
21
21
|
|
|
22
22
|
* Patient.address
|
|
@@ -63,6 +63,7 @@ module DaVinciPASTestKit
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def scratch_resources
|
|
66
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
66
67
|
scratch[:submit_request_resources] ||= {}
|
|
67
68
|
end
|
|
68
69
|
|
|
@@ -187,6 +187,6 @@
|
|
|
187
187
|
:tests:
|
|
188
188
|
- :id: pas_server_submit_response_v201_task_must_support_test
|
|
189
189
|
:file_name: server_submit_response_task_must_support_test.rb
|
|
190
|
-
- :id:
|
|
191
|
-
:file_name:
|
|
190
|
+
- :id: pas_server_inquire_response_v201_task_must_support_test
|
|
191
|
+
:file_name: server_inquire_response_task_must_support_test.rb
|
|
192
192
|
:delayed_references: []
|
|
@@ -4,7 +4,7 @@ require_relative '../../../tags'
|
|
|
4
4
|
|
|
5
5
|
module DaVinciPASTestKit
|
|
6
6
|
module DaVinciPASV201
|
|
7
|
-
class
|
|
7
|
+
class ServerInquireResponseTaskMustSupportTest < Inferno::Test
|
|
8
8
|
include DaVinciPASTestKit::MustSupportTest
|
|
9
9
|
|
|
10
10
|
title 'All must support elements for Profile PAS Task are observed across all instances returned'
|
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
responses, including instances of the PAS Task Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Task
|
|
17
|
-
Profile on responses returned by the server to ensure that the following
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* Task.code
|
|
@@ -33,7 +33,7 @@ module DaVinciPASTestKit
|
|
|
33
33
|
* Task.statusReason
|
|
34
34
|
)
|
|
35
35
|
|
|
36
|
-
id :
|
|
36
|
+
id :pas_server_inquire_response_v201_task_must_support_test
|
|
37
37
|
|
|
38
38
|
def resource_type
|
|
39
39
|
'Task'
|
|
@@ -48,7 +48,8 @@ module DaVinciPASTestKit
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def scratch_resources
|
|
51
|
-
scratch
|
|
51
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
52
|
+
scratch[:inquire_response_resources] ||= {}
|
|
52
53
|
end
|
|
53
54
|
|
|
54
55
|
def resources_of_interest
|
data/lib/davinci_pas_test_kit/generated/v2.0.1/task/server_submit_response_task_must_support_test.rb
CHANGED
|
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
|
|
|
14
14
|
must support elements on instances of all profiles included in
|
|
15
15
|
responses, including instances of the PAS Task Profile.
|
|
16
16
|
This test checks all identified instances of the PAS Task
|
|
17
|
-
Profile on responses returned by the server to ensure that the following
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
18
|
must support elements are observed:
|
|
19
19
|
|
|
20
20
|
* Task.code
|
|
@@ -48,6 +48,7 @@ module DaVinciPASTestKit
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def scratch_resources
|
|
51
|
+
# The scratch key in MS test should be the same as the scratch key in the validation test for a given profile.
|
|
51
52
|
scratch[:submit_response_resources] ||= {}
|
|
52
53
|
end
|
|
53
54
|
|
|
@@ -147,12 +147,12 @@ module DaVinciPASTestKit
|
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
def inquiry_request_must_support_test_ids
|
|
150
|
-
@inquiry_request_must_support_test_ids ||= select_test_ids(['
|
|
150
|
+
@inquiry_request_must_support_test_ids ||= select_test_ids(['inquire_request', 'must_support_test'], ['client'])
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
def client_inquiry_request_must_support_test_ids
|
|
154
154
|
@client_inquiry_request_must_support_test_ids ||= select_test_ids(
|
|
155
|
-
['
|
|
155
|
+
['inquire_request', 'must_support_test'],
|
|
156
156
|
['server']
|
|
157
157
|
).unshift(pas_client_must_support_test_id)
|
|
158
158
|
end
|
|
@@ -162,7 +162,7 @@ module DaVinciPASTestKit
|
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
def inquiry_response_must_support_test_ids
|
|
165
|
-
@inquiry_response_must_support_test_ids ||= select_test_ids(['
|
|
165
|
+
@inquiry_response_must_support_test_ids ||= select_test_ids(['inquire_response', 'must_support_test'])
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
def submit_operation_test_ids
|
|
@@ -27,10 +27,10 @@ module DaVinciPASTestKit
|
|
|
27
27
|
submit_response_groups.each { |group| new(group, base_output_dir, 'submit_response').generate }
|
|
28
28
|
|
|
29
29
|
inquiry_request_groups.each do |group|
|
|
30
|
-
new(group, base_output_dir, '
|
|
31
|
-
new(group, base_output_dir, '
|
|
30
|
+
new(group, base_output_dir, 'inquire_request').generate
|
|
31
|
+
new(group, base_output_dir, 'inquire_request', 'client').generate
|
|
32
32
|
end
|
|
33
|
-
inquiry_response_groups.each { |group| new(group, base_output_dir, '
|
|
33
|
+
inquiry_response_groups.each { |group| new(group, base_output_dir, 'inquire_response').generate }
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
@@ -151,6 +151,14 @@ module DaVinciPASTestKit
|
|
|
151
151
|
|
|
152
152
|
Note that because X12 value sets are not public, elements bound to value
|
|
153
153
|
sets containing X12 codes are not validated.
|
|
154
|
+
|
|
155
|
+
**Limitations**
|
|
156
|
+
|
|
157
|
+
Due to recognized errors in the PAS IG around extension context definitions,
|
|
158
|
+
this test may not pass due to spurious errors of the form "The extension
|
|
159
|
+
[extension url] is not allowed at this point". See [this
|
|
160
|
+
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
|
|
161
|
+
for additional details.
|
|
154
162
|
DESCRIPTION
|
|
155
163
|
end
|
|
156
164
|
|
|
@@ -282,10 +282,14 @@ module DaVinciPASTestKit
|
|
|
282
282
|
# @param bundle_map [Hash] A map of the bundle contents.
|
|
283
283
|
# @param version [String] The FHIR version.
|
|
284
284
|
def process_reference_element(reference_element, current_entry, bundle_entry, bundle_map, version)
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
fhirpath_result = evaluate_fhirpath(resource: current_entry.resource, path: reference_element[:path])
|
|
286
|
+
reference_element_values = fhirpath_result.filter_map do |entry|
|
|
287
|
+
entry['element']&.reference if entry['type'] == 'Reference'
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
referenced_instances = reference_element_values.filter_map do |value|
|
|
287
291
|
find_referenced_instance_in_bundle(value, current_entry.fullUrl, bundle_map)
|
|
288
|
-
end
|
|
292
|
+
end
|
|
289
293
|
|
|
290
294
|
referenced_instances.each do |instance|
|
|
291
295
|
process_instance_profiles(instance, bundle_entry, reference_element, version)
|
|
@@ -363,34 +367,6 @@ module DaVinciPASTestKit
|
|
|
363
367
|
end
|
|
364
368
|
end
|
|
365
369
|
|
|
366
|
-
# Evaluates a FHIRPath expression against a FHIR resource using an external FHIRPath validator.
|
|
367
|
-
# @param resource [Object] The FHIR resource to be evaluated.
|
|
368
|
-
# @param expression [String] The FHIRPath expression to evaluate.
|
|
369
|
-
# @return [Array] An array of references extracted from the evaluation result, or an empty array in case of failure.
|
|
370
|
-
def evaluate_fhirpath_expression(resource, expression)
|
|
371
|
-
return [] unless expression && resource
|
|
372
|
-
|
|
373
|
-
logger = Logger.new($stdout)
|
|
374
|
-
begin
|
|
375
|
-
fhirpath_url = ENV.fetch('FHIRPATH_URL')
|
|
376
|
-
path = "#{fhirpath_url}/evaluate?path=#{expression}"
|
|
377
|
-
|
|
378
|
-
response = Faraday.post(path, resource.to_json, 'Content-Type' => 'application/json')
|
|
379
|
-
if response.status.to_s.start_with? '2'
|
|
380
|
-
result = JSON.parse(response.body)
|
|
381
|
-
return result.map { |entry| entry.dig('element', 'reference') if entry['type'] == 'Reference' }.compact
|
|
382
|
-
else
|
|
383
|
-
logger.error "External FHIRPath service failed: #{response.status}"
|
|
384
|
-
raise 'FHIRPath service not available'
|
|
385
|
-
end
|
|
386
|
-
rescue Faraday::Error => e
|
|
387
|
-
logger.error "HTTP request failed: #{e.message}"
|
|
388
|
-
raise 'FHIRPath service not available'
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
[]
|
|
392
|
-
end
|
|
393
|
-
|
|
394
370
|
# Finds a referenced instance in a FHIR bundle based on a reference and the full URL of the enclosing entry.
|
|
395
371
|
# @param reference [String] The reference to find.
|
|
396
372
|
# @param enclosing_entry_fullurl [String] The full URL of the enclosing entry.
|