onc_certification_g10_test_kit 2.3.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inferno/terminology/expected_manifest.yml +242 -29
  3. data/lib/inferno/terminology/fhir_package_manager.rb +27 -0
  4. data/lib/inferno/terminology/loader.rb +22 -1
  5. data/lib/inferno/terminology/tasks/create_value_set_validators.rb +1 -1
  6. data/lib/inferno/terminology/tasks/download_fhir_terminology.rb +5 -0
  7. data/lib/inferno/terminology/value_set.rb +51 -5
  8. data/lib/onc_certification_g10_test_kit/base_token_refresh_group.rb +5 -4
  9. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +5 -0
  10. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu2.rb +2 -0
  11. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +206 -28
  12. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +25 -40
  13. data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +30 -0
  14. data/lib/onc_certification_g10_test_kit/feature.rb +5 -8
  15. data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +18 -5
  16. data/lib/onc_certification_g10_test_kit/profile_selector.rb +175 -0
  17. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +54 -4
  18. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +93 -0
  19. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +50 -5
  20. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +94 -0
  21. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +94 -0
  22. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +197 -13
  23. data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +310 -0
  24. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +211 -0
  25. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +135 -9
  26. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +16 -4
  27. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +130 -0
  28. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +134 -67
  29. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +166 -11
  30. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +119 -135
  31. data/lib/onc_certification_g10_test_kit/version.rb +1 -1
  32. data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +19 -0
  33. data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +7 -1
  34. data/lib/onc_certification_g10_test_kit.rb +115 -74
  35. metadata +19 -11
  36. data/lib/onc_certification_g10_test_kit/profile_guesser.rb +0 -72
@@ -27,6 +27,8 @@ module ONCCertificationG10TestKit
27
27
  * Practitioner
28
28
  * Organization
29
29
 
30
+ If testing against USCDI v2, ServiceRequest is also checked.
31
+
30
32
  For each of the resource types that can be mapped to USCDI data class or
31
33
  elements, this set of tests performs a minimum number of requests to
32
34
  determine that the resource type can be accessed given the scope granted.
@@ -38,10 +40,22 @@ module ONCCertificationG10TestKit
38
40
  parameter.
39
41
 
40
42
  This set of tests does not attempt to access resources that do not
41
- directly map to USCDI v1, including Encounter, Location, Organization, and
42
- Practitioner. It also does not test Provenance, as this resource type is
43
- accessed by queries through other resource types. These resources types
44
- are accessed in the more comprehensive Single Patient Query tests.
43
+ directly map to USCDI. For USCDI v1 this includes:
44
+
45
+ * Encounter
46
+ * Location
47
+ * Organization
48
+ * Practitioner
49
+
50
+ For USCDI v2 this includes:
51
+
52
+ * Location
53
+ * Organization
54
+ * Practitioner
55
+
56
+ It also does not test Provenance, as this resource type is accessed by
57
+ queries through other resource types. These resources types are accessed
58
+ in the more comprehensive Single Patient Query tests.
45
59
 
46
60
  However, the authorization system must indicate that access is granted to
47
61
  the Encounter, Practitioner and Organization resource types by providing
@@ -58,6 +72,44 @@ module ONCCertificationG10TestKit
58
72
  oauth_credentials :smart_credentials
59
73
  end
60
74
 
75
+ ALL_RESOURCES =
76
+ [
77
+ 'AllergyIntolerance',
78
+ 'CarePlan',
79
+ 'CareTeam',
80
+ 'Condition',
81
+ 'Device',
82
+ 'DiagnosticReport',
83
+ 'DocumentReference',
84
+ 'Goal',
85
+ 'Immunization',
86
+ 'MedicationRequest',
87
+ 'Observation',
88
+ 'Procedure',
89
+ 'Patient',
90
+ 'Provenance',
91
+ 'Encounter',
92
+ 'Practitioner',
93
+ 'Organization'
94
+ ].freeze
95
+
96
+ V5_ALL_RESOURCES = (ALL_RESOURCES + ['ServiceRequest']).freeze
97
+
98
+ NON_PATIENT_COMPARTMENT_RESOURCES =
99
+ [
100
+ 'Encounter',
101
+ 'Device',
102
+ 'Location',
103
+ 'Medication',
104
+ 'Organization',
105
+ 'Practitioner',
106
+ 'PractitionerRole',
107
+ 'RelatedPerson'
108
+ ].freeze
109
+
110
+ V5_NON_PATIENT_COMPARTMENT_RESOURCES =
111
+ (NON_PATIENT_COMPARTMENT_RESOURCES - ['Encounter'] + ['ServiceRequest']).freeze
112
+
61
113
  test do
