onc_certification_g10_test_kit 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inferno/terminology/expected_manifest.yml +36 -693
  3. data/lib/inferno/terminology/fhir_package_manager.rb +16 -14
  4. data/lib/inferno/terminology/loader.rb +24 -2
  5. data/lib/inferno/terminology/tasks/download_umls.rb +2 -1
  6. data/lib/inferno/terminology/tasks/expand_value_set_to_file.rb +1 -1
  7. data/lib/inferno/terminology/tasks/run_umls_jar.rb +2 -1
  8. data/lib/inferno/terminology/value_set.rb +58 -56
  9. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +2 -0
  10. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +7 -4
  11. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +2 -11
  12. data/lib/onc_certification_g10_test_kit/configuration_checker.rb +22 -0
  13. data/lib/onc_certification_g10_test_kit/g10_options.rb +46 -0
  14. data/lib/onc_certification_g10_test_kit/incorrectly_permitted_tls_versions_messages_setup_test.rb +34 -0
  15. data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +3 -1
  16. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +11 -0
  17. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +10 -0
  18. data/lib/onc_certification_g10_test_kit/onc_program_procedure.yml +1 -0
  19. data/lib/onc_certification_g10_test_kit/profile_selector.rb +32 -24
  20. data/lib/onc_certification_g10_test_kit/resource_access_test.rb +1 -2
  21. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +2 -2
  22. data/lib/onc_certification_g10_test_kit/short_id_manager.rb +46 -0
  23. data/lib/onc_certification_g10_test_kit/short_id_map.yml +1536 -0
  24. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +4 -0
  25. data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +4 -0
  26. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +4 -0
  27. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +2 -2
  28. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +58 -6
  29. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +3 -2
  30. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +4 -2
  31. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +57 -4
  32. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +7 -4
  33. data/lib/onc_certification_g10_test_kit/version.rb +1 -1
  34. data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +52 -2
  35. data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +3 -1
  36. data/lib/onc_certification_g10_test_kit.rb +25 -20
  37. metadata +12 -8
@@ -1,3 +1,5 @@
1
+ require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class SinglePatientAPIGroup < Inferno::TestGroup
3
5
  id :g10_single_patient_api
@@ -92,5 +94,7 @@ module ONCCertificationG10TestKit
92
94
 
93
95
  group(from: id, exclude_optional: true, config: group_config)
94
96
  end
97
+
98
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup
95
99
  end
96
100
  end
@@ -1,3 +1,5 @@
1
+ require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class SinglePatientUSCore4APIGroup < Inferno::TestGroup
3
5
  id :g10_single_patient_us_core_4_api
@@ -92,5 +94,7 @@ module ONCCertificationG10TestKit
92
94
 
93
95
  group(from: id, exclude_optional: true, config: group_config)
94
96
  end
97
+
98
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup
95
99
  end
96
100
  end
@@ -1,3 +1,5 @@
1
+ require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class SinglePatientUSCore5APIGroup < Inferno::TestGroup
3
5
  id :g10_single_patient_us_core_5_api
@@ -92,5 +94,7 @@ module ONCCertificationG10TestKit
92
94
 
93
95
  group(from: id, exclude_optional: true, config: group_config)
94
96
  end
97
+
98
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup
95
99
  end
96
100
  end
@@ -91,7 +91,7 @@ module ONCCertificationG10TestKit
91
91
  :smart_authorization_url
92
92
 
93
93
  test from: :smart_app_redirect do
94
- required_suite_options smart_app_launch_version: 'smart_app_launch_1'
94
+ required_suite_options G10Options::SMART_1_REQUIREMENT
95
95
 
96
96
  input :client_secret,
97
97
  name: :standalone_client_secret,
@@ -118,7 +118,7 @@ module ONCCertificationG10TestKit
118
118
  end
119
119
 
120
120
  test from: :smart_app_redirect_stu2 do
121
- required_suite_options smart_app_launch_version: 'smart_app_launch_2'
121
+ required_suite_options G10Options::SMART_2_REQUIREMENT
122
122
 
