davinci_crd_test_kit 0.14.2 → 0.15.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 (234) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/client_v221_against_inferno_crd_server_suite.json.erb +13 -1
  3. data/config/presets/server_v221_against_inferno_crd_client_suite.json.erb +1 -1
  4. data/config/presets/server_v221_against_inferno_crd_client_suite_prefetch_subset.json.erb +1 -1
  5. data/lib/davinci_crd_test_kit/client/client_base_urls.rb +5 -0
  6. data/lib/davinci_crd_test_kit/client/client_input_helper.rb +102 -0
  7. data/lib/davinci_crd_test_kit/client/client_wait_messages.rb +68 -0
  8. data/lib/davinci_crd_test_kit/client/endpoints/custom_service_response.rb +25 -10
  9. data/lib/davinci_crd_test_kit/client/endpoints/hook_request_data_access.rb +228 -0
  10. data/lib/davinci_crd_test_kit/client/endpoints/hook_request_endpoint.rb +116 -25
  11. data/lib/davinci_crd_test_kit/client/endpoints/mock_service_response.rb +5 -24
  12. data/lib/davinci_crd_test_kit/client/endpoints/scenario_service_response.rb +1 -1
  13. data/lib/davinci_crd_test_kit/client/endpoints/v201_hook_request_data_gathering.rb +219 -0
  14. data/lib/davinci_crd_test_kit/client/endpoints/v221_hook_request_data_gathering.rb +172 -0
  15. data/lib/davinci_crd_test_kit/client/jwt_claim_types.rb +28 -0
  16. data/lib/davinci_crd_test_kit/client/multi_request_message_helper.rb +1 -1
  17. data/lib/davinci_crd_test_kit/client/prefetched_coverage_payer_helper.rb +81 -0
  18. data/lib/davinci_crd_test_kit/client/prefetched_coverage_value.rb +14 -0
  19. data/lib/davinci_crd_test_kit/client/tagged_request_load_helper.rb +8 -0
  20. data/lib/davinci_crd_test_kit/client/v2.0.1/auth/retrieve_jwks_test.rb +1 -1
  21. data/lib/davinci_crd_test_kit/client/v2.0.1/auth/token_header_test.rb +14 -4
  22. data/lib/davinci_crd_test_kit/client/v2.0.1/auth/token_payload_test.rb +8 -1
  23. data/lib/davinci_crd_test_kit/client/v2.0.1/cds-services-v201.json +1 -1
  24. data/lib/davinci_crd_test_kit/client/v2.0.1/client_fhir_api_group.rb +2 -2
  25. data/lib/davinci_crd_test_kit/client/v2.0.1/client_hooks_group.rb +2 -5
  26. data/lib/davinci_crd_test_kit/client/v2.0.1/crd_client_suite.rb +2 -2
  27. data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/appointment_book_receive_request_test.rb +10 -31
  28. data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/encounter_discharge_receive_request_test.rb +10 -31
  29. data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/encounter_start_receive_request_test.rb +8 -29
  30. data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/order_dispatch_receive_request_test.rb +10 -31
  31. data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/order_select_receive_request_test.rb +8 -29
  32. data/lib/davinci_crd_test_kit/client/v2.0.1/invocation/order_sign_receive_request_test.rb +10 -31
  33. data/lib/davinci_crd_test_kit/client/v2.0.1/registration/client_registration_verification_test.rb +3 -7
  34. data/lib/davinci_crd_test_kit/client/v2.0.1/registration/client_service_registration_attestation_test.rb +11 -3
  35. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_request/hook_request_optional_fields_test.rb +1 -1
  36. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/client_display_cards_attest.rb +4 -4
  37. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/inferno_response_validation.rb +1 -1
  38. data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_coverage_info_update_test.rb +9 -9
  39. data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_crd_update_verification_group.rb +1 -1
  40. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_coverage_based_invocation_attestation_test.rb +10 -10
  41. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_data_element_expectations_attestation_test.rb +7 -7
  42. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_hook_invocation_logging_attestation_test.rb +4 -4
  43. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_use_attestation_test.rb +4 -4
  44. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_prefetch_key_omission_attestation_test.rb +6 -5
  45. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_resource_identifiers_attestation_test.rb +4 -4
  46. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_response_case_distinction_attestation_test.rb +4 -4
  47. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_security_and_privacy_attestation_test.rb +4 -4
  48. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_workflow_integration_attestation_test.rb +4 -4
  49. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/decode_auth_token_test.rb +3 -1
  50. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/retrieve_jwks_test.rb +23 -13
  51. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/token_header_test.rb +32 -6
  52. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/token_payload_test.rb +25 -11
  53. data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-prefetch-subset-v221.json +1 -1
  54. data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-v221.json +1 -1
  55. data/lib/davinci_crd_test_kit/client/v2.2.1/client_appointment_book_group.rb +10 -3
  56. data/lib/davinci_crd_test_kit/client/v2.2.1/client_attestations_group.rb +1 -7
  57. data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_group.rb +13 -10
  58. data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_interaction_group.rb +12 -4
  59. data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_discharge_group.rb +9 -2
  60. data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_start_group.rb +9 -2
  61. data/lib/davinci_crd_test_kit/client/v2.2.1/client_fhir_api_group.rb +25 -3
  62. data/lib/davinci_crd_test_kit/client/v2.2.1/client_hooks_group.rb +7 -10
  63. data/lib/davinci_crd_test_kit/client/v2.2.1/client_long_running_hook_group.rb +3 -3
  64. data/lib/davinci_crd_test_kit/client/v2.2.1/client_multiple_payers_hook_group.rb +40 -0
  65. data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_dispatch_group.rb +9 -2
  66. data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_select_group.rb +8 -1
  67. data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_sign_group.rb +9 -2
  68. data/lib/davinci_crd_test_kit/client/v2.2.1/client_registration_group.rb +7 -7
  69. data/lib/davinci_crd_test_kit/client/v2.2.1/client_scenarios_group.rb +10 -4
  70. data/lib/davinci_crd_test_kit/client/v2.2.1/client_self_pay_hook_group.rb +2 -4
  71. data/lib/davinci_crd_test_kit/client/v2.2.1/client_unknown_content_hook_group.rb +3 -3
  72. data/lib/davinci_crd_test_kit/client/v2.2.1/client_user_access_level_group.rb +82 -0
  73. data/lib/davinci_crd_test_kit/client/v2.2.1/crd_client_suite.rb +7 -3
  74. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_card_must_support_coverage_information_test.rb +4 -4
  75. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_fhirpath_collection_as_comma_delimited_string_test.rb +3 -3
  76. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_hook_instances_unique_test.rb +2 -2
  77. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_jwt_ids_unique_test.rb +89 -0
  78. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_location_address_propagation_test.rb +59 -29
  79. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_order_types_signed_test.rb +101 -0
  80. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb +11 -24
  81. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/appointment_book_receive_request_test.rb +9 -27
  82. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/base_hook_invocation_receive_request_test.rb +59 -40
  83. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/cross_hooks_receive_request_test.rb +64 -35
  84. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_discharge_receive_request_test.rb +9 -27
  85. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_start_receive_request_test.rb +9 -27
  86. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_dispatch_receive_request_test.rb +9 -27
  87. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_select_receive_request_test.rb +9 -27
  88. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_sign_receive_request_test.rb +9 -27
  89. data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_long_running_receive_request_test.rb +50 -38
  90. data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_skip_long_running_attestation_test.rb +11 -11
  91. data/lib/davinci_crd_test_kit/client/v2.2.1/multiple_payers/client_multiple_payers_request_verification_test.rb +215 -0
  92. data/lib/davinci_crd_test_kit/client/v2.2.1/multiple_payers/client_multiple_payers_workflow_test.rb +71 -0
  93. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/appointment_must_support_test.rb +84 -0
  94. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/appointment_reference_resolution_test.rb +82 -0
  95. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/client_cross_hook_must_support_group.rb +181 -0
  96. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/communication_request_must_support_test.rb +69 -0
  97. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/communication_request_reference_resolution_test.rb +79 -0
  98. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/coverage_must_support_test.rb +73 -0
  99. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/coverage_reference_resolution_test.rb +67 -0
  100. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/device_must_support_test.rb +59 -0
  101. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/device_request_must_support_test.rb +72 -0
  102. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/device_request_reference_resolution_test.rb +76 -0
  103. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/encounter_must_support_test.rb +83 -0
  104. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/encounter_reference_resolution_test.rb +76 -0
  105. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/location_must_support_test.rb +63 -0
  106. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/location_reference_resolution_test.rb +60 -0
  107. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/medication_must_support_test.rb +54 -0
  108. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/medication_request_must_support_test.rb +95 -0
  109. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/medication_request_reference_resolution_test.rb +79 -0
  110. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/nutrition_order_must_support_test.rb +136 -0
  111. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/nutrition_order_reference_resolution_test.rb +67 -0
  112. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/organization_must_support_test.rb +66 -0
  113. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/organization_reference_resolution_test.rb +60 -0
  114. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/patient_must_support_test.rb +69 -0
  115. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/practitioner_must_support_test.rb +65 -0
  116. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/practitioner_role_must_support_test.rb +60 -0
  117. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/practitioner_role_reference_resolution_test.rb +66 -0
  118. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/service_request_must_support_test.rb +93 -0
  119. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/service_request_reference_resolution_test.rb +81 -0
  120. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/vision_prescription_must_support_test.rb +79 -0
  121. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/generated/vision_prescription_reference_resolution_test.rb +65 -0
  122. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/request_must_support_reference_resolution.rb +379 -0
  123. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/request_must_support_scope.rb +66 -0
  124. data/lib/davinci_crd_test_kit/client/v2.2.1/must_support/request_must_support_with_attestation_option.rb +331 -0
  125. data/lib/davinci_crd_test_kit/client/v2.2.1/registration/client_registration_verification_test.rb +16 -30
  126. data/lib/davinci_crd_test_kit/client/v2.2.1/registration/client_service_registration_attestation_test.rb +84 -39
  127. data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_workflow_test.rb +27 -20
  128. data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_attestation_test.rb +7 -7
  129. data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_receive_request_test.rb +38 -33
  130. data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_api_access_test.rb +124 -0
  131. data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_prefetch_scope_test.rb +85 -0
  132. data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_receive_request_test.rb +92 -0
  133. data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_same_scenario_test.rb +340 -0
  134. data/lib/davinci_crd_test_kit/client/v2.2.1/user_access_level/access_level_target_reference.rb +16 -0
  135. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_conformance_test.rb +63 -6
  136. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_coverage_verification_test.rb +23 -73
  137. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_data_fetch_verification_test.rb +12 -2
  138. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb +7 -7
  139. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb +11 -13
  140. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_profiles_test.rb +2 -2
  141. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_requested_version_test.rb +16 -4
  142. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_secured_transport_test.rb +1 -1
  143. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/client_display_cards_attest.rb +8 -8
  144. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/hook_response_support_coverage_information_test.rb +3 -3
  145. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/inferno_response_validation.rb +8 -9
  146. data/lib/davinci_crd_test_kit/cross_suite/base_urls.rb +12 -0
  147. data/lib/davinci_crd_test_kit/cross_suite/cards_identification.rb +9 -2
  148. data/lib/davinci_crd_test_kit/cross_suite/fhirpath_on_cds_request.rb +10 -9
  149. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/appointment_with_order/metadata.yml +67 -0
  150. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/appointment_without_order/metadata.yml +150 -0
  151. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/communication_request/metadata.yml +71 -0
  152. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/coverage/metadata.yml +71 -0
  153. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/device/metadata.yml +22 -0
  154. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/device_request/metadata.yml +85 -0
  155. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/encounter/metadata.yml +82 -0
  156. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/hrex_organization/metadata.yml +6 -0
  157. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/location/metadata.yml +27 -0
  158. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/medication/metadata.yml +17 -0
  159. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/medication_request/metadata.yml +166 -0
  160. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/nutrition_order/metadata.yml +166 -0
  161. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/organization/metadata.yml +42 -0
  162. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/patient/metadata.yml +29 -0
  163. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/practitioner/metadata.yml +37 -0
  164. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/practitioner_role/metadata.yml +36 -0
  165. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/service_request/metadata.yml +202 -0
  166. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_allergyintolerance/metadata.yml +6 -0
  167. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_condition_encounter_diagnosis/metadata.yml +6 -0
  168. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_condition_problems_health_concerns/metadata.yml +6 -0
  169. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_diagnosticreport_lab/metadata.yml +6 -0
  170. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_diagnosticreport_note/metadata.yml +6 -0
  171. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_documentreference/metadata.yml +6 -0
  172. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_location/metadata.yml +6 -0
  173. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_organization/metadata.yml +6 -0
  174. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_patient/metadata.yml +6 -0
  175. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_practitioner/metadata.yml +6 -0
  176. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/us_core_procedure/metadata.yml +6 -0
  177. data/lib/davinci_crd_test_kit/cross_suite/generated/v2.2.1/vision_prescription/metadata.yml +66 -0
  178. data/lib/davinci_crd_test_kit/cross_suite/hook_request_field_validation.rb +3 -2
  179. data/lib/davinci_crd_test_kit/cross_suite/hook_request_resource_extraction.rb +121 -0
  180. data/lib/davinci_crd_test_kit/cross_suite/logical_models_override_helper.rb +17 -9
  181. data/lib/davinci_crd_test_kit/cross_suite/must_support_references.rb +49 -0
  182. data/lib/davinci_crd_test_kit/cross_suite/must_support_slice_matching.rb +50 -0
  183. data/lib/davinci_crd_test_kit/cross_suite/prefetch_completeness_checker.rb +75 -39
  184. data/lib/davinci_crd_test_kit/cross_suite/profile_metadata.rb +75 -0
  185. data/lib/davinci_crd_test_kit/cross_suite/requests_logical_model_validation.rb +19 -9
  186. data/lib/davinci_crd_test_kit/cross_suite/resource_identity.rb +183 -0
  187. data/lib/davinci_crd_test_kit/cross_suite/short_circuit_interaction.rb +28 -0
  188. data/lib/davinci_crd_test_kit/cross_suite/tags.rb +15 -1
  189. data/lib/davinci_crd_test_kit/generator/crd_must_support_metadata_extractor.rb +147 -0
  190. data/lib/davinci_crd_test_kit/generator/must_support_metadata_generator.rb +207 -0
  191. data/lib/davinci_crd_test_kit/generator/must_support_test_generator.rb +249 -0
  192. data/lib/davinci_crd_test_kit/generator/templates/must_support_group.rb.erb +118 -0
  193. data/lib/davinci_crd_test_kit/generator/templates/must_support_test.rb.erb +22 -0
  194. data/lib/davinci_crd_test_kit/generator/templates/reference_resolution_test.rb.erb +22 -0
  195. data/lib/davinci_crd_test_kit/igs/davinci_crd_2.2.1.tgz +0 -0
  196. data/lib/davinci_crd_test_kit/igs/davinci_hrex_1.2.0.tgz +0 -0
  197. data/lib/davinci_crd_test_kit/metadata.rb +2 -2
  198. data/lib/davinci_crd_test_kit/requirements/davinci_crd_test_kit_requirements.csv +3 -2
  199. data/lib/davinci_crd_test_kit/requirements/generated/crd_client_requirements_coverage.csv +1 -1
  200. data/lib/davinci_crd_test_kit/requirements/generated/crd_client_v221_requirements_coverage.csv +90 -89
  201. data/lib/davinci_crd_test_kit/requirements/hl7.fhir.us.davinci-crd_2.2.1_requirements.xlsx +0 -0
  202. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_create_endpoint.rb +2 -0
  203. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_delete_endpoint.rb +2 -0
  204. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_read_endpoint.rb +2 -0
  205. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_request_handler.rb +6 -0
  206. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_search_endpoint.rb +21 -12
  207. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr/fhir_update_endpoint.rb +2 -0
  208. data/lib/davinci_crd_test_kit/server/endpoints/mock_ehr_endpoints.rb +3 -0
  209. data/lib/davinci_crd_test_kit/server/server_abstract_invoke_hook_test.rb +2 -2
  210. data/lib/davinci_crd_test_kit/server/v2.2.1/must_support/supported_us_core_versions_test.rb +2 -2
  211. data/lib/davinci_crd_test_kit/server/v2.2.1/server_appointment_book_group.rb +1 -1
  212. data/lib/davinci_crd_test_kit/server/v2.2.1/server_demonstrate_hook_response_group.rb +1 -1
  213. data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_discharge_group.rb +1 -1
  214. data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_start_group.rb +1 -1
  215. data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_dispatch_group.rb +1 -1
  216. data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_select_group.rb +1 -1
  217. data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_sign_group.rb +1 -1
  218. data/lib/davinci_crd_test_kit/server/v2.2.1/server_required_card_response_validation_group.rb +1 -1
  219. data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_not_found_group.rb +1 -1
  220. data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_active_coverage_group.rb +1 -1
  221. data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_member_found_group.rb +1 -1
  222. data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/technical_issues_group.rb +1 -1
  223. data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_context_validation_test.rb +1 -1
  224. data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_no_custom_extensions_test.rb +2 -2
  225. data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_optional_fields_validation_test.rb +1 -1
  226. data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_required_fields_validation_test.rb +1 -1
  227. data/lib/davinci_crd_test_kit/version.rb +2 -2
  228. metadata +100 -12
  229. data/lib/davinci_crd_test_kit/client/endpoints/gather_response_generation_data.rb +0 -413
  230. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_authorized_scope_attestation_test.rb +0 -45
  231. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_exposure_attestation_test.rb +0 -43
  232. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_order_sign_support_attestation_test.rb +0 -42
  233. data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_no_request_test.rb +0 -30
  234. data/lib/davinci_crd_test_kit/server/resource_extractor.rb +0 -68
