davinci_pas_test_kit 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/lib/davinci_pas_test_kit/client_suite.rb +289 -0
  4. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/claim_status/pas_claim_status_test.rb +109 -0
  5. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_response_attest.rb +39 -0
  6. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_test.rb +38 -0
  7. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_response_attest.rb +38 -0
  8. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb +43 -0
  9. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_must_support_test.rb +51 -0
  10. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_response_attest.rb +39 -0
  11. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_test.rb +35 -0
  12. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_response_attest.rb +39 -0
  13. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_test.rb +43 -0
  14. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_submit_must_support_test.rb +57 -0
  15. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_request_test.rb +31 -0
  16. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_validation_test.rb +18 -0
  17. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/nonconformant_pas_bundle.json +16 -0
  18. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_inquiry_error_test.rb +38 -0
  19. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_submission_error_test.rb +56 -0
  20. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/device_request_metadata.yml +112 -0
  21. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/medication_request_metadata.yml +183 -0
  22. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/nutrition_order_metadata.yml +109 -0
  23. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/pas_client_must_support_requirement_test.rb +117 -0
  24. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/pas_server_must_support_requirement_test.rb +116 -0
  25. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/must_support/service_request_metadata.yml +148 -0
  26. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_approval_group.rb +26 -0
  27. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_authentication_group.rb +49 -0
  28. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_denial_group.rb +41 -0
  29. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_pended_group.rb +56 -0
  30. data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_error_group.rb +20 -0
  31. data/lib/davinci_pas_test_kit/ext/inferno_core/record_response_route.rb +98 -0
  32. data/lib/davinci_pas_test_kit/ext/inferno_core/request.rb +19 -0
  33. data/lib/davinci_pas_test_kit/ext/inferno_core/runnable.rb +18 -0
  34. data/lib/davinci_pas_test_kit/fhir_resource_navigation.rb +72 -0
  35. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/client_inquiry_request_beneficiary_must_support_test.rb +75 -0
  36. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/client_submit_request_beneficiary_must_support_test.rb +75 -0
  37. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/metadata.yml +162 -0
  38. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_inquiry_request_beneficiary_must_support_test.rb +75 -0
  39. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_inquiry_response_beneficiary_must_support_test.rb +75 -0
  40. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_submit_request_beneficiary_must_support_test.rb +75 -0
  41. data/lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/server_submit_response_beneficiary_must_support_test.rb +75 -0
  42. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/claim_operation_test.rb +67 -0
  43. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/metadata.yml +577 -0
  44. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/claim_inquiry_operation_test.rb +57 -0
  45. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/client_inquiry_request_claim_inquiry_must_support_test.rb +95 -0
  46. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/metadata.yml +516 -0
  47. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_inquiry/server_inquiry_request_claim_inquiry_must_support_test.rb +95 -0
  48. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/client_submit_request_claim_update_must_support_test.rb +102 -0
  49. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/metadata.yml +591 -0
  50. data/lib/davinci_pas_test_kit/generated/v2.0.1/claim_update/server_submit_request_claim_update_must_support_test.rb +102 -0
  51. data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/metadata.yml +311 -0
  52. data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/server_inquiry_response_claiminquiryresponse_must_support_test.rb +73 -0
  53. data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/metadata.yml +318 -0
  54. data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/server_submit_response_claimresponse_must_support_test.rb +75 -0
  55. data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_denial_pas_response_bundle_validation_test.rb +53 -0
  56. data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pas_request_bundle_validation_test.rb +55 -0
  57. data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_inquiry_request_bundle_validation_test.rb +55 -0
  58. data/lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_response_bundle_validation_test.rb +53 -0
  59. data/lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/metadata.yml +130 -0
  60. data/lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/server_submit_response_communication_request_must_support_test.rb +58 -0
  61. data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/client_inquiry_request_coverage_must_support_test.rb +55 -0
  62. data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/client_submit_request_coverage_must_support_test.rb +55 -0
  63. data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/metadata.yml +111 -0
  64. data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/server_inquiry_request_coverage_must_support_test.rb +55 -0
  65. data/lib/davinci_pas_test_kit/generated/v2.0.1/coverage/server_submit_request_coverage_must_support_test.rb +55 -0
  66. data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/client_submit_request_device_request_must_support_test.rb +51 -0
  67. data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/metadata.yml +112 -0
  68. data/lib/davinci_pas_test_kit/generated/v2.0.1/device_request/server_submit_request_device_request_must_support_test.rb +51 -0
  69. data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/client_submit_request_encounter_must_support_test.rb +67 -0
  70. data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/metadata.yml +213 -0
  71. data/lib/davinci_pas_test_kit/generated/v2.0.1/encounter/server_submit_request_encounter_must_support_test.rb +67 -0
  72. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/client_inquiry_request_insurer_must_support_test.rb +60 -0
  73. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/client_submit_request_insurer_must_support_test.rb +60 -0
  74. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/metadata.yml +104 -0
  75. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_inquiry_request_insurer_must_support_test.rb +60 -0
  76. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_inquiry_response_insurer_must_support_test.rb +60 -0
  77. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_submit_request_insurer_must_support_test.rb +60 -0
  78. data/lib/davinci_pas_test_kit/generated/v2.0.1/insurer/server_submit_response_insurer_must_support_test.rb +60 -0
  79. data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/client_submit_request_medication_request_must_support_test.rb +61 -0
  80. data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/metadata.yml +183 -0
  81. data/lib/davinci_pas_test_kit/generated/v2.0.1/medication_request/server_submit_request_medication_request_must_support_test.rb +61 -0
  82. data/lib/davinci_pas_test_kit/generated/v2.0.1/metadata.yml +5253 -0
  83. data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/client_submit_request_nutrition_order_must_support_test.rb +53 -0
  84. data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/metadata.yml +109 -0
  85. data/lib/davinci_pas_test_kit/generated/v2.0.1/nutrition_order/server_submit_request_nutrition_order_must_support_test.rb +53 -0
  86. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_client_inquiry_must_support_use_case_group.rb +51 -0
  87. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_client_submit_must_support_use_case_group.rb +61 -0
  88. 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
  89. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/metadata.yml +77 -0
  90. 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
  91. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test.rb +83 -0
  92. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/metadata.yml +67 -0
  93. 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
  94. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test.rb +80 -0
  95. 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
  96. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/metadata.yml +77 -0
  97. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_pas_request_bundle_validation_test.rb +83 -0
  98. 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
  99. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/metadata.yml +71 -0
  100. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_pas_response_bundle_validation_test.rb +80 -0
  101. 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
  102. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_approval_use_case_group.rb +59 -0
  103. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_denial_use_case_group.rb +59 -0
  104. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_must_support_use_case_group.rb +265 -0
  105. data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_pended_use_case_group.rb +84 -0
  106. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/client_inquiry_request_practitioner_must_support_test.rb +53 -0
  107. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/client_submit_request_practitioner_must_support_test.rb +53 -0
  108. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/metadata.yml +74 -0
  109. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_inquiry_request_practitioner_must_support_test.rb +53 -0
  110. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_inquiry_response_practitioner_must_support_test.rb +53 -0
  111. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_submit_request_practitioner_must_support_test.rb +53 -0
  112. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner/server_submit_response_practitioner_must_support_test.rb +53 -0
  113. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/client_inquiry_request_practitioner_role_must_support_test.rb +49 -0
  114. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/client_submit_request_practitioner_role_must_support_test.rb +49 -0
  115. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/metadata.yml +81 -0
  116. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_inquiry_request_practitioner_role_must_support_test.rb +49 -0
  117. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_inquiry_response_practitioner_role_must_support_test.rb +49 -0
  118. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_submit_request_practitioner_role_must_support_test.rb +49 -0
  119. data/lib/davinci_pas_test_kit/generated/v2.0.1/practitioner_role/server_submit_response_practitioner_role_must_support_test.rb +49 -0
  120. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/client_inquiry_request_requestor_must_support_test.rb +63 -0
  121. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/client_submit_request_requestor_must_support_test.rb +63 -0
  122. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/metadata.yml +107 -0
  123. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_inquiry_request_requestor_must_support_test.rb +63 -0
  124. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_inquiry_response_requestor_must_support_test.rb +63 -0
  125. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_submit_request_requestor_must_support_test.rb +63 -0
  126. data/lib/davinci_pas_test_kit/generated/v2.0.1/requestor/server_submit_response_requestor_must_support_test.rb +63 -0
  127. data/lib/davinci_pas_test_kit/generated/v2.0.1/resource_list.rb +54 -0
  128. data/lib/davinci_pas_test_kit/generated/v2.0.1/server_suite.rb +236 -0
  129. data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/client_submit_request_service_request_must_support_test.rb +53 -0
  130. data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/metadata.yml +148 -0
  131. data/lib/davinci_pas_test_kit/generated/v2.0.1/service_request/server_submit_request_service_request_must_support_test.rb +53 -0
  132. data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/client_inquiry_request_subscriber_must_support_test.rb +74 -0
  133. data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/client_submit_request_subscriber_must_support_test.rb +74 -0
  134. data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/metadata.yml +159 -0
  135. data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/server_inquiry_request_subscriber_must_support_test.rb +74 -0
  136. data/lib/davinci_pas_test_kit/generated/v2.0.1/subscriber/server_submit_request_subscriber_must_support_test.rb +74 -0
  137. data/lib/davinci_pas_test_kit/generated/v2.0.1/task/metadata.yml +192 -0
  138. data/lib/davinci_pas_test_kit/generated/v2.0.1/task/server_inquiry_response_task_must_support_test.rb +61 -0
  139. data/lib/davinci_pas_test_kit/generated/v2.0.1/task/server_submit_response_task_must_support_test.rb +61 -0
  140. data/lib/davinci_pas_test_kit/generator/group_generator.rb +440 -0
  141. data/lib/davinci_pas_test_kit/generator/group_metadata.rb +73 -0
  142. data/lib/davinci_pas_test_kit/generator/group_metadata_extractor.rb +244 -0
  143. data/lib/davinci_pas_test_kit/generator/ig_loader.rb +78 -0
  144. data/lib/davinci_pas_test_kit/generator/ig_metadata.rb +66 -0
  145. data/lib/davinci_pas_test_kit/generator/ig_metadata_extractor.rb +54 -0
  146. data/lib/davinci_pas_test_kit/generator/ig_resources.rb +74 -0
  147. data/lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb +86 -0
  148. data/lib/davinci_pas_test_kit/generator/must_support_metadata_extractor.rb +327 -0
  149. data/lib/davinci_pas_test_kit/generator/must_support_test_generator.rb +155 -0
  150. data/lib/davinci_pas_test_kit/generator/naming.rb +50 -0
  151. data/lib/davinci_pas_test_kit/generator/operation_test_generator.rb +136 -0
  152. data/lib/davinci_pas_test_kit/generator/resource_list_generator.rb +59 -0
  153. data/lib/davinci_pas_test_kit/generator/suite_generator.rb +94 -0
  154. data/lib/davinci_pas_test_kit/generator/terminology_binding_metadata_extractor.rb +108 -0
  155. data/lib/davinci_pas_test_kit/generator/validation_test_generator.rb +181 -0
  156. data/lib/davinci_pas_test_kit/generator/value_extractor.rb +48 -0
  157. data/lib/davinci_pas_test_kit/generator.rb +80 -0
  158. data/lib/davinci_pas_test_kit/mock_server.rb +189 -0
  159. data/lib/davinci_pas_test_kit/must_support_test.rb +267 -0
  160. data/lib/davinci_pas_test_kit/pas_bundle_validation.rb +568 -0
  161. data/lib/davinci_pas_test_kit/tags.rb +7 -0
  162. data/lib/davinci_pas_test_kit/urls.rb +39 -0
  163. data/lib/davinci_pas_test_kit/user_input_response.rb +32 -0
  164. data/lib/davinci_pas_test_kit/validation_test.rb +58 -0
  165. data/lib/davinci_pas_test_kit/validator_suppressions.rb +143 -0
  166. data/lib/davinci_pas_test_kit/version.rb +5 -0
  167. data/lib/davinci_pas_test_kit.rb +2 -0
  168. metadata +281 -0
