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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3023259fb2f00899ac18554ac2b4a7d37ece5aec114c804f2c175884eeb765d7
4
- data.tar.gz: 3bd995e4a8e71e390772b35d33f37dab1b345f20ffd2bfcbbeb7a470cc6163c6
3
+ metadata.gz: 24ad9d4f5168d8049be8172e27697dae90510d8f9e5da95ccb8fd4ce31d4a70a
4
+ data.tar.gz: bede3f5c28bdbf8952270f5747e085d93000179d3855a723880b7098ad0807a6
5
5
  SHA512:
6
- metadata.gz: 05f64e5a39a2898215643d70384eec54d9d62720537d9816616d3bef344d7abb5738faeab1a34968c6955e00672fe27395d4712a1903652f5e4ad10fa8cc11e0
7
- data.tar.gz: e61bd2cb364ec659dc7559382eada253854e9a1efea9dcbf7e834fc021c5ac425287714823da0af7d393460befe45bab72f2c7727d22082cd49325d6add23698
6
+ metadata.gz: 7836864b3c990f4706fae466b06fa81060a6111e6f847d409a4ea2353aa0a957480aa55be65d463f49bacfbd74563af42975341093d8e5edf3920df700e6256a
7
+ data.tar.gz: c921aa4ea85230461e1b71313db27103995afcc261a7283ae81393b5cd488e3410b4cfee267b5bd36c23ba63b6e95a1be82ddaa2b27eef508b9dacab886427c7
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "Da Vinci BR Provider Reference Implementation",
3
+ "id": "pas_client_v221_run_against_br_provider",
4
+ "test_suite_id": "davinci_pas_client_suite_v221",
5
+ "inputs": [
6
+ {
7
+ "name": "smart_jwk_set",
8
+ "title": "SMART Confidential Asymmetric JSON Web Key Set (JWKS)",
9
+ "type": "textarea",
10
+ "value": "https://br-provider.davinci.hl7.org/api/security/jwks"
11
+ }
12
+ ]
13
+ }
@@ -11,22 +11,19 @@ module DaVinciPASTestKit
11
11
  id :pas_client_approval_submit_test
12
12
  title 'PAS client submits a claim using the $submit operation'
13
13
  description %(
14
- Inferno will wait for a prior authorization submission request
15
- from the client. Upon receipt, Inferno will generate and send a
16
- response with an approved status.
14
+ During this test, Inferno will wait for a prior authorization submission request
15
+ from the PAS client using the `$submit` operation. Upon receipt, Inferno will respond
16
+ with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
17
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
18
+ approval response. Inferno will not respond to `$inquire` operation requests during
19
+ this test.
17
20
  )
18
21
 
19
22
  input :approval_json_response,
20
23
  title: 'Claim approved response JSON',
21
24
  type: 'textarea',
22
25
  optional: true,
23
- description: %(
24
- If provided, this JSON will be sent in response to $submit requests during this test
25
- to indicate that the request has been approved.
26
- It will be updated to make creation timestamps current.
27
- If not provided, an approval response will be generated from the submitted Claim.
28
- In either case, the response will be validated against the PAS Response Bundle profile.
29
- )
26
+ description: DaVinciPASTestKit.user_response_input_description('$submit', 'approved', 'Approval Response')
30
27
  input :client_id,
31
28
  title: 'Client Id',
32
29
  type: 'text',
@@ -41,9 +38,10 @@ module DaVinciPASTestKit
41
38
  description: INPUT_SESSION_URL_PATH_LOCKED
42
39
 
43
40
  submit_respond_with :approval_json_response
41
+ config options: { submit_enabled: true }
44
42
 
45
43
  run do
46
- if user_inputted_response? :approval_json_response
44
+ if user_inputted_response?(:approval_json_response)
47
45
  assert_valid_json approval_json_response,
48
46
  'Input "Claim approved response JSON" must be valid JSON'
49
47
  else
@@ -58,17 +56,30 @@ module DaVinciPASTestKit
58
56
 
