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
@@ -45,7 +45,7 @@ module DaVinciCRDTestKit
45
45
  client_access_token: { name: :encounter_start_client_access_token },
46
46
  client_fhir_server: { name: :encounter_start_client_fhir_server },
47
47
  crd_jwks_keys_json: { name: :encounter_start_crd_jwks_keys_json },
48
- custom_response_template: { name: :encounter_start_custom_response_template },
48
+ response_approach: { name: :encounter_start_response_approach },
49
49
  selected_response_types: { name: :encounter_start_selected_response_types }
50
50
  },
51
51
  outputs: {
@@ -66,11 +66,14 @@ module DaVinciCRDTestKit
66
66
 
67
67
  group do
68
68
  title 'Interaction'
69
+ id :crd_v221_encounter_start_interaction
70
+
69
71
  test from: :crd_v221_encounter_start_request
70
72
  end
71
73
 
72
74
  group do
73
75
  title 'Response Handling'
76
+ id :crd_v221_encounter_start_responses
74
77
 
75
78
  test from: :crd_v221_card_display_attest_test
76
79
  test from: :crd_v221_inferno_response_validation
@@ -78,9 +81,11 @@ module DaVinciCRDTestKit
78
81
 
79
82
  group do
80
83
  title 'Requests'
84
+ id :crd_v221_encounter_start_requests
85
+
81
86
  test from: :crd_v221_hook_request_conformance do
82
87
  verifies_requirements(*HookRequestConformanceTest.verifies_requirements,
83
- 'hl7.fhir.us.davinci-crd_2.2.1@hook-29')
88
+ 'hl7.fhir.us.davinci-crd_2.2.1@hook-27')
84
89
  end
85
90
  test from: :crd_v221_hook_request_requested_version
86
91
  test from: :crd_v221_hook_request_prefetch_profiles
@@ -93,6 +98,8 @@ module DaVinciCRDTestKit
93
98
 
94
99
  group do
95
100
  title 'Authorization'
101
+ id :crd_v221_encounter_start_auth
102
+
96
103
  test from: :crd_v221_decode_auth_token
97
104
  test from: :crd_v221_retrieve_jwks
98
105
  test from: :crd_v221_token_header
@@ -7,7 +7,7 @@ module DaVinciCRDTestKit
7
7
  class ClientFHIRAPIGroup < Inferno::TestGroup
8
8
  title 'FHIR API'
9
9
  description <<~DESCRIPTION
10
- CRD client systems are responsible for returning data requested by the CRD server needed to provide decision support.
10
+ CRD clients are responsible for returning data requested by the CRD server needed to provide decision support.
11
11
  This group contains tests that verify the required 'server' FHIR API capabilities.
12
12
  These 'server' capabilities are based on the US Core Server Capability Statement for the US Core version chosen
13
13
  when the test session was initiated.
@@ -17,9 +17,10 @@ module DaVinciCRDTestKit
17
17
  verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@conf-1'
18
18
 