62
114
  title 'Scope granted enables access to all US Core resource types.'
63
115
  description %(
@@ -66,52 +118,34 @@ module ONCCertificationG10TestKit
66
118
  )
67
119
 
68
120
  def all_resources
69
- [
70
- 'AllergyIntolerance',
71
- 'CarePlan',
72
- 'CareTeam',
73
- 'Condition',
74
- 'Device',
75
- 'DiagnosticReport',
76
- 'DocumentReference',
77
- 'Goal',
78
- 'Immunization',
79
- 'MedicationRequest',
80
- 'Observation',
81
- 'Procedure',
82
- 'Patient',
83
- 'Provenance',
84
- 'Encounter',
85
- 'Practitioner',
86
- 'Organization'
87
- ]
121
+ return V5_ALL_RESOURCES if suite_options[:us_core_version] == 'us_core_5'
122
+
123
+ ALL_RESOURCES
88
124
  end
89
125
 
90
126
  def non_patient_compartment_resources
91
- [
92
- 'Encounter',
93
- 'Device',
94
- 'Location',
95
- 'Medication',
96
- 'Organization',
97
- 'Practitioner',
98
- 'PractitionerRole',
99
- 'RelatedPerson'
100
- ]
127
+ return V5_NON_PATIENT_COMPARTMENT_RESOURCES if suite_options[:us_core_version] == 'us_core_5'
128
+
129
+ NON_PATIENT_COMPARTMENT_RESOURCES
101
130
  end
102
131
 
103
132
  def scope_granting_access?(resource_type)
104
- received_scopes.split.find do |scope|
105
- return true if non_patient_compartment_resources.include?(resource_type) &&
106
- ["user/#{resource_type}.read", "user/#{resource_type}.*"].include?(scope)
107
-
108
- [
109
- 'patient/*.read',
110
- 'patient/*.*',
111
- "patient/#{resource_type}.read",
112
- "patient/#{resource_type}.*"
113
- ].include?(scope)
114
- end
133
+ possible_prefixes =
134
+ if non_patient_compartment_resources.include?(resource_type)
135
+ ["patient/#{resource_type}", 'patient/*', "user/#{resource_type}", 'user/*']
136
+ else
137
+ ["patient/#{resource_type}", 'patient/*']
138
+ end
139
+
140
+ received_scopes
141
+ .split
142
+ .select { |scope| scope.start_with?(*possible_prefixes) }
143
+ .any? do |scope|
144
+ _type, resource_access = scope.split('/')
145
+ _resource, access_level = resource_access.split('.')
146
+
147
+ access_level.match?(/\A(\*|read|c?ru?d?s?\b)/)
148
+ end
115
149
  end
116
150
 
117
151
  run do
@@ -141,13 +175,7 @@ module ONCCertificationG10TestKit
141
175
  test from: :g10_resource_access_test do
142
176
  title 'Access to Patient resources granted'
143
177
  description %(
144
- This test ensures that access to the Patient is granted or
145
- denied based on the selection by the tester prior to the execution of
146
- the test. If the tester indicated that access will be granted to this
147
- resource, this test verifies that a search by patient in this resource
148
- does not result in an access denied result. If the tester indicated that
149
- access will be denied for this resource, this verifies that search by
150
- patient in the resource results in an access denied result.
178
+ This test ensures that access to the Patient is granted.
151
179
  )
152
180
  id :g10_patient_unrestricted_access
153
181
 
@@ -159,13 +187,7 @@ module ONCCertificationG10TestKit
159
187
  test from: :g10_resource_access_test do
