davinci_pas_test_kit 0.9.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 +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,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 ServerInquiryResponsePractitionerMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS Practitioner 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 Practitioner Profile.
|
|
16
|
+
This test checks all identified instances of the PAS Practitioner
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* Practitioner.address
|
|
21
|
+
* Practitioner.identifier
|
|
22
|
+
* Practitioner.identifier:NPI
|
|
23
|
+
* Practitioner.name
|
|
24
|
+
* Practitioner.name.family
|
|
25
|
+
* Practitioner.telecom
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
id :pas_server_inquiry_response_v201_practitioner_must_support_test
|
|
29
|
+
|
|
30
|
+
def resource_type
|
|
31
|
+
'Practitioner'
|
|
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[:inquiry_response_resources] ||= {}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def resources_of_interest
|
|
43
|
+
collection = tagged_resources(INQUIRE_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,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 ServerSubmitRequestPractitionerMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS Practitioner 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 Practitioner Profile.
|
|
16
|
+
This test checks all identified instances of the PAS Practitioner
|
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* Practitioner.address
|
|
21
|
+
* Practitioner.identifier
|
|
22
|
+
* Practitioner.identifier:NPI
|
|
23
|
+
* Practitioner.name
|
|
24
|
+
* Practitioner.name.family
|
|
25
|
+
* Practitioner.telecom
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
id :pas_server_submit_request_v201_practitioner_must_support_test
|
|
29
|
+
|
|
30
|
+
def resource_type
|
|
31
|
+
'Practitioner'
|
|
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,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 ServerSubmitResponsePractitionerMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS Practitioner 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 Practitioner Profile.
|
|
16
|
+
This test checks all identified instances of the PAS Practitioner
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* Practitioner.address
|
|
21
|
+
* Practitioner.identifier
|
|
22
|
+
* Practitioner.identifier:NPI
|
|
23
|
+
* Practitioner.name
|
|
24
|
+
* Practitioner.name.family
|
|
25
|
+
* Practitioner.telecom
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
id :pas_server_submit_response_v201_practitioner_must_support_test
|
|
29
|
+
|
|
30
|
+
def resource_type
|
|
31
|
+
'Practitioner'
|
|
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_response_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,49 @@
|
|
|
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 ClientInquiryRequestPractitionerRoleMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS PractitionerRole 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 PractitionerRole Profile.
|
|
16
|
+
This test checks all identified instances of the PAS PractitionerRole
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* PractitionerRole.organization
|
|
21
|
+
* PractitionerRole.practitioner
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
id :pas_client_inquiry_request_v201_practitioner_role_must_support_test
|
|
25
|
+
|
|
26
|
+
def resource_type
|
|
27
|
+
'PractitionerRole'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:inquiry_request_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def resources_of_interest
|
|
39
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
|
40
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
run do
|
|
44
|
+
perform_must_support_test(resources_of_interest)
|
|
45
|
+
validate_must_support
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ClientSubmitRequestPractitionerRoleMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS PractitionerRole 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 PractitionerRole Profile.
|
|
16
|
+
This test checks all identified instances of the PAS PractitionerRole
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* PractitionerRole.organization
|
|
21
|
+
* PractitionerRole.practitioner
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
id :pas_client_submit_request_v201_practitioner_role_must_support_test
|
|
25
|
+
|
|
26
|
+
def resource_type
|
|
27
|
+
'PractitionerRole'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:submit_request_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def resources_of_interest
|
|
39
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
|
40
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
run do
|
|
44
|
+
perform_must_support_test(resources_of_interest)
|
|
45
|
+
validate_must_support
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
:name: profile_practitionerrole
|
|
3
|
+
:class_name: ProfilePractitionerroleSequence
|
|
4
|
+
:version: v2.0.1
|
|
5
|
+
:reformatted_version: v201
|
|
6
|
+
:resource: PractitionerRole
|
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitionerrole
|
|
8
|
+
:profile_name: PAS PractitionerRole
|
|
9
|
+
:profile_version: 2.0.1
|
|
10
|
+
:title: PractitionerRole
|
|
11
|
+
:short_description: Verify support for the server capabilities required by the PAS
|
|
12
|
+
PractitionerRole.
|
|
13
|
+
:interactions: []
|
|
14
|
+
:operations: []
|
|
15
|
+
:required_concepts: []
|
|
16
|
+
:must_supports:
|
|
17
|
+
:extensions: []
|
|
18
|
+
:slices: []
|
|
19
|
+
:elements:
|
|
20
|
+
- :path: practitioner
|
|
21
|
+
:types:
|
|
22
|
+
- Reference
|
|
23
|
+
- :path: organization
|
|
24
|
+
:types:
|
|
25
|
+
- Reference
|
|
26
|
+
:mandatory_elements:
|
|
27
|
+
- PractitionerRole.practitioner
|
|
28
|
+
- PractitionerRole.notAvailable.description
|
|
29
|
+
:bindings:
|
|
30
|
+
- :type: code
|
|
31
|
+
:strength: preferred
|
|
32
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
|
33
|
+
:path: language
|
|
34
|
+
- :type: CodeableConcept
|
|
35
|
+
:strength: example
|
|
36
|
+
:system: http://hl7.org/fhir/ValueSet/practitioner-role
|
|
37
|
+
:path: code
|
|
38
|
+
- :type: CodeableConcept
|
|
39
|
+
:strength: preferred
|
|
40
|
+
:system: http://hl7.org/fhir/ValueSet/c80-practice-codes
|
|
41
|
+
:path: specialty
|
|
42
|
+
- :type: code
|
|
43
|
+
:strength: required
|
|
44
|
+
:system: http://hl7.org/fhir/ValueSet/days-of-week
|
|
45
|
+
:path: availableTime.daysOfWeek
|
|
46
|
+
:references:
|
|
47
|
+
- :path: PractitionerRole.practitioner
|
|
48
|
+
:profiles:
|
|
49
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitioner
|
|
50
|
+
- :path: PractitionerRole.organization
|
|
51
|
+
:profiles:
|
|
52
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-organization
|
|
53
|
+
- :path: PractitionerRole.location
|
|
54
|
+
:profiles:
|
|
55
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
|
56
|
+
- :path: PractitionerRole.healthcareService
|
|
57
|
+
:profiles:
|
|
58
|
+
- http://hl7.org/fhir/StructureDefinition/HealthcareService
|
|
59
|
+
- :path: PractitionerRole.endpoint
|
|
60
|
+
:profiles:
|
|
61
|
+
- http://hl7.org/fhir/StructureDefinition/Endpoint
|
|
62
|
+
:tests:
|
|
63
|
+
- :id: pas_server_submit_request_v201_practitioner_role_must_support_test
|
|
64
|
+
:file_name: server_submit_request_practitioner_role_must_support_test.rb
|
|
65
|
+
- :id: pas_client_submit_request_v201_practitioner_role_must_support_test
|
|
66
|
+
:file_name: client_submit_request_practitioner_role_must_support_test.rb
|
|
67
|
+
- :id: pas_server_submit_response_v201_practitioner_role_must_support_test
|
|
68
|
+
:file_name: server_submit_response_practitioner_role_must_support_test.rb
|
|
69
|
+
- :id: pas_server_inquiry_request_v201_practitioner_role_must_support_test
|
|
70
|
+
:file_name: server_inquiry_request_practitioner_role_must_support_test.rb
|
|
71
|
+
- :id: pas_client_inquiry_request_v201_practitioner_role_must_support_test
|
|
72
|
+
:file_name: client_inquiry_request_practitioner_role_must_support_test.rb
|
|
73
|
+
- :id: pas_server_inquiry_response_v201_practitioner_role_must_support_test
|
|
74
|
+
:file_name: server_inquiry_response_practitioner_role_must_support_test.rb
|
|
75
|
+
:delayed_references:
|
|
76
|
+
- :path: practitioner
|
|
77
|
+
:resources:
|
|
78
|
+
- Practitioner
|
|
79
|
+
- :path: organization
|
|
80
|
+
:resources:
|
|
81
|
+
- Organization
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ServerInquiryRequestPractitionerRoleMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS PractitionerRole 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 PractitionerRole Profile.
|
|
16
|
+
This test checks all identified instances of the PAS PractitionerRole
|
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* PractitionerRole.organization
|
|
21
|
+
* PractitionerRole.practitioner
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
id :pas_server_inquiry_request_v201_practitioner_role_must_support_test
|
|
25
|
+
|
|
26
|
+
def resource_type
|
|
27
|
+
'PractitionerRole'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:inquire_request_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def resources_of_interest
|
|
39
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
|
40
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
run do
|
|
44
|
+
perform_must_support_test(resources_of_interest)
|
|
45
|
+
validate_must_support
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ServerInquiryResponsePractitionerRoleMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS PractitionerRole 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 PractitionerRole Profile.
|
|
16
|
+
This test checks all identified instances of the PAS PractitionerRole
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* PractitionerRole.organization
|
|
21
|
+
* PractitionerRole.practitioner
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
id :pas_server_inquiry_response_v201_practitioner_role_must_support_test
|
|
25
|
+
|
|
26
|
+
def resource_type
|
|
27
|
+
'PractitionerRole'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:inquiry_response_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def resources_of_interest
|
|
39
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
|
40
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
run do
|
|
44
|
+
perform_must_support_test(resources_of_interest)
|
|
45
|
+
validate_must_support
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ServerSubmitRequestPractitionerRoleMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS PractitionerRole 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 PractitionerRole Profile.
|
|
16
|
+
This test checks all identified instances of the PAS PractitionerRole
|
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* PractitionerRole.organization
|
|
21
|
+
* PractitionerRole.practitioner
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
id :pas_server_submit_request_v201_practitioner_role_must_support_test
|
|
25
|
+
|
|
26
|
+
def resource_type
|
|
27
|
+
'PractitionerRole'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:submit_request_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def resources_of_interest
|
|
39
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
|
40
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
run do
|
|
44
|
+
perform_must_support_test(resources_of_interest)
|
|
45
|
+
validate_must_support
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ServerSubmitResponsePractitionerRoleMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS PractitionerRole 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 PractitionerRole Profile.
|
|
16
|
+
This test checks all identified instances of the PAS PractitionerRole
|
|
17
|
+
Profile on responses returned by the server to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* PractitionerRole.organization
|
|
21
|
+
* PractitionerRole.practitioner
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
id :pas_server_submit_response_v201_practitioner_role_must_support_test
|
|
25
|
+
|
|
26
|
+
def resource_type
|
|
27
|
+
'PractitionerRole'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:submit_response_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def resources_of_interest
|
|
39
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
|
40
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
run do
|
|
44
|
+
perform_must_support_test(resources_of_interest)
|
|
45
|
+
validate_must_support
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
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 ClientInquiryRequestRequestorMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS Requestor Organization 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 Requestor Organization Profile.
|
|
16
|
+
This test checks all identified instances of the PAS Requestor Organization
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* Organization.active
|
|
21
|
+
* Organization.address
|
|
22
|
+
* Organization.address.city
|
|
23
|
+
* Organization.address.country
|
|
24
|
+
* Organization.address.line
|
|
25
|
+
* Organization.address.postalCode
|
|
26
|
+
* Organization.address.state
|
|
27
|
+
* Organization.contact
|
|
28
|
+
* Organization.contact.name
|
|
29
|
+
* Organization.contact.telecom
|
|
30
|
+
* Organization.identifier
|
|
31
|
+
* Organization.identifier:NPI
|
|
32
|
+
* Organization.identifier:TIN
|
|
33
|
+
* Organization.name
|
|
34
|
+
* Organization.telecom
|
|
35
|
+
* Organization.type
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
id :pas_client_inquiry_request_v201_requestor_must_support_test
|
|
39
|
+
|
|
40
|
+
def resource_type
|
|
41
|
+
'Organization'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.metadata
|
|
45
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def scratch_resources
|
|
49
|
+
scratch[:inquiry_request_resources] ||= {}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def resources_of_interest
|
|
53
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
|
54
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
run do
|
|
58
|
+
perform_must_support_test(resources_of_interest)
|
|
59
|
+
validate_must_support
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
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 ClientSubmitRequestRequestorMustSupportTest < Inferno::Test
|
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
|
9
|
+
|
|
10
|
+
title 'All must support elements for Profile PAS Requestor Organization 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 Requestor Organization Profile.
|
|
16
|
+
This test checks all identified instances of the PAS Requestor Organization
|
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
|
18
|
+
must support elements are observed:
|
|
19
|
+
|
|
20
|
+
* Organization.active
|
|
21
|
+
* Organization.address
|
|
22
|
+
* Organization.address.city
|
|
23
|
+
* Organization.address.country
|
|
24
|
+
* Organization.address.line
|
|
25
|
+
* Organization.address.postalCode
|
|
26
|
+
* Organization.address.state
|
|
27
|
+
* Organization.contact
|
|
28
|
+
* Organization.contact.name
|
|
29
|
+
* Organization.contact.telecom
|
|
30
|
+
* Organization.identifier
|
|
31
|
+
* Organization.identifier:NPI
|
|
32
|
+
* Organization.identifier:TIN
|
|
33
|
+
* Organization.name
|
|
34
|
+
* Organization.telecom
|
|
35
|
+
* Organization.type
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
id :pas_client_submit_request_v201_requestor_must_support_test
|
|
39
|
+
|
|
40
|
+
def resource_type
|
|
41
|
+
'Organization'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.metadata
|
|
45
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def scratch_resources
|
|
49
|
+
scratch[:submit_request_resources] ||= {}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def resources_of_interest
|
|
53
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
|
54
|
+
collection.select { |res| res.resourceType == resource_type }
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
run do
|
|
58
|
+
perform_must_support_test(resources_of_interest)
|
|
59
|
+
validate_must_support
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|