davinci_dtr_test_kit 0.14.2 → 0.15.1

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 (170) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/full_ehr_postman_dinner_order_example_postman.json +19 -0
  3. data/config/presets/full_ehr_postman_respiratory_device_example.json +15 -0
  4. data/config/presets/light_ehr_ref_server_local.json +105 -0
  5. data/config/presets/light_ehr_ref_server_prod.json +85 -0
  6. data/config/presets/payer_server_adaptive_client_flow.json +37 -0
  7. data/config/presets/payer_server_adaptive_manual_flow.json +44 -0
  8. data/config/presets/payer_server_run_against_smart_app_tests.json +35 -0
  9. data/config/presets/smart_app_postman_dinner_order_example.json +44 -0
  10. data/config/presets/smart_app_postman_respiratory_device_example.json +43 -0
  11. data/lib/davinci_dtr_test_kit/auth_groups/token_validation_test.rb +1 -1
  12. data/lib/davinci_dtr_test_kit/client_groups/custom_static/dtr_custom_questionnaire_expressions_test.rb +22 -0
  13. data/lib/davinci_dtr_test_kit/client_groups/custom_static/dtr_custom_questionnaire_extensions_test.rb +19 -0
  14. data/lib/davinci_dtr_test_kit/client_groups/custom_static/dtr_custom_questionnaire_libraries_test.rb +21 -0
  15. data/lib/davinci_dtr_test_kit/client_groups/custom_static/dtr_custom_questionnaire_package_validation_test.rb +39 -0
  16. data/lib/davinci_dtr_test_kit/client_groups/custom_static/dtr_full_ehr_custom_static_workflow_group.rb +122 -0
  17. data/lib/davinci_dtr_test_kit/client_groups/custom_static/dtr_smart_app_custom_static_workflow_group.rb +91 -0
  18. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_adaptive_questionnaire_completion_group.rb → dtr_adaptive_completion_group.rb} +4 -4
  19. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_adaptive_questionnaire_followup_questions_group.rb → dtr_adaptive_followup_questions_group.rb} +4 -4
  20. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_adaptive_questionnaire_next_question_request_test.rb → dtr_adaptive_next_question_request_test.rb} +3 -2
  21. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_adaptive_questionnaire_next_question_request_validation_test.rb → dtr_adaptive_next_question_request_validation_test.rb} +3 -2
  22. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_adaptive_questionnaire_next_question_retrieval_group.rb → dtr_adaptive_next_question_retrieval_group.rb} +8 -8
  23. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_adaptive_questionnaire_response_validation_test.rb → dtr_adaptive_response_validation_test.rb} +6 -4
  24. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_full_ehr_adaptive_dinner_questionnaire_workflow_group.rb → dtr_full_ehr_adaptive_dinner_workflow_group.rb} +14 -12
  25. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_full_ehr_adaptive_questionnaire_initial_retrieval_group.rb → dtr_full_ehr_adaptive_initial_retrieval_group.rb} +10 -10
  26. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_full_ehr_adaptive_questionnaire_request_test.rb → dtr_full_ehr_adaptive_request_test.rb} +4 -2
  27. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_smart_app_questionnaire_workflow_group.rb → dtr_smart_app_adaptive_dinner_workflow_group.rb} +25 -19
  28. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/dtr_smart_app_adaptive_initial_retrieval_group.rb +24 -0
  29. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/{dtr_smart_app_adaptive_questionnaire_request_test.rb → dtr_smart_app_adaptive_request_test.rb} +2 -2
  30. data/lib/davinci_dtr_test_kit/client_groups/dinner_static/{dtr_full_ehr_questionnaire_workflow_group.rb → dtr_full_ehr_static_dinner_workflow_group.rb} +15 -14
  31. data/lib/davinci_dtr_test_kit/client_groups/dinner_static/{dtr_smart_app_questionnaire_workflow_group.rb → dtr_smart_app_static_dinner_workflow_group.rb} +18 -13
  32. data/lib/davinci_dtr_test_kit/client_groups/{full_ehr/dtr_full_ehr_rendering_enabled_questions_attestation_test.rb → dinner_static/dtr_static_dinner_enabled_questions_attestation_test.rb} +2 -2
  33. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_launch_attestation_test.rb +8 -3
  34. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_prepopulation_attestation_test.rb +3 -1
  35. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_prepopulation_override_attestation_test.rb +2 -1
  36. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_questionnaire_package_request_test.rb +2 -1
  37. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_questionnaire_response_conformance_test.rb +6 -1
  38. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_questionnaire_response_correctness_test.rb +11 -22
  39. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_saving_questionnaire_response_group.rb +4 -4
  40. data/lib/davinci_dtr_test_kit/client_groups/full_ehr/dtr_full_ehr_store_attestation_test.rb +2 -1
  41. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_endpoints_group.rb +22 -0
  42. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_payers_accept_header_test.rb +26 -0
  43. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_payers_config_test.rb +34 -0
  44. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_payers_endpoint_test.rb +44 -0
  45. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_payers_use_test.rb +32 -0
  46. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_payers_user_response_test.rb +70 -0
  47. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_smart_ehr_launch.rb +18 -0
  48. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/fhir_context_coverage_test.rb +42 -0
  49. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/fhir_context_references_test.rb +59 -0
  50. data/lib/davinci_dtr_test_kit/client_groups/light_ehr/fhir_launch_context_test.rb +23 -0
  51. data/lib/davinci_dtr_test_kit/client_groups/{resp_assist_device/dtr_questionnaire_package_group.rb → respiratory/dtr_respiratory_questionnaire_package_group.rb} +5 -5
  52. data/lib/davinci_dtr_test_kit/client_groups/{resp_assist_device/dtr_resp_questionnaire_package_request_test.rb → respiratory/dtr_respiratory_questionnaire_package_request_test.rb} +2 -2
  53. data/lib/davinci_dtr_test_kit/client_groups/{resp_assist_device/dtr_questionnaire_response_group.rb → respiratory/dtr_respiratory_questionnaire_response_group.rb} +7 -7
  54. data/lib/davinci_dtr_test_kit/client_groups/{resp_assist_device/dtr_questionnaire_response_save_test.rb → respiratory/dtr_respiratory_questionnaire_response_save_test.rb} +2 -2
  55. data/lib/davinci_dtr_test_kit/client_groups/{resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb → respiratory/dtr_respiratory_rendering_attestation_test.rb} +2 -2
  56. data/lib/davinci_dtr_test_kit/client_groups/respiratory/dtr_respiratory_rendering_group.rb +14 -0
  57. data/lib/davinci_dtr_test_kit/client_groups/{resp_assist_device/dtr_smart_app_questionnaire_workflow_group.rb → respiratory/dtr_smart_app_respiratory_workflow_group.rb} +8 -8
  58. data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_prepopulation_attestation_test.rb +33 -0
  59. data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_prepopulation_override_attestation_test.rb +36 -0
  60. data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_questionnaire_package_request_validation_test.rb +3 -1
  61. data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_questionnaire_response_basic_conformance_test.rb +8 -4
  62. data/lib/davinci_dtr_test_kit/client_groups/shared/{dtr_questionnaire_response_pre_population_test.rb → dtr_questionnaire_response_prepopulation_test.rb} +5 -2
  63. data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_rendering_attestation_test.rb +32 -0
  64. data/lib/davinci_dtr_test_kit/client_groups/smart_app/dtr_smart_app_prepopulation_attestation_test.rb +3 -1
  65. data/lib/davinci_dtr_test_kit/client_groups/smart_app/dtr_smart_app_prepopulation_override_attestation_test.rb +1 -1
  66. data/lib/davinci_dtr_test_kit/client_groups/{dinner_static/dtr_smart_app_dinner_questionnaire_package_request_test.rb → smart_app/dtr_smart_app_questionnaire_package_request_test.rb} +6 -6
  67. data/lib/davinci_dtr_test_kit/client_groups/smart_app/dtr_smart_app_questionnaire_response_correctness_test.rb +30 -0
  68. data/lib/davinci_dtr_test_kit/client_groups/smart_app/dtr_smart_app_questionnaire_response_save_test.rb +2 -2
  69. data/lib/davinci_dtr_test_kit/client_groups/smart_app/dtr_smart_app_saving_questionnaire_response_group.rb +3 -7
  70. data/lib/davinci_dtr_test_kit/cql_test.rb +58 -0
  71. data/lib/davinci_dtr_test_kit/docs/dtr_light_ehr_suite_description_v201.md +9 -6
  72. data/lib/davinci_dtr_test_kit/dtr_full_ehr_suite.rb +19 -6
  73. data/lib/davinci_dtr_test_kit/dtr_light_ehr_suite.rb +60 -40
  74. data/lib/davinci_dtr_test_kit/dtr_payer_server_suite.rb +0 -2
  75. data/lib/davinci_dtr_test_kit/dtr_questionnaire_response_validation.rb +50 -4
  76. data/lib/davinci_dtr_test_kit/dtr_smart_app_suite.rb +9 -9
  77. data/lib/davinci_dtr_test_kit/endpoints/mock_authorization.rb +10 -2
  78. data/lib/davinci_dtr_test_kit/endpoints/mock_ehr.rb +17 -1
  79. data/lib/davinci_dtr_test_kit/endpoints/mock_payer/light_ehr_supported_payer_endpoint.rb +44 -0
  80. data/lib/davinci_dtr_test_kit/endpoints/mock_payer/questionnaire_package_endpoint.rb +7 -1
  81. data/lib/davinci_dtr_test_kit/fixtures.rb +6 -6
  82. data/lib/davinci_dtr_test_kit/igs/davinci_dtr_2.0.1.tgz +0 -0
  83. data/lib/davinci_dtr_test_kit/metadata.rb +104 -0
  84. data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_form_libraries_test.rb +4 -1
  85. data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_form_questionnaire_expressions_test.rb +2 -1
  86. data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_form_questionnaire_extensions_test.rb +4 -1
  87. data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_next_questionnaire_expressions_test.rb +1 -0
  88. data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_next_questionnaire_extensions_test.rb +4 -1
  89. data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_request_test.rb +2 -0
  90. data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_response_bundles_validation_test.rb +3 -2
  91. data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_response_search_validation_test.rb +8 -3
  92. data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_response_validation_test.rb +6 -15
  93. data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_next_response_complete_test.rb +1 -0
  94. data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_static_group.rb +1 -1
  95. data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_libraries_test.rb +4 -1
  96. data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_questionnaire_expressions_test.rb +2 -1
  97. data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_questionnaire_extensions_test.rb +4 -1
  98. data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_request_test.rb +3 -1
  99. data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_response_validation_test.rb +6 -15
  100. data/lib/davinci_dtr_test_kit/profiles/communication_request/communication_request_must_support_test.rb +46 -0
  101. data/lib/davinci_dtr_test_kit/profiles/communication_request/communication_request_read.rb +6 -3
  102. data/lib/davinci_dtr_test_kit/profiles/communication_request/communication_request_validation.rb +9 -8
  103. data/lib/davinci_dtr_test_kit/profiles/communication_request/metadata.yml +135 -0
  104. data/lib/davinci_dtr_test_kit/profiles/communication_request_group.rb +9 -0
  105. data/lib/davinci_dtr_test_kit/profiles/coverage/coverage_must_support_test.rb +54 -0
  106. data/lib/davinci_dtr_test_kit/profiles/coverage/coverage_read.rb +5 -3
  107. data/lib/davinci_dtr_test_kit/profiles/coverage/coverage_validation.rb +9 -8
  108. data/lib/davinci_dtr_test_kit/profiles/coverage/metadata.yml +133 -0
  109. data/lib/davinci_dtr_test_kit/profiles/coverage_group.rb +8 -0
  110. data/lib/davinci_dtr_test_kit/profiles/device_request/device_request_must_support_test.rb +45 -0
  111. data/lib/davinci_dtr_test_kit/profiles/device_request/device_request_read.rb +6 -3
  112. data/lib/davinci_dtr_test_kit/profiles/device_request/device_request_validation.rb +9 -8
  113. data/lib/davinci_dtr_test_kit/profiles/device_request/metadata.yml +130 -0
  114. data/lib/davinci_dtr_test_kit/profiles/device_request_group.rb +9 -0
  115. data/lib/davinci_dtr_test_kit/profiles/encounter/encounter_must_support_test.rb +58 -0
  116. data/lib/davinci_dtr_test_kit/profiles/encounter/encounter_read.rb +6 -3
  117. data/lib/davinci_dtr_test_kit/profiles/encounter/encounter_validation.rb +9 -8
  118. data/lib/davinci_dtr_test_kit/profiles/encounter/metadata.yml +169 -0
  119. data/lib/davinci_dtr_test_kit/profiles/encounter_group.rb +9 -0
  120. data/lib/davinci_dtr_test_kit/profiles/medication_request/medication_request_must_support_test.rb +50 -0
  121. data/lib/davinci_dtr_test_kit/profiles/medication_request/medication_request_read.rb +6 -3
  122. data/lib/davinci_dtr_test_kit/profiles/medication_request/medication_request_validation.rb +9 -8
  123. data/lib/davinci_dtr_test_kit/profiles/medication_request/metadata.yml +159 -0
  124. data/lib/davinci_dtr_test_kit/profiles/medication_request_group.rb +9 -0
  125. data/lib/davinci_dtr_test_kit/profiles/nutrition_order/metadata.yml +94 -0
  126. data/lib/davinci_dtr_test_kit/profiles/nutrition_order/nutrition_order_must_support_test.rb +45 -0
  127. data/lib/davinci_dtr_test_kit/profiles/nutrition_order/nutrition_order_read.rb +6 -3
  128. data/lib/davinci_dtr_test_kit/profiles/nutrition_order/nutrition_order_validation.rb +9 -8
  129. data/lib/davinci_dtr_test_kit/profiles/nutrition_order_group.rb +9 -0
  130. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_context_search.rb +3 -1
  131. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_create.rb +1 -0
  132. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_must_support_test.rb +54 -0
  133. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_patient_search.rb +3 -1
  134. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_read.rb +2 -1
  135. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_update.rb +1 -0
  136. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response/questionnaire_response_validation.rb +1 -1
  137. data/lib/davinci_dtr_test_kit/profiles/questionnaire_response_group.rb +11 -1
  138. data/lib/davinci_dtr_test_kit/profiles/service_request/metadata.yml +140 -0
  139. data/lib/davinci_dtr_test_kit/profiles/service_request/service_request_must_support_test.rb +47 -0
  140. data/lib/davinci_dtr_test_kit/profiles/service_request/service_request_read.rb +6 -3
  141. data/lib/davinci_dtr_test_kit/profiles/service_request/service_request_validation.rb +9 -8
  142. data/lib/davinci_dtr_test_kit/profiles/service_request_group.rb +9 -0
  143. data/lib/davinci_dtr_test_kit/profiles/task/metadata.yml +165 -0
  144. data/lib/davinci_dtr_test_kit/profiles/task/task_create.rb +1 -0
  145. data/lib/davinci_dtr_test_kit/profiles/task/task_must_support_test.rb +46 -0
  146. data/lib/davinci_dtr_test_kit/profiles/task/task_read.rb +6 -3
  147. data/lib/davinci_dtr_test_kit/profiles/task/task_update.rb +1 -0
  148. data/lib/davinci_dtr_test_kit/profiles/task/task_validation.rb +9 -8
  149. data/lib/davinci_dtr_test_kit/profiles/task_group.rb +11 -1
  150. data/lib/davinci_dtr_test_kit/profiles/vision_prescription/metadata.yml +107 -0
  151. data/lib/davinci_dtr_test_kit/profiles/vision_prescription/vision_prescription_must_support_test.rb +54 -0
  152. data/lib/davinci_dtr_test_kit/profiles/vision_prescription/vision_prescription_read.rb +6 -3
  153. data/lib/davinci_dtr_test_kit/profiles/vision_prescription/vision_prescription_validation.rb +9 -8
  154. data/lib/davinci_dtr_test_kit/profiles/vision_prescription_group.rb +9 -0
  155. data/lib/davinci_dtr_test_kit/read_test.rb +5 -0
  156. data/lib/davinci_dtr_test_kit/requirements/davinci-dtr-test-kit_out_of_scope_requirements.csv +13 -0
  157. data/lib/davinci_dtr_test_kit/requirements/davinci-dtr-test-kit_requirements.csv +374 -0
  158. data/lib/davinci_dtr_test_kit/requirements/generated/davinci-dtr-test-kit_requirements_coverage.csv +372 -0
  159. data/lib/davinci_dtr_test_kit/tags.rb +1 -0
  160. data/lib/davinci_dtr_test_kit/urls.rb +6 -0
  161. data/lib/davinci_dtr_test_kit/version.rb +2 -1
  162. data/lib/davinci_dtr_test_kit.rb +2 -0
  163. data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
  164. data/lib/inferno_requirements_tools/rake/rakefile_template +31 -0
  165. data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +284 -0
  166. data/lib/requirements_config.yaml +25 -0
  167. metadata +95 -37
  168. data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/dtr_smart_app_adaptive_questionnaire_initial_retrieval_group.rb +0 -24
  169. data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_group.rb +0 -14
  170. data/lib/davinci_dtr_test_kit/client_groups/smart_app/dtr_smart_app_rendering_enabled_questions_attestation_test.rb +0 -30
