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
@@ -11,16 +11,20 @@ module DaVinciPASTestKit
11
11
  id :pas_client_v221_processing_error_response_validation_test
12
12
  title '$submit response Bundle has the correct structure and contains error entries'
13
13
  description %(
14
- This test verifies input provided by the tester instead of the system under test.
14
+ This test verifies input provided by the tester instead of the PAS client.
15
15
  Errors encountered will be treated as a skip instead of a failure.
16
16
 
17
17
  This test verifies the conformity of the PAS Response Bundle returned by Inferno during the
18
- Processing Error workflow. The bundle is validated against the
18
+ Processing Error scenario. The bundle is validated against the
19
19
  [PAS Response Bundle](https://hl7.org/fhir/us/davinci-pas/2.2.1/StructureDefinition-profile-pas-response-bundle.html)
20
20
  profile. Additionally, it checks that the ClaimResponse contains at least one error entry,
21
21
  as required by the processing error scenario.
22
22
 
23
- Per IG §7.2.5, business errors that are a part of processing the 278 payload are
23
+ To ensure that the PAS client is driving its behavior only based on standard
24
+ PAS information, custom extensions are not allowed within the response.
25
+
26
+ The PAS IG [requires](https://hl7.org/fhir/us/davinci-pas/2.2.1/en/specification.html#prior-authorization-transaction-error-handling)
27
+ that business errors that are a part of processing the 278 payload are
24
28
  represented in the mapping to the response bundle via the ClaimResponse error capability.
25
29
  )
26
30
  simulation_verification
@@ -33,17 +37,22 @@ module DaVinciPASTestKit
33
37
  response_body = request.response_body
34
38
  skip_if response_body.blank?, 'The Processing Error response body is empty.'
35
39
 
36
- validate_pas_bundle_json(
37
- response_body,
38
- 'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-response-bundle',
39
- '2.2.1',
40
- 'submit',
41
- 'response_bundle',
42
- skips: true,
43
- message: "Invalid processing error response bundle provided in 'Processing Error Response Bundle JSON' input:"
44
- )
40
+ message = "Invalid processing error response bundle provided in 'Processing Error Response Bundle JSON' input:"
41
+ begin
42
+ JSON.parse(response_body)
43
+ rescue JSON::ParserError, TypeError
44
+ skip "#{message} Invalid JSON.".strip
45
+ end
45
46
 
46
47
  bundle = FHIR.from_contents(response_body)
48
+ skip_if !bundle.is_a?(FHIR::Bundle),
49
+ "#{message} Unexpected resource type: expected Bundle, but received #{bundle&.resourceType}.".strip
50
+
51
+ messages.concat(perform_no_custom_extensions_validation(bundle, 'submit', 'response', '2.2.1',
52
+ echoed_from: request.request_body))
53
+ skip_if error_messages?,
54
+ "#{message} Bundle and/or entry resources are not conformant. Check messages for issues found.".strip
55
+
47
56
  claim_response = bundle&.entry&.find { |e| e&.resource&.resourceType == 'ClaimResponse' }&.resource
48
57
  skip_if claim_response&.error.blank?,
49
58
  'The ClaimResponse in the Processing Error response bundle contains no error entries. ' \
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
14
14
  id :pas_client_v221_processing_error_submit_test
15
15
  title 'PAS client submits a claim and receives a response containing processing errors'
16
16
  description %(
17
- Inferno will wait for a prior authorization submission request from the client.
17
+ During this test, Inferno will wait for a prior authorization submission request from the PAS client.
18
18
  Upon receipt, Inferno will return the provided response bundle containing one or
19
19
  more ClaimResponse.error entries.
20
20
  )
@@ -23,8 +23,10 @@ module DaVinciPASTestKit
23
23
  title: 'Processing Error Response Bundle JSON',
24
24
  type: 'textarea',
25
25
  description: %(
26
- Inferno will return this PAS Response Bundle JSON in response to the $submit request
27
- during this test. The bundle must contain at least one ClaimResponse.error entry.
26
+ Inferno will [instantiate](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#response-instantiation)
27
+ this PAS Response Bundle JSON and return it as the response
28
+ to the `$submit` request received during the *Processing Errors* group.
29
+ The bundle must contain at least one ClaimResponse.error entry.
28
30
  )
29
31
  input :client_id,
30
32
  title: 'Client Id',
@@ -40,6 +42,7 @@ module DaVinciPASTestKit
40
42
  description: INPUT_SESSION_URL_PATH_LOCKED
41
43
 
42
44
  submit_respond_with :processing_error_response
45
+ config options: { submit_enabled: true }
43
46
 
44
47
  run do
45
48
  assert_valid_json processing_error_response,
@@ -50,16 +53,24 @@ module DaVinciPASTestKit
50
53
 
51
54
  wait(
52
55
  identifier: wait_identifier,
53
- message: %(
54
- **Processing Error Workflow Test**:
56
+ message: <<~MESSAGE
57
+ **Processing Error Scenario Test**:
58
+
59
+ Inferno will wait while the tester uses the PAS client to submit a PAS request to
60
+ Inferno. Inferno will [instantiate](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Controlling-Simulated-Responses#response-instantiation)
61
+ the provided Processing Error Response Bundle and respond with it.
62
+ The tests will automatically continue once a request has been received.
63
+
64
+ ### Endpoints
55
65
 
56
66
  Submit a PAS request to
57
67
 
58
68
  `#{submit_endpoint}`
59
69
 
60
- Inferno will respond with the provided PAS Response Bundle containing
61
- ClaimResponse.error entries.
62
- )
70
+ ### Authentication and Identification
71
+
72
+ #{auth_description_for_wait(client_id)}
73
+ MESSAGE
63
74
  )
64
75
  end
65
76
  end
@@ -5,10 +5,10 @@ module DaVinciPASTestKit
5
5
  module DaVinciPASV221
6
6
  # Aggregates the must support assessment across a list of profiles. Each must support element
7
7
  # that was not observed is logged as an info message, and when at least one was not observed the
8
- # tester is given the opportunity to attest that the client system does not collect that data
9
- # (and is not required to under the PAS implementation guide). A true attestation passes the
10
- # test; a false attestation fails it. When every must support element was observed, the test
11
- # passes without requiring any further input.
8
+ # tester is asked to attest that the PAS client does not collect that data. A true attestation
9
+ # passes the test; a false attestation fails it. The attestation option can be disabled
10
+ # using a config entry. When every must support element was observed, the
11
+ # test passes without requiring any further input.
12
12
  #
13
13
  # The must support assessment - including the shared X12 / DataAbsentReason false-positive
14
14
  # handling (remove_must_support_false_positives) is leveraged from the cross_suite must support
@@ -17,22 +17,27 @@ module DaVinciPASTestKit
17
17
  include URLs
18
18
 
19
19
  id :pas_client_v221_must_support_with_attestation_option
20
+
21
+ # Recorded in place of a profile's unobserved elements when none of its instances were observed
22
+ # - see gather_unobserved_elements.
23
+ NO_INSTANCES_OBSERVED = :no_instances_observed
20
24
  title 'Must support elements are observed across requests'
21
25
  description %(
22
- This test reviews the must support elements observed across the listed profiles in the
23
- requests made by the client. If any were not observed, the tester has the opportunity to
24
- attest that the client system does not collect that data (and is not required to under the
25
- PAS implementation guide).
26
+ During this test, Inferno will check that all must support elements defined in the listed
27
+ profiles were observed in the requests made by the PAS client.
26
28
  )
27
29
 
28
30
  # config.options:
29
- # profiles: Array of { resource_type:, profile_key:, title: } describing the profiles
30
- # to assess.
31
- # require_one_of: Boolean. When true, at least one of the listed resource types must be
32
- # present (a hard requirement) and only the profiles that are actually
33
- # present are assessed - used for the "at least one request profile" case.
34
- # When false, every listed profile is assessed.
35
- # ig_version:, type: ('request'), operation: ('submit' / 'inquire')
31
+ # profiles: Array of { resource_type:, profile_key:, title: } describing the profiles
32
+ # to assess.
33
+ # require_one_of: Boolean. When true, at least one of the listed resource types must be
34
+ # present (a hard requirement) and only the profiles that are actually
35
+ # present are assessed - used for the "at least one request profile" case.
36
+ # When false, every listed profile is assessed.
37
+ # ig_version: version of the id
38
+ # type: 'request', or 'response'
39
+ # operation: 'submit', or 'inquire'
40
+ # disable_attestation: boolean indicating whether the attestation option is disabled (default: false)
36
41
  def profiles
37
42
  config.options[:profiles]
38
43
  end
@@ -53,6 +58,10 @@ module DaVinciPASTestKit
53
58
  config.options[:operation]
54
59
  end
55
60
 
61
+ def attestation_disabled?
62
+ config.options[:disable_attestation]
63
+ end
64
+
56
65
  def target_resource_types
57
66
  @target_resource_types ||= profiles.map { |profile| profile[:resource_type] }.uniq
58
67
  end
@@ -89,37 +98,44 @@ module DaVinciPASTestKit
89
98
  unobserved_by_profile = gather_unobserved_elements
90
99
 
91
100
  unobserved_by_profile.each do |profile_title, elements|
101
+ if elements == NO_INSTANCES_OBSERVED
102
+ add_message('info', "No instances of profile #{profile_title} were observed.")
103
+ next
104
+ end
105
+
92
106
  elements.each do |element|
93
107
  add_message('info', "Unobserved must support element for profile #{profile_title}: #{element}")
94
108
  end
95
109
  end
96
110
 
97
111
  # If nothing was unobserved, the test passes immediately without requiring any attestation.
98
- # Otherwise, the tester is given the opportunity to attest that the client system does not collect
99
- pass 'All must support elements were observed in the requests made by the client.' if
100
- unobserved_by_profile.empty?
112
+ # Otherwise, the tester can attest that the client system does not collect, unless disabled
113
+ pass all_observed_message if unobserved_by_profile.empty?
114
+ assert !attestation_disabled?, missing_elements_error_string(unobserved_by_profile)
101
115
 
102
- identifier = test_session_id
116
+ # only the tester continues this wait, so use a fresh random identifier - see SessionIdentification
117
+ identifier = SecureRandom.uuid
103
118
  output attest_true_url: "#{resume_pass_url}?token=#{identifier}",
104
119
  attest_false_url: "#{resume_fail_url}?token=#{identifier}"
105
120
 
106
121
  wait(identifier:, message: attestation_message(unobserved_by_profile))
107
122
  end
108
123
 
109
- # @return unobserved must support elements keyed by profile title
124
+ # @return [Hash{String => Array<String>, Symbol}] unobserved must support elements keyed by profile
125
+ # title, or NO_INSTANCES_OBSERVED for a profile with no instances at all.
110
126
  def gather_unobserved_elements
111
127
  profiles.each_with_object({}) do |profile, result|
112
- profile_title = profile[:title] || profile[:resource_type]
128
+ profile_title = profile_title(profile)
113
129
  resources = grouped_resources[profile[:resource_type]] || []
114
130
 
115
131
  if resources.blank?
116
132
  # In require_one_of mode the tester only needs to demonstrate one of the alternatives,
117
133
  # so a profile with no instances is not flagged. Otherwise, the absence of any instance
118
134
  # means the profile's must support elements could not be observed at all - flag the
119
- # resource type itself rather than enumerating every element.
135
+ # profile itself rather than enumerating every element.
120
136
  next if require_one_of
121
137
 
122
- result[profile_title] = ["(no #{profile[:resource_type]} instances were observed)"]
138
+ result[profile_title] = NO_INSTANCES_OBSERVED
123
139
  next
124
140
  end
125
141
 
@@ -131,23 +147,51 @@ module DaVinciPASTestKit
131
147
  end
132
148
  end
133
149
 
150
+ def profile_title(profile)
151
+ profile[:title] || profile[:resource_type]
152
+ end
153
+
154
+ # Titles of the configured profiles whose resource type has instances in the requests.
155
+ def observed_profile_titles
156
+ profiles.select { |profile| grouped_resources[profile[:resource_type]].present? }
157
+ .map { |profile| profile_title(profile) }
158
+ end
159
+
160
+ def missing_elements_error_string(unobserved_by_profile)
161
+ unobserved_by_profile.map do |profile_title, elements|
162
+ if elements == NO_INSTANCES_OBSERVED
163
+ "No #{profile_title} resources were observed."
164
+ else
165
+ "Could not find #{elements.join(', ')} in the provided #{profile_title} resource(s)."
166
+ end
167
+ end.join(' ')
168
+ end
169
+
170
+ # Names the profiles with instances in the requests so testers can tell which were assessed.
171
+ def all_observed_message
172
+ 'All must support elements for the following profiles were observed ' \
173
+ "in the requests made by the PAS client: #{observed_profile_titles.join(', ')}."
174
+ end
175
+
134
176
  def attestation_message(unobserved_by_profile)
135
177
  unobserved_list = unobserved_by_profile.flat_map do |profile_title, elements|
178
+ next ["- #{profile_title}: no instances were observed"] if elements == NO_INSTANCES_OBSERVED
179
+
136
180
  elements.map { |element| "- #{profile_title}: #{element}" }
137
181
  end.join("\n")
138
182
 
139
183
  <<~MESSAGE
140
184
  The following #{operation} request must support elements were not observed in the
141
- requests made by the client:
185
+ requests made by the PAS client:
142
186
 
143
187
  #{unobserved_list}
144
188
 
145
- Attest that the client system does **not** collect the data for these unobserved
189
+ Attest that the PAS client does **not** collect the data for these unobserved
146
190
  must support elements (and is not required to under the PAS implementation guide).
147
191
 
148
- [Click here](#{attest_true_url}) if the above statement is **true**. The test will **pass**.
192
+ [Click here](#{attest_true_url}) if the above statement is **true**.
149
193
 
150
- [Click here](#{attest_false_url}) if the above statement is **false**. The test will **fail**.
194
+ [Click here](#{attest_false_url}) if the above statement is **false**.
151
195
  MESSAGE
152
196
  end
153
197
 
@@ -162,13 +206,19 @@ module DaVinciPASTestKit
162
206
  "### #{profile[:title] || profile[:resource_type]}\n#{metadata.must_support_list_string(indent: 0)}"
163
207
  end.join("\n\n")
164
208
 
165
- "#{description_intro(require_one_of: options[:require_one_of])}\n\n#{sections}"
209
+ intro = description_intro(require_one_of: options[:require_one_of],
210
+ attestation_allowed: !options[:disable_attestation])
211
+ "#{intro}\n\n#{sections}"
166
212
  end
167
213
 
168
214
  # The require_one_of intro reproduces the original PasClientMustSupportRequestProfilesTest
169
- # description, tweaked only to describe the attestation option.
170
- def self.description_intro(require_one_of:)
215
+ # description, tweaked only to describe the attestation option when attestation is allowed.
216
+ def self.description_intro(require_one_of:, attestation_allowed: true)
171
217
  if require_one_of
218
+ attestation_note = if attestation_allowed
219
+ ' For must support elements not observed on an included request profile, ' \
220
+ 'testers can attest that they are not supported by the PAS client.'
221
+ end
172
222
  <<~INTRO.chomp
173
223
  The PAS IG includes four profiles for providing the specifics of the service or product requested
174
224
  in the prior authorization request. Any one of these profiles can be referenced in
@@ -179,28 +229,28 @@ module DaVinciPASTestKit
179
229
  * PAS Device Request
180
230
  * PAS Nutrition Order
181
231
 
182
- System are allowed to support only the request profiles that fit their use cases. However,
232
+ PAS clients are allowed to support only the request profiles that fit their use cases. However,
183
233
  they must support at least one of them (because `Claim.item.extension:requestedService` is a
184
234
  must support element) and for any request profiles they support, they must be able to
185
- populate all of the defined must support elements as long as that data is collected within
186
- and displayed by the system.
235
+ populate all of the defined must support elements.
187
236
 
188
237
  This test ensures that the submitted request bundles include at least one instance of a
189
238
  profile listed above. Then for each profile observed, it checks for the presence of
190
- each must support element defined in that profile. For must support elements not observed
191
- on an included request profile, testers can attest that they are not supported by the
192
- client system.
239
+ each must support element defined in that profile.#{attestation_note}
193
240
 
194
- The test will look through the instances included in submissions made by the client
241
+ The test will look through the instances included in submissions made by the PAS client
195
242
  for the following must support elements:
196
243
  INTRO
197
244
  else
245
+ attestation_note = if attestation_allowed
246
+ ' For those not observed, testers can attest that they are not supported ' \
247
+ 'by the PAS client.'
248
+ end
198
249
  <<~INTRO.chomp
199
- PAS client systems are required to be able to populate must support elements representing
250
+ PAS clients are required to be able to populate must support elements representing
200
251
  data collected and displayed to users on instances of all profiles included in requests.
201
252
  This test checks all identified instances of the profiles listed below within requests sent
202
- by the client to ensure that the must support elements are observed. For those not observed,
203
- testers can attest that they are not supported by the client system.
253
+ by the PAS client to ensure that the must support elements are observed.#{attestation_note}
204
254
  INTRO
205
255
  end
206
256
  end
@@ -8,33 +8,34 @@ module DaVinciPASTestKit
8
8
  module DaVinciPASV221
9
9
  class PASClientApprovalGroup < Inferno::TestGroup
10
10
  id :pas_client_v221_approval_group
11
- title 'Approval Workflow'
11
+ title 'Approval Response'
12
12
  description %(
13
- During these tests, the client will initiate a prior authorization
14
- request and show it can respond appropriately to an 'approved' decision.
13
+ During these tests, the PAS client will initiate a prior authorization
14
+ request and show it can react appropriately to an 'approved' decision.
15
15
  )
16
16
  run_as_group
17
17
 
18
18
  input :approval_json_response, optional: true
19
19
 
20
20
  test from: :pas_client_v221_approval_submit_test
21
- test from: :pas_client_v221_request_bundle_validation_test,
22
- config: { options: { workflow_tag: APPROVAL_WORKFLOW_TAG } }
23
-
24
- test from: :pas_client_v221_response_bundle_validation_test,
25
- config: { options: { workflow_tag: APPROVAL_WORKFLOW_TAG } }
26
21
  test from: :pas_client_v221_response_attest,
27
22
  title: 'PAS client displays the request as "approved"',
28
23
  description: %(
29
- This test provides the tester an opportunity to observe their client following
24
+ During this test, the tester will observe the PAS client following
30
25
  the receipt of the approved response and attest that users are able to determine
31
26
  that the response has been approved.
32
27
  ),
33
28
  config: { options: {
34
29
  workflow_tag: APPROVAL_WORKFLOW_TAG,
35
- attest_message: "I attest that the client system displays the submitted claim as 'approved' meaning " \
36
- 'that the user can proceed with ordering or providing the requested service.'
30
+ operation_tag: SUBMIT_TAG,
31
+ attest_message: 'I attest that the PAS client did not error when handling the `$submit` ' \
32
+ "response and displays the submitted claim as 'approved' meaning that the " \
33
+ 'user can proceed with ordering or providing the requested service.'
37
34
  } }
35
+ test from: :pas_client_v221_request_bundle_validation_test,
36
+ config: { options: { workflow_tag: APPROVAL_WORKFLOW_TAG } }
37
+ test from: :pas_client_v221_response_bundle_validation_test,
38
+ config: { options: { workflow_tag: APPROVAL_WORKFLOW_TAG } }
38
39
  end
39
40
  end
40
41
  end
@@ -0,0 +1,32 @@
1
+ require_relative 'attestations/attestation_instructions'
2
+ require_relative 'attestations/client_security_attestation_test'
3
+ require_relative 'attestations/client_data_element_expectations_attestation_test'
4
+ require_relative 'attestations/client_provider_review_attestation_test'
5
+ require_relative 'attestations/client_subscription_error_recovery_attestation_test'
6
+
7
+ module DaVinciPASTestKit
8
+ module DaVinciPASV221
9
+ class PASClientAttestationsGroup < Inferno::TestGroup
10
+ id :pas_client_v221_attestations
11
+ title 'Visual Inspection and Attestation'
12
+ description %(
13
+ Each test in this group asks the tester to confirm system conformance to one or more
14
+ requirements from the [PAS v2.2.1 Implementation Guide](https://hl7.org/fhir/us/davinci-pas/2.2.1).
15
+ The tester attests that the PAS client meets the statement by selecting "Yes",
16
+ and may record supporting details in the accompanying notes field. Selecting "No" fails the
17
+ test. Notes provided are recorded in the test result.
18
+
19
+ Testers are responsible for confirming that their PAS client meets all requirements associated with a test
20
+ before selecting "Yes" on the attestation input with the same name as the test. The text of the
21
+ attested requirement(s) for each input can be reviewed by clicking the "View Specification Requirements" link
22
+ in the "About" tab of the test with the same name.
23
+ )
24
+ input_instructions ATTESTATION_INPUT_INSTRUCTIONS
25
+
26
+ test from: :pas_client_v221_security_attestation
27
+ test from: :pas_client_v221_data_element_expectations_attestation
28
+ test from: :pas_client_v221_provider_review_attestation
29
+ test from: :pas_client_v221_subscription_error_recovery_attestation
30
+ end
31
+ end
32
+ end
@@ -7,13 +7,13 @@ module DaVinciPASTestKit
7
7
  id :pas_client_v221_auth_smart
8
8
  title 'Review Authentication Interactions'
9
9
  description %(
10
- During these tests, Inferno will verify that the client interacted with Inferno's
10
+ During these tests, Inferno will verify that the PAS client interacted with Inferno's
11
11
  simulated SMART authorization server in a conformant manner when requesting access tokens
12
- and that the client under test was able to use provided access tokens to make PAS
12
+ and that the PAS client was able to use provided access tokens to make PAS
13
13
  requests.
14
14
 
15
- Before running these tests, execute the tests for at least one "PAS workflows" sub-group
16
- so that the client will request an access token and use it on a PAS request.
15
+ Before running these tests, execute the tests for at least one "PAS Scenarios" sub-group
16
+ so that the PAS client will request an access token and use it on a PAS request.
17
17
  )
18
18
  run_as_group
19
19
 
@@ -7,13 +7,13 @@ module DaVinciPASTestKit
7
7
  id :pas_client_v221_auth_udap
8
8
  title 'Review UDAP Authentication Interactions'
9
9
  description %(
10
- During these tests, Inferno will verify that the client interacted with Inferno's
10
+ During these tests, Inferno will verify that the PAS client interacted with Inferno's
11
11
  simulated UDAP authorization server in a conformant manner when requesting access tokens
12
- and that the client under test was able to use provided access tokens to make PAS
12
+ and that the PAS client was able to use provided access tokens to make PAS
13
13
  requests.
14
14
 
15
- Before running these tests, execute the tests for at least one "PAS workflows" sub-group
16
- so that the client will request an access token and use it on a PAS request.
15
+ Before running these tests, execute the tests for at least one "PAS Scenarios" sub-group
16
+ so that the PAS client will request an access token and use it on a PAS request.
17
17
  )
18
18
  run_as_group
19
19
 
@@ -17,12 +17,12 @@ module DaVinciPASTestKit
17
17
  id :pas_client_v221_claim_updates_group
18
18
  title 'Claim Updates'
19
19
  description %(
20
- During these tests, the client will demonstrate that it can update a previously submitted
20
+ During these tests, the PAS client will demonstrate that it can update a previously submitted
21
21
  prior authorization request by submitting a sequence of `$submit` requests: an initial
22
22
  request, an update that adds an item, an update that modifies one item and cancels another,
23
23
  and an update that cancels the entire request.
24
24
 
25
- Inferno waits for each submission in turn, automatically continuing once it receives the
25
+ Inferno will wait for each submission in turn, automatically continuing once it receives the
26
26
  request. Inferno never sends a Subscription notification during these interactions, even if
27
27
  the configured response indicates the request was pended.
28
28
 
@@ -61,17 +61,35 @@ module DaVinciPASTestKit
61
61
  group do
62
62
  title 'Interaction'
63
63
  description %(
64
- Inferno waits for each prior authorization submission from the client in turn. Each wait test
65
- auto-continues when its request is received; no Subscription notifications are triggered.
64
+ During each test in this group, Inferno will wait for a prior authorization submission
65
+ from the PAS client. Each test will continue automatically when a request is received.
66
+ No Subscription notifications are triggered even if the tester provides pended responses.
66
67
  )
67
68
 
68
69
  claim_update_submit_steps.each { |step| test from: step[:submit] }
70
+ test from: :pas_client_v221_response_attest,
71
+ id: :pas_client_v221_response_attest_updates,
72
+ title: 'PAS client handled the $submit responses without erroring',
73
+ description: %(
74
+ During this test, the tester will verify that the PAS client handled
75
+ the `$submit` operation responses received during the update
76
+ sequence, making the result available to the user without failing
77
+ or erroring.
78
+ ),
79
+ config: { options: {
80
+ workflow_tag: [CLAIM_UPDATE_INITIAL_TAG, CLAIM_UPDATE_ADD_ITEM_TAG,
81
+ CLAIM_UPDATE_MODIFY_CANCEL_TAG, CLAIM_UPDATE_CANCEL_ALL_TAG],
82
+ multiple_requests_ok: true,
83
+ attest_message: 'I attest that the PAS client correctly handled the `$submit` ' \
84
+ 'operation responses received from Inferno during this test, making the details ' \
85
+ 'available to users without errors.'
86
+ } }
69
87
  end
70
88
 
71
89
  group do
72
90
  title 'Update Details'
73
91
  description %(
74
- These tests check that the sequence of requests made follow the
92
+ The tests in this group check that the sequence of requests made follow the
75
93
  update approach required.
76
94
  )
77
95
 
@@ -89,7 +107,7 @@ module DaVinciPASTestKit
89
107
  title '$submit Conformance'
90
108
  description %(
91
109
  For each submission received above, these tests validate the conformance of the request Bundle
92
- the client submitted and of the response Bundle Inferno returned against the PAS Request and
110
+ the PAS client submitted and of the response Bundle Inferno returned against the PAS Request and
93
111
  Response Bundle profiles.
94
112
  )
95
113
 
@@ -11,10 +11,10 @@ module DaVinciPASTestKit
11
11
  include UserInputResponse
12
12
 
13
13
  id :pas_client_v221_denial_group
14
- title 'Denial Workflow'
14
+ title 'Denial Response'
15
15
  description %(
16
- During these tests, the client will initiate a prior authorization
17
- request and show it can respond appropriately to a 'denied' decision.
16
+ During these tests, the PAS client will initiate a prior authorization
17
+ request and show it can react appropriately to a 'denied' decision.
18
18
  )
19
19
  run_as_group
20
20
 
@@ -25,23 +25,25 @@ module DaVinciPASTestKit
25
25
  :session_url_path
26
26
 
27
27
  test from: :pas_client_v221_denial_submit_test
28
- test from: :pas_client_v221_request_bundle_validation_test,
29
- config: { options: { workflow_tag: DENIAL_WORKFLOW_TAG } }
30
- test from: :pas_client_v221_response_bundle_validation_test,
31
- config: { options: { workflow_tag: DENIAL_WORKFLOW_TAG } }
32
28
  test from: :pas_client_v221_response_attest,
33
29
  title: 'PAS client displays the request as "denied"',
34
30
  description: %(
35
- This test provides the tester an opportunity to observe their client following
31
+ During this test, the tester will observe the PAS client following
36
32
  the receipt of the denied response and attest that users are able to determine
37
33
  that the response has been denied.
38
34
  ),
39
35
  config: { options: {
40
36
  workflow_tag: DENIAL_WORKFLOW_TAG,
41
- attest_message: "I attest that the client system displays the submitted claim as 'denied', meaning " \
37
+ operation_tag: SUBMIT_TAG,
38
+ attest_message: 'I attest that the PAS client did not error when handling the `$submit` ' \
39
+ "response and displays the submitted claim as 'denied', meaning " \
42
40
  'that the user cannot proceed with ordering or providing the requested service without ' \
43
- 'making adjustments and submitting for further approval.'
41
+ 'making adjustments and submitting for further review.'
44
42
  } }
43
+ test from: :pas_client_v221_request_bundle_validation_test,
44
+ config: { options: { workflow_tag: DENIAL_WORKFLOW_TAG } }
45
+ test from: :pas_client_v221_response_bundle_validation_test,
46
+ config: { options: { workflow_tag: DENIAL_WORKFLOW_TAG } }
45
47
  end
46
48
  end
47
49
  end
@@ -11,15 +11,15 @@ module DaVinciPASTestKit
11
11
  id :pas_client_v221_modification_group
12
12
  title 'Payer Modifications'
13
13
  description %(
14
- During these tests, the client will initiate a prior authorization request and show it can
15
- respond appropriately to a response in which the payer authorizes items that differ from those
14
+ During these tests, the PAS client will initiate a prior authorization request and show it can
15
+ react appropriately to a response in which the payer authorizes items that differ from those
16
16
  that were requested.
17
17
 
18
18
  In PAS v2.2.1, payers are permitted to
19
19
  [return items that are different from what was requested](https://hl7.org/fhir/us/davinci-pas/2.2.1/en/specification.html#returning-authorized-items-that-are-different-from-what-was-requested).
20
20
  When this happens, each requested item is returned in the `ClaimResponse.item` with an adjudication
21
21
  status of A6 ('Modified') and the details of what was actually authorized are returned in a
22
- corresponding `ClaimResponse.addItem`. Clients must be able to process these responses and make the
22
+ corresponding `ClaimResponse.addItem`. PAS clients must be able to process these responses and make the
23
23
  details of the authorized items available to their users.
24
24
  )
25
25
  run_as_group
@@ -27,26 +27,25 @@ module DaVinciPASTestKit
27
27
  input :modification_json_response, optional: true
28
28
 
29
29
  test from: :pas_client_v221_modification_submit_test
30
- test from: :pas_client_v221_request_bundle_validation_test,
31
- config: { options: { workflow_tag: MODIFICATION_WORKFLOW_TAG } }
32
-
33
- test from: :pas_client_v221_response_bundle_validation_test,
34
- config: { options: { workflow_tag: MODIFICATION_WORKFLOW_TAG } }
35
- test from: :pas_client_v221_modification_verification_test
36
-
37
30
  test from: :pas_client_v221_response_attest,
38
31
  title: 'PAS client makes the details of the payer-authorized items available',
39
32
  description: %(
40
- This test provides the tester an opportunity to observe their client following
33
+ During this test, the tester will observe the PAS client following
41
34
  the receipt of the payer modification response and attest that users are able to
42
35
  determine the details of what was actually authorized by the payer.
43
36
  ),
44
37
  config: { options: {
45
38
  workflow_tag: MODIFICATION_WORKFLOW_TAG,
46
- attest_message: 'I attest that the details of what the payer actually authorized, including any ' \
47
- 'modifications made to the requested items, were made available to users in the ' \
48
- 'client system.'
39
+ operation_tag: SUBMIT_TAG,
40
+ attest_message: 'I attest that the PAS client did not error when handling the `$submit` ' \
41
+ 'response and displays the details of what the payer actually authorized, including any ' \
42
+ 'modifications made to the requested items.'
49
43
  } }
44
+ test from: :pas_client_v221_request_bundle_validation_test,
45
+ config: { options: { workflow_tag: MODIFICATION_WORKFLOW_TAG } }
46
+ test from: :pas_client_v221_response_bundle_validation_test,
47
+ config: { options: { workflow_tag: MODIFICATION_WORKFLOW_TAG } }
48
+ test from: :pas_client_v221_modification_verification_test
50
49
  end
51
50
  end
52
51
  end