davinci_pas_test_kit 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/g33_br_provider.json +13 -0
  3. data/lib/davinci_pas_test_kit/client/abstract_approval_submit_test.rb +28 -17
  4. data/lib/davinci_pas_test_kit/client/abstract_denial_submit_test.rb +26 -16
  5. data/lib/davinci_pas_test_kit/client/abstract_gather_must_support_test.rb +43 -26
  6. data/lib/davinci_pas_test_kit/client/abstract_modification_submit_test.rb +29 -19
  7. data/lib/davinci_pas_test_kit/client/abstract_response_attest.rb +75 -6
  8. data/lib/davinci_pas_test_kit/client/abstract_subscription_create_test.rb +26 -9
  9. data/lib/davinci_pas_test_kit/client/abstract_subscription_update_delete_test.rb +91 -0
  10. data/lib/davinci_pas_test_kit/client/client_bundle_validation_helper.rb +245 -0
  11. data/lib/davinci_pas_test_kit/client/client_input_descriptions.rb +91 -25
  12. data/lib/davinci_pas_test_kit/client/endpoints/claim_endpoint.rb +108 -68
  13. data/lib/davinci_pas_test_kit/client/endpoints/endpoint_session_identification.rb +24 -0
  14. data/lib/davinci_pas_test_kit/client/endpoints/expired_token.rb +40 -0
  15. data/lib/davinci_pas_test_kit/client/endpoints/subscription_create_endpoint.rb +7 -12
  16. data/lib/davinci_pas_test_kit/client/endpoints/subscription_delete_endpoint.rb +13 -0
  17. data/lib/davinci_pas_test_kit/client/endpoints/subscription_read_endpoint.rb +13 -0
  18. data/lib/davinci_pas_test_kit/client/endpoints/subscription_status_endpoint.rb +15 -20
  19. data/lib/davinci_pas_test_kit/client/endpoints/subscription_update_endpoint.rb +13 -0
  20. data/lib/davinci_pas_test_kit/client/endpoints/token_endpoint.rb +16 -0
  21. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/beneficiary/client_inquire_request_must_support_beneficiary_test.rb +3 -3
  22. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/beneficiary/client_inquire_response_must_support_beneficiary_test.rb +3 -3
  23. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/beneficiary/client_submit_request_must_support_beneficiary_test.rb +3 -3
  24. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/beneficiary/client_submit_response_must_support_beneficiary_test.rb +3 -3
  25. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/claim_inquiry/client_inquire_request_must_support_claim_inquiry_test.rb +3 -3
  26. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/claim_update/client_submit_request_must_support_claim_update_test.rb +3 -3
  27. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/claiminquiryresponse/client_inquire_response_must_support_claiminquiryresponse_test.rb +3 -3
  28. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/claimresponse/client_submit_response_must_support_claimresponse_test.rb +3 -3
  29. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/communication_request/client_submit_response_must_support_communication_request_test.rb +3 -3
  30. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/coverage/client_inquire_request_must_support_coverage_test.rb +3 -3
  31. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/coverage/client_submit_request_must_support_coverage_test.rb +3 -3
  32. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/encounter/client_submit_request_must_support_encounter_test.rb +3 -3
  33. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/insurer/client_inquire_request_must_support_insurer_test.rb +3 -3
  34. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/insurer/client_inquire_response_must_support_insurer_test.rb +3 -3
  35. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/insurer/client_submit_request_must_support_insurer_test.rb +3 -3
  36. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/insurer/client_submit_response_must_support_insurer_test.rb +3 -3
  37. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_client_inquire_must_support_group.rb +1 -1
  38. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_client_inquire_response_must_support_group.rb +9 -31
  39. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_client_submit_must_support_group.rb +1 -1
  40. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_client_submit_response_must_support_group.rb +10 -32
  41. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_inquiry_request_bundle/client_inquire_request_must_support_pas_inquiry_request_bundle_test.rb +3 -3
  42. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_inquiry_response_bundle/client_inquire_response_must_support_pas_inquiry_response_bundle_test.rb +3 -3
  43. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_request_bundle/client_submit_request_must_support_pas_request_bundle_test.rb +3 -3
  44. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/pas_response_bundle/client_submit_response_must_support_pas_response_bundle_test.rb +3 -3
  45. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner/client_inquire_request_must_support_practitioner_test.rb +3 -3
  46. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner/client_inquire_response_must_support_practitioner_test.rb +3 -3
  47. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner/client_submit_request_must_support_practitioner_test.rb +3 -3
  48. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner/client_submit_response_must_support_practitioner_test.rb +3 -3
  49. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner_role/client_inquire_request_must_support_practitioner_role_test.rb +3 -3
  50. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner_role/client_inquire_response_must_support_practitioner_role_test.rb +3 -3
  51. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner_role/client_submit_request_must_support_practitioner_role_test.rb +3 -3
  52. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/practitioner_role/client_submit_response_must_support_practitioner_role_test.rb +3 -3
  53. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/requestor/client_inquire_request_must_support_requestor_test.rb +3 -3
  54. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/requestor/client_inquire_response_must_support_requestor_test.rb +3 -3
  55. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/requestor/client_submit_request_must_support_requestor_test.rb +3 -3
  56. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/requestor/client_submit_response_must_support_requestor_test.rb +3 -3
  57. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/subscriber/client_inquire_request_must_support_subscriber_test.rb +3 -3
  58. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/subscriber/client_submit_request_must_support_subscriber_test.rb +3 -3
  59. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/beneficiary/client_inquire_response_must_support_beneficiary_test.rb +4 -3
  60. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/beneficiary/client_submit_response_must_support_beneficiary_test.rb +4 -3
  61. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/claim_inquiry/client_inquire_request_must_support_claim_inquiry_test.rb +3 -3
  62. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/claim_update/client_submit_request_must_support_claim_update_test.rb +3 -3
  63. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/claiminquiryresponse/client_inquire_response_must_support_claiminquiryresponse_test.rb +4 -3
  64. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/claimresponse/client_submit_response_must_support_claimresponse_test.rb +4 -3
  65. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/communication_request/client_submit_response_must_support_communication_request_test.rb +4 -3
  66. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/insurer/client_inquire_response_must_support_insurer_test.rb +4 -3
  67. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/insurer/client_submit_response_must_support_insurer_test.rb +4 -3
  68. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/pas_client_inquire_must_support_group.rb +8 -6
  69. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/pas_client_inquire_response_must_support_group.rb +9 -31
  70. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/pas_client_submit_must_support_group.rb +13 -9
  71. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/pas_client_submit_response_must_support_group.rb +10 -32
  72. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/pas_inquiry_response_bundle/client_inquire_response_must_support_pas_inquiry_response_bundle_test.rb +4 -3
  73. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/pas_response_bundle/client_submit_response_must_support_pas_response_bundle_test.rb +4 -3
  74. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/practitioner/client_inquire_response_must_support_practitioner_test.rb +4 -3
  75. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/practitioner/client_submit_response_must_support_practitioner_test.rb +4 -3
  76. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/practitioner_role/client_inquire_response_must_support_practitioner_role_test.rb +4 -3
  77. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/practitioner_role/client_submit_response_must_support_practitioner_role_test.rb +4 -3
  78. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/requestor/client_inquire_response_must_support_requestor_test.rb +4 -3
  79. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/requestor/client_submit_response_must_support_requestor_test.rb +4 -3
  80. data/lib/davinci_pas_test_kit/client/jobs/send_pas_subscription_notification.rb +64 -3
  81. data/lib/davinci_pas_test_kit/client/pas_client_subscription_pas_conformance_test.rb +4 -3
  82. data/lib/davinci_pas_test_kit/client/registration/abstract_configuration_other_display_test.rb +6 -4
  83. data/lib/davinci_pas_test_kit/client/registration/abstract_configuration_smart_display_test.rb +8 -4
  84. data/lib/davinci_pas_test_kit/client/registration/abstract_configuration_udap_display_test.rb +9 -4
  85. data/lib/davinci_pas_test_kit/client/registration/abstract_other_auth_attest_test.rb +5 -4
  86. data/lib/davinci_pas_test_kit/client/request_count_gating.rb +14 -0
  87. data/lib/davinci_pas_test_kit/client/response_generator.rb +50 -9
  88. data/lib/davinci_pas_test_kit/client/session_identification.rb +26 -7
  89. data/lib/davinci_pas_test_kit/client/subscription_notification_trigger.rb +80 -0
  90. data/lib/davinci_pas_test_kit/client/subscription_setup_requirement.rb +59 -0
  91. data/lib/davinci_pas_test_kit/client/user_input_response.rb +27 -6
  92. data/lib/davinci_pas_test_kit/client/v2.0.1/client_suite.rb +30 -15
  93. data/lib/davinci_pas_test_kit/client/v2.0.1/must_support/pas_client_must_support_request_profiles_test.rb +2 -2
  94. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_approval_group.rb +8 -7
  95. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_auth_smart_group.rb +4 -4
  96. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_auth_udap_group.rb +4 -4
  97. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_denial_group.rb +8 -7
  98. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_must_support_group.rb +38 -52
  99. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_pended_group.rb +28 -22
  100. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_registration_group.rb +2 -2
  101. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_subscription_setup_group.rb +2 -2
  102. data/lib/davinci_pas_test_kit/client/v2.0.1/pas_client_workflows_group.rb +2 -2
  103. data/lib/davinci_pas_test_kit/client/v2.0.1/workflows/pas_client_inquire_request_bundle_validation_test.rb +15 -21
  104. data/lib/davinci_pas_test_kit/client/v2.0.1/workflows/pas_client_inquire_response_bundle_validation_test.rb +29 -29
  105. data/lib/davinci_pas_test_kit/client/v2.0.1/workflows/pas_client_pended_submit_test.rb +49 -40
  106. data/lib/davinci_pas_test_kit/client/v2.0.1/workflows/pas_client_request_bundle_validation_test.rb +15 -21
  107. data/lib/davinci_pas_test_kit/client/v2.0.1/workflows/pas_client_response_bundle_validation_test.rb +29 -29
  108. data/lib/davinci_pas_test_kit/client/v2.2.1/attestations/attestation_instructions.rb +10 -0
  109. data/lib/davinci_pas_test_kit/client/v2.2.1/attestations/client_data_element_expectations_attestation_test.rb +44 -0
  110. data/lib/davinci_pas_test_kit/client/v2.2.1/attestations/client_provider_review_attestation_test.rb +45 -0
  111. data/lib/davinci_pas_test_kit/client/v2.2.1/attestations/client_security_attestation_test.rb +42 -0
  112. data/lib/davinci_pas_test_kit/client/v2.2.1/attestations/client_subscription_error_recovery_attestation_test.rb +42 -0
  113. data/lib/davinci_pas_test_kit/client/v2.2.1/client_suite.rb +64 -12
  114. data/lib/davinci_pas_test_kit/client/v2.2.1/error_handling/pas_client_operation_failure_submit_test.rb +20 -10
  115. data/lib/davinci_pas_test_kit/client/v2.2.1/error_handling/pas_client_operation_outcome_validation_test.rb +11 -5
  116. data/lib/davinci_pas_test_kit/client/v2.2.1/error_handling/pas_client_processing_error_response_validation_test.rb +21 -12
  117. data/lib/davinci_pas_test_kit/client/v2.2.1/error_handling/pas_client_processing_error_submit_test.rb +19 -8
  118. data/lib/davinci_pas_test_kit/client/v2.2.1/must_support/must_support_with_attestation_option.rb +90 -40
  119. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_approval_group.rb +12 -11
  120. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_attestations_group.rb +32 -0
  121. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_auth_smart_group.rb +4 -4
  122. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_auth_udap_group.rb +4 -4
  123. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_claim_updates_group.rb +24 -6
  124. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_denial_group.rb +12 -10
  125. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_modification_group.rb +13 -14
  126. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_must_support_group.rb +55 -59
  127. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_operation_failure_group.rb +8 -5
  128. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_pended_group.rb +53 -41
  129. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_processing_error_group.rb +9 -7
  130. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_registration_group.rb +2 -2
  131. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_subscription_setup_group.rb +9 -4
  132. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_subscription_update_delete_group.rb +57 -0
  133. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_workflows_group.rb +22 -2
  134. data/lib/davinci_pas_test_kit/client/v2.2.1/subscription/pas_client_subscription_create_test.rb +2 -1
  135. data/lib/davinci_pas_test_kit/client/v2.2.1/subscription/pas_client_subscription_put_update_pas_conformance_test.rb +49 -0
  136. data/lib/davinci_pas_test_kit/client/v2.2.1/subscription/pas_client_subscription_update_delete_test.rb +12 -0
  137. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_claim_update_referenced_resources_test.rb +5 -6
  138. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_claim_update_submit_tests.rb +82 -56
  139. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_inquire_request_bundle_validation_test.rb +17 -20
  140. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_inquire_response_bundle_validation_test.rb +59 -27
  141. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_modification_verification_test.rb +0 -3
  142. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_pended_send_notification_test.rb +138 -0
  143. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_pended_submit_test.rb +32 -85
  144. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_request_bundle_validation_test.rb +16 -21
  145. data/lib/davinci_pas_test_kit/client/v2.2.1/workflows/pas_client_response_bundle_validation_test.rb +27 -27
  146. data/lib/davinci_pas_test_kit/cross_suite/generated/v2.0.1/task/metadata.yml +0 -4
  147. data/lib/davinci_pas_test_kit/cross_suite/generated/v2.2.1/metadata.yml +0 -1
  148. data/lib/davinci_pas_test_kit/cross_suite/generated/v2.2.1/task/metadata.yml +0 -4
  149. data/lib/davinci_pas_test_kit/cross_suite/pas_bundle_validation.rb +489 -289
  150. data/lib/davinci_pas_test_kit/cross_suite/pas_constants.rb +7 -0
  151. data/lib/davinci_pas_test_kit/cross_suite/pas_subscription_verification.rb +8 -4
  152. data/lib/davinci_pas_test_kit/cross_suite/referenced_resource_presence_validation.rb +141 -0
  153. data/lib/davinci_pas_test_kit/cross_suite/response_selection_utils.rb +13 -11
  154. data/lib/davinci_pas_test_kit/cross_suite/tags.rb +11 -6
  155. data/lib/davinci_pas_test_kit/cross_suite/validator_configuration.rb +16 -0
  156. data/lib/davinci_pas_test_kit/cross_suite/validator_suppressions.rb +4 -0
  157. data/lib/davinci_pas_test_kit/docs/demo/PAS Client Suite Demonstration.postman_collection.json +3 -3
  158. data/lib/davinci_pas_test_kit/ext/inferno_core/runnable.rb +1 -0
  159. data/lib/davinci_pas_test_kit/generator/client_must_support_group_generator.rb +47 -16
  160. data/lib/davinci_pas_test_kit/generator/must_support_target_profiles.rb +17 -0
  161. data/lib/davinci_pas_test_kit/generator/must_support_test_generator.rb +8 -2
  162. data/lib/davinci_pas_test_kit/generator/profile_metadata.rb +1 -1
  163. data/lib/davinci_pas_test_kit/generator/server_suite_generator.rb +4 -9
  164. data/lib/davinci_pas_test_kit/generator/templates/client_must_support_group.rb.erb +22 -3
  165. data/lib/davinci_pas_test_kit/generator/templates/client_must_support_response_group.rb.erb +7 -16
  166. data/lib/davinci_pas_test_kit/generator/templates/must_support.rb.erb +8 -8
  167. data/lib/davinci_pas_test_kit/generator/templates/server_suite.rb.erb +6 -7
  168. data/lib/davinci_pas_test_kit/generator/use_case_group_generator.rb +5 -5
  169. data/lib/davinci_pas_test_kit/parameters_helper.rb +13 -5
  170. data/lib/davinci_pas_test_kit/pas_notification_conformance_test.rb +2 -2
  171. data/lib/davinci_pas_test_kit/requirements/davinci_pas_test_kit_requirements.csv +14 -7
  172. data/lib/davinci_pas_test_kit/requirements/generated/davinci_pas_client_suite_v201_requirements_coverage.csv +21 -21
  173. data/lib/davinci_pas_test_kit/requirements/generated/davinci_pas_client_suite_v221_requirements_coverage.csv +30 -26
  174. data/lib/davinci_pas_test_kit/requirements/generated/davinci_pas_server_suite_v221_requirements_coverage.csv +12 -6
  175. data/lib/davinci_pas_test_kit/requirements/hl7.fhir.us.davinci-pas_2.2.1_requirements.xlsx +0 -0
  176. data/lib/davinci_pas_test_kit/server/claim_operation_logic.rb +1 -1
  177. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/beneficiary/server_inquire_request_must_support_beneficiary_test.rb +1 -1
  178. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/beneficiary/server_inquire_response_must_support_beneficiary_test.rb +1 -1
  179. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/beneficiary/server_submit_request_must_support_beneficiary_test.rb +1 -1
  180. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/beneficiary/server_submit_response_must_support_beneficiary_test.rb +1 -1
  181. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/claim_inquiry/server_inquire_request_must_support_claim_inquiry_test.rb +1 -1
  182. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/claim_update/server_submit_request_must_support_claim_update_test.rb +1 -1
  183. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/claiminquiryresponse/server_inquire_response_must_support_claiminquiryresponse_test.rb +1 -1
  184. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/claimresponse/server_submit_response_must_support_claimresponse_test.rb +1 -1
  185. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/communication_request/server_submit_response_must_support_communication_request_test.rb +1 -1
  186. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/coverage/server_inquire_request_must_support_coverage_test.rb +1 -1
  187. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/coverage/server_submit_request_must_support_coverage_test.rb +1 -1
  188. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/encounter/server_submit_request_must_support_encounter_test.rb +1 -1
  189. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/insurer/server_inquire_request_must_support_insurer_test.rb +1 -1
  190. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/insurer/server_inquire_response_must_support_insurer_test.rb +1 -1
  191. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/insurer/server_submit_request_must_support_insurer_test.rb +1 -1
  192. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/insurer/server_submit_response_must_support_insurer_test.rb +1 -1
  193. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_inquiry_request_bundle/server_inquire_request_must_support_pas_inquiry_request_bundle_test.rb +1 -1
  194. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_inquiry_response_bundle/server_inquire_response_must_support_pas_inquiry_response_bundle_test.rb +1 -1
  195. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_request_bundle/server_submit_request_must_support_pas_request_bundle_test.rb +1 -1
  196. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_response_bundle/server_submit_response_must_support_pas_response_bundle_test.rb +1 -1
  197. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_server_approval_use_case_group.rb +3 -3
  198. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_server_denial_use_case_group.rb +3 -3
  199. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/pas_server_pended_use_case_group.rb +6 -6
  200. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner/server_inquire_request_must_support_practitioner_test.rb +1 -1
  201. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner/server_inquire_response_must_support_practitioner_test.rb +1 -1
  202. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner/server_submit_request_must_support_practitioner_test.rb +1 -1
  203. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner/server_submit_response_must_support_practitioner_test.rb +1 -1
  204. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner_role/server_inquire_request_must_support_practitioner_role_test.rb +1 -1
  205. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner_role/server_inquire_response_must_support_practitioner_role_test.rb +1 -1
  206. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner_role/server_submit_request_must_support_practitioner_role_test.rb +1 -1
  207. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/practitioner_role/server_submit_response_must_support_practitioner_role_test.rb +1 -1
  208. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/requestor/server_inquire_request_must_support_requestor_test.rb +1 -1
  209. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/requestor/server_inquire_response_must_support_requestor_test.rb +1 -1
  210. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/requestor/server_submit_request_must_support_requestor_test.rb +1 -1
  211. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/requestor/server_submit_response_must_support_requestor_test.rb +1 -1
  212. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/server_suite.rb +6 -7
  213. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/subscriber/server_inquire_request_must_support_subscriber_test.rb +1 -1
  214. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/subscriber/server_submit_request_must_support_subscriber_test.rb +1 -1
  215. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/task/server_inquire_response_must_support_task_test.rb +1 -1
  216. data/lib/davinci_pas_test_kit/server/generated/v2.0.1/task/server_submit_response_must_support_task_test.rb +1 -1
  217. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/beneficiary/server_inquire_request_must_support_beneficiary_test.rb +1 -1
  218. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/beneficiary/server_inquire_response_must_support_beneficiary_test.rb +1 -1
  219. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/beneficiary/server_submit_request_must_support_beneficiary_test.rb +1 -1
  220. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/beneficiary/server_submit_response_must_support_beneficiary_test.rb +1 -1
  221. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/claim_inquiry/server_inquire_request_must_support_claim_inquiry_test.rb +1 -1
  222. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/claim_update/server_submit_request_must_support_claim_update_test.rb +1 -1
  223. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/claiminquiryresponse/server_inquire_response_must_support_claiminquiryresponse_test.rb +1 -1
  224. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/claimresponse/server_submit_response_must_support_claimresponse_test.rb +1 -1
  225. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/communication_request/server_submit_response_must_support_communication_request_test.rb +1 -1
  226. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/coverage/server_inquire_request_must_support_coverage_test.rb +1 -1
  227. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/coverage/server_submit_request_must_support_coverage_test.rb +1 -1
  228. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/encounter/server_submit_request_must_support_encounter_test.rb +1 -1
  229. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/insurer/server_inquire_request_must_support_insurer_test.rb +1 -1
  230. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/insurer/server_inquire_response_must_support_insurer_test.rb +1 -1
  231. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/insurer/server_submit_request_must_support_insurer_test.rb +1 -1
  232. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/insurer/server_submit_response_must_support_insurer_test.rb +1 -1
  233. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_inquiry_request_bundle/server_inquire_request_must_support_pas_inquiry_request_bundle_test.rb +1 -1
  234. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_inquiry_response_bundle/server_inquire_response_must_support_pas_inquiry_response_bundle_test.rb +1 -1
  235. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_request_bundle/server_submit_request_must_support_pas_request_bundle_test.rb +1 -1
  236. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_response_bundle/server_submit_response_must_support_pas_response_bundle_test.rb +1 -1
  237. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_server_approval_use_case_group.rb +3 -3
  238. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_server_denial_use_case_group.rb +3 -3
  239. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/pas_server_pended_use_case_group.rb +4 -4
  240. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner/server_inquire_request_must_support_practitioner_test.rb +1 -1
  241. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner/server_inquire_response_must_support_practitioner_test.rb +1 -1
  242. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner/server_submit_request_must_support_practitioner_test.rb +1 -1
  243. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner/server_submit_response_must_support_practitioner_test.rb +1 -1
  244. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner_role/server_inquire_request_must_support_practitioner_role_test.rb +1 -1
  245. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner_role/server_inquire_response_must_support_practitioner_role_test.rb +1 -1
  246. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner_role/server_submit_request_must_support_practitioner_role_test.rb +1 -1
  247. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/practitioner_role/server_submit_response_must_support_practitioner_role_test.rb +1 -1
  248. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/requestor/server_inquire_request_must_support_requestor_test.rb +1 -1
  249. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/requestor/server_inquire_response_must_support_requestor_test.rb +1 -1
  250. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/requestor/server_submit_request_must_support_requestor_test.rb +1 -1
  251. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/requestor/server_submit_response_must_support_requestor_test.rb +1 -1
  252. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/server_suite.rb +6 -7
  253. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/subscriber/server_inquire_request_must_support_subscriber_test.rb +1 -1
  254. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/subscriber/server_submit_request_must_support_subscriber_test.rb +1 -1
  255. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/task/server_inquire_response_must_support_task_test.rb +1 -1
  256. data/lib/davinci_pas_test_kit/server/generated/v2.2.1/task/server_submit_response_must_support_task_test.rb +1 -1
  257. data/lib/davinci_pas_test_kit/server/pas_claim_response_decision_test.rb +2 -2
  258. data/lib/davinci_pas_test_kit/server/server_request_bundle_validation_test.rb +4 -6
  259. data/lib/davinci_pas_test_kit/server/server_response_bundle_validation_test.rb +4 -6
  260. data/lib/davinci_pas_test_kit/server/v2.0.1/must_support/pas_server_must_support_request_profiles_test.rb +1 -1
  261. data/lib/davinci_pas_test_kit/server/v2.0.1/pas_server_subscription_setup.rb +1 -1
  262. data/lib/davinci_pas_test_kit/server/v2.2.1/must_support/pas_server_must_support_request_profiles_test.rb +1 -1
  263. data/lib/davinci_pas_test_kit/server/v2.2.1/pas_server_claim_updates_group.rb +1 -1
  264. data/lib/davinci_pas_test_kit/server/v2.2.1/pas_server_subscription_setup.rb +1 -1
  265. data/lib/davinci_pas_test_kit/version.rb +2 -2
  266. metadata +31 -13
  267. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/task/client_inquire_response_must_support_task_test.rb +0 -45
  268. data/lib/davinci_pas_test_kit/client/generated/v2.0.1/task/client_submit_response_must_support_task_test.rb +0 -45
  269. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/task/client_inquire_response_must_support_task_test.rb +0 -55
  270. data/lib/davinci_pas_test_kit/client/generated/v2.2.1/task/client_submit_response_must_support_task_test.rb +0 -55
  271. data/lib/davinci_pas_test_kit/client/v2.2.1/pas_client_error_handling_group.rb +0 -20
