onc_certification_g10_test_kit 3.1.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) 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 +25 -3
  5. data/lib/inferno/terminology/tasks/create_value_set_validators.rb +3 -3
  6. data/lib/inferno/terminology/tasks/download_umls.rb +3 -2
  7. data/lib/inferno/terminology/tasks/expand_value_set_to_file.rb +1 -1
  8. data/lib/inferno/terminology/tasks/run_umls_jar.rb +2 -1
  9. data/lib/inferno/terminology/tasks/validate_code.rb +1 -1
  10. data/lib/inferno/terminology/terminology_validation.rb +1 -1
  11. data/lib/inferno/terminology/validator.rb +9 -9
  12. data/lib/inferno/terminology/value_set.rb +65 -63
  13. data/lib/onc_certification_g10_test_kit/authorization_request_builder.rb +2 -2
  14. data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +4 -4
  15. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +3 -1
  16. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +7 -4
  17. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +5 -14
  18. data/lib/onc_certification_g10_test_kit/configuration_checker.rb +23 -1
  19. data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +2 -2
  20. data/lib/onc_certification_g10_test_kit/g10_options.rb +46 -0
  21. data/lib/onc_certification_g10_test_kit/incorrectly_permitted_tls_versions_messages_setup_test.rb +34 -0
  22. data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +3 -1
  23. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +11 -0
  24. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +10 -0
  25. data/lib/onc_certification_g10_test_kit/onc_program_procedure.yml +1 -0
  26. data/lib/onc_certification_g10_test_kit/patient_scope_test.rb +25 -0
  27. data/lib/onc_certification_g10_test_kit/profile_selector.rb +33 -25
  28. data/lib/onc_certification_g10_test_kit/resource_access_test.rb +1 -2
  29. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +2 -2
  30. data/lib/onc_certification_g10_test_kit/short_id_manager.rb +46 -0
  31. data/lib/onc_certification_g10_test_kit/short_id_map.yml +1538 -0
  32. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +4 -0
  33. data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +4 -0
  34. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +4 -0
  35. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +2 -2
  36. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +27 -4
  37. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +27 -4
  38. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +58 -7
  39. data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +1 -1
  40. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +1 -1
  41. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +1 -1
  42. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +3 -2
  43. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +4 -2
  44. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +57 -6
  45. data/lib/onc_certification_g10_test_kit/tasks/test_procedure.rb +1 -1
  46. data/lib/onc_certification_g10_test_kit/terminology_binding_validator.rb +1 -1
  47. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +7 -4
  48. data/lib/onc_certification_g10_test_kit/version.rb +1 -1
  49. data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +52 -2
  50. data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +3 -1
  51. data/lib/onc_certification_g10_test_kit.rb +41 -23
  52. metadata +22 -17
@@ -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
 
@@ -81,10 +83,23 @@ module ONCCertificationG10TestKit
81
83
  end
82
84
 
83
85
  perform_additional_validation do |resource, profile_url|
84
- metadata = USCoreTestKit::USCoreV311::USCoreTestSuite.metadata.find do |metadata_candidate|
85
- metadata_candidate.profile_url == profile_url
86
+ versionless_profile_url, profile_version = profile_url.split('|')
87
+ profile_version = case profile_version
88
+ when '4.0.0'
89
+ '400'
90
+ when '5.0.1'
91
+ '501'
92
+ else
93
+ # This open-ended else is primarily for Vital Signs profiles in v3.1.1, which are tagged
94
+ # with the base FHIR version (4.0.1). The profiles were migrated to US Core in later
95
+ # versions.
96
+ '311'
97
+ end
98
+
99
+ us_core_suite = USCoreTestKit.const_get("USCoreV#{profile_version}")::USCoreTestSuite
100
+ metadata = us_core_suite.metadata.find do |metadata_candidate|
101
+ metadata_candidate.profile_url == versionless_profile_url
86
102
  end
87
-
88
103
  next if metadata.nil?
89
104
 
90
105
  metadata.bindings
