davinci_dtr_test_kit 0.17.1 → 0.18.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 (311) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/v220_full_ehr_suite_run_against_payer_suite.json.erb +19 -0
  3. data/config/presets/v220_payer_suite_run_against_full_ehr_suite.json.erb +76 -0
  4. data/lib/davinci_dtr_test_kit/cross_suite/fhirpath_utils.rb +52 -0
  5. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_base_questionnaire/metadata.yml +212 -0
  6. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_q_package_bundle/metadata.yml +39 -0
  7. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_qpackage_output_parameters/metadata.yml +30 -0
  8. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_questionnaire_adapt/metadata.yml +17 -0
  9. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_questionnaire_adapt_search/metadata.yml +91 -0
  10. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_std_questionnaire/metadata.yml +17 -0
  11. data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/metadata.yml +403 -0
  12. data/lib/davinci_dtr_test_kit/cross_suite/generated_profile_metadata.rb +22 -0
  13. data/lib/davinci_dtr_test_kit/cross_suite/response_selection_utils.rb +85 -0
  14. data/lib/davinci_dtr_test_kit/cross_suite/v2.2.0/dtr_conformance_verification.rb +21 -0
  15. data/lib/davinci_dtr_test_kit/cross_suite/v2.2.0/multi_request_message_helper.rb +35 -0
  16. data/lib/davinci_dtr_test_kit/cross_suite/v2.2.0/questionnaire_helper.rb +162 -0
  17. data/lib/davinci_dtr_test_kit/{dtr_client_options.rb → full_ehr/dtr_full_ehr_options.rb} +1 -1
  18. data/lib/davinci_dtr_test_kit/{endpoints → full_ehr/endpoints}/mock_payer.rb +9 -3
  19. data/lib/davinci_dtr_test_kit/{endpoints → full_ehr/endpoints}/mock_udap_smart_server/token_endpoint.rb +2 -2
  20. data/lib/davinci_dtr_test_kit/full_ehr/fixture_loader.rb +37 -0
  21. data/lib/davinci_dtr_test_kit/full_ehr/fixtures/dinner_adaptive/dinner_order_adaptive_next_question_template.json +243 -0
  22. data/lib/davinci_dtr_test_kit/full_ehr/fixtures/dinner_adaptive/parameters_questionnaire_dinner_order_adaptive.json +104 -0
  23. data/lib/davinci_dtr_test_kit/full_ehr/fixtures/dinner_static/parameters_questionnaire_dinner_order_static.json +291 -0
  24. data/lib/davinci_dtr_test_kit/full_ehr/fixtures/empty_templates/next_question_template_empty.json +1 -0
  25. data/lib/davinci_dtr_test_kit/full_ehr/fixtures/empty_templates/parameters_questionnaire_package_empty.json +9 -0
  26. data/lib/davinci_dtr_test_kit/full_ehr/short_circuit_interaction_verification.rb +73 -0
  27. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/custom → full_ehr/v2.0.1/adaptive_custom}/dtr_full_ehr_custom_adaptive_request_test.rb +1 -1
  28. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → full_ehr/v2.0.1/adaptive_dinner}/dtr_adaptive_next_question_retrieval_group.rb +3 -3
  29. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → full_ehr/v2.0.1/adaptive_dinner}/dtr_full_ehr_adaptive_initial_retrieval_group.rb +5 -5
  30. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire → full_ehr/v2.0.1/adaptive_interaction}/dtr_adaptive_next_question_request_test.rb +1 -1
  31. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire → full_ehr/v2.0.1/adaptive_interaction}/dtr_adaptive_next_question_request_validation_test.rb +1 -1
  32. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire → full_ehr/v2.0.1/adaptive_interaction}/dtr_adaptive_response_validation_test.rb +2 -2
  33. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → full_ehr/v2.0.1}/dtr_full_ehr_adaptive_dinner_workflow_group.rb +7 -7
  34. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/custom → full_ehr/v2.0.1}/dtr_full_ehr_custom_adaptive_workflow_group.rb +14 -14
  35. data/lib/davinci_dtr_test_kit/{client_groups/custom_static → full_ehr/v2.0.1}/dtr_full_ehr_custom_static_workflow_group.rb +11 -11
  36. data/lib/davinci_dtr_test_kit/{client_groups/must_support → full_ehr/v2.0.1}/dtr_full_ehr_questionnaire_must_support_group.rb +6 -6
  37. data/lib/davinci_dtr_test_kit/{client_groups/dinner_static → full_ehr/v2.0.1}/dtr_full_ehr_static_dinner_workflow_group.rb +7 -7
  38. data/lib/davinci_dtr_test_kit/{dtr_full_ehr_suite.rb → full_ehr/v2.0.1/dtr_full_ehr_suite.rb} +19 -20
  39. data/lib/davinci_dtr_test_kit/{client_groups/payer_registration/dtr_client_registration_group.rb → full_ehr/v2.0.1/dtr_payer_registration_group.rb} +8 -8
  40. data/lib/davinci_dtr_test_kit/{endpoints/mock_payer/next_question_endpoint.rb → full_ehr/v2.0.1/full_ehr_next_question_endpoint.rb} +18 -7
  41. data/lib/davinci_dtr_test_kit/{endpoints/mock_payer/questionnaire_package_endpoint.rb → full_ehr/v2.0.1/full_ehr_questionnaire_package_endpoint.rb} +22 -7
  42. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/must_support/dtr_full_ehr_ms_questionnaire_package_request_test.rb +1 -1
  43. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/must_support/dtr_must_support_attestation_test.rb +1 -1
  44. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/must_support/dtr_questionnaire_must_support_test.rb +1 -1
  45. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/payer_registration/configuration_display_smart_test.rb +1 -1
  46. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/payer_registration/configuration_display_udap_test.rb +1 -1
  47. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_custom_questionnaire_expressions_test.rb +1 -1
  48. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_custom_questionnaire_extensions_test.rb +1 -1
  49. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_custom_questionnaire_libraries_test.rb +1 -1
  50. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_custom_questionnaire_package_validation_test.rb +1 -1
  51. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_adaptive_request_test.rb +1 -1
  52. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_launch_attestation_test.rb +1 -1
  53. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_prepopulation_attestation_test.rb +1 -1
  54. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_prepopulation_override_attestation_test.rb +1 -1
  55. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_questionnaire_package_request_test.rb +1 -1
  56. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_questionnaire_response_conformance_test.rb +1 -1
  57. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_questionnaire_response_correctness_test.rb +1 -1
  58. data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_store_attestation_test.rb +1 -1
  59. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_prepopulation_attestation_test.rb +1 -1
  60. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_prepopulation_override_attestation_test.rb +1 -1
  61. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_questionnaire_package_request_validation_test.rb +1 -1
  62. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_questionnaire_response_basic_conformance_test.rb +2 -2
  63. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_questionnaire_response_prepopulation_test.rb +1 -1
  64. data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/shared/dtr_rendering_attestation_test.rb +1 -1
  65. data/lib/davinci_dtr_test_kit/{client_groups/dinner_static → full_ehr/v2.0.1/static_dinner}/dtr_static_dinner_enabled_questions_attestation_test.rb +1 -1
  66. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/dtr_full_ehr_abstract_adaptive_group.rb +87 -0
  67. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/dtr_full_ehr_abstract_standard_group.rb +59 -0
  68. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/dtr_full_ehr_suite.rb +145 -0
  69. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/dtr_full_ehr_suite_description_v220.md +254 -0
  70. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/full_ehr_next_question_endpoint.rb +391 -0
  71. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/full_ehr_questionnaire_package_endpoint.rb +206 -0
  72. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/interaction/adaptive_questionnaires_completed_test.rb +108 -0
  73. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/interaction/interaction_wait_test.rb +177 -0
  74. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/interaction/ui_display_and_interaction_attestation_test.rb +132 -0
  75. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/must_support/dtr_additional_questionnaires_interaction_group.rb +74 -0
  76. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/must_support/dtr_questionnaire_adaptive_must_support_test.rb +45 -0
  77. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/must_support/dtr_questionnaire_base_must_support_test.rb +43 -0
  78. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/must_support/dtr_questionnaire_standard_must_support_test.rb +45 -0
  79. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/next_question_template_questionnaires.rb +21 -0
  80. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/request/dtr_next_question_request_validation_test.rb +85 -0
  81. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/request/dtr_questionnaire_package_request_validation_test.rb +89 -0
  82. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/response/dtr_next_question_response_validation_test.rb +85 -0
  83. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/response/dtr_questionnaire_package_response_validation_test.rb +77 -0
  84. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/workflows/dtr_full_ehr_workflow_adaptive_group.rb +24 -0
  85. data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/workflows/dtr_full_ehr_workflow_standard_group.rb +21 -0
  86. data/lib/davinci_dtr_test_kit/generator/ig_metadata.rb +21 -0
  87. data/lib/davinci_dtr_test_kit/generator/profile_metadata_extractor.rb +57 -0
  88. data/lib/davinci_dtr_test_kit/generator.rb +117 -0
  89. data/lib/davinci_dtr_test_kit/igs/davinci_dtr_2.2.0.tgz +0 -0
  90. data/lib/davinci_dtr_test_kit/{dtr_options.rb → light_ehr/dtr_light_ehr_options.rb} +1 -1
  91. data/lib/davinci_dtr_test_kit/{dtr_light_ehr_suite.rb → light_ehr/v2.0.1/dtr_light_ehr_suite.rb} +8 -9
  92. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1}/dtr_light_ehr_supported_endpoints_group.rb +5 -5
  93. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1}/dtr_smart_ehr_launch.rb +3 -3
  94. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/communication_request/communication_request_read.rb +1 -1
  95. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/coverage/coverage_read.rb +1 -1
  96. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/device_request/device_request_read.rb +1 -1
  97. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/encounter/encounter_read.rb +1 -1
  98. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/medication_request/medication_request_read.rb +1 -1
  99. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/nutrition_order/nutrition_order_read.rb +1 -1
  100. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_create.rb +1 -1
  101. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_update.rb +1 -1
  102. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/service_request/service_request_read.rb +1 -1
  103. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task/task_create.rb +1 -1
  104. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task/task_read.rb +1 -1
  105. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task/task_update.rb +1 -1
  106. data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/vision_prescription/vision_prescription_read.rb +1 -1
  107. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/supported_endpoints}/dtr_light_ehr_supported_payers_accept_header_test.rb +2 -2
  108. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/supported_endpoints}/dtr_light_ehr_supported_payers_config_test.rb +1 -1
  109. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/supported_endpoints}/dtr_light_ehr_supported_payers_endpoint_test.rb +1 -1
  110. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/supported_endpoints}/dtr_light_ehr_supported_payers_use_test.rb +1 -1
  111. data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/supported_endpoints}/dtr_light_ehr_supported_payers_user_response_test.rb +2 -2
  112. data/lib/davinci_dtr_test_kit/metadata.rb +13 -68
  113. data/lib/davinci_dtr_test_kit/requirements/davinci_dtr_test_kit_requirements.csv +216 -0
  114. data/lib/davinci_dtr_test_kit/requirements/generated/dtr_full_ehr_requirements_coverage.csv +1 -1
  115. data/lib/davinci_dtr_test_kit/requirements/generated/dtr_full_ehr_v220_requirements_coverage.csv +1 -0
  116. data/lib/davinci_dtr_test_kit/requirements/generated/dtr_light_ehr_requirements_coverage.csv +1 -1
  117. data/lib/davinci_dtr_test_kit/requirements/generated/dtr_payer_server_requirements_coverage.csv +1 -1
  118. data/lib/davinci_dtr_test_kit/requirements/generated/dtr_payer_server_v220_requirements_coverage.csv +114 -0
  119. data/lib/davinci_dtr_test_kit/requirements/generated/dtr_smart_app_requirements_coverage.csv +1 -1
  120. data/lib/davinci_dtr_test_kit/requirements/hl7.fhir.us.davinci-dtr_2.2.0_requirements.xlsx +0 -0
  121. data/lib/davinci_dtr_test_kit/{endpoints/mock_payer → server/endpoints}/next_question_proxy_endpoint.rb +2 -0
  122. data/lib/davinci_dtr_test_kit/{endpoints/mock_payer → server/endpoints}/questionnaire_package_proxy_endpoint.rb +2 -0
  123. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/adaptive_form_libraries_test.rb +2 -1
  124. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/adaptive_form_questionnaire_expressions_test.rb +2 -1
  125. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/adaptive_form_questionnaire_extensions_test.rb +2 -1
  126. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/adaptive_next_questionnaire_expressions_test.rb +2 -1
  127. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/adaptive_next_questionnaire_extensions_test.rb +2 -1
  128. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_adaptive_request_test.rb +1 -1
  129. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_adaptive_request_validation_test.rb +2 -1
  130. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_adaptive_response_bundles_validation_test.rb +2 -1
  131. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_adaptive_response_search_validation_test.rb +2 -1
  132. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_adaptive_response_validation_test.rb +3 -2
  133. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_next_request_validation_test.rb +2 -1
  134. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_next_response_validation_test.rb +2 -1
  135. data/lib/davinci_dtr_test_kit/{dtr_payer_server_suite.rb → server/v2.0.1/dtr_payer_server_suite.rb} +9 -10
  136. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1}/payer_server_adaptive_group.rb +13 -13
  137. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1}/payer_server_static_group.rb +6 -6
  138. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/static_forms}/static_form_libraries_test.rb +2 -1
  139. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/static_forms}/static_form_questionnaire_expressions_test.rb +2 -1
  140. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/static_forms}/static_form_questionnaire_extensions_test.rb +2 -1
  141. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/static_forms}/static_form_request_test.rb +3 -2
  142. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/static_forms}/static_form_request_validation_test.rb +3 -2
  143. data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/static_forms}/static_form_response_validation_test.rb +4 -3
  144. data/lib/davinci_dtr_test_kit/server/v2.2.0/client_simulation.rb +297 -0
  145. data/lib/davinci_dtr_test_kit/server/v2.2.0/dtr_payer_server_capability_statement_test.rb +73 -0
  146. data/lib/davinci_dtr_test_kit/server/v2.2.0/dtr_payer_server_suite.rb +322 -0
  147. data/lib/davinci_dtr_test_kit/server/v2.2.0/dtr_payer_server_suite_description_v220.md +37 -0
  148. data/lib/davinci_dtr_test_kit/server/v2.2.0/interaction_test.rb +97 -0
  149. data/lib/davinci_dtr_test_kit/server/v2.2.0/log_questionnaire_errors_support_test.rb +57 -0
  150. data/lib/davinci_dtr_test_kit/server/v2.2.0/must_support/questionnaire_adaptive_must_support_test.rb +47 -0
  151. data/lib/davinci_dtr_test_kit/server/v2.2.0/must_support/questionnaire_adaptive_search_must_support_test.rb +40 -0
  152. data/lib/davinci_dtr_test_kit/server/v2.2.0/must_support/questionnaire_base_must_support_test.rb +40 -0
  153. data/lib/davinci_dtr_test_kit/server/v2.2.0/must_support/questionnaire_package_bundle_must_support_test.rb +38 -0
  154. data/lib/davinci_dtr_test_kit/server/v2.2.0/must_support/questionnaire_package_output_parameters_must_support_test.rb +37 -0
  155. data/lib/davinci_dtr_test_kit/server/v2.2.0/must_support/questionnaire_standard_must_support_test.rb +39 -0
  156. data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_request_validation_test.rb +45 -0
  157. data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_support/adaptive_questionnaire_endpoint_test.rb +98 -0
  158. data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_support/invalid_questionnaire_response_test.rb +43 -0
  159. data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_support/next_contained_questionnaire_response_references_test.rb +46 -0
  160. data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_support/next_question_response_references_test.rb +56 -0
  161. data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_support/next_question_response_validation_test.rb +67 -0
  162. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/contained_binary_test.rb +58 -0
  163. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/contained_binary_validation.rb +128 -0
  164. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/cql_library_validation_test.rb +58 -0
  165. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/questionnaire_design_support.rb +65 -0
  166. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/questionnaire_expression_elm_test.rb +81 -0
  167. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/questionnaire_expression_language_test.rb +63 -0
  168. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/questionnaire_prepopulation_test.rb +42 -0
  169. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_design/questionnaire_relevance_logic_test.rb +40 -0
  170. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_operation_validation.rb +440 -0
  171. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_request_validation_test.rb +42 -0
  172. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/adaptive_questionnaire_response_contained_questionnaire_test.rb +127 -0
  173. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/adaptive_questionnaire_response_validation_test.rb +61 -0
  174. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/contained_questionnaire_response_references_test.rb +42 -0
  175. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/dtr_server_no_custom_extension_test.rb +184 -0
  176. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/dtr_server_questionnaire_not_found_test.rb +76 -0
  177. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/dtr_server_questionnaire_package_contents_test.rb +89 -0
  178. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/initial_questionnaire_response_test.rb +132 -0
  179. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/questionnaire_package_input_type_test.rb +110 -0
  180. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/questionnaire_references_version_specific_test.rb +79 -0
  181. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/questionnaire_response_questionnaire_canonical_test.rb +89 -0
  182. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/questionnaire_response_references_test.rb +51 -0
  183. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/questionnaire_response_validation_test.rb +63 -0
  184. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/source_data_error_test.rb +43 -0
  185. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_support/value_set_validation_test.rb +90 -0
  186. data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_response_reference_validation.rb +133 -0
  187. data/lib/davinci_dtr_test_kit/server/v2.2.0/value_set_expand_support/small_value_set_expansion_test.rb +120 -0
  188. data/lib/davinci_dtr_test_kit/server/v2.2.0/value_set_expand_support/value_set_expansion_test.rb +51 -0
  189. data/lib/davinci_dtr_test_kit/server/v2.2.0/value_set_expand_support/value_set_expansion_validation.rb +58 -0
  190. data/lib/davinci_dtr_test_kit/{endpoints → smart_app/endpoints}/mock_authorization/token_endpoint.rb +1 -1
  191. data/lib/davinci_dtr_test_kit/{endpoints → smart_app/endpoints}/mock_ehr/fhir_get_endpoint.rb +1 -1
  192. data/lib/davinci_dtr_test_kit/smart_app/endpoints/mock_payer/smart_app_next_question_endpoint.rb +12 -0
  193. data/lib/davinci_dtr_test_kit/smart_app/endpoints/mock_payer/smart_app_questionnaire_package_endpoint.rb +12 -0
  194. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/custom → smart_app/v2.0.1/adaptive_custom}/dtr_smart_app_custom_adaptive_workflow_group.rb +12 -12
  195. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → smart_app/v2.0.1/adaptive_dinner}/dtr_smart_app_adaptive_dinner_workflow_group.rb +5 -5
  196. data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → smart_app/v2.0.1/adaptive_dinner}/dtr_smart_app_adaptive_initial_retrieval_group.rb +4 -4
  197. data/lib/davinci_dtr_test_kit/{auth_groups → smart_app/v2.0.1/auth}/token_request_test.rb +1 -1
  198. data/lib/davinci_dtr_test_kit/{client_groups/custom_static → smart_app/v2.0.1}/dtr_smart_app_custom_static_workflow_group.rb +11 -11
  199. data/lib/davinci_dtr_test_kit/{client_groups/must_support → smart_app/v2.0.1}/dtr_smart_app_questionnaire_must_support_group.rb +6 -6
  200. data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1}/dtr_smart_app_respiratory_workflow_group.rb +3 -3
  201. data/lib/davinci_dtr_test_kit/{client_groups/dinner_static → smart_app/v2.0.1}/dtr_smart_app_static_dinner_workflow_group.rb +7 -7
  202. data/lib/davinci_dtr_test_kit/{dtr_smart_app_suite.rb → smart_app/v2.0.1/dtr_smart_app_suite.rb} +21 -21
  203. data/lib/davinci_dtr_test_kit/{client_groups → smart_app/v2.0.1}/must_support/dtr_smart_app_ms_questionnaire_package_request_test.rb +2 -2
  204. data/lib/davinci_dtr_test_kit/{auth_groups → smart_app/v2.0.1}/oauth2_authentication_group.rb +2 -2
  205. data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1/static_respiratory}/dtr_respiratory_questionnaire_package_group.rb +1 -1
  206. data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1/static_respiratory}/dtr_respiratory_questionnaire_package_request_test.rb +1 -1
  207. data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1/static_respiratory}/dtr_respiratory_questionnaire_response_group.rb +2 -2
  208. data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1/static_respiratory}/dtr_respiratory_questionnaire_response_save_test.rb +1 -1
  209. data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1/static_respiratory}/dtr_respiratory_rendering_attestation_test.rb +1 -1
  210. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_adaptive_request_test.rb +1 -1
  211. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_prepopulation_attestation_test.rb +1 -1
  212. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_prepopulation_override_attestation_test.rb +1 -1
  213. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_questionnaire_package_request_test.rb +1 -1
  214. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_questionnaire_response_correctness_test.rb +1 -1
  215. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_questionnaire_response_save_test.rb +1 -1
  216. data/lib/davinci_dtr_test_kit/{client_groups/smart_app → smart_app/v2.0.1/tests}/dtr_smart_app_saving_questionnaire_response_group.rb +1 -1
  217. data/lib/davinci_dtr_test_kit/tags.rb +2 -0
  218. data/lib/davinci_dtr_test_kit/version.rb +2 -2
  219. data/lib/davinci_dtr_test_kit.rb +6 -4
  220. metadata +299 -209
  221. data/lib/davinci_dtr_test_kit/certs/InfernoCA.key +0 -52
  222. data/lib/davinci_dtr_test_kit/certs/InfernoCA.pem +0 -35
  223. data/lib/davinci_dtr_test_kit/certs/TestKit.pem +0 -32
  224. data/lib/davinci_dtr_test_kit/certs/TestKitPrivateKey.key +0 -28
  225. data/lib/davinci_dtr_test_kit/endpoints/mock_payer/full_ehr_next_question_endpoint.rb +0 -30
  226. data/lib/davinci_dtr_test_kit/endpoints/mock_payer/full_ehr_questionnaire_package_endpoint.rb +0 -31
  227. data/lib/davinci_dtr_test_kit/fixture_loader.rb +0 -21
  228. /data/lib/davinci_dtr_test_kit/{endpoints → cross_suite}/cors.rb +0 -0
  229. /data/lib/davinci_dtr_test_kit/{cql_test.rb → cross_suite/v2.0.1/cql_test.rb} +0 -0
  230. /data/lib/davinci_dtr_test_kit/{dtr_questionnaire_response_validation.rb → cross_suite/v2.0.1/dtr_questionnaire_response_validation.rb} +0 -0
  231. /data/lib/davinci_dtr_test_kit/{descriptions.rb → full_ehr/descriptions.rb} +0 -0
  232. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/dinner_adaptive/dinner_order_adaptive_next_question_burrito.json +0 -0
  233. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/dinner_adaptive/dinner_order_adaptive_next_question_hamburger.json +0 -0
  234. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/dinner_adaptive/dinner_order_adaptive_next_question_initial.json +0 -0
  235. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/dinner_adaptive/questionnaire_dinner_order_adaptive.json +0 -0
  236. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/dinner_static/questionnaire_dinner_order_static.json +0 -0
  237. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/dinner_static/questionnaire_response_dinner_order_static.json +0 -0
  238. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/respiratory_assist_device/pre_populated_questionnaire_response.json +0 -0
  239. /data/lib/davinci_dtr_test_kit/{fixtures → full_ehr/fixtures}/respiratory_assist_device/questionnaire_package.json +0 -0
  240. /data/lib/davinci_dtr_test_kit/{fixtures.rb → full_ehr/fixtures.rb} +0 -0
  241. /data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/custom → full_ehr/v2.0.1/adaptive_custom}/dtr_custom_next_question_response_validation_test.rb +0 -0
  242. /data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → full_ehr/v2.0.1/adaptive_dinner}/dtr_adaptive_completion_group.rb +0 -0
  243. /data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/dinner_order → full_ehr/v2.0.1/adaptive_dinner}/dtr_adaptive_followup_questions_group.rb +0 -0
  244. /data/lib/davinci_dtr_test_kit/{client_groups/auth → full_ehr/v2.0.1}/dtr_client_payer_auth_smart_group.rb +0 -0
  245. /data/lib/davinci_dtr_test_kit/{client_groups/auth → full_ehr/v2.0.1}/dtr_client_payer_auth_udap_group.rb +0 -0
  246. /data/lib/davinci_dtr_test_kit/{docs → full_ehr/v2.0.1}/dtr_full_ehr_suite_description_v201.md +0 -0
  247. /data/lib/davinci_dtr_test_kit/{client_groups → full_ehr/v2.0.1}/must_support/questionnaire_must_support_elements.rb +0 -0
  248. /data/lib/davinci_dtr_test_kit/{client_groups/full_ehr → full_ehr/v2.0.1/shared}/dtr_full_ehr_saving_questionnaire_response_group.rb +0 -0
  249. /data/lib/davinci_dtr_test_kit/{create_test.rb → light_ehr/create_test.rb} +0 -0
  250. /data/lib/davinci_dtr_test_kit/{endpoints/mock_payer → light_ehr/endpoints}/light_ehr_supported_payer_endpoint.rb +0 -0
  251. /data/lib/davinci_dtr_test_kit/{read_test.rb → light_ehr/read_test.rb} +0 -0
  252. /data/lib/davinci_dtr_test_kit/{update_test.rb → light_ehr/update_test.rb} +0 -0
  253. /data/lib/davinci_dtr_test_kit/{docs → light_ehr/v2.0.1}/dtr_light_ehr_suite_description_v201.md +0 -0
  254. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/communication_request/communication_request_must_support_test.rb +0 -0
  255. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/communication_request/communication_request_validation.rb +0 -0
  256. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/communication_request/metadata.yml +0 -0
  257. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/communication_request_group.rb +0 -0
  258. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/coverage/coverage_must_support_test.rb +0 -0
  259. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/coverage/coverage_validation.rb +0 -0
  260. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/coverage/metadata.yml +0 -0
  261. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/coverage_group.rb +0 -0
  262. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/device_request/device_request_must_support_test.rb +0 -0
  263. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/device_request/device_request_validation.rb +0 -0
  264. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/device_request/metadata.yml +0 -0
  265. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/device_request_group.rb +0 -0
  266. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/encounter/encounter_must_support_test.rb +0 -0
  267. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/encounter/encounter_validation.rb +0 -0
  268. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/encounter/metadata.yml +0 -0
  269. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/encounter_group.rb +0 -0
  270. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/medication_request/medication_request_must_support_test.rb +0 -0
  271. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/medication_request/medication_request_validation.rb +0 -0
  272. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/medication_request/metadata.yml +0 -0
  273. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/medication_request_group.rb +0 -0
  274. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/nutrition_order/metadata.yml +0 -0
  275. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/nutrition_order/nutrition_order_must_support_test.rb +0 -0
  276. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/nutrition_order/nutrition_order_validation.rb +0 -0
  277. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/nutrition_order_group.rb +0 -0
  278. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/metadata.yml +0 -0
  279. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_context_search.rb +0 -0
  280. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_must_support_test.rb +0 -0
  281. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_patient_search.rb +0 -0
  282. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_read.rb +0 -0
  283. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response/questionnaire_response_validation.rb +0 -0
  284. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/questionnaire_response_group.rb +0 -0
  285. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/service_request/metadata.yml +0 -0
  286. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/service_request/service_request_must_support_test.rb +0 -0
  287. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/service_request/service_request_validation.rb +0 -0
  288. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/service_request_group.rb +0 -0
  289. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task/metadata.yml +0 -0
  290. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task/task_must_support_test.rb +0 -0
  291. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task/task_validation.rb +0 -0
  292. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/task_group.rb +0 -0
  293. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/vision_prescription/metadata.yml +0 -0
  294. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/vision_prescription/vision_prescription_must_support_test.rb +0 -0
  295. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/vision_prescription/vision_prescription_validation.rb +0 -0
  296. /data/lib/davinci_dtr_test_kit/{profiles → light_ehr/v2.0.1/profiles}/vision_prescription_group.rb +0 -0
  297. /data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/smart_ehr_launch}/fhir_context_coverage_test.rb +0 -0
  298. /data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/smart_ehr_launch}/fhir_context_references_test.rb +0 -0
  299. /data/lib/davinci_dtr_test_kit/{client_groups/light_ehr → light_ehr/v2.0.1/smart_ehr_launch}/fhir_launch_context_test.rb +0 -0
  300. /data/lib/davinci_dtr_test_kit/{endpoints/mock_authorization → server/endpoints}/simple_token_endpoint.rb +0 -0
  301. /data/lib/davinci_dtr_test_kit/{payer_server_groups → server/v2.0.1/adaptive_forms}/payer_server_next_response_complete_test.rb +0 -0
  302. /data/lib/davinci_dtr_test_kit/{docs → server/v2.0.1}/dtr_payer_server_suite_description_v201.md +0 -0
  303. /data/lib/davinci_dtr_test_kit/{validation_test.rb → server/validation_test.rb} +0 -0
  304. /data/lib/davinci_dtr_test_kit/{endpoints → smart_app/endpoints}/mock_authorization/authorize_endpoint.rb +0 -0
  305. /data/lib/davinci_dtr_test_kit/{endpoints → smart_app/endpoints}/mock_authorization.rb +0 -0
  306. /data/lib/davinci_dtr_test_kit/{endpoints → smart_app/endpoints}/mock_ehr/questionnaire_response_endpoint.rb +0 -0
  307. /data/lib/davinci_dtr_test_kit/{endpoints → smart_app/endpoints}/mock_ehr.rb +0 -0
  308. /data/lib/davinci_dtr_test_kit/{client_groups/adaptive_questionnaire/custom → smart_app/v2.0.1/adaptive_custom}/dtr_smart_app_custom_adaptive_request_test.rb +0 -0
  309. /data/lib/davinci_dtr_test_kit/{auth_groups → smart_app/v2.0.1/auth}/token_validation_test.rb +0 -0
  310. /data/lib/davinci_dtr_test_kit/{docs → smart_app/v2.0.1}/dtr_smart_app_suite_description_v201.md +0 -0
  311. /data/lib/davinci_dtr_test_kit/{client_groups/respiratory → smart_app/v2.0.1/static_respiratory}/dtr_respiratory_rendering_group.rb +0 -0