123
123
  config(
124
124
  inputs: {
@@ -60,7 +60,7 @@ module ONCCertificationG10TestKit
60
60
  input_order :url, :ehr_client_id, :ehr_client_secret
61
61
 
62
62
  group from: :smart_discovery do
63
- required_suite_options(smart_app_launch_version: 'smart_app_launch_1')
63
+ required_suite_options(G10Options::SMART_1_REQUIREMENT)
64
64
 
65
65
  test from: 'g10_smart_well_known_capabilities',
66
66
  config: {
@@ -80,7 +80,7 @@ module ONCCertificationG10TestKit
80
80
  end
81
81
 
82
82
  group from: :smart_discovery_stu2 do
83
- required_suite_options(smart_app_launch_version: 'smart_app_launch_2')
83
+ required_suite_options(G10Options::SMART_2_REQUIREMENT)
84
84
 
85
85
  test from: 'g10_smart_well_known_capabilities',
86
86
  config: {
@@ -103,7 +103,7 @@ module ONCCertificationG10TestKit
103
103
  end
104
104
 
105
105
  group from: :smart_ehr_launch do
106
- required_suite_options(smart_app_launch_version: 'smart_app_launch_1')
106
+ required_suite_options(G10Options::SMART_1_REQUIREMENT)
107
107
 
108
108
  title 'EHR Launch With Practitioner Scope'
109
109
  input :client_secret,
@@ -173,7 +173,7 @@ module ONCCertificationG10TestKit
173
173
  access_token: { name: :ehr_access_token }
174
174
  }
175
175
  },
176
- required_suite_options: { us_core_version: 'us_core_5' }
176
+ required_suite_options: G10Options::US_CORE_5_REQUIREMENT
177
177
 
178
178
  test do
179
179
  title 'Launch context contains smart_style_url which links to valid JSON'
@@ -221,6 +221,22 @@ module ONCCertificationG10TestKit
221
221
  'Token response did not contain `need_patient_banner`'
222
222
  end
223
223
  end
224
+
225
+ tests[2].config(
226
+ outputs: {
227
+ incorrectly_permitted_tls_versions_messages: {
228
+ name: :auth_incorrectly_permitted_tls_versions_messages
229
+ }
230
+ }
231
+ )
232
+
233
+ tests[5].config(
234
+ outputs: {
235
+ incorrectly_permitted_tls_versions_messages: {
236
+ name: :token_incorrectly_permitted_tls_versions_messages
237
+ }
238
+ }
239
+ )
224
240
  end
225
241
 
226
242
  group from: :smart_ehr_launch_stu2,
@@ -240,7 +256,7 @@ module ONCCertificationG10TestKit
240
256
  }
241
257
  }
242
258
  } do
243
- required_suite_options(smart_app_launch_version: 'smart_app_launch_2')
259
+ required_suite_options(G10Options::SMART_2_REQUIREMENT)
244
260
 
245
261
  title 'EHR Launch With Practitioner Scope'
246
262
  input :client_secret,
@@ -309,7 +325,7 @@ module ONCCertificationG10TestKit
309
325
  access_token: { name: :ehr_access_token }
310
326
  }
311
327
  },
312
- required_suite_options: { us_core_version: 'us_core_5' }
328
+ required_suite_options: G10Options::US_CORE_5_REQUIREMENT
313
329
 
314
330
  test do
315
331
  title 'Launch context contains smart_style_url which links to valid JSON'
@@ -357,6 +373,22 @@ module ONCCertificationG10TestKit
357
373
  'Token response did not contain `need_patient_banner`'
358
374
  end
359
375
  end
376
+
377
+ tests[2].config(
378
+ outputs: {
379
+ incorrectly_permitted_tls_versions_messages: {
380
+ name: :auth_incorrectly_permitted_tls_versions_messages
381
+ }
382
+ }
383
+ )
384
+
385
+ tests[5].config(
386
+ outputs: {
387
+ incorrectly_permitted_tls_versions_messages: {
388
+ name: :token_incorrectly_permitted_tls_versions_messages
389
+ }
390
+ }
391
+ )
360
392
  end
361
393
 
362
394
  group from: :smart_openid_connect,