160
188
  title 'Access to AllergyIntolerance resources granted'
161
189
  description %(
162
- This test ensures that access to the AllergyIntolerance is granted or
163
- denied based on the selection by the tester prior to the execution of
164
- the test. If the tester indicated that access will be granted to this
165
- resource, this test verifies that a search by patient in this resource
166
- does not result in an access denied result. If the tester indicated that
167
- access will be denied for this resource, this verifies that search by
168
- patient in the resource results in an access denied result.
190
+ This test ensures that access to the AllergyIntolerance is granted.
169
191
  )
170
192
  id :g10_allergy_intolerance_unrestricted_access
171
193
 
@@ -177,13 +199,7 @@ module ONCCertificationG10TestKit
177
199
  test from: :g10_resource_access_test do
178
200
  title 'Access to CarePlan resources granted'
179
201
  description %(
180
- This test ensures that access to the CarePlan is granted or
181
- denied based on the selection by the tester prior to the execution of
182
- the test. If the tester indicated that access will be granted to this
183
- resource, this test verifies that a search by patient in this resource
184
- does not result in an access denied result. If the tester indicated that
185
- access will be denied for this resource, this verifies that search by
186
- patient in the resource results in an access denied result.
202
+ This test ensures that access to the CarePlan is granted.
187
203
  )
188
204
  id :g10_care_plan_unrestricted_access
189
205
 
@@ -195,13 +211,7 @@ module ONCCertificationG10TestKit
195
211
  test from: :g10_resource_access_test do
196
212
  title 'Access to CareTeam resources granted'
197
213
  description %(
198
- This test ensures that access to the CareTeam is granted or
199
- denied based on the selection by the tester prior to the execution of
200
- the test. If the tester indicated that access will be granted to this
201
- resource, this test verifies that a search by patient in this resource
202
- does not result in an access denied result. If the tester indicated that
203
- access will be denied for this resource, this verifies that search by
204
- patient in the resource results in an access denied result.
214
+ This test ensures that access to the CareTeam is granted.
205
215
  )
206
216
  id :g10_care_team_unrestricted_access
207
217
 
@@ -213,13 +223,7 @@ module ONCCertificationG10TestKit
213
223
  test from: :g10_resource_access_test do
214
224
  title 'Access to Condition resources granted'
215
225
  description %(
216
- This test ensures that access to the Condition is granted or
217
- denied based on the selection by the tester prior to the execution of
218
- the test. If the tester indicated that access will be granted to this
219
- resource, this test verifies that a search by patient in this resource
220
- does not result in an access denied result. If the tester indicated that
221
- access will be denied for this resource, this verifies that search by
222
- patient in the resource results in an access denied result.
226
+ This test ensures that access to the Condition is granted.
223
227
  )
224
228
  id :g10_condition_unrestricted_access
225
229
 
@@ -231,13 +235,7 @@ module ONCCertificationG10TestKit
231
235
  test from: :g10_resource_access_test do
232
236
  title 'Access to Device resources granted'
233
237
  description %(
234
- This test ensures that access to the Device is granted or
235
- denied based on the selection by the tester prior to the execution of
236
- the test. If the tester indicated that access will be granted to this
237
- resource, this test verifies that a search by patient in this resource
238
- does not result in an access denied result. If the tester indicated that
239
- access will be denied for this resource, this verifies that search by
240
- patient in the resource results in an access denied result.
238
+ This test ensures that access to the Device is granted.
241
239
  )
242
240
  id :g10_device_unrestricted_access
243
241
 
@@ -249,13 +247,7 @@ module ONCCertificationG10TestKit
249
247
  test from: :g10_resource_access_test do
250
248
  title 'Access to DiagnosticReport resources granted'
251
249
  description %(
252
- This test ensures that access to the DiagnosticReport is granted or
253
- denied based on the selection by the tester prior to the execution of
254
- the test. If the tester indicated that access will be granted to this
255
- resource, this test verifies that a search by patient in this resource
256
- does not result in an access denied result. If the tester indicated that
257
- access will be denied for this resource, this verifies that search by
258
- patient in the resource results in an access denied result.
250
+ This test ensures that access to the DiagnosticReport is granted.
259
251
  )