19
19
  INPUT_INSTRUCTIONS = %(
20
- The location of and an access token for the client's FHIR server are expected to come in
20
+ The location of and an access token for the CRD client's FHIR server are expected to come in
21
21
  the CDS Hooks request. The following information will be auto-populated from
22
- the body of the latest hook invocation made during this session:
22
+ the body of the latest hook invocation made during this session
23
+ in one of the "Hooks" sub-groups or the "Additional Hook Invocations" group:
23
24
  - The URL of the CRD client FHIR server from the `fhirServer` field.
24
25
  - The OAuth Access Token from the `fhirAuthorization.access_token` field.
25
26
 
@@ -30,6 +31,21 @@ module DaVinciCRDTestKit
30
31
 
31
32
  input_instructions INPUT_INSTRUCTIONS
32
33
 
34
+ # The imported US Core tests refer to the tested system as "the server" or "the system under
35
+ # test"; within this suite it is the CRD client. General US Core requirement statements
36
+ # (e.g., "A server SHALL support...") are left as-is.
37
+ def self.rename_tested_system(runnable)
38
+ runnable.all_children.each do |child|
39
+ child.title(child.title.sub(/\A(?:FHIR )?Server /i, 'CRD client '))
40
+ description = child.description.to_s
41
+ .gsub(/\b([Tt])he(\s+)system\s+under\s+test\b/, '\\1he\\2CRD client')
42
+ .gsub(/\b([Tt])he(\s+)server(\s+)endpoint\b/, "\\1he\\2CRD client's\\3FHIR endpoint")
43
+ .gsub(/\b([Tt])he(\s+)server\b/, '\\1he\\2CRD client')
44
+ child.description(description) unless description == child.description.to_s
45
+ rename_tested_system(child)
46
+ end
47
+ end
48
+
33
49
  input :url,
34
50
  title: 'FHIR Endpoint',
35
51
  description: %(
@@ -54,6 +70,8 @@ module DaVinciCRDTestKit
54
70
  group from: :crd_v221_client_update_verification,
55
71
  id: :crd_v221_us_core_311_client_update_verification
56
72
  reorder :crd_v221_us_core_311_client_update_verification, 1
73
+
74
+ ClientFHIRAPIGroup.rename_tested_system(self)
57
75
  end
58
76
  group from: :'us_core_v610-us_core_v610_fhir_api' do
59
77
  description %(
@@ -69,6 +87,8 @@ module DaVinciCRDTestKit
69
87
  group from: :crd_v221_client_update_verification,
70
88
  id: :crd_v221_us_core_610_client_update_verification
71
89
  reorder :crd_v221_us_core_610_client_update_verification, 1
90
+
91
+ ClientFHIRAPIGroup.rename_tested_system(self)
72
92
  end
73
93
  group from: :'us_core_v700-us_core_v700_fhir_api' do
74
94
  description %(
@@ -84,6 +104,8 @@ module DaVinciCRDTestKit
84
104
  group from: :crd_v221_client_update_verification,
85
105
  id: :crd_v221_us_core_700_client_update_verification
86
106
  reorder :crd_v221_us_core_700_client_update_verification, 1
107
+
108
+ ClientFHIRAPIGroup.rename_tested_system(self)
87
109
  end
88
110
  end
89
111
  end
@@ -5,13 +5,14 @@ require_relative 'client_order_dispatch_group'
5
5
  require_relative 'client_order_select_group'
6
6
  require_relative 'client_order_sign_group'
7
7
  require_relative 'client_urls'
8
+ require_relative '../client_input_helper'
8
9
 
9
10
  module DaVinciCRDTestKit
10
11
  module V221
11
12
  class ClientHooksGroup < Inferno::TestGroup
12
13
  title 'Hooks'
13
14
  description <<~DESCRIPTION
14
- This group contains sub-groups which each verify the ability of the client to make and react to responses from
15
+ This group contains sub-groups which each verify the ability of the CRD client to make and react to responses from
15
16
  one of the [six hooks described in the CRD IG](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html):
16
17
  * [appointment-book](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#appointment-book)
17
18
  * [encounter-start](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-start)
@@ -21,13 +22,13 @@ module DaVinciCRDTestKit
21
22
  * [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-discharge)
22
23
 
23
24
  Each hook-specific group follows the same pattern:
24
- 1. Allow the client to make hook invocations for the tested hook, waiting until the tester indicates
25
+ 1. Allow the CRD client to make hook invocations for the tested hook, waiting until the tester indicates
25
26
  that all desired requests have been made, then
26
27
  2. Check the requests and their associated responses for conformance to CRD and CDS Hooks requirements.
27
- Additionally, ask the tester to confirm that the responses were displayed appropriately by the client.
28
+ Additionally, ask the tester to confirm that the responses were displayed appropriately by the CRD client.
28
29
 
29
30
  The CRD IG does not require support for any specific hook, so all the hook-specific sub-groups are
30
- optional. A conformant CRD client will have implemented at least one hook and will run and pass
31
+ optional. Conformant CRD clients will have implemented at least one hook and will run and pass
31
32
  the hook-specific groups corresponding to each hook that it implements.
32
33
 
33
34
  Inferno simulates two CRD discovery endpoints, each with service endpoints for all six CRD hooks
@@ -40,7 +41,7 @@ module DaVinciCRDTestKit
40
41
  * `order-sign` service id: `order-sign-service`
41
42
  * `order-dispatch` service id: `order-dispatch-service`
42
43
  * `encounter-discharge` service id: `encounter-discharge-service`
43
- - Discovery endpoint for services requesting the a subset of the [standard prefetch data set](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch):
44
+ - Discovery endpoint for services requesting a subset of the [standard prefetch data set](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch):
44
45
  `#{ClientURLs.prefetch_subset_discovery_url}`
45
46
  * `appointment-book` service id: `appointment-book-subset`
46
47
  * `encounter-start` service id: `encounter-start-subset`
@@ -53,11 +54,7 @@ module DaVinciCRDTestKit
53
54
 
54
55
  input :cds_jwt_iss,
55
56
  title: 'CRD JWT Issuer',
56
- description: %(
57
- Value of the `iss` claim that must be present in the JWT used to authorize the client's hook
58
- request sent as the Bearer token in the `Authorization` header.
59
- Run or re-run the "Registration" group to set or change this value.
60
- ),
57
+ description: ClientInputHelper.locked_cds_jwt_iss_description,
61
58
  locked: true
62
59
 
63
60
  input_order :cds_jwt_iss, :cds_jwk_set
@@ -4,14 +4,14 @@ require_relative 'long_running/client_skip_long_running_attestation_test'
4
4
  module DaVinciCRDTestKit
5
5
  module V221
6
6
  class ClientLongRunningHookGroup < Inferno::TestGroup
7
- title 'Long-running Hook Request'
7
+ title 'Long-Running Hook Request'
8
8
  id :crd_v221_client_long_running_hook
9
9
  description <<~DESCRIPTION
10
10
  When a hook invocation runs long, the CRD IG requires systems to provide
11
- users with a way to bypass the hook and continue their workflow.
11
+ users with a way to bypass the hook and continue working.
12
12
 
13
13
  Hook requests made during these tests will not be checked for conformance
14
- or included in the cross-hook analyses around must support and other coverage requirements.
14
+ or included in the cross-invocation analyses around must support and other coverage requirements.
15
15
  DESCRIPTION
16
16
 
17
17
  run_as_group
@@ -0,0 +1,40 @@
1
+ require_relative 'multiple_payers/client_multiple_payers_workflow_test'
2
+ require_relative 'multiple_payers/client_multiple_payers_request_verification_test'
3
+
4
+ module DaVinciCRDTestKit
5
+ module V221
6
+ class ClientMultiplePayersHookGroup < Inferno::TestGroup
7
+ title 'Multiple Payers'
8
+ id :crd_v221_client_multiple_payers_hook
9
+ description <<~DESCRIPTION
10
+ The CRD IG [requires](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/deviations.html#hook-invocation-for-multi-coverage-patients)
11
+ that CRD clients request coverage information details from at most one payer for each request.
12
+ During this scenario the tester will perform a workflow that triggers a hook invocation
13
+ for a patient that has two coverages each associated with a payer tied to a different Inferno
14
+ simulated CRD endpoint. Inferno will verify that the hook requests it receives solicit coverage
15
+ information from only one of them. This can be accomplished by either making a hook request
16
+ to only the payer associated with the primary coverage, or by making a hook request
17
+ to both and explicitly disabling the return of coverage information details on the request to
18
+ the payer associated with the secondary coverage using the [configuration option
19
+ extension](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/deviations.html#ci-c-dev-5)
20
+ which payers are required to support.
21
+
22
+ Hook requests made during these tests will not be checked for conformance
23
+ or included in the cross-invocation analyses around must support and other coverage requirements.
24
+ DESCRIPTION
25
+
26
+ run_as_group
27
+
28
+ config(
29
+ options: {
30
+ hook_name: ANY_HOOK_TAG,
31
+ crd_interaction_group: MULTIPLE_PAYERS_GROUP_TAG,
32
+ include_in_cross_hook_analysis: false
33
+ }
34
+ )
35
+
36
+ test from: :crd_v221_client_multiple_payers_workflow
37
+ test from: :crd_v221_client_multiple_payers_request_verification
38
+ end
39
+ end
40
+ end
@@ -47,7 +47,7 @@ module DaVinciCRDTestKit
47
47
  client_access_token: { name: :order_dispatch_client_access_token },
48
48
  client_fhir_server: { name: :order_dispatch_client_fhir_server },
49
49
  crd_jwks_keys_json: { name: :order_dispatch_crd_jwks_keys_json },
50
- custom_response_template: { name: :order_dispatch_custom_response_template },
50
+ response_approach: { name: :order_dispatch_response_approach },
51
51
  selected_response_types: { name: :order_dispatch_selected_response_types }
52
52
  },
53
53
  outputs: {
@@ -68,22 +68,27 @@ module DaVinciCRDTestKit
68
68
 
69
69
  group do
70
70
  title 'Interaction'
71
+ id :crd_v221_order_dispatch_interaction
72
+
71
73
  test from: :crd_v221_order_dispatch_request
72
74
  end
73
75
 
74
76
  group do
75
77
  title 'Response Handling'
78
+ id :crd_v221_order_dispatch_responses
76
79
 
77
80
  test from: :crd_v221_card_display_attest_test
78
81
  test from: :crd_v221_inferno_response_validation
79
82
  test from: :crd_v221_client_hook_response_support_coverage_information do
80
- title 'Client supports the Coverage Information response type on the order-dispatch hook'
83
+ title 'CRD client supports the Coverage Information response type on the order-dispatch hook'
81
84
  verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-33'
82
85
  end
83
86
  end
84
87
 
85
88
  group do
86
89
  title 'Requests'
90
+ id :crd_v221_order_dispatch_requests
91
+
87
92
  test from: :crd_v221_hook_request_conformance do
88
93
  verifies_requirements(*HookRequestConformanceTest.verifies_requirements,
89
94
  'hl7.fhir.us.davinci-crd_2.2.1@hook-31')
@@ -99,6 +104,8 @@ module DaVinciCRDTestKit
99
104
 
100
105
  group do
101
106
  title 'Authorization'
107
+ id :crd_v221_order_dispatch_auth
108
+
102
109
  test from: :crd_v221_decode_auth_token
103
110
  test from: :crd_v221_retrieve_jwks
104
111
  test from: :crd_v221_token_header
@@ -46,7 +46,7 @@ module DaVinciCRDTestKit
46
46
  client_access_token: { name: :order_select_client_access_token },
47
47
  client_fhir_server: { name: :order_select_client_fhir_server },
48
48
  crd_jwks_keys_json: { name: :order_select_crd_jwks_keys_json },
49
- custom_response_template: { name: :order_select_custom_response_template },
49
+ response_approach: { name: :order_select_response_approach },
50
50
  selected_response_types: { name: :order_select_selected_response_types }
51
51
  },
52
52
  outputs: {
@@ -67,11 +67,14 @@ module DaVinciCRDTestKit
67
67
 
68
68
  group do
69
69
  title 'Interaction'
70
+ id :crd_v221_order_select_interaction
71
+
70
72
  test from: :crd_v221_order_select_request
71
73
  end
72
74
 
73
75
  group do
74
76
  title 'Response Handling'
77
+ id :crd_v221_order_select_responses
75
78
 
76
79
  test from: :crd_v221_card_display_attest_test
77
80
  test from: :crd_v221_inferno_response_validation
@@ -79,6 +82,8 @@ module DaVinciCRDTestKit
79
82
 
80
83
  group do
81
84
  title 'Requests'
85
+ id :crd_v221_order_select_requests
86
+
82
87
  test from: :crd_v221_hook_request_conformance do
83
88
  verifies_requirements(*HookRequestConformanceTest.verifies_requirements,
84
89
  'hl7.fhir.us.davinci-crd_2.2.1@hook-35',
@@ -100,6 +105,8 @@ module DaVinciCRDTestKit
100
105
 
101
106
  group do
102
107
  title 'Authorization'
108
+ id :crd_v221_order_select_auth
109
+
103
110
  test from: :crd_v221_decode_auth_token
104
111
  test from: :crd_v221_retrieve_jwks
105
112
  test from: :crd_v221_token_header
@@ -47,7 +47,7 @@ module DaVinciCRDTestKit
47
47
  client_access_token: { name: :order_sign_client_access_token },
48
48
  client_fhir_server: { name: :order_sign_client_fhir_server },
49
49
  crd_jwks_keys_json: { name: :order_sign_crd_jwks_keys_json },
50
- custom_response_template: { name: :order_sign_custom_response_template },
50
+ response_approach: { name: :order_sign_response_approach },
51
51
  selected_response_types: { name: :order_sign_selected_response_types }
52
52
  },
53
53
  outputs: {
@@ -68,22 +68,27 @@ module DaVinciCRDTestKit
68
68
 
69
69
  group do
70
70
  title 'Interaction'
71
+ id :crd_v221_order_sign_interaction
72
+
71
73
  test from: :crd_v221_order_sign_request
72
74
  end
73
75
 
74
76
  group do
75
77
  title 'Response Handling'
78
+ id :crd_v221_order_sign_responses
76
79
 
77
80
  test from: :crd_v221_card_display_attest_test
78
81
  test from: :crd_v221_inferno_response_validation
79
82
  test from: :crd_v221_client_hook_response_support_coverage_information do
80
- title 'Client supports the Coverage Information response type on the order-sign hook'
83
+ title 'CRD client supports the Coverage Information response type on the order-sign hook'
81
84
  verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-39'
82
85
  end
83
86
  end
84
87
 
85
88
  group do
86
89
  title 'Requests'
90
+ id :crd_v221_order_sign_requests
91
+
87
92
  test from: :crd_v221_hook_request_conformance do
88
93
  verifies_requirements(*HookRequestConformanceTest.verifies_requirements,
89
94
  'hl7.fhir.us.davinci-crd_2.2.1@hook-37',
@@ -105,6 +110,8 @@ module DaVinciCRDTestKit
105
110
 
106
111
  group do
107
112
  title 'Authorization'
113
+ id :crd_v221_order_sign_auth
114
+
108
115
  test from: :crd_v221_decode_auth_token
109
116
  test from: :crd_v221_retrieve_jwks
110
117
  test from: :crd_v221_token_header
@@ -7,22 +7,22 @@ module DaVinciCRDTestKit
7
7
  id :crd_v221_client_registration
8
8
  title 'Registration'
9
9
  description %(
10
- Before hook invocations can be made, the client tested in this session
11
- must be registered with and trusted by Inferno's simulated CRD server
10
+ Before hook invocations can be made, the CRD client tested in this session
11
+ must be registered with and trusted by Inferno's simulated CRD servers
12
12
  and vice-versa. Tests in this group confirm the registration of the partner
13
13
  system on both ends.
14
14
 
15
- Inferno simulates two CRD discovery endpoints for the client to connect to:
15
+ Inferno simulates two CRD servers with discovery endpoints for the CRD client to connect to:
16
16
  - Discovery endpoint for services requesting the complete [standard prefetch data set](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch):
17
17
  `#{ClientURLs.discovery_url}`
18
- - Discovery endpoint for services requesting the a subset of the [standard prefetch data set](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch):
18
+ - Discovery endpoint for services requesting a subset of the [standard prefetch data set](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch):
19
19
  `#{ClientURLs.prefetch_subset_discovery_url}`
20
20
 
21
21
  This group must be run before any other tests in the "Hook Invocation" group because inputs
22
22
  provided to this group will be used by Inferno for the remainder of the tests
23
- to identify client requests and verify behavior. The inputs will appear as locked and
24
- unchangeable on these subsequent tests. If changes to these values are needed,
25
- re-run this group and provide the corrected input values.
23
+ to identify requests made by the CRD client and verify behavior. The inputs will
24
+ appear as locked and unchangeable on these subsequent tests. If changes to these
25
+ values are needed, re-run this group and provide the corrected input values.
26
26
  )
27
27
  run_as_group
28
28
 
@@ -1,6 +1,8 @@
1
1
  require_relative 'client_long_running_hook_group'
2
2
  require_relative 'client_unknown_content_hook_group'
3
3
  require_relative 'client_self_pay_hook_group'
4
+ require_relative 'client_multiple_payers_hook_group'
5
+ require_relative 'client_user_access_level_group'
4
6
 
5
7
  module DaVinciCRDTestKit
6
8
  module V221
@@ -9,18 +11,22 @@ module DaVinciCRDTestKit
9
11
  id :crd_v221_client_scenarios
10
12
  description <<~DESCRIPTION
11
13
  This group checks CRD requirements that pertain to specific scenarios
12
- that clients need to handle.
14
+ that CRD clients need to handle.
13
15
 
14
- These scenarios test specific situations and conformance details of requests
15
- and responses beyond those required for the scenario and for Inferno to
16
- recognize client requests are not checked. Testers are expected to follow
16
+ These scenario tests do not check requirements beyond those required for
17
+ Inferno to recognize CRD client requests and confirm the exchange represents
18
+ the target scenario. However, testers are expected to follow
17
19
  the same workflows as used during other tests and should adhere to the
18
20
  same CRD requirements when performing these scenarios.
19
21
  DESCRIPTION
20
22
 
23
+ input_order :long_running_pause_time, :access_level_target_reference
24
+
21
25
  group from: :crd_v221_client_long_running_hook
22
26
  group from: :crd_v221_client_unknown_content_hook
23
27
  group from: :crd_v221_client_self_pay_hook
28
+ group from: :crd_v221_client_multiple_payers_hook
29
+ group from: :crd_v221_client_user_access_level
24
30
  end
25
31
  end
26
32
  end
@@ -1,5 +1,4 @@
1
1
  require_relative 'self_pay/client_self_pay_workflow_test'
2
- require_relative 'self_pay/client_self_pay_no_request_test'
3
2
 
4
3
  module DaVinciCRDTestKit
5
4
  module V221
@@ -7,7 +6,7 @@ module DaVinciCRDTestKit
7
6
  title 'Self-Pay'
8
7
  id :crd_v221_client_self_pay_hook
9
8
  description <<~DESCRIPTION
10
- The CRD IG requires clients to invoke hooks on payer services only when the patient
9
+ The CRD IG requires that CRD clients invoke hooks on payer services only when the patient
11
10
  record indicates active coverage with the payer associated with the service and there
12
11
  is no recorded indication that the patient intends to bypass insurance coverage, i.e.,
13
12
  the service or product is not flagged as 'self-pay'. During this scenario the tester
@@ -16,7 +15,7 @@ module DaVinciCRDTestKit
16
15
  will verify that no hook requests are made.
17
16
 
18
17
  Any hook requests made during these tests will not be checked for conformance
19
- or included in the cross-hook analyses around must support and other coverage requirements.
18
+ or included in the cross-invocation analyses around must support and other coverage requirements.
20
19
  DESCRIPTION
21
20
 
22
21
  run_as_group
@@ -30,7 +29,6 @@ module DaVinciCRDTestKit
30
29
  )
31
30
 
32
31
  test from: :crd_v221_client_self_pay_workflow
33
- test from: :crd_v221_client_self_pay_no_request
34
32
  end
35
33
  end
36
34
  end
@@ -7,14 +7,14 @@ module DaVinciCRDTestKit
7
7
  title 'Unknown Response Content'
8
8
  id :crd_v221_client_unknown_content_hook
9
9
  description <<~DESCRIPTION
10
- CRD servers may return content that clients do not recognize, and the CRD IG requires
11
- clients to ignore it rather than fail. During this scenario Inferno returns coverage
10
+ CRD servers may return content that CRD clients do not recognize, and the CRD IG requires
11
+ CRD clients to ignore it rather than fail. During this scenario Inferno returns coverage
12
12
  information accompanied by an element within the system action and a custom extension
13
13
  on the response, both with randomly generated names. This content is added at the CRD
14
14
  response level rather than within the FHIR resources carried in the response.
15
15
 
16
16
  Hook requests made during these tests will not be checked for conformance
17
- or included in the cross-hook analyses around must support and other coverage requirements.
17
+ or included in the cross-invocation analyses around must support and other coverage requirements.
18
18
  DESCRIPTION
19
19
 
20
20
  run_as_group
@@ -0,0 +1,82 @@
1
+ require_relative 'user_access_level/access_level_receive_request_test'
2
+ require_relative 'user_access_level/access_level_same_scenario_test'
3
+ require_relative 'user_access_level/access_level_api_access_test'
4
+ require_relative 'user_access_level/access_level_prefetch_scope_test'
5
+ require_relative '../../cross_suite/tags'
6
+
7
+ module DaVinciCRDTestKit
8
+ module V221
9
+ class ClientUserAccessLevelGroup < Inferno::TestGroup
10
+ title 'User Access Level Scoping'
11
+ id :crd_v221_client_user_access_level
12
+ description <<~DESCRIPTION
13
+ This group verifies that during a CDS Service hook invocation, access to data on
14
+ the CRD client's FHIR server is scoped to the authorized access level of the user
15
+ when the hook is invoked. Testers will invoke a hook twice, each time with consistent
16
+ content (e.g., an order for the same service): once as a user with full access, and
17
+ again as a user with limited access. Testers will provide a reference to a resource
18
+ that the full-access user is expected to be able to access while the limited-access user
19
+ cannot. If possible, the resource should be in the set of prefetched data that Inferno
20
+ requests. Inferno will use the access token supplied in each hook request to read that
21
+ resource and will compare the two runs to confirm that data available to the payer differs
22
+ according to the user's access level, both in provided prefetch data and in what can be
23
+ retrieved using the access token provided in the hook request.
24
+
25
+ Hook requests made during these tests will not be checked for conformance beyond scenario
26
+ requirements for confirming that both hook requests contain consistent content. The requests
27
+ will not be included in the cross-invocation analyses around must support and other coverage
28
+ requirements.
29
+ DESCRIPTION
30
+
31
+ run_as_group
32
+
33
+ input_order :access_level_target_reference
34
+
35
+ config(
36
+ options: {
37
+ hook_name: ANY_HOOK_TAG,
38
+ include_in_cross_hook_analysis: false
39
+ }
40
+ )
41
+
42
+ # only the interaction group differs, so that the two runs' requests can be told apart
43
+ test from: :crd_v221_access_level_receive_request, id: :crd_v221_access_level_receive_request_full do
44
+ title 'CRD client invokes a hook as a full-access user'
45
+ description %(
46
+ During this test, Inferno will wait while the CRD client makes a single hook request of any
47
+ type, made while the tester is signed in as a user with full access.
48
+
49
+ Inferno will use the access token in the request to attempt to read the resource
50
+ referenced in the **Target Resource Reference** input and will return a
51
+ [mocked](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
52
+ coverage-information response. The details of the request and its response are not
53
+ evaluated or checked for conformance in this test. The test will automatically continue
54
+ once Inferno has received a single valid hook request.
55
+ )
56
+ config options: { crd_interaction_group: ACCESS_LEVEL_FULL_GROUP_TAG }
57
+ end
58
+
59
+ test from: :crd_v221_access_level_receive_request, id: :crd_v221_access_level_receive_request_limited do
60
+ title 'CRD client invokes the same hook as a limited-access user'
61
+ description %(
62
+ During this test, Inferno will wait while the CRD client makes a single hook request, made
63
+ while the tester is signed in as a user with limited access. It must invoke the same hook
64
+ for the same patient and the same order(s), appointment(s), or encounter as the full-access
65
+ request made during the previous test.
66
+
67
+ Inferno will use the access token in the request to attempt to read the resource
68
+ referenced in the **Target Resource Reference** input and will return a
69
+ [mocked](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses#mocked-responses)
70
+ coverage-information response. The details of the request and its response are not
71
+ evaluated or checked for conformance in this test. The test will automatically continue
72
+ once Inferno has received a single valid hook request.
73
+ )
74
+ config options: { crd_interaction_group: ACCESS_LEVEL_LIMITED_GROUP_TAG }
75
+ end
76
+
77
+ test from: :crd_v221_access_level_same_scenario
78
+ test from: :crd_v221_access_level_api_access
79
+ test from: :crd_v221_access_level_prefetch_scope
80
+ end
81
+ end
82
+ end
@@ -29,18 +29,22 @@ module DaVinciCRDTestKit
29
29
  [provide feedback](https://github.com/inferno-framework/davinci-crd-test-kit/issues) on the tests.
30
30
  Future versions of these tests may validate other requirements and may change how these are tested.
31
31
 
32
- Detailed information about this test suite can be found in the
32
+ Before running these tests, testers should be familiar with
33
+ - [Inferno's client testing paradigm as used in this CRD client suite](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#client-testing-paradigm)
34
+ - [Inferno's approach to simulating CRD hook responses](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details#tester-provided-responses)
35
+
36
+ Additional information about this test suite can be found in the
33
37
  [client section](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Details) of the
34
38
  [CRD Test Kit Wiki](https://github.com/inferno-framework/davinci-crd-test-kit/wiki), including:
35
39
  - [What testers need to successfully execute these tests](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Instructions-v2.2.1#pre-execution-setup-and-required-information),
36
40
  - [Minimal](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Instructions-v2.2.1#quick-start)
37
41
  and [complete](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Instructions-v2.2.1#additional-testing-options)
38
- instructions for executing against a client system, and
42
+ instructions for executing this suite against a CRD client, and
39
43
  - How to [interpret test results](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Client-Instructions-v2.2.1#interpreting-results).
40
44
  DESCRIPTION
41
45
 
42
46
  suite_summary <<~SUMMARY
43
- The Da Vinci CRD Client v2.2.1 Test Suite tests the conformance of client systems
47
+ The Da Vinci CRD Client v2.2.1 Test Suite tests the conformance of CRD clients
44
48
  to [version 2.2.1 of the Da Vinci Coverage Requirements Discovery (CRD)
45
49
  Implementation Guide](https://hl7.org/fhir/us/davinci-crd/2.2.1).
46
50
  SUMMARY
@@ -7,16 +7,16 @@ module DaVinciCRDTestKit
7
7
  include CardsIdentification
8
8
  include TaggedRequestLoadHelper
9
9
 
10
- title 'Client supports the Coverage Information response type'
10
+ title 'CRD client supports the Coverage Information response type'
11
11
  id :crd_v221_client_card_must_support_coverage_information
12
12
  description <<~DESCRIPTION
13
- During this test, Inferno will verify that the client demonstrated support for the [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information)
14
- response type for this hook. At least one hook invocation received during this group must have returned a Coverage Information action.
13
+ During this test, Inferno will verify that the CRD client demonstrated support for the [Coverage Information](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/cards.html#coverage-information-response-type)
14
+ response type. At least one hook invocation received during this session must have returned a Coverage Information action.
15
15
  Additionally, all [coverage-information extension](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-ext-coverage-information.html)
16
16
  must support elements must be demonstrated across all the returned actions.
17
17
 
18
18
  If this test fails, adjust the [cards returned by Inferno's simulated CRD server](https://github.com/inferno-framework/davinci-crd-test-kit/wiki/Controlling-Simulated-Responses)
19
- and/or the hook requests made by the client during the Hooks tests such that Coverage Information actions are returned
19
+ and/or the hook requests made by the CRD client during the Hooks tests such that Coverage Information actions are returned
20
20
  that cover the full scope of the [coverage-information extension](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/StructureDefinition-ext-coverage-information.html)
21
21
  and support for them is demonstrated.
22
22
  DESCRIPTION
@@ -5,10 +5,10 @@ module DaVinciCRDTestKit
5
5
  class ClientFHIRPathCollectionAsCommaDelimitedStringTest < Inferno::Test
6
6
  include CrossHookHelper
7
7
 
8
- title 'Client correctly interprets collections when substituting FHIRPath results in prefetch templates'
8
+ title 'CRD client correctly interprets collections when substituting FHIRPath results in prefetch templates'
9
9
  id :crd_v221_client_fhir_path_collection_as_comma_delimited_string
10
10
  description <<~DESCRIPTION
11
- The CDS Hooks specification requires that when a FHIRPath token in A
11
+ The CDS Hooks specification requires that when a FHIRPath token in a
12
12
  prefetch template resolves to a collection of datatypes (e.g., resource ids),
13
13
  then the collection gets turned into a comma-delimited string when instantiating
14
14
  the prefetch template.
@@ -16,7 +16,7 @@ module DaVinciCRDTestKit
16
16
  During this test, Inferno will verify that during a previously-run hook test,
17
17
  there was at least one instance of a prefetch template that has a
18
18
  token which Inferno expects to result in a collection with multiple unique members.
19
- Note that this does not test whether the client correctly
19
+ Note that this does not test whether the CRD client correctly
20
20
  handles the collection, which is checked by the
21
21
  "Hook requests include the requested prefetch data" test.
22
22