davinci_crd_test_kit 0.14.0 → 0.14.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/config/presets/inferno_crd_client_suite_v221.json.erb +64 -0
- data/config/presets/inferno_crd_server_suite_v221.json.erb +2 -2
- data/lib/davinci_crd_test_kit/client/endpoints/hook_request_endpoint.rb +12 -6
- data/lib/davinci_crd_test_kit/client/endpoints/mocked_card_responses/external_reference.json +1 -1
- data/lib/davinci_crd_test_kit/client/endpoints/mocked_card_responses/launch_smart_app.json +0 -7
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_appointment_book_group.rb +8 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_discharge_group.rb +7 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_start_group.rb +7 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_hooks_group.rb +20 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_long_running_hook_group.rb +1 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_dispatch_group.rb +7 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_select_group.rb +7 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_sign_group.rb +7 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/client_registration_group.rb +6 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/crd_client_suite.rb +5 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_skip_long_running_attestation_test.rb +10 -5
- data/lib/davinci_crd_test_kit/client/v2.2.1/registration/client_service_registration_attestation_test.rb +2 -1
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb +6 -0
- data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/client_display_cards_attest.rb +2 -1
- data/lib/davinci_crd_test_kit/cross_suite/cards_identification.rb +9 -0
- data/lib/davinci_crd_test_kit/cross_suite/prefetch_completeness_checker.rb +25 -11
- data/lib/davinci_crd_test_kit/cross_suite/requests_logical_model_validation.rb +2 -1
- data/lib/davinci_crd_test_kit/cross_suite/response_logical_model_validation.rb +164 -3
- data/lib/davinci_crd_test_kit/cross_suite/tags.rb +4 -0
- data/lib/davinci_crd_test_kit/requirements/generated/crd_server_v221_requirements_coverage.csv +38 -38
- data/lib/davinci_crd_test_kit/server/jobs/invoke_hook.rb +3 -3
- data/lib/davinci_crd_test_kit/server/jobs/invoke_hook_no_special_requests.rb +17 -0
- data/lib/davinci_crd_test_kit/server/jobs/invoke_hook_with_bad_auth.rb +14 -0
- data/lib/davinci_crd_test_kit/server/server_abstract_invoke_hook_test.rb +24 -6
- data/lib/davinci_crd_test_kit/server/server_hook_helper.rb +2 -2
- data/lib/davinci_crd_test_kit/server/v2.2.1/crd_server_suite.rb +3 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/discovery/discovery_standard_prefetch_expressions_test.rb +166 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/interaction/server_invoke_hook_single_request_test.rb +22 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_appointment_book_group.rb +10 -102
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_demonstrate_hook_response_group.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_discovery_group.rb +2 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_discharge_group.rb +10 -97
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_encounter_start_group.rb +10 -97
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_dispatch_group.rb +10 -103
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_select_group.rb +12 -116
- data/lib/davinci_crd_test_kit/server/v2.2.1/server_order_sign_group.rb +12 -121
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_response_group.rb +23 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_info_reason_test.rb +108 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_not_found_group.rb +116 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_active_coverage_group.rb +115 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/no_member_found_group.rb +117 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/technical_issues_group.rb +121 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/technical_issues_invoke_test.rb +22 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_context_validation_test.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_optional_fields_validation_test.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_request/service_request_required_fields_validation_test.rb +1 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/additional_orders_validation_test.rb +78 -35
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/coverage_information_card_absence_test.rb +76 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/coverage_information_system_action_validation_test.rb +70 -124
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/create_or_update_coverage_info_response_validation_test.rb +83 -39
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/external_reference_card_validation_test.rb +59 -17
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/form_completion_response_validation_test.rb +80 -45
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/hook_request_resource_resolution.rb +37 -0
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/instructions_card_received_test.rb +57 -6
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/launch_smart_app_card_validation_test.rb +56 -17
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/propose_alternate_request_card_validation_test.rb +52 -25
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/service_response_validation_test.rb +17 -51
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/unknown_cds_hooks_elements_test.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/unknown_configuration_test.rb +1 -1
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/unknown_context_test.rb +1 -1
- data/lib/davinci_crd_test_kit/version.rb +2 -2
- metadata +18 -8
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/card_optional_fields_validation_test.rb +0 -57
- data/lib/davinci_crd_test_kit/server/v2.2.1/verify_response/coverage_information_system_action_received_test.rb +0 -65
|
@@ -4,12 +4,11 @@ require_relative 'verify_request/service_request_required_fields_validation_test
|
|
|
4
4
|
require_relative 'verify_request/service_request_optional_fields_validation_test'
|
|
5
5
|
require_relative 'verify_request/service_request_context_validation_test'
|
|
6
6
|
require_relative 'verify_response/service_response_validation_test'
|
|
7
|
-
require_relative 'verify_response/card_optional_fields_validation_test'
|
|
8
7
|
require_relative 'verify_response/external_reference_card_validation_test'
|
|
9
8
|
require_relative 'verify_response/launch_smart_app_card_validation_test'
|
|
10
9
|
require_relative 'verify_response/instructions_card_received_test'
|
|
11
|
-
require_relative 'verify_response/coverage_information_system_action_received_test'
|
|
12
10
|
require_relative 'verify_response/coverage_information_system_action_validation_test'
|
|
11
|
+
require_relative 'verify_response/coverage_information_card_absence_test'
|
|
13
12
|
require_relative 'verify_response/coverage_info_configuration_test'
|
|
14
13
|
require_relative 'verify_response/form_completion_response_validation_test'
|
|
15
14
|
require_relative 'verify_response/create_or_update_coverage_info_response_validation_test'
|
|
@@ -73,6 +72,7 @@ module DaVinciCRDTestKit
|
|
|
73
72
|
|
|
74
73
|
group do
|
|
75
74
|
title 'Requests'
|
|
75
|
+
simulation_verification
|
|
76
76
|
|
|
77
77
|
test from: :crd_v221_service_request_required_fields_validation,
|
|
78
78
|
config: {
|
|
@@ -96,84 +96,11 @@ module DaVinciCRDTestKit
|
|
|
96
96
|
group do
|
|
97
97
|
title 'Responses'
|
|
98
98
|
|
|
99
|
-
test from: :crd_v221_service_response_validation
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
valid_system_actions: {
|
|
106
|
-
name: :order_dispatch_valid_system_actions
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
test from: :crd_v221_card_optional_fields_validation,
|
|
111
|
-
config: {
|
|
112
|
-
inputs: {
|
|
113
|
-
valid_cards: {
|
|
114
|
-
name: :order_dispatch_valid_cards
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
outputs: {
|
|
118
|
-
valid_cards_with_links: {
|
|
119
|
-
name: :order_dispatch_valid_cards_with_links
|
|
120
|
-
},
|
|
121
|
-
valid_cards_with_suggestions: {
|
|
122
|
-
name: :order_dispatch_valid_cards_with_suggestions
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
test from: :crd_v221_external_reference_card_validation,
|
|
127
|
-
config: {
|
|
128
|
-
inputs: {
|
|
129
|
-
valid_cards_with_links: {
|
|
130
|
-
name: :order_dispatch_valid_cards_with_links
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
test from: :crd_v221_launch_smart_app_card_validation,
|
|
135
|
-
config: {
|
|
136
|
-
inputs: {
|
|
137
|
-
valid_cards_with_links: {
|
|
138
|
-
name: :order_dispatch_valid_cards_with_links
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
test from: :crd_v221_valid_instructions_card_received,
|
|
143
|
-
config: {
|
|
144
|
-
inputs: {
|
|
145
|
-
valid_cards: {
|
|
146
|
-
name: :order_dispatch_valid_cards
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
test from: :crd_v221_coverage_info_system_action_received,
|
|
151
|
-
config: {
|
|
152
|
-
inputs: {
|
|
153
|
-
valid_system_actions: {
|
|
154
|
-
name: :order_dispatch_valid_system_actions
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
outputs: {
|
|
158
|
-
coverage_info: {
|
|
159
|
-
name: :order_dispatch_coverage_info
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
verifies_requirements: [
|
|
164
|
-
'hl7.fhir.us.davinci-crd_2.2.1@resp-26'
|
|
165
|
-
]
|
|
166
|
-
test from: :crd_v221_coverage_info_system_action_validation,
|
|
167
|
-
config: {
|
|
168
|
-
inputs: {
|
|
169
|
-
coverage_info: {
|
|
170
|
-
name: :order_dispatch_coverage_info
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
verifies_requirements: [
|
|
175
|
-
'hl7.fhir.us.davinci-crd_2.2.1@resp-25'
|
|
176
|
-
]
|
|
99
|
+
test from: :crd_v221_service_response_validation
|
|
100
|
+
test from: :crd_v221_external_reference_card_validation
|
|
101
|
+
test from: :crd_v221_launch_smart_app_card_validation
|
|
102
|
+
test from: :crd_v221_valid_instructions_card_received
|
|
103
|
+
test from: :crd_v221_coverage_info_system_action_validation
|
|
177
104
|
test from: :crd_v221_order_dispatch_coverage_information,
|
|
178
105
|
verifies_requirements: [
|
|
179
106
|
'hl7.fhir.us.davinci-crd_2.2.1@hook-16',
|
|
@@ -181,29 +108,9 @@ module DaVinciCRDTestKit
|
|
|
181
108
|
'hl7.fhir.us.davinci-crd_2.2.1@hook-33',
|
|
182
109
|
'hl7.fhir.us.davinci-crd_2.2.1@resp-29'
|
|
183
110
|
]
|
|
184
|
-
|
|
185
|
-
test from: :crd_v221_request_form_completion_response_validation
|
|
186
|
-
|
|
187
|
-
inputs: {
|
|
188
|
-
valid_system_actions: {
|
|
189
|
-
name: :order_dispatch_valid_system_actions
|
|
190
|
-
},
|
|
191
|
-
valid_cards_with_suggestions: {
|
|
192
|
-
name: :order_dispatch_valid_cards_with_suggestions
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
test from: :crd_v221_create_or_update_coverage_info_response_validation,
|
|
197
|
-
config: {
|
|
198
|
-
inputs: {
|
|
199
|
-
valid_system_actions: {
|
|
200
|
-
name: :order_dispatch_valid_system_actions
|
|
201
|
-
},
|
|
202
|
-
valid_cards_with_suggestions: {
|
|
203
|
-
name: :order_dispatch_valid_cards_with_suggestions
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
111
|
+
test from: :crd_v221_coverage_information_card_absence
|
|
112
|
+
test from: :crd_v221_request_form_completion_response_validation
|
|
113
|
+
test from: :crd_v221_create_or_update_coverage_info_response_validation
|
|
207
114
|
test from: :crd_v221_coverage_info_configuration
|
|
208
115
|
test from: :crd_v221_unknown_configuration
|
|
209
116
|
test from: :crd_v221_unknown_context
|
|
@@ -4,7 +4,6 @@ require_relative 'verify_request/service_request_required_fields_validation_test
|
|
|
4
4
|
require_relative 'verify_request/service_request_optional_fields_validation_test'
|
|
5
5
|
require_relative 'verify_request/service_request_context_validation_test'
|
|
6
6
|
require_relative 'verify_response/service_response_validation_test'
|
|
7
|
-
require_relative 'verify_response/card_optional_fields_validation_test'
|
|
8
7
|
require_relative 'verify_response/external_reference_card_validation_test'
|
|
9
8
|
require_relative 'verify_response/launch_smart_app_card_validation_test'
|
|
10
9
|
require_relative 'verify_response/instructions_card_received_test'
|
|
@@ -12,6 +11,7 @@ require_relative 'verify_response/propose_alternate_request_card_validation_test
|
|
|
12
11
|
require_relative 'verify_response/additional_orders_validation_test'
|
|
13
12
|
require_relative 'verify_response/form_completion_response_validation_test'
|
|
14
13
|
require_relative 'verify_response/create_or_update_coverage_info_response_validation_test'
|
|
14
|
+
require_relative 'verify_response/coverage_information_card_absence_test'
|
|
15
15
|
require_relative 'verify_response/coverage_info_configuration_test'
|
|
16
16
|
require_relative 'verify_response/unknown_configuration_test'
|
|
17
17
|
require_relative 'verify_response/unknown_context_test'
|
|
@@ -71,6 +71,7 @@ module DaVinciCRDTestKit
|
|
|
71
71
|
|
|
72
72
|
group do
|
|
73
73
|
title 'Requests'
|
|
74
|
+
simulation_verification
|
|
74
75
|
|
|
75
76
|
test from: :crd_v221_service_request_required_fields_validation,
|
|
76
77
|
config: {
|
|
@@ -94,121 +95,16 @@ module DaVinciCRDTestKit
|
|
|
94
95
|
group do
|
|
95
96
|
title 'Responses'
|
|
96
97
|
|
|
97
|
-
test from: :crd_v221_service_response_validation
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
test from: :crd_v221_card_optional_fields_validation,
|
|
109
|
-
config: {
|
|
110
|
-
inputs: {
|
|
111
|
-
valid_cards: {
|
|
112
|
-
name: :order_select_valid_cards
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
outputs: {
|
|
116
|
-
valid_cards_with_links: {
|
|
117
|
-
name: :order_select_valid_cards_with_links
|
|
118
|
-
},
|
|
119
|
-
valid_cards_with_suggestions: {
|
|
120
|
-
name: :order_select_valid_cards_with_suggestions
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
test from: :crd_v221_external_reference_card_validation,
|
|
125
|
-
config: {
|
|
126
|
-
inputs: {
|
|
127
|
-
valid_cards_with_links: {
|
|
128
|
-
name: :order_select_valid_cards_with_links
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
test from: :crd_v221_launch_smart_app_card_validation,
|
|
133
|
-
config: {
|
|
134
|
-
inputs: {
|
|
135
|
-
valid_cards_with_links: {
|
|
136
|
-
name: :order_select_valid_cards_with_links
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
test from: :crd_v221_valid_instructions_card_received,
|
|
141
|
-
config: {
|
|
142
|
-
inputs: {
|
|
143
|
-
valid_cards: {
|
|
144
|
-
name: :order_select_valid_cards
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
test from: :crd_v221_coverage_info_system_action_received,
|
|
149
|
-
optional: true,
|
|
150
|
-
config: {
|
|
151
|
-
inputs: {
|
|
152
|
-
valid_system_actions: {
|
|
153
|
-
name: :order_select_valid_system_actions
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
outputs: {
|
|
157
|
-
coverage_info: {
|
|
158
|
-
name: :order_select_coverage_info
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
test from: :crd_v221_coverage_info_system_action_validation,
|
|
163
|
-
optional: true,
|
|
164
|
-
config: {
|
|
165
|
-
inputs: {
|
|
166
|
-
coverage_info: {
|
|
167
|
-
name: :order_select_coverage_info
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
test from: :crd_v221_propose_alternate_request_card_validation,
|
|
172
|
-
config: {
|
|
173
|
-
inputs: {
|
|
174
|
-
valid_cards_with_suggestions: {
|
|
175
|
-
name: :order_select_valid_cards_with_suggestions
|
|
176
|
-
},
|
|
177
|
-
contexts: {
|
|
178
|
-
name: :order_select_contexts
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
test from: :crd_v221_additional_orders_card_validation,
|
|
183
|
-
config: {
|
|
184
|
-
inputs: {
|
|
185
|
-
valid_cards_with_suggestions: {
|
|
186
|
-
name: :order_select_valid_cards_with_suggestions
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
test from: :crd_v221_request_form_completion_response_validation,
|
|
191
|
-
config: {
|
|
192
|
-
inputs: {
|
|
193
|
-
valid_system_actions: {
|
|
194
|
-
name: :order_select_valid_system_actions
|
|
195
|
-
},
|
|
196
|
-
valid_cards_with_suggestions: {
|
|
197
|
-
name: :order_select_valid_cards_with_suggestions
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
test from: :crd_v221_create_or_update_coverage_info_response_validation,
|
|
202
|
-
config: {
|
|
203
|
-
inputs: {
|
|
204
|
-
valid_system_actions: {
|
|
205
|
-
name: :order_select_valid_system_actions
|
|
206
|
-
},
|
|
207
|
-
valid_cards_with_suggestions: {
|
|
208
|
-
name: :order_select_valid_cards_with_suggestions
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
98
|
+
test from: :crd_v221_service_response_validation
|
|
99
|
+
test from: :crd_v221_external_reference_card_validation
|
|
100
|
+
test from: :crd_v221_launch_smart_app_card_validation
|
|
101
|
+
test from: :crd_v221_valid_instructions_card_received
|
|
102
|
+
test from: :crd_v221_coverage_info_system_action_validation
|
|
103
|
+
test from: :crd_v221_coverage_information_card_absence
|
|
104
|
+
test from: :crd_v221_propose_alternate_request_card_validation
|
|
105
|
+
test from: :crd_v221_additional_orders_card_validation
|
|
106
|
+
test from: :crd_v221_request_form_completion_response_validation
|
|
107
|
+
test from: :crd_v221_create_or_update_coverage_info_response_validation
|
|
212
108
|
test from: :crd_v221_coverage_info_configuration
|
|
213
109
|
test from: :crd_v221_unknown_configuration
|
|
214
110
|
test from: :crd_v221_unknown_context
|
|
@@ -4,12 +4,11 @@ require_relative 'verify_request/service_request_required_fields_validation_test
|
|
|
4
4
|
require_relative 'verify_request/service_request_optional_fields_validation_test'
|
|
5
5
|
require_relative 'verify_request/service_request_context_validation_test'
|
|
6
6
|
require_relative 'verify_response/service_response_validation_test'
|
|
7
|
-
require_relative 'verify_response/card_optional_fields_validation_test'
|
|
8
7
|
require_relative 'verify_response/external_reference_card_validation_test'
|
|
9
8
|
require_relative 'verify_response/launch_smart_app_card_validation_test'
|
|
10
9
|
require_relative 'verify_response/instructions_card_received_test'
|
|
11
|
-
require_relative 'verify_response/coverage_information_system_action_received_test'
|
|
12
10
|
require_relative 'verify_response/coverage_information_system_action_validation_test'
|
|
11
|
+
require_relative 'verify_response/coverage_information_card_absence_test'
|
|
13
12
|
require_relative 'verify_response/coverage_info_configuration_test'
|
|
14
13
|
require_relative 'verify_response/propose_alternate_request_card_validation_test'
|
|
15
14
|
require_relative 'verify_response/additional_orders_validation_test'
|
|
@@ -79,6 +78,7 @@ module DaVinciCRDTestKit
|
|
|
79
78
|
|
|
80
79
|
group do
|
|
81
80
|
title 'Requests'
|
|
81
|
+
simulation_verification
|
|
82
82
|
|
|
83
83
|
test from: :crd_v221_service_request_required_fields_validation,
|
|
84
84
|
config: {
|
|
@@ -102,84 +102,11 @@ module DaVinciCRDTestKit
|
|
|
102
102
|
group do
|
|
103
103
|
title 'Responses'
|
|
104
104
|
|
|
105
|
-
test from: :crd_v221_service_response_validation
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
valid_system_actions: {
|
|
112
|
-
name: :order_sign_valid_system_actions
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
test from: :crd_v221_card_optional_fields_validation,
|
|
117
|
-
config: {
|
|
118
|
-
inputs: {
|
|
119
|
-
valid_cards: {
|
|
120
|
-
name: :order_sign_valid_cards
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
outputs: {
|
|
124
|
-
valid_cards_with_links: {
|
|
125
|
-
name: :order_sign_valid_cards_with_links
|
|
126
|
-
},
|
|
127
|
-
valid_cards_with_suggestions: {
|
|
128
|
-
name: :order_sign_valid_cards_with_suggestions
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
test from: :crd_v221_external_reference_card_validation,
|
|
133
|
-
config: {
|
|
134
|
-
inputs: {
|
|
135
|
-
valid_cards_with_links: {
|
|
136
|
-
name: :order_sign_valid_cards_with_links
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
test from: :crd_v221_launch_smart_app_card_validation,
|
|
141
|
-
config: {
|
|
142
|
-
inputs: {
|
|
143
|
-
valid_cards_with_links: {
|
|
144
|
-
name: :order_sign_valid_cards_with_links
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
test from: :crd_v221_valid_instructions_card_received,
|
|
149
|
-
config: {
|
|
150
|
-
inputs: {
|
|
151
|
-
valid_cards: {
|
|
152
|
-
name: :order_sign_valid_cards
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
test from: :crd_v221_coverage_info_system_action_received,
|
|
157
|
-
config: {
|
|
158
|
-
inputs: {
|
|
159
|
-
valid_system_actions: {
|
|
160
|
-
name: :order_sign_valid_system_actions
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
outputs: {
|
|
164
|
-
coverage_info: {
|
|
165
|
-
name: :order_sign_coverage_info
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
verifies_requirements: [
|
|
170
|
-
'hl7.fhir.us.davinci-crd_2.2.1@resp-26'
|
|
171
|
-
]
|
|
172
|
-
test from: :crd_v221_coverage_info_system_action_validation,
|
|
173
|
-
config: {
|
|
174
|
-
inputs: {
|
|
175
|
-
coverage_info: {
|
|
176
|
-
name: :order_sign_coverage_info
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
verifies_requirements: [
|
|
181
|
-
'hl7.fhir.us.davinci-crd_2.2.1@resp-25'
|
|
182
|
-
]
|
|
105
|
+
test from: :crd_v221_service_response_validation
|
|
106
|
+
test from: :crd_v221_external_reference_card_validation
|
|
107
|
+
test from: :crd_v221_launch_smart_app_card_validation
|
|
108
|
+
test from: :crd_v221_valid_instructions_card_received
|
|
109
|
+
test from: :crd_v221_coverage_info_system_action_validation
|
|
183
110
|
test from: :crd_v221_all_responses_include_coverage_information,
|
|
184
111
|
verifies_requirements: [
|
|
185
112
|
'hl7.fhir.us.davinci-crd_2.2.1@hook-16',
|
|
@@ -190,47 +117,11 @@ module DaVinciCRDTestKit
|
|
|
190
117
|
'hl7.fhir.us.davinci-crd_2.2.1@hook-39',
|
|
191
118
|
'hl7.fhir.us.davinci-crd_2.2.1@resp-29'
|
|
192
119
|
]
|
|
193
|
-
test from: :
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
contexts: {
|
|
200
|
-
name: :order_sign_contexts
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
test from: :crd_v221_additional_orders_card_validation,
|
|
205
|
-
config: {
|
|
206
|
-
inputs: {
|
|
207
|
-
valid_cards_with_suggestions: {
|
|
208
|
-
name: :order_sign_valid_cards_with_suggestions
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
test from: :crd_v221_request_form_completion_response_validation,
|
|
213
|
-
config: {
|
|
214
|
-
inputs: {
|
|
215
|
-
valid_system_actions: {
|
|
216
|
-
name: :order_sign_valid_system_actions
|
|
217
|
-
},
|
|
218
|
-
valid_cards_with_suggestions: {
|
|
219
|
-
name: :order_sign_valid_cards_with_suggestions
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
test from: :crd_v221_create_or_update_coverage_info_response_validation,
|
|
224
|
-
config: {
|
|
225
|
-
inputs: {
|
|
226
|
-
valid_system_actions: {
|
|
227
|
-
name: :order_sign_valid_system_actions
|
|
228
|
-
},
|
|
229
|
-
valid_cards_with_suggestions: {
|
|
230
|
-
name: :order_sign_valid_cards_with_suggestions
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
120
|
+
test from: :crd_v221_coverage_information_card_absence
|
|
121
|
+
test from: :crd_v221_propose_alternate_request_card_validation
|
|
122
|
+
test from: :crd_v221_additional_orders_card_validation
|
|
123
|
+
test from: :crd_v221_request_form_completion_response_validation
|
|
124
|
+
test from: :crd_v221_create_or_update_coverage_info_response_validation
|
|
234
125
|
test from: :crd_v221_coverage_info_configuration
|
|
235
126
|
test from: :crd_v221_unknown_configuration
|
|
236
127
|
test from: :crd_v221_unknown_context
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require_relative 'specific_coverage_responses/technical_issues_group'
|
|
2
|
+
require_relative 'specific_coverage_responses/no_member_found_group'
|
|
3
|
+
require_relative 'specific_coverage_responses/coverage_not_found_group'
|
|
4
|
+
require_relative 'specific_coverage_responses/no_active_coverage_group'
|
|
5
|
+
|
|
6
|
+
module DaVinciCRDTestKit
|
|
7
|
+
module V221
|
|
8
|
+
class SpecificCoverageResponseGroup < Inferno::TestGroup
|
|
9
|
+
title 'Specific Coverage Responses'
|
|
10
|
+
id :crd_v221_specific_coverage_responses
|
|
11
|
+
|
|
12
|
+
description <<~DESCRIPTION
|
|
13
|
+
This group verifies the ability of a server to return specific
|
|
14
|
+
coverage-info responses in particular situations.
|
|
15
|
+
DESCRIPTION
|
|
16
|
+
|
|
17
|
+
group from: :crd_v221_server_technical_issues_group
|
|
18
|
+
group from: :crd_v221_server_no_member_found_group
|
|
19
|
+
group from: :crd_v221_server_coverage_not_found_group
|
|
20
|
+
group from: :crd_v221_server_no_active_coverage_group
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/davinci_crd_test_kit/server/v2.2.1/specific_coverage_responses/coverage_info_reason_test.rb
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
module DaVinciCRDTestKit
|
|
2
|
+
module V221
|
|
3
|
+
# Users of this test need to set config options for coverage_code, reason_code, and optionally require_reason_text
|
|
4
|
+
class CoverageInfoReasonTest < Inferno::Test
|
|
5
|
+
id :crd_v221_coverage_info_reason
|
|
6
|
+
title 'Coverage Information responses have the expected coverage and reason codes'
|
|
7
|
+
|
|
8
|
+
description <<~DESCRIPTION
|
|
9
|
+
This test verifies that the Coverage Information responses received contain Coverage Information extensions
|
|
10
|
+
with the expected coverage and reason codes.
|
|
11
|
+
DESCRIPTION
|
|
12
|
+
|
|
13
|
+
input :coverage_info
|
|
14
|
+
|
|
15
|
+
COVERAGE_INFO_EXTENSION_URL =
|
|
16
|
+
'http://hl7.org/fhir/us/davinci-crd/StructureDefinition/ext-coverage-information'.freeze
|
|
17
|
+
|
|
18
|
+
run do
|
|
19
|
+
coverage_info_actions = JSON.parse(coverage_info)
|
|
20
|
+
|
|
21
|
+
skip_if coverage_info_actions.blank?, 'No Coverage Information system actions received'
|
|
22
|
+
|
|
23
|
+
coverage_info_actions.each_with_index do |action, index|
|
|
24
|
+
coverage_info_extensions(action['resource']).each do |extension|
|
|
25
|
+
unless expected_coverage? extension
|
|
26
|
+
coverage_code = coverage_extension_value(extension)
|
|
27
|
+
add_message(
|
|
28
|
+
'error',
|
|
29
|
+
"Coverage should be `#{expected_coverage_code}`, but found `#{coverage_code}` in action ##{index + 1}"
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
unless expected_reason? extension
|
|
34
|
+
reason_code =
|
|
35
|
+
reason_extension_values(extension)
|
|
36
|
+
&.map { |reason| "`#{reason}`" }
|
|
37
|
+
&.join(', ') || 'no reason'
|
|
38
|
+
add_message(
|
|
39
|
+
'error',
|
|
40
|
+
"Coverage reason should be `#{expected_reason_code}`, but found #{reason_code} in action ##{index + 1}"
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
next
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
next unless require_reason_text?
|
|
47
|
+
next if reason_text?(extension)
|
|
48
|
+
|
|
49
|
+
add_message(
|
|
50
|
+
'error',
|
|
51
|
+
"`#{expected_reason_code}` coverage reason contains no additional details in `text` field " \
|
|
52
|
+
"in action ##{index + 1}"
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
assert_no_error_messages(
|
|
58
|
+
"Not all coverage info extensions had `#{expected_coverage_code}` coverage " \
|
|
59
|
+
"with a reason of `#{expected_reason_code}`"
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def coverage_info_extensions(resource)
|
|
64
|
+
resource['extension'].select { |extension| extension['url'] == COVERAGE_INFO_EXTENSION_URL }
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def coverage_extension_value(coverage_info_extension)
|
|
68
|
+
coverage_info_extension['extension']
|
|
69
|
+
.find { |extension| extension['url'] == 'covered' }
|
|
70
|
+
&.dig('valueCode')
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def expected_coverage?(coverage_info_extension)
|
|
74
|
+
coverage_extension_value(coverage_info_extension) == expected_coverage_code
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def reason_extension_values(coverage_info_extension)
|
|
78
|
+
coverage_info_extension['extension']
|
|
79
|
+
.find { |extension| extension['url'] == 'reason' }
|
|
80
|
+
&.dig('valueCodeableConcept', 'coding')
|
|
81
|
+
&.map { |coding| coding['code'] }
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def expected_reason?(coverage_info_extension)
|
|
85
|
+
reason_extension_values(coverage_info_extension)&.include? expected_reason_code
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def reason_text?(coverage_info_extension)
|
|
89
|
+
coverage_info_extension['extension']
|
|
90
|
+
.find { |extension| extension['url'] == 'reason' }
|
|
91
|
+
&.dig('valueCodeableConcept', 'text')
|
|
92
|
+
&.present?
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def expected_coverage_code
|
|
96
|
+
config.options[:expected_coverage_code]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def expected_reason_code
|
|
100
|
+
config.options[:expected_reason_code]
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def require_reason_text?
|
|
104
|
+
config.options[:require_reason_text] || false
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|