260
252
  id :g10_diagnostic_report_unrestricted_access
261
253
 
@@ -267,13 +259,7 @@ module ONCCertificationG10TestKit
267
259
  test from: :g10_resource_access_test do
268
260
  title 'Access to DocumentReference resources granted'
269
261
  description %(
270
- This test ensures that access to the DocumentReference is granted or
271
- denied based on the selection by the tester prior to the execution of
272
- the test. If the tester indicated that access will be granted to this
273
- resource, this test verifies that a search by patient in this resource
274
- does not result in an access denied result. If the tester indicated that
275
- access will be denied for this resource, this verifies that search by
276
- patient in the resource results in an access denied result.
262
+ This test ensures that access to the DocumentReference is granted.
277
263
  )
278
264
  id :g10_document_reference_unrestricted_access
279
265
 
@@ -285,13 +271,7 @@ module ONCCertificationG10TestKit
285
271
  test from: :g10_resource_access_test do
286
272
  title 'Access to Goal resources granted'
287
273
  description %(
288
- This test ensures that access to the Goal is granted or
289
- denied based on the selection by the tester prior to the execution of
290
- the test. If the tester indicated that access will be granted to this
291
- resource, this test verifies that a search by patient in this resource
292
- does not result in an access denied result. If the tester indicated that
293
- access will be denied for this resource, this verifies that search by
294
- patient in the resource results in an access denied result.
274
+ This test ensures that access to the Goal is granted.
295
275
  )
296
276
  id :g10_goal_unrestricted_access
297
277
 
@@ -303,13 +283,7 @@ module ONCCertificationG10TestKit
303
283
  test from: :g10_resource_access_test do
304
284
  title 'Access to Immunization resources granted'
305
285
  description %(
306
- This test ensures that access to the Immunization is granted or
307
- denied based on the selection by the tester prior to the execution of
308
- the test. If the tester indicated that access will be granted to this
309
- resource, this test verifies that a search by patient in this resource
310
- does not result in an access denied result. If the tester indicated that
311
- access will be denied for this resource, this verifies that search by
312
- patient in the resource results in an access denied result.
286
+ This test ensures that access to the Immunization is granted.
313
287
  )
314
288
  id :g10_immunization_unrestricted_access
315
289
 
@@ -321,13 +295,7 @@ module ONCCertificationG10TestKit
321
295
  test from: :g10_resource_access_test do
322
296
  title 'Access to MedicationRequest resources granted'
323
297
  description %(
324
- This test ensures that access to the MedicationRequest is granted or
325
- denied based on the selection by the tester prior to the execution of
326
- the test. If the tester indicated that access will be granted to this
327
- resource, this test verifies that a search by patient in this resource
328
- does not result in an access denied result. If the tester indicated that
329
- access will be denied for this resource, this verifies that search by
330
- patient in the resource results in an access denied result.
298
+ This test ensures that access to the MedicationRequest is granted.
331
299
  )
332
300
  id :g10_medication_request_access
333
301
 
@@ -339,13 +307,7 @@ module ONCCertificationG10TestKit
339
307
  test from: :g10_resource_access_test do
340
308
  title 'Access to Observation resources granted'
341
309
  description %(
342
- This test ensures that access to the Observation is granted or
343
- denied based on the selection by the tester prior to the execution of
344
- the test. If the tester indicated that access will be granted to this
345
- resource, this test verifies that a search by patient in this resource
346
- does not result in an access denied result. If the tester indicated that
347
- access will be denied for this resource, this verifies that search by
348
- patient in the resource results in an access denied result.
310
+ This test ensures that access to the Observation is granted.
349
311
  )
350
312
  id :g10_observation_unrestricted_access
351
313
 
@@ -357,13 +319,7 @@ module ONCCertificationG10TestKit
357
319
  test from: :g10_resource_access_test do
358
320
  title 'Access to Procedure resources granted'
