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,60 @@
|
|
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 ServerInquiryResponseInsurerMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Insurer Organization 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 Insurer Organization Profile.
|
16
|
+
This test checks all identified instances of the PAS Insurer Organization
|
17
|
+
Profile on responses returned by the server 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.identifier
|
28
|
+
* Organization.identifier:NPI
|
29
|
+
* Organization.identifier:TIN
|
30
|
+
* Organization.name
|
31
|
+
* Organization.telecom
|
32
|
+
* Organization.type
|
33
|
+
)
|
34
|
+
|
35
|
+
id :pas_server_inquiry_response_v201_insurer_must_support_test
|
36
|
+
|
37
|
+
def resource_type
|
38
|
+
'Organization'
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
43
|
+
end
|
44
|
+
|
45
|
+
def scratch_resources
|
46
|
+
scratch[:inquiry_response_resources] ||= {}
|
47
|
+
end
|
48
|
+
|
49
|
+
def resources_of_interest
|
50
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
51
|
+
collection.select { |res| res.resourceType == resource_type }
|
52
|
+
end
|
53
|
+
|
54
|
+
run do
|
55
|
+
perform_must_support_test(resources_of_interest)
|
56
|
+
validate_must_support
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
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 ServerSubmitRequestInsurerMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Insurer Organization 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 Insurer Organization Profile.
|
16
|
+
This test checks all identified instances of the PAS Insurer Organization
|
17
|
+
Profile on requests sent to the server 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.identifier
|
28
|
+
* Organization.identifier:NPI
|
29
|
+
* Organization.identifier:TIN
|
30
|
+
* Organization.name
|
31
|
+
* Organization.telecom
|
32
|
+
* Organization.type
|
33
|
+
)
|
34
|
+
|
35
|
+
id :pas_server_submit_request_v201_insurer_must_support_test
|
36
|
+
|
37
|
+
def resource_type
|
38
|
+
'Organization'
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
43
|
+
end
|
44
|
+
|
45
|
+
def scratch_resources
|
46
|
+
scratch[:submit_request_resources] ||= {}
|
47
|
+
end
|
48
|
+
|
49
|
+
def resources_of_interest
|
50
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
51
|
+
collection.select { |res| res.resourceType == resource_type }
|
52
|
+
end
|
53
|
+
|
54
|
+
run do
|
55
|
+
perform_must_support_test(resources_of_interest)
|
56
|
+
validate_must_support
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
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 ServerSubmitResponseInsurerMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Insurer Organization 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 Insurer Organization Profile.
|
16
|
+
This test checks all identified instances of the PAS Insurer Organization
|
17
|
+
Profile on responses returned by the server 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.identifier
|
28
|
+
* Organization.identifier:NPI
|
29
|
+
* Organization.identifier:TIN
|
30
|
+
* Organization.name
|
31
|
+
* Organization.telecom
|
32
|
+
* Organization.type
|
33
|
+
)
|
34
|
+
|
35
|
+
id :pas_server_submit_response_v201_insurer_must_support_test
|
36
|
+
|
37
|
+
def resource_type
|
38
|
+
'Organization'
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
43
|
+
end
|
44
|
+
|
45
|
+
def scratch_resources
|
46
|
+
scratch[:submit_response_resources] ||= {}
|
47
|
+
end
|
48
|
+
|
49
|
+
def resources_of_interest
|
50
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
51
|
+
collection.select { |res| res.resourceType == resource_type }
|
52
|
+
end
|
53
|
+
|
54
|
+
run do
|
55
|
+
perform_must_support_test(resources_of_interest)
|
56
|
+
validate_must_support
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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 ClientSubmitRequestMedicationRequestMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Medication Request 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 Medication Request Profile.
|
16
|
+
This test checks all identified instances of the PAS Medication Request
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* MedicationRequest.authoredOn
|
21
|
+
* MedicationRequest.dispenseRequest
|
22
|
+
* MedicationRequest.dispenseRequest.quantity
|
23
|
+
* MedicationRequest.dosageInstruction
|
24
|
+
* MedicationRequest.dosageInstruction.text
|
25
|
+
* MedicationRequest.dosageInstruction.timing
|
26
|
+
* MedicationRequest.encounter
|
27
|
+
* MedicationRequest.extension:coverage
|
28
|
+
* MedicationRequest.intent
|
29
|
+
* MedicationRequest.medication[x]
|
30
|
+
* MedicationRequest.reported[x]
|
31
|
+
* MedicationRequest.requester
|
32
|
+
* MedicationRequest.status
|
33
|
+
* MedicationRequest.subject
|
34
|
+
)
|
35
|
+
|
36
|
+
id :pas_client_submit_request_v201_medication_request_must_support_test
|
37
|
+
|
38
|
+
def resource_type
|
39
|
+
'MedicationRequest'
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.metadata
|
43
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
44
|
+
end
|
45
|
+
|
46
|
+
def scratch_resources
|
47
|
+
scratch[:submit_request_resources] ||= {}
|
48
|
+
end
|
49
|
+
|
50
|
+
def resources_of_interest
|
51
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
52
|
+
collection.select { |res| res.resourceType == resource_type }
|
53
|
+
end
|
54
|
+
|
55
|
+
run do
|
56
|
+
perform_must_support_test(resources_of_interest)
|
57
|
+
validate_must_support
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,183 @@
|
|
1
|
+
---
|
2
|
+
:name: profile_medicationrequest
|
3
|
+
:class_name: ProfileMedicationrequestSequence
|
4
|
+
:version: v2.0.1
|
5
|
+
:reformatted_version: v201
|
6
|
+
:resource: MedicationRequest
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-medicationrequest
|
8
|
+
:profile_name: PAS Medication Request
|
9
|
+
:profile_version: 2.0.1
|
10
|
+
:title: Medication Request
|
11
|
+
:short_description: Verify support for the server capabilities required by the PAS
|
12
|
+
Medication Request.
|
13
|
+
:interactions: []
|
14
|
+
:operations: []
|
15
|
+
:required_concepts: []
|
16
|
+
:must_supports:
|
17
|
+
:extensions:
|
18
|
+
- :id: MedicationRequest.extension:coverage
|
19
|
+
:path: extension
|
20
|
+
:url: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/ext-coverage-information
|
21
|
+
:slices: []
|
22
|
+
:elements:
|
23
|
+
- :path: status
|
24
|
+
- :path: intent
|
25
|
+
:fixed_value: order
|
26
|
+
- :path: reported[x]
|
27
|
+
:types:
|
28
|
+
- Reference
|
29
|
+
- :path: medication[x]
|
30
|
+
:types:
|
31
|
+
- Reference
|
32
|
+
- :path: subject
|
33
|
+
:types:
|
34
|
+
- Reference
|
35
|
+
- :path: encounter
|
36
|
+
:types:
|
37
|
+
- Reference
|
38
|
+
- :path: authoredOn
|
39
|
+
- :path: requester
|
40
|
+
:types:
|
41
|
+
- Reference
|
42
|
+
- :path: dosageInstruction
|
43
|
+
- :path: dosageInstruction.text
|
44
|
+
- :path: dosageInstruction.timing
|
45
|
+
- :path: dispenseRequest
|
46
|
+
- :path: dispenseRequest.quantity
|
47
|
+
:mandatory_elements:
|
48
|
+
- MedicationRequest.status
|
49
|
+
- MedicationRequest.intent
|
50
|
+
- MedicationRequest.medication[x]
|
51
|
+
- MedicationRequest.subject
|
52
|
+
- MedicationRequest.authoredOn
|
53
|
+
- MedicationRequest.requester
|
54
|
+
- MedicationRequest.substitution.allowed[x]
|
55
|
+
:bindings:
|
56
|
+
- :type: code
|
57
|
+
:strength: preferred
|
58
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
59
|
+
:path: language
|
60
|
+
- :type: code
|
61
|
+
:strength: required
|
62
|
+
:system: http://hl7.org/fhir/ValueSet/medicationrequest-status
|
63
|
+
:path: status
|
64
|
+
- :type: CodeableConcept
|
65
|
+
:strength: example
|
66
|
+
:system: http://hl7.org/fhir/ValueSet/medicationrequest-status-reason
|
67
|
+
:path: statusReason
|
68
|
+
- :type: CodeableConcept
|
69
|
+
:strength: example
|
70
|
+
:system: http://hl7.org/fhir/ValueSet/medicationrequest-category
|
71
|
+
:path: category
|
72
|
+
- :type: code
|
73
|
+
:strength: required
|
74
|
+
:system: http://hl7.org/fhir/ValueSet/request-priority
|
75
|
+
:path: priority
|
76
|
+
- :type: CodeableConcept
|
77
|
+
:strength: extensible
|
78
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/us-core-medication-codes
|
79
|
+
:path: medication
|
80
|
+
- :type: CodeableConcept
|
81
|
+
:strength: example
|
82
|
+
:system: http://hl7.org/fhir/ValueSet/performer-role
|
83
|
+
:path: performerType
|
84
|
+
- :type: CodeableConcept
|
85
|
+
:strength: example
|
86
|
+
:system: http://hl7.org/fhir/ValueSet/condition-code
|
87
|
+
:path: reasonCode
|
88
|
+
- :type: CodeableConcept
|
89
|
+
:strength: example
|
90
|
+
:system: http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy
|
91
|
+
:path: courseOfTherapyType
|
92
|
+
- :type: CodeableConcept
|
93
|
+
:strength: example
|
94
|
+
:system: http://hl7.org/fhir/ValueSet/additional-instruction-codes
|
95
|
+
:path: dosageInstruction.additionalInstruction
|
96
|
+
- :type: boolean
|
97
|
+
:strength: example
|
98
|
+
:system: http://hl7.org/fhir/ValueSet/medication-as-needed-reason
|
99
|
+
:path: dosageInstruction.asNeeded
|
100
|
+
- :type: CodeableConcept
|
101
|
+
:strength: example
|
102
|
+
:system: http://hl7.org/fhir/ValueSet/approach-site-codes
|
103
|
+
:path: dosageInstruction.site
|
104
|
+
- :type: CodeableConcept
|
105
|
+
:strength: example
|
106
|
+
:system: http://hl7.org/fhir/ValueSet/route-codes
|
107
|
+
:path: dosageInstruction.route
|
108
|
+
- :type: CodeableConcept
|
109
|
+
:strength: example
|
110
|
+
:system: http://hl7.org/fhir/ValueSet/administration-method-codes
|
111
|
+
:path: dosageInstruction.method
|
112
|
+
- :type: CodeableConcept
|
113
|
+
:strength: example
|
114
|
+
:system: http://hl7.org/fhir/ValueSet/dose-rate-type
|
115
|
+
:path: dosageInstruction.doseAndRate.type
|
116
|
+
- :type: boolean
|
117
|
+
:strength: example
|
118
|
+
:system: http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode
|
119
|
+
:path: substitution.allowed
|
120
|
+
- :type: CodeableConcept
|
121
|
+
:strength: example
|
122
|
+
:system: http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason
|
123
|
+
:path: substitution.reason
|
124
|
+
:references:
|
125
|
+
- :path: MedicationRequest.subject
|
126
|
+
:profiles:
|
127
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary
|
128
|
+
- :path: MedicationRequest.encounter
|
129
|
+
:profiles:
|
130
|
+
- http://hl7.org/fhir/StructureDefinition/Encounter
|
131
|
+
- :path: MedicationRequest.supportingInformation
|
132
|
+
:profiles:
|
133
|
+
- http://hl7.org/fhir/StructureDefinition/Resource
|
134
|
+
- :path: MedicationRequest.requester
|
135
|
+
:profiles:
|
136
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
137
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
138
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
139
|
+
- :path: MedicationRequest.performer
|
140
|
+
:profiles:
|
141
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
142
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
143
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
144
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
145
|
+
- http://hl7.org/fhir/StructureDefinition/Device
|
146
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
147
|
+
- http://hl7.org/fhir/StructureDefinition/CareTeam
|
148
|
+
- :path: MedicationRequest.recorder
|
149
|
+
:profiles:
|
150
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
151
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
152
|
+
- :path: MedicationRequest.reasonReference
|
153
|
+
:profiles:
|
154
|
+
- http://hl7.org/fhir/StructureDefinition/Condition
|
155
|
+
- http://hl7.org/fhir/StructureDefinition/Observation
|
156
|
+
- :path: MedicationRequest.basedOn
|
157
|
+
:profiles:
|
158
|
+
- http://hl7.org/fhir/StructureDefinition/CarePlan
|
159
|
+
- http://hl7.org/fhir/StructureDefinition/MedicationRequest
|
160
|
+
- http://hl7.org/fhir/StructureDefinition/ServiceRequest
|
161
|
+
- http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
|
162
|
+
- :path: MedicationRequest.insurance
|
163
|
+
:profiles:
|
164
|
+
- http://hl7.org/fhir/StructureDefinition/Coverage
|
165
|
+
- http://hl7.org/fhir/StructureDefinition/ClaimResponse
|
166
|
+
- :path: MedicationRequest.dispenseRequest.performer
|
167
|
+
:profiles:
|
168
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
169
|
+
- :path: MedicationRequest.priorPrescription
|
170
|
+
:profiles:
|
171
|
+
- http://hl7.org/fhir/StructureDefinition/MedicationRequest
|
172
|
+
- :path: MedicationRequest.detectedIssue
|
173
|
+
:profiles:
|
174
|
+
- http://hl7.org/fhir/StructureDefinition/DetectedIssue
|
175
|
+
- :path: MedicationRequest.eventHistory
|
176
|
+
:profiles:
|
177
|
+
- http://hl7.org/fhir/StructureDefinition/Provenance
|
178
|
+
:tests:
|
179
|
+
- :id: pas_server_submit_request_v201_medication_request_must_support_test
|
180
|
+
:file_name: server_submit_request_medication_request_must_support_test.rb
|
181
|
+
- :id: pas_client_submit_request_v201_medication_request_must_support_test
|
182
|
+
:file_name: client_submit_request_medication_request_must_support_test.rb
|
183
|
+
:delayed_references: []
|
@@ -0,0 +1,61 @@
|
|
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 ServerSubmitRequestMedicationRequestMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Medication Request 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 Medication Request Profile.
|
16
|
+
This test checks all identified instances of the PAS Medication Request
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* MedicationRequest.authoredOn
|
21
|
+
* MedicationRequest.dispenseRequest
|
22
|
+
* MedicationRequest.dispenseRequest.quantity
|
23
|
+
* MedicationRequest.dosageInstruction
|
24
|
+
* MedicationRequest.dosageInstruction.text
|
25
|
+
* MedicationRequest.dosageInstruction.timing
|
26
|
+
* MedicationRequest.encounter
|
27
|
+
* MedicationRequest.extension:coverage
|
28
|
+
* MedicationRequest.intent
|
29
|
+
* MedicationRequest.medication[x]
|
30
|
+
* MedicationRequest.reported[x]
|
31
|
+
* MedicationRequest.requester
|
32
|
+
* MedicationRequest.status
|
33
|
+
* MedicationRequest.subject
|
34
|
+
)
|
35
|
+
|
36
|
+
id :pas_server_submit_request_v201_medication_request_must_support_test
|
37
|
+
|
38
|
+
def resource_type
|
39
|
+
'MedicationRequest'
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.metadata
|
43
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
44
|
+
end
|
45
|
+
|
46
|
+
def scratch_resources
|
47
|
+
scratch[:submit_request_resources] ||= {}
|
48
|
+
end
|
49
|
+
|
50
|
+
def resources_of_interest
|
51
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
52
|
+
collection.select { |res| res.resourceType == resource_type }
|
53
|
+
end
|
54
|
+
|
55
|
+
run do
|
56
|
+
perform_must_support_test(resources_of_interest)
|
57
|
+
validate_must_support
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|