davinci_dtr_test_kit 0.18.0 → 0.18.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.
- checksums.yaml +4 -4
- data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_base_questionnaire/metadata.yml +0 -5
- data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_questionnaire_adapt_search/metadata.yml +1 -40
- data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/metadata.yml +1 -45
- data/lib/davinci_dtr_test_kit/full_ehr/v2.2.0/dtr_full_ehr_suite_description_v220.md +1 -235
- data/lib/davinci_dtr_test_kit/generator.rb +0 -16
- data/lib/davinci_dtr_test_kit/server/endpoints/next_question_proxy_endpoint.rb +5 -32
- data/lib/davinci_dtr_test_kit/server/endpoints/payer_proxy_endpoint.rb +85 -0
- data/lib/davinci_dtr_test_kit/server/endpoints/questionnaire_package_proxy_endpoint.rb +7 -34
- data/lib/davinci_dtr_test_kit/server/endpoints/value_set_expand_proxy_endpoint.rb +15 -0
- data/lib/davinci_dtr_test_kit/server/v2.0.1/adaptive_forms/adaptive_form_questionnaire_expressions_test.rb +0 -1
- data/lib/davinci_dtr_test_kit/server/v2.0.1/static_forms/static_form_response_validation_test.rb +1 -1
- data/lib/davinci_dtr_test_kit/server/v2.2.0/dtr_payer_server_suite.rb +18 -1
- data/lib/davinci_dtr_test_kit/server/v2.2.0/dtr_payer_server_suite_description_v220.md +4 -3
- data/lib/davinci_dtr_test_kit/server/v2.2.0/interaction_test.rb +68 -6
- data/lib/davinci_dtr_test_kit/server/v2.2.0/next_question_request_validation_test.rb +3 -2
- data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_request_validation_test.rb +3 -2
- data/lib/davinci_dtr_test_kit/urls.rb +5 -0
- data/lib/davinci_dtr_test_kit/version.rb +2 -2
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 581f255969cc06b60fd973e6bdf90f211c0ca6b820c155188a0d201f98fcf69f
|
|
4
|
+
data.tar.gz: e57637cd9351cdbe14b97b6a611662b300a10d6f7cf7c1ced8f338c9d8a6d466
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee5f93961f3551230b65ea4e692682a3487610a3e5ae0e2db2fb87ba571d120a5b4c60866cdb873d2548c8ea0667adad832bb0b30549ae574c2132f7d7826e26
|
|
7
|
+
data.tar.gz: 3e033e9ec47fd28fdc964227af4717c2e08fc20afc95d1c0c12e04be0a085f63dbe5f10f364afb7f1b31289012821173fbd1e34e0a519e9d5faaa1a1c414eaf6
|
data/lib/davinci_dtr_test_kit/cross_suite/generated/v2.2.0/dtr_base_questionnaire/metadata.yml
CHANGED
|
@@ -20,11 +20,6 @@
|
|
|
20
20
|
:path: extension
|
|
21
21
|
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-performerType
|
|
22
22
|
:modifier_extension: false
|
|
23
|
-
- :id: Questionnaire.extension:assemble-expectation
|
|
24
|
-
:slice_name: assemble-expectation
|
|
25
|
-
:path: extension
|
|
26
|
-
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation
|
|
27
|
-
:modifier_extension: false
|
|
28
23
|
- :id: Questionnaire.extension:estimatedCompletionTime
|
|
29
24
|
:slice_name: estimatedCompletionTime
|
|
30
25
|
:path: extension
|
|
@@ -20,11 +20,6 @@
|
|
|
20
20
|
:path: extension
|
|
21
21
|
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-performerType
|
|
22
22
|
:modifier_extension: false
|
|
23
|
-
- :id: Questionnaire.extension:assemble-expectation
|
|
24
|
-
:slice_name: assemble-expectation
|
|
25
|
-
:path: extension
|
|
26
|
-
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation
|
|
27
|
-
:modifier_extension: false
|
|
28
23
|
- :id: Questionnaire.extension:questionnaireAdaptive
|
|
29
24
|
:slice_name: questionnaireAdaptive
|
|
30
25
|
:path: extension
|
|
@@ -45,24 +40,7 @@
|
|
|
45
40
|
:path: extension
|
|
46
41
|
:url: http://hl7.org/fhir/StructureDefinition/cqf-library
|
|
47
42
|
:modifier_extension: false
|
|
48
|
-
|
|
49
|
-
:slice_name: hidden
|
|
50
|
-
:path: item.extension
|
|
51
|
-
:url: http://hl7.org/fhir/StructureDefinition/questionnaire-hidden
|
|
52
|
-
:modifier_extension: false
|
|
53
|
-
:slices:
|
|
54
|
-
- :slice_id: Questionnaire.item.answerOption.value[x]:valueCoding
|
|
55
|
-
:slice_name: valueCoding
|
|
56
|
-
:path: item.answerOption.value[x]
|
|
57
|
-
:discriminator:
|
|
58
|
-
:type: type
|
|
59
|
-
:code: Coding
|
|
60
|
-
- :slice_id: Questionnaire.item.answerOption.value[x]:valueReference
|
|
61
|
-
:slice_name: valueReference
|
|
62
|
-
:path: item.answerOption.value[x]
|
|
63
|
-
:discriminator:
|
|
64
|
-
:type: type
|
|
65
|
-
:code: Reference
|
|
43
|
+
:slices: []
|
|
66
44
|
:elements:
|
|
67
45
|
- :path: url
|
|
68
46
|
- :path: version
|
|
@@ -70,22 +48,5 @@
|
|
|
70
48
|
- :path: status
|
|
71
49
|
- :path: subjectType
|
|
72
50
|
- :path: effectivePeriod
|
|
73
|
-
- :path: item
|
|
74
|
-
- :path: item.linkId
|
|
75
|
-
- :path: item.prefix
|
|
76
|
-
- :path: item.type
|
|
77
|
-
- :path: item.required
|
|
78
|
-
- :path: item.repeats
|
|
79
|
-
- :path: item.readOnly
|
|
80
|
-
- :path: item.answerValueSet
|
|
81
|
-
- :path: item.answerOption
|
|
82
|
-
- :path: item.answerOption.value[x]
|
|
83
|
-
:types:
|
|
84
|
-
- Reference
|
|
85
|
-
- :path: item.initial
|
|
86
|
-
- :path: item.initial.value[x]
|
|
87
|
-
:types:
|
|
88
|
-
- Reference
|
|
89
|
-
- :path: item.item
|
|
90
51
|
:recursive_elements:
|
|
91
52
|
- item
|
|
@@ -60,11 +60,6 @@
|
|
|
60
60
|
:path: extension
|
|
61
61
|
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-performerType
|
|
62
62
|
:modifier_extension: false
|
|
63
|
-
- :id: Questionnaire.extension:assemble-expectation
|
|
64
|
-
:slice_name: assemble-expectation
|
|
65
|
-
:path: extension
|
|
66
|
-
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation
|
|
67
|
-
:modifier_extension: false
|
|
68
63
|
- :id: Questionnaire.extension:estimatedCompletionTime
|
|
69
64
|
:slice_name: estimatedCompletionTime
|
|
70
65
|
:path: extension
|
|
@@ -300,11 +295,6 @@
|
|
|
300
295
|
:path: extension
|
|
301
296
|
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-performerType
|
|
302
297
|
:modifier_extension: false
|
|
303
|
-
- :id: Questionnaire.extension:assemble-expectation
|
|
304
|
-
:slice_name: assemble-expectation
|
|
305
|
-
:path: extension
|
|
306
|
-
:url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation
|
|
307
|
-
:modifier_extension: false
|
|
308
298
|
- :id: Questionnaire.extension:questionnaireAdaptive
|
|
309
299
|
:slice_name: questionnaireAdaptive
|
|
310
300
|
:path: extension
|
|
@@ -325,24 +315,7 @@
|
|
|
325
315
|
:path: extension
|
|
326
316
|
:url: http://hl7.org/fhir/StructureDefinition/cqf-library
|
|
327
317
|
:modifier_extension: false
|
|
328
|
-
|
|
329
|
-
:slice_name: hidden
|
|
330
|
-
:path: item.extension
|
|
331
|
-
:url: http://hl7.org/fhir/StructureDefinition/questionnaire-hidden
|
|
332
|
-
:modifier_extension: false
|
|
333
|
-
:slices:
|
|
334
|
-
- :slice_id: Questionnaire.item.answerOption.value[x]:valueCoding
|
|
335
|
-
:slice_name: valueCoding
|
|
336
|
-
:path: item.answerOption.value[x]
|
|
337
|
-
:discriminator:
|
|
338
|
-
:type: type
|
|
339
|
-
:code: Coding
|
|
340
|
-
- :slice_id: Questionnaire.item.answerOption.value[x]:valueReference
|
|
341
|
-
:slice_name: valueReference
|
|
342
|
-
:path: item.answerOption.value[x]
|
|
343
|
-
:discriminator:
|
|
344
|
-
:type: type
|
|
345
|
-
:code: Reference
|
|
318
|
+
:slices: []
|
|
346
319
|
:elements:
|
|
347
320
|
- :path: url
|
|
348
321
|
- :path: version
|
|
@@ -350,23 +323,6 @@
|
|
|
350
323
|
- :path: status
|
|
351
324
|
- :path: subjectType
|
|
352
325
|
- :path: effectivePeriod
|
|
353
|
-
- :path: item
|
|
354
|
-
- :path: item.linkId
|
|
355
|
-
- :path: item.prefix
|
|
356
|
-
- :path: item.type
|
|
357
|
-
- :path: item.required
|
|
358
|
-
- :path: item.repeats
|
|
359
|
-
- :path: item.readOnly
|
|
360
|
-
- :path: item.answerValueSet
|
|
361
|
-
- :path: item.answerOption
|
|
362
|
-
- :path: item.answerOption.value[x]
|
|
363
|
-
:types:
|
|
364
|
-
- Reference
|
|
365
|
-
- :path: item.initial
|
|
366
|
-
- :path: item.initial.value[x]
|
|
367
|
-
:types:
|
|
368
|
-
- Reference
|
|
369
|
-
- :path: item.item
|
|
370
326
|
:recursive_elements:
|
|
371
327
|
- item
|
|
372
328
|
- :resource: Questionnaire
|
|
@@ -17,238 +17,4 @@ requests for questionnaires for the EHR under test to interact with.
|
|
|
17
17
|
The EHR will be expected to initiate requests to Inferno to elicit responses. Over the
|
|
18
18
|
course of these interactions, Inferno will seek to observe conformant handling of
|
|
19
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.
|
|
20
|
+
and the storage of questionnaire responses.
|
|
@@ -74,7 +74,6 @@ module DaVinciDTRTestKit
|
|
|
74
74
|
|
|
75
75
|
# handle gap when looking at differential
|
|
76
76
|
profile_metadata.must_supports[:recursive_elements] << 'item' if element_scope == 'differential'
|
|
77
|
-
add_parameters_slice_discriminators(profile_metadata) if questionnaire_package_output_parameters?(profile)
|
|
78
77
|
|
|
79
78
|
profile_metadata
|
|
80
79
|
end
|
|
@@ -98,20 +97,5 @@ module DaVinciDTRTestKit
|
|
|
98
97
|
def questionnaire_package_output_parameters?(profile)
|
|
99
98
|
profile.url == 'http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-qpackage-output-parameters'
|
|
100
99
|
end
|
|
101
|
-
|
|
102
|
-
# This is a workaround for Inferno Core treating slice discriminators defined with `patternString` as unsupported.
|
|
103
|
-
# The QuestionnairePackage Output Parameters profile slices `Parameters.parameter` by `name` (`packagebundle`
|
|
104
|
-
# and `outcome`), so replace only unsupported discriminators with equivalent value metadata. If Core gets updated
|
|
105
|
-
# to support `patternString`, this method becomes a no-op and can be removed.
|
|
106
|
-
def add_parameters_slice_discriminators(profile_metadata)
|
|
107
|
-
profile_metadata.must_supports[:slices].each do |slice|
|
|
108
|
-
next unless slice.dig(:discriminator, :type) == 'unsupported'
|
|
109
|
-
|
|
110
|
-
slice[:discriminator] = {
|
|
111
|
-
type: 'value',
|
|
112
|
-
values: [{ path: 'name', value: slice[:slice_name] }]
|
|
113
|
-
}
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
100
|
end
|
|
117
101
|
end
|
|
@@ -1,41 +1,14 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'payer_proxy_endpoint'
|
|
2
2
|
|
|
3
3
|
module DaVinciDTRTestKit
|
|
4
4
|
module MockPayer
|
|
5
|
-
class NextQuestionProxyEndpoint <
|
|
6
|
-
def
|
|
7
|
-
request.headers['authorization']&.delete_prefix('Bearer ')
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def tags
|
|
5
|
+
class NextQuestionProxyEndpoint < PayerProxyEndpoint
|
|
6
|
+
def outgoing_request_tags
|
|
11
7
|
[NEXT_TAG]
|
|
12
8
|
end
|
|
13
9
|
|
|
14
|
-
def
|
|
15
|
-
|
|
16
|
-
session_data = Inferno::Repositories::SessionData.new
|
|
17
|
-
url_input = session_data.load(test_session_id: session_id, name: 'url')
|
|
18
|
-
credentials_input =
|
|
19
|
-
session_data.load(
|
|
20
|
-
test_session_id: session_id,
|
|
21
|
-
name: 'smart_auth_info',
|
|
22
|
-
type: 'auth_info'
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
client = FHIR::Client.new(url_input)
|
|
26
|
-
client.default_json
|
|
27
|
-
client.set_bearer_token(credentials_input.access_token) if credentials_input.access_token
|
|
28
|
-
payer_response = client.send(:post, '/Questionnaire/$next-question', JSON.parse(request.body.string),
|
|
29
|
-
{ 'Content-Type' => 'application/fhir+json' })
|
|
30
|
-
|
|
31
|
-
response.status = 200
|
|
32
|
-
response.format = 'application/fhir+json'
|
|
33
|
-
response.headers['Access-Control-Allow-Origin'] = '*'
|
|
34
|
-
response.body = payer_response.response[:body].to_s
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def update_result
|
|
38
|
-
results_repo.update_result(result.id, 'pass') unless test.config.options[:accepts_multiple_requests]
|
|
10
|
+
def payer_path
|
|
11
|
+
'/Questionnaire/$next-question'
|
|
39
12
|
end
|
|
40
13
|
end
|
|
41
14
|
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
require_relative '../../tags'
|
|
2
|
+
|
|
3
|
+
module DaVinciDTRTestKit
|
|
4
|
+
module MockPayer
|
|
5
|
+
class PayerProxyEndpoint < Inferno::DSL::SuiteEndpoint
|
|
6
|
+
# Override this method to define the endpoint path. Path should lead with '/'
|
|
7
|
+
def payer_path
|
|
8
|
+
raise NotImplementedError, "#{self.class} must implement #payer_path"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def outgoing_request_tags
|
|
12
|
+
[]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def test_run_identifier
|
|
16
|
+
request.headers['authorization']&.delete_prefix('Bearer ')
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def make_response
|
|
20
|
+
payer_response = forward_and_persist_request
|
|
21
|
+
|
|
22
|
+
content_type = payer_response.dig(:headers, 'content-type')
|
|
23
|
+
|
|
24
|
+
response.status = payer_response[:status]
|
|
25
|
+
response.headers['Content-Type'] = content_type if content_type.present?
|
|
26
|
+
response.headers['Access-Control-Allow-Origin'] = '*'
|
|
27
|
+
response.body = payer_response[:body]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def update_result
|
|
31
|
+
results_repo.update_result(result.id, 'pass') unless test.config.options[:accepts_multiple_requests]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
private
|
|
35
|
+
|
|
36
|
+
def forward_and_persist_request
|
|
37
|
+
url_input = session_data.load(test_session_id: result.test_session_id, name: 'url')
|
|
38
|
+
payer_url = "#{url_input.chomp('/')}#{payer_path}"
|
|
39
|
+
credentials = auth_info('backend_services_smart_auth_info')
|
|
40
|
+
credentials = auth_info('smart_auth_info') if credentials.access_token.blank?
|
|
41
|
+
|
|
42
|
+
client = FHIR::Client.new(url_input)
|
|
43
|
+
client.set_bearer_token(credentials.access_token) if credentials&.access_token
|
|
44
|
+
payer_request_body = request.body.string
|
|
45
|
+
payer_request_headers = { 'Content-Type' => 'application/fhir+json' }.merge(client.security_headers)
|
|
46
|
+
|
|
47
|
+
# We make the request with the FHIR::Client's underlying client object because the
|
|
48
|
+
# FHIR::Client API requires a FHIR object, and we need to proxy the raw body
|
|
49
|
+
client.client.post(
|
|
50
|
+
payer_url,
|
|
51
|
+
payer_request_body,
|
|
52
|
+
payer_request_headers
|
|
53
|
+
) do |body, _request, result|
|
|
54
|
+
payer_response = { status: result.code, headers: result.each_header.to_h, body: }
|
|
55
|
+
persist_payer_request(payer_url, payer_request_body, payer_request_headers, payer_response)
|
|
56
|
+
payer_response
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def persist_payer_request(url, body, request_headers, payer_response)
|
|
61
|
+
Inferno::Repositories::Requests.new.create(
|
|
62
|
+
verb: 'POST',
|
|
63
|
+
url:,
|
|
64
|
+
direction: 'outgoing',
|
|
65
|
+
status: payer_response[:status],
|
|
66
|
+
request_body: body,
|
|
67
|
+
response_body: payer_response[:body],
|
|
68
|
+
result_id: result.id,
|
|
69
|
+
test_session_id: result.test_session_id,
|
|
70
|
+
request_headers: request_headers.map { |name, value| { name:, value: } },
|
|
71
|
+
response_headers: payer_response[:headers].map { |name, value| { name:, value: } },
|
|
72
|
+
tags: outgoing_request_tags
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def auth_info(name)
|
|
77
|
+
session_data.load(test_session_id: result.test_session_id, name:, type: 'auth_info')
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def session_data
|
|
81
|
+
@session_data ||= Inferno::Repositories::SessionData.new
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -1,43 +1,16 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'payer_proxy_endpoint'
|
|
2
2
|
|
|
3
3
|
module DaVinciDTRTestKit
|
|
4
4
|
module MockPayer
|
|
5
|
-
class QuestionnairePackageProxyEndpoint <
|
|
6
|
-
def
|
|
7
|
-
request.headers['authorization']&.delete_prefix('Bearer ')
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def tags
|
|
5
|
+
class QuestionnairePackageProxyEndpoint < PayerProxyEndpoint
|
|
6
|
+
def outgoing_request_tags
|
|
11
7
|
[QUESTIONNAIRE_TAG]
|
|
12
8
|
end
|
|
13
9
|
|
|
14
|
-
def
|
|
15
|
-
|
|
16
|
-
session_data
|
|
17
|
-
|
|
18
|
-
url_input = session_data.load(test_session_id: session_id, name: 'url')
|
|
19
|
-
credentials_input =
|
|
20
|
-
session_data.load(
|
|
21
|
-
test_session_id: session_id,
|
|
22
|
-
name: 'smart_auth_info',
|
|
23
|
-
type: 'auth_info'
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
client = FHIR::Client.new(url_input)
|
|
27
|
-
client.default_json
|
|
28
|
-
client.set_bearer_token(credentials_input.access_token) if credentials_input.access_token
|
|
29
|
-
endpoint = endpoint_input.nil? ? '/Questionnaire/$questionnaire-package' : endpoint_input
|
|
30
|
-
payer_response = client.send(:post, endpoint, JSON.parse(request.body.string),
|
|
31
|
-
{ 'Content-Type' => 'application/fhir+json' })
|
|
32
|
-
|
|
33
|
-
response.status = 200
|
|
34
|
-
response.format = 'application/fhir+json'
|
|
35
|
-
response.headers['Access-Control-Allow-Origin'] = '*'
|
|
36
|
-
response.body = payer_response.response[:body].to_s
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def update_result
|
|
40
|
-
results_repo.update_result(result.id, 'pass') unless test.config.options[:accepts_multiple_requests]
|
|
10
|
+
def payer_path
|
|
11
|
+
# The v2.0.1 suite allows for a custom endpoint
|
|
12
|
+
session_data.load(test_session_id: result.test_session_id, name: 'custom_endpoint') ||
|
|
13
|
+
'/Questionnaire/$questionnaire-package'
|
|
41
14
|
end
|
|
42
15
|
end
|
|
43
16
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require_relative 'payer_proxy_endpoint'
|
|
2
|
+
|
|
3
|
+
module DaVinciDTRTestKit
|
|
4
|
+
module MockPayer
|
|
5
|
+
class ValueSetExpandProxyEndpoint < PayerProxyEndpoint
|
|
6
|
+
def outgoing_request_tags
|
|
7
|
+
[VALUE_SET_EXPAND_TAG]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def payer_path
|
|
11
|
+
'/ValueSet/$expand'
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -17,7 +17,6 @@ module DaVinciDTRTestKit
|
|
|
17
17
|
skip_if scratch[:adaptive_questionnaire_bundles].blank?, 'No questionnaire bundle returned.'
|
|
18
18
|
questionnaires = extract_questionnaires_from_bundles(scratch[:adaptive_questionnaire_bundles])
|
|
19
19
|
verify_questionnaire_items(questionnaires)
|
|
20
|
-
scratch[:adaptive_questionnaire_bundles] = nil
|
|
21
20
|
end
|
|
22
21
|
end
|
|
23
22
|
end
|
data/lib/davinci_dtr_test_kit/server/v2.0.1/static_forms/static_form_response_validation_test.rb
CHANGED
|
@@ -31,7 +31,7 @@ module DaVinciDTRTestKit
|
|
|
31
31
|
run do
|
|
32
32
|
skip_if retrieval_method == 'Adaptive', 'Performing only adaptive flow tests - only one flow is required.'
|
|
33
33
|
req = if initial_static_questionnaire_request.nil?
|
|
34
|
-
load_tagged_requests(QUESTIONNAIRE_TAG)
|
|
34
|
+
load_tagged_requests(QUESTIONNAIRE_TAG).first
|
|
35
35
|
else
|
|
36
36
|
fhir_operation("#{url}/Questionnaire/$questionnaire-package",
|
|
37
37
|
body: JSON.parse(initial_static_questionnaire_request),
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
require 'smart_app_launch_test_kit'
|
|
2
|
+
require_relative '../../cross_suite/cors'
|
|
3
|
+
require_relative '../endpoints/questionnaire_package_proxy_endpoint'
|
|
4
|
+
require_relative '../endpoints/next_question_proxy_endpoint'
|
|
5
|
+
require_relative '../endpoints/value_set_expand_proxy_endpoint'
|
|
2
6
|
require_relative 'interaction_test'
|
|
3
7
|
require_relative 'log_questionnaire_errors_support_test'
|
|
4
8
|
require_relative 'next_question_support/invalid_questionnaire_response_test'
|
|
@@ -41,6 +45,8 @@ require_relative 'must_support/questionnaire_adaptive_search_must_support_test'
|
|
|
41
45
|
module DaVinciDTRTestKit
|
|
42
46
|
module DTRPayerServerV220
|
|
43
47
|
class DTRPayerServerSuiteV220 < Inferno::TestSuite
|
|
48
|
+
extend CORS
|
|
49
|
+
|
|
44
50
|
id :dtr_payer_server_v220
|
|
45
51
|
title 'Da Vinci DTR Payer Server Test Suite v2.2.0'
|
|
46
52
|
description File.read(File.join(__dir__, 'dtr_payer_server_suite_description_v220.md'))
|
|
@@ -80,6 +86,16 @@ module DaVinciDTRTestKit
|
|
|
80
86
|
end
|
|
81
87
|
end
|
|
82
88
|
|
|
89
|
+
allow_cors QUESTIONNAIRE_PACKAGE_PATH, NEXT_PATH, VALUE_SET_EXPAND_PATH
|
|
90
|
+
|
|
91
|
+
suite_endpoint :post, QUESTIONNAIRE_PACKAGE_PATH, MockPayer::QuestionnairePackageProxyEndpoint
|
|
92
|
+
suite_endpoint :post, NEXT_PATH, MockPayer::NextQuestionProxyEndpoint
|
|
93
|
+
suite_endpoint :post, VALUE_SET_EXPAND_PATH, MockPayer::ValueSetExpandProxyEndpoint
|
|
94
|
+
|
|
95
|
+
resume_test_route :get, RESUME_PASS_PATH do |request|
|
|
96
|
+
request.query_parameters['token']
|
|
97
|
+
end
|
|
98
|
+
|
|
83
99
|
input :url,
|
|
84
100
|
title: 'Payer FHIR Server Base Url',
|
|
85
101
|
description: 'Base FHIR URL implementing the DTR server operations.'
|
|
@@ -274,7 +290,8 @@ module DaVinciDTRTestKit
|
|
|
274
290
|
id :dtr_payer_v220_error_handling
|
|
275
291
|
description <<~DESCRIPTION
|
|
276
292
|
This group makes requests which contain errors and verifies that the
|
|
277
|
-
server handles them in accordance with DTR IG requirements.
|
|
293
|
+
server handles them in accordance with DTR IG requirements. It is
|
|
294
|
+
independent of DTR Request Mode.
|
|
278
295
|
DESCRIPTION
|
|
279
296
|
|
|
280
297
|
test from: :dtr_server_v220_payer_questionnaire_not_found
|
|
@@ -20,9 +20,10 @@ limitations of these tests.
|
|
|
20
20
|
Inferno will simulate a DTR client and make a series of requests to the system
|
|
21
21
|
under test. Because the business logic that determines Questionnaire design and
|
|
22
22
|
which Questionnaires will be returned is outside of the scope of the DTR
|
|
23
|
-
specification and will vary between implementers, testers
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
specification and will vary between implementers, testers must either provide
|
|
24
|
+
the requests that Inferno will make to the server or send DTR requests to
|
|
25
|
+
Inferno from a tester-controlled DTR client. These requests must cause the
|
|
26
|
+
server to return Questionnaires which demonstrate support for DTR
|
|
26
27
|
requirements, including
|
|
27
28
|
- Advertising support for DTR operations in the CapabilityStatement
|
|
28
29
|
- Support for SMART backend services authorization
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
require_relative 'client_simulation'
|
|
2
|
+
require_relative '../../urls'
|
|
2
3
|
|
|
3
4
|
module DaVinciDTRTestKit
|
|
4
5
|
module DTRPayerServerV220
|
|
5
6
|
class InteractionTest < Inferno::Test
|
|
6
7
|
include ClientSimulation
|
|
8
|
+
include URLs
|
|
9
|
+
|
|
10
|
+
MANUAL_MODE = 'manual_mode'.freeze
|
|
11
|
+
CLIENT_MODE = 'client_mode'.freeze
|
|
7
12
|
|
|
8
13
|
id :dtr_v220_payer_interaction
|
|
9
14
|
title 'Request Questionnaires'
|
|
@@ -25,14 +30,40 @@ module DaVinciDTRTestKit
|
|
|
25
30
|
- A list of QuestionnaireResponse templates: When an adaptive form is returned in
|
|
26
31
|
a `$questionnaire-package` response, Inferno will find a matching template from
|
|
27
32
|
this list based on the Questionnaire and use the answers to construct a sequence
|
|
28
|
-
of `$next-question` calls.
|
|
33
|
+
of `$next-question` calls. See
|
|
34
|
+
[here](https://github.com/inferno-framework/davinci-dtr-test-kit/wiki/Controlling-Simulated-Requests#next-question-requests)
|
|
35
|
+
for more information on how Inferno generates these `$next-question` requests.
|
|
29
36
|
|
|
30
37
|
Requests made during this test are tagged for analysis in subsequent tests.
|
|
31
38
|
)
|
|
39
|
+
config options: { accepts_multiple_requests: true }
|
|
32
40
|
|
|
33
41
|
input :url,
|
|
34
42
|
title: 'Payer FHIR Server Base Url',
|
|
35
43
|
description: 'Base FHIR URL implementing the DTR server operations.'
|
|
44
|
+
input :request_mode,
|
|
45
|
+
title: 'DTR Request Mode',
|
|
46
|
+
description: %(
|
|
47
|
+
Choose how Inferno generates requests:
|
|
48
|
+
|
|
49
|
+
**Manual mode:** Inferno generates requests from supplied JSON.
|
|
50
|
+
|
|
51
|
+
**Client mode:** Inferno proxies requests from a tester-controlled DTR client.
|
|
52
|
+
),
|
|
53
|
+
type: 'radio',
|
|
54
|
+
default: MANUAL_MODE,
|
|
55
|
+
options: {
|
|
56
|
+
list_options: [
|
|
57
|
+
{
|
|
58
|
+
label: 'Manual mode',
|
|
59
|
+
value: MANUAL_MODE
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Client mode',
|
|
63
|
+
value: CLIENT_MODE
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
36
67
|
input :questionnaire_package_request_parameters,
|
|
37
68
|
title: '$questionnaire-package Request Parameters',
|
|
38
69
|
description: %(
|
|
@@ -41,7 +72,8 @@ module DaVinciDTRTestKit
|
|
|
41
72
|
`Questionnaire/$questionnaire-package` operation once for each
|
|
42
73
|
with the request as the body of the invocation.
|
|
43
74
|
),
|
|
44
|
-
type: 'textarea'
|
|
75
|
+
type: 'textarea',
|
|
76
|
+
enable_when: { input_name: 'request_mode', value: MANUAL_MODE }
|
|
45
77
|
input :questionnaire_response_templates,
|
|
46
78
|
title: 'QuestionnaireResponse Templates for $next-question requests',
|
|
47
79
|
description: %(
|
|
@@ -51,13 +83,43 @@ module DaVinciDTRTestKit
|
|
|
51
83
|
If not provided, no `$next-question` requests will be performed.
|
|
52
84
|
),
|
|
53
85
|
type: 'textarea',
|
|
54
|
-
optional: true
|
|
86
|
+
optional: true,
|
|
87
|
+
enable_when: { input_name: 'request_mode', value: MANUAL_MODE }
|
|
88
|
+
input :dtr_client_access_token,
|
|
89
|
+
title: 'DTR Client Access Token',
|
|
90
|
+
description: %(
|
|
91
|
+
In DTR Client Mode, bearer token used to identify requests from a tester-controlled DTR client.
|
|
92
|
+
),
|
|
93
|
+
enable_when: { input_name: 'request_mode', value: CLIENT_MODE }
|
|
55
94
|
input :backend_services_smart_auth_info
|
|
56
95
|
|
|
57
96
|
run do
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
97
|
+
if request_mode == CLIENT_MODE
|
|
98
|
+
wait(
|
|
99
|
+
identifier: dtr_client_access_token,
|
|
100
|
+
timeout: 1200,
|
|
101
|
+
message: %(
|
|
102
|
+
**Tester-Controlled DTR Client Flow**
|
|
103
|
+
|
|
104
|
+
Send DTR requests from the client to Inferno while this test is waiting.
|
|
105
|
+
Include `Authorization: Bearer #{dtr_client_access_token}` on every request.
|
|
106
|
+
|
|
107
|
+
- Questionnaire Package: `#{questionnaire_package_url}`
|
|
108
|
+
- Next Question: `#{next_url}`
|
|
109
|
+
- ValueSet Expand: `#{value_set_expand_url}`
|
|
110
|
+
|
|
111
|
+
Inferno will forward each request to the payer server, return the payer response to the
|
|
112
|
+
client, and use the recorded interaction in subsequent tests.
|
|
113
|
+
|
|
114
|
+
**[Click here](#{resume_pass_url}?token=#{dtr_client_access_token})** after the client workflow is
|
|
115
|
+
complete.
|
|
116
|
+
)
|
|
117
|
+
)
|
|
118
|
+
else
|
|
119
|
+
parameters = extract_fhir_parameters(questionnaire_package_request_parameters)
|
|
120
|
+
templates = extract_fhir_questionnaire_response_templates(questionnaire_response_templates)
|
|
121
|
+
parameters.each { |parameter| questionnaire_interaction(url, parameter, templates) }
|
|
122
|
+
end
|
|
61
123
|
end
|
|
62
124
|
|
|
63
125
|
def extract_fhir_parameters(questionnaire_package_request_parameters)
|
|
@@ -7,12 +7,13 @@ module DaVinciDTRTestKit
|
|
|
7
7
|
include DaVinciDTRTestKit::ValidationTest
|
|
8
8
|
|
|
9
9
|
id :dtr_v220_payer_next_question_request_validation
|
|
10
|
-
title '$next-question QuestionnaireResponse
|
|
10
|
+
title '$next-question QuestionnaireResponse requests are valid'
|
|
11
11
|
description %(
|
|
12
12
|
This test validates that each outgoing QuestionnaireResponse request to the
|
|
13
13
|
`$next-question` operation
|
|
14
14
|
conforms to the [DTR Questionnaire Response for adaptive form profile](https://hl7.org/fhir/us/davinci-dtr/2.2.0/en/StructureDefinition-dtr-questionnaireresponse-adapt.html).
|
|
15
|
-
Inferno generates these request bodies from the provided test input
|
|
15
|
+
Inferno either generates these request bodies from the provided test input
|
|
16
|
+
or forwards requests from a tester-provided DTR Client.
|
|
16
17
|
)
|
|
17
18
|
simulation_verification
|
|
18
19
|
|
data/lib/davinci_dtr_test_kit/server/v2.2.0/questionnaire_package_request_validation_test.rb
CHANGED
|
@@ -7,11 +7,12 @@ module DaVinciDTRTestKit
|
|
|
7
7
|
include DaVinciDTRTestKit::ValidationTest
|
|
8
8
|
|
|
9
9
|
id :dtr_v220_payer_questionnaire_package_request_validation
|
|
10
|
-
title '$questionnaire-package
|
|
10
|
+
title '$questionnaire-package requests are valid'
|
|
11
11
|
description %(
|
|
12
12
|
This test validates that each outgoing $questionnaire-package request body
|
|
13
13
|
conforms to the [DTR Questionnaire Package Input Parameters profile](https://hl7.org/fhir/us/davinci-dtr/2.2.0/en/StructureDefinition-dtr-qpackage-input-parameters.html).
|
|
14
|
-
Inferno generates these request bodies from the provided test input
|
|
14
|
+
Inferno either generates these request bodies from the provided test input
|
|
15
|
+
or forwards requests from a tester-provided DTR Client.
|
|
15
16
|
)
|
|
16
17
|
simulation_verification
|
|
17
18
|
|
|
@@ -11,6 +11,7 @@ module DaVinciDTRTestKit
|
|
|
11
11
|
PAYER_TOKEN_PATH = "#{FHIR_BASE_PATH}/mock_payer_auth/token".freeze
|
|
12
12
|
QUESTIONNAIRE_PACKAGE_PATH = "#{FHIR_BASE_PATH}/Questionnaire/$questionnaire-package".freeze
|
|
13
13
|
NEXT_PATH = "#{FHIR_BASE_PATH}/Questionnaire/$next-question".freeze
|
|
14
|
+
VALUE_SET_EXPAND_PATH = "#{FHIR_BASE_PATH}/ValueSet/$expand".freeze
|
|
14
15
|
QUESTIONNAIRE_RESPONSE_PATH = "#{FHIR_BASE_PATH}/QuestionnaireResponse".freeze
|
|
15
16
|
FHIR_RESOURCE_PATH = "#{FHIR_BASE_PATH}/:resource/:id".freeze
|
|
16
17
|
FHIR_SEARCH_PATH = "#{FHIR_BASE_PATH}/:resource".freeze
|
|
@@ -52,6 +53,10 @@ module DaVinciDTRTestKit
|
|
|
52
53
|
@next_url ||= base_url + NEXT_PATH
|
|
53
54
|
end
|
|
54
55
|
|
|
56
|
+
def value_set_expand_url
|
|
57
|
+
@value_set_expand_url ||= base_url + VALUE_SET_EXPAND_PATH
|
|
58
|
+
end
|
|
59
|
+
|
|
55
60
|
def questionnaire_response_url
|
|
56
61
|
@questionnaire_response_url ||= base_url + QUESTIONNAIRE_RESPONSE_PATH
|
|
57
62
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: davinci_dtr_test_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.18.
|
|
4
|
+
version: 0.18.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Karl Naden
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2026-
|
|
13
|
+
date: 2026-11-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: inferno_core
|
|
@@ -21,7 +21,7 @@ dependencies:
|
|
|
21
21
|
version: '1.4'
|
|
22
22
|
- - ">="
|
|
23
23
|
- !ruby/object:Gem::Version
|
|
24
|
-
version: 1.4.
|
|
24
|
+
version: 1.4.5
|
|
25
25
|
type: :runtime
|
|
26
26
|
prerelease: false
|
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -31,7 +31,7 @@ dependencies:
|
|
|
31
31
|
version: '1.4'
|
|
32
32
|
- - ">="
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 1.4.
|
|
34
|
+
version: 1.4.5
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
36
|
name: jwt
|
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -335,8 +335,10 @@ files:
|
|
|
335
335
|
- lib/davinci_dtr_test_kit/requirements/hl7.fhir.us.davinci-dtr_2.0.1_requirements.xlsx
|
|
336
336
|
- lib/davinci_dtr_test_kit/requirements/hl7.fhir.us.davinci-dtr_2.2.0_requirements.xlsx
|
|
337
337
|
- lib/davinci_dtr_test_kit/server/endpoints/next_question_proxy_endpoint.rb
|
|
338
|
+
- lib/davinci_dtr_test_kit/server/endpoints/payer_proxy_endpoint.rb
|
|
338
339
|
- lib/davinci_dtr_test_kit/server/endpoints/questionnaire_package_proxy_endpoint.rb
|
|
339
340
|
- lib/davinci_dtr_test_kit/server/endpoints/simple_token_endpoint.rb
|
|
341
|
+
- lib/davinci_dtr_test_kit/server/endpoints/value_set_expand_proxy_endpoint.rb
|
|
340
342
|
- lib/davinci_dtr_test_kit/server/v2.0.1/adaptive_forms/adaptive_form_libraries_test.rb
|
|
341
343
|
- lib/davinci_dtr_test_kit/server/v2.0.1/adaptive_forms/adaptive_form_questionnaire_expressions_test.rb
|
|
342
344
|
- lib/davinci_dtr_test_kit/server/v2.0.1/adaptive_forms/adaptive_form_questionnaire_extensions_test.rb
|