359
321
  description %(
360
- This test ensures that access to the Procedure is granted or
361
- denied based on the selection by the tester prior to the execution of
362
- the test. If the tester indicated that access will be granted to this
363
- resource, this test verifies that a search by patient in this resource
364
- does not result in an access denied result. If the tester indicated that
365
- access will be denied for this resource, this verifies that search by
366
- patient in the resource results in an access denied result.
322
+ This test ensures that access to the Procedure is granted.
367
323
  )
368
324
  id :g10_procedure_unrestricted_access
369
325
 
@@ -371,5 +327,33 @@ module ONCCertificationG10TestKit
371
327
  USCoreTestKit::USCoreV311::ProcedureGroup
372
328
  end
373
329
  end
330
+
331
+ test from: :g10_resource_access_test do
332
+ title 'Access to Encounter resources granted'
333
+ description %(
334
+ This test ensures that access to the Encounter is granted.
335
+ )
336
+ id :g10_encounter_unrestricted_access
337
+
338
+ required_suite_options us_core_version: 'us_core_5'
339
+
340
+ def resource_group
341
+ USCoreTestKit::USCoreV501::EncounterGroup
342
+ end
343
+ end
344
+
345
+ test from: :g10_resource_access_test do
346
+ title 'Access to ServiceRequest resources granted'
347
+ description %(
348
+ This test ensures that access to the ServiceRequest is granted.
349
+ )
350
+ id :g10_service_request_unrestricted_access
351
+
352
+ required_suite_options us_core_version: 'us_core_5'
353
+
354
+ def resource_group
355
+ USCoreTestKit::USCoreV501::ServiceRequestGroup
356
+ end
357
+ end
374
358
  end
375
359
  end
@@ -1,3 +1,3 @@
1
1
  module ONCCertificationG10TestKit
2
- VERSION = '2.3.0'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
@@ -12,6 +12,7 @@ module ONCCertificationG10TestKit
12
12
  Health IT Module demonstrated support for application registration for
13
13
  single patients.
14
14
  )
15
+ id 'Test01'
15
16
  input :single_patient_registration_supported,
16
17
  title: 'Health IT Module demonstrated support for application registration for single patients.',
17
18
  type: 'radio',
@@ -46,6 +47,7 @@ module ONCCertificationG10TestKit
46
47
  Health IT Module demonstrated support for supports application
47
48
  registration for multiple patients.
48
49
  )
50
+ id 'Test02'
49
51
  input :multiple_patient_registration_supported,
50
52
  title: 'Health IT Module demonstrated support for application registration for multiple patients.',
51
53
  type: 'radio',
@@ -80,6 +82,7 @@ module ONCCertificationG10TestKit
80
82
  Health IT Module demonstrated a graphical user interface for user to
81
83
  authorize FHIR resources
82
84
  )
85
+ id 'Test03'
83
86
  input :resource_authorization_gui_supported,
84
87
  title: 'Health IT Module demonstrated a graphical user interface for user to authorize FHIR resources.',
85
88
  type: 'radio',
@@ -114,6 +117,7 @@ module ONCCertificationG10TestKit
114
117
  Health IT Module informed patient when "offline_access" scope is being
115
118
  granted during authorization.
116
119
  )
120
+ id 'Test04'
117
121
  input :offline_access_notification_supported,
118
122
  title: 'Health IT Module informed patient when "offline_access" scope is being granted during authorization.', # rubocop:disable Layout/LineLength
119
123
  type: 'radio',
@@ -150,6 +154,7 @@ module ONCCertificationG10TestKit
150
154
  Health IT Module attested that it is capable of issuing refresh tokens
151
155
  that are valid for a period of no shorter than three months.
152
156
  )
157
+ id 'Test05'
153
158
  input :refresh_token_period_attestation,
154
159
  title: 'Health IT Module attested that it is capable of issuing refresh tokens that are valid for a period of no shorter than three months.', # rubocop:disable Layout/LineLength
155
160
  type: 'radio',
@@ -186,6 +191,7 @@ module ONCCertificationG10TestKit
186
191
  Health IT developer demonstrated the ability of the Health IT Module /
187
192
  authorization server to validate token it has issued
188
193
  )
194
+ id 'Test06'
189
195
  input :token_validation_support,
190
196
  title: 'Health IT developer demonstrated the ability of the Health IT Module / authorization server to validate token it has issued.', # rubocop:disable Layout/LineLength