@@ -123,15 +138,15 @@ module ONCCertificationG10TestKit
123
138
  list_options: [
124
139
  {
125
140
  label: 'US Core 3.1.1 / USCDI v1',
126
- value: 'us_core_3'
141
+ value: G10Options::US_CORE_3
127
142
  },
128
143
  {
129
144
  label: 'US Core 4.0.0 / USCDI v1',
130
- value: 'us_core_4'
145
+ value: G10Options::US_CORE_4
131
146
  },
132
147
  {
133
148
  label: 'US Core 5.0.1 / USCDI v2',
134
- value: 'us_core_5'
149
+ value: G10Options::US_CORE_5
135
150
  }
136
151
  ]
137
152
 
@@ -140,11 +155,11 @@ module ONCCertificationG10TestKit
140
155
  list_options: [
141
156
  {
142
157
  label: 'SMART App Launch 1.0.0',
143
- value: 'smart_app_launch_1'
158
+ value: G10Options::SMART_1
144
159
  },
145
160
  {
146
161
  label: 'SMART App Launch 2.0.0',
147
- value: 'smart_app_launch_2'
162
+ value: G10Options::SMART_2
148
163
  }
149
164
  ]
150
165
 
@@ -153,17 +168,18 @@ module ONCCertificationG10TestKit
153
168
  list_options: [
154
169
  {
155
170
  label: 'Bulk Data 1.0.1',
156
- value: 'multi_patient_api_stu1'
171
+ value: G10Options::BULK_DATA_1
157
172
  },
158
173
  {
159
174
  label: 'Bulk Data 2.0.0',
160
- value: 'multi_patient_api_stu2'
175
+ value: G10Options::BULK_DATA_2
161
176
  }
162
177
  ]
163
178
 
164
179
  config(
165
180
  options: {
166
- post_authorization_uri: "#{Inferno::Application['base_url']}/custom/smart_stu2/post_auth"
181
+ post_authorization_uri: "#{Inferno::Application['base_url']}/custom/smart_stu2/post_auth",
182
+ incorrectly_permitted_tls_version_message_type: 'warning'
167
183
  }
168
184
  )
169
185
 
@@ -220,16 +236,16 @@ module ONCCertificationG10TestKit
220
236
  group from: 'g10_smart_ehr_practitioner_app'
221
237
 
222
238
  group from: 'g10_single_patient_api',
223
- required_suite_options: { us_core_version: 'us_core_3' }
239
+ required_suite_options: G10Options::US_CORE_3_REQUIREMENT
224
240
  group from: 'g10_single_patient_us_core_4_api',
225
- required_suite_options: { us_core_version: 'us_core_4' }
241
+ required_suite_options: G10Options::US_CORE_4_REQUIREMENT
226
242
  group from: 'g10_single_patient_us_core_5_api',
227
- required_suite_options: { us_core_version: 'us_core_5' }
243
+ required_suite_options: G10Options::US_CORE_5_REQUIREMENT
228
244
 
229
245
  group from: 'multi_patient_api',
230
- required_suite_options: { multi_patient_version: 'multi_patient_api_stu1' }
246
+ required_suite_options: G10Options::BULK_DATA_1_REQUIREMENT
231
247
  group from: 'multi_patient_api_stu2',
232
- required_suite_options: { multi_patient_version: 'multi_patient_api_stu2' }
248
+ required_suite_options: G10Options::BULK_DATA_2_REQUIREMENT
233
249
 
234
250
  group do
235
251
  title 'Additional Tests'
@@ -254,10 +270,10 @@ module ONCCertificationG10TestKit
254
270
  end
255
271
 
256
272
  group from: :g10_public_standalone_launch,
257
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_1' },
273
+ required_suite_options: G10Options::SMART_1_REQUIREMENT,
258
274
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
259
275
  group from: :g10_public_standalone_launch_stu2,
260
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' },
276
+ required_suite_options: G10Options::SMART_2_REQUIREMENT,
261
277
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
262
278
 
263
279
  group from: :g10_token_revocation
@@ -266,21 +282,23 @@ module ONCCertificationG10TestKit
266
282
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
267
283
 
268
284
  group from: :g10_smart_invalid_token_request,
269
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_1' },
285
+ required_suite_options: G10Options::SMART_1_REQUIREMENT,
270
286
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
271
287
  group from: :g10_smart_invalid_token_request_stu2,