@@ -417,5 +449,25 @@ module ONCCertificationG10TestKit
417
449
  patient_id: ehr_patient_id
418
450
  end
419
451
  end
452
+
453
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
454
+ id: :g10_auth_incorrectly_permitted_tls_versions_messages_setup,
455
+ config: {
456
+ inputs: {
457
+ incorrectly_permitted_tls_versions_messages: {
458
+ name: :auth_incorrectly_permitted_tls_versions_messages
459
+ }
460
+ }
461
+ }
462
+
463
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
464
+ id: :g10_token_incorrectly_permitted_tls_versions_messages_setup,
465
+ config: {
466
+ inputs: {
467
+ incorrectly_permitted_tls_versions_messages: {
468
+ name: :token_incorrectly_permitted_tls_versions_messages
469
+ }
470
+ }
471
+ }
420
472
  end
421
473
  end
@@ -1,3 +1,4 @@
1
+ require_relative 'g10_options'
1
2
  require_relative 'patient_context_test'
2
3
  require_relative 'limited_scope_grant_test'
3
4
  require_relative 'restricted_resource_type_access_group'
@@ -80,7 +81,7 @@ module ONCCertificationG10TestKit
80
81
  Sequence](http://hl7.org/fhir/smart-app-launch/1.0.0/index.html#standalone-launch-sequence)
81
82
  )
82
83
 
83
- required_suite_options smart_app_launch_version: 'smart_app_launch_1'
84
+ required_suite_options G10Options::SMART_1_REQUIREMENT
84
85
 