@@ -0,0 +1,51 @@
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 ServerSubmitRequestDeviceRequestMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Device 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 Device Request Profile.
16
+ This test checks all identified instances of the PAS Device Request
17
+ Profile on requests sent to the server to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * DeviceRequest.code[x]
21
+ * DeviceRequest.extension:coverage
22
+ * DeviceRequest.occurrence[x]
23
+ * DeviceRequest.subject
24
+ )
25
+
26
+ id :pas_server_submit_request_v201_device_request_must_support_test
27
+
28
+ def resource_type
29
+ 'DeviceRequest'
30
+ end
31
+
32
+ def self.metadata
33
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
34
+ end
35
+
36
+ def scratch_resources
37
+ scratch[:submit_request_resources] ||= {}
38
+ end
39
+
40
+ def resources_of_interest
41
+ collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
42
+ collection.select { |res| res.resourceType == resource_type }
43
+ end
44
+
45
+ run do
46
+ perform_must_support_test(resources_of_interest)
47
+ validate_must_support
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,67 @@
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 ClientSubmitRequestEncounterMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Encounter 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 Encounter Profile.
16
+ This test checks all identified instances of the PAS Encounter
17
+ Profile on requests sent by the client to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Encounter.class
21
+ * Encounter.extension:nursingHomeResidentialStatus
22
+ * Encounter.extension:patientStatus
23
+ * Encounter.hospitalization
24
+ * Encounter.hospitalization.admitSource
25
+ * Encounter.hospitalization.dischargeDisposition
26
+ * Encounter.identifier
27
+ * Encounter.identifier.system
28
+ * Encounter.identifier.value
29
+ * Encounter.location
30
+ * Encounter.location.location
31
+ * Encounter.participant
32
+ * Encounter.participant.individual
33
+ * Encounter.participant.period
34
+ * Encounter.participant.type
35
+ * Encounter.period
36
+ * Encounter.reasonCode
37
+ * Encounter.status
38
+ * Encounter.subject
39
+ * Encounter.type
40
+ )
41
+
42
+ id :pas_client_submit_request_v201_encounter_must_support_test
43
+
44
+ def resource_type
45
+ 'Encounter'
46
+ end
47
+
48
+ def self.metadata
49
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
50
+ end
51
+
52
+ def scratch_resources
53
+ scratch[:submit_request_resources] ||= {}
54
+ end
55
+
56
+ def resources_of_interest
57
+ collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
58
+ collection.select { |res| res.resourceType == resource_type }
59
+ end
60
+
61
+ run do
62
+ perform_must_support_test(resources_of_interest)
63
+ validate_must_support
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,213 @@
1
+ ---
2
+ :name: profile_encounter
3
+ :class_name: ProfileEncounterSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: Encounter
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-encounter
8
+ :profile_name: PAS Encounter
9
+ :profile_version: 2.0.1
10
+ :title: Encounter
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Encounter.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts:
16
+ - extension.valueCodeableConcept
17
+ - type
18
+ - hospitalization.admitSource
19
+ :must_supports:
20
+ :extensions:
21
+ - :id: Encounter.extension:patientStatus
22
+ :path: extension
23
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-patientStatus
24
+ - :id: Encounter.extension:nursingHomeResidentialStatus
25
+ :path: extension
26
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus
27
+ :slices: []
28
+ :elements:
29
+ - :path: identifier
30
+ - :path: identifier.system
31
+ - :path: identifier.value
32
+ - :path: status
33
+ :fixed_value: planned
34
+ - :path: class
35
+ - :path: type
36
+ - :path: subject
37
+ :types:
38
+ - Reference
39
+ - :path: participant
40
+ - :path: participant.type
41
+ - :path: participant.period
42
+ - :path: participant.individual
43
+ :types:
44
+ - Reference
45
+ - :path: period
46
+ - :path: reasonCode
47
+ - :path: hospitalization
48
+ - :path: hospitalization.admitSource
49
+ - :path: hospitalization.dischargeDisposition
50
+ - :path: location
51
+ - :path: location.location
52
+ :types:
53
+ - Reference
54
+ :mandatory_elements:
55
+ - Encounter.extension.url
56
+ - Encounter.identifier.system
57
+ - Encounter.identifier.value
58
+ - Encounter.status
59
+ - Encounter.statusHistory.status
60
+ - Encounter.statusHistory.period
61
+ - Encounter.class
62
+ - Encounter.classHistory.class
63
+ - Encounter.classHistory.period
64
+ - Encounter.type
65
+ - Encounter.subject
66
+ - Encounter.diagnosis.condition
67
+ - Encounter.location.location
68
+ :bindings:
69
+ - :type: code
70
+ :strength: preferred
71
+ :system: http://hl7.org/fhir/ValueSet/languages
72
+ :path: language
73
+ - :type: CodeableConcept
74
+ :strength: required
75
+ :system: https://valueset.x12.org/x217/005010/request/2000E/CL1/1/04/00/1345
76
+ :path: extension.value
77
+ - :type: code
78
+ :strength: required
79
+ :system: http://hl7.org/fhir/ValueSet/identifier-use
80
+ :path: identifier.use
81
+ - :type: CodeableConcept
82
+ :strength: extensible
83
+ :system: http://hl7.org/fhir/ValueSet/identifier-type
84
+ :path: identifier.type
85
+ - :type: code
86
+ :strength: required
87
+ :system: http://hl7.org/fhir/ValueSet/encounter-status
88
+ :path: statusHistory.status
89
+ - :type: Coding
90
+ :strength: extensible
91
+ :system: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
92
+ :path: class
93
+ - :type: Coding
94
+ :strength: extensible
95
+ :system: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
96
+ :path: classHistory.class
97
+ - :type: CodeableConcept
98
+ :strength: required
99
+ :system: https://valueset.x12.org/x217/005010/request/2000E/CL1/1/01/00/1315
100
+ :path: type
101
+ - :type: CodeableConcept
102
+ :strength: example
103
+ :system: http://hl7.org/fhir/ValueSet/service-type
104
+ :path: serviceType
105
+ - :type: CodeableConcept
106
+ :strength: example
107
+ :system: http://terminology.hl7.org/ValueSet/v3-ActPriority
108
+ :path: priority
109
+ - :type: CodeableConcept
110
+ :strength: extensible
111
+ :system: http://hl7.org/fhir/ValueSet/encounter-participant-type
112
+ :path: participant.type
113
+ - :type: CodeableConcept
114
+ :strength: preferred
115
+ :system: http://hl7.org/fhir/ValueSet/encounter-reason
116
+ :path: reasonCode
117
+ - :type: CodeableConcept
118
+ :strength: preferred
119
+ :system: http://hl7.org/fhir/ValueSet/diagnosis-role
120
+ :path: diagnosis.use
121
+ - :type: CodeableConcept
122
+ :strength: required
123
+ :system: https://valueset.x12.org/x217/005010/request/2000E/CL1/1/02/00/1314
124
+ :path: hospitalization.admitSource
125
+ - :type: CodeableConcept
126
+ :strength: example
127
+ :system: http://terminology.hl7.org/ValueSet/v2-0092
128
+ :path: hospitalization.reAdmission
129
+ - :type: CodeableConcept
130
+ :strength: example
131
+ :system: http://hl7.org/fhir/ValueSet/encounter-diet
132
+ :path: hospitalization.dietPreference
133
+ - :type: CodeableConcept
134
+ :strength: preferred
135
+ :system: http://hl7.org/fhir/ValueSet/encounter-special-courtesy
136
+ :path: hospitalization.specialCourtesy
137
+ - :type: CodeableConcept
138
+ :strength: preferred
139
+ :system: http://hl7.org/fhir/ValueSet/encounter-special-arrangements
140
+ :path: hospitalization.specialArrangement
141
+ - :type: CodeableConcept
142
+ :strength: example
143
+ :system: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition
144
+ :path: hospitalization.dischargeDisposition
145
+ - :type: code
146
+ :strength: required
147
+ :system: http://hl7.org/fhir/ValueSet/encounter-location-status
148
+ :path: location.status
149
+ - :type: CodeableConcept
150
+ :strength: example
151
+ :system: http://hl7.org/fhir/ValueSet/location-physical-type
152
+ :path: location.physicalType
153
+ - :type: CodeableConcept
154
+ :strength: required
155
+ :system: https://valueset.x12.org/x217/005010/request/2000E/CL1/1/03/00/1352
156
+ :path: value
157
+ :extensions:
158
+ - http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-patientStatus
159
+ :references:
160
+ - :path: Encounter.identifier.assigner
161
+ :profiles:
162
+ - http://hl7.org/fhir/StructureDefinition/Organization
163
+ - :path: Encounter.subject
164
+ :profiles:
165
+ - http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary
166
+ - :path: Encounter.episodeOfCare
167
+ :profiles:
168
+ - http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
169
+ - :path: Encounter.basedOn
170
+ :profiles:
171
+ - http://hl7.org/fhir/StructureDefinition/ServiceRequest
172
+ - :path: Encounter.participant.individual
173
+ :profiles:
174
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
175
+ - :path: Encounter.appointment
176
+ :profiles:
177
+ - http://hl7.org/fhir/StructureDefinition/Appointment
178
+ - :path: Encounter.reasonReference
179
+ :profiles:
180
+ - http://hl7.org/fhir/StructureDefinition/Condition
181
+ - http://hl7.org/fhir/StructureDefinition/Procedure
182
+ - http://hl7.org/fhir/StructureDefinition/Observation
183
+ - http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
184
+ - :path: Encounter.diagnosis.condition
185
+ :profiles:
186
+ - http://hl7.org/fhir/StructureDefinition/Condition
187
+ - http://hl7.org/fhir/StructureDefinition/Procedure
188
+ - :path: Encounter.account
189
+ :profiles:
190
+ - http://hl7.org/fhir/StructureDefinition/Account
191
+ - :path: Encounter.hospitalization.origin
192
+ :profiles:
193
+ - http://hl7.org/fhir/StructureDefinition/Location
194
+ - http://hl7.org/fhir/StructureDefinition/Organization
195
+ - :path: Encounter.hospitalization.destination
196
+ :profiles:
197
+ - http://hl7.org/fhir/StructureDefinition/Location
198
+ - http://hl7.org/fhir/StructureDefinition/Organization
199
+ - :path: Encounter.location.location
200
+ :profiles:
201
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-location
202
+ - :path: Encounter.serviceProvider
203
+ :profiles:
204
+ - http://hl7.org/fhir/StructureDefinition/Organization
205
+ - :path: Encounter.partOf
206
+ :profiles:
207
+ - http://hl7.org/fhir/StructureDefinition/Encounter
208
+ :tests:
209
+ - :id: pas_server_submit_request_v201_encounter_must_support_test
210
+ :file_name: server_submit_request_encounter_must_support_test.rb
211
+ - :id: pas_client_submit_request_v201_encounter_must_support_test
212
+ :file_name: client_submit_request_encounter_must_support_test.rb
213
+ :delayed_references: []
@@ -0,0 +1,67 @@
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 ServerSubmitRequestEncounterMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Encounter 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 Encounter Profile.
16
+ This test checks all identified instances of the PAS Encounter
17
+ Profile on requests sent to the server to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Encounter.class
21
+ * Encounter.extension:nursingHomeResidentialStatus
22
+ * Encounter.extension:patientStatus
23
+ * Encounter.hospitalization
24
+ * Encounter.hospitalization.admitSource
25
+ * Encounter.hospitalization.dischargeDisposition
26
+ * Encounter.identifier
27
+ * Encounter.identifier.system
28
+ * Encounter.identifier.value
29
+ * Encounter.location
30
+ * Encounter.location.location
31
+ * Encounter.participant
32
+ * Encounter.participant.individual
33
+ * Encounter.participant.period
34
+ * Encounter.participant.type
35
+ * Encounter.period
36
+ * Encounter.reasonCode
37
+ * Encounter.status
38
+ * Encounter.subject
39
+ * Encounter.type
40
+ )
41
+
42
+ id :pas_server_submit_request_v201_encounter_must_support_test
43
+
44
+ def resource_type
45
+ 'Encounter'
46
+ end
47
+
48
+ def self.metadata
49
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
50
+ end
51
+
52
+ def scratch_resources
53
+ scratch[:submit_request_resources] ||= {}
54
+ end
55
+
56
+ def resources_of_interest
57
+ collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
58
+ collection.select { |res| res.resourceType == resource_type }
59
+ end
60
+
61
+ run do
62
+ perform_must_support_test(resources_of_interest)
63
+ validate_must_support
64
+ end
65
+ end
66
+ end
67
+ 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 ClientInquiryRequestInsurerMustSupportTest < 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 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 Insurer Organization Profile.
16
+ This test checks all identified instances of the PAS Insurer 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.identifier
28
+ * Organization.identifier:NPI
29
+ * Organization.identifier:TIN
30
+ * Organization.name
31
+ * Organization.telecom
32
+ * Organization.type
33
+ )
34
+
35
+ id :pas_client_inquiry_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[:inquiry_request_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 ClientSubmitRequestInsurerMustSupportTest < 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 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 Insurer Organization Profile.
16
+ This test checks all identified instances of the PAS Insurer 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.identifier
28
+ * Organization.identifier:NPI
29
+ * Organization.identifier:TIN
30
+ * Organization.name
31
+ * Organization.telecom
32
+ * Organization.type
33
+ )
34
+
35
+ id :pas_client_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,104 @@
1
+ ---
2
+ :name: profile_insurer
3
+ :class_name: ProfileInsurerSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: Organization
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-insurer
8
+ :profile_name: PAS Insurer Organization
9
+ :profile_version: 2.0.1
10
+ :title: Insurer Organization
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Insurer Organization.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts:
16
+ - type
17
+ :must_supports:
18
+ :extensions: []
19
+ :slices:
20
+ - :name: Organization.identifier:NPI
21
+ :path: identifier
22
+ :discriminator:
23
+ :type: patternIdentifier
24
+ :path: ''
25
+ :system: http://hl7.org/fhir/sid/us-npi
26
+ - :name: Organization.identifier:TIN
27
+ :path: identifier
28
+ :discriminator:
29
+ :type: patternIdentifier
30
+ :path: ''
31
+ :system: http://terminology.hl7.org/NamingSystem/USEIN
32
+ :elements:
33
+ - :path: identifier
34
+ - :path: active
35
+ - :path: type
36
+ - :path: name
37
+ - :path: telecom
38
+ - :path: address
39
+ - :path: address.line
40
+ - :path: address.city
41
+ - :path: address.state
42
+ - :path: address.postalCode
43
+ - :path: address.country
44
+ :mandatory_elements:
45
+ - Organization.identifier.system
46
+ - Organization.active
47
+ - Organization.name
48
+ :bindings:
49
+ - :type: code
50
+ :strength: preferred
51
+ :system: http://hl7.org/fhir/ValueSet/languages
52
+ :path: language
53
+ - :type: code
54
+ :strength: required
55
+ :system: http://hl7.org/fhir/ValueSet/identifier-use
56
+ :path: identifier.use
57
+ - :type: CodeableConcept
58
+ :strength: extensible
59
+ :system: http://hl7.org/fhir/ValueSet/identifier-type
60
+ :path: identifier.type
61
+ - :type: CodeableConcept
62
+ :strength: required
63
+ :system: https://valueset.x12.org/x217/005010/request/2010A/NM1/1/01/00/98
64
+ :path: type
65
+ - :type: code
66
+ :strength: required
67
+ :system: http://hl7.org/fhir/ValueSet/address-use
68
+ :path: address.use
69
+ - :type: code
70
+ :strength: required
71
+ :system: http://hl7.org/fhir/ValueSet/address-type
72
+ :path: address.type
73
+ - :type: string
74
+ :strength: extensible
75
+ :system: http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state
76
+ :path: address.state
77
+ - :type: CodeableConcept
78
+ :strength: extensible
79
+ :system: http://hl7.org/fhir/ValueSet/contactentity-type
80
+ :path: contact.purpose
81
+ :references:
82
+ - :path: Organization.identifier.assigner
83
+ :profiles:
84
+ - http://hl7.org/fhir/StructureDefinition/Organization
85
+ - :path: Organization.partOf
86
+ :profiles:
87
+ - http://hl7.org/fhir/StructureDefinition/Organization
88
+ - :path: Organization.endpoint
89
+ :profiles:
90
+ - http://hl7.org/fhir/StructureDefinition/Endpoint
91
+ :tests:
92
+ - :id: pas_server_submit_request_v201_insurer_must_support_test
93
+ :file_name: server_submit_request_insurer_must_support_test.rb
94
+ - :id: pas_client_submit_request_v201_insurer_must_support_test
95
+ :file_name: client_submit_request_insurer_must_support_test.rb
96
+ - :id: pas_server_submit_response_v201_insurer_must_support_test
97
+ :file_name: server_submit_response_insurer_must_support_test.rb
98
+ - :id: pas_server_inquiry_request_v201_insurer_must_support_test
99
+ :file_name: server_inquiry_request_insurer_must_support_test.rb
100
+ - :id: pas_client_inquiry_request_v201_insurer_must_support_test
101
+ :file_name: client_inquiry_request_insurer_must_support_test.rb
102
+ - :id: pas_server_inquiry_response_v201_insurer_must_support_test
103
+ :file_name: server_inquiry_response_insurer_must_support_test.rb
104
+ :delayed_references: []
@@ -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 ServerInquiryRequestInsurerMustSupportTest < 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_inquiry_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[:inquire_request_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