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
@@ -1,14 +1,16 @@
1
1
  require_relative '../../../cross_suite/pas_bundle_validation'
2
+ require_relative '../../client_bundle_validation_helper'
2
3
 
3
4
  module DaVinciPASTestKit
4
5
  module DaVinciPASV201
5
6
  class PasClientRequestBundleValidationTest < Inferno::Test
6
7
  include DaVinciPASTestKit::PasBundleValidation
8
+ include DaVinciPASTestKit::ClientBundleValidationHelper
7
9
 
8
10
  id :pas_client_v201_request_bundle_validation_test
9
- title 'Submit Request Bundle is valid'
11
+ title '$submit request Bundles have the correct structure and content'
10
12
  description %(
11
- This test verifies the conformity of the client's submit request body to the
13
+ This test verifies the conformity of each of the PAS client's `$submit` request bodies to the
12
14
  [PAS Request Bundle](http://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-pas-request-bundle.html)
13
15
  structure. It also checks that other conformance requirements defined in the [PAS Formal
14
16
  Specification](https://hl7.org/fhir/us/davinci-pas/STU2/specification.html),
@@ -39,30 +41,22 @@ module DaVinciPASTestKit
39
41
  'hl7.fhir.us.davinci-pas_2.0.1@81', 'hl7.fhir.us.davinci-pas_2.0.1@85',
40
42
  'hl7.fhir.us.davinci-pas_2.0.1@86'
41
43
 
42
- def workflow_tag
43
- config.options[:workflow_tag]
44
+ def operation_name
45
+ 'submit'
44
46
  end
45
47
 
46
- def request_type_tag
47
- SUBMIT_TAG
48
+ def message_direction_name
49
+ 'request'
48
50
  end
49
51
 
50
- run do
51
- if workflow_tag.present?
52
- load_tagged_requests(request_type_tag, workflow_tag)
53
- else
54
- load_tagged_requests(request_type_tag)
55
- end
56
- skip_if !request.present?, 'No submit requests received.'
52
+ def ig_version
53
+ '2.0.1'
54
+ end
57
55
 
58
- validate_pas_bundle_json(
59
- request.request_body,
60
- 'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-request-bundle',
61
- '2.0.1',
62
- 'submit',
63
- 'request_bundle',
64
- message: 'The Bundle provided for the Claim/$submit operation is invalid:'
65
- )
56
+ run do
57
+ failed = non_conformant_bundles
58
+ assert failed.empty?,
59
+ "Non-conformant request Bundles detected: #{failed.join(', ')}. Check messages for issues found."
66
60
  end
67
61
  end
68
62
  end
@@ -1,21 +1,21 @@
1
1
  require_relative '../../../cross_suite/pas_bundle_validation'
2
2
  require_relative '../../user_input_response'
3
- require_relative '../../response_generator'
3
+ require_relative '../../client_bundle_validation_helper'
4
4
 
5
5
  module DaVinciPASTestKit
6
6
  module DaVinciPASV201
7
7
  class PasClientResponseBundleValidationTest < Inferno::Test
8
8
  include DaVinciPASTestKit::PasBundleValidation
9
9
  include UserInputResponse
10
- include ResponseGenerator
10
+ include DaVinciPASTestKit::ClientBundleValidationHelper
11
11
 
12
12
  id :pas_client_v201_response_bundle_validation_test
13
- title 'Submit Response Bundle is valid'
13
+ title '$submit response Bundles have the correct structure and content'
14
14
  description %(
15
- **USER INPUT VERIFICATION**: This test verifies input provided by the tester instead of the system under test.
15
+ This test verifies input provided by the tester instead of the PAS client.
16
16
  Errors encountered will be treated as a skip instead of a failure.
17
17
 
18
- This test verifies the conformity of the submit response sent by Inferno, which will have been
18
+ This test verifies the conformity of each `$submit` response sent by Inferno, which will have been
19
19
  either:
20
20
  - the response body provided by the tester in the corresponding input, or
21
21
  - created by Inferno from the $submit Bundle.
@@ -33,8 +33,11 @@ module DaVinciPASTestKit
33
33
  to the bound ValueSet. Quantity, Coding, and code element bindings will
34
34
  fail if their code/system are not found in the valueset.
35
35
 
36
- Note that because X12 value sets are not public, elements bound to value
37
- sets containing X12 codes are not validated.
36
+ Note that:
37
+ - To ensure that the PAS client is driving its behavior only based on standard
38
+ PAS information, custom extensions are not allowed within the responses.
39
+ - Because X12 value sets are not public, elements bound to value
40
+ sets containing X12 codes are not validated.
38
41
 
39
42
  **Limitations**
40
43
 
@@ -46,12 +49,16 @@ module DaVinciPASTestKit
46
49
  )
47
50
  simulation_verification
48
51
 
49
- def request_type
52
+ def operation_name
50
53
  'submit'
51
54
  end
52
55
 
53
- def workflow_tag
54
- config.options[:workflow_tag]
56
+ def message_direction_name
57
+ 'response'
58
+ end
59
+
60
+ def ig_version
61
+ '2.0.1'
55
62
  end
56
63
 
57
64
  def target_user_input
@@ -67,26 +74,19 @@ module DaVinciPASTestKit
67
74
  end
68
75
  end
69
76
 
70
- run do
71
- load_tagged_requests(workflow_tag, SUBMIT_TAG)
72
- skip_if requests.empty?, 'No responses to verify because no submit requests were made.'
73
- message = if workflow_tag == MUST_SUPPORT_WORKFLOW_TAG
74
- 'Invalid must support response bundle provided:'
75
- elsif user_inputted_response? target_user_input
76
- "Invalid response generated from provided input '#{input_title(target_user_input)}':"
77
- else
78
- 'Invalid response generated from the submitted claim:'
79
- end
77
+ def failed_entities_description
78
+ if user_inputted_response? target_user_input
79
+ "built from tester-provided response in '#{input_title(target_user_input)}'"
80
+ else
81
+ 'generated from the submitted claim'
82
+ end
83
+ end
80
84
 
81
- validate_pas_bundle_json(
82
- request.response_body,
83
- 'http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-response-bundle',
84
- '2.0.1',
85
- request_type,
86
- 'response_bundle',
87
- skips: true,
88
- message:
89
- )
85
+ run do
86
+ failed = non_conformant_bundles
87
+ skip_if failed.present?,
88
+ "Non-conformant response Bundles #{failed_entities_description}: #{failed.join(', ')}. " \
89
+ 'Check messages for issues found.'
90
90
  end
91
91
  end
92
92
  end
@@ -0,0 +1,10 @@
1
+ module DaVinciPASTestKit
2
+ module DaVinciPASV221
3
+ ATTESTATION_INPUT_INSTRUCTIONS = %(
4
+ Testers are responsible for confirming that the PAS client meets all requirements associated with a test
5
+ before selecting "Yes" on the attestation input with the same name as the test. The text of the
6
+ attested requirement(s) for each input can be reviewed by clicking the "View Specification Requirements" link
7
+ in the "About" tab of the test with the same name.
8
+ ).freeze
9
+ end
10
+ end
@@ -0,0 +1,44 @@
1
+ require_relative 'attestation_instructions'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV221
5
+ class DataElementExpectationsAttestationTest < Inferno::Test
6
+ id :pas_client_v221_data_element_expectations_attestation
7
+ ATTESTATION_TITLE = 'PAS client does not set additional expectations for data elements'.freeze
8
+ title ATTESTATION_TITLE
9
+ description %(
10
+ During this test, the tester will confirm that the PAS client does not set additional expectations
11
+ for data elements beyond what is required by PAS.
12
+ To see the specifics of the attested requirements, click the "View Specification Requirements" link for this
13
+ test.
14
+ )
15
+ attestation
16
+ verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@conf-14', 'hl7.fhir.us.davinci-pas_2.2.1@conf-15',
17
+ 'hl7.fhir.us.davinci-pas_2.2.1@conf-16-A'
18
+ input_instructions ATTESTATION_INPUT_INSTRUCTIONS
19
+
20
+ input :data_element_expectations_attestation,
21
+ title: ATTESTATION_TITLE,
22
+ description: %(
23
+ I attest that the PAS client does not set additional expectations for
24
+ data elements beyond what is required by PAS.
25
+ ),
26
+ type: 'radio',
27
+ default: 'false',
28
+ options: {
29
+ list_options: [
30
+ { label: 'Yes', value: 'true' },
31
+ { label: 'No', value: 'false' }
32
+ ]
33
+ }
34
+ input :data_element_expectations_attestation_note,
35
+ title: 'Notes, if applicable:',
36
+ type: 'textarea',
37
+ optional: true
38
+
39
+ run do
40
+ assert data_element_expectations_attestation == 'true'
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,45 @@
1
+ require_relative 'attestation_instructions'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV221
5
+ class ProviderReviewAttestationTest < Inferno::Test
6
+ id :pas_client_v221_provider_review_attestation
7
+ ATTESTATION_TITLE = 'PAS client allows but does not require providers to review information before ' \
8
+ 'submitting'.freeze
9
+ title ATTESTATION_TITLE
10
+ description %(
11
+ During this test, the tester will confirm that the PAS client allows but does not require providers
12
+ to review submission details before sending PAS prior authorization requests.
13
+ To see the specifics of the attested requirements, click the "View Specification Requirements" link for this
14
+ test.
15
+ )
16
+ attestation
17
+ verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@priv-1-A', 'hl7.fhir.us.davinci-pas_2.2.1@priv-1-B',
18
+ 'hl7.fhir.us.davinci-pas_2.2.1@use-5'
19
+ input_instructions ATTESTATION_INPUT_INSTRUCTIONS
20
+
21
+ input :provider_review_attestation,
22
+ title: ATTESTATION_TITLE,
23
+ description: %(
24
+ I attest that the PAS client allows but does not require providers to review
25
+ submission details before sending PAS prior authorization requests.
26
+ ),
27
+ type: 'radio',
28
+ default: 'false',
29
+ options: {
30
+ list_options: [
31
+ { label: 'Yes', value: 'true' },
32
+ { label: 'No', value: 'false' }
33
+ ]
34
+ }
35
+ input :provider_review_attestation_note,
36
+ title: 'Notes, if applicable:',
37
+ type: 'textarea',
38
+ optional: true
39
+
40
+ run do
41
+ assert provider_review_attestation == 'true'
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,42 @@
1
+ require_relative 'attestation_instructions'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV221
5
+ class ClientSecurityAttestationTest < Inferno::Test
6
+ id :pas_client_v221_security_attestation
7
+ ATTESTATION_TITLE = 'PAS client adheres to security and privacy requirements'.freeze
8
+ title ATTESTATION_TITLE
9
+ description %(
10
+ During this test, the tester will confirm that the PAS client adheres to security and
11
+ privacy requirements including those defined in the HRex specification. To see the specifics
12
+ of the attested requirements, click the "View Specification Requirements" link for this test.
13
+ )
14
+ attestation
15
+ verifies_requirements 'hl7.fhir.us.davinci-pas_2.2.1@spec-4'
16
+ input_instructions ATTESTATION_INPUT_INSTRUCTIONS
17
+
18
+ input :security_attestation,
19
+ title: ATTESTATION_TITLE,
20
+ description: %(
21
+ I attest that the PAS client adheres to security and
22
+ privacy requirements including those defined in the HRex specification.
23
+ ),
24
+ type: 'radio',
25
+ default: 'false',
26
+ options: {
27
+ list_options: [
28
+ { label: 'Yes', value: 'true' },
29
+ { label: 'No', value: 'false' }
30
+ ]
31
+ }
32
+ input :security_attestation_note,
33
+ title: 'Notes, if applicable:',
34
+ type: 'textarea',
35
+ optional: true
36
+
37
+ run do
38
+ assert security_attestation == 'true'
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ require_relative 'attestation_instructions'
2
+
3
+ module DaVinciPASTestKit
4
+ module DaVinciPASV221
5
+ class ClientSubscriptionErrorRecoveryAttestationTest < Inferno::Test
6
+ id :pas_client_v221_subscription_error_recovery_attestation
7
+ ATTESTATION_TITLE = 'PAS client can recover from Subscription errors'.freeze
8
+ title ATTESTATION_TITLE
9
+ description %(
10
+ During this test, the tester will confirm that the PAS client can detect and recover
11
+ from Subscription errors and take steps to restore notification delivery. To see the specifics
12
+ of the attested requirements, click the "View Specification Requirements" link for this test.
13
+ )
14
+ attestation
15
+ verifies_requirements 'hl7.fhir.uv.subscriptions_1.1.0@81', 'hl7.fhir.uv.subscriptions_1.1.0@82'
16
+ input_instructions ATTESTATION_INPUT_INSTRUCTIONS
17
+
18
+ input :subscription_error_recovery_attestation,
19
+ title: ATTESTATION_TITLE,
20
+ description: %(
21
+ I attest that the PAS client can detect and recover
22
+ from Subscription errors and take steps to restore notification delivery.
23
+ ),
24
+ type: 'radio',
25
+ default: 'false',
26
+ options: {
27
+ list_options: [
28
+ { label: 'Yes', value: 'true' },
29
+ { label: 'No', value: 'false' }
30
+ ]
31
+ }
32
+ input :subscription_error_recovery_attestation_note,
33
+ title: 'Notes, if applicable:',
34
+ type: 'textarea',
35
+ optional: true
36
+
37
+ run do
38
+ assert subscription_error_recovery_attestation == 'true'
39
+ end
40
+ end
41
+ end
42
+ end
@@ -1,21 +1,27 @@
1
1
  require 'subscriptions_test_kit'
2
2
  require 'udap_security_test_kit'
3
3
  require 'smart_app_launch_test_kit'
4
+ require_relative '../../cross_suite/validator_configuration'
4
5
  require_relative '../../cross_suite/validator_suppressions'
5
6
  require_relative '../../cross_suite/tags'
7
+ require_relative '../../cross_suite/pas_constants'
6
8
  require_relative '../endpoints/claim_endpoint'
7
9
  require_relative '../endpoints/token_endpoint'
8
10
  require_relative '../endpoints/subscription_create_endpoint'
11
+ require_relative '../endpoints/subscription_read_endpoint'
9
12
  require_relative '../endpoints/subscription_status_endpoint'
13
+ require_relative '../endpoints/subscription_update_endpoint'
14
+ require_relative '../endpoints/subscription_delete_endpoint'
10
15
  require_relative '../metadata/mock_pas_server'
11
16
  require_relative '../pas_client_options'
12
17
  require_relative 'pas_client_workflows_group'
13
18
  require_relative 'pas_client_must_support_group'
14
19
  require_relative 'pas_client_subscription_setup_group'
20
+ require_relative 'pas_client_subscription_update_delete_group'
15
21
  require_relative 'pas_client_registration_group'
16
22
  require_relative 'pas_client_auth_smart_group'
17
23
  require_relative 'pas_client_auth_udap_group'
18
- require_relative 'pas_client_error_handling_group'
24
+ require_relative 'pas_client_attestations_group'
19
25
  require_relative '../client_input_descriptions'
20
26
 
21
27
  module DaVinciPASTestKit
@@ -39,12 +45,12 @@ module DaVinciPASTestKit
39
45
  - [What testers need to successfully execute these tests](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Instructions-v2.2.1#pre-execution-setup-and-required-information),
40
46
  - [Minimal](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Instructions-v2.2.1#quick-start)
41
47
  and [complete](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Instructions-v2.2.1#additional-testing-options)
42
- instructions for executing against a client system, and
48
+ instructions for executing against a PAS client, and
43
49
  - How to [interpret test results](https://github.com/inferno-framework/davinci-pas-test-kit/wiki/Client-Instructions-v2.2.1#interpreting-results).
44
50
  DESCRIPTION
45
51
 
46
52
  suite_summary <<~SUMMARY
47
- The Da Vinci PAS Client v2.2.1 Test Suite tests the conformance of client systems
53
+ The Da Vinci PAS Client v2.2.1 Test Suite tests the conformance of PAS clients
48
54
  to [version 2.2.1 of the Da Vinci Prior Authorization Support (PAS)
49
55
  Implementation Guide](https://hl7.org/fhir/us/davinci-pas/2.2.1).
50
56
  SUMMARY
@@ -82,12 +88,29 @@ module DaVinciPASTestKit
82
88
  )
83
89
 
84
90
  fhir_resource_validator do
85
- igs('hl7.fhir.us.davinci-pas#2.2.1', 'hl7.fhir.us.core#6.1.0')
91
+ igs(*V221_VALIDATOR_IGS)
86
92
 
87
93
  exclude_message do |message|
88
- # Messages expected of the form `<ResourceType>: <FHIRPath>: <message>`
89
- # We strip `<ResourceType>: <FHIRPath>: ` for the sake of matching
90
- V221_SUPPRESSED_MESSAGES.match?(message.message.sub(/\A\S+: \S+: /, ''))
94
+ V221_SUPPRESSED_MESSAGES.match?(message.message.sub(VALIDATOR_MESSAGE_LOCATION_PREFIX, ''))
95
+ end
96
+
97
+ validation_context do
98
+ snomedCT SNOMED_CT_US_EDITION
99
+ end
100
+ end
101
+
102
+ # Used to verify responses sent by Inferno, which may be tester-provided, to
103
+ # ensure they don't contain extensions not defined in the PAS IG or its dependencies.
104
+ fhir_resource_validator NO_CUSTOM_EXTENSIONS_VALIDATOR do
105
+ igs(*V221_VALIDATOR_IGS)
106
+
107
+ exclude_message do |message|
108
+ V221_SUPPRESSED_MESSAGES.match?(message.message.sub(VALIDATOR_MESSAGE_LOCATION_PREFIX, ''))
109
+ end
110
+
111
+ validation_context do
112
+ snomedCT SNOMED_CT_US_EDITION
113
+ extensions [] # no extensions not in the spec
91
114
  end
92
115
  end
93
116
 
@@ -108,6 +131,26 @@ module DaVinciPASTestKit
108
131
  }
109
132
  ]
110
133
 
134
+ # Inferno selects the first listed option by default.
135
+ suite_option :us_core_version,
136
+ title: 'US Core Version',
137
+ description: 'The US Core version whose profiles are used to validate supporting ' \
138
+ 'information resources that have no PAS profile.',
139
+ list_options: [
140
+ {
141
+ label: 'US Core 3.1.1',
142
+ value: PASConstants::US_CORE_VERSION_3_1_1
143
+ },
144
+ {
145
+ label: 'US Core 6.1.0',
146
+ value: PASConstants::US_CORE_VERSION_6_1_0
147
+ },
148
+ {
149
+ label: 'US Core 7.0.0',
150
+ value: PASConstants::US_CORE_VERSION_7_0_0
151
+ }
152
+ ]
153
+
111
154
  route(:get, UDAPSecurityTestKit::UDAP_DISCOVERY_PATH, lambda { |_env|
112
155
  UDAPSecurityTestKit::MockUDAPServer.udap_server_metadata(id)
113
156
  })
@@ -134,8 +177,12 @@ module DaVinciPASTestKit
134
177
  suite_endpoint :post, SESSION_INQUIRE_PATH, ClaimEndpoint
135
178
  suite_endpoint :post, FHIR_SUBSCRIPTION_PATH, SubscriptionCreateEndpoint
136
179
  suite_endpoint :post, SESSION_FHIR_SUBSCRIPTION_PATH, SubscriptionCreateEndpoint
137
- suite_endpoint :get, FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionsTestKit::SubscriptionReadEndpoint
138
- suite_endpoint :get, SESSION_FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionsTestKit::SubscriptionReadEndpoint
180
+ suite_endpoint :get, FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionReadEndpoint
181
+ suite_endpoint :put, FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionUpdateEndpoint
182
+ suite_endpoint :delete, FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionDeleteEndpoint
183
+ suite_endpoint :get, SESSION_FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionReadEndpoint
184
+ suite_endpoint :put, SESSION_FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionUpdateEndpoint
185
+ suite_endpoint :delete, SESSION_FHIR_SUBSCRIPTION_INSTANCE_PATH, SubscriptionDeleteEndpoint
139
186
  suite_endpoint :post, FHIR_SUBSCRIPTION_INSTANCE_STATUS_PATH, SubscriptionStatusEndpoint
140
187
  suite_endpoint :post, SESSION_FHIR_SUBSCRIPTION_INSTANCE_STATUS_PATH, SubscriptionStatusEndpoint
141
188
  suite_endpoint :get, FHIR_SUBSCRIPTION_INSTANCE_STATUS_PATH, SubscriptionStatusEndpoint
@@ -177,7 +224,8 @@ module DaVinciPASTestKit
177
224
  PASClientOptions.recursive_remove_input(self, :session_url_path)
178
225
  config(inputs: { client_id: { optional: false } })
179
226
  end
180
- group from: :pas_client_v221_error_handling_group, id: :pas_client_v221_error_handling_smart do
227
+ group from: :pas_client_v221_subscription_update_delete,
228
+ id: :pas_client_v221_subscription_update_delete_smart do
181
229
  required_suite_options client_type: PASClientOptions::SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC
182
230
  PASClientOptions.recursive_remove_input(self, :session_url_path)
183
231
  config(inputs: { client_id: { optional: false } })
@@ -199,7 +247,8 @@ module DaVinciPASTestKit
199
247
  PASClientOptions.recursive_remove_input(self, :session_url_path)
200
248
  config(inputs: { client_id: { optional: false } })
201
249
  end
202
- group from: :pas_client_v221_error_handling_group, id: :pas_client_v221_error_handling_udap do
250
+ group from: :pas_client_v221_subscription_update_delete,
251
+ id: :pas_client_v221_subscription_update_delete_udap do
203
252
  required_suite_options client_type: PASClientOptions::UDAP_CLIENT_CREDENTIALS
204
253
  PASClientOptions.recursive_remove_input(self, :session_url_path)
205
254
  config(inputs: { client_id: { optional: false } })
@@ -221,7 +270,8 @@ module DaVinciPASTestKit
221
270
  PASClientOptions.recursive_remove_input(self, :client_id)
222
271
  config(inputs: { session_url_path: { optional: false } })
223
272
  end
224
- group from: :pas_client_v221_error_handling_group, id: :pas_client_v221_error_handling_no_auth do
273
+ group from: :pas_client_v221_subscription_update_delete,
274
+ id: :pas_client_v221_subscription_update_delete_no_auth do
225
275
  required_suite_options client_type: PASClientOptions::OTHER_AUTH
226
276
  PASClientOptions.recursive_remove_input(self, :client_id)
227
277
  config(inputs: { session_url_path: { optional: false } })
@@ -235,6 +285,8 @@ module DaVinciPASTestKit
235
285
  required_suite_options: {
236
286
  client_type: PASClientOptions::UDAP_CLIENT_CREDENTIALS
237
287
  }
288
+
289
+ group from: :pas_client_v221_attestations
238
290
  end
239
291
  end
240
292
  end
@@ -14,7 +14,7 @@ module DaVinciPASTestKit
14
14
  id :pas_client_v221_operation_failure_submit_test
15
15
  title 'PAS client submits a claim and receives an OperationOutcome response'
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 OperationOutcome with the configured
19
19
  HTTP status code (default 400).
20
20
  )
@@ -23,8 +23,8 @@ module DaVinciPASTestKit
23
23
  title: 'Operation Failure OperationOutcome JSON',
24
24
  type: 'textarea',
25
25
  description: %(
26
- Inferno will return this OperationOutcome JSON in response to the $submit request
27
- during this test.
26
+ Inferno will return exactly this OperationOutcome JSON in response
27
+ to the $submit request during the *Operation Failure* group.
28
28
  )
29
29
  input :operation_failure_http_status,
30
30
  title: 'Operation Failure HTTP Status Code',
@@ -32,8 +32,10 @@ module DaVinciPASTestKit
32
32
  optional: true,
33
33
  default: '400',
34
34
  description: %(
35
- The HTTP status code Inferno will use when returning the OperationOutcome to the client.
36
- Must be a 4XX or 5XX value. Defaults to 400 if not provided or outside that range.
35
+ The HTTP status code Inferno will use when returning the Operation Failure
36
+ OperationOutcome to the PAS client. If provided, the value must be in the 4XX or
37
+ 5XX range. Inferno will return 400 if this input is not provided or the
38
+ provided value is outside that range.
37
39
  )
38
40
  input :client_id,
39
41
  title: 'Client Id',
@@ -49,6 +51,7 @@ module DaVinciPASTestKit
49
51
  description: INPUT_SESSION_URL_PATH_LOCKED
50
52
 
51
53
  submit_respond_with :operation_failure_operation_outcome
54
+ config options: { submit_enabled: true }
52
55
 
53
56
  run do
54
57
  assert_valid_json operation_failure_operation_outcome,
@@ -59,16 +62,23 @@ module DaVinciPASTestKit
59
62
 
60
63
  wait(
61
64
  identifier: wait_identifier,
62
- message: %(
63
- **Operation Failure Workflow Test**:
65
+ message: <<~MESSAGE
66
+ **Operation Failure Scenario Test**:
67
+
68
+ Inferno will wait while the tester uses the PAS client to submit a PAS request to
69
+ Inferno. Inferno will respond with exactly the provided OperationOutcome and HTTP status.
70
+ The tests will automatically continue once a request has been received.
71
+
72
+ ### Endpoints
64
73
 
65
74
  Submit a PAS request to
66
75
 
67
76
  `#{submit_endpoint}`
68
77
 
69
- Inferno will respond with the provided OperationOutcome and HTTP status
70
- **#{operation_failure_http_status.present? ? operation_failure_http_status : '400'}**.
71
- )
78
+ ### Authentication and Identification
79
+
80
+ #{auth_description_for_wait(client_id)}
81
+ MESSAGE
72
82
  )
73
83
  end
74
84
  end
@@ -1,4 +1,5 @@
1
1
  require_relative '../../../cross_suite/tags'
2
+ require_relative '../../../cross_suite/validator_configuration'
2
3
 
3
4
  module DaVinciPASTestKit
4
5
  module DaVinciPASV221
@@ -7,10 +8,14 @@ module DaVinciPASTestKit
7
8
  title 'Response OperationOutcome has the correct structure and content'
8
9
  description %(
9
10
  This test verifies the validity of the OperationOutcome returned by Inferno during the
10
- Operation Failure workflow. The OperationOutcome is validated against the base FHIR R4
11
+ Operation Failure scenario. The OperationOutcome is validated against the base FHIR R4
11
12
  OperationOutcome resource definition — no PAS-specific profile is required.
12
13
 
13
- Per IG §7.2.5, when a 4XX response is returned, an OperationOutcome SHALL be included
14
+ To ensure that the PAS client is driving its behavior only based on standard
15
+ PAS information, custom extensions are not allowed within the response.
16
+
17
+ The PAS IG [requires](https://hl7.org/fhir/us/davinci-pas/2.2.1/en/specification.html#prior-authorization-transaction-error-handling)
18
+ that when a 4XX response is returned, an OperationOutcome **SHALL** be included
14
19
  that details why the bundle could not be processed.
15
20
  )
16
21
  simulation_verification
@@ -29,9 +34,10 @@ module DaVinciPASTestKit
29
34
  skip_if !operation_outcome.is_a?(FHIR::OperationOutcome),
30
35
  "Expected an OperationOutcome but received #{operation_outcome.resourceType}."
31
36
 
32
- skip_if !resource_is_valid?(resource: operation_outcome),
33
- 'The OperationOutcome returned during the Operation Failure workflow is not conformant ' \
34
- 'with the base FHIR R4 OperationOutcome resource definition.'
37
+ skip_if !resource_is_valid?(resource: operation_outcome, validator: NO_CUSTOM_EXTENSIONS_VALIDATOR),
38
+ 'The OperationOutcome returned during the Operation Failure scenario is not conformant ' \
39
+ 'with the base FHIR R4 OperationOutcome resource definition or contains custom extensions. ' \
40
+ 'See Messages for details.'
35
41
  end
36
42
  end
37
43
  end