85
86
  config(
86
87
  inputs: {
@@ -203,7 +204,7 @@ module ONCCertificationG10TestKit
203
204
  Sequence](http://hl7.org/fhir/smart-app-launch/STU2/app-launch.html#launch-app-standalone-launch)
204
205
  )
205
206
 
206
- required_suite_options smart_app_launch_version: 'smart_app_launch_2'
207
+ required_suite_options G10Options::SMART_2_REQUIREMENT
207
208
 
208
209
  config(
209
210
  inputs: {
@@ -1,5 +1,7 @@
1
1
  module ONCCertificationG10TestKit
2
2
  class SMARTScopesTest < Inferno::Test
3
+ include G10Options
4
+
3
5
  title 'Patient-level access with OpenID Connect and Refresh Token scopes used.'
4
6
  description %(
5
7
  The scopes being input must follow the guidelines specified in the
@@ -62,13 +64,13 @@ module ONCCertificationG10TestKit
62
64
  (PATIENT_COMPARTMENT_RESOURCE_TYPES + ['ServiceRequest']).freeze
63
65
 
64
66
  def patient_compartment_resource_types
65
- return PATIENT_COMPARTMENT_RESOURCE_TYPES unless suite_options[:us_core_version] == 'us_core_5'
67
+ return PATIENT_COMPARTMENT_RESOURCE_TYPES unless using_us_core_5?
66
68
 
67
69
  V5_PATIENT_COMPARTMENT_RESOURCE_TYPES
68
70
  end
69
71
 
70
72
  def valid_resource_types
71
- return VALID_RESOURCE_TYPES unless suite_options[:us_core_version] == 'us_core_5'
73
+ return VALID_RESOURCE_TYPES unless using_us_core_5?
72
74
 
73
75
  V5_VALID_RESOURCE_TYPES
74
76
  end
@@ -5,6 +5,7 @@ require_relative 'smart_scopes_test'
5
5
  require_relative 'unauthorized_access_test'
6
6
  require_relative 'unrestricted_resource_type_access_group'
7
7
  require_relative 'well_known_capabilities_test'
8
+ require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
8
9
 
9
10
  module ONCCertificationG10TestKit
10
11
  class SmartStandalonePatientAppGroup < Inferno::TestGroup
@@ -56,7 +57,7 @@ module ONCCertificationG10TestKit
56
57
  input_order :url, :standalone_client_id, :standalone_client_secret
57
58
 
58
59
  group from: :smart_discovery do
59
- required_suite_options(smart_app_launch_version: 'smart_app_launch_1')
60
+ required_suite_options(G10Options::SMART_1_REQUIREMENT)
60
61
 
61
62
  test from: 'g10_smart_well_known_capabilities',
62
63
  config: {
@@ -75,7 +76,7 @@ module ONCCertificationG10TestKit
75
76
  end
76
77
 
77
78
  group from: :smart_discovery_stu2 do
78
- required_suite_options(smart_app_launch_version: 'smart_app_launch_2')
79
+ required_suite_options(G10Options::SMART_2_REQUIREMENT)
79
80
 
80
81
  test from: 'g10_smart_well_known_capabilities',
81
82
  config: {
@@ -98,7 +99,7 @@ module ONCCertificationG10TestKit
98
99
  end
99
100
 
100
101
  group from: :smart_standalone_launch do
101
- required_suite_options(smart_app_launch_version: 'smart_app_launch_1')
102
+ required_suite_options(G10Options::SMART_1_REQUIREMENT)
102
103
 
103
104
  title 'Standalone Launch With Patient Scope'
104
105
  description %(
@@ -179,6 +180,22 @@ module ONCCertificationG10TestKit
179
180
  smart_credentials: { name: :standalone_smart_credentials }
180
181
  }
181
182
  }
183
+
184
+ tests[0].config(
185
+ outputs: {
186
+ incorrectly_permitted_tls_versions_messages: {
187
+ name: :auth_incorrectly_permitted_tls_versions_messages
188
+ }
189
+ }
190
+ )
191
+
192
+ tests[3].config(
193
+ outputs: {
194
+ incorrectly_permitted_tls_versions_messages: {
195
+ name: :token_incorrectly_permitted_tls_versions_messages
196
+ }
197
+ }
198
+ )
182
199
  end
183
200
 
184
201
  group from: :smart_standalone_launch_stu2,
@@ -198,7 +215,7 @@ module ONCCertificationG10TestKit
198
215
  }
199
216
  }
200
217
  } do
201
- required_suite_options(smart_app_launch_version: 'smart_app_launch_2')
218
+ required_suite_options(G10Options::SMART_2_REQUIREMENT)
202
219
 
203
220
  title 'Standalone Launch With Patient Scope'
204
221
  description %(
@@ -279,6 +296,22 @@ module ONCCertificationG10TestKit
279
296
  smart_credentials: { name: :standalone_smart_credentials }
280
297
  }
281
298
  }
299
+
300
+ tests[0].config(
301
+ outputs: {
302
+ incorrectly_permitted_tls_versions_messages: {
303
+ name: :auth_incorrectly_permitted_tls_versions_messages
304
+ }
305
+ }
306
+ )
307
+
308
+ tests[3].config(
309
+ outputs: {
310
+ incorrectly_permitted_tls_versions_messages: {
311
+ name: :token_incorrectly_permitted_tls_versions_messages
312
+ }
313
+ }
314
+ )
282
315
  end
283
316
 
284
317
  group from: :smart_openid_connect,
@@ -349,5 +382,25 @@ module ONCCertificationG10TestKit
349
382
  patient_id: standalone_patient_id
350
383
  end
351
384
  end
385
+
386
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
387
+ id: :g10_auth_incorrectly_permitted_tls_versions_messages_setup,
388
+ config: {
389
+ inputs: {
390
+ incorrectly_permitted_tls_versions_messages: {
391
+ name: :auth_incorrectly_permitted_tls_versions_messages
392
+ }
393
+ }
394
+ }
395
+
396
+ test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
397
+ id: :g10_token_incorrectly_permitted_tls_versions_messages_setup,
398
+ config: {
399
+ inputs: {
400
+ incorrectly_permitted_tls_versions_messages: {
401
+ name: :token_incorrectly_permitted_tls_versions_messages
402
+ }
403
+ }
404
+ }
352
405
  end
353
406
  end
@@ -1,3 +1,4 @@
1
+ require_relative 'g10_options'
1
2
  require_relative 'resource_access_test'
2
3
 
3
4
  module ONCCertificationG10TestKit
@@ -111,6 +112,8 @@ module ONCCertificationG10TestKit
111
112
  (NON_PATIENT_COMPARTMENT_RESOURCES - ['Encounter'] + ['ServiceRequest']).freeze
112
113
 
113
114
  test do
115
+ include G10Options
116
+
114
117
  title 'Scope granted enables access to all US Core resource types.'
115
118
  description %(
116
119
  This test confirms that the scopes granted during authorization are
@@ -118,13 +121,13 @@ module ONCCertificationG10TestKit
118
121
  )
119
122
 
120
123
  def all_resources
121
- return V5_ALL_RESOURCES if suite_options[:us_core_version] == 'us_core_5'
124
+ return V5_ALL_RESOURCES if using_us_core_5?
122
125
 
123
126
  ALL_RESOURCES
124
127
  end
125
128
 
126
129
  def non_patient_compartment_resources
127
- return V5_NON_PATIENT_COMPARTMENT_RESOURCES if suite_options[:us_core_version] == 'us_core_5'
130
+ return V5_NON_PATIENT_COMPARTMENT_RESOURCES if using_us_core_5?
128
131
 
129
132
  NON_PATIENT_COMPARTMENT_RESOURCES
130
133
  end
@@ -335,7 +338,7 @@ module ONCCertificationG10TestKit
335
338
  )
