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,59 @@
1
+ require_relative 'pas_request_bundle/server_pas_request_bundle_validation_test'
2
+ require_relative 'claim/claim_operation_test'
3
+ require_relative 'pas_response_bundle/server_pas_response_bundle_validation_test'
4
+ require_relative '../../custom_groups/v2.0.1/claim_status/pas_claim_status_test'
5
+
6
+ module DaVinciPASTestKit
7
+ module DaVinciPASV201
8
+ class PASServerDenialUseCaseGroup < Inferno::TestGroup
9
+ title 'Successful Denial Workflow'
10
+ description %(
11
+ Demonstrate the ability of the server to respond to a prior
12
+ authorization request with an `denied` decision.
13
+
14
+ )
15
+
16
+ id :pas_server_v201_denial_use_case
17
+ run_as_group
18
+
19
+ def use_case
20
+ 'denial'
21
+ end
22
+
23
+
24
+ group do
25
+ title 'PAS Submit Operation'
26
+
27
+ test from: :pas_server_v201_pas_request_bundle_validation_test do
28
+ id :pas_server_v201_pas_request_bundle_validation_test_denial
29
+ config(
30
+ inputs: {
31
+ pa_submit_request_payload: {
32
+ name: :denial_pa_submit_request_payload ,
33
+ title: 'PAS Submit Request Payload for Denial Response'
34
+ }
35
+ }
36
+ )
37
+ end
38
+ test from: :pas_v201_claim_operation_test do
39
+ id :pas_v201_claim_operation_test_denial
40
+ config(
41
+ inputs: {
42
+ pa_submit_request_payload: {
43
+ name: :denial_pa_submit_request_payload ,
44
+ title: 'PAS Submit Request Payload for Denial Response'
45
+ }
46
+ }
47
+ )
48
+ end
49
+ test from: :pas_server_v201_pas_response_bundle_validation_test
50
+ end
51
+ group do
52
+ title 'PAS Status Check'
53
+
54
+ test from: :prior_auth_claim_status
55
+ end
56
+
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,265 @@
1
+ require_relative 'pas_request_bundle/server_pas_request_bundle_validation_test'
2
+ require_relative 'claim/claim_operation_test'
3
+ require_relative 'pas_response_bundle/server_pas_response_bundle_validation_test'
4
+ require_relative 'pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test'
5
+ require_relative 'claim_inquiry/claim_inquiry_operation_test'
6
+ require_relative 'pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test'
7
+ require_relative 'pas_request_bundle/server_submit_request_pas_request_bundle_must_support_test'
8
+ require_relative 'claim_update/server_submit_request_claim_update_must_support_test'
9
+ require_relative 'coverage/server_submit_request_coverage_must_support_test'
10
+ require_relative 'encounter/server_submit_request_encounter_must_support_test'
11
+ require_relative 'insurer/server_submit_request_insurer_must_support_test'
12
+ require_relative 'requestor/server_submit_request_requestor_must_support_test'
13
+ require_relative 'beneficiary/server_submit_request_beneficiary_must_support_test'
14
+ require_relative 'subscriber/server_submit_request_subscriber_must_support_test'
15
+ require_relative 'practitioner/server_submit_request_practitioner_must_support_test'
16
+ require_relative 'practitioner_role/server_submit_request_practitioner_role_must_support_test'
17
+ require_relative 'pas_response_bundle/server_submit_response_pas_response_bundle_must_support_test'
18
+ require_relative 'claimresponse/server_submit_response_claimresponse_must_support_test'
19
+ require_relative 'communication_request/server_submit_response_communication_request_must_support_test'
20
+ require_relative 'insurer/server_submit_response_insurer_must_support_test'
21
+ require_relative 'requestor/server_submit_response_requestor_must_support_test'
22
+ require_relative 'beneficiary/server_submit_response_beneficiary_must_support_test'
23
+ require_relative 'practitioner/server_submit_response_practitioner_must_support_test'
24
+ require_relative 'practitioner_role/server_submit_response_practitioner_role_must_support_test'
25
+ require_relative 'task/server_submit_response_task_must_support_test'
26
+ require_relative 'pas_inquiry_request_bundle/server_inquiry_request_pas_inquiry_request_bundle_must_support_test'
27
+ require_relative 'claim_inquiry/server_inquiry_request_claim_inquiry_must_support_test'
28
+ require_relative 'coverage/server_inquiry_request_coverage_must_support_test'
29
+ require_relative 'insurer/server_inquiry_request_insurer_must_support_test'
30
+ require_relative 'requestor/server_inquiry_request_requestor_must_support_test'
31
+ require_relative 'beneficiary/server_inquiry_request_beneficiary_must_support_test'
32
+ require_relative 'subscriber/server_inquiry_request_subscriber_must_support_test'
33
+ require_relative 'practitioner/server_inquiry_request_practitioner_must_support_test'
34
+ require_relative 'practitioner_role/server_inquiry_request_practitioner_role_must_support_test'
35
+ require_relative 'pas_inquiry_response_bundle/server_inquiry_response_pas_inquiry_response_bundle_must_support_test'
36
+ require_relative 'claiminquiryresponse/server_inquiry_response_claiminquiryresponse_must_support_test'
37
+ require_relative 'insurer/server_inquiry_response_insurer_must_support_test'
38
+ require_relative 'requestor/server_inquiry_response_requestor_must_support_test'
39
+ require_relative 'beneficiary/server_inquiry_response_beneficiary_must_support_test'
40
+ require_relative 'practitioner/server_inquiry_response_practitioner_must_support_test'
41
+ require_relative 'practitioner_role/server_inquiry_response_practitioner_role_must_support_test'
42
+ require_relative 'task/server_inquiry_response_task_must_support_test'
43
+ require_relative '../../custom_groups/v2.0.1/must_support/pas_server_must_support_requirement_test'
44
+
45
+ module DaVinciPASTestKit
46
+ module DaVinciPASV201
47
+ class PASServerMustSupportUseCaseGroup < Inferno::TestGroup
48
+ title 'Demonstrate Element Support'
49
+ description %(
50
+ Demonstrate the ability of the server to support all PAS-defined profiles
51
+ and the must support elements defined in them. This includes
52
+
53
+ - the ability to respond to prior authorization submission and inquiry
54
+ requests that contain all PAS-defined profiles and their must support
55
+ elements.
56
+ - the ability to include in those responses all PAS-defined profiles
57
+ and their must support elements.
58
+
59
+ In order to allow Inferno to observe and validate these criteria, testers
60
+ are required to provide a set of `$submit` and `$inquire` requests that
61
+ collectively both themselves contain and elicit server responses that contain
62
+ all PAS-defined profiles and their must support elements.
63
+
64
+ )
65
+
66
+ id :pas_server_v201_must_support_use_case
67
+
68
+
69
+ def use_case
70
+ 'must_support'
71
+ end
72
+
73
+
74
+ group do
75
+ title '$submit Element Support'
76
+ description %(
77
+ Check that the provided `$submit` requests both themselves contain
78
+ and elicit server responses that contain all PAS-defined profiles
79
+ and their must support elements.
80
+
81
+ For `$submit` requests, this includes the following profiles:
82
+
83
+ - [PAS Request Bundle](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-request-bundle.html)
84
+ - [PAS Claim Update](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-claim-update.html)
85
+ - [PAS Coverage](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-coverage.html)
86
+ - [PAS Beneficiary Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-beneficiary.html)
87
+ - [PAS Subscriber Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-subscriber.html)
88
+ - [PAS Insurer Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-insurer.html)
89
+ - [PAS Requestor Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-requestor.html)
90
+ - [PAS Practitioner](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitioner.html)
91
+ - [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
92
+ - [PAS Encounter](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-encounter.html)
93
+ - At least one of the following request profiles
94
+ - [PAS Device Request](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-devicerequest.html)
95
+ - [PAS Medication Request](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-medicationrequest.html)
96
+ - [PAS Nutrition Order](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-nutritionorder.html)
97
+ - [PAS Service Request](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-servicerequest.html)
98
+
99
+ For `$submit` responses, this includes the following profiles (NOTE: request-specific
100
+ profiles that may be echoed from `$submit` requests, such as the Claim instance or request instances,
101
+ are not currently checked):
102
+
103
+ - [PAS Response Bundle](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-response-bundle.html)
104
+ - [PAS Claim Response](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-claimresponse.html)
105
+ - [PAS CommunicationRequest](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-communicationrequest.html)
106
+ - [PAS Task](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-task.html)
107
+ - [PAS Beneficiary Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-beneficiary.html)
108
+ - [PAS Insurer Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-insurer.html)
109
+ - [PAS Requestor Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-requestor.html)
110
+ - [PAS Practitioner](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitioner.html)
111
+ - [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
112
+ )
113
+ run_as_group
114
+
115
+ group do
116
+ title 'PAS Submit Operation'
117
+
118
+ test from: :pas_server_v201_pas_request_bundle_validation_test do
119
+ id :pas_server_v201_pas_request_bundle_validation_test_must_support
120
+ config(
121
+ inputs: {
122
+ pa_submit_request_payload: {
123
+ name: :must_support_pa_submit_request_payload,
124
+ title: 'Additional PAS Submit Request Payloads',
125
+ description: 'Insert an additional request bundle or a list of bundles (e.g. [bundle_1, bundle_2])'
126
+ }
127
+ }
128
+ )
129
+ end
130
+ test from: :pas_v201_claim_operation_test do
131
+ id :pas_v201_claim_operation_test_must_support
132
+ config(
133
+ inputs: {
134
+ pa_submit_request_payload: {
135
+ name: :must_support_pa_submit_request_payload,
136
+ title: 'Additional PAS Submit Request Payloads',
137
+ description: 'Insert an additional request bundle or a list of bundles (e.g. [bundle_1, bundle_2])'
138
+ }
139
+ }
140
+ )
141
+ end
142
+ test from: :pas_server_v201_pas_response_bundle_validation_test
143
+ end
144
+ group do
145
+ title '[USER INPUT VALIDATION] Submit Request Must Support'
146
+
147
+ test from: :pas_server_submit_v201_must_support_requirement
148
+ test from: :pas_server_submit_request_v201_pas_request_bundle_must_support_test
149
+ test from: :pas_server_submit_request_v201_claim_update_must_support_test
150
+ test from: :pas_server_submit_request_v201_coverage_must_support_test
151
+ test from: :pas_server_submit_request_v201_encounter_must_support_test
152
+ test from: :pas_server_submit_request_v201_insurer_must_support_test
153
+ test from: :pas_server_submit_request_v201_requestor_must_support_test
154
+ test from: :pas_server_submit_request_v201_beneficiary_must_support_test
155
+ test from: :pas_server_submit_request_v201_subscriber_must_support_test
156
+ test from: :pas_server_submit_request_v201_practitioner_must_support_test
157
+ test from: :pas_server_submit_request_v201_practitioner_role_must_support_test
158
+ end
159
+ group do
160
+ title 'Submit Response Must Support'
161
+
162
+ test from: :pas_server_submit_response_v201_pas_response_bundle_must_support_test
163
+ test from: :pas_server_submit_response_v201_claimresponse_must_support_test
164
+ test from: :pas_server_submit_response_v201_communication_request_must_support_test
165
+ test from: :pas_server_submit_response_v201_insurer_must_support_test
166
+ test from: :pas_server_submit_response_v201_requestor_must_support_test
167
+ test from: :pas_server_submit_response_v201_beneficiary_must_support_test
168
+ test from: :pas_server_submit_response_v201_practitioner_must_support_test
169
+ test from: :pas_server_submit_response_v201_practitioner_role_must_support_test
170
+ test from: :pas_server_submit_response_v201_task_must_support_test
171
+ end
172
+ end
173
+ group do
174
+ title '$inquire Element Support'
175
+ description %(
176
+ Check that the provided `$inquire` requests both themselves contain
177
+ and elicit server responses that contain all PAS-defined profiles
178
+ and their must support elements.
179
+
180
+ For `$inquire` requests, this includes the following profiles:
181
+
182
+ - [PAS Inquiry Request Bundle](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-inquiry-request-bundle.html)
183
+ - [PAS Claim Inquiry](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-claim-inquiry.html)
184
+ - [PAS Coverage](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-coverage.html)
185
+ - [PAS Beneficiary Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-beneficiary.html)
186
+ - [PAS Subscriber Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-subscriber.html)
187
+ - [PAS Insurer Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-insurer.html)
188
+ - [PAS Requestor Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-requestor.html)
189
+ - [PAS Practitioner](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitioner.html)
190
+ - [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
191
+
192
+ For `$inquire` responses, this includes the following profiles (NOTE: request-specific
193
+ profiles that may be echoed from `$submit` requests, such as the Claim instance or request instances,
194
+ are not currently checked):
195
+
196
+ - [PAS Inquiry Response Bundle](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-inquiry-request-bundle.html)
197
+ - [PAS Claim Inquiry Response](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-claiminquiryresponse.html)
198
+ - [PAS Task](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-task.html)
199
+ - [PAS Beneficiary Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-beneficiary.html)
200
+ - [PAS Insurer Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-insurer.html)
201
+ - [PAS Requestor Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-requestor.html)
202
+ - [PAS Practitioner](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitioner.html)
203
+ - [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
204
+ )
205
+ run_as_group
206
+
207
+ group do
208
+ title 'PAS Inquiry Operation'
209
+
210
+ test from: :pas_server_v201_pas_inquiry_request_bundle_validation_test do
211
+ id :pas_server_v201_pas_inquiry_request_bundle_validation_test_must_support
212
+ config(
213
+ inputs: {
214
+ pa_inquire_request_payload: {
215
+ name: :must_support_pa_inquire_request_payload,
216
+ title: 'Additional PAS Inquire Request Payloads',
217
+ description: 'Insert an additional request bundle or a list of bundles (e.g. [bundle_1, bundle_2])'
218
+ }
219
+ }
220
+ )
221
+ end
222
+ test from: :pas_v201_claim_inquiry_operation_test do
223
+ id :pas_v201_claim_inquiry_operation_test_must_support
224
+ config(
225
+ inputs: {
226
+ pa_inquire_request_payload: {
227
+ name: :must_support_pa_inquire_request_payload,
228
+ title: 'Additional PAS Inquire Request Payloads',
229
+ description: 'Insert an additional request bundle or a list of bundles (e.g. [bundle_1, bundle_2])'
230
+ }
231
+ }
232
+ )
233
+ end
234
+ test from: :pas_server_v201_pas_inquiry_response_bundle_validation_test
235
+ end
236
+ group do
237
+ title '[USER INPUT VALIDATION] Inquiry Request Must Support'
238
+
239
+ test from: :pas_server_inquiry_request_v201_pas_inquiry_request_bundle_must_support_test
240
+ test from: :pas_server_inquiry_request_v201_claim_inquiry_must_support_test
241
+ test from: :pas_server_inquiry_request_v201_coverage_must_support_test
242
+ test from: :pas_server_inquiry_request_v201_insurer_must_support_test
243
+ test from: :pas_server_inquiry_request_v201_requestor_must_support_test
244
+ test from: :pas_server_inquiry_request_v201_beneficiary_must_support_test
245
+ test from: :pas_server_inquiry_request_v201_subscriber_must_support_test
246
+ test from: :pas_server_inquiry_request_v201_practitioner_must_support_test
247
+ test from: :pas_server_inquiry_request_v201_practitioner_role_must_support_test
248
+ end
249
+ group do
250
+ title 'Inquiry Response Must Support'
251
+
252
+ test from: :pas_server_inquiry_response_v201_pas_inquiry_response_bundle_must_support_test
253
+ test from: :pas_server_inquiry_response_v201_claiminquiryresponse_must_support_test
254
+ test from: :pas_server_inquiry_response_v201_insurer_must_support_test
255
+ test from: :pas_server_inquiry_response_v201_requestor_must_support_test
256
+ test from: :pas_server_inquiry_response_v201_beneficiary_must_support_test
257
+ test from: :pas_server_inquiry_response_v201_practitioner_must_support_test
258
+ test from: :pas_server_inquiry_response_v201_practitioner_role_must_support_test
259
+ test from: :pas_server_inquiry_response_v201_task_must_support_test
260
+ end
261
+ end
262
+
263
+ end
264
+ end
265
+ end
@@ -0,0 +1,84 @@
1
+ require_relative 'pas_request_bundle/server_pas_request_bundle_validation_test'
2
+ require_relative 'claim/claim_operation_test'
3
+ require_relative 'pas_response_bundle/server_pas_response_bundle_validation_test'
4
+ require_relative 'pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test'
5
+ require_relative 'claim_inquiry/claim_inquiry_operation_test'
6
+ require_relative 'pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test'
7
+ require_relative '../../custom_groups/v2.0.1/claim_status/pas_claim_status_test'
8
+
9
+ module DaVinciPASTestKit
10
+ module DaVinciPASV201
11
+ class PASServerPendedUseCaseGroup < Inferno::TestGroup
12
+ title 'Successful Pended Workflow'
13
+ description %(
14
+ Demonstrate a complete prior authorization workflow including a period
15
+ during which the final decision is pending. This includes
16
+
17
+ - Demonstrating the ability of the server to respond to a prior
18
+ authorization request with an `pended` status.
19
+ - Demonstrating the ability of the server to respond to a subsequent
20
+ inquiry request with a final decision for the request
21
+
22
+ )
23
+
24
+ id :pas_server_v201_pended_use_case
25
+ run_as_group
26
+
27
+ def use_case
28
+ 'pended'
29
+ end
30
+
31
+
32
+ group do
33
+ title 'PAS Submit Operation'
34
+
35
+ test from: :pas_server_v201_pas_request_bundle_validation_test do
36
+ id :pas_server_v201_pas_request_bundle_validation_test_pended
37
+ config(
38
+ inputs: {
39
+ pa_submit_request_payload: {
40
+ name: :pended_pa_submit_request_payload ,
41
+ title: 'PAS Submit Request Payload for Pended Response'
42
+ }
43
+ }
44
+ )
45
+ end
46
+ test from: :pas_v201_claim_operation_test do
47
+ id :pas_v201_claim_operation_test_pended
48
+ config(
49
+ inputs: {
50
+ pa_submit_request_payload: {
51
+ name: :pended_pa_submit_request_payload ,
52
+ title: 'PAS Submit Request Payload for Pended Response'
53
+ }
54
+ }
55
+ )
56
+ end
57
+ test from: :pas_server_v201_pas_response_bundle_validation_test
58
+ end
59
+ group do
60
+ title 'PAS Status Check'
61
+
62
+ test from: :prior_auth_claim_status
63
+ end
64
+ group do
65
+ title 'PAS Inquiry Operation'
66
+
67
+ test from: :pas_server_v201_pas_inquiry_request_bundle_validation_test
68
+ test from: :pas_v201_claim_inquiry_operation_test do
69
+ id :pas_v201_claim_inquiry_operation_test_pended
70
+ config(
71
+ inputs: {
72
+ pa_submit_request_payload: {
73
+ name: :pended_pa_submit_request_payload ,
74
+ title: 'PAS Submit Request Payload for Pended Response'
75
+ }
76
+ }
77
+ )
78
+ end
79
+ test from: :pas_server_v201_pas_inquiry_response_bundle_validation_test
80
+ end
81
+
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,53 @@
1
+ require_relative '../../../must_support_test'
2
+ require_relative '../../../generator/group_metadata'
3
+ require_relative '../../../tags'
4
+
5
+ module DaVinciPASTestKit
6
+ module DaVinciPASV201
7
+ class ClientInquiryRequestPractitionerMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Practitioner are observed across all instances submitted'
11
+ description %(
12
+
13
+ PAS 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 Practitioner Profile.
16
+ This test checks all identified instances of the PAS Practitioner
17
+ Profile on requests sent by the client to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Practitioner.address
21
+ * Practitioner.identifier
22
+ * Practitioner.identifier:NPI
23
+ * Practitioner.name
24
+ * Practitioner.name.family
25
+ * Practitioner.telecom
26
+ )
27
+
28
+ id :pas_client_inquiry_request_v201_practitioner_must_support_test
29
+
30
+ def resource_type
31
+ 'Practitioner'
32
+ end
33
+
34
+ def self.metadata
35
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
36
+ end
37
+
38
+ def scratch_resources
39
+ scratch[:inquiry_request_resources] ||= {}
40
+ end
41
+
42
+ def resources_of_interest
43
+ collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
44
+ collection.select { |res| res.resourceType == resource_type }
45
+ end
46
+
47
+ run do
48
+ perform_must_support_test(resources_of_interest)
49
+ validate_must_support
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,53 @@
1
+ require_relative '../../../must_support_test'
2
+ require_relative '../../../generator/group_metadata'
3
+ require_relative '../../../tags'
4
+
5
+ module DaVinciPASTestKit
6
+ module DaVinciPASV201
7
+ class ClientSubmitRequestPractitionerMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Practitioner are observed across all instances submitted'
11
+ description %(
12
+
13
+ PAS 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 Practitioner Profile.
16
+ This test checks all identified instances of the PAS Practitioner
17
+ Profile on requests sent by the client to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Practitioner.address
21
+ * Practitioner.identifier
22
+ * Practitioner.identifier:NPI
23
+ * Practitioner.name
24
+ * Practitioner.name.family
25
+ * Practitioner.telecom
26
+ )
27
+
28
+ id :pas_client_submit_request_v201_practitioner_must_support_test
29
+
30
+ def resource_type
31
+ 'Practitioner'
32
+ end
33
+
34
+ def self.metadata
35
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
36
+ end
37
+
38
+ def scratch_resources
39
+ scratch[:submit_request_resources] ||= {}
40
+ end
41
+
42
+ def resources_of_interest
43
+ collection = tagged_resources(SUBMIT_TAG).presence || all_scratch_resources
44
+ collection.select { |res| res.resourceType == resource_type }
45
+ end
46
+
47
+ run do
48
+ perform_must_support_test(resources_of_interest)
49
+ validate_must_support
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,74 @@
1
+ ---
2
+ :name: profile_practitioner
3
+ :class_name: ProfilePractitionerSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: Practitioner
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitioner
8
+ :profile_name: PAS Practitioner
9
+ :profile_version: 2.0.1
10
+ :title: Practitioner
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Practitioner.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts: []
16
+ :must_supports:
17
+ :extensions: []
18
+ :slices:
19
+ - :name: Practitioner.identifier:NPI
20
+ :path: identifier
21
+ :discriminator:
22
+ :type: patternIdentifier
23
+ :path: ''
24
+ :system: http://hl7.org/fhir/sid/us-npi
25
+ :elements:
26
+ - :path: identifier
27
+ - :path: name
28
+ - :path: name.family
29
+ - :path: telecom
30
+ - :path: address
31
+ :mandatory_elements:
32
+ - Practitioner.identifier
33
+ - Practitioner.name
34
+ - Practitioner.name.family
35
+ - Practitioner.qualification.code
36
+ :bindings:
37
+ - :type: code
38
+ :strength: preferred
39
+ :system: http://hl7.org/fhir/ValueSet/languages
40
+ :path: language
41
+ - :type: code
42
+ :strength: required
43
+ :system: http://hl7.org/fhir/ValueSet/name-use
44
+ :path: name.use
45
+ - :type: code
46
+ :strength: required
47
+ :system: http://hl7.org/fhir/ValueSet/administrative-gender
48
+ :path: gender
49
+ - :type: CodeableConcept
50
+ :strength: example
51
+ :system: http://terminology.hl7.org/ValueSet/v2-2.7-0360
52
+ :path: qualification.code
53
+ - :type: CodeableConcept
54
+ :strength: preferred
55
+ :system: http://hl7.org/fhir/ValueSet/languages
56
+ :path: communication
57
+ :references:
58
+ - :path: Practitioner.qualification.issuer
59
+ :profiles:
60
+ - http://hl7.org/fhir/StructureDefinition/Organization
61
+ :tests:
62
+ - :id: pas_server_submit_request_v201_practitioner_must_support_test
63
+ :file_name: server_submit_request_practitioner_must_support_test.rb
64
+ - :id: pas_client_submit_request_v201_practitioner_must_support_test
65
+ :file_name: client_submit_request_practitioner_must_support_test.rb
66
+ - :id: pas_server_submit_response_v201_practitioner_must_support_test
67
+ :file_name: server_submit_response_practitioner_must_support_test.rb
68
+ - :id: pas_server_inquiry_request_v201_practitioner_must_support_test
69
+ :file_name: server_inquiry_request_practitioner_must_support_test.rb
70
+ - :id: pas_client_inquiry_request_v201_practitioner_must_support_test
71
+ :file_name: client_inquiry_request_practitioner_must_support_test.rb
72
+ - :id: pas_server_inquiry_response_v201_practitioner_must_support_test
73
+ :file_name: server_inquiry_response_practitioner_must_support_test.rb
74
+ :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 ServerInquiryRequestPractitionerMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Practitioner are observed across all instances submitted'
11
+ description %(
12
+
13
+ PAS server systems are required to be able to receive all
14
+ must support elements on instances of all profiles included in
15
+ requests, including instances of the PAS Practitioner Profile.
16
+ This test checks all identified instances of the PAS Practitioner
17
+ Profile on requests sent to the server to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Practitioner.address
21
+ * Practitioner.identifier
22
+ * Practitioner.identifier:NPI
23
+ * Practitioner.name
24
+ * Practitioner.name.family
25
+ * Practitioner.telecom
26
+ )
27
+
28
+ id :pas_server_inquiry_request_v201_practitioner_must_support_test
29
+
30
+ def resource_type
31
+ 'Practitioner'
32
+ end
33
+
34
+ def self.metadata
35
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
36
+ end
37
+
38
+ def scratch_resources
39
+ scratch[:inquire_request_resources] ||= {}
40
+ end
41
+
42
+ def resources_of_interest
43
+ collection = tagged_resources(INQUIRE_TAG).presence || all_scratch_resources
44
+ collection.select { |res| res.resourceType == resource_type }
45
+ end
46
+
47
+ run do
48
+ perform_must_support_test(resources_of_interest)
49
+ validate_must_support
50
+ end
51
+ end
52
+ end
53
+ end