@@ -1,16 +1,20 @@
1
1
  require_relative 'base_hook_invocation_receive_request_test'
2
+ require_relative '../../../cross_suite/short_circuit_interaction'
3
+ require_relative '../../client_input_helper'
2
4
 
3
5
  module DaVinciCRDTestKit
4
6
  module V221
5
7
  class CrossHooksReceiveRequestTest < BaseHookInvocationReceiveRequestTest
8
+ include ShortCircuitInteraction
9
+
6
10
  id :crd_v221_cross_hooks_request
7
- title 'Client invokes any hook'
11
+ title 'CRD client invokes any hook'
8
12
  description %(
9
- During this test, Inferno will wait while the client makes one or more [hook](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html)
13
+ During this test, Inferno will wait while the CRD client makes one or more [hook](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html)
10
14
  requests against Inferno's simulated CRD servers. Inferno will respond
11
15
  based on the response configuration provided when running the test.
12
16
  For more details on how Inferno's simulated CRD servers behave during
13
- hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-simulation)
17
+ hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
14
18
  documentation.
15
19
 
16
20
  Inferno will pause and wait for inbound requests until told explicitly to continue
@@ -18,33 +22,42 @@ module DaVinciCRDTestKit
18
22
  5 minutes the test will become inactive and unresponsive to anything except cancelation).