@@ -1,13 +1,14 @@
1
1
  require_relative '../../tags'
2
- require_relative 'dtr_smart_app_adaptive_questionnaire_initial_retrieval_group'
2
+ require_relative 'dtr_smart_app_adaptive_initial_retrieval_group'
3
3
  require_relative '../smart_app/dtr_smart_app_prepopulation_attestation_test'
4
4
  require_relative '../smart_app/dtr_smart_app_prepopulation_override_attestation_test'
5
- require_relative 'dtr_adaptive_questionnaire_followup_questions_group'
6
- require_relative 'dtr_adaptive_questionnaire_completion_group'
5
+ require_relative 'dtr_adaptive_followup_questions_group'
6
+ require_relative 'dtr_adaptive_completion_group'
7
+ require_relative '../shared/dtr_questionnaire_response_prepopulation_test'
7
8
 
8
9
  module DaVinciDTRTestKit
9
- class DTRSmartAppAdaptiveDinnerQuestionnaireWorkflowGroup < Inferno::TestGroup
10
- id :dtr_smart_app_adaptive_dinner_questionnaire_workflow
10
+ class DTRSmartAppAdaptiveDinnerWorkflowGroup < Inferno::TestGroup
11
+ id :dtr_smart_app_adaptive_dinner_workflow
11
12
  title 'Adaptive Questionnaire Workflow'