336
339
  id :g10_encounter_unrestricted_access
337
340
 
338
- required_suite_options us_core_version: 'us_core_5'
341
+ required_suite_options G10Options::US_CORE_5_REQUIREMENT
339
342
 
340
343
  def resource_group
341
344
  USCoreTestKit::USCoreV501::EncounterGroup
@@ -349,7 +352,7 @@ module ONCCertificationG10TestKit
349
352
  )
350
353
  id :g10_service_request_unrestricted_access
351
354
 
352
- required_suite_options us_core_version: 'us_core_5'
355
+ required_suite_options G10Options::US_CORE_5_REQUIREMENT
353
356
 
354
357
  def resource_group
355
358
  USCoreTestKit::USCoreV501::ServiceRequestGroup
@@ -1,3 +1,3 @@
1
1
  module ONCCertificationG10TestKit
2
- VERSION = '3.1.0'.freeze
2
+ VERSION = '3.2.0'.freeze
3
3
  end
@@ -1,3 +1,5 @@
1
+ require_relative 'g10_options'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class VisualInspectionAndAttestationsGroup < Inferno::TestGroup
3
5
  title 'Visual Inspection and Attestation'
@@ -374,7 +376,7 @@ module ONCCertificationG10TestKit
374
376
  )
375
377
  id 'Test11'
376
378
 
377
- required_suite_options us_core_version: 'us_core_3'
379
+ required_suite_options G10Options::US_CORE_3_REQUIREMENT
378
380
 
379
381
  input :patient_suffix_attestation,
380
382
  title: 'Health IT developer demonstrates support for the Patient Demographics Suffix USCDI v1 element.',
@@ -416,7 +418,7 @@ module ONCCertificationG10TestKit
416
418
  )
417
419
  id 'Test12'
418
420
 
419
- required_suite_options us_core_version: 'us_core_3'
421
+ required_suite_options G10Options::US_CORE_3_REQUIREMENT
420
422
 
421
423
  input :patient_previous_name_attestation,
422
424
  title: 'Health IT developer demonstrates support for the Patient Demographics Previous Name USCDI v1 element.', # rubocop:disable Layout/LineLength
@@ -522,5 +524,53 @@ module ONCCertificationG10TestKit
522
524
  pass public_url_attestation_notes if public_url_attestation_notes.present?
523
525
  end
524
526
  end
