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,38 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientApprovalSubmitTest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_v201_approval_submit_test
9
+ title 'Client submits a claim using the $submit operation'
10
+ description %(
11
+ Inferno will wait for a prior authorization submission request
12
+ from the client. Upon receipt, Inferno will generate and send a
13
+ response with an approved status.
14
+ )
15
+ input :access_token,
16
+ title: 'Access Token',
17
+ description: %(
18
+ Access token that the client will provide in the Authorization header of each request
19
+ made during this test.
20
+ )
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ **Approval Workflow Test**:
27
+
28
+ Submit a PAS request to
29
+
30
+ `#{submit_url}`
31
+
32
+ An approved response generated by Inferno will be returned.
33
+ )
34
+ )
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientDenialSubmitResponseAttest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_v201_denial_submit_response_attest
9
+ title 'Check that the client registers the request as denied (Attestation)'
10
+ description %(
11
+ This test provides the tester an opportunity to observe their client following
12
+ the receipt of the denied response and attest that users are able to determine
13
+ that the response has been denied.
14
+ )
15
+ input :access_token,
16
+ title: 'Access Token',
17
+ description: %(
18
+ Access token that the client will provide in the Authorization header of each request
19
+ made during this test.
20
+ )
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ **Denial Workflow Test**:
27
+
28
+ I attest that the client system displays the submitted claim as 'denied'.
29
+
30
+ [Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is true.
31
+
32
+ [Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is false.
33
+ )
34
+ )
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,43 @@
1
+ require_relative '../../../urls'
2
+ require_relative '../../../user_input_response'
3
+ require_relative '../../../pas_bundle_validation'
4
+
5
+ module DaVinciPASTestKit
6
+ module DaVinciPASV201
7
+ class PASClientDenialSubmitTest < Inferno::Test
8
+ include URLs
9
+ include UserInputResponse
10
+ include PasBundleValidation
11
+
12
+ id :pas_client_v201_denial_submit_test
13
+ title 'Client submits a claim using the $submit operation'
14
+ description %(
15
+ Inferno will wait for a prior authorization submission request
16
+ from the client. Upon receipt, Inferno will respond with the
17
+ provided denial response.
18
+ )
19
+ input :access_token,
20
+ title: 'Access Token',
21
+ description: %(
22
+ Access token that the client will provide in the Authorization header of each request
23
+ made during this test.
24
+ )
25
+
26
+ run do
27
+ check_user_inputted_response :denial_json_response
28
+ wait(
29
+ identifier: access_token,
30
+ message: %(
31
+ **Denial Workflow Test**:
32
+
33
+ Submit a PAS request to
34
+
35
+ `#{submit_url}`
36
+
37
+ The denial response provided in the '**#{input_title(:denial_json_response)}**' input will be returned.
38
+ )
39
+ )
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,51 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientInquireMustSupportTest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_inquire_v201_must_support_test
9
+ title 'Client inquires about claims using the $inquire operation to demonstrate coverage of must support elements'
10
+ description %(
11
+ This test allows the client to send $inquire requests in addition to any already sent in previous test groups
12
+ for Inferno to evaluate coverage of must support elements.
13
+ )
14
+ input :access_token,
15
+ title: 'Access Token',
16
+ description: %(
17
+ Access token that the client will provide in the Authorization header of each request
18
+ made during this test.
19
+ )
20
+ config options: { accepts_multiple_requests: true }
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ The client system may now make multiple $inquire requests before continuing. These requests should
27
+ cumulatively demonstrate coverage of all required profiles and all must support elements within those
28
+ profiles, as specified by the DaVince Prior Authorization Support implementation guide.
29
+
30
+ For the $inquire operation the required profiles include:
31
+ - PAS Inquiry Request Bundle
32
+ - PAS Claim Inquiry
33
+ - PAS Coverage
34
+ - PAS Beneficiary Patient
35
+ - PAS Subscriber Patient
36
+ - PAS Insurer Organization
37
+ - PAS Requestor Organization
38
+ - PAS Practitioner
39
+ - PAS PractitionerRole
40
+
41
+ Submit PAS requests to
42
+
43
+ `#{inquire_url}`
44
+
45
+ and [click here](#{resume_pass_url}?token=#{access_token}) when done.
46
+ )
47
+ )
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,39 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientPendedInquireResponseAttest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_v201_pended_inquire_response_attest
9
+ title 'Check that the client registers the request as approved (Attestation)'
10
+ description %(
11
+ This test provides the tester an opportunity to observe their client following
12
+ the receipt of the inquiry response with a final decision and attest that users
13
+ are able to determine that the response has been approved in full.
14
+ )
15
+ input :access_token,
16
+ title: 'Access Token',
17
+ description: %(
18
+ Access token that the client will provide in the Authorization header of each request
19
+ made during this test.
20
+ )
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ **Pended Workflow Test**:
27
+
28
+ I attest that the client system displays the submitted claim as 'approved' meaning that
29
+ the user can proceed with ordering or providing the requested service.
30
+
31
+ [Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
32
+
33
+ [Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
34
+ )
35
+ )
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,35 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientPendedInquireTest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_v201_pended_inquire_test
9
+ title 'Client inquires about a pended claim using the $inquire operation'
10
+ description %(
11
+ Inferno will wait for a prior authorization inquiry request
12
+ from the client. Upon receipt, Inferno will generate a response
13
+ with an approved status and respond with it.
14
+ )
15
+ input :access_token,
16
+ title: 'Access Token',
17
+ description: %(
18
+ Access token that the client will provide in the Authorization header of each request
19
+ made during this test.
20
+ )
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ **Pended Workflow Test**:
27
+
28
+ Submit a PAS claim inquiry request for the pended prior authorization request to `#{inquire_url}`.
29
+ An approval response generated by Inferno will be returned.
30
+ )
31
+ )
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,39 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientPendedSubmitResponseAttest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_v201_pended_submit_response_attest
9
+ title 'Check that the client registers the request as pended (Attestation)'
10
+ description %(
11
+ This test provides the tester an opportunity to observe their client following
12
+ the receipt of the pended response and attest that users are able to determine
13
+ that the response has been pended and a decision will be forth coming.
14
+ )
15
+ input :access_token,
16
+ title: 'Access Token',
17
+ description: %(
18
+ Access token that the client will provide in the Authorization header of each request
19
+ made during this test.
20
+ )
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ **Pended Workflow Test**:
27
+
28
+ I attest that the client system displays the submitted claim as 'pended' meaning that
29
+ a final decision has not yet been made.
30
+
31
+ [Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
32
+
33
+ [Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
34
+ )
35
+ )
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,43 @@
1
+ require_relative '../../../urls'
2
+ require_relative '../../../user_input_response'
3
+ require_relative '../../../pas_bundle_validation'
4
+
5
+ module DaVinciPASTestKit
6
+ module DaVinciPASV201
7
+ class PASClientPendedSubmitTest < Inferno::Test
8
+ include URLs
9
+ include UserInputResponse
10
+ include PasBundleValidation
11
+
12
+ id :pas_client_v201_pended_submit_test
13
+ title 'Client submits a claim using the $submit operation'
14
+ description %(
15
+ Inferno will wait for a prior authorization submission request
16
+ from the client. Upon receipt, Inferno will respond with the
17
+ provided pended response.
18
+ )
19
+ input :access_token,
20
+ title: 'Access Token',
21
+ description: %(
22
+ Access token that the client will provide in the Authorization header of each request
23
+ made during this test.
24
+ )
25
+
26
+ run do
27
+ check_user_inputted_response :pended_json_response
28
+ wait(
29
+ identifier: access_token,
30
+ message: %(
31
+ **Pended Workflow Test**:
32
+
33
+ Submit a PAS request to
34
+
35
+ `#{submit_url}`
36
+
37
+ The pended response provided in the '**#{input_title(:pended_json_response)}**' input will be returned.
38
+ )
39
+ )
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,57 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientSubmitMustSupportTest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_submit_v201_must_support_test
9
+ title 'Client submits claims using the $submit operation to demonstrate coverage of must support elements'
10
+ description %(
11
+ This test allows the client to send $submit requests in addition to any already sent in previous test groups
12
+ for Inferno to evaluate coverage of must support elements.
13
+ )
14
+ input :access_token,
15
+ title: 'Access Token',
16
+ description: %(
17
+ Access token that the client will provide in the Authorization header of each request
18
+ made during this test.
19
+ )
20
+ config options: { accepts_multiple_requests: true }
21
+
22
+ run do
23
+ wait(
24
+ identifier: access_token,
25
+ message: %(
26
+ The client system may now make multiple $submit requests before continuing. These requests should
27
+ cumulatively demonstrate coverage of all required profiles and all must support elements within those
28
+ profiles, as specified by the DaVince Prior Authorization Support implementation guide.
29
+
30
+ For the $submit operation the required profiles include:
31
+ - PAS Request Bundle
32
+ - PAS Claim Update
33
+ - PAS Coverage
34
+ - PAS Beneficiary Patient
35
+ - PAS Subscriber Patient
36
+ - PAS Insurer Organization
37
+ - PAS Requestor Organization
38
+ - PAS Practitioner
39
+ - PAS PractitionerRole
40
+ - PAS Encounter
41
+ - At least one of the following request profiles
42
+ - PAS Device Request
43
+ - PAS Medication Request
44
+ - PAS Nutrition Order
45
+ - PAS Service Request
46
+
47
+ Submit PAS requests to
48
+
49
+ `#{submit_url}`
50
+
51
+ and [click here](#{resume_pass_url}?token=#{access_token}) when done.
52
+ )
53
+ )
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,31 @@
1
+ require_relative '../../../urls'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientTokenRequestTest < Inferno::Test
6
+ include URLs
7
+
8
+ id :pas_client_v201_token_request_test
9
+ title 'Client makes token request'
10
+ description %(
11
+ Inferno will wait for the client to make a token request.
12
+ )
13
+ input :client_id,
14
+ title: 'Client ID',
15
+ description: %(
16
+ Client ID that the client will use to request an access token.
17
+ )
18
+
19
+ run do
20
+ wait(
21
+ identifier: client_id,
22
+ message: %(
23
+ Submit your token request with client id `#{client_id}` to
24
+
25
+ `#{token_url}`
26
+ )
27
+ )
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,18 @@
1
+ require_relative '../../../tags'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV201
5
+ class PASClientTokentRequestTest < Inferno::Test
6
+ id :pas_client_v201_token_validation_test
7
+ title 'Client token request is valid'
8
+ description 'Inferno will verify that an access token was successfully returned to the client under test.'
9
+ output :access_token
10
+
11
+ run do
12
+ load_tagged_requests(AUTH_TAG)
13
+ skip_if requests.empty?, 'No token requests were received'
14
+ output access_token: JSON.parse(requests.last.response_body)['access_token']
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ {
2
+ "resourceType" : "Bundle",
3
+ "id" : "ReferralAuthorizationBundleExample",
4
+ "meta" : {
5
+ "profile" : [
6
+ "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-request-bundle"
7
+ ]
8
+ },
9
+ "identifier" : {
10
+ "system" : "http://example.org/SUBMITTER_TRANSACTION_IDENTIFIER",
11
+ "value" : "A12345"
12
+ },
13
+ "type" : "collection",
14
+ "timestamp" : "2005-05-02T11:01:00+05:00",
15
+ "entry" : []
16
+ }
@@ -0,0 +1,38 @@
1
+ module DaVinciPASTestKit
2
+ module DaVinciPASV201
3
+ class PasInquiryErrorTest < Inferno::Test
4
+ id :prior_auth_inquiry_error
5
+ title %(
6
+ Server returns OperationOutcome instance when invoking the $inquire operation on the Claim endpoint
7
+ (/Claim/$inquire) with nonconformant PAS Request Bundle
8
+ )
9
+ description %(
10
+ A server SHALL support PAS Inquiry requests (a POST interaction to the /Claim/$inquire endpoint).
11
+ This test submits a Prior Authorization Inquiry request containing an empty Bundle
12
+ to the server and verifies that an OperationOutcome instance is returned with request
13
+ status 400 when a nonconformant PAS Inquiry Bundle is submitted.
14
+
15
+ It is possible that the incoming prior authorization Bundle can not be processed due to validation errors or
16
+ other non-business-errors. In these instances, the receiving system SHALL return OperationOutcome instances
17
+ that detail why the Bundle could not be processed and no ClaimResponse will be returned. These errors are NOT
18
+ the errors that are detected by the system processing the request and that can be conveyed in a ClaimResponse
19
+ via the error capability.
20
+ )
21
+ makes_request :pa_invalid_inquiry
22
+
23
+ run do
24
+ file_path = File.join(File.dirname(__FILE__), 'nonconformant_pas_bundle.json')
25
+
26
+ begin
27
+ invalid_bundle_json = JSON.parse(File.read(file_path))
28
+ fhir_operation('/Claim/$inquire', body: invalid_bundle_json, name: :pa_invalid_inquiry)
29
+
30
+ assert !(200..299).include?(response[:status]), 'HTTP status code should not be within the 2xx range'
31
+ assert_resource_type(:operation_outcome)
32
+ rescue JSON::ParserError => e
33
+ skip "Internal error parsing the invalid bundle JSON: #{e.message}"
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,56 @@
1
+ module DaVinciPASTestKit
2
+ module DaVinciPASV201
3
+ class PasSubmissionErrorTest < Inferno::Test
4
+ id :prior_auth_submission_error
5
+ title %(
6
+ Server returns OperationOutcome instance when invoking the $submit operation on the Claim endpoint
7
+ (/Claim/$submit) with nonconformant PAS Request Bundle
8
+ )
9
+ description %{
10
+ A server SHALL support PAS prior authorization requests (a POST interaction to the /Claim/$submit endpoint).
11
+ This test submits a Prior Authorization (PA) request containing an empty Bundle
12
+ to the server and verifies that an OperationOutcome instance is returned with request
13
+ status 400 when a nonconformant PAS Request Bundle is submitted.
14
+
15
+ It is possible that the incoming prior authorization Bundle can not be processed due to validation errors or
16
+ other non-business-errors. In these instances, the receiving system SHALL return OperationOutcome instances
17
+ that detail why the Bundle could not be processed and no ClaimResponse will be returned. These errors are NOT
18
+ the errors that are detected by the system processing the request and that can be conveyed in a ClaimResponse
19
+ via the error capability.
20
+
21
+ The server SHOULD respond within 15 seconds.
22
+ }
23
+
24
+ output :response_time
25
+ makes_request :pa_invalid_request
26
+
27
+ run do
28
+ file_path = File.join(File.dirname(__FILE__), 'nonconformant_pas_bundle.json')
29
+
30
+ begin
31
+ invalid_bundle_json = JSON.parse(File.read(file_path))
32
+ start_time = Time.now
33
+ fhir_operation('/Claim/$submit', body: invalid_bundle_json, name: :pa_invalid_request)
34
+ end_time = Time.now
35
+ response_time = end_time - start_time
36
+
37
+ if response_time > 15
38
+ warning %(
39
+ The server took more that 15 seconds to respond to the Prior Authorization
40
+ request.
41
+
42
+ Response Time: #{response_time}
43
+ )
44
+ end
45
+
46
+ assert !(200..299).include?(response[:status]), 'HTTP status code should not be within the 2xx range'
47
+ assert_resource_type(:operation_outcome)
48
+
49
+ output response_time:
50
+ rescue JSON::ParserError => e
51
+ skip "Internal error parsing the invalid bundle JSON: #{e.message}"
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,112 @@
1
+ ---
2
+ :name: profile_devicerequest
3
+ :class_name: ProfileDevicerequestSequence
4
+ :version: v2.0.1
5
+ :reformatted_version: v201
6
+ :resource: DeviceRequest
7
+ :profile_url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-devicerequest
8
+ :profile_name: PAS Device Request
9
+ :profile_version: 2.0.1
10
+ :title: Device Request
11
+ :short_description: Verify support for the server capabilities required by the PAS
12
+ Device Request.
13
+ :interactions: []
14
+ :operations: []
15
+ :required_concepts:
16
+ - codeCodeableConcept
17
+ :must_supports:
18
+ :extensions:
19
+ - :id: DeviceRequest.extension:coverage
20
+ :path: extension
21
+ :url: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/ext-coverage-information
22
+ :slices: []
23
+ :elements:
24
+ - :path: code[x]
25
+ - :path: subject
26
+ :types:
27
+ - Reference
28
+ - :path: occurrence[x]
29
+ :mandatory_elements:
30
+ - DeviceRequest.intent
31
+ - DeviceRequest.code[x]
32
+ - DeviceRequest.subject
33
+ :bindings:
34
+ - :type: code
35
+ :strength: preferred
36
+ :system: http://hl7.org/fhir/ValueSet/languages
37
+ :path: language
38
+ - :type: code
39
+ :strength: required
40
+ :system: http://hl7.org/fhir/ValueSet/request-status
41
+ :path: status
42
+ - :type: code
43
+ :strength: required
44
+ :system: http://hl7.org/fhir/ValueSet/request-priority
45
+ :path: priority
46
+ - :type: CodeableConcept
47
+ :strength: required
48
+ :system: http://hl7.org/fhir/us/davinci-pas/ValueSet/X12278RequestedServiceType
49
+ :path: code
50
+ - :type: CodeableConcept
51
+ :strength: example
52
+ :system:
53
+ :path: parameter.code
54
+ - :type: CodeableConcept
55
+ :strength: example
56
+ :system: http://hl7.org/fhir/ValueSet/participant-role
57
+ :path: performerType
58
+ - :type: CodeableConcept
59
+ :strength: example
60
+ :system: http://hl7.org/fhir/ValueSet/condition-code
61
+ :path: reasonCode
62
+ :references:
63
+ - :path: DeviceRequest.basedOn
64
+ :profiles:
65
+ - http://hl7.org/fhir/StructureDefinition/Resource
66
+ - :path: DeviceRequest.priorRequest
67
+ :profiles:
68
+ - http://hl7.org/fhir/StructureDefinition/Resource
69
+ - :path: DeviceRequest.subject
70
+ :profiles:
71
+ - http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary
72
+ - :path: DeviceRequest.encounter
73
+ :profiles:
74
+ - http://hl7.org/fhir/StructureDefinition/Encounter
75
+ - :path: DeviceRequest.requester
76
+ :profiles:
77
+ - http://hl7.org/fhir/StructureDefinition/Device
78
+ - http://hl7.org/fhir/StructureDefinition/Practitioner
79
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
80
+ - http://hl7.org/fhir/StructureDefinition/Organization
81
+ - :path: DeviceRequest.performer
82
+ :profiles:
83
+ - http://hl7.org/fhir/StructureDefinition/Practitioner
84
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
85
+ - http://hl7.org/fhir/StructureDefinition/Organization
86
+ - http://hl7.org/fhir/StructureDefinition/CareTeam
87
+ - http://hl7.org/fhir/StructureDefinition/HealthcareService
88
+ - http://hl7.org/fhir/StructureDefinition/Patient
89
+ - http://hl7.org/fhir/StructureDefinition/Device
90
+ - http://hl7.org/fhir/StructureDefinition/RelatedPerson
91
+ - :path: DeviceRequest.reasonReference
92
+ :profiles:
93
+ - http://hl7.org/fhir/StructureDefinition/Condition
94
+ - http://hl7.org/fhir/StructureDefinition/Observation
95
+ - http://hl7.org/fhir/StructureDefinition/DiagnosticReport
96
+ - http://hl7.org/fhir/StructureDefinition/DocumentReference
97
+ - :path: DeviceRequest.insurance
98
+ :profiles:
99
+ - http://hl7.org/fhir/StructureDefinition/Coverage
100
+ - http://hl7.org/fhir/StructureDefinition/ClaimResponse
101
+ - :path: DeviceRequest.supportingInfo
102
+ :profiles:
103
+ - http://hl7.org/fhir/StructureDefinition/Resource
104
+ - :path: DeviceRequest.relevantHistory
105
+ :profiles:
106
+ - http://hl7.org/fhir/StructureDefinition/Provenance
107
+ :tests:
108
+ - :id: pas_server_submit_request_v201_device_request_must_support_test
109
+ :file_name: server_submit_request_device_request_must_support_test.rb
110
+ - :id: pas_client_submit_request_v201_device_request_must_support_test
111
+ :file_name: client_submit_request_device_request_must_support_test.rb
112
+ :delayed_references: []