12
13
  description %(
13
14
  This test validates that a DTR SMART App client can perform a full DTR Adaptive Questionnaire workflow
@@ -32,7 +33,7 @@ module DaVinciDTRTestKit
32
33
  )
33
34
 
34
35
  group do
35
- id :dtr_smart_app_adaptive_questionnaire_retrieval
36
+ id :dtr_smart_app_adaptive_retrieval
36
37
  title 'Retrieving the Adaptive Questionnaire'
37
38
  description %(
38
39
  Inferno will wait for the client system to request a questionnaire using the
@@ -45,25 +46,25 @@ module DaVinciDTRTestKit
45
46
  )
46
47
  run_as_group
47
48
 
48
- group from: :dtr_smart_app_adaptive_questionnaire_initial_retrieval
49
+ group from: :dtr_smart_app_adaptive_initial_retrieval
49
50
  group do
50
51
  id :dtr_smart_app_initial_questionnaire_rendering
51
52
  title 'Filling Out the Questionnaire'
52
53
  description %(
53
54
  The tester will interact with the questionnaire within their client system
54
- such that pre-population steps are taken, the qustionnaire is rendered, and
55
+ such that pre-population steps are taken, the questionnaire is rendered, and
55
56
  they are able to fill it out. The tester will attest that questionnaire pre-population
56
57
  and rendering directives were followed.
57
58
  )