272
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' },
288
+ required_suite_options: G10Options::SMART_2_REQUIREMENT,
273
289
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
274
290
 
275
291
  group from: :g10_smart_invalid_pkce_code_verifier_group,
276
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' }
292
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
277
293
 
278
294
  group from: :g10_ehr_patient_launch,
279
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_1' }
295
+ required_suite_options: G10Options::SMART_1_REQUIREMENT
280
296
  group from: :g10_ehr_patient_launch_stu2,
281
- required_suite_options: { smart_app_launch_version: 'smart_app_launch_2' }
297
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
282
298
 
283
299
  group from: :g10_visual_inspection_and_attestations
284
300
  end
285
301
  end
286
302
  end
303
+
304
+ ONCCertificationG10TestKit::ShortIDManager.assign_short_ids
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onc_certification_g10_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
11
+ date: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bloomer
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.11
47
+ version: 0.4.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.11
54
+ version: 0.4.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json-jwt
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.13.0
61
+ version: 1.15.3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.13.0
68
+ version: 1.15.3
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mime-types
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -114,42 +114,42 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.1.7
117
+ version: 0.2.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 0.1.7
124
+ version: 0.2.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: tls_test_kit
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 0.1.1
131
+ version: 0.2.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 0.1.1
138
+ version: 0.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: us_core_test_kit
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 0.3.1
145
+ version: 0.4.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 0.3.1
152
+ version: 0.4.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: database_cleaner-sequel
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -259,21 +259,26 @@ files:
259
259
  - lib/onc_certification_g10_test_kit/encounter_context_test.rb
260
260
  - lib/onc_certification_g10_test_kit/export_kick_off_performer.rb
261
261
  - lib/onc_certification_g10_test_kit/feature.rb
262
+ - lib/onc_certification_g10_test_kit/g10_options.rb
262
263
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-bodyheight.json
263
264
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-bodytemp.json
264
265
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-bodyweight.json
265
266
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-bp.json
266
267
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-heartrate.json
267
268
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-resprate.json
269
+ - lib/onc_certification_g10_test_kit/incorrectly_permitted_tls_versions_messages_setup_test.rb
268
270
  - lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb
269
271
  - lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb
270
272
  - lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb
271
273
  - lib/onc_certification_g10_test_kit/onc_program_procedure.yml
272
274
  - lib/onc_certification_g10_test_kit/patient_context_test.rb
275
+ - lib/onc_certification_g10_test_kit/patient_scope_test.rb
273
276
  - lib/onc_certification_g10_test_kit/profile_selector.rb
274
277
  - lib/onc_certification_g10_test_kit/resource_access_test.rb
275
278
  - lib/onc_certification_g10_test_kit/restricted_access_test.rb
276
279
  - lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb
280
+ - lib/onc_certification_g10_test_kit/short_id_manager.rb
281
+ - lib/onc_certification_g10_test_kit/short_id_map.yml
277
282
  - lib/onc_certification_g10_test_kit/single_patient_api_group.rb
278
283
  - lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb
279
284
  - lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb
@@ -305,7 +310,7 @@ licenses:
305
310
  metadata:
306
311
  homepage_uri: https://github.com/onc-healthit/onc-certification-g10-test-kit
307
312
  source_code_uri: https://github.com/onc-healthit/onc-certification-g10-test-kit
308
- post_install_message:
313
+ post_install_message:
309
314
  rdoc_options: []
310
315
  require_paths:
311
316
  - lib
@@ -313,15 +318,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
313
318
  requirements:
314
319
  - - ">="
315
320
  - !ruby/object:Gem::Version
316
- version: 2.7.0
321
+ version: 3.1.2
317
322
  required_rubygems_version: !ruby/object:Gem::Requirement
318
323
  requirements:
319
324
  - - ">="
320
325
  - !ruby/object:Gem::Version
321
326
  version: '0'
322
327
  requirements: []
323
- rubygems_version: 3.1.6
324
- signing_key:
328
+ rubygems_version: 3.3.7
329
+ signing_key:
325
330
  specification_version: 4
326
331
  summary: ONC Certification (g)(10) Test Kit
327
332
  test_files: []