19
23
  )
20
24
 
21
- input :cross_hooks_response_approach,
22
- title: 'Response generation approach for all hooks',
25
+ input :make_additional_hook_requests,
26
+ title: 'Make additional hook requests?',
23
27
  description: %(
24
- Determines how Inferno will generate response for all
25
- hook invocations.
28
+ Cross-invocation analysis considers every hook request made during the most recent execution
29
+ of each group in this session. Select `Yes` to send more requests now so that features
30
+ the earlier requests did not cover can be demonstrated. Otherwise select `No` to
31
+ evaluate the requests already received, and every test in the "Additional Hook Invocations"
32
+ group will pass without further requests. NOTE: if re-running this test, requests
33
+ made during its previous execution runs will no longer be considered, even if `No`
34
+ is selected.
26
35
  ),
27
36
  type: 'radio',
28
- default: 'mocked',
37
+ default: 'false',
29
38
  options: {
30
39
  list_options: [
31
- {
32
- label: 'Create simple mocks based on selected response types',
33
- value: 'mocked'
34
- },
35
- {
36
- label: 'Generate responses based on a tester-provided template',
37
- value: 'custom'
38
- }
40
+ { label: 'Yes, send more hook requests now.', value: 'true' },
41
+ { label: 'No, the requests already made cover everything.', value: 'false' }
39
42
  ]
40
43
  }
