davinci_dtr_test_kit 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/lib/davinci_dtr_test_kit/auth_groups/oauth2_authentication_group.rb +51 -0
- data/lib/davinci_dtr_test_kit/auth_groups/token_request_test.rb +25 -0
- data/lib/davinci_dtr_test_kit/auth_groups/token_validation_test.rb +13 -0
- data/lib/davinci_dtr_test_kit/client_groups/dinner_adaptive/dtr_smart_app_questionnaire_workflow_group.rb +20 -0
- data/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_questionnaire_response_save_test.rb +31 -0
- data/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_questionnaire_workflow_group.rb +89 -0
- data/lib/davinci_dtr_test_kit/client_groups/dinner_static/prepopulation_attestation_test.rb +29 -0
- data/lib/davinci_dtr_test_kit/client_groups/dinner_static/prepopulation_override_attestation_test.rb +30 -0
- data/lib/davinci_dtr_test_kit/client_groups/dinner_static/rendering_enabled_questions_attestation_test.rb +30 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_full_ehr_questionnaire_workflow_group.rb +19 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_package_group.rb +16 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb +32 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_group.rb +14 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_response_group.rb +23 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_response_save_test.rb +31 -0
- data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_smart_app_questionnaire_workflow_group.rb +22 -0
- data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_questionnaire_package_request_test.rb +36 -0
- data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_questionnaire_package_request_validation_test.rb +35 -0
- data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_questionnaire_response_basic_conformance_test.rb +28 -0
- data/lib/davinci_dtr_test_kit/client_groups/shared/dtr_questionnaire_response_pre_population_test.rb +30 -0
- data/lib/davinci_dtr_test_kit/cql_test.rb +387 -0
- data/lib/davinci_dtr_test_kit/docs/dtr_payer_server_suite_description_v201.md +127 -0
- data/lib/davinci_dtr_test_kit/docs/dtr_smart_app_suite_description_v201.md +118 -0
- data/lib/davinci_dtr_test_kit/dtr_full_ehr_suite.rb +55 -0
- data/lib/davinci_dtr_test_kit/dtr_light_ehr_suite.rb +39 -0
- data/lib/davinci_dtr_test_kit/dtr_payer_server_suite.rb +104 -0
- data/lib/davinci_dtr_test_kit/dtr_questionnaire_response_validation.rb +180 -0
- data/lib/davinci_dtr_test_kit/dtr_smart_app_suite.rb +85 -0
- data/lib/davinci_dtr_test_kit/ext/inferno_core/record_response_route.rb +98 -0
- data/lib/davinci_dtr_test_kit/ext/inferno_core/request.rb +19 -0
- data/lib/davinci_dtr_test_kit/ext/inferno_core/runnable.rb +35 -0
- data/lib/davinci_dtr_test_kit/fixture_loader.rb +99 -0
- data/lib/davinci_dtr_test_kit/fixtures/dinner_adaptive/dinner_order_adaptive_next_question_burrito.json +170 -0
- data/lib/davinci_dtr_test_kit/fixtures/dinner_adaptive/dinner_order_adaptive_next_question_hamburger.json +175 -0
- data/lib/davinci_dtr_test_kit/fixtures/dinner_adaptive/dinner_order_adaptive_next_question_initial.json +140 -0
- data/lib/davinci_dtr_test_kit/fixtures/dinner_adaptive/questionnaire_dinner_order_adaptive.json +95 -0
- data/lib/davinci_dtr_test_kit/fixtures/dinner_static/questionnaire_dinner_order_static.json +283 -0
- data/lib/davinci_dtr_test_kit/fixtures/dinner_static/questionnaire_response_dinner_order_static.json +170 -0
- data/lib/davinci_dtr_test_kit/fixtures/pre_populated_questionnaire_response.json +581 -0
- data/lib/davinci_dtr_test_kit/fixtures/questionnaire_package.json +2121 -0
- data/lib/davinci_dtr_test_kit/fixtures.rb +65 -0
- data/lib/davinci_dtr_test_kit/mock_ehr.rb +72 -0
- data/lib/davinci_dtr_test_kit/mock_payer.rb +142 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_form_libraries_test.rb +19 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_form_questionnaire_expressions_test.rb +20 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_form_questionnaire_extensions_test.rb +19 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_next_questionnaire_expressions_test.rb +20 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/adaptive_next_questionnaire_extensions_test.rb +19 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_group.rb +88 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_request_test.rb +41 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_request_validation_test.rb +44 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_response_bundles_validation_test.rb +40 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_response_search_validation_test.rb +42 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_adaptive_response_validation_test.rb +49 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_next_request_validation_test.rb +61 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_next_response_complete_test.rb +17 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_next_response_validation_test.rb +43 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/payer_server_static_group.rb +51 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_libraries_test.rb +19 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_questionnaire_expressions_test.rb +20 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_questionnaire_extensions_test.rb +19 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_request_test.rb +33 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_request_validation_test.rb +46 -0
- data/lib/davinci_dtr_test_kit/payer_server_groups/static_form_response_validation_test.rb +50 -0
- data/lib/davinci_dtr_test_kit/tags.rb +8 -0
- data/lib/davinci_dtr_test_kit/urls.rb +50 -0
- data/lib/davinci_dtr_test_kit/validation_test.rb +72 -0
- data/lib/davinci_dtr_test_kit/version.rb +5 -0
- data/lib/davinci_dtr_test_kit.rb +4 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e84658427289327e910d38a2e24e50bfe15b0c7ae8096d358df3c45d30f6f6b5
|
4
|
+
data.tar.gz: 6ecc074de82b8e0533edcfd99cb9e42a82e74b5a3fe7779e19ba6403782f4cae
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f97f96957563a2705899b6c3356ff127c8c5a55423730c26c69792ab441456acb3817245126008e764d867c6fea4a789a7bc9cb295c2d728910f98cd37798117
|
7
|
+
data.tar.gz: 399594d80b1d9e118abdae646fb308d221240debf4495f185f36f82e09c35d8326016d9039f68da0d1fef7c76e88bbe7c879f789127157b7ac405e29463b9191
|
data/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright {yyyy} {name of copyright owner}
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative 'token_request_test'
|
2
|
+
require_relative 'token_validation_test'
|
3
|
+
|
4
|
+
module DaVinciDTRTestKit
|
5
|
+
class OAuth2AuthenticationGroup < Inferno::TestGroup
|
6
|
+
id :oauth2_authentication
|
7
|
+
title 'Demonstrate Authorization'
|
8
|
+
description %(
|
9
|
+
This group of tests allows Inferno to act as a OAuth server
|
10
|
+
and provide access tokens for the client under test to use
|
11
|
+
when making further requests.
|
12
|
+
|
13
|
+
The tests assume that the authentication workflow starts
|
14
|
+
after client registration. Upon clicking the "Run Tests" button
|
15
|
+
in the upper right, Inferno will generate and display a
|
16
|
+
`client_id`. Either use that ID for configuration in the system
|
17
|
+
under test, or update it with another value configured in the system
|
18
|
+
under test.
|
19
|
+
|
20
|
+
Before submitting a token request, click the "Submit" button at the
|
21
|
+
bottom of the dialog to confirm the `client_id` that Inferno will
|
22
|
+
watch for.
|
23
|
+
|
24
|
+
Finally, make a valid token request that includes the specified `client_id`
|
25
|
+
to indicated token endpoint. This should be a POST of an `x-www-form-encoded`
|
26
|
+
body containing keys for `grant_type` with a value of `client_crendials` and
|
27
|
+
`client_id` with a value of the configured `client_id` value. For example, if
|
28
|
+
the `client_id` value was `123`, then the body of the request would be:
|
29
|
+
|
30
|
+
```grant_type=client_credentials&client_id=123```
|
31
|
+
|
32
|
+
The response json object will include an `access_token` key, for example:
|
33
|
+
|
34
|
+
```{"access_token":"97e792038d922bc3cf388b608e45c318","token_type":"bearer","expires_in":300}```
|
35
|
+
|
36
|
+
The value of the `access_token` key (`97e792038d922bc3cf388b608e45c318` in the example)
|
37
|
+
must be sent with every subsequent request to Inferno during this session in
|
38
|
+
the "Authorization" HTTP header with prefix "Bearer: ". In this example, the
|
39
|
+
Authorization HTTP header would have value:
|
40
|
+
|
41
|
+
```Bearer: 97e792038d922bc3cf388b608e45c318```
|
42
|
+
)
|
43
|
+
run_as_group
|
44
|
+
|
45
|
+
test from: :token_request,
|
46
|
+
receives_request: :token_request
|
47
|
+
|
48
|
+
test from: :token_validation,
|
49
|
+
uses_request: :token_request
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../urls'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class TokenRequestTest < Inferno::Test
|
5
|
+
include URLs
|
6
|
+
|
7
|
+
id :token_request
|
8
|
+
title 'Client makes token request'
|
9
|
+
description %(
|
10
|
+
Inferno will wait for the client to make a token request.
|
11
|
+
)
|
12
|
+
input :client_id, default: SecureRandom.hex
|
13
|
+
|
14
|
+
run do
|
15
|
+
wait(
|
16
|
+
identifier: client_id,
|
17
|
+
message: %(
|
18
|
+
Submit your token request to
|
19
|
+
|
20
|
+
`#{token_url}`
|
21
|
+
)
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module DaVinciDTRTestKit
|
2
|
+
class TokentRequestTest < Inferno::Test
|
3
|
+
id :token_validation
|
4
|
+
title 'Client token request is valid'
|
5
|
+
description 'Inferno will verify that an access token was successfully returned to the client under test.'
|
6
|
+
output :access_token
|
7
|
+
|
8
|
+
run do
|
9
|
+
skip_if request.blank?, 'No token requests were received'
|
10
|
+
output access_token: JSON.parse(request.response_body)['access_token']
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module DaVinciDTRTestKit
|
2
|
+
class DTRSmartAppAdaptiveDinnerQuestionnaireWorkflowGroup < Inferno::TestGroup
|
3
|
+
id :dtr_smart_app_adaptive_dinner_questionnaire_workflow
|
4
|
+
title 'Adaptive Questionnaire Workflow'
|
5
|
+
description %(
|
6
|
+
This test validates that a DTR SMART App client can perform a full DTR Adaptive Questionnaire workflow
|
7
|
+
using a mocked questionnaire requesting what a patient wants for dinner. The client system must
|
8
|
+
demonstrate their ability to:
|
9
|
+
|
10
|
+
1. Fetch the adaptive questionnaire package
|
11
|
+
2. Fetch the first set of questions and render and pre-populate them appropriately, including:
|
12
|
+
- fetch additional data needed for pre-population
|
13
|
+
- pre-populate data as directed by the questionnaire
|
14
|
+
- display questions only when they are enabled
|
15
|
+
3. Answer the initial questions and request additional questions
|
16
|
+
4. Complete the questionnaire and provide the completed QuestionnaireResponse
|
17
|
+
with appropriate indicators for pre-populated and manually-entered data.
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
data/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_questionnaire_response_save_test.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../urls'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class DTRStaticDinnerQuestionnaireResponseSaveTest < Inferno::Test
|
5
|
+
include URLs
|
6
|
+
|
7
|
+
id :dtr_static_dinner_questionnaire_response_save
|
8
|
+
title 'Save the QuestionnaireResponse after completing it'
|
9
|
+
description %(
|
10
|
+
Inferno, acting as the EHR, will wait for a request to save the QuestionnaireResponse from the client.
|
11
|
+
)
|
12
|
+
input :access_token
|
13
|
+
|
14
|
+
run do
|
15
|
+
wait(
|
16
|
+
identifier: access_token,
|
17
|
+
message: %(
|
18
|
+
Complete the questionnaire, leaving the following items unmodified, because a subsequent test will expect
|
19
|
+
their pre-populated values:
|
20
|
+
|
21
|
+
- First Name
|
22
|
+
- Last Name
|
23
|
+
|
24
|
+
Inferno will wait for a POST request at:
|
25
|
+
|
26
|
+
`#{questionnaire_response_url}`
|
27
|
+
)
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require_relative '../shared/dtr_questionnaire_package_request_test'
|
2
|
+
require_relative '../shared/dtr_questionnaire_package_request_validation_test'
|
3
|
+
require_relative 'prepopulation_attestation_test'
|
4
|
+
require_relative 'prepopulation_override_attestation_test'
|
5
|
+
require_relative 'rendering_enabled_questions_attestation_test'
|
6
|
+
require_relative 'dtr_questionnaire_response_save_test'
|
7
|
+
require_relative '../shared/dtr_questionnaire_response_basic_conformance_test'
|
8
|
+
require_relative '../shared/dtr_questionnaire_response_pre_population_test'
|
9
|
+
|
10
|
+
module DaVinciDTRTestKit
|
11
|
+
class DTRSmartAppStaticDinnerQuestionnaireWorkflowGroup < Inferno::TestGroup
|
12
|
+
id :dtr_smart_app_static_dinner_questionnaire_workflow
|
13
|
+
title 'Static Questionnaire Workflow'
|
14
|
+
description %(
|
15
|
+
This test validates that a DTR SMART App client can perform a full DTR Static Questionnaire workflow
|
16
|
+
using a mocked questionnaire requesting what a patient wants for dinner. The client system must
|
17
|
+
demonstrate their ability to:
|
18
|
+
|
19
|
+
1. Fetch the static questionnaire package
|
20
|
+
2. Render and pre-populate the questionnaire appropriately, including:
|
21
|
+
- fetch additional data needed for pre-population
|
22
|
+
- pre-populate data as directed by the questionnaire
|
23
|
+
- display questions only when they are enabled by other answers
|
24
|
+
3. Provide the completed QuestionnaireResponse with appropriate indicators for pre-populated
|
25
|
+
and manually-entered data.
|
26
|
+
)
|
27
|
+
|
28
|
+
group do
|
29
|
+
id :dtr_static_questionnaire_retrieval
|
30
|
+
title 'Retrieving the Static Questionnaire'
|
31
|
+
description %(
|
32
|
+
Inferno will wait for the client system to request a questionnaire using the
|
33
|
+
$questionnaire-package operation and will return a static questionnaire for the
|
34
|
+
tester to complete. Inferno will then validate the the conformance of the request.
|
35
|
+
)
|
36
|
+
run_as_group
|
37
|
+
|
38
|
+
# Test 1: wait for the $questionnaire-package request
|
39
|
+
test from: :dtr_questionnaire_package_request
|
40
|
+
# Test 2: validate the $questionnaire-package body
|
41
|
+
test from: :dtr_questionnaire_package_request_validation
|
42
|
+
end
|
43
|
+
|
44
|
+
group do
|
45
|
+
id :dtr_static_questionnaire_rendering
|
46
|
+
title 'Filling Out the Static Questionnaire'
|
47
|
+
description %(
|
48
|
+
The tester will interact with the questionnaire within their client system
|
49
|
+
such that pre-population steps are taken, the qustionnaire is rendered, and
|
50
|
+
they are able to fill it out. Inferno will check that appropriate interactions
|
51
|
+
with the server occur and the tester will attest that questionnaire pre-population
|
52
|
+
and rendering directives were followed.
|
53
|
+
)
|
54
|
+
run_as_group
|
55
|
+
|
56
|
+
# Test 1: test to make sure they have requested encounter data
|
57
|
+
# since the questionnaire asks them to
|
58
|
+
# TODO: once Tom has gotten the reference server hooked up
|
59
|
+
# Test 2: attest to the pre-population of the name fields
|
60
|
+
test from: :dtr_dinner_static_rendering_prepopulation_attestation
|
61
|
+
# Test 3: attest to the pre-population and edit of the location field
|
62
|
+
test from: :dtr_dinner_static_prepopulation_override_attestation
|
63
|
+
# Test 4: attest to the display of the toppings questions only when a dinner answer is selected
|
64
|
+
test from: :dtr_dinner_static_rendering_enabledQs_attestation
|
65
|
+
end
|
66
|
+
|
67
|
+
group do
|
68
|
+
id :dtr_static_questionnaire_response
|
69
|
+
title 'Saving the QuestionnaireResponse'
|
70
|
+
description %(
|
71
|
+
The tester will complete the questionnaire such that a QuestionnaireResponse is stored
|
72
|
+
back into Inferno's EHR endpoint. The stored QuestionnaireResponse will be evaluated for
|
73
|
+
conformance, completeness, and correct indicators on pre-populated and manually-overriden
|
74
|
+
items.
|
75
|
+
)
|
76
|
+
run_as_group
|
77
|
+
|
78
|
+
# Test 1: wait for a QuestionnaireResponse
|
79
|
+
test from: :dtr_static_dinner_questionnaire_response_save,
|
80
|
+
receives_request: :questionnaire_response_save
|
81
|
+
# Test 2: validate basic conformance of the QuestionnaireResponse
|
82
|
+
test from: :dtr_questionnaire_response_basic_conformance,
|
83
|
+
uses_request: :questionnaire_response_save
|
84
|
+
# Test 3: validate workflow-specific details such as pre-population and overrides
|
85
|
+
test from: :dtr_questionnaire_response_pre_population,
|
86
|
+
uses_request: :questionnaire_response_save
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative '../../urls'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class DTRStaticDinnerPrepopulationAttestationTest < Inferno::Test
|
5
|
+
include URLs
|
6
|
+
|
7
|
+
id :dtr_dinner_static_rendering_prepopulation_attestation
|
8
|
+
title 'Check that the client pre-populates the questionnaire (Attestation)'
|
9
|
+
description %(
|
10
|
+
Validate that pre-population of patient name information occurs as expected.
|
11
|
+
)
|
12
|
+
input :access_token
|
13
|
+
|
14
|
+
run do
|
15
|
+
wait(
|
16
|
+
identifier: access_token,
|
17
|
+
message: %(
|
18
|
+
I attest that the client application pre-populates the following questions with the respective values:
|
19
|
+
- Last Name: Oster
|
20
|
+
- First Name: William
|
21
|
+
|
22
|
+
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
|
23
|
+
|
24
|
+
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
|
25
|
+
)
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/davinci_dtr_test_kit/client_groups/dinner_static/prepopulation_override_attestation_test.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require_relative '../../urls'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class DTRStaticDinnerPrepopulationOverrideAttestationTest < Inferno::Test
|
5
|
+
include URLs
|
6
|
+
|
7
|
+
id :dtr_dinner_static_prepopulation_override_attestation
|
8
|
+
title 'Validate the user can override pre-populated data (Attestation)'
|
9
|
+
description %(
|
10
|
+
Validate that the user can edit a pre-populated item and replace it with another value.
|
11
|
+
)
|
12
|
+
input :access_token
|
13
|
+
|
14
|
+
run do
|
15
|
+
wait(
|
16
|
+
identifier: access_token,
|
17
|
+
message: %(
|
18
|
+
I attest that
|
19
|
+
|
20
|
+
1. The client pre-populated an answer for question 'Location'.
|
21
|
+
2. I have changed the answer to a different value.
|
22
|
+
|
23
|
+
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
|
24
|
+
|
25
|
+
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
|
26
|
+
)
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require_relative '../../urls'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class DTRStaticDinnerRenderingAttestationTest < Inferno::Test
|
5
|
+
include URLs
|
6
|
+
|
7
|
+
id :dtr_dinner_static_rendering_enabledQs_attestation
|
8
|
+
title 'Check that the client renders enabled questions appropriately (Attestation)'
|
9
|
+
description %(
|
10
|
+
Validate that the rendering of the questionnaire includes only the "What would you like on..."
|
11
|
+
question appropriate for the dinner selection, if made.
|
12
|
+
)
|
13
|
+
input :access_token
|
14
|
+
|
15
|
+
run do
|
16
|
+
wait(
|
17
|
+
identifier: access_token,
|
18
|
+
message: %(
|
19
|
+
I attest that the client application does not display any "What would you like on..."
|
20
|
+
questions until I have selected a dinner choice and then only displays the
|
21
|
+
"What would you like on..." question relevant for the dinner request:
|
22
|
+
|
23
|
+
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
|
24
|
+
|
25
|
+
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
|
26
|
+
)
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'dtr_questionnaire_package_group'
|
2
|
+
require_relative 'dtr_questionnaire_rendering_group'
|
3
|
+
|
4
|
+
module DaVinciDTRTestKit
|
5
|
+
class DTRFullEHRQuestionnaireWorkflowGroup < Inferno::TestGroup
|
6
|
+
id :dtr_full_ehr_questionnaire_workflow
|
7
|
+
title 'Respiratory Assist Device Questionnaire Workflow'
|
8
|
+
description %(
|
9
|
+
This workflow validates that a DTR Full EHR Client can perform a full DTR Questionnaire workflow using a canned
|
10
|
+
Questionnaire for a respiratory assist device order:
|
11
|
+
|
12
|
+
1. Fetch the questionnaire package
|
13
|
+
2. Render the questionnaire
|
14
|
+
)
|
15
|
+
|
16
|
+
group from: :dtr_questionnaire_package
|
17
|
+
group from: :dtr_questionnaire_rendering
|
18
|
+
end
|
19
|
+
end
|
data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_package_group.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../shared/dtr_questionnaire_package_request_test'
|
2
|
+
require_relative '../shared/dtr_questionnaire_package_request_validation_test'
|
3
|
+
|
4
|
+
module DaVinciDTRTestKit
|
5
|
+
class DTRQuestionnairePackageGroup < Inferno::TestGroup
|
6
|
+
id :dtr_questionnaire_package
|
7
|
+
title 'Questionnaire Package Retrieval'
|
8
|
+
description %(
|
9
|
+
Demonstrate the ability to request the Respiratory Assist Device Questionnaire Package from the payer.
|
10
|
+
)
|
11
|
+
run_as_group
|
12
|
+
|
13
|
+
test from: :dtr_questionnaire_package_request
|
14
|
+
test from: :dtr_questionnaire_package_request_validation
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative '../../urls'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class DTRQuestionnaireRenderingAttestationTest < Inferno::Test
|
5
|
+
include URLs
|
6
|
+
|
7
|
+
id :dtr_questionnaire_rendering_attestation
|
8
|
+
title 'Check that the client renders the questionnaire (Attestation)'
|
9
|
+
description %(
|
10
|
+
Thist test provides the tester an opportunity to observe their client application following the receipt of the
|
11
|
+
questionnaire pacakage and attest that the application renders the questionnaire.
|
12
|
+
)
|
13
|
+
input :access_token
|
14
|
+
|
15
|
+
run do
|
16
|
+
load_tagged_requests QUESTIONNAIRE_PACKAGE_TAG
|
17
|
+
skip_if request.blank?, 'A Questionnaire Package request must be made prior to running this test'
|
18
|
+
|
19
|
+
wait(
|
20
|
+
identifier: access_token,
|
21
|
+
message: %(
|
22
|
+
I attest that the client application displays the questionnaire and respects the following rendering style:
|
23
|
+
- The "Signature" field label is rendered with green text
|
24
|
+
|
25
|
+
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
|
26
|
+
|
27
|
+
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
|
28
|
+
)
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_group.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative 'dtr_questionnaire_rendering_attestation_test'
|
2
|
+
|
3
|
+
module DaVinciDTRTestKit
|
4
|
+
class DTRQuestionnaireRenderingGroup < Inferno::TestGroup
|
5
|
+
id :dtr_questionnaire_rendering
|
6
|
+
title 'Questionnaire Rendering'
|
7
|
+
description %(
|
8
|
+
Demonstrate the ability to render the Respiratory Assist Device Questionnaire.
|
9
|
+
)
|
10
|
+
run_as_group
|
11
|
+
|
12
|
+
test from: :dtr_questionnaire_rendering_attestation
|
13
|
+
end
|
14
|
+
end
|
data/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_response_group.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require_relative 'dtr_questionnaire_response_save_test'
|
2
|
+
require_relative '../shared/dtr_questionnaire_response_basic_conformance_test'
|
3
|
+
require_relative '../shared/dtr_questionnaire_response_pre_population_test'
|
4
|
+
|
5
|
+
module DaVinciDTRTestKit
|
6
|
+
class DTRQuestionnaireResponseGroup < Inferno::TestGroup
|
7
|
+
id :dtr_questionnaire_response
|
8
|
+
title 'Questionnaire Response'
|
9
|
+
description %(
|
10
|
+
Demonstrate the ability to pre-populate and respond to the Respiratory Assist Device Questionnaire.
|
11
|
+
)
|
12
|
+
run_as_group
|
13
|
+
|
14
|
+
test from: :dtr_resp_assist_questionnaire_response_save,
|
15
|
+
receives_request: :questionnaire_response_save
|
16
|
+
|
17
|
+
test from: :dtr_questionnaire_response_basic_conformance,
|
18
|
+
uses_request: :questionnaire_response_save
|
19
|
+
|
20
|
+
test from: :dtr_questionnaire_response_pre_population,
|
21
|
+
uses_request: :questionnaire_response_save
|
22
|
+
end
|
23
|
+
end
|