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,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 ClientSubmitRequestServiceRequestMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Service 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 Service Request Profile.
|
16
|
+
This test checks all identified instances of the PAS Service Request
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* ServiceRequest.code
|
21
|
+
* ServiceRequest.extension:coverage
|
22
|
+
* ServiceRequest.extension:serviceCodeEnd
|
23
|
+
* ServiceRequest.occurrence[x]
|
24
|
+
* ServiceRequest.quantity[x]
|
25
|
+
* ServiceRequest.subject
|
26
|
+
)
|
27
|
+
|
28
|
+
id :pas_client_submit_request_v201_service_request_must_support_test
|
29
|
+
|
30
|
+
def resource_type
|
31
|
+
'ServiceRequest'
|
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,148 @@
|
|
1
|
+
---
|
2
|
+
:name: profile_servicerequest
|
3
|
+
:class_name: ProfileServicerequestSequence
|
4
|
+
:version: v2.0.1
|
5
|
+
:reformatted_version: v201
|
6
|
+
:resource: ServiceRequest
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-servicerequest
|
8
|
+
:profile_name: PAS Service Request
|
9
|
+
:profile_version: 2.0.1
|
10
|
+
:title: Service Request
|
11
|
+
:short_description: Verify support for the server capabilities required by the PAS
|
12
|
+
Service Request.
|
13
|
+
:interactions: []
|
14
|
+
:operations: []
|
15
|
+
:required_concepts:
|
16
|
+
- code
|
17
|
+
:must_supports:
|
18
|
+
:extensions:
|
19
|
+
- :id: ServiceRequest.extension:serviceCodeEnd
|
20
|
+
:path: extension
|
21
|
+
:url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-productOrServiceCodeEnd
|
22
|
+
- :id: ServiceRequest.extension:coverage
|
23
|
+
:path: extension
|
24
|
+
:url: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/ext-coverage-information
|
25
|
+
:slices: []
|
26
|
+
:elements:
|
27
|
+
- :path: code
|
28
|
+
- :path: quantity[x]
|
29
|
+
- :path: subject
|
30
|
+
:types:
|
31
|
+
- Reference
|
32
|
+
- :path: occurrence[x]
|
33
|
+
:mandatory_elements:
|
34
|
+
- ServiceRequest.status
|
35
|
+
- ServiceRequest.intent
|
36
|
+
- ServiceRequest.subject
|
37
|
+
:bindings:
|
38
|
+
- :type: code
|
39
|
+
:strength: preferred
|
40
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
41
|
+
:path: language
|
42
|
+
- :type: code
|
43
|
+
:strength: required
|
44
|
+
:system: http://hl7.org/fhir/ValueSet/request-status
|
45
|
+
:path: status
|
46
|
+
- :type: CodeableConcept
|
47
|
+
:strength: example
|
48
|
+
:system: http://hl7.org/fhir/ValueSet/servicerequest-category
|
49
|
+
:path: category
|
50
|
+
- :type: code
|
51
|
+
:strength: required
|
52
|
+
:system: http://hl7.org/fhir/ValueSet/request-priority
|
53
|
+
:path: priority
|
54
|
+
- :type: CodeableConcept
|
55
|
+
:strength: required
|
56
|
+
:system: http://hl7.org/fhir/us/davinci-pas/ValueSet/X12278RequestedServiceType
|
57
|
+
:path: code
|
58
|
+
- :type: CodeableConcept
|
59
|
+
:strength: example
|
60
|
+
:system: http://hl7.org/fhir/ValueSet/servicerequest-orderdetail
|
61
|
+
:path: orderDetail
|
62
|
+
- :type: boolean
|
63
|
+
:strength: example
|
64
|
+
:system: http://hl7.org/fhir/ValueSet/medication-as-needed-reason
|
65
|
+
:path: asNeeded
|
66
|
+
- :type: CodeableConcept
|
67
|
+
:strength: example
|
68
|
+
:system: http://hl7.org/fhir/ValueSet/participant-role
|
69
|
+
:path: performerType
|
70
|
+
- :type: CodeableConcept
|
71
|
+
:strength: example
|
72
|
+
:system: http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType
|
73
|
+
:path: locationCode
|
74
|
+
- :type: CodeableConcept
|
75
|
+
:strength: example
|
76
|
+
:system: http://hl7.org/fhir/ValueSet/procedure-reason
|
77
|
+
:path: reasonCode
|
78
|
+
- :type: CodeableConcept
|
79
|
+
:strength: example
|
80
|
+
:system: http://hl7.org/fhir/ValueSet/body-site
|
81
|
+
:path: bodySite
|
82
|
+
- :type: CodeableConcept
|
83
|
+
:strength: required
|
84
|
+
:system: http://hl7.org/fhir/us/davinci-pas/ValueSet/X12278RequestedServiceType
|
85
|
+
:path: value
|
86
|
+
:extensions:
|
87
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-productOrServiceCodeEnd
|
88
|
+
:references:
|
89
|
+
- :path: ServiceRequest.basedOn
|
90
|
+
:profiles:
|
91
|
+
- http://hl7.org/fhir/StructureDefinition/CarePlan
|
92
|
+
- http://hl7.org/fhir/StructureDefinition/ServiceRequest
|
93
|
+
- http://hl7.org/fhir/StructureDefinition/MedicationRequest
|
94
|
+
- :path: ServiceRequest.replaces
|
95
|
+
:profiles:
|
96
|
+
- http://hl7.org/fhir/StructureDefinition/ServiceRequest
|
97
|
+
- :path: ServiceRequest.subject
|
98
|
+
:profiles:
|
99
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary
|
100
|
+
- :path: ServiceRequest.encounter
|
101
|
+
:profiles:
|
102
|
+
- http://hl7.org/fhir/StructureDefinition/Encounter
|
103
|
+
- :path: ServiceRequest.requester
|
104
|
+
:profiles:
|
105
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
106
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
107
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
108
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
109
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
110
|
+
- http://hl7.org/fhir/StructureDefinition/Device
|
111
|
+
- :path: ServiceRequest.performer
|
112
|
+
:profiles:
|
113
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
114
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
115
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
116
|
+
- http://hl7.org/fhir/StructureDefinition/CareTeam
|
117
|
+
- http://hl7.org/fhir/StructureDefinition/HealthcareService
|
118
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
119
|
+
- http://hl7.org/fhir/StructureDefinition/Device
|
120
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
121
|
+
- :path: ServiceRequest.locationReference
|
122
|
+
:profiles:
|
123
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
124
|
+
- :path: ServiceRequest.reasonReference
|
125
|
+
:profiles:
|
126
|
+
- http://hl7.org/fhir/StructureDefinition/Condition
|
127
|
+
- http://hl7.org/fhir/StructureDefinition/Observation
|
128
|
+
- http://hl7.org/fhir/StructureDefinition/DiagnosticReport
|
129
|
+
- http://hl7.org/fhir/StructureDefinition/DocumentReference
|
130
|
+
- :path: ServiceRequest.insurance
|
131
|
+
:profiles:
|
132
|
+
- http://hl7.org/fhir/StructureDefinition/Coverage
|
133
|
+
- http://hl7.org/fhir/StructureDefinition/ClaimResponse
|
134
|
+
- :path: ServiceRequest.supportingInfo
|
135
|
+
:profiles:
|
136
|
+
- http://hl7.org/fhir/StructureDefinition/Resource
|
137
|
+
- :path: ServiceRequest.specimen
|
138
|
+
:profiles:
|
139
|
+
- http://hl7.org/fhir/StructureDefinition/Specimen
|
140
|
+
- :path: ServiceRequest.relevantHistory
|
141
|
+
:profiles:
|
142
|
+
- http://hl7.org/fhir/StructureDefinition/Provenance
|
143
|
+
:tests:
|
144
|
+
- :id: pas_server_submit_request_v201_service_request_must_support_test
|
145
|
+
:file_name: server_submit_request_service_request_must_support_test.rb
|
146
|
+
- :id: pas_client_submit_request_v201_service_request_must_support_test
|
147
|
+
:file_name: client_submit_request_service_request_must_support_test.rb
|
148
|
+
:delayed_references: []
|
@@ -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 ServerSubmitRequestServiceRequestMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Service 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 Service Request Profile.
|
16
|
+
This test checks all identified instances of the PAS Service Request
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* ServiceRequest.code
|
21
|
+
* ServiceRequest.extension:coverage
|
22
|
+
* ServiceRequest.extension:serviceCodeEnd
|
23
|
+
* ServiceRequest.occurrence[x]
|
24
|
+
* ServiceRequest.quantity[x]
|
25
|
+
* ServiceRequest.subject
|
26
|
+
)
|
27
|
+
|
28
|
+
id :pas_server_submit_request_v201_service_request_must_support_test
|
29
|
+
|
30
|
+
def resource_type
|
31
|
+
'ServiceRequest'
|
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,74 @@
|
|
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 ClientInquiryRequestSubscriberMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Subscriber Patient 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 Subscriber Patient Profile.
|
16
|
+
This test checks all identified instances of the PAS Subscriber Patient
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Patient.address
|
21
|
+
* Patient.address.city
|
22
|
+
* Patient.address.country
|
23
|
+
* Patient.address.district
|
24
|
+
* Patient.address.line
|
25
|
+
* Patient.address.period
|
26
|
+
* Patient.address.postalCode
|
27
|
+
* Patient.address.state
|
28
|
+
* Patient.birthDate
|
29
|
+
* Patient.communication
|
30
|
+
* Patient.communication.language
|
31
|
+
* Patient.extension:birthsex
|
32
|
+
* Patient.extension:ethnicity
|
33
|
+
* Patient.extension:race
|
34
|
+
* Patient.gender
|
35
|
+
* Patient.identifier
|
36
|
+
* Patient.identifier.system
|
37
|
+
* Patient.identifier.value
|
38
|
+
* Patient.name
|
39
|
+
* Patient.name.family
|
40
|
+
* Patient.name.given
|
41
|
+
* Patient.name.prefix
|
42
|
+
* Patient.name.suffix
|
43
|
+
* Patient.telecom
|
44
|
+
* Patient.telecom.system
|
45
|
+
* Patient.telecom.use
|
46
|
+
* Patient.telecom.value
|
47
|
+
)
|
48
|
+
|
49
|
+
id :pas_client_inquiry_request_v201_subscriber_must_support_test
|
50
|
+
|
51
|
+
def resource_type
|
52
|
+
'Patient'
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.metadata
|
56
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
57
|
+
end
|
58
|
+
|
59
|
+
def scratch_resources
|
60
|
+
scratch[:inquiry_request_resources] ||= {}
|
61
|
+
end
|
62
|
+
|
63
|
+
def resources_of_interest
|
64
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
65
|
+
collection.select { |res| res.resourceType == resource_type }
|
66
|
+
end
|
67
|
+
|
68
|
+
run do
|
69
|
+
perform_must_support_test(resources_of_interest)
|
70
|
+
validate_must_support
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,74 @@
|
|
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 ClientSubmitRequestSubscriberMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Subscriber Patient 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 Subscriber Patient Profile.
|
16
|
+
This test checks all identified instances of the PAS Subscriber Patient
|
17
|
+
Profile on requests sent by the client to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Patient.address
|
21
|
+
* Patient.address.city
|
22
|
+
* Patient.address.country
|
23
|
+
* Patient.address.district
|
24
|
+
* Patient.address.line
|
25
|
+
* Patient.address.period
|
26
|
+
* Patient.address.postalCode
|
27
|
+
* Patient.address.state
|
28
|
+
* Patient.birthDate
|
29
|
+
* Patient.communication
|
30
|
+
* Patient.communication.language
|
31
|
+
* Patient.extension:birthsex
|
32
|
+
* Patient.extension:ethnicity
|
33
|
+
* Patient.extension:race
|
34
|
+
* Patient.gender
|
35
|
+
* Patient.identifier
|
36
|
+
* Patient.identifier.system
|
37
|
+
* Patient.identifier.value
|
38
|
+
* Patient.name
|
39
|
+
* Patient.name.family
|
40
|
+
* Patient.name.given
|
41
|
+
* Patient.name.prefix
|
42
|
+
* Patient.name.suffix
|
43
|
+
* Patient.telecom
|
44
|
+
* Patient.telecom.system
|
45
|
+
* Patient.telecom.use
|
46
|
+
* Patient.telecom.value
|
47
|
+
)
|
48
|
+
|
49
|
+
id :pas_client_submit_request_v201_subscriber_must_support_test
|
50
|
+
|
51
|
+
def resource_type
|
52
|
+
'Patient'
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.metadata
|
56
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
57
|
+
end
|
58
|
+
|
59
|
+
def scratch_resources
|
60
|
+
scratch[:submit_request_resources] ||= {}
|
61
|
+
end
|
62
|
+
|
63
|
+
def resources_of_interest
|
64
|
+
collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
|
65
|
+
collection.select { |res| res.resourceType == resource_type }
|
66
|
+
end
|
67
|
+
|
68
|
+
run do
|
69
|
+
perform_must_support_test(resources_of_interest)
|
70
|
+
validate_must_support
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,159 @@
|
|
1
|
+
---
|
2
|
+
:name: profile_subscriber
|
3
|
+
:class_name: ProfileSubscriberSequence
|
4
|
+
:version: v2.0.1
|
5
|
+
:reformatted_version: v201
|
6
|
+
:resource: Patient
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscriber
|
8
|
+
:profile_name: PAS Subscriber Patient
|
9
|
+
:profile_version: 2.0.1
|
10
|
+
:title: Subscriber Patient
|
11
|
+
:short_description: Verify support for the server capabilities required by the PAS
|
12
|
+
Subscriber Patient.
|
13
|
+
:interactions: []
|
14
|
+
:operations: []
|
15
|
+
:required_concepts: []
|
16
|
+
:must_supports:
|
17
|
+
:extensions:
|
18
|
+
- :id: Patient.extension:race
|
19
|
+
:path: extension
|
20
|
+
:url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-race
|
21
|
+
- :id: Patient.extension:ethnicity
|
22
|
+
:path: extension
|
23
|
+
:url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity
|
24
|
+
- :id: Patient.extension:birthsex
|
25
|
+
:path: extension
|
26
|
+
:url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex
|
27
|
+
:slices: []
|
28
|
+
:elements:
|
29
|
+
- :path: identifier
|
30
|
+
- :path: identifier.system
|
31
|
+
- :path: identifier.value
|
32
|
+
- :path: name
|
33
|
+
- :path: name.family
|
34
|
+
- :path: name.given
|
35
|
+
- :path: name.prefix
|
36
|
+
- :path: name.suffix
|
37
|
+
- :path: telecom
|
38
|
+
- :path: telecom.system
|
39
|
+
- :path: telecom.value
|
40
|
+
- :path: telecom.use
|
41
|
+
- :path: gender
|
42
|
+
- :path: birthDate
|
43
|
+
- :path: address
|
44
|
+
- :path: address.line
|
45
|
+
- :path: address.city
|
46
|
+
- :path: address.district
|
47
|
+
- :path: address.state
|
48
|
+
- :path: address.postalCode
|
49
|
+
- :path: address.country
|
50
|
+
- :path: address.period
|
51
|
+
- :path: communication
|
52
|
+
- :path: communication.language
|
53
|
+
:mandatory_elements:
|
54
|
+
- Patient.identifier
|
55
|
+
- Patient.identifier.system
|
56
|
+
- Patient.identifier.value
|
57
|
+
- Patient.name
|
58
|
+
- Patient.telecom.system
|
59
|
+
- Patient.telecom.value
|
60
|
+
- Patient.gender
|
61
|
+
- Patient.communication.language
|
62
|
+
- Patient.link.other
|
63
|
+
- Patient.link.type
|
64
|
+
:bindings:
|
65
|
+
- :type: code
|
66
|
+
:strength: preferred
|
67
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
68
|
+
:path: language
|
69
|
+
- :type: code
|
70
|
+
:strength: required
|
71
|
+
:system: http://hl7.org/fhir/ValueSet/identifier-use
|
72
|
+
:path: identifier.use
|
73
|
+
- :type: CodeableConcept
|
74
|
+
:strength: extensible
|
75
|
+
:system: http://hl7.org/fhir/ValueSet/identifier-type
|
76
|
+
:path: identifier.type
|
77
|
+
- :type: code
|
78
|
+
:strength: required
|
79
|
+
:system: http://hl7.org/fhir/ValueSet/name-use
|
80
|
+
:path: name.use
|
81
|
+
- :type: code
|
82
|
+
:strength: required
|
83
|
+
:system: http://hl7.org/fhir/ValueSet/contact-point-system
|
84
|
+
:path: telecom.system
|
85
|
+
- :type: code
|
86
|
+
:strength: required
|
87
|
+
:system: http://hl7.org/fhir/ValueSet/contact-point-use
|
88
|
+
:path: telecom.use
|
89
|
+
- :type: code
|
90
|
+
:strength: required
|
91
|
+
:system: http://hl7.org/fhir/ValueSet/administrative-gender
|
92
|
+
:path: gender
|
93
|
+
- :type: code
|
94
|
+
:strength: required
|
95
|
+
:system: http://hl7.org/fhir/ValueSet/address-use
|
96
|
+
:path: address.use
|
97
|
+
- :type: code
|
98
|
+
:strength: required
|
99
|
+
:system: http://hl7.org/fhir/ValueSet/address-type
|
100
|
+
:path: address.type
|
101
|
+
- :type: string
|
102
|
+
:strength: extensible
|
103
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state
|
104
|
+
:path: address.state
|
105
|
+
- :type: CodeableConcept
|
106
|
+
:strength: extensible
|
107
|
+
:system: http://hl7.org/fhir/ValueSet/marital-status
|
108
|
+
:path: maritalStatus
|
109
|
+
- :type: CodeableConcept
|
110
|
+
:strength: extensible
|
111
|
+
:system: http://hl7.org/fhir/ValueSet/patient-contactrelationship
|
112
|
+
:path: contact.relationship
|
113
|
+
- :type: code
|
114
|
+
:strength: required
|
115
|
+
:system: http://hl7.org/fhir/ValueSet/administrative-gender
|
116
|
+
:path: contact.gender
|
117
|
+
- :type: CodeableConcept
|
118
|
+
:strength: extensible
|
119
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/simple-language
|
120
|
+
:path: communication.language
|
121
|
+
- :type: code
|
122
|
+
:strength: required
|
123
|
+
:system: http://hl7.org/fhir/ValueSet/link-type
|
124
|
+
:path: link.type
|
125
|
+
- :type: CodeableConcept
|
126
|
+
:strength: required
|
127
|
+
:system: https://valueset.x12.org/x217/005010/request/2010C/INS/1/08/00/584
|
128
|
+
:path: value
|
129
|
+
:extensions:
|
130
|
+
- http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-militaryStatus
|
131
|
+
:references:
|
132
|
+
- :path: Patient.identifier.assigner
|
133
|
+
:profiles:
|
134
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
135
|
+
- :path: Patient.contact.organization
|
136
|
+
:profiles:
|
137
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
138
|
+
- :path: Patient.generalPractitioner
|
139
|
+
:profiles:
|
140
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
141
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
142
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
143
|
+
- :path: Patient.managingOrganization
|
144
|
+
:profiles:
|
145
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
146
|
+
- :path: Patient.link.other
|
147
|
+
:profiles:
|
148
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
149
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
150
|
+
:tests:
|
151
|
+
- :id: pas_server_submit_request_v201_subscriber_must_support_test
|
152
|
+
:file_name: server_submit_request_subscriber_must_support_test.rb
|
153
|
+
- :id: pas_client_submit_request_v201_subscriber_must_support_test
|
154
|
+
:file_name: client_submit_request_subscriber_must_support_test.rb
|
155
|
+
- :id: pas_server_inquiry_request_v201_subscriber_must_support_test
|
156
|
+
:file_name: server_inquiry_request_subscriber_must_support_test.rb
|
157
|
+
- :id: pas_client_inquiry_request_v201_subscriber_must_support_test
|
158
|
+
:file_name: client_inquiry_request_subscriber_must_support_test.rb
|
159
|
+
:delayed_references: []
|
@@ -0,0 +1,74 @@
|
|
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 ServerInquiryRequestSubscriberMustSupportTest < Inferno::Test
|
8
|
+
include DaVinciPASTestKit::MustSupportTest
|
9
|
+
|
10
|
+
title 'All must support elements for Profile PAS Subscriber Patient 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 Subscriber Patient Profile.
|
16
|
+
This test checks all identified instances of the PAS Subscriber Patient
|
17
|
+
Profile on requests sent to the server to ensure that the following
|
18
|
+
must support elements are observed:
|
19
|
+
|
20
|
+
* Patient.address
|
21
|
+
* Patient.address.city
|
22
|
+
* Patient.address.country
|
23
|
+
* Patient.address.district
|
24
|
+
* Patient.address.line
|
25
|
+
* Patient.address.period
|
26
|
+
* Patient.address.postalCode
|
27
|
+
* Patient.address.state
|
28
|
+
* Patient.birthDate
|
29
|
+
* Patient.communication
|
30
|
+
* Patient.communication.language
|
31
|
+
* Patient.extension:birthsex
|
32
|
+
* Patient.extension:ethnicity
|
33
|
+
* Patient.extension:race
|
34
|
+
* Patient.gender
|
35
|
+
* Patient.identifier
|
36
|
+
* Patient.identifier.system
|
37
|
+
* Patient.identifier.value
|
38
|
+
* Patient.name
|
39
|
+
* Patient.name.family
|
40
|
+
* Patient.name.given
|
41
|
+
* Patient.name.prefix
|
42
|
+
* Patient.name.suffix
|
43
|
+
* Patient.telecom
|
44
|
+
* Patient.telecom.system
|
45
|
+
* Patient.telecom.use
|
46
|
+
* Patient.telecom.value
|
47
|
+
)
|
48
|
+
|
49
|
+
id :pas_server_inquiry_request_v201_subscriber_must_support_test
|
50
|
+
|
51
|
+
def resource_type
|
52
|
+
'Patient'
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.metadata
|
56
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
57
|
+
end
|
58
|
+
|
59
|
+
def scratch_resources
|
60
|
+
scratch[:inquire_request_resources] ||= {}
|
61
|
+
end
|
62
|
+
|
63
|
+
def resources_of_interest
|
64
|
+
collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
|
65
|
+
collection.select { |res| res.resourceType == resource_type }
|
66
|
+
end
|
67
|
+
|
68
|
+
run do
|
69
|
+
perform_must_support_test(resources_of_interest)
|
70
|
+
validate_must_support
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|