onc_certification_g10_test_kit 7.2.3 → 7.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f1da0ec1a0908ca5619d39a1a089fb1a50e1ef9f769cb0af28a918a5fbc22fb
4
- data.tar.gz: be6759a5d57a2f29c2d4c990b322c65f2df04f994ab1fad57ad8a40cc2b0817b
3
+ metadata.gz: 36e79655c642771e12b9992154935527a95c3b00b63f2a118d38bff05e8e0043
4
+ data.tar.gz: c229537516b735200f9a232cc2a1990eff7106031023796044f821c629a7fea3
5
5
  SHA512:
6
- metadata.gz: c5f3cc784f55ec2bb77ca0d39bc669026f38b27d19b9be6d140d9ff419613b23b13815b4b76c40ddb062d255bb6e8e971392f1294a3f94934d6bc82a3c750bee
7
- data.tar.gz: 76793dca8bcb721e54091c0792f59a1e7d68b6cfc1723138897adc3ddae0cadcc96a2d3043e3ef696f2e02c5fc0937245e59f896a1cf68d11b70403305a1106e
6
+ metadata.gz: c7e76584c34b6f50c882fcf3b2926c81b8b40c1a45c34db536f6abcb5a94ee8177c6375a676e46fe4155332c0ecded60f47b7cc8e143178315a01d0fcc0bf2d8
7
+ data.tar.gz: 6ed443c347f5e1bde2bcc9c69092f74065e7fda4766c0c770e475f8e09df6ad4de4a6a1a0a52390bfd5bbab808fdadf00112db2d4517c29eb2eda1589547d4e1
@@ -449,7 +449,7 @@
449
449
  },
450
450
  {
451
451
  "name": "additional_patient_ids",
452
- "value": "85,355",
452
+ "value": "85,355,907",
453
453
  "_title": "Additional Patient IDs",
454
454
  "_description": "Comma separated list of Patient IDs that together with the Patient\nID from the SMART App Launch contain all MUST SUPPORT elements.\n",
455
455
  "_type": "text",
@@ -479,7 +479,7 @@
479
479
  },