58
59
 
59
60
  # Test 1: attest to the pre-population of the name fields
60
- test from: :dtr_smart_app_prepopulation_attestation
61
+ test from: :dtr_smart_app_prepopulation_attest
61
62
  # Test 2: attest to the pre-population and edit of the location field
62
- test from: :dtr_smart_app_prepopulation_override_attestation
63
+ test from: :dtr_smart_app_prepopulation_override_attest
63
64
  end
64
65
  end
65
66
 
66
- group from: :dtr_adaptive_questionnaire_followup_questions,
67
+ group from: :dtr_adaptive_followup_questions,
67
68
  config: {
68
69
  options: {
69
70
  accepts_multiple_requests: true,
@@ -74,7 +75,7 @@ module DaVinciDTRTestKit
74
75
  }
75
76
  }
76
77
 
77
- group from: :dtr_adaptive_questionnaire_completion,
78
+ group from: :dtr_adaptive_completion,
78
79
  config: {
79
80
  options: {
80
81
  accepts_multiple_requests: true,
@@ -84,12 +85,17 @@ module DaVinciDTRTestKit
84
85
  access_token: { name: :client_id }
85
86
  }
86
87
  }
87
- group from: :dtr_smart_app_saving_questionnaire_response,
88
- config: {
89
- options: {
90
- adaptive: true,
91
- qr_profile_url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-adapt'
92
- }
93
- }
88
+ group from: :dtr_smart_app_saving_qr do
89
+ config(
90
+ options: {
91
+ adaptive: true,
92
+ qr_profile_url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-adapt'
93
+ }
94
+ )
95
+
96
+ # Test 3: validate workflow-specific details such as pre-population and overrides
97
+ test from: :dtr_qr_prepopulation,
98
+ uses_request: :questionnaire_response_save
99
+ end
94
100
  end
95
101
  end
@@ -0,0 +1,24 @@
1
+ require_relative '../../tags'
2
+ require_relative 'dtr_smart_app_adaptive_request_test'
3
+ require_relative '../shared/dtr_questionnaire_package_request_validation_test'
4
+ require_relative 'dtr_adaptive_next_question_request_validation_test'
5
+ require_relative 'dtr_adaptive_response_validation_test'
6
+
7
+ module DaVinciDTRTestKit
8
+ class DTRSmartAppAdaptiveInitialRetrievalGroup < Inferno::TestGroup
9
+ id :dtr_smart_app_adaptive_initial_retrieval
10
+ title 'Adaptive Questionnaire Package and Initial Questions Retrieval'
11
+
12
+ config(options: { next_tag: "initial_#{CLIENT_NEXT_TAG}" })
13
+ run_as_group
14
+
15
+ # Test 1: wait for the $questionnaire-package request and initial $next-question request
16
+ test from: :dtr_smart_app_adaptive_request
17
+ # Test 2: validate the $questionnaire-package request body
18
+ test from: :dtr_qp_request_validation
19
+ # Test 3: validate the $next-question request body
20
+ test from: :dtr_adaptive_next_question_request_validation
21
+ # Test 4: validate the QuestionnaireResponse in the input parameter
22
+ test from: :dtr_adaptive_response_validation
23
+ end
24
+ end
@@ -1,10 +1,10 @@
1
1
  require_relative '../../urls'
2
2
 
3
3
  module DaVinciDTRTestKit
4
- class DTRSmartAppAdaptiveQuestionnaireRequestTest < Inferno::Test
4
+ class DTRSmartAppAdaptiveRequestTest < Inferno::Test
5
5
  include URLs
6
6
 
7
- id :dtr_smart_app_adaptive_questionnaire_request
7
+ id :dtr_smart_app_adaptive_request
8
8
  title 'Invoke the Questionnaire Package and Initial Next Question Operation'