527
+
528
+ test do
529
+ title 'TLS version 1.2 or above must be enforced'
530
+ description %(
531
+ If TLS connections below version 1.2 have been allowed in any previous
532
+ tests, Health IT developers must document how the Health IT Module
533
+ enforces TLS version 1.2 or above.
534
+
535
+ If no TLS connections below version 1.2 have been allowed, no
536
+ documentation is necessary and this test will automatically pass.
537
+ )
538
+ id :g10_tls_version_attestation
539
+ input :unique_incorrectly_permitted_tls_versions_messages,
540
+ title: 'TLS Issues',
541
+ type: 'textarea',
542
+ locked: true,
543
+ optional: true
544
+ input :tls_documentation_required,
545
+ title: 'Health IT developers must document how the Health IT Module enforces TLs version 1.2 or above',
546
+ type: 'radio',
547
+ default: 'false',
548
+ locked: true,
549
+ options: {
550
+ list_options: [
551
+ {
552
+ label: 'Yes',
553
+ value: 'true'
554
+ },
555
+ {
556
+ label: 'No',
557
+ value: 'false'
558
+ }
559
+ ]
560
+ }
561
+ input :tls_version_attestation_notes,
562
+ title: 'Document how TLS version 1.2 or above is enforced, if required:',
563
+ type: 'textarea',
564
+ optional: true
565
+
566
+ run do
567
+ if tls_documentation_required == 'true'
568
+ assert tls_version_attestation_notes.present?,
569
+ 'Health IT developer did not document how the system under test enforces TLS version 1.2 or above'
570
+ end
571
+
572
+ pass tls_version_attestation_notes if tls_version_attestation_notes.present?
573
+ end
574
+ end
525
575
  end
526
576
  end
@@ -1,5 +1,7 @@
1
1
  module ONCCertificationG10TestKit
2
2
  class SMARTWellKnownCapabilitiesTest < Inferno::Test
3
+ include G10Options
4
+
3
5
  title 'Well-known configuration declares support for required capabilities'
