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,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 ClientSubmitRequestNutritionOrderMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Nutrition Order 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 Nutrition Order Profile.
16
+ This test checks all identified instances of the PAS Nutrition Order
17
+ Profile on requests sent by the client to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * NutritionOrder.enteralFormula
21
+ * NutritionOrder.enteralFormula.baseFormulaType
22
+ * NutritionOrder.extension:coverage
23
+ * NutritionOrder.oralDiet
24
+ * NutritionOrder.oralDiet.type
25
+ * NutritionOrder.patient
26
+ )
27
+
28
+ id :pas_client_submit_request_v201_nutrition_order_must_support_test
29
+
30
+ def resource_type
31
+ 'NutritionOrder'
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,109 @@
1
+ ---
2
+ :name: profile_nutritionorder
3
+ :class_name: ProfileNutritionorderSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: NutritionOrder
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-nutritionorder
8
+ :profile_name: PAS Nutrition Order
9
+ :profile_version: 2.0.1
10
+ :title: Nutrition Order
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Nutrition Order.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts:
16
+ - oralDiet.type
17
+ - enteralFormula.baseFormulaType
18
+ :must_supports:
19
+ :extensions:
20
+ - :id: NutritionOrder.extension:coverage
21
+ :path: extension
22
+ :url: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/ext-coverage-information
23
+ :slices: []
24
+ :elements:
25
+ - :path: patient
26
+ :types:
27
+ - Reference
28
+ - :path: oralDiet
29
+ - :path: oralDiet.type
30
+ - :path: enteralFormula
31
+ - :path: enteralFormula.baseFormulaType
32
+ :mandatory_elements:
33
+ - NutritionOrder.status
34
+ - NutritionOrder.intent
35
+ - NutritionOrder.patient
36
+ - NutritionOrder.dateTime
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/encounter-diet
49
+ :path: foodPreferenceModifier
50
+ - :type: CodeableConcept
51
+ :strength: example
52
+ :system: http://hl7.org/fhir/ValueSet/food-type
53
+ :path: excludeFoodModifier
54
+ - :type: CodeableConcept
55
+ :strength: required
56
+ :system: http://hl7.org/fhir/us/davinci-pas/ValueSet/X12278NutritionOralDietType
57
+ :path: oralDiet.type
58
+ - :type: CodeableConcept
59
+ :strength: example
60
+ :system: http://hl7.org/fhir/ValueSet/nutrient-code
61
+ :path: oralDiet.nutrient.modifier
62
+ - :type: CodeableConcept
63
+ :strength: example
64
+ :system: http://hl7.org/fhir/ValueSet/texture-code
65
+ :path: oralDiet.texture.modifier
66
+ - :type: CodeableConcept
67
+ :strength: example
68
+ :system: http://hl7.org/fhir/ValueSet/modified-foodtype
69
+ :path: oralDiet.texture.foodType
70
+ - :type: CodeableConcept
71
+ :strength: example
72
+ :system: http://hl7.org/fhir/ValueSet/consistency-type
73
+ :path: oralDiet.fluidConsistencyType
74
+ - :type: CodeableConcept
75
+ :strength: example
76
+ :system: http://hl7.org/fhir/ValueSet/supplement-type
77
+ :path: supplement.type
78
+ - :type: CodeableConcept
79
+ :strength: required
80
+ :system: http://hl7.org/fhir/us/davinci-pas/ValueSet/X12278NutritionEnteralFormulaType
81
+ :path: enteralFormula.baseFormulaType
82
+ - :type: CodeableConcept
83
+ :strength: example
84
+ :system: http://hl7.org/fhir/ValueSet/entformula-additive
85
+ :path: enteralFormula.additiveType
86
+ - :type: CodeableConcept
87
+ :strength: extensible
88
+ :system: http://hl7.org/fhir/ValueSet/enteral-route
89
+ :path: enteralFormula.routeofAdministration
90
+ :references:
91
+ - :path: NutritionOrder.patient
92
+ :profiles:
93
+ - http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary
94
+ - :path: NutritionOrder.encounter
95
+ :profiles:
96
+ - http://hl7.org/fhir/StructureDefinition/Encounter
97
+ - :path: NutritionOrder.orderer
98
+ :profiles:
99
+ - http://hl7.org/fhir/StructureDefinition/Practitioner
100
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
101
+ - :path: NutritionOrder.allergyIntolerance
102
+ :profiles:
103
+ - http://hl7.org/fhir/StructureDefinition/AllergyIntolerance
104
+ :tests:
105
+ - :id: pas_server_submit_request_v201_nutrition_order_must_support_test
106
+ :file_name: server_submit_request_nutrition_order_must_support_test.rb
107
+ - :id: pas_client_submit_request_v201_nutrition_order_must_support_test
108
+ :file_name: client_submit_request_nutrition_order_must_support_test.rb
109
+ :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 ServerSubmitRequestNutritionOrderMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Nutrition Order 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 Nutrition Order Profile.
16
+ This test checks all identified instances of the PAS Nutrition Order
17
+ Profile on requests sent to the server to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * NutritionOrder.enteralFormula
21
+ * NutritionOrder.enteralFormula.baseFormulaType
22
+ * NutritionOrder.extension:coverage
23
+ * NutritionOrder.oralDiet
24
+ * NutritionOrder.oralDiet.type
25
+ * NutritionOrder.patient
26
+ )
27
+
28
+ id :pas_server_submit_request_v201_nutrition_order_must_support_test
29
+
30
+ def resource_type
31
+ 'NutritionOrder'
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,51 @@
1
+ require_relative 'pas_inquiry_request_bundle/client_inquiry_request_pas_inquiry_request_bundle_must_support_test'
2
+ require_relative 'claim_inquiry/client_inquiry_request_claim_inquiry_must_support_test'
3
+ require_relative 'coverage/client_inquiry_request_coverage_must_support_test'
4
+ require_relative 'insurer/client_inquiry_request_insurer_must_support_test'
5
+ require_relative 'requestor/client_inquiry_request_requestor_must_support_test'
6
+ require_relative 'beneficiary/client_inquiry_request_beneficiary_must_support_test'
7
+ require_relative 'subscriber/client_inquiry_request_subscriber_must_support_test'
8
+ require_relative 'practitioner/client_inquiry_request_practitioner_must_support_test'
9
+ require_relative 'practitioner_role/client_inquiry_request_practitioner_role_must_support_test'
10
+ require_relative '../../custom_groups/v2.0.1/client_tests/pas_client_inquire_must_support_test'
11
+
12
+ module DaVinciPASTestKit
13
+ module DaVinciPASV201
14
+ class PASClientInquiryMustSupportUseCaseGroup < Inferno::TestGroup
15
+ title 'Inquiry Request Must Support'
16
+ description %(
17
+ Check that the client can demonstrate `$inquire` requests that contain
18
+ all PAS-defined profiles and their must support elements.
19
+
20
+ For `$inquire` requests, this includes the following profiles:
21
+
22
+ - [PAS Inquiry Request Bundle](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-inquiry-request-bundle.html)
23
+ - [PAS Claim Inquiry](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-claim-inquiry.html)
24
+ - [PAS Coverage](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-coverage.html)
25
+ - [PAS Beneficiary Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-beneficiary.html)
26
+ - [PAS Subscriber Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-subscriber.html)
27
+ - [PAS Insurer Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-insurer.html)
28
+ - [PAS Requestor Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-requestor.html)
29
+ - [PAS Practitioner](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitioner.html)
30
+ - [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
31
+
32
+ )
33
+
34
+ id :pas_client_v201_inquiry_must_support_use_case
35
+ run_as_group
36
+
37
+
38
+ test from: :pas_client_inquire_v201_must_support_test
39
+ test from: :pas_client_inquiry_request_v201_pas_inquiry_request_bundle_must_support_test
40
+ test from: :pas_client_inquiry_request_v201_claim_inquiry_must_support_test
41
+ test from: :pas_client_inquiry_request_v201_coverage_must_support_test
42
+ test from: :pas_client_inquiry_request_v201_insurer_must_support_test
43
+ test from: :pas_client_inquiry_request_v201_requestor_must_support_test
44
+ test from: :pas_client_inquiry_request_v201_beneficiary_must_support_test
45
+ test from: :pas_client_inquiry_request_v201_subscriber_must_support_test
46
+ test from: :pas_client_inquiry_request_v201_practitioner_must_support_test
47
+ test from: :pas_client_inquiry_request_v201_practitioner_role_must_support_test
48
+
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,61 @@
1
+ require_relative 'pas_request_bundle/client_submit_request_pas_request_bundle_must_support_test'
2
+ require_relative 'claim_update/client_submit_request_claim_update_must_support_test'
3
+ require_relative 'coverage/client_submit_request_coverage_must_support_test'
4
+ require_relative 'encounter/client_submit_request_encounter_must_support_test'
5
+ require_relative 'insurer/client_submit_request_insurer_must_support_test'
6
+ require_relative 'requestor/client_submit_request_requestor_must_support_test'
7
+ require_relative 'beneficiary/client_submit_request_beneficiary_must_support_test'
8
+ require_relative 'subscriber/client_submit_request_subscriber_must_support_test'
9
+ require_relative 'practitioner/client_submit_request_practitioner_must_support_test'
10
+ require_relative 'practitioner_role/client_submit_request_practitioner_role_must_support_test'
11
+ require_relative '../../custom_groups/v2.0.1/must_support/pas_client_must_support_requirement_test'
12
+ require_relative '../../custom_groups/v2.0.1/client_tests/pas_client_submit_must_support_test'
13
+
14
+ module DaVinciPASTestKit
15
+ module DaVinciPASV201
16
+ class PASClientSubmitMustSupportUseCaseGroup < Inferno::TestGroup
17
+ title 'Submit Request Must Support'
18
+ description %(
19
+ Check that the client can demonstrate `$submit` requests that contain
20
+ all PAS-defined profiles and their must support elements.
21
+
22
+ For `$submit` requests, this includes the following profiles:
23
+
24
+ - [PAS Request Bundle](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-request-bundle.html)
25
+ - [PAS Claim Update](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-claim-update.html)
26
+ - [PAS Coverage](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-coverage.html)
27
+ - [PAS Beneficiary Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-beneficiary.html)
28
+ - [PAS Subscriber Patient](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-subscriber.html)
29
+ - [PAS Insurer Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-insurer.html)
30
+ - [PAS Requestor Organization](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-requestor.html)
31
+ - [PAS Practitioner](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitioner.html)
32
+ - [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
33
+ - [PAS Encounter](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-encounter.html)
34
+ - At least one of the following request profiles
35
+ - [PAS Device Request](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-devicerequest.html)
36
+ - [PAS Medication Request](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-medicationrequest.html)
37
+ - [PAS Nutrition Order](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-nutritionorder.html)
38
+ - [PAS Service Request](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-servicerequest.html)
39
+
40
+ )
41
+
42
+ id :pas_client_v201_submit_must_support_use_case
43
+ run_as_group
44
+
45
+
46
+ test from: :pas_client_submit_v201_must_support_test
47
+ test from: :pas_client_submit_v201_must_support_requirement
48
+ test from: :pas_client_submit_request_v201_pas_request_bundle_must_support_test
49
+ test from: :pas_client_submit_request_v201_claim_update_must_support_test
50
+ test from: :pas_client_submit_request_v201_coverage_must_support_test
51
+ test from: :pas_client_submit_request_v201_encounter_must_support_test
52
+ test from: :pas_client_submit_request_v201_insurer_must_support_test
53
+ test from: :pas_client_submit_request_v201_requestor_must_support_test
54
+ test from: :pas_client_submit_request_v201_beneficiary_must_support_test
55
+ test from: :pas_client_submit_request_v201_subscriber_must_support_test
56
+ test from: :pas_client_submit_request_v201_practitioner_must_support_test
57
+ test from: :pas_client_submit_request_v201_practitioner_role_must_support_test
58
+
59
+ end
60
+ end
61
+ 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 ClientInquiryRequestPasInquiryRequestBundleMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Inquiry Request Bundle 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 Inquiry Request Bundle Profile.
16
+ This test checks all identified instances of the PAS Inquiry Request Bundle
17
+ Profile on requests sent by the client to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Bundle.entry
21
+ * Bundle.entry.fullUrl
22
+ * Bundle.entry.resource
23
+ * Bundle.entry:Claim
24
+ * Bundle.identifier
25
+ * Bundle.timestamp
26
+ )
27
+
28
+ id :pas_client_inquiry_request_v201_pas_inquiry_request_bundle_must_support_test
29
+
30
+ def resource_type
31
+ 'Bundle'
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,77 @@
1
+ ---
2
+ :name: profile_pas_inquiry_request_bundle
3
+ :class_name: ProfilePasInquiryRequestBundleSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: Bundle
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-request-bundle
8
+ :profile_name: PAS Inquiry Request Bundle
9
+ :profile_version: 2.0.1
10
+ :title: Inquiry Request Bundle
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Inquiry Request Bundle.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts: []
16
+ :must_supports:
17
+ :extensions: []
18
+ :slices:
19
+ - :name: Bundle.entry:Claim
20
+ :path: entry
21
+ :discriminator:
22
+ :type: type
23
+ :code: Claim
24
+ :elements:
25
+ - :path: identifier
26
+ - :path: timestamp
27
+ - :path: entry
28
+ - :path: entry.fullUrl
29
+ - :path: entry.resource
30
+ :mandatory_elements:
31
+ - Bundle.identifier
32
+ - Bundle.type
33
+ - Bundle.timestamp
34
+ - Bundle.link.relation
35
+ - Bundle.link.url
36
+ - Bundle.entry
37
+ - Bundle.entry.fullUrl
38
+ - Bundle.entry.resource
39
+ - Bundle.entry.request.method
40
+ - Bundle.entry.request.url
41
+ - Bundle.entry.response.status
42
+ :bindings:
43
+ - :type: code
44
+ :strength: preferred
45
+ :system: http://hl7.org/fhir/ValueSet/languages
46
+ :path: language
47
+ - :type: code
48
+ :strength: required
49
+ :system: http://hl7.org/fhir/ValueSet/bundle-type
50
+ :path: type
51
+ - :type: code
52
+ :strength: required
53
+ :system: http://hl7.org/fhir/ValueSet/search-entry-mode
54
+ :path: entry.search.mode
55
+ - :type: code
56
+ :strength: required
57
+ :system: http://hl7.org/fhir/ValueSet/http-verb
58
+ :path: entry.request.method
59
+ - :type: code
60
+ :strength: required
61
+ :system: http://hl7.org/fhir/ValueSet/search-entry-mode
62
+ :path: entry.search.mode
63
+ - :type: code
64
+ :strength: required
65
+ :system: http://hl7.org/fhir/ValueSet/http-verb
66
+ :path: entry.request.method
67
+ :references: []
68
+ :tests:
69
+ - :id: pas_server_v201_pas_inquiry_request_bundle_validation_test
70
+ :file_name: server_pas_inquiry_request_bundle_validation_test.rb
71
+ - :id: pas_client_v201_pended_pas_inquiry_request_bundle_validation_test
72
+ :file_name: client_pended_pas_inquiry_request_bundle_validation_test.rb
73
+ - :id: pas_server_inquiry_request_v201_pas_inquiry_request_bundle_must_support_test
74
+ :file_name: server_inquiry_request_pas_inquiry_request_bundle_must_support_test.rb
75
+ - :id: pas_client_inquiry_request_v201_pas_inquiry_request_bundle_must_support_test
76
+ :file_name: client_inquiry_request_pas_inquiry_request_bundle_must_support_test.rb
77
+ :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 ServerInquiryRequestPasInquiryRequestBundleMustSupportTest < Inferno::Test
8
+ include DaVinciPASTestKit::MustSupportTest
9
+
10
+ title 'All must support elements for Profile PAS Inquiry Request Bundle 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 Inquiry Request Bundle Profile.
16
+ This test checks all identified instances of the PAS Inquiry Request Bundle
17
+ Profile on requests sent to the server to ensure that the following
18
+ must support elements are observed:
19
+
20
+ * Bundle.entry
21
+ * Bundle.entry.fullUrl
22
+ * Bundle.entry.resource
23
+ * Bundle.entry:Claim
24
+ * Bundle.identifier
25
+ * Bundle.timestamp
26
+ )
27
+
28
+ id :pas_server_inquiry_request_v201_pas_inquiry_request_bundle_must_support_test
29
+
30
+ def resource_type
31
+ 'Bundle'
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
@@ -0,0 +1,83 @@
1
+ require_relative '../../../pas_bundle_validation'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class ServerPasInquiryRequestBundleValidationTest < Inferno::Test
6
+ include DaVinciPASTestKit::PasBundleValidation
7
+
8
+ id :pas_server_v201_pas_inquiry_request_bundle_validation_test
9
+ title '[USER INPUT VALIDATION] Inquiry Request Bundle is valid'
10
+ description %(
11
+ This test validates the conformity of the
12
+ user input to the
13
+ [PAS Inquiry Request Bundle](http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-request-bundle) structure, ensuring subsequent tests can accurately simulate content.
14
+ It also checks that other conformance requirements defined in the [PAS Formal
15
+ Specification](https://hl7.org/fhir/us/davinci-pas/STU2/specification.html),
16
+ such as the presence of all referenced instances within the bundle and the
17
+ conformance of those instances to the appropriate profiles, are met.
18
+
19
+ It verifies the presence of mandatory elements and that elements with
20
+ required bindings contain appropriate values. CodeableConcept element
21
+ bindings will fail if none of their codings have a code/system belonging
22
+ to the bound ValueSet. Quantity, Coding, and code element bindings will
23
+ fail if their code/system are not found in the valueset.
24
+
25
+ Note that because X12 value sets are not public, elements bound to value
26
+ sets containing X12 codes are not validated.
27
+ )
28
+
29
+ input :pa_inquire_request_payload,
30
+ title: 'PAS Inquire Request Payload',
31
+ description: 'Insert Bundle to be sent for PAS Inquire Request',
32
+ type: 'textarea',
33
+ optional: true
34
+
35
+ input_order :server_endpoint, :smart_credentials
36
+ output :dar_code_found, :dar_extension_found
37
+
38
+ def resource_type
39
+ 'Bundle'
40
+ end
41
+
42
+ def scratch_resources
43
+ scratch[:inquire_request_resources] ||= {}
44
+ end
45
+
46
+ def request_type
47
+ 'inquire'
48
+ end
49
+
50
+
51
+
52
+ def request_bundles
53
+ parsed_payload = JSON.parse(pa_inquire_request_payload)
54
+ fhir_resources = [parsed_payload].flatten.compact.uniq.map { |payload| FHIR.from_contents(payload.to_json)}.compact
55
+ fhir_resources.select { |res| res.resourceType == 'Bundle'}
56
+ end
57
+
58
+ run do
59
+ skip_if pa_inquire_request_payload.blank?, 'No bundle request input provided.'
60
+ assert_valid_json(pa_inquire_request_payload)
61
+ assert request_bundles.present?, 'Provided input is not a bundle or list of bundles'
62
+
63
+ save_bundles_and_entries_to_scratch(request_bundles)
64
+
65
+ request_bundles.each do |bundle|
66
+ perform_request_validation(
67
+ bundle,
68
+ 'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-request-bundle',
69
+ '2.0.1',
70
+ request_type
71
+ )
72
+ end
73
+
74
+ validation_error_messages.each do |msg|
75
+ messages << { type: 'error', message: msg }
76
+ end
77
+ msg = 'Bundle(s) provided and/or entry resources are not conformant. Check messages for issues found.'
78
+ skip_if validation_error_messages.present?, msg
79
+
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,67 @@
1
+ ---
2
+ :name: profile_pas_inquiry_response_bundle
3
+ :class_name: ProfilePasInquiryResponseBundleSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: Bundle
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-response-bundle
8
+ :profile_name: PAS Inquiry Response Bundle
9
+ :profile_version: 2.0.1
10
+ :title: Inquiry Response Bundle
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Inquiry Response Bundle.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts: []
16
+ :must_supports:
17
+ :extensions: []
18
+ :slices:
19
+ - :name: Bundle.entry:ClaimResponse
20
+ :path: entry
21
+ :discriminator:
22
+ :type: type
23
+ :code: ClaimResponse
24
+ :elements:
25
+ - :path: timestamp
26
+ - :path: entry
27
+ - :path: entry.fullUrl
28
+ - :path: entry.resource
29
+ :mandatory_elements:
30
+ - Bundle.type
31
+ - Bundle.timestamp
32
+ - Bundle.link.relation
33
+ - Bundle.link.url
34
+ - Bundle.entry
35
+ - Bundle.entry.fullUrl
36
+ - Bundle.entry.resource
37
+ - Bundle.entry.request.method
38
+ - Bundle.entry.request.url
39
+ - Bundle.entry.response.status
40
+ :bindings:
41
+ - :type: code
42
+ :strength: preferred
43
+ :system: http://hl7.org/fhir/ValueSet/languages
44
+ :path: language
45
+ - :type: code
46
+ :strength: required
47
+ :system: http://hl7.org/fhir/ValueSet/search-entry-mode
48
+ :path: entry.search.mode
49
+ - :type: code
50
+ :strength: required
51
+ :system: http://hl7.org/fhir/ValueSet/http-verb
52
+ :path: entry.request.method
53
+ - :type: code
54
+ :strength: required
55
+ :system: http://hl7.org/fhir/ValueSet/search-entry-mode
56
+ :path: entry.search.mode
57
+ - :type: code
58
+ :strength: required
59
+ :system: http://hl7.org/fhir/ValueSet/http-verb
60
+ :path: entry.request.method
61
+ :references: []
62
+ :tests:
63
+ - :id: pas_server_v201_pas_inquiry_response_bundle_validation_test
64
+ :file_name: server_pas_inquiry_response_bundle_validation_test.rb
65
+ - :id: pas_server_inquiry_response_v201_pas_inquiry_response_bundle_must_support_test
66
+ :file_name: server_inquiry_response_pas_inquiry_response_bundle_must_support_test.rb
67
+ :delayed_references: []