44
+ input :cross_hooks_response_approach,
45
+ title: 'Response generation approach for all hooks',
46
+ description: ClientInputHelper.response_approach_description('all'),
47
+ type: 'radio',
48
+ default: 'mocked',
49
+ options: ClientInputHelper.response_approach_options,
50
+ enable_when: { input_name: 'make_additional_hook_requests', value: 'true' }
41
51
  input :cross_hooks_selected_response_types,
42
52
  title: 'Response types to return from all hook requests',
43
53
  description: %(
44
- Select the CRD response types that the simulated Inferno CRD server will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
45
- when responding to hook invocations. If no types are selected, Inferno will mock and return
46
- a [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
47
- response.
54
+ #{ClientInputHelper.mocked_response_types_intro}
55
+ On the `appointment-book`, `order-sign`, and `order-dispatch`
56
+ hooks, for which CRD clients must support the [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
57
+ response type, Inferno will always include a Coverage Information response even if it
58
+ is not selected. If no types are selected, Inferno will mock and return an
59
+ [Instructions](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#instructions-response-type)
60
+ response on the other hooks.
48
61
  ),
49
62
  type: 'checkbox',
50
63
  default: ['coverage_information', 'external_reference', 'instructions'],
@@ -53,14 +66,21 @@ module DaVinciCRDTestKit
53
66
  enable_when: { input_name: 'cross_hooks_response_approach', value: 'mocked' }
54
67
  input :cross_hooks_custom_response_template,
55
68
  title: 'Custom response template for all hook requests',
56
- description: %(
57
- Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
58
- in JSON form for Inferno to use when responding to hook invocations.
59
- ),
69
+ description: ClientInputHelper.custom_response_template_description,
60
70
  type: 'textarea',
61
71
  optional: true,
62
72
  enable_when: { input_name: 'cross_hooks_response_approach', value: 'custom' }
63
73
 
74
+ # The tester may have demonstrated everything during the Hooks group, in which case there is
75
+ # nothing to wait for and the tests evaluating these requests have nothing to evaluate.
76
+ def skip_waiting_for_requests?
77
+ clear_short_circuit_flag
78
+ return false unless make_additional_hook_requests == 'false'
79
+
80
+ short_circuit_remaining_tests(:pass)
81
+ pass DEFAULT_SHORT_CIRCUIT_MESSAGE
82
+ end
83
+
64
84
  private
65
85
 
66
86
  def hook_key
@@ -71,26 +91,35 @@ module DaVinciCRDTestKit
71
91
  'all'
72
92
  end
73
93
 
94
+ # Coverage Information is added based on the hook each request invokes, so it is described
95
+ # separately in the dialog rather than being treated as always present.
74
96
  def primary_hook?
75
- true
97
+ false
76
98
  end
77
99
 
78
- def invoke_heading
79
- 'Invoke any hook'
100
+ def selected_response_types_string
101
+ coverage_information_note = 'Coverage Information (systemAction) on `appointment-book`, `order-sign`, ' \
102
+ 'and `order-dispatch` requests'
103
+ if selected_response_types.blank?
104
+ return "#{coverage_information_note}\n- Instructions (card) on other hook requests"
105
+ end
106
+ if selected_response_types.include?(DaVinciCRDTestKit::CardsIdentification::COVERAGE_INFORMATION_RESPONSE_TYPE)
107
+ return super
108
+ end
109
+
110
+ "#{super}\n- #{coverage_information_note}"
80
111
  end
81
112
 
82
- def invoke_intro
83
- "Invoke any hook by sending requests to\n " \
84
- "one or both of the two Inferno simulated CRD servers\n " \
85
- 'discoverable at the following endpoints:'
113
+ def invoke_heading
114
+ 'Invoke Any Hook'
86
115
  end
87
116
 
88
- def complete_prefetch_url
89
- discovery_url
117
+ def invoke_intro
118
+ 'Invoke any hook by sending requests to one or both of the two Inferno simulated CRD servers.'
90
119
  end
91
120
 
92
- def subset_prefetch_url
93
- prefetch_subset_discovery_url
121
+ def wait_message_endpoints_section
122
+ service_discovery_endpoints_section
94
123
  end
95
124
  end
96
125
  end
@@ -1,16 +1,17 @@
1
1
  require_relative 'base_hook_invocation_receive_request_test'
2
+ require_relative '../../client_input_helper'
2
3
 
3
4
  module DaVinciCRDTestKit
4
5
  module V221
5
6
  class EncounterDischargeReceiveRequestTest < BaseHookInvocationReceiveRequestTest
6
7
  id :crd_v221_encounter_discharge_request
7
- title 'Client invokes the encounter-discharge hook'
8
+ title 'CRD client invokes the encounter-discharge hook'
8
9
  description %(
9
- During this test, Inferno will wait while the client makes one or more [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-discharge)
10
+ During this test, Inferno will wait while the CRD client makes one or more [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-discharge)
10
11
  hook requests against Inferno's simulated CRD servers. Inferno will respond
11
12
  based on the response configuration provided when running the test.
12
13
  For more details on how Inferno's simulated CRD servers behave during
13
- hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-simulation)
14
+ hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
14
15
  documentation.
15
16
 
16
17
  Inferno will pause and wait for inbound requests until told explicitly to continue
@@ -20,31 +21,15 @@ module DaVinciCRDTestKit
20
21
 
21
22
  input :encounter_discharge_response_approach,
22
23
  title: 'Response generation approach for encounter-discharge',
23
- description: %(
24
- Determines how Inferno will generate response for encounter-discharge
25
- hook invocations.
26
- ),
24
+ description: ClientInputHelper.response_approach_description('encounter-discharge'),
27
25
  type: 'radio',
28
26
  default: 'mocked',
29
- options: {
30
- list_options: [
31
- {
32
- label: 'Create simple mocks based on selected response types',
33
- value: 'mocked'
34
- },
35
- {
36
- label: 'Generate responses based on a tester-provided template',
37
- value: 'custom'
38
- }
39
- ]
40
- }
27
+ options: ClientInputHelper.response_approach_options
41
28
  input :encounter_discharge_selected_response_types,
42
29
  title: 'Response types to return from encounter-discharge hook requests',
43
30
  description: %(
44
- Select the CRD response types that the simulated Inferno CRD server will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
45
- when responding to hook invocations. If no types are selected, Inferno will mock and return
46
- an [Instructions](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#instructions-response-type)
47
- response for this secondary hook.
31
+ #{ClientInputHelper.mocked_response_types_intro}
32
+ #{ClientInputHelper.default_response_type_note(primary: false)}
48
33
  ),
49
34
  type: 'checkbox',
50
35
  default: ['coverage_information', 'external_reference', 'instructions'],
@@ -53,10 +38,7 @@ module DaVinciCRDTestKit
53
38
  enable_when: { input_name: 'encounter_discharge_response_approach', value: 'mocked' }
54
39
  input :encounter_discharge_custom_response_template,
55
40
  title: 'Custom response template for encounter-discharge hook requests',
56
- description: %(
57
- Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
58
- in JSON form for Inferno to use when responding to hook invocations.
59
- ),
41
+ description: ClientInputHelper.custom_response_template_description,
60
42
  type: 'textarea',
61
43
  optional: true,
62
44
  enable_when: { input_name: 'encounter_discharge_response_approach', value: 'custom' }
@@ -1,16 +1,17 @@
1
1
  require_relative 'base_hook_invocation_receive_request_test'
2
+ require_relative '../../client_input_helper'
2
3
 
3
4
  module DaVinciCRDTestKit
4
5
  module V221
5
6
  class EncounterStartReceiveRequestTest < BaseHookInvocationReceiveRequestTest
6
7
  id :crd_v221_encounter_start_request
7
- title 'Client invokes the encounter-start hook'
8
+ title 'CRD client invokes the encounter-start hook'
8
9
  description %(
9
- During this test, Inferno will wait while the client makes one or more [encounter-start](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-start)
10
+ During this test, Inferno will wait while the CRD client makes one or more [encounter-start](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-start)
10
11
  hook requests against Inferno's simulated CRD servers. Inferno will respond
11
12
  based on the response configuration provided when running the test.
12
13
  For more details on how Inferno's simulated CRD servers behave during
13
- hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-simulation)
14
+ hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
14
15
  documentation.
15
16
 
16
17
  Inferno will pause and wait for inbound requests until told explicitly to continue
@@ -20,31 +21,15 @@ module DaVinciCRDTestKit
20
21
 
21
22
  input :encounter_start_response_approach,
22
23
  title: 'Response generation approach for encounter-start',
23
- description: %(
24
- Determines how Inferno will generate response for encounter-start
25
- hook invocations.
26
- ),
24
+ description: ClientInputHelper.response_approach_description('encounter-start'),
27
25
  type: 'radio',
28
26
  default: 'mocked',
29
- options: {
30
- list_options: [
31
- {
32
- label: 'Create simple mocks based on selected response types',
33
- value: 'mocked'
34
- },
35
- {
36
- label: 'Generate responses based on a tester-provided template',
37
- value: 'custom'
38
- }
39
- ]
40
- }
27
+ options: ClientInputHelper.response_approach_options
41
28
  input :encounter_start_selected_response_types,
42
29
  title: 'Response types to return from encounter-start hook requests',
43
30
  description: %(
44
- Select the CRD response types that the simulated Inferno CRD server will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
45
- when responding to hook invocations. If no types are selected, Inferno will mock and return
46
- an [Instructions](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#instructions-response-type)
47
- response for this secondary hook.
31
+ #{ClientInputHelper.mocked_response_types_intro}
32
+ #{ClientInputHelper.default_response_type_note(primary: false)}
48
33
  ),
49
34
  type: 'checkbox',
50
35
  default: ['coverage_information', 'external_reference', 'instructions'],
@@ -53,10 +38,7 @@ module DaVinciCRDTestKit
53
38
  enable_when: { input_name: 'encounter_start_response_approach', value: 'mocked' }
54
39
  input :encounter_start_custom_response_template,
55
40
  title: 'Custom response template for encounter-start hook requests',
56
- description: %(
57
- Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
58
- in JSON form for Inferno to use when responding to hook invocations.
59
- ),
41
+ description: ClientInputHelper.custom_response_template_description,
60
42
  type: 'textarea',
61
43
  optional: true,
62
44
  enable_when: { input_name: 'encounter_start_response_approach', value: 'custom' }
@@ -1,16 +1,17 @@
1
1
  require_relative 'base_hook_invocation_receive_request_test'
2
+ require_relative '../../client_input_helper'
2
3
 
3
4
  module DaVinciCRDTestKit
4
5
  module V221
5
6
  class OrderDispatchReceiveRequestTest < BaseHookInvocationReceiveRequestTest
6
7
  id :crd_v221_order_dispatch_request
7
- title 'Client invokes the order-dispatch hook'
8
+ title 'CRD client invokes the order-dispatch hook'
8
9
  description %(
9
- During this test, Inferno will wait while the client makes one or more [order-dispatch](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-dispatch)
10
+ During this test, Inferno will wait while the CRD client makes one or more [order-dispatch](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-dispatch)
10
11
  hook requests against Inferno's simulated CRD servers. Inferno will respond
11
12
  based on the response configuration provided when running the test.
12
13
  For more details on how Inferno's simulated CRD servers behave during
13
- hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-simulation)
14
+ hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
14
15
  documentation.
15
16
 
16
17
  Inferno will pause and wait for inbound requests until told explicitly to continue
@@ -20,31 +21,15 @@ module DaVinciCRDTestKit
20
21
 
21
22
  input :order_dispatch_response_approach,
22
23
  title: 'Response generation approach for order-dispatch',
23
- description: %(
24
- Determines how Inferno will generate response for order-dispatch
25
- hook invocations.
26
- ),
24
+ description: ClientInputHelper.response_approach_description('order-dispatch'),
27
25
  type: 'radio',
28
26
  default: 'mocked',
29
- options: {
30
- list_options: [
31
- {
32
- label: 'Create simple mocks based on selected response types',
33
- value: 'mocked'
34
- },
35
- {
36
- label: 'Generate responses based on a tester-provided template',
37
- value: 'custom'
38
- }
39
- ]
40
- }
27
+ options: ClientInputHelper.response_approach_options
41
28
  input :order_dispatch_selected_response_types,
42
29
  title: 'Response types to return from order-dispatch hook requests',
43
30
  description: %(
44
- Select the CRD response types that the simulated Inferno CRD server will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
45
- when responding to hook invocations. If no types are selected, Inferno will mock and return
46
- a [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
47
- response for this primary hook.
31
+ #{ClientInputHelper.mocked_response_types_intro}
32
+ #{ClientInputHelper.coverage_information_always_included_note}
48
33
  ),
49
34
  type: 'checkbox',
50
35
  default: ['coverage_information', 'external_reference', 'instructions'],
@@ -53,10 +38,7 @@ module DaVinciCRDTestKit
53
38
  enable_when: { input_name: 'order_dispatch_response_approach', value: 'mocked' }
54
39
  input :order_dispatch_custom_response_template,
55
40
  title: 'Custom response template for order-dispatch hook requests',
56
- description: %(
57
- Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
58
- in JSON form for Inferno to use when responding to hook invocations.
59
- ),
41
+ description: ClientInputHelper.custom_response_template_description,
60
42
  type: 'textarea',
61
43
  optional: true,
62
44
  enable_when: { input_name: 'order_dispatch_response_approach', value: 'custom' }
@@ -1,16 +1,17 @@
1
1
  require_relative 'base_hook_invocation_receive_request_test'
2
+ require_relative '../../client_input_helper'
2
3
 
3
4
  module DaVinciCRDTestKit
4
5
  module V221
5
6
  class OrderSelectReceiveRequestTest < BaseHookInvocationReceiveRequestTest
6
7
  id :crd_v221_order_select_request
7
- title 'Client invokes the order-select hook'
8
+ title 'CRD client invokes the order-select hook'
8
9
  description %(
9
- During this test, Inferno will wait while the client makes one or more [order-select](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-select)
10
+ During this test, Inferno will wait while the CRD client makes one or more [order-select](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-select)
10
11
  hook requests against Inferno's simulated CRD servers. Inferno will respond
11
12
  based on the response configuration provided when running the test.
12
13
  For more details on how Inferno's simulated CRD servers behave during
13
- hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-simulation)
14
+ hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
14
15
  documentation.
15
16
 
16
17
  Inferno will pause and wait for inbound requests until told explicitly to continue
@@ -20,31 +21,15 @@ module DaVinciCRDTestKit
20
21
 
21
22
  input :order_select_response_approach,
22
23
  title: 'Response generation approach for order-select',
23
- description: %(
24
- Determines how Inferno will generate response for order-select
25
- hook invocations.
26
- ),
24
+ description: ClientInputHelper.response_approach_description('order-select'),
27
25
  type: 'radio',
28
26
  default: 'mocked',
29
- options: {
30
- list_options: [
31
- {
32
- label: 'Create simple mocks based on selected response types',
33
- value: 'mocked'
34
- },
35
- {
36
- label: 'Generate responses based on a tester-provided template',
37
- value: 'custom'
38
- }
39
- ]
40
- }
27
+ options: ClientInputHelper.response_approach_options
41
28
  input :order_select_selected_response_types,
42
29
  title: 'Response types to return from order-select hook requests',
43
30
  description: %(
44
- Select the CRD response types that the simulated Inferno CRD server will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
45
- when responding to hook invocations. If no types are selected, Inferno will mock and return
46
- an [Instructions](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#instructions-response-type)
47
- response for this secondary hook.
31
+ #{ClientInputHelper.mocked_response_types_intro}
32
+ #{ClientInputHelper.default_response_type_note(primary: false)}
48
33
  ),
49
34
  type: 'checkbox',
50
35
  default: ['coverage_information', 'external_reference', 'instructions'],
@@ -53,10 +38,7 @@ module DaVinciCRDTestKit
53
38
  enable_when: { input_name: 'order_select_response_approach', value: 'mocked' }
54
39
  input :order_select_custom_response_template,
55
40
  title: 'Custom response template for order-select hook requests',
56
- description: %(
57
- Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
58
- in JSON form for Inferno to use when responding to hook invocations.
59
- ),
41
+ description: ClientInputHelper.custom_response_template_description,
60
42
  type: 'textarea',
61
43
  optional: true,
62
44
  enable_when: { input_name: 'order_select_response_approach', value: 'custom' }
@@ -1,16 +1,17 @@
1
1
  require_relative 'base_hook_invocation_receive_request_test'
2
+ require_relative '../../client_input_helper'
2
3
 
3
4
  module DaVinciCRDTestKit
4
5
  module V221
5
6
  class OrderSignReceiveRequestTest < BaseHookInvocationReceiveRequestTest
6
7
  id :crd_v221_order_sign_request
7
- title 'Client invokes the order-sign hook'
8
+ title 'CRD client invokes the order-sign hook'
8
9
  description %(
9
- During this test, Inferno will wait while the client makes one or more [order-sign](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-sign)
10
+ During this test, Inferno will wait while the CRD client makes one or more [order-sign](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-sign)
10
11
  hook requests against Inferno's simulated CRD servers. Inferno will respond
11
12
  based on the response configuration provided when running the test.
12
13
  For more details on how Inferno's simulated CRD servers behave during
13
- hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#crd-server-simulation)
14
+ hook invocation see the [simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#simulated-crd-server-in-the-crd-client-v221-suite)
14
15
  documentation.
15
16
 
16
17
  Inferno will pause and wait for inbound requests until told explicitly to continue
@@ -20,31 +21,15 @@ module DaVinciCRDTestKit
20
21
 
21
22
  input :order_sign_response_approach,
22
23
  title: 'Response generation approach for order-sign',
23
- description: %(
24
- Determines how Inferno will generate response for order-sign
25
- hook invocations.
26
- ),
24
+ description: ClientInputHelper.response_approach_description('order-sign'),
27
25
  type: 'radio',
28
26
  default: 'mocked',
29
- options: {
30
- list_options: [
31
- {
32
- label: 'Create simple mocks based on selected response types',
33
- value: 'mocked'
34
- },
35
- {
36
- label: 'Generate responses based on a tester-provided template',
37
- value: 'custom'
38
- }
39
- ]
40
- }
27
+ options: ClientInputHelper.response_approach_options
41
28
  input :order_sign_selected_response_types,
42
29
  title: 'Response types to return from order-sign hook requests',
43
30
  description: %(
44
- Select the CRD response types that the simulated Inferno CRD server will [mock](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
45
- when responding to hook invocations. If no types are selected, Inferno will mock and return
46
- a [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
47
- response for this primary hook.
31
+ #{ClientInputHelper.mocked_response_types_intro}
32
+ #{ClientInputHelper.coverage_information_always_included_note}
48
33
  ),
49
34
  type: 'checkbox',
50
35
  default: ['coverage_information', 'external_reference', 'instructions'],
@@ -53,10 +38,7 @@ module DaVinciCRDTestKit
53
38
  enable_when: { input_name: 'order_sign_response_approach', value: 'mocked' }
54
39
  input :order_sign_custom_response_template,
55
40
  title: 'Custom response template for order-sign hook requests',
56
- description: %(
57
- Provide a [custom response template](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#tester-directed-custom-responses)
58
- in JSON form for Inferno to use when responding to hook invocations.
59
- ),
41
+ description: ClientInputHelper.custom_response_template_description,
60
42
  type: 'textarea',
61
43
  optional: true,
62
44
  enable_when: { input_name: 'order_sign_response_approach', value: 'custom' }
@@ -1,71 +1,83 @@
1
+ require_relative '../../client_wait_messages'
1
2
  require_relative '../client_urls'
3
+ require_relative '../../client_input_helper'
2
4
 
3
5
  module DaVinciCRDTestKit
4
6
  module V221
5
7
  class ClientLongRunningReceiveRequestTest < Inferno::Test
6
8
  include ClientURLs
9
+ include DaVinciCRDTestKit::ClientWaitMessages
10
+
11
+ # CRD expects responses within a 5 or 10 second window depending on the hook. The minimum pause
12
+ # exceeds the longer window with enough margin for the CRD client to recognize the response as late.
13
+ MINIMUM_PAUSE_SECONDS = 15
7
14
 
8
15
  id :crd_v221_client_long_running_receive_request
9
- title 'Client invokes any hook'
16
+ title 'CRD client invokes any hook'
10
17
  description %(
11
- During this test, Inferno will wait while the client makes a single hook requests of any type.
18
+ During this test, Inferno will wait while the CRD client makes a single hook request of any type.
12
19
  Inferno will return a [mocked response](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
13
- but only after pausing for a configured amount of time, which must be 5 seconds or longer. The details
14
- of the request and its response do not matter for the purposes of this test and they will not be
15
- evaluated, checked for conformance, or included in cross-hook evaluations. The test will automatically
16
- continue after Inferno receives a hook request, the configured pause time has elapsed,
17
- and a response has been returned.
20
+ but only after pausing for a configured amount of time, which must be #{MINIMUM_PAUSE_SECONDS} seconds or
21
+ longer so that it exceeds the [5 or 10 second response window](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#ci-c-found-3)
22
+ CRD defines for each hook. The details of the request and its response do not matter for the purposes
23
+ of this test and they will not be evaluated, checked for conformance, or included in cross-invocation
24
+ evaluations. The test will automatically continue after Inferno receives a hook request, the
25
+ configured pause time has elapsed, and a response has been returned.
18
26
  )
19
27
  config options: { accepts_multiple_requests: true }
20
28
 
21
- input :cds_jwt_iss,
22
- title: 'CRD JWT Issuer',
23
- description: %(
24
- Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
25
- request sent as the Bearer token in the `Authorization` header.
26
- Run or re-run the "Registration" group to set or change this value.
27
- ),
28
- locked: true
29
29
  input :long_running_pause_time,
30
30
  title: 'Long-running Request Pause Time',
31
31
  description: %(
32
32
  Time in seconds to wait before returning a response to a hook invocation
33
- made when testing a long-running request. Must be at least 5 seconds,
34
- which is the minimum threshold for a long-running response as defined by CRD.
33
+ made when testing a long-running request. Must be at least #{MINIMUM_PAUSE_SECONDS} seconds,
34
+ which exceeds the 5 or 10 second response window CRD defines for each hook with enough
35
+ margin for the CRD client to recognize that the response is taking too long.
35
36
  ),
36
- default: '5'
37
+ default: MINIMUM_PAUSE_SECONDS.to_s
38
+ input :cds_jwt_iss,
39
+ title: 'CRD JWT Issuer',
40
+ description: ClientInputHelper.locked_cds_jwt_iss_description,
41
+ locked: true
42
+ payer_organization_id_inputs
43
+ flag_as_tester_initiated_exchange
37
44
 
38
45
  run do
39
46
  verify_long_running_pause_time_input
40
47
 
41
48
  identifier = cds_jwt_iss
42
- wait(
43
- identifier:,
44
- message: %(
45
- **Long Running Hook Request Test**:
49
+ wait(identifier:, message: wait_message)
50
+ end
51
+
52
+ # wait messages are rendered as given, so keep every line flush to avoid markdown reading
53
+ # the indentation as a code block
54
+ def wait_message
55
+ <<~MESSAGE
56
+ #### Long-Running Hook Request Test
57
+
58
+ Invoke any supported hook on one of the two Inferno simulated
59
+ CRD servers. This test will automatically continue once Inferno
60
+ has received a request, paused for #{long_running_pause_time.to_i}
61
+ seconds, and returned a response.
62
+
63
+ Users must have the option to continue working while waiting for Inferno's
64
+ response to be returned. Testers will be asked to certify that this was
65
+ demonstrated in the next test.
46
66
 
47
- Invoke any supported hook on one of the two Inferno simulated
48
- CRD servers discoverable at the following endpoints:
67
+ #{service_discovery_endpoints_section}
68
+ #### Authentication and Identification
49
69
 
50
- - Complete Prefetch: `#{discovery_url}`
51
- - Subset Prefetch: `#{prefetch_subset_discovery_url}`
70
+ #{session_identification_message}
52
71
 
53
- For Inferno to recognize these requests and associate them with this session,
54
- the authentication JWT sent as a Bearer token in the Authorization header
55
- must have `#{cds_jwt_iss}` as the `iss` claim in the JWT payload. This test
56
- will automatically continue once Inferno has received a request, paused
57
- for #{long_running_pause_time.to_i} seconds, and returned a response.
72
+ #### Responses
58
73
 
59
- Users must have the option to continue
60
- their workflow before Inferno's response is returned. Testers will be asked to
61
- attest that this was demonstrated in the next test.
62
- )
63
- )
74
+ Inferno will return a mocked coverage-information response.
75
+ MESSAGE
64
76
  end
65
77
 
66
78
  def verify_long_running_pause_time_input
67
- assert long_running_pause_time.to_i >= 5,
68
- 'The **Long-running Request Pause Time** input must be at least 5 seconds.'
79
+ assert long_running_pause_time.to_i >= MINIMUM_PAUSE_SECONDS,
80
+ "The **Long-running Request Pause Time** input must be at least #{MINIMUM_PAUSE_SECONDS} seconds."
69
81
  end
70
82
  end
71
83
  end