@@ -0,0 +1,87 @@
1
+ require_relative 'interaction/interaction_wait_test'
2
+ require_relative 'interaction/adaptive_questionnaires_completed_test'
3
+ require_relative 'interaction/ui_display_and_interaction_attestation_test'
4
+ require_relative 'request/dtr_questionnaire_package_request_validation_test'
5
+ require_relative 'response/dtr_questionnaire_package_response_validation_test'
6
+ require_relative 'request/dtr_next_question_request_validation_test'
7
+ require_relative 'response/dtr_next_question_response_validation_test'
8
+
9
+ module DaVinciDTRTestKit
10
+ # Abstract test group to use for scenarios that require adaptive Questionnaires
11
+ # Sets up the interaction and peforms all the validation to confirm that
12
+ # all unique Questionnaires returned by Inferno have been displayed correctly,
13
+ # completed at least once, and stored into the EHR.
14
+ #
15
+ # When extending, set the following config options to control the interaction
16
+ # and verification performed
17
+ # - dtr_workflow_tag: (Required) provide a tag for use in distinguishing requests made
18
+ # during this interaction test. Used to scope the verifications performed
19
+ # to just those received during this group's interaction.
20
+ # - qp_single_use: (Optional) set to true if Inferno should return only one successful
21
+ # response to the $questionnaire-package operation during the interaction.
22
+ # If set, subsequent calls to the operation will return an OperationOutcome.
23
+ # - qp_response_template_*: (Required) one of the following must be set to specified
24
+ # to indicate the source of the template that Inferno will use to build for responses
25
+ # to $questionnaire-package operation requests. Templates come in the form of a FHIR
26
+ # Parameters resource in json format. See https://github.com/inferno-framework/davinci-dtr-test-kit/wiki/Controlling-Simulated-Responses
27
+ # on the wiki for more details on the format for these templates and how Inferno
28
+ # turns them into actual responses.
29
+ # - qp_response_template_fixture: path relative to the `lib/davinci_dtr_test_kit/full_ehr/fixtures`
30
+ # directory pointing to a file containing the template. Used when the scenario
31
+ # uses developer-specified responses.
32
+ # - qp_response_template_input: the name of an input that will contain template.
33
+ # Used when testers can provide their own Questionnaires.
34
+ # - nq_questionnaire_template_*: (Required) one of the following must be set to specified
35
+ # to indicate the source of the template that Inferno will use to build for responses
36
+ # to $next-question operation requests. Tmplates come in the form of either a single or
37
+ # a json array of FHIR Questionnaire resources in json format. See https://github.com/inferno-framework/davinci-dtr-test-kit/wiki/Controlling-Simulated-Responses
38
+ # on the wiki for more details on the format for these templates and how Inferno
39
+ # turns them into actual responses.
40
+ # - nq_questionnaire_template_fixture: path relative to the `lib/davinci_dtr_test_kit/full_ehr/fixtures`
41
+ # directory pointing to a file containing the template. Used when the scenario
42
+ # uses developer-specified responses.
43
+ # - nq_questionnaire_template_input: the name of an input that will contain template.
44
+ # Used when testers can provide their own Questionnaires.
45
+ # - short_circuit_pass_input: (Optional) If testers can decide to not complete any Questionnaires
46
+ # during this group (e.g., for the must support group when no additional elements need to
47
+ # be demonstrated), points to an input that indicates that decision. When Questionnaires
48
+ # are not completed in this way, all tests in this group pass vacuously.
49
+ # The input must be a radio type that returns a value of 'true' when the tests should
50
+ # be run.
51
+ # - short_circuit_pass_message: (Optional) Message to use as the vacuous pass message
52
+ # when tester decides not to run the tests. If not provided a default is used.
53
+ # - adaptive_questionnaires_optional: (Optional) Set to true if it is ok for there not
54
+ # to be any adaptive questionnaires and therefore no observed $next-question
55
+ # calls to be validated
56
+ class DTRFullEHRV220AbstractAdaptive < Inferno::TestGroup
57
+ title 'Adaptive or Standard Questionnaire (Abstract)'
58
+ id :dtr_full_ehr_v220_abstract_adaptive
59
+ description <<~DESCRIPTION
60
+ Abstract group testing adaptive qustionnaires, and optionally standard ones as well
61
+ DESCRIPTION
62
+ run_as_group
63
+
64
+ group do
65
+ title 'Interaction'
66
+ test from: :dtr_full_ehr_v220_interaction_wait
67
+ test from: :dtr_full_ehr_v220_ui_display_and_interaction
68
+ # no wait tests are allowed between this test and the $next-question
69
+ # validation tests to allow passing of $questionnaire-package response
70
+ # analysis to flow to those tests. If wait tests need to be added,
71
+ # switch to output/input passing to accomplish this.
72
+ test from: :dtr_full_ehr_v220_adaptive_questionnaires_completed
73
+ end
74
+
75
+ group do
76
+ title '$questionnaire-package'
77
+ test from: :dtr_full_ehr_v220_qp_request_validation
78
+ test from: :dtr_full_ehr_v220_qp_response_validation
79
+ end
80
+
81
+ group do
82
+ title '$next-question'
83
+ test from: :dtr_full_ehr_v220_nq_request_validation
84
+ test from: :dtr_full_ehr_v220_nq_response_validation
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,59 @@
1
+ require_relative 'interaction/interaction_wait_test'
2
+ require_relative 'interaction/ui_display_and_interaction_attestation_test'
3
+ require_relative 'request/dtr_questionnaire_package_request_validation_test'
4
+ require_relative 'response/dtr_questionnaire_package_response_validation_test'
5
+
6
+ module DaVinciDTRTestKit
7
+ # Abstract test group to use for scenarios that require only standard Questionnaires
8
+ # Sets up the interaction and peforms all the validation to confirm that
9
+ # all unique Questionnaires returned by Inferno have been displayed correctly,
10
+ # completed at least once, and stored into the EHR.
11
+ #
12
+ # When extending, set the following config options to control the interaction
13
+ # and verification performed
14
+ # - dtr_workflow_tag: (Required) provide a tag for use in distinguishing requests made
15
+ # during this interaction test. Used to scope the verifications performed
16
+ # to just those received during this group's interaction.
17
+ # - qp_single_use: (Optional) set to true if Inferno should return only one successful
18
+ # response to the $questionnaire-package operation during the interaction.
19
+ # If set, subsequent calls to the operation will return an OperationOutcome.
20
+ # - qp_response_template_*: (Required) one of the following must be set to specified
21
+ # to indicate the source of the template that Inferno will use to build for responses
22
+ # to $questionnaire-package operation requests. Templates come in the form of a FHIR
23
+ # Parameters resource in json format. See https://github.com/inferno-framework/davinci-dtr-test-kit/wiki/Controlling-Simulated-Responses
24
+ # on the wiki for more details on the format for these templates and how Inferno
25
+ # turns them into actual responses.
26
+ # - qp_response_template_fixture: path relative to the `lib/davinci_dtr_test_kit/full_ehr/fixtures`
27
+ # directory pointing to a file containing the template. Used when the scenario
28
+ # uses developer-specified responses.
29
+ # - qp_response_template_input: the name of an input that will contain template.
30
+ # Used when testers can provide their own Questionnaires.
31
+ # - short_circuit_pass_input: (Optional) If testers can decide to not complete any Questionnaires
32
+ # during this group (e.g., for the must support group when no additional elements need to
33
+ # be demonstrated), points to an input that indicates that decision. When Questionnaires
34
+ # are not completed in this way, all tests in this group pass vacuously.
35
+ # The input must be a radio type that returns a value of 'true' when the tests should
36
+ # be run.
37
+ # - short_circuit_pass_message: (Optional) Message to use as the vacuous pass message
38
+ # when tester decides not to run the tests. If not provided a default is used.
39
+ class DTRFullEHRV220AbstractStandard < Inferno::TestGroup
40
+ title 'Standard Questionnaire (Abstract)'
41
+ id :dtr_full_ehr_v220_abstract_standard
42
+ description <<~DESCRIPTION
43
+ Abstract group testing standard qustionnaires only
44
+ DESCRIPTION
45
+ run_as_group
46
+
47
+ group do
48
+ title 'Interaction'
49
+ test from: :dtr_full_ehr_v220_interaction_wait
50
+ test from: :dtr_full_ehr_v220_ui_display_and_interaction
51
+ end
52
+
53
+ group do
54
+ title '$questionnaire-package'
55
+ test from: :dtr_full_ehr_v220_qp_request_validation
56
+ test from: :dtr_full_ehr_v220_qp_response_validation
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,145 @@
1
+ require 'udap_security_test_kit'
2
+ require 'smart_app_launch_test_kit'
3
+ require_relative '../v2.0.1/dtr_payer_registration_group'
4
+ require_relative '../../cross_suite/cors'
5
+ require_relative '../endpoints/mock_udap_smart_server/token_endpoint'
6
+ require_relative 'full_ehr_questionnaire_package_endpoint'
7
+ require_relative 'full_ehr_next_question_endpoint'
8
+ require_relative '../dtr_full_ehr_options'
9
+ require_relative 'must_support/dtr_additional_questionnaires_interaction_group'
10
+ require_relative 'must_support/dtr_questionnaire_base_must_support_test'
11
+ require_relative 'must_support/dtr_questionnaire_adaptive_must_support_test'
12
+ require_relative 'must_support/dtr_questionnaire_standard_must_support_test'
13
+ require_relative 'workflows/dtr_full_ehr_workflow_adaptive_group'
14
+ require_relative 'workflows/dtr_full_ehr_workflow_standard_group'
15
+
16
+ module DaVinciDTRTestKit
17
+ class DTRFullEHRSuiteV220 < Inferno::TestSuite
18
+ extend CORS
19
+
20
+ id :dtr_full_ehr_v220
21
+ title 'Da Vinci DTR Client Test Suite v2.2.0'
22
+ description File.read(File.join(__dir__, 'dtr_full_ehr_suite_description_v220.md'))
23
+
24
+ links [
25
+ {
26
+ label: 'Report Issue',
27
+ url: 'https://github.com/inferno-framework/davinci-dtr-test-kit/issues'
28
+ },
29
+ {
30
+ label: 'Open Source',
31
+ url: 'https://github.com/inferno-framework/davinci-dtr-test-kit'
32
+ },
33
+ {
34
+ label: 'Download',
35
+ url: 'https://github.com/inferno-framework/davinci-dtr-test-kit/releases'
36
+ },
37
+ {
38
+ label: 'Implementation Guide',
39
+ url: 'https://hl7.org/fhir/us/davinci-dtr/2.2.0/'
40
+ }
41
+ ]
42
+
43
+ # requirement_sets(
44
+ # {
45
+ # identifier: 'hl7.fhir.us.davinci-dtr_2.2.0',
46
+ # title: 'Da Vinci Documentation Templates and Rules (DTR) v2.2.0',
47
+ # actor: 'Full EHR'
48
+ # }
49
+ # )
50
+
51
+ suite_option :client_type,
52
+ title: 'Client Security Type',
53
+ list_options: [
54
+ {
55
+ label: 'SMART Backend Services',
56
+ value: DTRFullEHROptions::SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC
57
+ },
58
+ {
59
+ label: 'UDAP B2B Client Credentials',
60
+ value: DTRFullEHROptions::UDAP_CLIENT_CREDENTIALS
61
+ }
62
+ ]
63
+
64
+ # Hl7 Validator Wrapper:
65
+ fhir_resource_validator do
66
+ igs('hl7.fhir.us.davinci-dtr#2.2.0')
67
+
68
+ exclude_message do |message|
69
+ message.message.match?(/\A\S+: \S+: URL value '.*' does not resolve/)
70
+ end
71
+ end
72
+
73
+ # Hl7 Validator Wrapper:
74
+ fhir_resource_validator :no_unknown_extensions do
75
+ igs('hl7.fhir.us.davinci-dtr#2.2.0')
76
+
77
+ cli_context do
78
+ extensions []
79
+ end
80
+
81
+ exclude_message do |message|
82
+ message.message.match?(/\A\S+: \S+: URL value '.*' does not resolve/)
83
+ end
84
+ end
85
+
86
+ allow_cors QUESTIONNAIRE_PACKAGE_PATH, NEXT_PATH
87
+
88
+ route(:get, UDAPSecurityTestKit::UDAP_DISCOVERY_PATH, lambda { |_env|
89
+ UDAPSecurityTestKit::MockUDAPServer.udap_server_metadata(id)
90
+ })
91
+ route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
92
+ SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
93
+ })
94
+
95
+ suite_endpoint :post, UDAPSecurityTestKit::REGISTRATION_PATH,
96
+ UDAPSecurityTestKit::MockUDAPServer::RegistrationEndpoint
97
+ suite_endpoint :post, UDAPSecurityTestKit::TOKEN_PATH, MockUdapSmartServer::TokenEndpoint
98
+
99
+ suite_endpoint :post, QUESTIONNAIRE_PACKAGE_PATH, MockPayer::FullEHRV220QuestionnairePackageEndpoint
100
+ suite_endpoint :post, NEXT_PATH, MockPayer::FullEHRV220NextQuestionEndpoint
101
+
102
+ resume_test_route :get, RESUME_PASS_PATH do |request|
103
+ request.query_parameters['token']
104
+ end
105
+
106
+ resume_test_route :get, RESUME_FAIL_PATH, result: 'fail' do |request|
107
+ request.query_parameters['token']
108
+ end
109
+
110
+ group from: :dtr_client_payer_registration
111
+ group do
112
+ id :dtr_full_ehr_v220_questionnaire_workflows
113
+ title 'Questionnaire Workflows'
114
+
115
+ group from: :dtr_full_ehr_v220_workflow_standard
116
+ group from: :dtr_full_ehr_v220_workflow_adaptive
117
+ end
118
+
119
+ group do
120
+ id :dtr_full_ehr_v220_coverage
121
+ title 'Questionnaire Feature Coverage'
122
+
123
+ group from: :dtr_full_ehr_v220_additional_qustionnaires_for_ms
124
+
125
+ group do
126
+ id :dtr_full_ehr_v220_questionnaire_must_support
127
+ title 'Questionnaire Must Support'
128
+ run_as_group
129
+
130
+ test from: :dtr_full_ehr_v220_questionnaire_base_must_support
131
+ test from: :dtr_full_ehr_v220_questionnaire_adaptive_must_support
132
+ test from: :dtr_full_ehr_v220_questionnaire_standard_must_support
133
+ end
134
+ end
135
+
136
+ group from: :dtr_client_payer_auth_smart,
137
+ required_suite_options: {
138
+ client_type: DTRFullEHROptions::SMART_BACKEND_SERVICES_CONFIDENTIAL_ASYMMETRIC
139
+ }
140
+ group from: :dtr_client_payer_auth_udap,
141
+ required_suite_options: {
142
+ client_type: DTRFullEHROptions::UDAP_CLIENT_CREDENTIALS
143
+ }
144
+ end
145
+ end
@@ -0,0 +1,254 @@
1
+ The Da Vinci DTR Test Kit Full EHR Suite validates the conformance of Full EHRs
2
+ to the STU 2.2.0 version of the HL7® FHIR®
3
+ [Da Vinci Documentation Templates and Rules (DTR) Implementation Guide](https://hl7.org/fhir/us/davinci-dtr/2.2.0/).
4
+
5
+ ## Scope
6
+
7
+ These tests are a **DRAFT** intended to allow app implementers to perform
8
+ preliminary checks of their systems against DTR IG requirements and [provide
9
+ feedback](https://github.com/inferno-framework/davinci-dtr-test-kit/issues)
10
+ on the tests. Future versions of these tests may validate other
11
+ requirements and may change the test validation logic.
12
+
13
+ ## Test Methodology
14
+
15
+ Inferno will simulate a DTR payer server that will respond to
16
+ requests for questionnaires for the EHR under test to interact with.
17
+ The EHR will be expected to initiate requests to Inferno to elicit responses. Over the
18
+ course of these interactions, Inferno will seek to observe conformant handling of
19
+ DTR workflows and requirements around the retrieval and completion of questionnaires
20
+ and the storage of questionnaire responses.
21
+
22
+ ******** DETAILS BELOW HAVE NOT YET BEEN UPDATED FOR THE 2.2.0 SUITE ********
23
+
24
+ The suite includes two types of tests each with a different source for the response(s)
25
+ that Inferno's simulated payer will return:
26
+ - **Tester-provided Responses**: The tester provides a conformant `$questionnaire-package` response,
27
+ and `$next-question` responses for adaptive questionnaires, that Inferno will echo
28
+ back to the system under test. This allows the tester to demonstrate the DTR
29
+ functionality of the system using questionnaires that they choose.
30
+ - **Inferno-provided Reponses**: This test suite includes several mocked questionnaires
31
+ that will be returned when specific tests are run.
32
+
33
+ Regardless of the type, the EHR under test will initiate a request to
34
+ the payer server simulated by Inferno for a questionnaire using the
35
+ `$questionnaire-package` operation and Inferno will return the responses based on the type of test.
36
+ Inferno always returns that specific response associated with the test, whether based on a tester
37
+ input or the Inferno responses associated with that test. The request made by the EHR must be conformant,
38
+ but Inferno is not able to verify that its response is appropriate for the request.
39
+
40
+ The EHR will then be asked to complete the questionnaire, including:
41
+
42
+ - Pre-populating answers based on directives in the questionnaire.
43
+ - Rendering the questionnaire for users and allowing them to make additional updates.
44
+ Tests for Inferno-provided responses include specific directions on details to include in the completed
45
+ questionnaire to allow for validation of the [information origin extension](https://hl7.org/fhir/us/davinci-dtr/2.2.0/en/StructureDefinition-information-origin.html).
46
+ - For adaptive questionnaires only, getting additional questions using the `$next-question`
47
+ operation until the questionnaire is complete.
48
+ - Storing the completed questionnaire for future use as a FHIR QuestionnaireResponse.
49
+
50
+ EHRs are currently required to complete 5 questionnaires as a part of these tests, though
51
+ future iterations of this test kit may change this set:
52
+ - Tester-provided static and dynamic questionnaires, for workflow demonstration.
53
+ - Inferno-provided static and dynamic questionnaires, for demonstration of [information origin
54
+ extension](https://hl7.org/fhir/us/davinci-dtr/2.2.0/en/StructureDefinition-information-origin.html)
55
+ requirements.
56
+ - A feature-complete tester-provided static questionnaire, for demonstration of all
57
+ questionnaire features.
58
+
59
+ All requests sent by the EHR will be checked
60
+ for conformance to the DTR IG requirements individually and used in aggregate to determine
61
+ whether required features and functionality are present. HL7® FHIR® resources are
62
+ validated with the Java validator using `tx.fhir.org` as the terminology server.
63
+
64
+ ## Running the Tests
65
+
66
+ ### Quick Start
67
+
68
+ Inferno's simulated payer endpoints require authentication using the OAuth flows
69
+ conforming either to the
70
+ - SMART Backend Services flow, or
71
+ - UDAP Business-to-Business Client Credentials flow
72
+
73
+ When creating a test session, select the Client Security Type corresponding to an
74
+ authentication approach supported by the EHR. Then start by running the Client Registration
75
+ group which will guide you through the registration process.
76
+ See the *Auth Configuration Details* section below for details.
77
+
78
+ Once registration is complete, execute the Dinner Order Static Questionnaire Workflow tests
79
+ using the following steps:
80
+ 1. Select group **3.1.1** Retrieving the Static Questionnaire from the list on the left, click
81
+ "RUN TESTS" in the upper right, and click "SUBMIT" in the input dialog that appears.
82
+ 1. A "User Action Required" dialog will appear asking for DTR to be launched for a patient
83
+ meeting specific criteria. Once you have launched DTR from the EHR, click one of the
84
+ attestation links to continue the tests. NOTE: Inferno will not respond to `$questionnaire-package`
85
+ requests during this step.
86
+ 1. A new "User Action Required" dialog will appear directing you to make a `$questionnaire-package`
87
+ request. Take actions in the EHR to trigger this request. Before beginning to fill out the
88
+ questionnaire, click the link in the dialog to continue the tests.
89
+ 1. Select group **3.1.2** Filling Out the Static Questionnaire from the list on the left. A series
90
+ of "User Action Required" dialogs will appear asking you to confirm details of the rendered
91
+ questionnaire and actions taken while filling it out. Refer to and complete these attestations
92
+ as you fill out the questionnaire within the EHR.
93
+ 1. Complete the questionnaire, save the response in the EHR, and access the saved response in
94
+ its FHIR QuestionnaireResponse JSON form, which will be needed in the next step.
95
+ 1. Select group **3.1.3** Saving the QuestionnaireResponse from the list on the left and click
96
+ "RUN TESTS" in the upper right. An input dialog will appear asking for the
97
+ **Completed QuestionnaireResponse**. Put the FHIR QuestionnaireResponse JSON obtained
98
+ in the last step and click "SUBMIT".
99
+ 1. Attest that this QuestionnaireResponse was stored in the EHR to complete the tests.
100
+
101
+ Other workflows can be executed in a similar manner, but will include additional inputs and/or
102
+ different steps.
103
+
104
+ ### Postman-based Demo
105
+
106
+ If you do not have a DTR Full EHR but would like to try the tests out, you can use
107
+ [this Postman collection](https://github.com/inferno-framework/davinci-dtr-test-kit/blob/main/config/DTR%20Full%20EHR%20Tests%20Postman%20Demo.postman_collection.json)
108
+ to make requests against Inferno. This does not include the capability to render and complete the
109
+ questionnaires, but does have samples of correctly and incorrectly completed QuestionnaireResponses.
110
+ To run the tests using this approach:
111
+
112
+ #### Setup
113
+ 1. Install [postman](https://www.postman.com/downloads/).
114
+ 1. Import [this Postman collection](https://github.com/inferno-framework/davinci-dtr-test-kit/blob/main/config/DTR%20Full%20EHR%20Tests%20Postman%20Demo.postman_collection.json).
115
+
116
+ #### Startup and Client Registration
117
+ 1. Start a Da Vinci DTR Full EHR Test suite session choosing SMART Backend Services for the Client Security Type.
118
+ 1. Select the "Dinner Order Questionnaire Example (Postman)" preset from the dropdown in the upper left.
119
+ 1. Select the Client Registration group from the list at the left, click "RUN TEST" in the upper right,
120
+ and click "SUBMIT" in the input dialog that appears. A "User Action Required" wait dialog will appear.
121
+ 1. In another tab, start a SMART App Launch STU2.2 suite session. Select the Backend Services group,
122
+ click "RUN TESTS", and provide the following inputs before clicking "SUBMIT":
123
+ - **FHIR Endpoint**: the "FHIR Base URL" displayed in the wait dialog in the DTR tests.
124
+ - **Scopes**: `system/*.rs`
125
+ - **Client ID**: the "SMART Client Id" displayed in the wait dialog in the DTR tests.
126
+ 1. Find the access token to use for the data access request by opening test **3.2.05** Authorization
127
+ request succeeds when supplied correct information, click on the "REQUESTS" tab, clicking on the "DETAILS"
128
+ button, and expanding the "Response Body". Copy the "access_token" value, which will be a ~100 character
129
+ string of letters and numbers (e.g., eyJjbGllbnRfaWQiOiJzbWFydF9jbGllbnRfdGVzdF9kZW1vIiwiZXhwaXJhdGlvbiI6MTc0MzUxNDk4Mywibm9uY2UiOiJlZDI5MWIwNmZhMTE4OTc4In0)
130
+ 1. Update the postman collection configuration variables found by opening the "DTR Full EHR
131
+ Tests Postman Demo" collection and selecting the "Variables" tab.
132
+ - **base_url**: corresponds to the where the test suite session is running. Defaults to
133
+ `inferno.healthit.gov`. If running on another server, see guidance on the "Overview" tab
134
+ of the postman collection.
135
+ - **access_token**: the access token extracted in the previous step.
136
+ 1. Confirm that registration is complete by clicking the link in the DTR tests to complete the registration tests.
137
+
138
+ ##### UDAP Alternative
139
+
140
+ To demonstrate the use of UDAP authentication for the DTR EHR, perform the above startup steps with the following changes
141
+ - In step 1 when starting the DTR Full EHR test suite session, choose UDAP B2B Client Credentials for the Client Security Type.
142
+ - In step 4, start a UDAP Security test suite session instead. Select the "Demo: Run Against the UDAP Security Client Suite"
143
+ preset, then choose the UDAP Client Credentials Flow group, click "RUN TESTS", and update the following inputs before clicking "SUBMIT":
144
+ - **FHIR Server Base URL**: change to the FHIR server indicated in the wait dialog in the DTR tests.
145
+ - In step 5, the access token (same format as described above) can be found in test **2.3.01** OAuth token exchange request succeeds when supplied correct information.
146
+ - In step 7, there will be two attestations to complete.
147
+
148
+ All other steps below will be the same.
149
+
150
+ #### Dinner Questionnaire (Standard)
151
+
152
+ For the standard (static) questionnaire demo, use the requests in the _Static Dinner_ folder in the
153
+ Postman collection. Follow the quick start instructions above with the following modifications:
154
+ - Use postman to submit the "Questionnaire Package for Dinner (Static)" request when Inferno
155
+ is waiting for a `$questionnaire-package` request. Note that the response that looks similar
156
+ to the "Example Working Response" in postman.
157
+ - Copy the contents of the "Sample QuestionnaireResponse for Dinner (Static) ..." postman request,
158
+ replace the string `{{base_url}}` with the value of the **base_url** postman variable, and enter the result
159
+ as the **Completed QuestionnaireResponse** input in Inferno.
160
+
161
+ The "Dinner Order Questionnaire Example (Postman)" preset also populates the same questionnaire as the
162
+ tester-provided questionnaire to use in the Basic Workflows -> Static Questionnaire Workflow group. You
163
+ can execute that group as well in a similar manner to see how tester-provided questionnaire tests are
164
+ different.
165
+
166
+ These tests are not expected to fully pass due to known issues in the example FHIR instances.
167
+
168
+ #### Dinner Questionnaire (Adaptive)
169
+
170
+ For the adaptive questionnaire demo, use the requests in the _Adaptive Dinner_ folder in the
171
+ Postman collection.
172
+
173
+ 1. Return to the Inferno test session and in the test list at the left, select **3.2** Dinner Order Adaptive
174
+ Questionnaire Workflow, click the "RUN ALL TESTS" button in the upper right, and click "SUBMIT" in the input dialog.
175
+ 1. Attest that the EHR has launched its DTR workflow in Inferno by clicking the link for the **true** response.
176
+ 1. Once the **Adaptive Questionnaire Retrieval** wait dialog has appeared within Inferno asking
177
+ for `$questionnaire-package` and `$next-question`
178
+ requests, use postman to submit the "Questionnaire Package for Dinner" request followed by the
179
+ "Initial Next Question" request. Confirm
180
+ that the response that looks similar to the "Example Response" in postman
181
+ and click the link to continue the tests.
182
+ 1. Attest to the next several attestation wait dialogs as desired to get a sense for what is involved
183
+ in testing with an actual EHR implementation.
184
+ 1. Once the **Follow-up Next Question Request** wait dialog has appeared within Inferno asking for
185
+ another `$next-question` request, use postman to submit the "Second Next Question" request. Confirm
186
+ that the response that looks similar to the "Example Response" in postman
187
+ and click the link to continue the tests.
188
+ 1. Once the **Last Next Question Request** wait dialog has appeared within Inferno asking for
189
+ another `$next-question` request, use postman to submit the "Final Next Question" request. Confirm
190
+ that the response that looks similar to the "Example Response" in postman
191
+ and click the link to continue the tests.
192
+
193
+ The "Dinner Order Questionnaire Example (Postman)" preset also populates the same questionnaire as the
194
+ tester-provided questionnaire to use in the Basic Workflows -> Adaptive Questionnaire Workflow group. You
195
+ can execute that group as well in a similar manner (note that all `$next-question` requests are made
196
+ within a single wait test) to see how tester-provided questionnaire tests are different.
197
+
198
+ These tests are not expected to fully pass due to known issues in the example FHIR instances.
199
+
200
+ #### Review Authentication Interactions
201
+
202
+ Anytime after executing one of the questionnaire test groups, you can execute the Review Authentication Interactions
203
+ group to verify the conformance of access token requests against the SMART Backend Services flow.
204
+
205
+ These tests are not expected to fully pass due to invalid token requests purposefully sent by the SMART server tests.
206
+
207
+ ## Auth Configuration Details
208
+
209
+ When running these tests there are 2 options for authentication, which also allows
210
+ Inferno to identify which session the requests are for. The choice is made when the
211
+ session is created with the selected Client Security Type option, which determines
212
+ what details the tester needs to provide during the Client Registration tests:
213
+
214
+ - **SMART Backend Services**: the system under test will manually register
215
+ with Inferno and request access token used to access FHIR endpoints
216
+ as per the SMART Backend Services specification. It requires the
217
+ **SMART JSON Web Key Set (JWKS)** input to be populated with either a URL that resolves
218
+ to a JWKS or a raw JWKS in JSON format. Additionally, testers may provide
219
+ a **Client Id** if they want their client assigned a specific one.
220
+ - **UDAP B2B Client Credentials**: the system under test will dynamically register
221
+ with Inferno and request access tokens used to access FHIR endpoints
222
+ as per the UDAP specification. It requires the **UDAP Client URI** input
223
+ to be populated with the URI that the client will use when dynamically
224
+ registering with Inferno. This will be used to generate a client id (each
225
+ unique UDAP Client URI will always get the same client id).
226
+
227
+ ## Limitations
228
+
229
+ The DTR IG is a complex specification and these tests currently validate conformance to only
230
+ a subset of IG requirements. Future versions of the test suite will test further
231
+ features. A few specific features of interest are listed below.
232
+
233
+ ### Questionnaire Response Verification
234
+
235
+ Currently, these test kits do not have enough information about the data stored on
236
+ the EHR to evaluate whether CQL evaluation populated data correctly. However, Inferno
237
+ does ask testers to make sure that the target patient meets certain requirements and
238
+ directs them to perform certain actions while filling out forms that allow Inferno to
239
+ check that calculation is occuring and that the system is correctly keeping track of
240
+ items that were pre-populated. This approach may change in future versions of these tests.
241
+
242
+ ### Questionnaire Response Access
243
+
244
+ For standard (static) questionnaires, Full EHRs are not required by the DTR specification
245
+ to store or expose the completed form as a FHIR QuestionnaireResponse instance, though they
246
+ are required to store the form in some way and be able to send the QuestionnaireResponse
247
+ representation to other systems. Currently, testers are required to provide a
248
+ QuestionnaireResponse as an input to the tests once they have completed their workflow.
249
+ Future versions of these tests will provide additional options for making that information
250
+ available that are more in-line with expected system capabilities.
251
+
252
+ For adaptive questionnaires, the completed QuestionnaireResponse will be present in the
253
+ last `$next-question` invocation by the EHR, so this limitation does not apply to those
254
+ cases.