59
57
  wait(
60
58
  identifier: wait_identifier,
61
- message: %(
62
- **Approval Workflow Test**:
59
+ message: <<~MESSAGE
60
+ **Approval Scenario Test**:
61
+
62
+ Inferno will wait while the tester uses the PAS client to submit a PAS request to
63
+ Inferno. The tests will automatically continue once a request has been received.
64
+
65
+ ### Endpoints
63
66
 
64
67
  Submit a PAS request to
65
68
 
66
69
  `#{submit_endpoint}`
67
70
 
68
- If the optional '**#{input_title(:approval_json_response)}**' input is populated, it will
69
- be returned, updated with current timestamps. Otherwise, an approval response will
70
- be generated by Inferno using the received Claim.
71
- )
71
+ ### Authentication and Identification
72
+
73
+ #{auth_description_for_wait(client_id)}
74
+
75
+ ### Responses
76
+
77
+ #{response_description_for_wait(user_inputted_response?(:approval_json_response),
78
+ input_title(:approval_json_response),
79
+ '$submit')}
80
+
81
+ Inferno will not respond to `$inquire` requests during this test.
82
+ MESSAGE
72
83
  )
73
84
  end
74
85
  end
@@ -11,22 +11,19 @@ module DaVinciPASTestKit
11
11
  id :pas_client_denial_submit_test
12
12
  title 'PAS client submits a claim using the $submit operation'
13
13
  description %(
14
- Inferno will wait for a prior authorization submission request
15
- from the client. Upon receipt, Inferno will respond with the
16
- provided denial response.
14
+ During this test, Inferno will wait for a prior authorization submission request
15
+ from the PAS client using the `$submit` operation. Upon receipt, Inferno will respond
16
+ with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
17
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
18
+ denial response. Inferno will not respond to `$inquire` operation requests during
19
+ this test.
17
20
  )
18
21
 
19
22
  input :denial_json_response,
20
23
  title: 'Claim denied response JSON',
21
24
  type: 'textarea',
22
25
  optional: true,
23
- description: %(
24
- If provided, this JSON will be sent in response to $submit requests during this test
25
- to indicate that the request has been denied.
26
- It will be updated to make creation timestamps current.
27
- If not provided, a denial response will be generated from the submitted Claim.
28
- In either case, the response will be validated against the PAS Response Bundle profile.
29
- )
26
+ description: DaVinciPASTestKit.user_response_input_description('$submit', 'denied', 'Denial Response')
30
27
  input :client_id,
31
28
  title: 'Client Id',
32
29
  type: 'text',
@@ -40,6 +37,7 @@ module DaVinciPASTestKit
40
37
  locked: true,
41
38
  description: INPUT_SESSION_URL_PATH_LOCKED
42
39
  submit_respond_with :denial_json_response
40
+ config options: { submit_enabled: true }
43
41
 
44
42
  run do
45
43
  if user_inputted_response? :denial_json_response
@@ -57,17 +55,29 @@ module DaVinciPASTestKit
57
55
 
58
56
  wait(
59
57
  identifier: wait_identifier,
60
- message: %(
61
- **Denial Workflow Test**:
58
+ message: <<~MESSAGE
59
+ **Denial Scenario Test**:
60
+
61
+ Inferno will wait while the tester uses the PAS client to submit a PAS request to
62
+ Inferno. The tests will automatically continue once a request has been received.
63
+
64
+ ### Endpoints
62
65
 
63
66
  Submit a PAS request to
64
67
 
65
68
  `#{submit_endpoint}`
66
69
 
67
- If the optional '**#{input_title(:denial_json_response)}**' input is populated, it will
68
- be returned, updated with current timestamps. Otherwise, a denial response will
69
- be generated by Inferno using the received Claim.
70
- )
70
+ ### Authentication and Identification
71
+
72
+ #{auth_description_for_wait(client_id)}
73
+
74
+ ### Responses
75
+
76
+ #{response_description_for_wait(user_inputted_response?(:denial_json_response),
77
+ input_title(:denial_json_response),
78
+ '$submit')}
79
+ Inferno will not respond to `$inquire` requests during this test.
80
+ MESSAGE
71
81
  )
72
82
  end
73
83
  end
@@ -1,30 +1,30 @@
1
1
  require_relative 'client_input_descriptions'
2
2
  require_relative 'session_identification'
3
+ require_relative 'user_input_response'
3
4
 