@@ -26,7 +26,7 @@ module DaVinciPASTestKit
26
26
 
27
27
  id :pas_client_v221_claim_update_submit_base
28
28
 
29
- config options: { suppress_notifications: true }
29
+ config options: { suppress_notifications: true, submit_enabled: true }
30
30
 
31
31
  input :client_id,
32
32
  title: 'Client Id',
@@ -40,12 +40,24 @@ module DaVinciPASTestKit
40
40
  optional: true,
41
41
  locked: true,
42
42
  description: INPUT_SESSION_URL_PATH_LOCKED
43
+ input :prior_submission_failed,
44
+ default: 'false',
45
+ hidden: true,
46
+ optional: true
47
+
48
+ output :prior_submission_failed
43
49
 
44
50
  run do
51
+ skip_if !config.options[:first_update_submission] && prior_submission_failed == 'true',
52
+ 'Prior step of the update scenario not completed.'
53
+
54
+ output prior_submission_failed: 'false' if config.options[:first_update_submission]
45
55
  response_input = config.options[:submit_respond_with]
46
56
  if response_input.present? && send(response_input).present?
57
+ output prior_submission_failed: 'true'
47
58
  assert_valid_json send(response_input),
48
59
  "Input '#{input_title(response_input)}' must be valid JSON"