4
6
  description %(
5
7
  A SMART on FHIR server SHALL convey its capabilities to app developers
@@ -21,7 +23,7 @@ module ONCCertificationG10TestKit
21
23
 
22
24
  required_capabilities = config.options[:required_capabilities] || []
23
25
 
24
- if suite_options[:us_core_version] == 'us_core_5' && required_capabilities.include?('launch-ehr')
26
+ if using_us_core_5? && required_capabilities.include?('launch-ehr')
25
27
  required_capabilities += ['context-ehr-encounter']
26
28
  end
27
29
 
@@ -6,6 +6,7 @@ require_relative 'onc_certification_g10_test_kit/configuration_checker'
6
6
  require_relative 'onc_certification_g10_test_kit/version'
7
7
 
8
8
  require_relative 'onc_certification_g10_test_kit/feature'
9
+ require_relative 'onc_certification_g10_test_kit/g10_options'
9
10
  require_relative 'onc_certification_g10_test_kit/single_patient_api_group'
10
11
  require_relative 'onc_certification_g10_test_kit/single_patient_us_core_4_api_group'
11
12
  require_relative 'onc_certification_g10_test_kit/single_patient_us_core_5_api_group'
@@ -26,6 +27,7 @@ require_relative 'onc_certification_g10_test_kit/terminology_binding_validator'
26
27
  require_relative 'onc_certification_g10_test_kit/token_revocation_group'
27
28
  require_relative 'onc_certification_g10_test_kit/visual_inspection_and_attestations_group'
28
29
  require_relative 'inferno/terminology'
30
+ require_relative 'onc_certification_g10_test_kit/short_id_manager'
29
31
 
30
32
  Inferno::Terminology::Loader.load_validators
31
33
 
@@ -123,15 +125,15 @@ module ONCCertificationG10TestKit
123
125
  list_options: [
124
126
  {
125
127
  label: 'US Core 3.1.1 / USCDI v1',
126
- value: 'us_core_3'
128
+ value: G10Options::US_CORE_3
127
129
  },
128
130
  {
129
131
  label: 'US Core 4.0.0 / USCDI v1',
130
- value: 'us_core_4'
132
+ value: G10Options::US_CORE_4
131
133
  },
132
134
  {
133
135
  label: 'US Core 5.0.1 / USCDI v2',
134
- value: 'us_core_5'
136
+ value: G10Options::US_CORE_5
135
137
  }
136
138
  ]
137
139
 
@@ -140,11 +142,11 @@ module ONCCertificationG10TestKit
140
142
  list_options: [
141
143
  {
142
144
  label: 'SMART App Launch 1.0.0',
143
- value: 'smart_app_launch_1'
145
+ value: G10Options::SMART_1
144
146
  },
145
147
  {
146
148
  label: 'SMART App Launch 2.0.0',
147
- value: 'smart_app_launch_2'
149
+ value: G10Options::SMART_2
148
150
  }
149
151
  ]
150
152
 
@@ -153,17 +155,18 @@ module ONCCertificationG10TestKit
153
155
  list_options: [
154
156
  {
155
157
  label: 'Bulk Data 1.0.1',
156
- value: 'multi_patient_api_stu1'
158
+ value: G10Options::BULK_DATA_1
157
159
  },
158
160
  {
159
161
  label: 'Bulk Data 2.0.0',
160
- value: 'multi_patient_api_stu2'
162
+ value: G10Options::BULK_DATA_2
161
163
  }
162
164
  ]
163
165
 
164
166
  config(
165
167
  options: {
166
- post_authorization_uri: "#{Inferno::Application['base_url']}/custom/smart_stu2/post_auth"
168
+ post_authorization_uri: "#{Inferno::Application['base_url']}/custom/smart_stu2/post_auth",
169
+ incorrectly_permitted_tls_version_message_type: 'warning'
167
170
  }
168
171
  )
169
172
 
@@ -220,16 +223,16 @@ module ONCCertificationG10TestKit
220
223
  group from: 'g10_smart_ehr_practitioner_app'
221
224
 
222
225
  group from: 'g10_single_patient_api',
223
- required_suite_options: { us_core_version: 'us_core_3' }
226
+ required_suite_options: G10Options::US_CORE_3_REQUIREMENT
224
227
  group from: 'g10_single_patient_us_core_4_api',
225
- required_suite_options: { us_core_version: 'us_core_4' }
228
+ required_suite_options: G10Options::US_CORE_4_REQUIREMENT
226
229
  group from: 'g10_single_patient_us_core_5_api',
227
- required_suite_options: { us_core_version: 'us_core_5' }
230
+ required_suite_options: G10Options::US_CORE_5_REQUIREMENT
228
231
 
229
232
  group from: 'multi_patient_api',
230
- required_suite_options: { multi_patient_version: 'multi_patient_api_stu1' }
233
+ required_suite_options: G10Options::BULK_DATA_1_REQUIREMENT
231
234
  group from: 'multi_patient_api_stu2',
232
- required_suite_options: { multi_patient_version: 'multi_patient_api_stu2' }
235
+ required_suite_options: G10Options::BULK_DATA_2_REQUIREMENT
233
236
 
234
237
  group do
235
238
  title 'Additional Tests'
@@ -254,10 +257,10 @@ module ONCCertificationG10TestKit
254
257
  end
255
258
 
256
259
  group from: :g10_public_standalone_launch,
257
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_1' },
260
+ required_suite_options: G10Options::SMART_1_REQUIREMENT,
258
261
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
259
262
  group from: :g10_public_standalone_launch_stu2,
260
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' },
263
+ required_suite_options: G10Options::SMART_2_REQUIREMENT,
261
264
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
262
265
 
263
266
  group from: :g10_token_revocation
@@ -266,21 +269,23 @@ module ONCCertificationG10TestKit
266
269
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
267
270
 
268
271
  group from: :g10_smart_invalid_token_request,
269
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_1' },
272
+ required_suite_options: G10Options::SMART_1_REQUIREMENT,
270
273
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
271
274
  group from: :g10_smart_invalid_token_request_stu2,
272
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' },
275
+ required_suite_options: G10Options::SMART_2_REQUIREMENT,
273
276
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
274
277
 
275
278
  group from: :g10_smart_invalid_pkce_code_verifier_group,
276
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' }
279
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
277
280
 
278
281
  group from: :g10_ehr_patient_launch,
279
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_1' }
282
+ required_suite_options: G10Options::SMART_1_REQUIREMENT
280
283
  group from: :g10_ehr_patient_launch_stu2,
281
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' }
284
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
282
285
 
283
286
  group from: :g10_visual_inspection_and_attestations
284
287
  end
285
288
  end
286
289
  end
290
+
291
+ ONCCertificationG10TestKit::ShortIDManager.assign_short_ids