480
480
  {
481
481
  "name": "bulk_patient_ids_in_group",
482
- "value": "85,355",
482
+ "value": "85,355,907",
483
483
  "_title": "Patient IDs in exported Group",
484
484
  "_description": "Comma separated list of every Patient ID that is in the specified Group. This information is provided by\nthe system under test to verify that data returned matches expectations. Leave blank to not verify Group\ninclusion.\n",
485
485
  "_type": "text",
@@ -393,6 +393,7 @@ module ONCCertificationG10TestKit
393
393
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
394
394
 
395
395
  For US Core v6.1.0, this test expects evidence of the following US Core profiles
396
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-result
396
397
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
397
398
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-occupation
398
399
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancyintent
@@ -413,6 +414,7 @@ module ONCCertificationG10TestKit
413
414
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
414
415
 
415
416
  For US Core v7.0.0, this test expects evidence of the following US Core profiles
417
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-result
416
418
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
417
419
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-occupation
418
420
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancyintent
@@ -2,7 +2,7 @@ require_relative '../inferno/terminology/tasks/check_built_terminology'
2
2
 
3
3
  module ONCCertificationG10TestKit
4
4
  class ConfigurationChecker
5
- EXPECTED_HL7_VALIDATOR_VERSION = '1.0.65'.freeze
5
+ EXPECTED_HL7_VALIDATOR_VERSION = '1.0.67'.freeze
6
6
  HL7_VALIDATOR_VERSION_KEY = 'validatorWrapperVersion'.freeze
7
7
 
8
8
  def configuration_messages
@@ -0,0 +1,616 @@
1
+ require_relative 'metadata'
2
+ require_relative 'configuration_checker'
3
+ require_relative 'urls'
4
+
5
+ require_relative 'feature'
6
+ require_relative 'g10_options'
7
+ require_relative 'multi_patient_api_stu1'
8
+ require_relative 'multi_patient_api_stu2'
9
+ require_relative 'single_patient_api_group'
10
+ require_relative 'single_patient_us_core_4_api_group'
11
+ require_relative 'single_patient_us_core_5_api_group'
12
+ require_relative 'single_patient_us_core_6_api_group'
13
+ require_relative 'single_patient_us_core_7_api_group'
14
+ require_relative 'smart_app_launch_invalid_aud_group'
15
+ require_relative 'smart_asymmetric_launch_group'
16
+ require_relative 'smart_granular_scope_selection_group'
17
+ require_relative 'smart_invalid_token_group'
18
+ require_relative 'smart_invalid_token_group_stu2'
19
+ require_relative 'smart_invalid_pkce_group'
20
+ require_relative 'smart_limited_app_group'
21
+ require_relative 'smart_standalone_patient_app_group'
22
+ require_relative 'smart_public_standalone_launch_group'
23
+ require_relative 'smart_public_standalone_launch_group_stu2'
24
+ require_relative 'smart_public_standalone_launch_group_stu2_2'
25
+ require_relative 'smart_ehr_patient_launch_group'
26
+ require_relative 'smart_ehr_patient_launch_group_stu2'
27
+ require_relative 'smart_ehr_patient_launch_group_stu2_2'
28
+ require_relative 'smart_ehr_practitioner_app_group'
29
+ require_relative 'smart_fine_grained_scopes_group'
30
+ require_relative 'smart_fine_grained_scopes_group_stu2_2'
31
+ require_relative 'smart_fine_grained_scopes_us_core_7_group'
32
+ require_relative 'smart_fine_grained_scopes_us_core_7_group_stu2_2'
33
+ require_relative 'smart_v1_scopes_group'
34
+ require_relative 'terminology_binding_validator'
35
+ require_relative 'token_introspection_group'
36
+ require_relative 'token_introspection_group_stu2_2'
37
+ require_relative 'token_revocation_group'
38
+ require_relative 'visual_inspection_and_attestations_group'
39
+
40
+ require_relative '../inferno/terminology'
41
+
42
+ require_relative 'test_procedure_requirements_manager'
43
+
44
+ Inferno::Terminology::Loader.load_validators
45
+
46
+ module ONCCertificationG10TestKit
47
+ class G10CertificationSuite < Inferno::TestSuite
48
+ title 'ONC Certification (g)(10) Standardized API'
49
+ short_title '(g)(10) Standardized API'
50
+ id :g10_certification
51
+ links [
52
+ {
53
+ label: 'Report Issue',
54
+ url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/issues/'
55
+ },
56
+ {
57
+ label: 'Open Source',
58
+ url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/'
59
+ },
60
+ {
61
+ label: 'Download',
62
+ url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/releases'
63
+ }
64
+ ]
65
+
66
+ requirement_sets(
67
+ {
68
+ identifier: '170.315(g)(10)-test-procedure',
69
+ title: '170.315(g)(10) Standardized API for patient and population services test procedure',
70
+ actor: 'Server',
71
+ requirements: 'APP-REG-1,APP-REG-2,SEC-CNN-1,AUT-PAT-1,AUT-PAT-2,AUT-PAT-3,AUT-PAT-4,AUT-PAT-10,AUT-PAT-33,' \
72
+ 'AUT-PAT-11,AUT-PAT-12,AUT-PAT-37,AUT-PAT-14,AUT-PAT-35,AUT-PAT-17,AUT-PAT-18,AUT-PAT-36,' \
73
+ 'AUT-PAT-20,AUT-PAT-21,AUT-PAT-22,AUT-PAT-23,PAR-1,AUT-SYS-1,AUT-SYS-2,AUT-SYS-3,' \
74
+ 'AUT-SYS-4,AUT-SYS-5,AUT-SYS-6,AUT-SYS-7,AUT-SYS-8,AUT-SYS-9,AUT-SYS-10,TOK-INTRO-1,' \
75
+ 'SH-PAT-1,SH-PAT-2,SH-PAT-3,SH-PAT-4,SH-PAT-5,DAT-PAT-1,DAT-PAT-18,DAT-PAT-2,DAT-PAT-3,' \
76
+ 'DAT-PAT-4,DAT-PAT-5,DAT-PAT-6,DAT-PAT-7,DAT-PAT-8,DAT-PAT-17,DAT-PAT-9,DAT-PAT-10,DAT-PAT-11,' \
77
+ 'DAT-PAT-12,DAT-PAT-13,DAT-PAT-14,DAT-PAT-15,API-DOC-1,API-DOC-2,API-DOC-3'
78
+ },
79
+ {
80
+ identifier: '170.315(g)(10)-test-procedure',
81
+ title: '170.315(g)(10) Standardized API for patient and population services test procedure',
82
+ actor: 'Server',
83
+ suite_options: {
84
+ smart_app_launch_version: G10Options::SMART_1
85
+ },
86
+ requirements: 'AUT-PAT-5,AUT-PAT-6,AUT-PAT-7,AUT-PAT-8,AUT-PAT-9,AUT-PAT-13,AUT-PAT-15,AUT-PAT-16,AUT-PAT-19'
87
+ },
88
+ {
89
+ identifier: '170.315(g)(10)-test-procedure',
90
+ title: '170.315(g)(10) Standardized API for patient and population services test procedure',
91
+ actor: 'Server',
92
+ suite_options: {
93
+ smart_app_launch_version: G10Options::SMART_2
94
+ },
95
+ requirements: 'AUT-PAT-24,AUT-PAT-25,AUT-PAT-26,AUT-PAT-27,AUT-PAT-28,AUT-PAT-29,AUT-PAT-30,AUT-PAT-31'
96
+ },
97
+ {
98
+ identifier: '170.315(g)(10)-test-procedure',
99
+ title: '170.315(g)(10) Standardized API for patient and population services test procedure',
100
+ actor: 'Server',
101
+ suite_options: {
102
+ smart_app_launch_version: G10Options::SMART_2_2
103
+ },
104
+ requirements: 'AUT-PAT-24,AUT-PAT-25,AUT-PAT-26,AUT-PAT-27,AUT-PAT-28,AUT-PAT-29,AUT-PAT-30,AUT-PAT-31'
105
+ },
106
+ {
107
+ identifier: '170.315(g)(10)-test-procedure',
108
+ title: '170.315(g)(10) Standardized API for patient and population services test procedure',
109
+ actor: 'Server',
110
+ suite_options: {
111
+ us_core_version: G10Options::US_CORE_6
112
+ },
113
+ requirements: 'AUT-PAT-32,AUT-PAT-34'
114
+ },
115
+ {
116
+ identifier: '170.315(g)(10)-test-procedure',
117
+ title: '170.315(g)(10) Standardized API for patient and population services test procedure',
118
+ actor: 'Server',
119
+ suite_options: {
120
+ us_core_version: G10Options::US_CORE_7
121
+ },
122
+ requirements: 'AUT-PAT-32,AUT-PAT-34'
123
+ }
124
+ )
125
+
126
+ check_configuration do
127
+ ConfigurationChecker.new.configuration_messages
128
+ end
129
+
130
+ WARNING_INCLUSION_FILTERS = [
131
+ /Unknown CodeSystem/,
132
+ /Unknown ValueSet/
133
+ ].freeze
134
+
135
+ ERROR_FILTERS = [
136
+ /\A\S+: \S+: Unknown [Cc]ode/,
137
+ /\A\S+: \S+: None of the codings provided are in the value set/,
138
+ /\A\S+: \S+: The code provided \(\S*\) is not in the value set/,
139
+ /\A\S+: \S+: The Coding provided \(\S*\) is not in the value set/,
140
+ /\A\S+: \S+: The Coding provided \(\S*\) was not found in the value set/,
141
+ /\A\S+: \S+: A definition for CodeSystem '.*' could not be found, so the code cannot be validated/,
142
+ /\A\S+: \S+: URL value '.*' does not resolve/,
143
+ /\A\S+: \S+: .*\[No server available\]/, # Catch-all for certain errors when TX server is disabled
144
+ %r{\A\S+: \S+: .*\[Error from https?://tx.fhir.org/r4:}, # Catch-all for TX server errors that slip through
145
+ # This is a strange error introduced by FHIR validator core 6.5.28.
146
+ %r{\A\S+: \S+: The System URI could not be determined for the code '.*' in the ValueSet 'http://hl7.org/fhir/ValueSet/mimetypes|4.0.1'}
147
+ ].freeze
148
+
149
+ def self.setup_validator(us_core_version_requirement) # rubocop:disable Metrics/CyclomaticComplexity
150
+ fhir_resource_validator :default, required_suite_options: us_core_version_requirement do
151
+ cli_context do
152
+ txServer nil
153
+ displayWarnings true
154
+ disableDefaultResourceFetcher true
155
+ end
156
+
157
+ us_core_version_num = G10Options::US_CORE_VERSION_NUMBERS[us_core_version_requirement[:us_core_version]]
158
+
159
+ igs("hl7.fhir.us.core##{us_core_version_num}")
160
+
161
+ us_core_message_filters =
162
+ case us_core_version_requirement[:us_core_version]
163
+ when G10Options::US_CORE_3
164
+ USCoreTestKit::USCoreV311::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS
165
+ when G10Options::US_CORE_4
166
+ USCoreTestKit::USCoreV400::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS
167
+ when G10Options::US_CORE_5
168
+ USCoreTestKit::USCoreV501::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS
169
+ when G10Options::US_CORE_6
170
+ USCoreTestKit::USCoreV610::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS
171
+ when G10Options::US_CORE_7
172
+ USCoreTestKit::USCoreV700::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS
173
+ end
174
+
175
+ exclude_message do |message|
176
+ if message.type == 'info' ||
177
+ (message.type == 'warning' && WARNING_INCLUSION_FILTERS.none? do |filter|
178
+ filter.match? message.message
179
+ end) ||
180
+ us_core_message_filters.any? { |filter| filter.match? message.message } ||
181
+ (message.type == 'error' && ERROR_FILTERS.any? { |filter| message.message.match? filter })
182
+ true
183
+ else
184
+ false
185
+ end
186
+ end
187
+
188
+ perform_additional_validation do |resource, profile_url|
189
+ versionless_profile_url, profile_version = profile_url.split('|')
190
+ profile_version = case profile_version
191
+ when '6.1.0'
192
+ '610'
193
+ when '4.0.0'
194
+ '400'
195
+ when '5.0.1'
196
+ '501'
197
+ else
198
+ # This open-ended else is primarily for Vital Signs profiles in v3.1.1, which are tagged
199
+ # with the base FHIR version (4.0.1). The profiles were migrated to US Core in later
200
+ # versions.
201
+ '311'
202
+ end
203
+
204
+ us_core_suite = USCoreTestKit.const_get("USCoreV#{profile_version}")::USCoreTestSuite
205
+ metadata = us_core_suite.metadata.find do |metadata_candidate|
206
+ metadata_candidate.profile_url == versionless_profile_url
207
+ end
208
+ next if metadata.nil?
209
+
210
+ validation_messages = if resource.instance_of?(FHIR::Provenance)
211
+ USCoreTestKit::ProvenanceValidator.validate(resource)
212
+ else
213
+ []
214
+ end
215
+
216
+ terminology_validation_messages = metadata.bindings
217
+ .select { |binding_definition| binding_definition[:strength] == 'required' }
218
+ .flat_map do |binding_definition|
219
+ TerminologyBindingValidator.validate(resource, binding_definition)
220
+ rescue Inferno::UnknownValueSetException, Inferno::UnknownCodeSystemException => e
221
+ { type: 'warning', message: e.message }
222
+ end.compact
223
+
224
+ validation_messages.concat(terminology_validation_messages)
225
+ validation_messages
226
+ end
227
+ end
228
+ end
229
+
230
+ [
231
+ G10Options::US_CORE_3_REQUIREMENT,
232
+ G10Options::US_CORE_4_REQUIREMENT,
233
+ G10Options::US_CORE_5_REQUIREMENT,
234
+ G10Options::US_CORE_6_REQUIREMENT,
235
+ G10Options::US_CORE_7_REQUIREMENT
236
+
237
+ ].each do |us_core_version_requirement|
238
+ setup_validator(us_core_version_requirement)
239
+ end
240
+
241
+ def self.jwks_json
242
+ bulk_data_jwks =
243
+ JSON.parse(
244
+ File.read(ENV.fetch('G10_BULK_DATA_JWKS', File.join(__dir__, 'bulk_data_jwks.json')))
245
+ )
246
+ @jwks_json ||= JSON.pretty_generate(
247
+ { keys: bulk_data_jwks['keys'].select { |key| key['key_ops']&.include?('verify') } }
248
+ )
249
+ end
250
+
251
+ def self.well_known_route_handler
252
+ ->(_env) { [200, { 'Content-Type' => 'application/json' }, [jwks_json]] }
253
+ end
254
+
255
+ route(
256
+ :get,
257
+ '/.well-known/jwks.json',
258
+ well_known_route_handler
259
+ )
260
+
261
+ suite_option :us_core_version,
262
+ title: 'US Core Version',
263
+ list_options: [
264
+ {
265
+ label: 'US Core 3.1.1 / USCDI v1',
266
+ value: G10Options::US_CORE_3
267
+ },
268
+ {
269
+ label: 'US Core 4.0.0 / USCDI v1',
270
+ value: G10Options::US_CORE_4
271
+ },
272
+ {
273
+ label: 'US Core 6.1.0 / USCDI v3',
274
+ value: G10Options::US_CORE_6
275
+ },
276
+ {
277
+ label: 'US Core 7.0.0 / USCDI v4',
278
+ value: G10Options::US_CORE_7
279
+ }
280
+ ]
281
+
282
+ suite_option :smart_app_launch_version,
283
+ title: 'SMART App Launch Version',
284
+ list_options: [
285
+ {
286
+ label: 'SMART App Launch 1.0.0',
287
+ value: G10Options::SMART_1
288
+ },
289
+ {
290
+ label: 'SMART App Launch 2.0.0',
291
+ value: G10Options::SMART_2
292
+ },
293
+ {
294
+ label: 'SMART App Launch 2.2.0',
295
+ value: G10Options::SMART_2_2
296
+ }
297
+ ]
298
+
299
+ suite_option :multi_patient_version,
300
+ title: 'Bulk Data Version',
301
+ list_options: [
302
+ {
303
+ label: 'Bulk Data 1.0.1',
304
+ value: G10Options::BULK_DATA_1
305
+ },
306
+ {
307
+ label: 'Bulk Data 2.0.0',
308
+ value: G10Options::BULK_DATA_2
309
+ }
310
+ ]
311
+
312
+ config(
313
+ options: {
314
+ post_authorization_uri: "#{Inferno::Application['base_url']}/custom/smart_stu2/post_auth",
315
+ incorrectly_permitted_tls_version_message_type: 'warning'
316
+ }
317
+ )
318
+
319
+ description %(
320
+ The ONC Certification (g)(10) Standardized API Test Suite is a testing
321
+ tool for Health Level 7 (HL7®) Fast Healthcare Interoperability Resources
322
+ (FHIR®) services seeking to meet the requirements of the Standardized API
323
+ for Patient and Population Services criterion § 170.315(g)(10) in the ONC
324
+ Certification Program.
325
+
326
+ This test suite is organized into testing scenarios that in sum cover all
327
+ requirements within the § 170.315(g)(10) certification criterion. The
328
+ scenarios are intended to be run in order during certification, but can
329
+ be run out of order to support testing during development or certification
330
+ preparation. Some scenarios depend on data collected during previous
331
+ scenarios to function. In these cases, the scenario description describes
332
+ these dependencies.
333
+
334
+ The best way to learn about how to use these tests is the
335
+ [(g)(10) Standardized API Test Kit walkthrough](https://github.com/onc-healthit/onc-certification-g10-test-kit/wiki/Walkthrough),
336
+ which demonstrates the tests running against a simulated system.
337
+
338
+ The first three scenarios require the system under test to demonstrate
339
+ basic SMART App Launch functionality. The fourth uses a valid token
340
+ provided during earlier tests to verify support for the Single Patient API
341
+ as described in the criterion. The fifth verifies support for the Multi
342
+ Patient API, including Backend Services for authorization. Not all
343
+ authorization-related requirements are verified in the first three
344
+ scenarios, and the 'Additional Authorization Tests' verify these
345
+ additional requirements. The last scenario contains a list of
346
+ 'attestations' and 'visual inspections' for requirements that could not
347
+ be verified through automated testing.
348
+
349
+ To get started with the first group of scenarios, please first register the
350
+ Inferno client as a SMART App with the following information:
351
+
352
+ * SMART Launch URI: `#{LAUNCH_URI}`
353
+ * OAuth Redirect URI: `#{REDIRECT_URI}`
354
+
355
+ For the multi-patient API, register Inferno with the following JWK Set
356
+ Url:
357
+
358
+ * `#{Inferno::Application[:base_url]}/custom/g10_certification/.well-known/jwks.json`
359
+
360
+ Systems must pass all tests to qualify for ONC certification.
361
+ )
362
+
363
+ suite_summary %(
364
+ The ONC Certification (g)(10) Standardized API Test Kit is a testing tool
365
+ for Health Level 7 (HL7®) Fast Healthcare Interoperability Resources
366
+ (FHIR®) services seeking to meet the requirements of the Standardized API
367
+ for Patient and Population Services criterion § 170.315(g)(10) in the ONC Certification Program.
368
+
369
+ Systems may adopt later versions of standards than those named in the rule
370
+ as approved by the ONC Standards Version Advancement Process (SVAP).
371
+ When using US Core v7, the tester must select SMART v2 or above
372
+ because SMART App Launch granular scopes are required by US Core v7
373
+ and are not available in SMART v1. Please select which approved version
374
+ of each standard to use, and click ‘Start Testing’ to begin testing.
375
+ )
376
+
377
+ input_instructions %(
378
+ Register Inferno as a SMART app using the following information:
379
+
380
+ * Launch URI: `#{LAUNCH_URI}`
381
+ * Redirect URI: `#{REDIRECT_URI}`
382
+
383
+ For the multi-patient API, register Inferno with the following JWK Set
384
+ Url:
385
+
386
+ * `#{Inferno::Application[:base_url]}/custom/g10_certification/.well-known/jwks.json`
387
+ )
388
+
389
+ group from: 'g10_smart_standalone_patient_app'
390
+
391
+ group from: 'g10_smart_limited_app' do
392
+ # This has to be configured here, otherwise the `smart_auth_info` config
393
+ # will get clobbered and will use `standalone_smart_auth_info` instead of
394
+ # `limited_smart_auth_info`
395
+ groups
396
+ .select { |group| group.id.include? 'smart_standalone_launch' }
397
+ .flat_map(&:tests)
398
+ .select { |test| test.id.include? 'g10_patient_context' }
399
+ .each do |test|
400
+ test
401
+ .config(
402
+ inputs: {
403
+ patient_id: { name: :limited_patient_id },
404
+ smart_auth_info: { name: :limited_smart_auth_info }
405
+ }
406
+ )
407
+ end
408
+ end
409
+
410
+ group from: 'g10_smart_ehr_practitioner_app'
411
+
412
+ group from: 'g10_single_patient_api',
413
+ required_suite_options: G10Options::US_CORE_3_REQUIREMENT
414
+ group from: 'g10_single_patient_us_core_4_api',
415
+ required_suite_options: G10Options::US_CORE_4_REQUIREMENT
416
+ group from: 'g10_single_patient_us_core_5_api',
417
+ required_suite_options: G10Options::US_CORE_5_REQUIREMENT
418
+ group from: 'g10_single_patient_us_core_6_api',
419
+ required_suite_options: G10Options::US_CORE_6_REQUIREMENT
420
+ group from: 'g10_single_patient_us_core_7_api',
421
+ required_suite_options: G10Options::US_CORE_7_REQUIREMENT
422
+
423
+ group from: 'multi_patient_api',
424
+ required_suite_options: G10Options::BULK_DATA_1_REQUIREMENT
425
+ group from: 'multi_patient_api_stu2',
426
+ required_suite_options: G10Options::BULK_DATA_2_REQUIREMENT
427
+
428
+ group do
429
+ title 'Additional Authorization Tests'
430
+ id 'Group06'
431
+ description %(
432
+ The (g)(10) Standardized Test Suite attempts to minimize effort required
433
+ by testers by creating scenarios that validate as many requirements as
434
+ possible with just a handful of SMART App Launches. However, not all
435
+ SMART App Launch and (g)(10) Standardized API criterion requirements
436
+ that need to be verified fit within the first few test scenarios in this
437
+ suite.
438
+
439
+ The scenarios contained in this section verify remaining testing
440
+ requirements for the (g)(10) Standardized API criterion relevant to
441
+ the SMART App Launch implementation specification. Each of these scenarios
442
+ need to be run independently. Please read the instructions for each in
443
+ the 'About' section, as they may require special setup on the part of
444
+ the tester.
445
+ )
446
+
447
+ default_redirect_message_proc = lambda do |auth_url|
448
+ %(
449
+ ### #{self.class.parent.title}
450
+
451
+ [Follow this link to authorize with the SMART server](#{auth_url}).
452
+
453
+ Tests will resume once Inferno receives a request at
454
+ `#{REDIRECT_URI}` with a state of `#{state}`.
455
+ )
456
+ end
457
+
458
+ group from: :g10_public_standalone_launch,
459
+ required_suite_options: G10Options::SMART_1_REQUIREMENT,
460
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
461
+ group from: :g10_public_standalone_launch_stu2,
462
+ required_suite_options: G10Options::SMART_2_REQUIREMENT,
463
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
464
+ group from: :g10_public_standalone_launch_stu2_2, # rubocop:disable Naming/VariableNumber
465
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT,
466
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
467
+
468
+ group from: :g10_token_revocation
469
+
470
+ group from: :g10_smart_invalid_aud,
471
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
472
+
473
+ group from: :g10_smart_invalid_token_request,
474
+ required_suite_options: G10Options::SMART_1_REQUIREMENT,
475
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
476
+ group from: :g10_smart_invalid_token_request_stu2,
477
+ required_suite_options: G10Options::SMART_2_REQUIREMENT,
478
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
479
+ group from: :g10_smart_invalid_token_request_stu2,
480
+ id: :g10_smart_invalid_token_request_stu2_2, # rubocop:disable Naming/VariableNumber
481
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT,
482
+ config: { options: { redirect_message_proc: default_redirect_message_proc } }
483
+
484
+ group from: :g10_smart_invalid_pkce_code_verifier_group,
485
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
486
+ group from: :g10_smart_invalid_pkce_code_verifier_group,
487
+ id: :g10_smart_invalid_pkce_code_verifier_group_stu2_2, # rubocop:disable Naming/VariableNumber
488
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT
489
+
490
+ group from: :g10_ehr_patient_launch,
491
+ required_suite_options: G10Options::SMART_1_REQUIREMENT
492
+ group from: :g10_ehr_patient_launch_stu2,
493
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
494
+ group from: :g10_ehr_patient_launch_stu2_2, # rubocop:disable Naming/VariableNumber
495
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT
496
+
497
+ group from: :g10_token_introspection,
498
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
499
+ group from: :g10_token_introspection_stu2_2, # rubocop:disable Naming/VariableNumber
500
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT
501
+
502
+ group from: :g10_asymmetric_launch,
503
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
504
+ group from: :g10_asymmetric_launch,
505
+ id: :g10_asymmetric_launch_stu2_2, # rubocop:disable Naming/VariableNumber
506
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT
507
+
508
+ group from: :g10_smart_v1_scopes,
509
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
510
+ group from: :g10_smart_v1_scopes,
511
+ id: :g10_smart_v1_scopes_stu2_2, # rubocop:disable Naming/VariableNumber
512
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT
513
+
514
+ group from: :g10_smart_fine_grained_scopes, exclude_optional: true do
515
+ required_suite_options G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)
516
+ groups.first.config(
517
+ inputs: {
518
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
519
+ },
520
+ outputs: {
521
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
522
+ }
523
+ )
524
+
525
+ groups.last.config(
526
+ inputs: {
527
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
528
+ },
529
+ outputs: {
530
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
531
+ }
532
+ )
533
+ end
534
+
535
+ group from: :g10_smart_fine_grained_scopes_stu2_2, exclude_optional: true do # rubocop:disable Naming/VariableNumber
536
+ required_suite_options G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)
537
+ groups.first.config(
538
+ inputs: {
539
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
540
+ },
541
+ outputs: {
542
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
543
+ }
544
+ )
545
+
546
+ groups.last.config(
547
+ inputs: {
548
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
549
+ },
550
+ outputs: {
551
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
552
+ }
553
+ )
554
+ end
555
+
556
+ group from: :g10_us_core_7_smart_fine_grained_scopes, exclude_optional: true do
557
+ required_suite_options G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT)
558
+ groups.first.config(
559
+ inputs: {
560
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
561
+ },
562
+ outputs: {
563
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
564
+ }
565
+ )
566
+
567
+ groups.last.config(
568
+ inputs: {
569
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
570
+ },
571
+ outputs: {
572
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
573
+ }
574
+ )
575
+ end
576
+
577
+ group from: :g10_us_core_7_smart_fine_grained_scopes_stu2_2, exclude_optional: true do # rubocop:disable Naming/VariableNumber
578
+ required_suite_options G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT)
579
+ groups.first.config(
580
+ inputs: {
581
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
582
+ },
583
+ outputs: {
584
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
585
+ }
586
+ )
587
+
588
+ groups.last.config(
589
+ inputs: {
590
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
591
+ },
592
+ outputs: {
593
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
594
+ }
595
+ )
596
+ end
597
+
598
+ group from: :g10_smart_granular_scope_selection,
599
+ required_suite_options: G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)
600
+ group from: :g10_smart_granular_scope_selection,
601
+ id: :g10_smart_granular_scope_selection_stu2_2, # rubocop:disable Naming/VariableNumber
602
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)
603
+
604
+ group from: :g10_smart_granular_scope_selection,
605
+ id: :g10_us_core_7_smart_granular_scope_selection,
606
+ required_suite_options: G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT)
607
+ group from: :g10_smart_granular_scope_selection,
608
+ id: :g10_us_core_7_smart_granular_scope_selection_stu2_2, # rubocop:disable Naming/VariableNumber
609
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT)
610
+ end
611
+
612
+ group from: :g10_visual_inspection_and_attestations
613
+ end
614
+ end
615
+
616
+ ONCCertificationG10TestKit::TestProcedureRequirementsManager.assign_test_procedure_requirements