191
197
  type: 'radio',
@@ -220,6 +226,7 @@ module ONCCertificationG10TestKit
220
226
  description %(
221
227
  Tester verifies that all information is accurate and without omission.
222
228
  )
229
+ id 'Test07'
223
230
  input :information_accuracy_attestation,
224
231
  title: 'Tester verifies that all information is accurate and without omission.',
225
232
  type: 'radio',
@@ -254,6 +261,7 @@ module ONCCertificationG10TestKit
254
261
  Information returned no greater than scopes pre-authorized for
255
262
  multi-patient queries.
256
263
  )
264
+ id 'Test08'
257
265
  input :multi_patient_scopes_attestation,
258
266
  title: 'Information returned no greater than scopes pre-authorized for multi-patient queries.',
259
267
  type: 'radio',
@@ -288,6 +296,7 @@ module ONCCertificationG10TestKit
288
296
  Health IT developer demonstrated the documentation is available at a
289
297
  publicly accessible URL.
290
298
  )
299
+ id 'Test09'
291
300
  input :developer_documentation_attestation,
292
301
  title: 'Health IT developer demonstrated the documentation is available at a publicly accessible URL.',
293
302
  type: 'radio',
@@ -324,6 +333,7 @@ module ONCCertificationG10TestKit
324
333
  JWK Set received via a TLS-protected URL for longer than the
325
334
  cache-control header indicates.
326
335
  )
336
+ id 'Test10'
327
337
  input :jwks_cache_attestation,
328
338
  title: 'Health IT developer confirms the Health IT module does not cache the JWK Set received via a TLS-protected URL for longer than the cache-control header indicates.', # rubocop:disable Layout/LineLength
329
339
  type: 'radio',
@@ -362,6 +372,10 @@ module ONCCertificationG10TestKit
362
372
  demonstrate support for this USCDI v1 element as described in the US
363
373
  Core Patient Profile implementation guidance.
364
374
  )
375
+ id 'Test11'
376
+
377
+ required_suite_options us_core_version: 'us_core_3'
378
+
365
379
  input :patient_suffix_attestation,
366
380
  title: 'Health IT developer demonstrates support for the Patient Demographics Suffix USCDI v1 element.',
367
381
  type: 'radio',
@@ -400,6 +414,10 @@ module ONCCertificationG10TestKit
400
414
  demonstrate support for this USCDI v1 element as described in the US
401
415
  Core Patient Profile implementation guidance.
402
416
  )
417
+ id 'Test12'
418
+
419
+ required_suite_options us_core_version: 'us_core_3'
420
+
403
421
  input :patient_previous_name_attestation,
404
422
  title: 'Health IT developer demonstrates support for the Patient Demographics Previous Name USCDI v1 element.', # rubocop:disable Layout/LineLength
405
423
  type: 'radio',
@@ -440,6 +458,7 @@ module ONCCertificationG10TestKit
440
458
  OAuth 2.0 authorization flow to ensure authorization is sufficiently
441
459
  secure for native applications.
442
460
  )
461
+ id 'Test13'
443
462
  input :native_refresh_attestation,
444
463
  title: 'Health IT developer demonstrates support for issuing refresh tokens to native applications.',
445
464
  type: 'radio',
@@ -19,7 +19,13 @@ module ONCCertificationG10TestKit
19
19
  assert capabilities.is_a?(Array),
20
20
  "Expected the well-known capabilities to be an Array, but found #{capabilities.class.name}"
21
21
 
22
- missing_capabilities = (config.options[:required_capabilities] || []) - capabilities
22
+ required_capabilities = config.options[:required_capabilities] || []
23
+
24
+ if suite_options[:us_core_version] == 'us_core_5' && required_capabilities.include?('launch-ehr')
25
+ required_capabilities << 'context-ehr-encounter'
26
+ end
27
+
28
+ missing_capabilities = required_capabilities - capabilities
23
29
  assert missing_capabilities.empty?,
24
30
  "The following capabilities required for this scenario are missing: #{missing_capabilities.join(', ')}"
25
31
  end