davinci_pas_test_kit 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/lib/davinci_pas_test_kit/client_suite.rb +289 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/claim_status/pas_claim_status_test.rb +109 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_response_attest.rb +39 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_test.rb +38 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_response_attest.rb +38 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb +43 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_must_support_test.rb +51 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_response_attest.rb +39 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_test.rb +35 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_response_attest.rb +39 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_test.rb +43 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_submit_must_support_test.rb +57 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_request_test.rb +31 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_validation_test.rb +18 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/nonconformant_pas_bundle.json +16 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_inquiry_error_test.rb +38 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_submission_error_test.rb +56 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/device_request_metadata.yml +112 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/medication_request_metadata.yml +183 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/nutrition_order_metadata.yml +109 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/pas_client_must_support_requirement_test.rb +117 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/pas_server_must_support_requirement_test.rb +116 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/service_request_metadata.yml +148 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_approval_group.rb +26 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_authentication_group.rb +49 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_denial_group.rb +41 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_pended_group.rb +56 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_error_group.rb +20 -0
- data/lib/davinci_pas_test_kit/ext/inferno_core/record_response_route.rb +98 -0
- data/lib/davinci_pas_test_kit/ext/inferno_core/request.rb +19 -0
- data/lib/davinci_pas_test_kit/ext/inferno_core/runnable.rb +18 -0
- data/lib/davinci_pas_test_kit/fhir_resource_navigation.rb +72 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/client_inquiry_request_beneficiary_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/client_submit_request_beneficiary_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/metadata.yml +162 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_inquiry_request_beneficiary_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_inquiry_response_beneficiary_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_submit_request_beneficiary_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_submit_response_beneficiary_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/claim_operation_test.rb +67 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/metadata.yml +577 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/claim_inquiry_operation_test.rb +57 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/client_inquiry_request_claim_inquiry_must_support_test.rb +95 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/metadata.yml +516 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/server_inquiry_request_claim_inquiry_must_support_test.rb +95 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/client_submit_request_claim_update_must_support_test.rb +102 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/metadata.yml +591 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/server_submit_request_claim_update_must_support_test.rb +102 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/metadata.yml +311 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/server_inquiry_response_claiminquiryresponse_must_support_test.rb +73 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/metadata.yml +318 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/server_submit_response_claimresponse_must_support_test.rb +75 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_denial_pas_response_bundle_validation_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pas_request_bundle_validation_test.rb +55 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_inquiry_request_bundle_validation_test.rb +55 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_response_bundle_validation_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/metadata.yml +130 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/server_submit_response_communication_request_must_support_test.rb +58 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/client_inquiry_request_coverage_must_support_test.rb +55 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/client_submit_request_coverage_must_support_test.rb +55 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/metadata.yml +111 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/server_inquiry_request_coverage_must_support_test.rb +55 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/server_submit_request_coverage_must_support_test.rb +55 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/client_submit_request_device_request_must_support_test.rb +51 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/metadata.yml +112 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/server_submit_request_device_request_must_support_test.rb +51 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/client_submit_request_encounter_must_support_test.rb +67 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/metadata.yml +213 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/server_submit_request_encounter_must_support_test.rb +67 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/client_inquiry_request_insurer_must_support_test.rb +60 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/client_submit_request_insurer_must_support_test.rb +60 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/metadata.yml +104 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_inquiry_request_insurer_must_support_test.rb +60 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_inquiry_response_insurer_must_support_test.rb +60 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_submit_request_insurer_must_support_test.rb +60 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_submit_response_insurer_must_support_test.rb +60 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/client_submit_request_medication_request_must_support_test.rb +61 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/metadata.yml +183 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/server_submit_request_medication_request_must_support_test.rb +61 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/metadata.yml +5253 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/client_submit_request_nutrition_order_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/metadata.yml +109 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/server_submit_request_nutrition_order_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_client_inquiry_must_support_use_case_group.rb +51 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_client_submit_must_support_use_case_group.rb +61 -0
- 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 +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/metadata.yml +77 -0
- 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 +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test.rb +83 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/metadata.yml +67 -0
- 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 +52 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test.rb +80 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/client_submit_request_pas_request_bundle_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/metadata.yml +77 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_pas_request_bundle_validation_test.rb +83 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_submit_request_pas_request_bundle_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/metadata.yml +71 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_pas_response_bundle_validation_test.rb +80 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_submit_response_pas_response_bundle_must_support_test.rb +52 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_approval_use_case_group.rb +59 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_denial_use_case_group.rb +59 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_must_support_use_case_group.rb +265 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_pended_use_case_group.rb +84 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/client_inquiry_request_practitioner_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/client_submit_request_practitioner_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/metadata.yml +74 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_inquiry_request_practitioner_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_inquiry_response_practitioner_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_submit_request_practitioner_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_submit_response_practitioner_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/client_inquiry_request_practitioner_role_must_support_test.rb +49 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/client_submit_request_practitioner_role_must_support_test.rb +49 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/metadata.yml +81 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_inquiry_request_practitioner_role_must_support_test.rb +49 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_inquiry_response_practitioner_role_must_support_test.rb +49 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_submit_request_practitioner_role_must_support_test.rb +49 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_submit_response_practitioner_role_must_support_test.rb +49 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/client_inquiry_request_requestor_must_support_test.rb +63 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/client_submit_request_requestor_must_support_test.rb +63 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/metadata.yml +107 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_inquiry_request_requestor_must_support_test.rb +63 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_inquiry_response_requestor_must_support_test.rb +63 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_submit_request_requestor_must_support_test.rb +63 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_submit_response_requestor_must_support_test.rb +63 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/resource_list.rb +54 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/server_suite.rb +236 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/client_submit_request_service_request_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/metadata.yml +148 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/server_submit_request_service_request_must_support_test.rb +53 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/client_inquiry_request_subscriber_must_support_test.rb +74 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/client_submit_request_subscriber_must_support_test.rb +74 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/metadata.yml +159 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/server_inquiry_request_subscriber_must_support_test.rb +74 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/server_submit_request_subscriber_must_support_test.rb +74 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/metadata.yml +192 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/server_inquiry_response_task_must_support_test.rb +61 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/task/server_submit_response_task_must_support_test.rb +61 -0
- data/lib/davinci_pas_test_kit/generator/group_generator.rb +440 -0
- data/lib/davinci_pas_test_kit/generator/group_metadata.rb +73 -0
- data/lib/davinci_pas_test_kit/generator/group_metadata_extractor.rb +244 -0
- data/lib/davinci_pas_test_kit/generator/ig_loader.rb +78 -0
- data/lib/davinci_pas_test_kit/generator/ig_metadata.rb +66 -0
- data/lib/davinci_pas_test_kit/generator/ig_metadata_extractor.rb +54 -0
- data/lib/davinci_pas_test_kit/generator/ig_resources.rb +74 -0
- data/lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb +86 -0
- data/lib/davinci_pas_test_kit/generator/must_support_metadata_extractor.rb +327 -0
- data/lib/davinci_pas_test_kit/generator/must_support_test_generator.rb +155 -0
- data/lib/davinci_pas_test_kit/generator/naming.rb +50 -0
- data/lib/davinci_pas_test_kit/generator/operation_test_generator.rb +136 -0
- data/lib/davinci_pas_test_kit/generator/resource_list_generator.rb +59 -0
- data/lib/davinci_pas_test_kit/generator/suite_generator.rb +94 -0
- data/lib/davinci_pas_test_kit/generator/terminology_binding_metadata_extractor.rb +108 -0
- data/lib/davinci_pas_test_kit/generator/validation_test_generator.rb +181 -0
- data/lib/davinci_pas_test_kit/generator/value_extractor.rb +48 -0
- data/lib/davinci_pas_test_kit/generator.rb +80 -0
- data/lib/davinci_pas_test_kit/mock_server.rb +189 -0
- data/lib/davinci_pas_test_kit/must_support_test.rb +267 -0
- data/lib/davinci_pas_test_kit/pas_bundle_validation.rb +568 -0
- data/lib/davinci_pas_test_kit/tags.rb +7 -0
- data/lib/davinci_pas_test_kit/urls.rb +39 -0
- data/lib/davinci_pas_test_kit/user_input_response.rb +32 -0
- data/lib/davinci_pas_test_kit/validation_test.rb +58 -0
- data/lib/davinci_pas_test_kit/validator_suppressions.rb +143 -0
- data/lib/davinci_pas_test_kit/version.rb +5 -0
- data/lib/davinci_pas_test_kit.rb +2 -0
- metadata +281 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
require_relative '../../../must_support_test'
|
2
|
+
require_relative '../../../generator/group_metadata'
|
3
|
+
require_relative '../../../tags'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class ServerInquiryResponsePasInquiryResponseBundleMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Inquiry Response Bundle are observed across all instances returned'
|
11
|
+
description %(
|
12
|
+
|
13
|
+
PAS server systems are required to be able to populate all
|
14
|
+
must support elements on instances of all profiles included in
|
15
|
+
responses, including instances of the PAS Inquiry Response Bundle Profile.
|
16
|
+
This test checks all identified instances of the PAS Inquiry Response Bundle
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Bundle.entry
|
21
|
+
* Bundle.entry.fullUrl
|
22
|
+
* Bundle.entry.resource
|
23
|
+
* Bundle.entry:ClaimResponse
|
24
|
+
* Bundle.timestamp
|
25
|
+
)
|
26
|
+
|
27
|
+
id :pas_server_inquiry_response_v201_pas_inquiry_response_bundle_must_support_test
|
28
|
+
|
29
|
+
def resource_type
|
30
|
+
'Bundle'
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.metadata
|
34
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
35
|
+
end
|
36
|
+
|
37
|
+
def scratch_resources
|
38
|
+
scratch[:inquiry_response_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
def resources_of_interest
|
42
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
43
|
+
collection.select { |res| res.resourceType == resource_type }
|
44
|
+
end
|
45
|
+
|
46
|
+
run do
|
47
|
+
perform_must_support_test(resources_of_interest)
|
48
|
+
validate_must_support
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../../../pas_bundle_validation'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class ServerPasInquiryResponseBundleValidationTest < Inferno::Test
|
6
|
+
include DaVinciPASTestKit::PasBundleValidation
|
7
|
+
|
8
|
+
id :pas_server_v201_pas_inquiry_response_bundle_validation_test
|
9
|
+
title 'Inquiry Response Bundle is valid'
|
10
|
+
description %(
|
11
|
+
This test validates the conformity of the
|
12
|
+
server's response to the
|
13
|
+
[PAS Inquiry Response Bundle](http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-response-bundle) structure.
|
14
|
+
It also checks that other conformance requirements defined in the [PAS Formal
|
15
|
+
Specification](https://hl7.org/fhir/us/davinci-pas/STU2/specification.html),
|
16
|
+
such as the presence of all referenced instances within the bundle and the
|
17
|
+
conformance of those instances to the appropriate profiles, are met.
|
18
|
+
|
19
|
+
It verifies the presence of mandatory elements and that elements with
|
20
|
+
required bindings contain appropriate values. CodeableConcept element
|
21
|
+
bindings will fail if none of their codings have a code/system belonging
|
22
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
23
|
+
fail if their code/system are not found in the valueset.
|
24
|
+
|
25
|
+
Note that because X12 value sets are not public, elements bound to value
|
26
|
+
sets containing X12 codes are not validated.
|
27
|
+
)
|
28
|
+
|
29
|
+
output :dar_code_found, :dar_extension_found
|
30
|
+
|
31
|
+
def resource_type
|
32
|
+
'Bundle'
|
33
|
+
end
|
34
|
+
|
35
|
+
def scratch_resources
|
36
|
+
scratch[:inquire_response_resources] ||= {}
|
37
|
+
end
|
38
|
+
|
39
|
+
def request_type
|
40
|
+
'inquire'
|
41
|
+
end
|
42
|
+
|
43
|
+
def target_request_response_pairs
|
44
|
+
scratch[:inquire_request_response_pair] ||= {}
|
45
|
+
scratch[:inquire_request_response_pair][:all] ||= []
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
run do
|
51
|
+
skip_if target_request_response_pairs.blank?, 'No inquire response to validate. Either no inquire request was made in a previous test or it resulted in a server error.'
|
52
|
+
target_pairs = target_request_response_pairs
|
53
|
+
# Clean request/response pair after validatation
|
54
|
+
scratch[:inquire_request_response_pair][:all] = []
|
55
|
+
|
56
|
+
response_bundles = target_pairs.map { |pair| pair[:response_bundle] }
|
57
|
+
save_bundles_and_entries_to_scratch(response_bundles)
|
58
|
+
|
59
|
+
target_pairs.each do |pair|
|
60
|
+
pair => {request_bundle:, response_bundle:}
|
61
|
+
assert_resource_type(:bundle, resource: response_bundle)
|
62
|
+
|
63
|
+
perform_response_validation(
|
64
|
+
response_bundle,
|
65
|
+
'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-response-bundle',
|
66
|
+
'2.0.1',
|
67
|
+
request_type,
|
68
|
+
request_bundle
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
validation_error_messages.each do |msg|
|
73
|
+
messages << { type: 'error', message: msg }
|
74
|
+
end
|
75
|
+
msg = 'Bundle response returned and/or entry resources are not conformant. Check messages for issues found.'
|
76
|
+
assert validation_error_messages.blank?, msg
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require_relative '../../../must_support_test'
|
2
|
+
require_relative '../../../generator/group_metadata'
|
3
|
+
require_relative '../../../tags'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class ClientSubmitRequestPasRequestBundleMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Request Bundle are observed across all instances submitted'
|
11
|
+
description %(
|
12
|
+
|
13
|
+
PAS client systems are required to be able to populate all
|
14
|
+
must support elements on instances of all profiles included in
|
15
|
+
requests, including instances of the PAS Request Bundle Profile.
|
16
|
+
This test checks all identified instances of the PAS Request Bundle
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Bundle.entry
|
21
|
+
* Bundle.entry.fullUrl
|
22
|
+
* Bundle.entry.resource
|
23
|
+
* Bundle.entry:Claim
|
24
|
+
* Bundle.identifier
|
25
|
+
* Bundle.timestamp
|
26
|
+
)
|
27
|
+
|
28
|
+
id :pas_client_submit_request_v201_pas_request_bundle_must_support_test
|
29
|
+
|
30
|
+
def resource_type
|
31
|
+
'Bundle'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.metadata
|
35
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
36
|
+
end
|
37
|
+
|
38
|
+
def scratch_resources
|
39
|
+
scratch[:submit_request_resources] ||= {}
|
40
|
+
end
|
41
|
+
|
42
|
+
def resources_of_interest
|
43
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
44
|
+
collection.select { |res| res.resourceType == resource_type }
|
45
|
+
end
|
46
|
+
|
47
|
+
run do
|
48
|
+
perform_must_support_test(resources_of_interest)
|
49
|
+
validate_must_support
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
:name: profile_pas_request_bundle
|
3
|
+
:class_name: ProfilePasRequestBundleSequence
|
4
|
+
:version: v2.0.1
|
5
|
+
:reformatted_version: v201
|
6
|
+
:resource: Bundle
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-request-bundle
|
8
|
+
:profile_name: PAS Request Bundle
|
9
|
+
:profile_version: 2.0.1
|
10
|
+
:title: Request Bundle
|
11
|
+
:short_description: Verify support for the server capabilities required by the PAS
|
12
|
+
Request Bundle.
|
13
|
+
:interactions: []
|
14
|
+
:operations: []
|
15
|
+
:required_concepts: []
|
16
|
+
:must_supports:
|
17
|
+
:extensions: []
|
18
|
+
:slices:
|
19
|
+
- :name: Bundle.entry:Claim
|
20
|
+
:path: entry
|
21
|
+
:discriminator:
|
22
|
+
:type: type
|
23
|
+
:code: Claim
|
24
|
+
:elements:
|
25
|
+
- :path: identifier
|
26
|
+
- :path: timestamp
|
27
|
+
- :path: entry
|
28
|
+
- :path: entry.fullUrl
|
29
|
+
- :path: entry.resource
|
30
|
+
:mandatory_elements:
|
31
|
+
- Bundle.identifier
|
32
|
+
- Bundle.type
|
33
|
+
- Bundle.timestamp
|
34
|
+
- Bundle.link.relation
|
35
|
+
- Bundle.link.url
|
36
|
+
- Bundle.entry
|
37
|
+
- Bundle.entry.fullUrl
|
38
|
+
- Bundle.entry.resource
|
39
|
+
- Bundle.entry.request.method
|
40
|
+
- Bundle.entry.request.url
|
41
|
+
- Bundle.entry.response.status
|
42
|
+
:bindings:
|
43
|
+
- :type: code
|
44
|
+
:strength: preferred
|
45
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
46
|
+
:path: language
|
47
|
+
- :type: code
|
48
|
+
:strength: required
|
49
|
+
:system: http://hl7.org/fhir/ValueSet/bundle-type
|
50
|
+
:path: type
|
51
|
+
- :type: code
|
52
|
+
:strength: required
|
53
|
+
:system: http://hl7.org/fhir/ValueSet/search-entry-mode
|
54
|
+
:path: entry.search.mode
|
55
|
+
- :type: code
|
56
|
+
:strength: required
|
57
|
+
:system: http://hl7.org/fhir/ValueSet/http-verb
|
58
|
+
:path: entry.request.method
|
59
|
+
- :type: code
|
60
|
+
:strength: required
|
61
|
+
:system: http://hl7.org/fhir/ValueSet/search-entry-mode
|
62
|
+
:path: entry.search.mode
|
63
|
+
- :type: code
|
64
|
+
:strength: required
|
65
|
+
:system: http://hl7.org/fhir/ValueSet/http-verb
|
66
|
+
:path: entry.request.method
|
67
|
+
:references: []
|
68
|
+
:tests:
|
69
|
+
- :id: pas_server_v201_pas_request_bundle_validation_test
|
70
|
+
:file_name: server_pas_request_bundle_validation_test.rb
|
71
|
+
- :id: pas_client_v201_pas_request_bundle_validation_test
|
72
|
+
:file_name: client_pas_request_bundle_validation_test.rb
|
73
|
+
- :id: pas_server_submit_request_v201_pas_request_bundle_must_support_test
|
74
|
+
:file_name: server_submit_request_pas_request_bundle_must_support_test.rb
|
75
|
+
- :id: pas_client_submit_request_v201_pas_request_bundle_must_support_test
|
76
|
+
:file_name: client_submit_request_pas_request_bundle_must_support_test.rb
|
77
|
+
:delayed_references: []
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require_relative '../../../pas_bundle_validation'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class ServerPasRequestBundleValidationTest < Inferno::Test
|
6
|
+
include DaVinciPASTestKit::PasBundleValidation
|
7
|
+
|
8
|
+
id :pas_server_v201_pas_request_bundle_validation_test
|
9
|
+
title '[USER INPUT VALIDATION] Request Bundle is valid'
|
10
|
+
description %(
|
11
|
+
This test validates the conformity of the
|
12
|
+
user input to the
|
13
|
+
[PAS Request Bundle](http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-request-bundle) structure, ensuring subsequent tests can accurately simulate content.
|
14
|
+
It also checks that other conformance requirements defined in the [PAS Formal
|
15
|
+
Specification](https://hl7.org/fhir/us/davinci-pas/STU2/specification.html),
|
16
|
+
such as the presence of all referenced instances within the bundle and the
|
17
|
+
conformance of those instances to the appropriate profiles, are met.
|
18
|
+
|
19
|
+
It verifies the presence of mandatory elements and that elements with
|
20
|
+
required bindings contain appropriate values. CodeableConcept element
|
21
|
+
bindings will fail if none of their codings have a code/system belonging
|
22
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
23
|
+
fail if their code/system are not found in the valueset.
|
24
|
+
|
25
|
+
Note that because X12 value sets are not public, elements bound to value
|
26
|
+
sets containing X12 codes are not validated.
|
27
|
+
)
|
28
|
+
|
29
|
+
input :pa_submit_request_payload,
|
30
|
+
title: 'PAS Submit Request Payload',
|
31
|
+
description: 'Insert Bundle to be sent for PAS Submit Request',
|
32
|
+
type: 'textarea',
|
33
|
+
optional: true
|
34
|
+
|
35
|
+
input_order :server_endpoint, :smart_credentials
|
36
|
+
output :dar_code_found, :dar_extension_found
|
37
|
+
|
38
|
+
def resource_type
|
39
|
+
'Bundle'
|
40
|
+
end
|
41
|
+
|
42
|
+
def scratch_resources
|
43
|
+
scratch[:submit_request_resources] ||= {}
|
44
|
+
end
|
45
|
+
|
46
|
+
def request_type
|
47
|
+
'submit'
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
def request_bundles
|
53
|
+
parsed_payload = JSON.parse(pa_submit_request_payload)
|
54
|
+
fhir_resources = [parsed_payload].flatten.compact.uniq.map { |payload| FHIR.from_contents(payload.to_json)}.compact
|
55
|
+
fhir_resources.select { |res| res.resourceType == 'Bundle'}
|
56
|
+
end
|
57
|
+
|
58
|
+
run do
|
59
|
+
skip_if pa_submit_request_payload.blank?, 'No bundle request input provided.'
|
60
|
+
assert_valid_json(pa_submit_request_payload)
|
61
|
+
assert request_bundles.present?, 'Provided input is not a bundle or list of bundles'
|
62
|
+
|
63
|
+
save_bundles_and_entries_to_scratch(request_bundles)
|
64
|
+
|
65
|
+
request_bundles.each do |bundle|
|
66
|
+
perform_request_validation(
|
67
|
+
bundle,
|
68
|
+
'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-request-bundle',
|
69
|
+
'2.0.1',
|
70
|
+
request_type
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
validation_error_messages.each do |msg|
|
75
|
+
messages << { type: 'error', message: msg }
|
76
|
+
end
|
77
|
+
msg = 'Bundle(s) provided and/or entry resources are not conformant. Check messages for issues found.'
|
78
|
+
skip_if validation_error_messages.present?, msg
|
79
|
+
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require_relative '../../../must_support_test'
|
2
|
+
require_relative '../../../generator/group_metadata'
|
3
|
+
require_relative '../../../tags'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class ServerSubmitRequestPasRequestBundleMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Request Bundle are observed across all instances submitted'
|
11
|
+
description %(
|
12
|
+
|
13
|
+
PAS server systems are required to be able to receive all
|
14
|
+
must support elements on instances of all profiles included in
|
15
|
+
requests, including instances of the PAS Request Bundle Profile.
|
16
|
+
This test checks all identified instances of the PAS Request Bundle
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Bundle.entry
|
21
|
+
* Bundle.entry.fullUrl
|
22
|
+
* Bundle.entry.resource
|
23
|
+
* Bundle.entry:Claim
|
24
|
+
* Bundle.identifier
|
25
|
+
* Bundle.timestamp
|
26
|
+
)
|
27
|
+
|
28
|
+
id :pas_server_submit_request_v201_pas_request_bundle_must_support_test
|
29
|
+
|
30
|
+
def resource_type
|
31
|
+
'Bundle'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.metadata
|
35
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
36
|
+
end
|
37
|
+
|
38
|
+
def scratch_resources
|
39
|
+
scratch[:submit_request_resources] ||= {}
|
40
|
+
end
|
41
|
+
|
42
|
+
def resources_of_interest
|
43
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
44
|
+
collection.select { |res| res.resourceType == resource_type }
|
45
|
+
end
|
46
|
+
|
47
|
+
run do
|
48
|
+
perform_must_support_test(resources_of_interest)
|
49
|
+
validate_must_support
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
---
|
2
|
+
:name: profile_pas_response_bundle
|
3
|
+
:class_name: ProfilePasResponseBundleSequence
|
4
|
+
:version: v2.0.1
|
5
|
+
:reformatted_version: v201
|
6
|
+
:resource: Bundle
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-response-bundle
|
8
|
+
:profile_name: PAS Response Bundle
|
9
|
+
:profile_version: 2.0.1
|
10
|
+
:title: Response Bundle
|
11
|
+
:short_description: Verify support for the server capabilities required by the PAS
|
12
|
+
Response Bundle.
|
13
|
+
:interactions: []
|
14
|
+
:operations: []
|
15
|
+
:required_concepts: []
|
16
|
+
:must_supports:
|
17
|
+
:extensions: []
|
18
|
+
:slices:
|
19
|
+
- :name: Bundle.entry:ClaimResponse
|
20
|
+
:path: entry
|
21
|
+
:discriminator:
|
22
|
+
:type: type
|
23
|
+
:code: ClaimResponse
|
24
|
+
:elements:
|
25
|
+
- :path: timestamp
|
26
|
+
- :path: entry
|
27
|
+
- :path: entry.fullUrl
|
28
|
+
- :path: entry.resource
|
29
|
+
:mandatory_elements:
|
30
|
+
- Bundle.type
|
31
|
+
- Bundle.timestamp
|
32
|
+
- Bundle.link.relation
|
33
|
+
- Bundle.link.url
|
34
|
+
- Bundle.entry
|
35
|
+
- Bundle.entry.fullUrl
|
36
|
+
- Bundle.entry.resource
|
37
|
+
- Bundle.entry.request.method
|
38
|
+
- Bundle.entry.request.url
|
39
|
+
- Bundle.entry.response.status
|
40
|
+
:bindings:
|
41
|
+
- :type: code
|
42
|
+
:strength: preferred
|
43
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
44
|
+
:path: language
|
45
|
+
- :type: code
|
46
|
+
:strength: required
|
47
|
+
:system: http://hl7.org/fhir/ValueSet/search-entry-mode
|
48
|
+
:path: entry.search.mode
|
49
|
+
- :type: code
|
50
|
+
:strength: required
|
51
|
+
:system: http://hl7.org/fhir/ValueSet/http-verb
|
52
|
+
:path: entry.request.method
|
53
|
+
- :type: code
|
54
|
+
:strength: required
|
55
|
+
:system: http://hl7.org/fhir/ValueSet/search-entry-mode
|
56
|
+
:path: entry.search.mode
|
57
|
+
- :type: code
|
58
|
+
:strength: required
|
59
|
+
:system: http://hl7.org/fhir/ValueSet/http-verb
|
60
|
+
:path: entry.request.method
|
61
|
+
:references: []
|
62
|
+
:tests:
|
63
|
+
- :id: pas_server_v201_pas_response_bundle_validation_test
|
64
|
+
:file_name: server_pas_response_bundle_validation_test.rb
|
65
|
+
- :id: pas_client_v201_denial_pas_response_bundle_validation_test
|
66
|
+
:file_name: client_denial_pas_response_bundle_validation_test.rb
|
67
|
+
- :id: pas_client_v201_pended_pas_response_bundle_validation_test
|
68
|
+
:file_name: client_pended_pas_response_bundle_validation_test.rb
|
69
|
+
- :id: pas_server_submit_response_v201_pas_response_bundle_must_support_test
|
70
|
+
:file_name: server_submit_response_pas_response_bundle_must_support_test.rb
|
71
|
+
:delayed_references: []
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../../../pas_bundle_validation'
|
2
|
+
|
3
|
+
module DaVinciPASTestKit
|
4
|
+
module DaVinciPASV201
|
5
|
+
class ServerPasResponseBundleValidationTest < Inferno::Test
|
6
|
+
include DaVinciPASTestKit::PasBundleValidation
|
7
|
+
|
8
|
+
id :pas_server_v201_pas_response_bundle_validation_test
|
9
|
+
title 'Response Bundle is valid'
|
10
|
+
description %(
|
11
|
+
This test validates the conformity of the
|
12
|
+
server's response to the
|
13
|
+
[PAS Response Bundle](http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-response-bundle) structure.
|
14
|
+
It also checks that other conformance requirements defined in the [PAS Formal
|
15
|
+
Specification](https://hl7.org/fhir/us/davinci-pas/STU2/specification.html),
|
16
|
+
such as the presence of all referenced instances within the bundle and the
|
17
|
+
conformance of those instances to the appropriate profiles, are met.
|
18
|
+
|
19
|
+
It verifies the presence of mandatory elements and that elements with
|
20
|
+
required bindings contain appropriate values. CodeableConcept element
|
21
|
+
bindings will fail if none of their codings have a code/system belonging
|
22
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
23
|
+
fail if their code/system are not found in the valueset.
|
24
|
+
|
25
|
+
Note that because X12 value sets are not public, elements bound to value
|
26
|
+
sets containing X12 codes are not validated.
|
27
|
+
)
|
28
|
+
|
29
|
+
output :dar_code_found, :dar_extension_found
|
30
|
+
|
31
|
+
def resource_type
|
32
|
+
'Bundle'
|
33
|
+
end
|
34
|
+
|
35
|
+
def scratch_resources
|
36
|
+
scratch[:submit_response_resources] ||= {}
|
37
|
+
end
|
38
|
+
|
39
|
+
def request_type
|
40
|
+
'submit'
|
41
|
+
end
|
42
|
+
|
43
|
+
def target_request_response_pairs
|
44
|
+
scratch[:submit_request_response_pair] ||= {}
|
45
|
+
scratch[:submit_request_response_pair][:all] ||= []
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
run do
|
51
|
+
skip_if target_request_response_pairs.blank?, 'No submit response to validate. Either no submit request was made in a previous test or it resulted in a server error.'
|
52
|
+
target_pairs = target_request_response_pairs
|
53
|
+
# Clean request/response pair after validatation
|
54
|
+
scratch[:submit_request_response_pair][:all] = []
|
55
|
+
|
56
|
+
response_bundles = target_pairs.map { |pair| pair[:response_bundle] }
|
57
|
+
save_bundles_and_entries_to_scratch(response_bundles)
|
58
|
+
|
59
|
+
target_pairs.each do |pair|
|
60
|
+
pair => {request_bundle:, response_bundle:}
|
61
|
+
assert_resource_type(:bundle, resource: response_bundle)
|
62
|
+
|
63
|
+
perform_response_validation(
|
64
|
+
response_bundle,
|
65
|
+
'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-response-bundle',
|
66
|
+
'2.0.1',
|
67
|
+
request_type,
|
68
|
+
request_bundle
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
validation_error_messages.each do |msg|
|
73
|
+
messages << { type: 'error', message: msg }
|
74
|
+
end
|
75
|
+
msg = 'Bundle response returned and/or entry resources are not conformant. Check messages for issues found.'
|
76
|
+
assert validation_error_messages.blank?, msg
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require_relative '../../../must_support_test'
|
2
|
+
require_relative '../../../generator/group_metadata'
|
3
|
+
require_relative '../../../tags'
|
4
|
+
|
5
|
+
module DaVinciPASTestKit
|
6
|
+
module DaVinciPASV201
|
7
|
+
class ServerSubmitResponsePasResponseBundleMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Response Bundle are observed across all instances returned'
|
11
|
+
description %(
|
12
|
+
|
13
|
+
PAS server systems are required to be able to populate all
|
14
|
+
must support elements on instances of all profiles included in
|
15
|
+
responses, including instances of the PAS Response Bundle Profile.
|
16
|
+
This test checks all identified instances of the PAS Response Bundle
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Bundle.entry
|
21
|
+
* Bundle.entry.fullUrl
|
22
|
+
* Bundle.entry.resource
|
23
|
+
* Bundle.entry:ClaimResponse
|
24
|
+
* Bundle.timestamp
|
25
|
+
)
|
26
|
+
|
27
|
+
id :pas_server_submit_response_v201_pas_response_bundle_must_support_test
|
28
|
+
|
29
|
+
def resource_type
|
30
|
+
'Bundle'
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.metadata
|
34
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
35
|
+
end
|
36
|
+
|
37
|
+
def scratch_resources
|
38
|
+
scratch[:submit_response_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
def resources_of_interest
|
42
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
43
|
+
collection.select { |res| res.resourceType == resource_type }
|
44
|
+
end
|
45
|
+
|
46
|
+
run do
|
47
|
+
perform_must_support_test(resources_of_interest)
|
48
|
+
validate_must_support
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require_relative 'pas_request_bundle/server_pas_request_bundle_validation_test'
|
2
|
+
require_relative 'claim/claim_operation_test'
|
3
|
+
require_relative 'pas_response_bundle/server_pas_response_bundle_validation_test'
|
4
|
+
require_relative '../../custom_groups/v2.0.1/claim_status/pas_claim_status_test'
|
5
|
+
|
6
|
+
module DaVinciPASTestKit
|
7
|
+
module DaVinciPASV201
|
8
|
+
class PASServerApprovalUseCaseGroup < Inferno::TestGroup
|
9
|
+
title 'Successful Approval Workflow'
|
10
|
+
description %(
|
11
|
+
Demonstrate the ability of the server to respond to a prior
|
12
|
+
authorization request with an `approved` decision.
|
13
|
+
|
14
|
+
)
|
15
|
+
|
16
|
+
id :pas_server_v201_approval_use_case
|
17
|
+
run_as_group
|
18
|
+
|
19
|
+
def use_case
|
20
|
+
'approval'
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
group do
|
25
|
+
title 'PAS Submit Operation'
|
26
|
+
|
27
|
+
test from: :pas_server_v201_pas_request_bundle_validation_test do
|
28
|
+
id :pas_server_v201_pas_request_bundle_validation_test_approval
|
29
|
+
config(
|
30
|
+
inputs: {
|
31
|
+
pa_submit_request_payload: {
|
32
|
+
name: :approval_pa_submit_request_payload ,
|
33
|
+
title: 'PAS Submit Request Payload for Approval Response'
|
34
|
+
}
|
35
|
+
}
|
36
|
+
)
|
37
|
+
end
|
38
|
+
test from: :pas_v201_claim_operation_test do
|
39
|
+
id :pas_v201_claim_operation_test_approval
|
40
|
+
config(
|
41
|
+
inputs: {
|
42
|
+
pa_submit_request_payload: {
|
43
|
+
name: :approval_pa_submit_request_payload ,
|
44
|
+
title: 'PAS Submit Request Payload for Approval Response'
|
45
|
+
}
|
46
|
+
}
|
47
|
+
)
|
48
|
+
end
|
49
|
+
test from: :pas_server_v201_pas_response_bundle_validation_test
|
50
|
+
end
|
51
|
+
group do
|
52
|
+
title 'PAS Status Check'
|
53
|
+
|
54
|
+
test from: :prior_auth_claim_status
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|