60
+ output prior_submission_failed: 'false'
49
61
  elsif response_input.present?
50
62
  add_message('info', %(
51
63
  No response provided in input '#{input_title(response_input)}'. Inferno will generate an
@@ -64,30 +76,35 @@ module DaVinciPASTestKit
64
76
  end
65
77
 
66
78
  def claim_update_wait_message(submit_endpoint)
67
- %(
68
- **Claim Update Workflow**
79
+ <<~MESSAGE
80
+ **Claim Update Scenario**:
81
+
82
+ Inferno will wait while the tester uses the PAS client to #{interaction_instructions}.
83
+ The tests will automatically continue once a request has been received.
69
84
 
70
- #{interaction_instructions}
85
+ ### Endpoints
71
86
 
72
- Submit the request to
87
+ Submit a PAS request to
73
88
 
74
89
  `#{submit_endpoint}`
75
90
 
91
+ ### Authentication and Identification
92
+
93
+ #{auth_description_for_wait(client_id)}
94
+
95
+ ### Responses
96
+
76
97
  #{response_note}
77
98
 
78
- Inferno will automatically continue once it receives the request, so no further
79
- action is required after submitting.
80
- )
99
+ Inferno will not respond to `$inquire` requests during this test.
100
+ MESSAGE
81
101
  end
82
102
 
83
103
  def response_note
84
104
  response_input = config.options[:submit_respond_with]
85
- if response_input.present? && send(response_input).present?
86
- "The response provided in the '**#{input_title(response_input)}**' input will be returned, " \
87
- 'updated with current timestamps.'
88
- else
89
- 'Inferno will generate an approved response from the submitted Claim and return it.'
90
- end
105
+ response_description_for_wait(user_inputted_response?(response_input),
106
+ input_title(response_input),
107
+ '$submit')
91
108
  end
92
109
 
93
110
  # Overridden by subclasses to describe the specific submission the tester should make.
@@ -101,28 +118,31 @@ module DaVinciPASTestKit
101
118
  id :pas_client_v221_claim_update_initial_submit_test
102
119
  title 'PAS client submits an initial prior authorization request'
103
120
  description %(
104
- Inferno waits for an initial prior authorization `$submit` request from the client.
121
+ During this test, Inferno will wait for an initial prior authorization `$submit` request from the PAS client.
105
122
  This establishes the original Claim that the subsequent updates will reference and
106
- modify. Upon receipt, Inferno returns the configured response (or generates an
107
- approved response from the submitted Claim) and continues automatically.
123
+ modify. Upon receipt, Inferno will respond with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
124
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
125
+ approval response. Inferno will not respond to `$inquire` operation requests during
126
+ this test.
108
127
  )
109
128
 
110
129
  input :claim_update_initial_response,
111
130
  title: 'Initial claim response JSON',
112
131
  type: 'textarea',
113
132
  optional: true,
114
- description: %(
115
- If provided, this JSON will be returned in response to the initial `$submit` request,
116
- updated with current timestamps. If not provided, an approved response will be generated
117
- from the submitted Claim.
133
+ description: DaVinciPASTestKit.user_response_input_description_for_update_tests(
134
+ '$submit',
135
+ 'approved',
136
+ 'PAS client submits an initial prior authorization request'
118
137
  )
119
138
 
120
139
  submit_respond_with :claim_update_initial_response
121
- config options: { claim_update_tag: CLAIM_UPDATE_INITIAL_TAG }
140
+ config options: { claim_update_tag: CLAIM_UPDATE_INITIAL_TAG, first_update_submission: true }
141
+ inputs.delete(:prior_submission_failed)
122
142
 
123
143
  def interaction_instructions
124
- 'Submit an **initial** prior authorization request (a `$submit` containing a Claim with one ' \
125
- 'or more items and no `Claim.related.claim`).'
144
+ 'submit an **initial** prior authorization request (a `$submit` containing a Claim with one ' \
145
+ 'or more items and no `Claim.related.claim`)'
126
146
  end
127
147
  end
128
148
 
@@ -131,12 +151,14 @@ module DaVinciPASTestKit
131
151
  id :pas_client_v221_claim_update_add_item_submit_test
132
152
  title 'PAS client submits an update that adds an item'
133
153
  description %(
134
- Inferno waits for an updated prior authorization `$submit` request that adds a new item to
135
- the previously submitted Claim. The update is expected to reference the original Claim in
136
- `Claim.related.claim` (and include it in the Bundle), retain all previously submitted item
154
+ During this test, Inferno will wait for an updated prior authorization `$submit` request that adds a new item to
155
+ the previously submitted Claim. The update is expected to reference (and include in the Bundle)
156
+ the original Claim in `Claim.related.claim`, retain all previously submitted item
137
157
  and supportingInfo entries with their `sequence` values, and mark the newly added item with
138
- an `infoChanged` extension. Upon receipt, Inferno returns the configured response and
139
- continues automatically.
158
+ an `infoChanged` extension. Upon receipt, Inferno will respond with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
159
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
160
+ approval response. Inferno will not respond to `$inquire` operation requests during
161
+ this test.
140
162
  )
141
163
  verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@spec-63'
142
164
 
@@ -144,20 +166,20 @@ module DaVinciPASTestKit
144
166
  title: 'Add-item update response JSON',
145
167
  type: 'textarea',
146
168
  optional: true,
147
- description: %(
148
- If provided, this JSON will be returned in response to the add-item update `$submit`
149
- request, updated with current timestamps. If not provided, an approved response will be
150
- generated from the submitted Claim.
169
+ description: DaVinciPASTestKit.user_response_input_description_for_update_tests(
170
+ '$submit',
171
+ 'approved',
172
+ 'PAS client submits an update that adds an item'
151
173
  )
152
174
 
153
175
  submit_respond_with :claim_update_add_item_response
154
- config options: { claim_update_tag: CLAIM_UPDATE_ADD_ITEM_TAG }
176
+ config options: { claim_update_tag: CLAIM_UPDATE_ADD_ITEM_TAG, first_update_submission: false }
155
177
 
156
178
  def interaction_instructions
157
- 'Submit an **update that adds a new item** to the prior authorization. Reference the ' \
179
+ 'submit an **update that adds a new item** to the prior authorization. Reference the ' \
158
180
  'previously submitted Claim in `Claim.related.claim` and include that Claim in the Bundle, ' \
159
181
  'retain all previously submitted items and supportingInfo (preserving their `sequence` ' \
160
- 'values), and mark the newly added item with an `infoChanged` extension.'
182
+ 'values), and mark the newly added item with an `infoChanged` extension'
161
183
  end
162
184
  end
163
185
 
@@ -166,14 +188,16 @@ module DaVinciPASTestKit
166
188
  id :pas_client_v221_claim_update_modify_cancel_submit_test
167
189
  title 'PAS client submits an update that modifies an item and cancels an item'
168
190
  description %(
169
- Inferno waits for a second updated prior authorization `$submit` request that modifies one
191
+ During this test, Inferno will wait for a second updated prior authorization `$submit` request that modifies one
170
192
  existing item and cancels another. Modified entries are expected to carry an `infoChanged`
171
193
  extension; the canceled item is expected to carry the `infoCancelled` modifier extension
172
194
  (valueBoolean `true`), a `certificationType` extension with code `3` (Cancel) in
173
195
  `Claim.item.extension`, and an `infoChanged` extension. All prior item and supportingInfo
174
196
  entries are expected to be retained with preserved `sequence` values, referencing the
175
- immediately prior Claim update. Upon receipt, Inferno returns the configured response and
176
- continues automatically.
197
+ immediately prior Claim update. Upon receipt, Inferno will respond with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
198
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
199
+ approval response. Inferno will not respond to `$inquire` operation requests during
200
+ this test.
177
201
  )
178
202
  verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@spec-63'
179
203
 
@@ -181,22 +205,22 @@ module DaVinciPASTestKit
181
205
  title: 'Modify-and-cancel update response JSON',
182
206
  type: 'textarea',
183
207
  optional: true,
184
- description: %(
185
- If provided, this JSON will be returned in response to the modify-and-cancel update
186
- `$submit` request, updated with current timestamps. If not provided, an approved response
187
- will be generated from the submitted Claim.
208
+ description: DaVinciPASTestKit.user_response_input_description_for_update_tests(
209
+ '$submit',
210
+ 'approved',
211
+ 'PAS client submits an update that modifies an item and cancels an item'
188
212
  )
189
213
 
190
214
  submit_respond_with :claim_update_modify_cancel_response
191
- config options: { claim_update_tag: CLAIM_UPDATE_MODIFY_CANCEL_TAG }
215
+ config options: { claim_update_tag: CLAIM_UPDATE_MODIFY_CANCEL_TAG, first_update_submission: false }
192
216
 
193
217
  def interaction_instructions
194
- 'Submit an **update that modifies one item and cancels another**. Mark the modified item ' \
218
+ 'submit an **update that modifies one item and cancels another**. Mark the modified item ' \
195
219
  'with an `infoChanged` extension. Mark the canceled item with the `infoCancelled` modifier ' \
196
220
  'extension (valueBoolean `true`), a `certificationType` extension with code `3` (Cancel) in ' \
197
221
  '`Claim.item.extension`, and an `infoChanged` extension. Retain all prior items and ' \
198
222
  'supportingInfo (preserving their `sequence` values) and reference the immediately prior ' \
199
- 'Claim update in `Claim.related.claim`.'
223
+ 'Claim update in `Claim.related.claim`'
200
224
  end
201
225
  end
202
226
 
@@ -205,12 +229,14 @@ module DaVinciPASTestKit
205
229
  id :pas_client_v221_claim_update_cancel_all_submit_test
206
230
  title 'PAS client submits an update that cancels the entire request'
207
231
  description %(
208
- Inferno waits for a third updated prior authorization `$submit` request that cancels the
232
+ During this test, Inferno will wait for a third updated prior authorization `$submit` request that cancels the
209
233
  entire prior authorization. The update is expected to include a `certificationType` extension
210
234
  with code `3` (Cancel) in `Claim.extension`; no items are required to cancel the entire
211
235
  authorization. The update is expected to reference the immediately prior Claim update in
212
- `Claim.related.claim`. Upon receipt, Inferno returns the configured response and continues
213
- automatically.
236
+ `Claim.related.claim`. Upon receipt, Inferno will respond with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
237
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
238
+ approval response. Inferno will not respond to `$inquire` operation requests during
239
+ this test.
214
240
  )
215
241
  verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@spec-63'
216
242
 
@@ -218,20 +244,20 @@ module DaVinciPASTestKit
218
244
  title: 'Cancel-entire-request update response JSON',
219
245
  type: 'textarea',
220
246
  optional: true,
221
- description: %(
222
- If provided, this JSON will be returned in response to the cancel-entire-request update
223
- `$submit` request, updated with current timestamps. If not provided, an approved response
224
- will be generated from the submitted Claim.
247
+ description: DaVinciPASTestKit.user_response_input_description_for_update_tests(
248
+ '$submit',
249
+ 'approved',
250
+ 'PAS client submits an update that cancels the entire request'
225
251
  )
226
252
 
227
253
  submit_respond_with :claim_update_cancel_all_response
228
- config options: { claim_update_tag: CLAIM_UPDATE_CANCEL_ALL_TAG }
254
+ config options: { claim_update_tag: CLAIM_UPDATE_CANCEL_ALL_TAG, first_update_submission: false }
229
255
 
230
256
  def interaction_instructions
231
- 'Submit an **update that cancels the entire prior authorization**. Include a ' \
257
+ 'submit an **update that cancels the entire prior authorization**. Include a ' \
232
258
  '`certificationType` extension with code `3` (Cancel) in `Claim.extension`; no items are ' \
233
259
  'required to cancel the entire authorization. Reference the immediately prior Claim update ' \
234
- 'in `Claim.related.claim`.'
260
+ 'in `Claim.related.claim`'
235
261
  end
236
262
  end
237
263
  end
@@ -1,14 +1,16 @@
1
1
  require_relative '../../../cross_suite/pas_bundle_validation'
2
+ require_relative '../../client_bundle_validation_helper'
2
3
 
3
4
  module DaVinciPASTestKit
4
5
  module DaVinciPASV221
5
6
  class PasClientInquireRequestBundleValidationTest < Inferno::Test
6
7
  include DaVinciPASTestKit::PasBundleValidation
8
+ include DaVinciPASTestKit::ClientBundleValidationHelper
7
9
 
8
10
  id :pas_client_v221_inquire_request_bundle_validation_test
9
11
  title '$inquire request Bundles have the correct structure and content'
10
12
  description %(
11
- This test verifies the conformity of the client's request body to the
13
+ This test verifies the conformity of each of the PAS client's `$inquire` request bodies to the
12
14
  [PAS Inquiry Request Bundle](http://hl7.org/fhir/us/davinci-pas/2.2.1/StructureDefinition-profile-pas-inquiry-request-bundle.html)
13
15
  structure. It also checks that other conformance requirements defined in the [PAS Formal
14
16
  Specification](https://hl7.org/fhir/us/davinci-pas/2.2.1/specification.html),
@@ -25,30 +27,25 @@ module DaVinciPASTestKit
25
27
  sets containing X12 codes are not validated.
26
28
  )
27
29
 
28
- def request_type_tag
29
- INQUIRE_TAG
30
+ verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@spec-1', 'hl7.fhir.us.davinci-pas_2.2.1@prof-1',
31
+ 'hl7.fhir.us.davinci-pas_2.2.1@prof-2', 'hl7.fhir.us.davinci-pas_2.2.1@prof-3'
32
+
33
+ def operation_name
34
+ 'inquire'
35
+ end
36
+
37
+ def message_direction_name
38
+ 'request'
30
39
  end
31
40
 
32
- def workflow_tag
33
- config.options[:workflow_tag]
41
+ def ig_version
42
+ '2.2.1'
34
43
  end
35
44
 
36
45
  run do
37
- if workflow_tag.present?
38
- load_tagged_requests(request_type_tag, workflow_tag)
39
- else
40
- load_tagged_requests(request_type_tag)
41
- end
42
- skip_if !request.present?, 'No inquire requests received.'
43
-
44
- validate_pas_bundle_json(
45
- request.request_body,
46
- 'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-request-bundle',
47
- '2.2.1',
48
- 'inquire',
49
- 'request_bundle',
50
- message: 'The Bundle provided for the Claim/$inquire operation is invalid:'
51
- )
46
+ failed = non_conformant_bundles
47
+ assert failed.empty?,
48
+ "Non-conformant request Bundles detected: #{failed.join(', ')}. Check messages for issues found."
52
49
  end
53
50
  end
54
51
  end
@@ -1,18 +1,18 @@
1
1
  require_relative '../../../cross_suite/pas_bundle_validation'
2
2
  require_relative '../../user_input_response'
3
- require_relative '../../response_generator'
3
+ require_relative '../../client_bundle_validation_helper'
4
4
 
5
5
  module DaVinciPASTestKit
6
6
  module DaVinciPASV221
7
7
  class PasClientInquireResponseBundleValidationTest < Inferno::Test
8
8
  include DaVinciPASTestKit::PasBundleValidation
9
9
  include UserInputResponse
10
- include ResponseGenerator
10
+ include DaVinciPASTestKit::ClientBundleValidationHelper
11
11
 
12
12
  id :pas_client_v221_inquire_response_bundle_validation_test
13
13
  title '$inquire response Bundles have the correct structure and content'
14
14
  description %(
15
- This test verifies the conformity of the inquire response sent by Inferno, which will have been
15
+ This test verifies the conformity of each `$inquire` response sent by Inferno, which will have been
16
16
  either:
17
17
  - the response body provided by the tester in the corresponding input, or
18
18
  - created by Inferno from the $inquire Bundle.
@@ -30,17 +30,24 @@ module DaVinciPASTestKit
30
30
  to the bound ValueSet. Quantity, Coding, and code element bindings will
31
31
  fail if their code/system are not found in the valueset.
32
32
 
33
- Note that because X12 value sets are not public, elements bound to value
34
- sets containing X12 codes are not validated.
33
+ Note that:
34
+ - To ensure that the PAS client is driving its behavior only based on standard
35
+ PAS information, custom extensions are not allowed within the responses.
36
+ - Because X12 value sets are not public, elements bound to value
37
+ sets containing X12 codes are not validated.
35
38
  )
36
39
  simulation_verification
37
40
 
38
- def request_type
41
+ def operation_name
39
42
  'inquire'
40
43
  end
41
44
 
42
- def workflow_tag
43
- config.options[:workflow_tag]
45
+ def message_direction_name
46
+ 'response'
47
+ end
48
+
49
+ def ig_version
50
+ '2.2.1'
44
51
  end
45
52
 
46
53
  def target_user_input
@@ -52,26 +59,51 @@ module DaVinciPASTestKit
52
59
  end
53
60
  end
54
61
 
55
- run do
56
- load_tagged_requests(workflow_tag, INQUIRE_TAG)
57
- skip_if requests.empty?, 'No responses to verify because no inquire requests were made.'
58
- message = if workflow_tag == MUST_SUPPORT_WORKFLOW_TAG
59
- 'Invalid must support response bundle provided:'
60
- elsif user_inputted_response? target_user_input
61
- "Invalid response generated from provided input '#{input_title(target_user_input)}':"
62
- else
63
- 'Invalid response generated from the submitted claim:'
64
- end
62
+ # v2.2.1 inquire response is a Parameters with one or more Bundles. Non-Bundle 'return'
63
+ # entries are reported and left as nil so the remaining Bundles keep their position in labels.
64
+ def bundles_from_message_resource(message_resource, message_label)
65
+ case message_resource
66
+ when FHIR::Bundle
67
+ messages << { type: 'error',
68
+ message: "#{message_label} expected a Parameters resource, got Bundle." }
69
+ [message_resource]
70
+
71
+ when FHIR::Parameters
72
+ target_parameter_name = 'return'
73
+ extract_resources_from_parameters(message_resource, target_parameter_name)
74
+ .each_with_index.map do |resource, resource_index|
75
+ case resource
76
+ when FHIR::Bundle
77
+ resource
78
+ else
79
+ messages << { type: 'error',
80
+ message: "#{message_label} Parameters resource '#{target_parameter_name}' " \
81
+ "entry #{resource_index + 1} expected to " \
82
+ "contain a Bundle, got #{resource&.resourceType}" }
83
+ nil
84
+ end
85
+ end
86
+ else
87
+ messages << { type: 'error',
88
+ message: "#{message_label} expected a Parameters resource, " \
89
+ "got #{message_resource.resourceType}." }
90
+ []
91
+ end
92
+ end
93
+
94
+ def failed_entities_description
95
+ if user_inputted_response? target_user_input
96
+ "built from tester-provided response in '#{input_title(target_user_input)}'"
97
+ else
98
+ 'generated from the submitted claim'
99
+ end
100
+ end
65
101
 
66
- validate_pas_bundle_json(
67
- request.response_body,
68
- 'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-inquiry-response-bundle',
69
- '2.2.1',
70
- request_type,
71
- 'response_bundle',
72
- skips: true,
73
- message:
74
- )
102
+ run do
103
+ failed = non_conformant_bundles
104
+ skip_if failed.present?,
105
+ "Non-conformant response Bundles #{failed_entities_description}: #{failed.join(', ')}. " \
106
+ 'Check messages for issues found.'
75
107
  end
76
108
  end
77
109
  end
@@ -13,9 +13,6 @@ module DaVinciPASTestKit
13
13
  - at least one `ClaimResponse.item` entry has an adjudication review action code of A6 ('Modified'), and
14
14
  - each modified item is paired with a `ClaimResponse.addItem` entry that references it via the same
15
15
  `itemSequence` value, conveying the details of what was actually authorized.
16
-
17
- The response checked here is either the response body provided by the tester in the corresponding
18
- input or the one generated by Inferno from the $submit Bundle.
19
16
  )
20
17
  simulation_verification
21
18
 
@@ -0,0 +1,138 @@
1
+ require_relative '../urls'
2
+ require_relative '../../client_input_descriptions'
3
+ require_relative '../../user_input_response'
4
+ require_relative '../../subscription_notification_trigger'
5
+ require_relative '../../subscription_setup_requirement'
6
+ require_relative '../../../cross_suite/tags'
7
+
8
+ module DaVinciPASTestKit
9
+ module DaVinciPASV221
10
+ class PASClientPendedNotifyAndAttestFinalizedTest < Inferno::Test
11
+ include URLs
12
+ include UserInputResponse
13
+ include SubscriptionNotificationTrigger
14
+ include SubscriptionSetupRequirement
15
+
16
+ id :pas_client_v221_pended_notify_and_attest_finalized_test
17
+ title 'Inferno sends a notification that the pended request has been finalized'
18
+ description %(
19
+ During this test, Inferno will send a full-resource notification to the PAS client's Subscription
20
+ endpoint to tell it that a final decision has been made on the pended prior authorization request
21
+ that the PAS client submitted earlier. The notification is generated from the pended `$submit` response
22
+ that Inferno returned to the PAS client, unless one is provided.
23
+ )
24
+
25
+ input :notification_bundle,
26
+ title: 'Claim updated notification JSON',
27
+ type: 'textarea',
28
+ optional: true,
29
+ description: %(
30
+ If provided, this JSON will be sent as the notification for the
31
+ PAS Subscription to tell the PAS client that a decision has been made on the pended claim.
32
+ Before sending, Inferno will update the provided notification with details that the tester cannot
33
+ know ahead of time, including timestamps corresponding to the notification trigger time, and the id of
34
+ the triggering ClaimResponse if Inferno mocks that ClaimResponse because it is not provided by the
35
+ tester through the *Claim pended response JSON* input.
36
+ If not provided, a notification will be generated from the returned ClaimResponse.
37
+ In either case the response will be validated to ensure that the notification
38
+ is conformant. For PAS v2.2.1, the notification must be a full-resource notification
39
+ containing the complete ClaimResponse.
40
+ )
41
+ input :pended_json_response,
42
+ title: 'Claim pended response JSON',
43
+ type: 'textarea',
44
+ optional: true,
45
+ description: DaVinciPASTestKit.user_response_input_description('$submit', 'pended', 'Pended Response')
46
+ input :client_endpoint_access_token,
47
+ optional: true,
48
+ title: 'Client Notification Access Token',
49
+ description: %(
50
+ The bearer token that Inferno will send on requests to the PAS client's rest-hook notification
51
+ endpoint. Not needed if the PAS client will create a Subscription with an appropriate header value
52
+ in the `channel.header` element. If a value for the `authorization` header is provided in
53
+ `channel.header`, this value will override it.
54
+ )
55
+
56
+ run do
57
+ @subscription_json = require_unmodified_subscription
58
+
59
+ pended_submit_requests = load_tagged_requests(SUBMIT_TAG, PENDED_WORKFLOW_TAG)
60
+ @pended_submit_request = pended_submit_requests.select { |req| req.status == 200 }.max_by(&:index)
61
+ skip_if @pended_submit_request.blank?,
62
+ 'The PAS client made no successful $submit request during the pended scenario, so there is no pended ' \
63
+ 'response to send a notification about.'
64
+
65
+ if notification_bundle.present?
66
+ assert_valid_json notification_bundle, "Input '#{input_title(:notification_bundle)}' must be valid JSON"
67
+ else
68
+ add_message('info', %(
69
+ No notification body provided in input '#{input_title(:notification_bundle)}'. The notification finalizing
70
+ the pended $submit response will be generated by Inferno from the pended response.
71
+ ))
72
+ end
73
+
74
+ start_notification_job(@pended_submit_request.response_body, :approval, generated_claim_response_uuid,
75
+ resume_test: true)
76
+
77
+ wait(
78
+ identifier: test_run_identifier,
79
+ timeout: Jobs::SendPASSubscriptionNotification::TEST_WAIT_TIMEOUT_SECONDS,
80
+ message: <<~MESSAGE
81
+ **Pended Scenario Test**:
82
+
83
+ Inferno will shortly send a full-resource notification to the endpoint specified in the PAS client's
84
+ Subscription to tell it that a final decision has been made on the pended prior authorization
85
+ request. The tests will continue automatically once the notification has been sent.
86
+ MESSAGE
87
+ )
88
+ end
89
+
90
+ # The id of the ClaimResponse Inferno generated for the pended $submit response, which tells the module to
91
+ # point the notification at it. Nil when the tester provided the response and is responsible for the
92
+ # notification matching it.
93
+ def generated_claim_response_uuid
94
+ return if pended_json_response.present?
95
+
96
+ response_bundle = FHIR.from_contents(@pended_submit_request.response_body)
97
+ claim_response_entry_from_response_bundle(response_bundle)&.fullUrl&.delete_prefix('urn:uuid:')
98
+ end
99
+
100
+ # Helper methods for SubscriptionNotificationTrigger. The job looks up the test run and result once
101
+ # this test is waiting, because they do not exist yet while it runs.
102
+
103
+ def notification_test_run_id
104
+ nil
105
+ end
106
+
107
+ def notification_test_session_id
108
+ test_session_id
109
+ end
110
+
111
+ def notification_result_id
112
+ nil
113
+ end
114
+
115
+ def notification_bearer_token
116
+ client_endpoint_access_token
117
+ end
118
+
119
+ def tester_notification_bundle
120
+ notification_bundle
121
+ end
122
+
123
+ def client_subscription_json
124
+ @subscription_json
125
+ end
126
+
127
+ # Only the job continues this wait, so it uses a fresh random identifier - see SessionIdentification.
128
+ # Memoized because start_notification_job passes it to the job before wait registers it.
129
+ def test_run_identifier
130
+ @test_run_identifier ||= SecureRandom.uuid
131
+ end
132
+
133
+ def ig_version
134
+ 'v2.2.1'
135
+ end
136
+ end
137
+ end
138
+ end