9
9
  description %(
10
10
  This test waits for two sequential client requests:
@@ -2,14 +2,14 @@ require_relative '../full_ehr/dtr_full_ehr_launch_attestation_test'
2
2
  require_relative '../full_ehr/dtr_full_ehr_questionnaire_package_request_test'
3
3
  require_relative '../shared/dtr_questionnaire_package_request_validation_test'
4
4
  require_relative '../full_ehr/dtr_full_ehr_prepopulation_attestation_test'
5
- require_relative '../full_ehr/dtr_full_ehr_rendering_enabled_questions_attestation_test'
5
+ require_relative 'dtr_static_dinner_enabled_questions_attestation_test'
6
6
  require_relative '../full_ehr/dtr_full_ehr_prepopulation_override_attestation_test'
7
7
  require_relative '../full_ehr/dtr_full_ehr_saving_questionnaire_response_group'
8
8
 
9
9
  module DaVinciDTRTestKit
10
- class DTRFullEHRStaticDinnerQuestionnaireWorkflowGroup < Inferno::TestGroup
11
- id :dtr_full_ehr_static_dinner_questionnaire_workflow
12
- title 'Static Questionnaire Workflow'
10
+ class DTRFullEHRStaticDinnerWorkflowGroup < Inferno::TestGroup
11
+ id :dtr_full_ehr_static_dinner_workflow
12
+ title 'Dinner Order Static Questionnaire Workflow'
13
13
  description %(
14
14
  This test validates that a DTR Full EHR client can perform a full DTR Static Questionnaire workflow
15
15
  using a mocked questionnaire requesting what a patient wants for dinner. The client system must
@@ -22,9 +22,10 @@ module DaVinciDTRTestKit
22
22
  - display questions only when they are enabled by other answers
23
23
  3. Complete and store the questionnaire response for future use.
24
24
  )
25
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@35', 'hl7.fhir.us.davinci-dtr_2.0.1@208'
25
26
 
26
27
  group do
27
- id :dtr_full_ehr_static_questionnaire_retrieval
28
+ id :dtr_full_ehr_static_retrieval
28
29
  title 'Retrieving the Static Questionnaire'
29
30
  description %(
30
31
  After DTR launch, Inferno will wait for the client system to request a questionnaire using the
@@ -34,33 +35,33 @@ module DaVinciDTRTestKit
34
35
  run_as_group
35
36
 
36
37
  # Test 0: attest to launch
37
- test from: :dtr_full_ehr_launch_attestation
38
+ test from: :dtr_full_ehr_launch_attest
38
39
  # Test 1: wait for the $questionnaire-package request
39
- test from: :dtr_full_ehr_questionnaire_package_request
40
+ test from: :dtr_full_ehr_qp_request
40
41
  # Test 2: validate the $questionnaire-package body
41
- test from: :dtr_questionnaire_package_request_validation
42
+ test from: :dtr_qp_request_validation
42
43
  end
43
44
 
44
45
  group do
45
- id :dtr_full_ehr_static_questionnaire_rendering
46
+ id :dtr_full_ehr_static_rendering
46
47
  title 'Filling Out the Static Questionnaire'
47
48
  description %(
48
49
  The tester will interact with the questionnaire within their client system
49
- such that pre-population steps are taken, the qustionnaire is rendered, and
50
+ such that pre-population steps are taken, the questionnaire is rendered, and
50
51
  they are able to fill it out. The tester will attest that questionnaire pre-population
51
52
  and rendering directives were followed.
52
53
  )
53
54
  run_as_group
54
55
 
55
56
  # Test 1: attest to the pre-population of the name fields
56
- test from: :dtr_full_ehr_prepopulation_attestation
57
+ test from: :dtr_full_ehr_prepopulation_attest
57
58
  # Test 2: attest to the pre-population and edit of the first name field
58
- test from: :dtr_full_ehr_prepopulation_override_attestation
59
+ test from: :dtr_full_ehr_prepopulation_override_attest
59
60
  # Test 3: attest to the display of the toppings questions only when a dinner answer is selected
60
- test from: :dtr_full_ehr_rendering_enabled_questions_attestation
61
+ test from: :dtr_static_dinner_enabled_questions_attest
61
62
  end
62
63
 
63
- group from: :dtr_full_ehr_saving_questionnaire_response,
64
+ group from: :dtr_full_ehr_saving_qr,
64
65
  config: {
65
66
  inputs: {
66
67
  questionnaire_response: {
@@ -1,14 +1,15 @@
1
- require_relative 'dtr_smart_app_dinner_questionnaire_package_request_test'
1
+ require_relative '../smart_app/dtr_smart_app_questionnaire_package_request_test'
2
2
  require_relative '../shared/dtr_questionnaire_package_request_validation_test'
3
3
  require_relative '../smart_app/dtr_smart_app_prepopulation_attestation_test'
4
4
  require_relative '../smart_app/dtr_smart_app_prepopulation_override_attestation_test'
5
- require_relative '../smart_app/dtr_smart_app_rendering_enabled_questions_attestation_test'
5
+ require_relative 'dtr_static_dinner_enabled_questions_attestation_test'
6
6
  require_relative '../smart_app/dtr_smart_app_saving_questionnaire_response_group'
7
+ require_relative '../shared/dtr_questionnaire_response_prepopulation_test'
7
8
 
8
9
  module DaVinciDTRTestKit
9
- class DTRSmartAppStaticDinnerQuestionnaireWorkflowGroup < Inferno::TestGroup
10
- id :dtr_smart_app_static_dinner_questionnaire_workflow
11
- title 'Static Questionnaire Workflow'
10
+ class DTRSmartAppStaticDinnerWorkflowGroup < Inferno::TestGroup
11
+ id :dtr_smart_app_static_dinner_workflow
12
+ title 'Dinner Order Static Questionnaire Workflow'
12
13
  description %(
13
14
  This test validates that a DTR SMART App client can perform a full DTR Static Questionnaire workflow
14
15
  using a mocked questionnaire requesting what a patient wants for dinner. The client system must
@@ -25,7 +26,7 @@ module DaVinciDTRTestKit
25
26
  )
26
27
 
27
28
  group do
28
- id :dtr_smart_app_static_questionnaire_retrieval
29
+ id :dtr_smart_app_static_retrieval
29
30
  title 'Retrieving the Static Questionnaire'
30
31
  description %(
31
32
  Inferno will wait for the client system to request a questionnaire using the
@@ -35,13 +36,13 @@ module DaVinciDTRTestKit
35
36
  run_as_group
36
37
 
37
38
  # Test 1: wait for the $questionnaire-package request
38
- test from: :dtr_smart_app_dinner_questionnaire_package_request
39
+ test from: :dtr_smart_app_qp_request
39
40
  # Test 2: validate the $questionnaire-package body
40
- test from: :dtr_questionnaire_package_request_validation
41
+ test from: :dtr_qp_request_validation
41
42
  end
42
43
 
43
44
  group do
44
- id :dtr_smart_app_static_questionnaire_rendering
45
+ id :dtr_smart_app_static_rendering
45
46
  title 'Filling Out the Static Questionnaire'
46
47
  description %(
47
48
  The tester will interact with the questionnaire within their client system
@@ -56,13 +57,17 @@ module DaVinciDTRTestKit
56
57
  # since the questionnaire asks them to
57
58
  # TODO: once Tom has gotten the reference server hooked up
58
59
  # Test 2: attest to the pre-population of the name fields
59
- test from: :dtr_smart_app_prepopulation_attestation
60
+ test from: :dtr_smart_app_prepopulation_attest
60
61
  # Test 3: attest to the pre-population and edit of the location field
61
- test from: :dtr_smart_app_prepopulation_override_attestation
62
+ test from: :dtr_smart_app_prepopulation_override_attest
62
63
  # Test 4: attest to the display of the toppings questions only when a dinner answer is selected
63
- test from: :dtr_smart_app_rendering_enabled_questions_attestation
64
+ test from: :dtr_static_dinner_enabled_questions_attest
64
65
  end
65
66
 
66
- group from: :dtr_smart_app_saving_questionnaire_response
67
+ group from: :dtr_smart_app_saving_qr do
68
+ # Test 3: validate workflow-specific details such as pre-population and overrides
69
+ test from: :dtr_qr_prepopulation,
70
+ uses_request: :questionnaire_response_save
71
+ end
67
72
  end
68
73
  end
@@ -2,10 +2,10 @@ require 'securerandom'
2
2
  require_relative '../../urls'
3
3
 
4
4
  module DaVinciDTRTestKit
5
- class DTRFullEHRRenderingEnabledQuestionsAttestationTest < Inferno::Test
5
+ class DTRStaticDinnerEnabledQuestionsAttestationTest < Inferno::Test
6
6
  include URLs
7
7
 
8
- id :dtr_full_ehr_rendering_enabled_questions_attestation
8
+ id :dtr_static_dinner_enabled_questions_attest
9
9
  title 'Check that the client renders enabled questions appropriately (Attestation)'
10
10
  description %(
11
11
  Validate that the rendering of the questionnaire includes only the "What would you like on..."
@@ -5,19 +5,24 @@ module DaVinciDTRTestKit
5
5
  class DTRFullEHRLaunchAttestationTest < Inferno::Test
6
6
  include URLs
7
7
 
8
- id :dtr_full_ehr_launch_attestation
8
+ id :dtr_full_ehr_launch_attest
9
9
  title 'Launch DTR for a patient that has an official name (Attestation)'
10
10
  description %(
11
11
  Attest that DTR has been launched for a patient with data that will be used for prepopulation.
12
12
  )
13
13
 
14
+ def attestation_message
15
+ return config.options[:attestation_message] if config.options.key?(:attestation_message)
16
+
17
+ 'I attest that DTR has been launched in the context of a patient with an official name, including first and last.'
18
+ end
19
+
14
20
  run do
15
21
  random_id = SecureRandom.uuid
16
22
  wait(
17
23
  identifier: random_id,
18
24
  message: %(
19
- I attest that DTR has been launched in the context of a patient with an official name, including
20
- first and last.
25
+ #{attestation_message}
21
26
 
22
27
  [Click here](#{resume_pass_url}?token=#{random_id}) if the above statement is **true**.
23
28
 
@@ -5,11 +5,13 @@ module DaVinciDTRTestKit
5
5
  class DTRFullEHRPrepopulationAttestationTest < Inferno::Test
6
6
  include URLs
7
7
 
8
- id :dtr_full_ehr_prepopulation_attestation
8
+ id :dtr_full_ehr_prepopulation_attest
9
9
  title 'Check that the client pre-populates the questionnaire (Attestation)'
10
10
  description %(
11
11
  Validate that pre-population of patient name information occurs as expected.
12
12
  )
13
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@207'
14
+
13
15
  run do
14
16
  random_id = SecureRandom.uuid
15
17
  wait(
@@ -5,11 +5,12 @@ module DaVinciDTRTestKit
5
5
  class DTRFullEHRPrepopulationOverrideAttestationTest < Inferno::Test
6
6
  include URLs
7
7
 
8
- id :dtr_full_ehr_prepopulation_override_attestation
8
+ id :dtr_full_ehr_prepopulation_override_attest
9
9
  title 'Validate the user can override pre-populated data (Attestation)'
10
10
  description %(
11
11
  Validate that the user can edit a pre-populated item and replace it with another value.
12
12
  )
13
+
13
14
  run do
14
15
  random_id = SecureRandom.uuid
15
16
  wait(
@@ -4,12 +4,13 @@ module DaVinciDTRTestKit
4
4
  class DTRFullEHRQuestionnairePackageRequestTest < Inferno::Test
5
5
  include URLs
6
6
 
7
- id :dtr_full_ehr_questionnaire_package_request
7
+ id :dtr_full_ehr_qp_request
8
8
  title 'Invoke the DTR Questionnaire Package operation'
9
9
  description %(
10
10
  Inferno will wait for a DTR questionnaire package request from the client. Upon receipt, Inferno will generate and
11
11
  send a response.
12
12
  )
13
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@165', 'hl7.fhir.us.davinci-dtr_2.0.1@262'
13
14
 
14
15
  input :access_token,
15
16
  description: %(
@@ -4,8 +4,13 @@ module DaVinciDTRTestKit
4
4
  class DTRFullEHRQuestionnaireResponseConformanceTest < Inferno::Test
5
5
  include DTRQuestionnaireResponseValidation
6
6
 
7
- id :dtr_full_ehr_questionnaire_response_conformance
7
+ id :dtr_full_ehr_qr_conformance
8
8
  title 'QuestionnaireResponse is conformant'
9
+ description %(
10
+ Verify that the provided QuestionnaireResponse is conformant to the [DTR
11
+ QuestionnaireResponse](https://hl7.org/fhir/us/davinci-dtr/STU2/StructureDefinition-dtr-questionnaireresponse.html)
12
+ profile.
13
+ )
9
14
 
10
15
  def profile_url
11
16
  config.options[:qr_profile_url]
@@ -4,34 +4,23 @@ module DaVinciDTRTestKit
4
4
  class DTRFullEHRQuestionnaireResponseCorrectnessTest < Inferno::Test
5
5
  include DTRQuestionnaireResponseValidation
6
6
 
7
- id :dtr_full_ehr_questionnaire_response_correctness
7
+ id :dtr_full_ehr_qr_correctness
8
8
  title 'QuestionnaireResponse is correct for the workflow'
9
9
  description %(
10
- The QuestionnaireResponse aligns with the following expectations for the workflow. This includes checks for
11
- the presence of the following answers and their appropriate origin source extensions:
12
-
13
- - `PBD.1` (Last Name) and `LOC.1` (Location): `auto`
14
- - PBD.2 (First Name): `override`
15
- - `3` (all nested dinner questions): `manual`
10
+ Verify that the QuestionnaireResponse meets the expected workflow requirements by verifying the following:
11
+ This includes:
12
+ - **Completion Check**: Confirm that all required questions have been answered.
13
+ - **Origin Source Validation**: Verify that specific answers are derived from the correct sources:
14
+ - `PBD.1` (Last Name) and `LOC.1` (Location): `auto`
15
+ - `PBD.2` (First Name): `override`
16
+ - `3` (all nested dinner questions): `manual`
16
17
  )
18
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@209', 'hl7.fhir.us.davinci-dtr_2.0.1@210'
17
19
 
18
20
  run do
19
- skip_if questionnaire_response.nil?, 'Completed QuestionnaireResponse input was blank'
20
- check_is_questionnaire_response(questionnaire_response)
21
+ skip_if questionnaire_response.blank?, 'Completed QuestionnaireResponse input was blank'
21
22
 
22
- qr = FHIR.from_contents(questionnaire_response)
23
- questionnaire = if config.options[:adaptive]
24
- qr.contained.find do |res|
25
- res.resourceType == 'Questionnaire'
26
- end
27
- else
28
- Fixtures.questionnaire_for_test(id)
29
- end
30
- # questionnaire = Fixtures.find_questionnaire('DinnerOrderStatic')
31
- check_origin_sources(questionnaire.item, qr.item, expected_overrides: ['PBD.2'])
32
- required_link_ids = extract_required_link_ids(questionnaire.item)
33
- check_answer_presence(qr.item, required_link_ids)
34
- assert(messages.none? { |m| m[:type] == 'error' }, 'QuestionnaireResponse is not correct, see error message(s)')
23
+ validate_questionnaire_response_correctness(questionnaire_response, try(:custom_questionnaire_package_response))
35
24
  end
36
25
  end
37
26
  end
@@ -4,7 +4,7 @@ require_relative 'dtr_full_ehr_questionnaire_response_correctness_test'
4
4
 
5
5
  module DaVinciDTRTestKit
6
6
  class DTRFullEHRSavingQuestionnaireResponseGroup < Inferno::TestGroup
7
- id :dtr_full_ehr_saving_questionnaire_response
7
+ id :dtr_full_ehr_saving_qr
8
8
  title 'Saving the QuestionnaireResponse'
9
9
  description %(
10
10
  The tester will attest to the completion of the questionnaire such that
@@ -20,10 +20,10 @@ module DaVinciDTRTestKit
20
20
  run_as_group
21
21
 
22
22
  # Test 1: attest QuestionnaireResponse saved
23
- test from: :dtr_full_ehr_store_attestation
23
+ test from: :dtr_full_ehr_store_attest
24
24
  # Test 2: verify basic conformance of the QuestionnaireResponse
25
- test from: :dtr_full_ehr_questionnaire_response_conformance
25
+ test from: :dtr_full_ehr_qr_conformance
26
26
  # Test 3: check workflow-specific details such as pre-population and overrides
27
- test from: :dtr_full_ehr_questionnaire_response_correctness
27
+ test from: :dtr_full_ehr_qr_correctness
28
28
  end
29
29
  end
@@ -5,12 +5,13 @@ module DaVinciDTRTestKit
5
5
  class DTRFullEHRStoreAttestationTest < Inferno::Test
6
6
  include URLs
7
7
 
8
- id :dtr_full_ehr_store_attestation
8
+ id :dtr_full_ehr_store_attest
9
9
  title 'Complete and Store the QuestionnaireResponse (Attestation)'
10
10
  description %(
11
11
  Attest that the questionnaire has been completed and the response has been persisted
12
12
  and can be exported as a FHIR QuestionnaireResponse instance.
13
13
  )
14
+
14
15
  run do
15
16
  random_id = SecureRandom.uuid
16
17
  wait(
@@ -0,0 +1,22 @@
1
+ require_relative 'dtr_light_ehr_supported_payers_config_test'
2
+ require_relative 'dtr_light_ehr_supported_payers_accept_header_test'
3
+ require_relative 'dtr_light_ehr_supported_payers_endpoint_test'
4
+ require_relative 'dtr_light_ehr_supported_payers_user_response_test'
5
+ require_relative 'dtr_light_ehr_supported_payers_use_test'
6
+
7
+ module DaVinciDTRTestKit
8
+ class DTRLightEHRSupportedEndpointsGroup < Inferno::TestGroup
9
+ id :dtr_light_ehr_supported_endpoints
10
+ title 'Supported Payers Endpoint'
11
+ description %(This group checks that systems can request and react to a DTR
12
+ SMART App's [list of supported payers](https://hl7.org/fhir/us/davinci-dtr/STU2/specification.html#determination-of-payers-supported-by-a-dtr-app).
13
+ )
14
+ run_as_group
15
+
16
+ test from: :dtr_light_ehr_sp_config
17
+ test from: :dtr_light_ehr_sp_endpoint
18
+ test from: :dtr_light_ehr_sp_accept_header
19
+ test from: :dtr_light_ehr_sp_user_response
20
+ test from: :dtr_light_ehr_sp_use
21
+ end
22
+ end
@@ -0,0 +1,26 @@
1
+ require_relative '../../urls'
2
+ require_relative '../../tags'
3
+
4
+ module DaVinciDTRTestKit
5
+ class DTRLightEHRSupportedPayersAcceptHeaderTest < Inferno::Test
6
+ include URLs
7
+ id :dtr_light_ehr_sp_accept_header
8
+ title 'Client uses the required Accept HTTP header value'
9
+ description %(
10
+ This test verifies that the request to the supported payers endpoint
11
+ includes an `Accept` HTTP header set to `application/json`.
12
+ )
13
+
14
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@108'
15
+
16
+ run do
17
+ load_tagged_requests(SUPPORTED_PAYER_TAG)
18
+ accept_header = request.request_headers.find { |header| header.name.downcase == 'accept' }
19
+
20
+ assert accept_header.present?, 'Accept header must be provided'
21
+ assert accept_header.value == 'application/json', "Invalid Accept header: Expected 'application/json'
22
+ but received '#{accept_header.value}'"
23
+ pass 'Accept header is correctly set to application/json'
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,34 @@
1
+ require_relative '../../urls'
2
+
3
+ module DaVinciDTRTestKit
4
+ class DTRLightEHRSupportedPayersConfigTest < Inferno::Test
5
+ include URLs
6
+ id :dtr_light_ehr_sp_config
7
+ title 'Demonstrate supported payers configuration'
8
+ description %(
9
+ During this test, the tester will demonstrate the capability of the light EHR under test to configure a supported
10
+ payers endpoint for Inferno's simulated DTR SMART App.
11
+ )
12
+
13
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@105'
14
+
15
+ input :unique_url_id, type: :text
16
+
17
+ run do
18
+ identifier = SecureRandom.hex(32)
19
+ wait(
20
+ identifier:,
21
+ message: <<~MESSAGE
22
+ Show that the Light EHR under test has been configured to use the following URL
23
+ as the supported payers endpoint for Inferno's simulated DTR SMART App:
24
+
25
+ `#{supported_payer_url(unique_url_id)}`
26
+
27
+ [Click here](#{resume_pass_url}?token=#{identifier}) if the system **successfully** demonstrates this configuration.
28
+
29
+ [Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not** demonstrate this configuration.
30
+ MESSAGE
31
+ )
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,44 @@
1
+ require_relative '../../urls'
2
+
3
+ module DaVinciDTRTestKit
4
+ class DTRLightEHRSupportedPayersEndpointTest < Inferno::Test
5
+ include URLs
6
+ id :dtr_light_ehr_sp_endpoint
7
+ title 'Client can request an app\'s supported payers list'
8
+ description %(
9
+ This test verifies that the app can successfully access the supported payers endpoint via a GET request
10
+ )
11
+ input :unique_url_id,
12
+ title: 'Supported Payers Endpoint Path',
13
+ description: %(
14
+ A unique identifier that will be used to construct the supported payers
15
+ endpoint URL. This allows a permanent configuration for the tester to
16
+ use across Inferno sessions.
17
+ )
18
+ input :user_response,
19
+ title: 'Custom Supported Payers Response',
20
+ description: %(
21
+ If present, the value will be returned when the client makes a request to the supported payers endpoint,
22
+ allowing testers to instruct Inferno how to respond with payers that are configured in the
23
+ system under test. The provided response will be checked for conformance to the required
24
+ JSON structure. If not provided, Inferno will return a pre-configured value.
25
+ ),
26
+ optional: true,
27
+ type: 'textarea'
28
+
29
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@104', 'hl7.fhir.us.davinci-dtr_2.0.1@107'
30
+
31
+ run do
32
+ wait(
33
+ identifier: unique_url_id,
34
+ message: %(
35
+ ### Supported Payer Endpoint
36
+
37
+ Inferno will wait for the Light EHR to to make a GET request to
38
+
39
+ `#{supported_payer_url(unique_url_id)}`
40
+ )
41
+ )
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,32 @@
1
+ require_relative '../../urls'
2
+
3
+ module DaVinciDTRTestKit
4
+ class DTRLightEHRSupportedPayersUseTest < Inferno::Test
5
+ include URLs
6
+ id :dtr_light_ehr_sp_use
7
+ title 'Demonstrate use of the supported payers response'
8
+ description %(
9
+ During this test, the tester will demonstrate the ability of the light EHR under test to use the response from
10
+ the supported payers endpoint to suppress the launch of Inferno's simulated DTR SMART App for a patient
11
+ who is covered only by payers not included in the returned supported payers list.
12
+ )
13
+
14
+ verifies_requirements 'hl7.fhir.us.davinci-dtr_2.0.1@115'
15
+
16
+ run do
17
+ identifier = SecureRandom.hex(32)
18
+ wait(
19
+ identifier:,
20
+ message: <<~MESSAGE
21
+ Demonstrate that when DTR is needed for a patient that is not covered by payers included in the
22
+ supported payers list returned from the endpoint, launching Inferno's simulated DTR App
23
+ is not an option.
24
+
25
+ [Click here](#{resume_pass_url}?token=#{identifier}) if the system **successfully** demonstrates this capability.
26
+
27
+ [Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not** demonstrate this capability.
28
+ MESSAGE
29
+ )
30
+ end
31
+ end
32
+ end