4
5
  module DaVinciPASTestKit
5
6
  # abstract test, needs to be extended to include a version-specific URLs module
6
7
  class AbstractGatherMustSupportTest < Inferno::Test
7
8
  include SessionIdentification
9
+ include UserInputResponse
8
10
 
9
11
  id :pas_client_gather_must_support
10
12
  title 'PAS client submits Claims using the $submit and $inquire operations to demonstrate coverage of must ' \
11
13
  'support elements'
12
14
  description %(
13
- This test allows the client to send both $submit and $inquire requests for Inferno to evaluate
14
- coverage of must support elements in both requests and responses. Any requests made during
15
- previous workflow tests will also be considered.
15
+ During this test, Inferno will wait while the tester uses the PAS client to make `$submit`
16
+ and `$inquire` operation requests against Inferno demonstrating any request and response
17
+ must support elements not yet demonstrated.
16
18
 
17
19
  Because Inferno's mocked responses do not cover all must support elements, in order to pass
18
20
  these tests testers will need to provide response bundles for Inferno to return when
19
- responding to $submit and $inquire requests. Each response input takes a single entry or a
20
- JSON list of entries, where each entry is either a FHIR Bundle or a wrapper object pairing
21
- a Bundle with selection criteria. For each request, Inferno will respond with the Bundle of
22
- the first entry whose criteria are all met, generating a default response if none match.
23
- See the input descriptions for details on the wrapper format, the supported criteria, and
24
- on substituting values from the request into the returned response.
25
-
26
- This enables testers to verify that their client can handle responses containing all required
27
- must support elements.
21
+ responding to `$submit` and `$inquire` requests. Each response input takes a JSON list of entries,
22
+ where each entry specifies a Bundle with selection criteria ([format](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#response-option-format)).
23
+ For each request received during this test, Inferno will [select](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#response-option-evaluation)
24
+ and [instantiate](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#response-instantiation)
25
+ a response to return from this list. If no entries match or instantiation fails, Inferno will
26
+ [mock](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
27
+ a response.
28
28
  )
29
29
 
30
30
  input :client_id,
@@ -49,7 +49,7 @@ module DaVinciPASTestKit
49
49
  type: 'textarea',
50
50
  optional: true,
51
51
  description: DaVinciPASTestKit.ms_responses_input_description('$inquire')
52
- config options: { accepts_multiple_requests: true }
52
+ config options: { accepts_multiple_requests: true, submit_enabled: true, inquire_enabled: true }
53
53
  output :confirmation_url
54
54
 
55
55
  run do
@@ -61,11 +61,17 @@ module DaVinciPASTestKit
61
61
 
62
62
  wait(
63
63
  identifier: wait_identifier,
64
- message: %(
65
- The client system may now make multiple $submit and $inquire requests before continuing.
66
- These requests should cumulatively demonstrate coverage of all required profiles and all
67
- must support elements within those profiles, as specified by the DaVinci Prior Authorization
68
- Support implementation guide.
64
+ message: <<~MESSAGE
65
+ **Additional Must Support Demonstration**:
66
+
67
+ Inferno will wait while the tester uses the PAS client to make additional $submit and $inquire requests.
68
+ Along with the requests submitted during previous tests, these requests and their responses must
69
+ cumulatively demonstrate coverage of all required profiles and all must support elements within
70
+ those profiles, as specified by the PAS IG.
71
+
72
+ [Click here](#{confirmation_url}) when all requests have been submitted.
73
+
74
+ ### Required Profiles
69
75
 
70
76
  For the $submit operation the required profiles include:
71
77
  - PAS Request Bundle
@@ -95,19 +101,30 @@ module DaVinciPASTestKit
95
101
  - PAS Practitioner
96
102
  - PAS PractitionerRole
97
103
 
98
- If you would like Inferno to respond with specific response bundles (to demonstrate
99
- must support coverage on responses), provide them in the input fields above.
104
+ ### Endpoints
105
+
106
+ Submit PAS requests to
107
+
108
+ - $submit: `#{submit_endpoint}`
109
+ - $inquire: `#{inquire_endpoint}`
110
+
111
+ ### Authentication and Identification
112
+
113
+ #{auth_description_for_wait(client_id)}
100
114
 
101
- Submit PAS $submit requests to
115
+ ### Submit Responses
102
116
 
103
- `#{submit_endpoint}`
117
+ #{response_description_for_wait(user_inputted_response?(:ms_submit_responses),
118
+ input_title(:ms_submit_responses),
119
+ '$submit')}
104
120
 
105
- Submit PAS $inquire requests to
121
+ ### Inquire Responses
106
122
 
107
- `#{inquire_endpoint}`
123
+ #{response_description_for_wait(user_inputted_response?(:ms_inquire_responses),
124
+ input_title(:ms_inquire_responses),
125
+ '$inquire')}
108
126
 
109
- and [click here](#{confirmation_url}) when done.
110
- )
127
+ MESSAGE
111
128
  )
112
129
  end
113
130
  end
@@ -11,25 +11,21 @@ module DaVinciPASTestKit
11
11
  id :pas_client_modification_submit_test
12
12
  title 'PAS client submits a claim using the $submit operation'
13
13
  description %(
14
- Inferno will wait for a prior authorization submission request
15
- from the client. Upon receipt, Inferno will generate and send a
16
- response in which the payer authorizes items that differ from those
17
- that were requested (a "payer modification").
14
+ During this test, Inferno will wait for a prior authorization submission request
15
+ from the PAS client using the `$submit` operation. Upon receipt, Inferno will respond
16
+ with a [tester-provided](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
17
+ or [Inferno-mocked](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
18
+ a response in which the payer authorizes items that differ from those that were
19
+ requested (a "payer modification"). Inferno will not respond to `$inquire`
20
+ operation requests during this test.
18
21
  )
19
22
 
20
23
  input :modification_json_response,
21
24
  title: 'Claim modified response JSON',
22
25
  type: 'textarea',
23
26
  optional: true,
24
- description: %(
25
- If provided, this JSON will be sent in response to $submit requests during this test
26
- to indicate that the payer authorized items that differ from those requested.
27
- It will be updated to make creation timestamps current.
28
- If not provided, a payer modification response will be generated from the submitted Claim,
29
- marking each item as modified (adjudication status A6) and adding a corresponding
30
- `ClaimResponse.addItem` describing what was actually authorized.
31
- In either case, the response will be validated against the PAS Response Bundle profile.
32
- )
27
+ description: DaVinciPASTestKit.user_response_input_description('$submit', 'modified by the payer',
28
+ 'Payer Modifications')
33
29
  input :client_id,
34
30
  title: 'Client Id',
35
31
  type: 'text',
@@ -44,6 +40,7 @@ module DaVinciPASTestKit
44
40
  description: INPUT_SESSION_URL_PATH_LOCKED
45
41
 
46
42
  submit_respond_with :modification_json_response
43
+ config options: { submit_enabled: true }
47
44
 
48
45
  run do
49
46
  if user_inputted_response? :modification_json_response
@@ -61,17 +58,30 @@ module DaVinciPASTestKit
61
58
 
62
59
  wait(
63
60
  identifier: wait_identifier,
64
- message: %(
65
- **Payer Modification Workflow Test**:
61
+ message: <<~MESSAGE
62
+ **Payer Modification Scenario Test**:
63
+
64
+ Inferno will wait while the tester uses the PAS client to submit a PAS request to
65
+ Inferno. The tests will automatically continue once a request has been received.
66
+
67
+ ### Endpoints
66
68
 
67
69
  Submit a PAS request to
68
70
 
69
71
  `#{submit_endpoint}`
70
72
 
71
- If the optional '**#{input_title(:modification_json_response)}**' input is populated, it will
72
- be returned, updated with current timestamps. Otherwise, a payer modification response will
73
- be generated by Inferno using the received Claim.
74
- )
73
+ ### Authentication and Identification
74
+
75
+ #{auth_description_for_wait(client_id)}
76
+
77
+ ### Responses
78
+
79
+ #{response_description_for_wait(user_inputted_response?(:modification_json_response),
80
+ input_title(:modification_json_response),
81
+ '$submit')}
82
+
83
+ Inferno will not respond to `$inquire` requests during this test.
84
+ MESSAGE
75
85
  )
76
86
  end
77
87
  end
@@ -1,12 +1,16 @@
1
+ require_relative 'request_count_gating'
2
+
1
3
  module DaVinciPASTestKit
2
4
  # abstract test, needs to be extended to include a version-specific URLs module
3
5
  class AbstractResponseAttest < Inferno::Test
6
+ include RequestCountGating
7
+
4
8
  id :pas_client_response_attest
5
9
  title 'PAS client reacts appropriately to the response'
6
10
  description %(
7
- This test provides the tester an opportunity to observe their client following
8
- the receipt of response and attest that users are able to see the appropriate
9
- updates to the corresponding prior authorization request in their system.
11
+ During this test, the tester will observe the PAS client following
12
+ the receipt of a response and attest that users are able to see the appropriate
13
+ updates to the corresponding prior authorization request.
10
14
  )
11
15
  attestation
12
16
 
@@ -14,12 +18,23 @@ module DaVinciPASTestKit
14
18
  config.options[:workflow_tag]
15
19
  end
16
20
 
21
+ def operation_tag
22
+ config.options[:operation_tag]
23
+ end
24
+
17
25
  def attest_message
18
26
  config.options[:attest_message]
19
27
  end
20
28
 
29
+ # workflow_tag may be a single tag or an Array of tags (e.g. the Claim Update attest tests,
30
+ # which match requests across several update steps); normalized to an Array so callers don't
31
+ # each need their own is_a?(Array) check.
32
+ def workflow_tags
33
+ Array(workflow_tag)
34
+ end
35
+
21
36
  def workflow_name
22
- case workflow_tag
37
+ case workflow_tags.first
23
38
  when APPROVAL_WORKFLOW_TAG
24
39
  'Approval'
25
40
  when DENIAL_WORKFLOW_TAG
@@ -34,6 +49,33 @@ module DaVinciPASTestKit
34
49
  'Operation Failure'
35
50
  when PROCESSING_ERROR_WORKFLOW_TAG
36
51
  'Processing Error'
52
+ when CLAIM_UPDATE_INITIAL_TAG
53
+ 'Claim Update'
54
+ else
55
+ raise Inferno::Exceptions::TestSuiteImplementationException.new('PAS Display Attestation',
56
+ "No name for workflow tag #{workflow_tag}.")
57
+ end
58
+ end
59
+
60
+ # Tags identifying the requests that gate the attestation, when they aren't the ones tagged with
61
+ # workflow_tag (+ operation_tag) - e.g., the notification Inferno sends to the client.
62
+ def request_tags
63
+ config.options[:request_tags]
64
+ end
65
+
66
+ def target_requests
67
+ return load_tagged_requests(*request_tags) if request_tags.present?
68
+
69
+ workflow_tags.flat_map do |one_workflow_tag|
70
+ load_tagged_requests(*[one_workflow_tag, operation_tag].compact)
71
+ end
72
+ end
73
+
74
+ def unexpected_error_status_message(error_responses)
75
+ if error_responses.any? { |r| r.direction == 'outgoing' }
76
+ 'Skipping attestation: the PAS client did not return a successful response to Inferno\'s request.'
77
+ else
78
+ 'Skipping attestation: Inferno expected to return a successful response, but did not.'
37
79
  end
38
80
  end
39
81
 
@@ -41,7 +83,34 @@ module DaVinciPASTestKit
41
83
  output :attest_false_url
42
84
 
43
85
  run do
44
- identifier = test_session_id
86
+ # check that there are actually requests
87
+ # - skip if none unless there is a config
88
+ # - raise an implementation error if there are more than 1 unless config set (shouldn't ever)
89
+ # - skip if no response has the expected HTTP status (success, or error when error_status_expected)
90
+
91
+ requests = target_requests
92
+ if requests.empty?
93
+ if no_requests_ok?
94
+ pass 'Attestation not needed: no requests received or required for this group.'
95
+ else
96
+ skip "Skipping attestation: No requests made demonstrating the #{workflow_name} scenario."
97
+ end
98
+ elsif requests.length > 1 && !multiple_requests_ok?
99
+ raise Inferno::Exceptions::TestSuiteImplementationException.new(
100
+ 'PAS request tagging',
101
+ "multiple requests tagged with workflow tag #{workflow_tag}."
102
+ )
103
+ else
104
+ success_responses, error_responses = requests.partition { |r| r.status.to_s.start_with?('2') }
105
+ if error_responses.blank? && config.options[:error_status_expected]
106
+ skip 'Skipping attestation: Inferno expected to return a HTTP error response, but did not.'
107
+ elsif success_responses.blank? && !config.options[:error_status_expected]
108
+ skip unexpected_error_status_message(error_responses)
109
+ end
110
+ end
111
+
112
+ # only the tester continues this wait, so use a fresh random identifier - see SessionIdentification
113
+ identifier = SecureRandom.uuid
45
114
  attest_true_url = "#{resume_pass_url}?token=#{identifier}"
46
115
  output(attest_true_url:)
47
116
  attest_false_url = "#{resume_fail_url}?token=#{identifier}"
@@ -50,7 +119,7 @@ module DaVinciPASTestKit
50
119
  wait(
51
120
  identifier:,
52
121
  message: %(
53
- **#{workflow_name} Workflow Test**:
122
+ **#{workflow_name} Scenario Test**:
54
123
 
55
124
  #{attest_message}
56
125
 
@@ -9,7 +9,7 @@ module DaVinciPASTestKit
9
9
  id :pas_client_subscription_create_test
10
10
  title 'PAS client submits a Subscription creation request'
11
11
  description %(
12
- Inferno will wait for a Subscription creation request
12
+ During this test, Inferno will wait for a Subscription creation request
13
13
  and then perform a handshake to activate the Subscription.
14
14
  )
15
15
 
@@ -29,9 +29,9 @@ module DaVinciPASTestKit
29
29
  optional: true,
30
30
  title: 'Client Notification Access Token',
31
31
  description: %(
32
- The bearer token that Inferno will send on requests to the client under test's rest-hook notification
33
- endpoint, including handshake notifications sent after Subscription creation. Not needed if the client
34
- under test will create a Subscription with an appropriate header value in the `channel.header` element.
32
+ The bearer token that Inferno will send on requests to the PAS client's rest-hook notification
33
+ endpoint, including handshake notifications sent after Subscription creation. Not needed if the PAS client
34
+ will create a Subscription with an appropriate header value in the `channel.header` element.
35
35
  If a value for the `authorization` header is provided in `channel.header`, this value will override it.
36
36
  )
37
37
 
@@ -41,16 +41,33 @@ module DaVinciPASTestKit
41
41
 
42
42
  wait(
43
43
  identifier: wait_identifier,
44
- message: %(
44
+ message: <<~MESSAGE
45
45
  **Subscription Creation Test**:
46
46
 
47
- Submit a POST with a Subscription to:
47
+ Inferno will wait while the tester uses the PAS client to create a Subscription on
48
+ Inferno's simulated payer server. Inferno [will not accept all Subscriptions](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Subscriptions-and-Notifications#subscription-validation)
49
+ but a Subscription does not need to be fully conformant to be accepted.
50
+
51
+ After accepting a Subscription, Inferno will send a handshake notification
52
+ to the specified `channel.endpoint` and continue automatically.
53
+
54
+ ### Endpoints
55
+
56
+ Submit a POST with a Subscription to
48
57
 
49
58
  `#{subscription_endpoint}`
50
59
 
51
- Upon receipt, Inferno will send a handshake request to verify that notifications can be
52
- delivered and continue the test with a pass or fail based on the result.
53
- )
60
+ ### Authentication and Identification
61
+
62
+ #{auth_description_for_wait(client_id)}
63
+
64
+ ### Responses and Handshake Notifications
65
+
66
+ The PAS Test Kit wiki contains details on the supported responses and
67
+ notifications that the PAS client can expect to receive during these tests:
68
+ - [Subscription creation responses](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Subscriptions-and-Notifications#creation-response)
69
+ - [Handshake notification](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Subscriptions-and-Notifications#handshake-notification)
70
+ MESSAGE
54
71
  )
55
72
  end
56
73
  end
@@ -0,0 +1,91 @@
1
+ require_relative 'client_input_descriptions'
2
+ require_relative 'session_identification'
3
+ require_relative 'subscription_setup_requirement'
4
+
5
+ module DaVinciPASTestKit
6
+ # abstract test, needs to be extended to include a version-specific URLs module
7
+ class AbstractSubscriptionUpdateDeleteTest < Inferno::Test
8
+ include SessionIdentification
9
+ include SubscriptionSetupRequirement
10
+
11
+ id :pas_client_subscription_update_delete_test
12
+ title 'PAS client submits Subscription update and deletion requests'
13
+ description %(
14
+ During this test, Inferno will wait for Subscription update and deletion requests
15
+ for the PAS Subscription created during the "Subscription Setup" group.
16
+
17
+ Additional notes:
18
+ - Updated Subscriptions must meet PAS Subscription requirements.
19
+ - Inferno will not send additional notifications or handshakes based on the updated Subscription.
20
+ - Inferno will modify the `Subscription.channel.payload` value on the updated Subscription to
21
+ `application/fhir+json` unless it is `application/json`.
22
+ - Inferno manages the `Subscription.status` value and will ignore requested changes to it, unless
23
+ the requested status is `off`.
24
+ - Inferno only accepts updates and deletes of the Subscription while this test is waiting.
25
+ - Each run of this test starts from the Subscription as created during the "Subscription Setup"
26
+ group. Changes made during earlier runs of this test, including deletion, are not carried over.
27
+ )
28
+
29
+ input :client_id,
30
+ title: 'Client Id',
31
+ type: 'text',
32
+ optional: true,
33
+ locked: true,
34
+ description: INPUT_CLIENT_ID_LOCKED
35
+ input :session_url_path,
36
+ title: 'Session-specific URL path extension',
37
+ type: 'text',
38
+ optional: true,
39
+ locked: true,
40
+ description: INPUT_SESSION_URL_PATH_LOCKED
41
+ output :confirmation_url
42
+
43
+ config options: { accepts_subscription_changes: true }
44
+
45
+ run do
46
+ subscription_id = require_created_subscription(skip_message: UPDATE_DELETE_SKIP_MESSAGE)['id']
47
+
48
+ wait_identifier = session_wait_identifier(client_id, session_url_path)
49
+ subscription_endpoint = session_endpoint_url(:subscription, client_id, session_url_path)
50
+ confirmation_url = "#{resume_pass_url}?token=#{wait_identifier}"
51
+ output(confirmation_url:)
52
+
53
+ wait(
54
+ identifier: wait_identifier,
55
+ message: <<~MESSAGE
56
+ **Subscription Update and Deletion Tests**:
57
+
58
+ Inferno will wait while the tester uses the PAS client to update and delete the PAS
59
+ Subscription created earlier in these tests. Updated Subscriptions must continue to meet
60
+ [Inferno](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Subscriptions-and-Notifications#subscription-validation)
61
+ and PAS Subscription requirements, but Inferno will not use the updated Subscription to deliver
62
+ notifications, including updated handshakes.
63
+
64
+ [Click here](#{confirmation_url}) when all requests have been submitted.
65
+
66
+ ### Endpoints
67
+
68
+ Submit [update](https://hl7.org/fhir/R4/http.html#update) (PUT) and
69
+ [delete](https://hl7.org/fhir/R4/http.html#delete) (DELETE) interaction
70
+ requests for the Subscription with id `#{subscription_id}` to:
71
+
72
+ `#{subscription_endpoint}/#{subscription_id}`
73
+
74
+ Inferno will also respond to [read](https://hl7.org/fhir/R4/http.html#read) (GET)
75
+ interactions and `$status` operation calls for this Subscription.
76
+
77
+ ### Authentication and Identification
78
+
79
+ #{auth_description_for_wait(client_id)}
80
+
81
+ ### Responses
82
+
83
+ The PAS Test Kit wiki contains details on the supported responses
84
+ that the PAS client can expect to receive during these tests:
85
+ - [Subscription update responses](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Subscriptions-and-Notifications#update-response)
86
+ - [Subscription deletion responses](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Subscriptions-and-Notifications#deletion-response)
87
+ MESSAGE
88
+ )
89
+ end
90
+ end
91
+ end