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
@@ -64,6 +64,7 @@ module DaVinciPASTestKit
|
|
64
64
|
)
|
65
65
|
|
66
66
|
id :pas_server_v201_must_support_use_case
|
67
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@33'
|
67
68
|
|
68
69
|
|
69
70
|
def use_case
|
@@ -143,6 +144,7 @@ module DaVinciPASTestKit
|
|
143
144
|
end
|
144
145
|
group do
|
145
146
|
title '[USER INPUT VALIDATION] Submit Request Must Support'
|
147
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@35'
|
146
148
|
|
147
149
|
test from: :pas_server_submit_v201_must_support_requirement
|
148
150
|
test from: :pas_server_submit_request_v201_pas_request_bundle_must_support_test
|
@@ -235,6 +237,7 @@ module DaVinciPASTestKit
|
|
235
237
|
end
|
236
238
|
group do
|
237
239
|
title '[USER INPUT VALIDATION] Inquiry Request Must Support'
|
240
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@36'
|
238
241
|
|
239
242
|
test from: :pas_server_inquire_request_v201_pas_inquiry_request_bundle_must_support_test
|
240
243
|
test from: :pas_server_inquire_request_v201_claim_inquiry_must_support_test
|
@@ -30,7 +30,6 @@ module DaVinciPASTestKit
|
|
30
30
|
'pended'
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
33
|
group do
|
35
34
|
title 'Server can respond to claims submitted for prior authorization'
|
36
35
|
|
@@ -60,9 +59,17 @@ module DaVinciPASTestKit
|
|
60
59
|
test from: :prior_auth_claim_response_decision_validation
|
61
60
|
end
|
62
61
|
group do
|
63
|
-
title 'Server can respond to claims submitted for inquiry'
|
62
|
+
title 'Server can notify client of updates and respond to claims submitted for inquiry'
|
64
63
|
|
65
|
-
test from: :prior_auth_claim_response_update_notification_validation
|
64
|
+
test from: :prior_auth_claim_response_update_notification_validation,
|
65
|
+
input: :pended_pa_submit_request_payload
|
66
|
+
test from: :subscriptions_r4_server_notification_conformance do
|
67
|
+
config options: { subscription_type: 'id-only' }
|
68
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@145'
|
69
|
+
input :pended_pa_submit_request_payload
|
70
|
+
end
|
71
|
+
test from: :subscriptions_r4_server_id_only_conformance,
|
72
|
+
input: :pended_pa_submit_request_payload
|
66
73
|
test from: :pas_server_v201_pas_inquiry_request_bundle_validation_test
|
67
74
|
test from: :pas_v201_claim_inquiry_operation_test do
|
68
75
|
id :pas_v201_claim_inquiry_operation_test_pended
|
@@ -20,9 +20,13 @@
|
|
20
20
|
- :path: practitioner
|
21
21
|
:types:
|
22
22
|
- Reference
|
23
|
+
:target_profiles:
|
24
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitioner
|
23
25
|
- :path: organization
|
24
26
|
:types:
|
25
27
|
- Reference
|
28
|
+
:target_profiles:
|
29
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-organization
|
26
30
|
:mandatory_elements:
|
27
31
|
- PractitionerRole.practitioner
|
28
32
|
- PractitionerRole.notAvailable.description
|
@@ -17,13 +17,15 @@
|
|
17
17
|
:must_supports:
|
18
18
|
:extensions: []
|
19
19
|
:slices:
|
20
|
-
- :
|
20
|
+
- :slice_id: Organization.identifier:NPI
|
21
|
+
:slice_name: NPI
|
21
22
|
:path: identifier
|
22
23
|
:discriminator:
|
23
24
|
:type: patternIdentifier
|
24
25
|
:path: ''
|
25
26
|
:system: http://hl7.org/fhir/sid/us-npi
|
26
|
-
- :
|
27
|
+
- :slice_id: Organization.identifier:TIN
|
28
|
+
:slice_name: TIN
|
27
29
|
:path: identifier
|
28
30
|
:discriminator:
|
29
31
|
:type: patternIdentifier
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'subscriptions_test_kit'
|
2
1
|
require_relative '../../validator_suppressions'
|
3
2
|
require_relative '../../custom_groups/v2.0.1/pas_error_group'
|
3
|
+
require_relative '../../custom_groups/v2.0.1/pas_server_subscription_setup'
|
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'
|
@@ -32,10 +32,6 @@ module DaVinciPASTestKit
|
|
32
32
|
}
|
33
33
|
]
|
34
34
|
|
35
|
-
resume_test_route :get, '/resume_after_notification' do |request|
|
36
|
-
request.query_parameters['token']
|
37
|
-
end
|
38
|
-
|
39
35
|
fhir_resource_validator do
|
40
36
|
igs 'hl7.fhir.us.davinci-pas#2.0.1'
|
41
37
|
|
@@ -70,6 +66,10 @@ module DaVinciPASTestKit
|
|
70
66
|
auth_info :smart_credentials
|
71
67
|
end
|
72
68
|
|
69
|
+
resume_test_route :get, RESUME_SKIP_PATH, result: 'skip' do |request|
|
70
|
+
request.query_parameters['token']
|
71
|
+
end
|
72
|
+
|
73
73
|
# Used for attestation experiment - see pas_claim_response_decision_test.rb
|
74
74
|
# resume_test_route :get, RESUME_PASS_PATH do |request|
|
75
75
|
# request.query_parameters['token']
|
@@ -79,6 +79,9 @@ module DaVinciPASTestKit
|
|
79
79
|
# request.query_parameters['token']
|
80
80
|
# end
|
81
81
|
|
82
|
+
group from: :pas_server_subscription_setup,
|
83
|
+
id: :pas_server_v201_subscription_setup
|
84
|
+
|
82
85
|
group 'Demonstrate Workflow Support' do
|
83
86
|
description %(
|
84
87
|
The workflow tests validate that the server can participate in complete
|
@@ -27,6 +27,8 @@
|
|
27
27
|
- :path: for
|
28
28
|
:types:
|
29
29
|
- Reference
|
30
|
+
:target_profiles:
|
31
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary
|
30
32
|
- :path: requester
|
31
33
|
:types:
|
32
34
|
- Reference
|
@@ -40,6 +42,8 @@
|
|
40
42
|
- :path: reasonReference
|
41
43
|
:types:
|
42
44
|
- Reference
|
45
|
+
:target_profiles:
|
46
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim
|
43
47
|
- :path: restriction.period
|
44
48
|
- :path: input
|
45
49
|
:mandatory_elements:
|
@@ -36,7 +36,7 @@ module DaVinciPASTestKit
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def output
|
39
|
-
@output ||= ERB.new(template).result(binding)
|
39
|
+
@output ||= ERB.new(template, trim_mode: '-').result(binding)
|
40
40
|
end
|
41
41
|
|
42
42
|
def base_output_file_name
|
@@ -190,13 +190,18 @@ module DaVinciPASTestKit
|
|
190
190
|
inquiry_operation_test_ids + inquiry_response_validation_test_ids
|
191
191
|
end
|
192
192
|
|
193
|
+
def subscription_notification_conformance_test_ids
|
194
|
+
['subscriptions_r4_server_notification_conformance', 'subscriptions_r4_server_id_only_conformance']
|
195
|
+
end
|
196
|
+
|
193
197
|
def grouped_pended_test_ids
|
194
198
|
inquiry_operation = [inquiry_notification_test_id] +
|
199
|
+
subscription_notification_conformance_test_ids +
|
195
200
|
inquiry_request_validation_test_ids +
|
196
201
|
inquiry_operation_test_ids +
|
197
202
|
inquiry_response_validation_test_ids
|
198
203
|
inquiry_tests = {
|
199
|
-
'Server can respond to claims submitted for inquiry' => inquiry_operation
|
204
|
+
'Server can notify client of updates and respond to claims submitted for inquiry' => inquiry_operation
|
200
205
|
}
|
201
206
|
|
202
207
|
grouped_approval_denial_test_ids.merge(inquiry_tests)
|
@@ -217,12 +222,16 @@ module DaVinciPASTestKit
|
|
217
222
|
{
|
218
223
|
'$submit Element Support' => {
|
219
224
|
'Submission of claims to the $submit operation for must support validation' => submit_tests,
|
220
|
-
|
225
|
+
"[USER INPUT VALIDATION] Submit Request Must Support'" \
|
226
|
+
"\n#{' ' * 10}verifies_requirements " \
|
227
|
+
"'hl7.fhir.us.davinci-pas_2.0.1@35" => submit_request_must_support_test_ids,
|
221
228
|
'Submit Response Must Support' => submit_response_must_support_test_ids
|
222
229
|
},
|
223
230
|
'$inquire Element Support' => {
|
224
231
|
'Submission of claims to the $inquire operation for must support validation' => inquiry_operation,
|
225
|
-
|
232
|
+
"[USER INPUT VALIDATION] Inquiry Request Must Support'" \
|
233
|
+
"\n#{' ' * 10}verifies_requirements " \
|
234
|
+
"'hl7.fhir.us.davinci-pas_2.0.1@36" => inquiry_request_must_support_test_ids,
|
226
235
|
'Inquiry Response Must Support' => inquiry_response_must_support_test_ids
|
227
236
|
}
|
228
237
|
}
|
@@ -363,6 +372,13 @@ module DaVinciPASTestKit
|
|
363
372
|
"../../custom_groups/#{ig_metadata.ig_version}/client_tests/pas_client_#{request_type}_must_support_test"
|
364
373
|
end
|
365
374
|
|
375
|
+
def verifies_requirements
|
376
|
+
case group_id
|
377
|
+
when 'pas_server_v201_must_support_use_case'
|
378
|
+
['hl7.fhir.us.davinci-pas_2.0.1@33']
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
366
382
|
def description
|
367
383
|
case system
|
368
384
|
when 'server'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'group_metadata'
|
2
2
|
require_relative 'ig_metadata'
|
3
|
-
require_relative 'must_support_metadata_extractor'
|
4
3
|
require_relative 'terminology_binding_metadata_extractor'
|
4
|
+
require 'inferno/dsl/must_support_metadata_extractor'
|
5
5
|
|
6
6
|
module DaVinciPASTestKit
|
7
7
|
class Generator
|
@@ -216,7 +216,7 @@ module DaVinciPASTestKit
|
|
216
216
|
|
217
217
|
def must_support_metadata_extractor
|
218
218
|
@must_support_metadata_extractor ||=
|
219
|
-
MustSupportMetadataExtractor.new(profile_elements, profile, resource, ig_resources)
|
219
|
+
Inferno::DSL::MustSupportMetadataExtractor.new(profile_elements, profile, resource, ig_resources)
|
220
220
|
end
|
221
221
|
|
222
222
|
def must_supports
|
@@ -49,6 +49,10 @@ module DaVinciPASTestKit
|
|
49
49
|
resources_by_type['ValueSet'].find { |profile| profile.url == url }
|
50
50
|
end
|
51
51
|
|
52
|
+
def code_system_by_url(url)
|
53
|
+
resources_by_type['CodeSystem'].find { |profile| profile.url == url }
|
54
|
+
end
|
55
|
+
|
52
56
|
# def search_param_by_resource_and_name(resource, name)
|
53
57
|
# # remove '_' from search parameter name, such as _id or _tag
|
54
58
|
# normalized_name = normalized_name = name.to_s.delete_prefix('_')
|
@@ -48,7 +48,7 @@ module DaVinciPASTestKit
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def output
|
51
|
-
@output ||= ERB.new(template).result(binding)
|
51
|
+
@output ||= ERB.new(template, trim_mode: '-').result(binding)
|
52
52
|
end
|
53
53
|
|
54
54
|
def base_output_file_name
|
@@ -108,7 +108,7 @@ module DaVinciPASTestKit
|
|
108
108
|
def build_must_support_list_string(uscdi_only)
|
109
109
|
slice_names = group_metadata.must_supports[:slices]
|
110
110
|
.select { |slice| slice[:uscdi_only].presence == uscdi_only.presence }
|
111
|
-
.map { |slice| slice[:
|
111
|
+
.map { |slice| slice[:slice_id] }
|
112
112
|
|
113
113
|
element_names = group_metadata.must_supports[:elements]
|
114
114
|
.select { |element| element[:uscdi_only].presence == uscdi_only.presence }
|
@@ -127,7 +127,7 @@ module DaVinciPASTestKit
|
|
127
127
|
element_paths = choice[:paths].map { |path| "#{resource_type}.#{path}" }.join(' or ')
|
128
128
|
extension_ids = choice[:extension_ids].map(&:to_s).join(' or ')
|
129
129
|
|
130
|
-
element_names <<
|
130
|
+
element_names << "#{element_paths} or #{extension_ids}"
|
131
131
|
end
|
132
132
|
|
133
133
|
(slice_names + element_names + extension_names)
|
@@ -137,6 +137,17 @@ module DaVinciPASTestKit
|
|
137
137
|
.join("\n")
|
138
138
|
end
|
139
139
|
|
140
|
+
def verifies_requirements
|
141
|
+
case test_id # rubocop:disable Style/HashLikeCase
|
142
|
+
when 'pas_client_inquire_request_v201_claim_inquiry_must_support_test'
|
143
|
+
['hl7.fhir.us.davinci-pas_2.0.1@36']
|
144
|
+
when 'pas_server_submit_response_v201_claimresponse_must_support_test'
|
145
|
+
['hl7.fhir.us.davinci-pas_2.0.1@37', 'hl7.fhir.us.davinci-pas_2.0.1@110']
|
146
|
+
when 'pas_server_inquire_response_v201_claiminquiryresponse_must_support_test'
|
147
|
+
['hl7.fhir.us.davinci-pas_2.0.1@38']
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
140
151
|
def optional?
|
141
152
|
MustSupportCheckProfiles.optional_group?(group_metadata)
|
142
153
|
end
|
@@ -27,7 +27,7 @@ module DaVinciPASTestKit
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def output
|
30
|
-
@output ||= ERB.new(template).result(binding)
|
30
|
+
@output ||= ERB.new(template, trim_mode: '-').result(binding)
|
31
31
|
end
|
32
32
|
|
33
33
|
def base_output_file_name
|
@@ -107,6 +107,20 @@ module DaVinciPASTestKit
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
|
+
def verifies_requirements
|
111
|
+
case test_id
|
112
|
+
when 'pas_v201_claim_inquiry_operation_test'
|
113
|
+
['hl7.fhir.us.davinci-pas_2.0.1@5', 'hl7.fhir.us.davinci-pas_2.0.1@111',
|
114
|
+
'hl7.fhir.us.davinci-pas_2.0.1@208']
|
115
|
+
when 'pas_v201_claim_operation_test'
|
116
|
+
['hl7.fhir.us.davinci-pas_2.0.1@5', 'hl7.fhir.us.davinci-pas_2.0.1@66',
|
117
|
+
'hl7.fhir.us.davinci-pas_2.0.1@111', 'hl7.fhir.us.davinci-pas_2.0.1@136',
|
118
|
+
'hl7.fhir.us.davinci-pas_2.0.1@207']
|
119
|
+
else
|
120
|
+
"\n"
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
110
124
|
def generate
|
111
125
|
FileUtils.mkdir_p(output_file_directory)
|
112
126
|
File.write(output_file_name, output)
|
@@ -127,8 +141,7 @@ module DaVinciPASTestKit
|
|
127
141
|
Server SHALL support PAS #{operation_name} requests: a POST interaction to
|
128
142
|
the /Claim/$#{operation} endpoint.
|
129
143
|
This test submits a Prior Authorization #{operation_name} request to the server and verifies that a
|
130
|
-
response is returned with HTTP status 2XX.
|
131
|
-
#{operation == 'submit' ? 'The server SHOULD respond within 15 seconds.' : ''}
|
144
|
+
response is returned with HTTP status 2XX.#{operation == 'submit' ? "\nThe server SHOULD respond within 15 seconds." : ''}
|
132
145
|
DESCRIPTION
|
133
146
|
end
|
134
147
|
end
|
@@ -9,6 +9,9 @@ module DaVinciPASTestKit
|
|
9
9
|
)
|
10
10
|
|
11
11
|
id :<%= group_id %>
|
12
|
+
<%- if verifies_requirements -%>
|
13
|
+
verifies_requirements <%= verifies_requirements.map { |r| "'#{r}'" }.join(', ') %>
|
14
|
+
<%- end -%>
|
12
15
|
<% if run_as_group %>run_as_group<% end %>
|
13
16
|
<% if system == 'client'%>
|
14
17
|
<% test_id_list.each do |id| %>
|
@@ -17,8 +20,7 @@ module DaVinciPASTestKit
|
|
17
20
|
def use_case
|
18
21
|
'<%= use_case %>'
|
19
22
|
end
|
20
|
-
<% if use_case != 'must_support'%>
|
21
|
-
<% test_id_list.each do |category, id_list| %>
|
23
|
+
<% if use_case != 'must_support'%><% test_id_list.each do |category, id_list| %>
|
22
24
|
group do
|
23
25
|
title '<%= category %>'
|
24
26
|
<% id_list.each do |id| %>
|
@@ -32,7 +34,12 @@ module DaVinciPASTestKit
|
|
32
34
|
}
|
33
35
|
}
|
34
36
|
)
|
35
|
-
end<%
|
37
|
+
end<% elsif id == 'subscriptions_r4_server_notification_conformance' %> do
|
38
|
+
config options: { subscription_type: 'id-only' }
|
39
|
+
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@145'
|
40
|
+
input :pended_pa_submit_request_payload
|
41
|
+
end<% elsif ['prior_auth_claim_response_update_notification_validation', 'subscriptions_r4_server_id_only_conformance'].include?(id) %>,
|
42
|
+
input: :pended_pa_submit_request_payload<% end %><% end %>
|
36
43
|
end<% end %>
|
37
44
|
<% else %>
|
38
45
|
<% test_id_list.each do |group, subgroup|%>
|
@@ -5,8 +5,11 @@ module DaVinciPASTestKit
|
|
5
5
|
id :<%= test_id %>
|
6
6
|
title '<%= title %>'
|
7
7
|
description %(
|
8
|
-
<%=description.gsub("\n", "\n" + " "*8) %>
|
8
|
+
<%=description.chomp.gsub("\n", "\n" + " "*8) %>
|
9
9
|
)
|
10
|
+
<%- if verifies_requirements -%>
|
11
|
+
verifies_requirements <%= verifies_requirements.map { |r| "'#{r}'" }.join(', ') %>
|
12
|
+
<%- end -%>
|
10
13
|
|
11
14
|
input :pa_<%= request_type %>_payload,
|
12
15
|
title: 'PAS <%= request_type.humanize.titleize%> Payload',
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'subscriptions_test_kit'
|
2
1
|
require_relative '../../validator_suppressions'
|
3
2
|
require_relative '<%= error_group_file_name %>'
|
3
|
+
require_relative '../../custom_groups/v2.0.1/pas_server_subscription_setup'
|
4
4
|
<% group_file_list.each do |file_name| %>require_relative '<%= file_name %>'
|
5
5
|
<% end %>
|
6
6
|
module DaVinciPASTestKit
|
@@ -29,10 +29,6 @@ module DaVinciPASTestKit
|
|
29
29
|
}
|
30
30
|
]
|
31
31
|
|
32
|
-
resume_test_route :get, '/resume_after_notification' do |request|
|
33
|
-
request.query_parameters['token']
|
34
|
-
end
|
35
|
-
|
36
32
|
fhir_resource_validator do
|
37
33
|
igs '<%= ig_identifier %>'
|
38
34
|
|
@@ -67,6 +63,10 @@ module DaVinciPASTestKit
|
|
67
63
|
auth_info :smart_credentials
|
68
64
|
end
|
69
65
|
|
66
|
+
resume_test_route :get, RESUME_SKIP_PATH, result: 'skip' do |request|
|
67
|
+
request.query_parameters['token']
|
68
|
+
end
|
69
|
+
|
70
70
|
# Used for attestation experiment - see pas_claim_response_decision_test.rb
|
71
71
|
# resume_test_route :get, RESUME_PASS_PATH do |request|
|
72
72
|
# request.query_parameters['token']
|
@@ -76,6 +76,9 @@ module DaVinciPASTestKit
|
|
76
76
|
# request.query_parameters['token']
|
77
77
|
# end
|
78
78
|
|
79
|
+
group from: :pas_server_subscription_setup,
|
80
|
+
id: :pas_server_<%= ig_metadata.reformatted_version %>_subscription_setup
|
81
|
+
|
79
82
|
group 'Demonstrate Workflow Support' do
|
80
83
|
description %(
|
81
84
|
The workflow tests validate that the server can participate in complete
|
@@ -10,6 +10,9 @@ module DaVinciPASTestKit
|
|
10
10
|
description %(
|
11
11
|
<%=description.strip.gsub("\n", "\n" + " "*8) %>
|
12
12
|
)
|
13
|
+
<%- if verifies_requirements -%>
|
14
|
+
verifies_requirements <%= verifies_requirements.map { |r| "'#{r}'" }.join(', ') %>
|
15
|
+
<%- end -%>
|
13
16
|
<% if request_type.include?('request') %>
|
14
17
|
input :pa_<%= request_type %>_payload,
|
15
18
|
title: 'PAS <%= request_type.humanize.titleize%> Payload',
|
@@ -35,9 +38,7 @@ module DaVinciPASTestKit
|
|
35
38
|
def target_request_response_pairs<% operation = request_type.split('_').first %>
|
36
39
|
scratch[:<%= operation %>_request_response_pair] ||= {}
|
37
40
|
scratch[:<%= operation %>_request_response_pair][:all] ||= []
|
38
|
-
end<% end %>
|
39
|
-
|
40
|
-
<%if request_type.include?('request')%>
|
41
|
+
end<% end %><%if request_type.include?('request')%>
|
41
42
|
def request_bundles
|
42
43
|
parsed_payload = JSON.parse(pa_<%= request_type %>_payload)
|
43
44
|
fhir_resources = [parsed_payload].flatten.compact.uniq.map { |payload| FHIR.from_contents(payload.to_json)}.compact
|
@@ -68,7 +69,7 @@ module DaVinciPASTestKit
|
|
68
69
|
<% else %>
|
69
70
|
skip_if target_request_response_pairs.blank?, 'No <%= request_type.split('_').first%> response to validate. Either no <%= request_type.split('_').first%> request was made in a previous test or it resulted in a server error.'
|
70
71
|
target_pairs = target_request_response_pairs
|
71
|
-
# Clean request/response pair after
|
72
|
+
# Clean request/response pair after validation
|
72
73
|
scratch[:<%= operation %>_request_response_pair][:all] = []
|
73
74
|
|
74
75
|
response_bundles = target_pairs.map { |pair| pair[:response_bundle] }
|
@@ -26,7 +26,7 @@ module DaVinciPASTestKit
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def output
|
29
|
-
@output ||= ERB.new(template).result(binding)
|
29
|
+
@output ||= ERB.new(template, trim_mode: '-').result(binding)
|
30
30
|
end
|
31
31
|
|
32
32
|
def base_output_file_name
|
@@ -117,6 +117,17 @@ module DaVinciPASTestKit
|
|
117
117
|
request_type.include?('request')
|
118
118
|
end
|
119
119
|
|
120
|
+
def verifies_requirements
|
121
|
+
case test_id
|
122
|
+
when 'pas_server_v201_pas_inquiry_response_bundle_validation_test'
|
123
|
+
['hl7.fhir.us.davinci-pas_2.0.1@131']
|
124
|
+
when 'pas_server_v201_pas_response_bundle_validation_test'
|
125
|
+
['hl7.fhir.us.davinci-pas_2.0.1@64', 'hl7.fhir.us.davinci-pas_2.0.1@100',
|
126
|
+
'hl7.fhir.us.davinci-pas_2.0.1@101', 'hl7.fhir.us.davinci-pas_2.0.1@102',
|
127
|
+
'hl7.fhir.us.davinci-pas_2.0.1@103', 'hl7.fhir.us.davinci-pas_2.0.1@107']
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
120
131
|
def description
|
121
132
|
<<~DESCRIPTION
|
122
133
|
#{description_user_input_validation if user_input?}
|