onc_certification_g10_test_kit 2.0.0 → 2.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inferno/terminology/tasks/check_built_terminology.rb +14 -12
  3. data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +7 -4
  4. data/lib/onc_certification_g10_test_kit/bulk_data_group_export.rb +60 -17
  5. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +10 -6
  6. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +37 -16
  7. data/lib/onc_certification_g10_test_kit/configuration_checker.rb +6 -5
  8. data/lib/onc_certification_g10_test_kit/multi_patient_api.rb +11 -0
  9. data/lib/onc_certification_g10_test_kit/onc_program_procedure.yml +1451 -0
  10. data/lib/onc_certification_g10_test_kit/profile_guesser.rb +2 -2
  11. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +13 -13
  12. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +89 -0
  13. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +13 -12
  14. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +11 -5
  15. data/lib/onc_certification_g10_test_kit/smart_invalid_launch_group.rb +13 -16
  16. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +11 -4
  17. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +18 -4
  18. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +15 -3
  19. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +8 -3
  20. data/lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb +243 -0
  21. data/lib/onc_certification_g10_test_kit/tasks/test_procedure.rb +65 -0
  22. data/lib/onc_certification_g10_test_kit/token_revocation_group.rb +60 -60
  23. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +13 -13
  24. data/lib/onc_certification_g10_test_kit/version.rb +1 -1
  25. data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +7 -6
  26. data/lib/onc_certification_g10_test_kit.rb +15 -82
  27. metadata +16 -12
@@ -1,9 +1,10 @@
1
1
  require 'smart_app_launch_test_kit'
2
- require 'us_core_test_kit'
2
+ require 'us_core_test_kit/generated/v3.1.1/us_core_test_suite'
3
3
 
4
4
  require_relative 'onc_certification_g10_test_kit/configuration_checker'
5
5
  require_relative 'onc_certification_g10_test_kit/version'
6
6
 
7
+ require_relative 'onc_certification_g10_test_kit/single_patient_api_group'
7
8
  require_relative 'onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group'
8
9
  require_relative 'onc_certification_g10_test_kit/smart_invalid_launch_group'
9
10
  require_relative 'onc_certification_g10_test_kit/smart_invalid_token_group'
@@ -37,17 +38,26 @@ module ONCCertificationG10TestKit
37
38
 
38
39
  validator do
39
40
  url ENV.fetch('G10_VALIDATOR_URL', 'http://validator_service:4567')
41
+
40
42
  exclude_message do |message|
43
+ us_core_message_filters = USCoreTestKit::USCoreV311::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS
41
44
  if message.type == 'info' ||
42
45
  (message.type == 'warning' && WARNING_INCLUSION_FILTERS.none? { |filter| filter.match? message.message }) ||
43
- USCoreTestKit::USCoreTestSuite::VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
46
+ us_core_message_filters.any? { |filter| filter.match? message.message } ||
47
+ (
48
+ message.type == 'error' && (
49
+ message.message.match?(/\A\S+: Unknown Code/) ||
50
+ message.message.match?(/\A\S+: None of the codings provided are in the value set/)
51
+ )
52
+ )
44
53
  true
45
54
  else
46
55
  false
47
56
  end
48
57
  end
58
+
49
59
  perform_additional_validation do |resource, profile_url|
50
- metadata = USCoreTestKit::USCoreTestSuite.metadata.find do |metadata_candidate|
60
+ metadata = USCoreTestKit::USCoreV311::USCoreTestSuite.metadata.find do |metadata_candidate|
51
61
  metadata_candidate.profile_url == profile_url
52
62
  end
53
63
 
@@ -84,8 +94,7 @@ module ONCCertificationG10TestKit
84
94
  Patient and Population Services criterion § 170.315(g)(10) in the 2015
85
95
  Edition Cures Update.
86
96
 
87
- This test kit is the successor to "Inferno Program Edition", and is
88
- currently in preview status. Please [create an
97
+ This test kit is the successor to "Inferno Program Edition". Please [create an
89
98
  issue](https://github.com/inferno-framework/g10-certification-test-kit/issues)
90
99
  if there are discrepencies between these tests and the "Inferno Program
91
100
  Edition v1.9" tests.
@@ -122,58 +131,7 @@ module ONCCertificationG10TestKit
122
131
 
123
132
  group from: 'g10_smart_ehr_practitioner_app'
124
133
 
125
- group do
126
- id :single_patient_api
127
- title 'Single Patient API'
128
- description %(
129
- For each of the relevant USCDI data elements provided in the
130
- CapabilityStatement, this test executes the [required supported
131
- searches](http://www.hl7.org/fhir/us/core/STU3.1.1/CapabilityStatement-us-core-server.html)
132
- as defined by the US Core Implementation Guide v3.1.1. The test begins
133
- by searching by one or more patients, with the expectation that the
134
- Bearer token provided to the test grants access to all USCDI resources.
135
- It uses results returned from that query to generate other queries and
136
- checks that the results are consistent with the provided search
137
- parameters. It then performs a read on each Resource returned and
138
- validates the response against the relevant
139
- [profile](http://www.hl7.org/fhir/us/core/STU3.1.1/profiles.html) as
140
- currently defined in the US Core Implementation Guide. All MUST SUPPORT
141
- elements must be seen before the test can pass, as well as Data Absent
142
- Reason to demonstrate that the server can properly handle missing data.
143
- Note that Encounter, Organization and Practitioner resources must be
144
- accessible as references in some US Core profiles to satisfy must
145
- support requirements, and those references will be validated to their US
146
- Core profile. These resources will not be tested for FHIR search
147
- support.
148
- )
149
- run_as_group
150
-
151
- input :url,
152
- title: 'FHIR Endpoint',
153
- description: 'URL of the FHIR endpoint used by SMART applications'
154
- input :smart_credentials,
155
- title: 'SMART App Launch Credentials',
156
- type: :oauth_credentials,
157
- locked: true
158
-
159
- fhir_client do
160
- url :url
161
- oauth_credentials :smart_credentials
162
- end
163
-
164
- USCoreTestKit::USCoreTestSuite.groups.each do |group|
165
- test_group = group.ancestors[1]
166
- id = test_group.id
167
-
168
- group_config = {}
169
- if test_group.respond_to?(:metadata) && test_group.metadata.delayed?
170
- test_group.children.reject! { |child| child.include? USCoreTestKit::SearchTest }
171
- group_config[:options] = { read_all_resources: true }
172
- end
173
-
174
- group(from: id, exclude_optional: true, config: group_config)
175
- end
176
- end
134
+ group from: 'g10_single_patient_api'
177
135
 
178
136
  group from: 'multi_patient_api'
179
137
 
@@ -198,28 +156,3 @@ module ONCCertificationG10TestKit
198
156
  end
199
157
  end
200
158
  end
201
-
202
- # TODO: address this input issue in core
203
- Inferno::Repositories::Tests.new
204
- .find('g10_certification-g10_smart_limited_app-smart_standalone_launch-standalone_auth_tls')
205
- .config(
206
- inputs: {
207
- url: {
208
- title: 'Standalone Authorization URL',
209
- description: '',
210
- default: ''
211
- }
212
- }
213
- )
214
-
215
- Inferno::Repositories::Tests.new
216
- .find('g10_certification-g10_smart_limited_app-smart_standalone_launch-standalone_token_tls')
217
- .config(
218
- inputs: {
219
- url: {
220
- title: 'Standalone Token URL',
221
- description: '',
222
- default: ''
223
- }
224
- }
225
- )
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: 2.0.0
4
+ version: 2.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-06 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bloomer
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.3
47
+ version: 0.2.0
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.1.3
54
+ version: 0.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json-jwt
57
57
  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.1
117
+ version: 0.1.2
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.1
124
+ version: 0.1.2
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.0
131
+ version: 0.1.1
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.0
138
+ version: 0.1.1
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.1.1
145
+ version: 0.2.0
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.1.1
152
+ version: 0.2.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: database_cleaner-sequel
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -263,11 +263,13 @@ files:
263
263
  - lib/onc_certification_g10_test_kit/igs/StructureDefinition-resprate.json
264
264
  - lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb
265
265
  - lib/onc_certification_g10_test_kit/multi_patient_api.rb
266
+ - lib/onc_certification_g10_test_kit/onc_program_procedure.yml
266
267
  - lib/onc_certification_g10_test_kit/patient_context_test.rb
267
268
  - lib/onc_certification_g10_test_kit/profile_guesser.rb
268
269
  - lib/onc_certification_g10_test_kit/resource_access_test.rb
269
270
  - lib/onc_certification_g10_test_kit/restricted_access_test.rb
270
271
  - lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb
272
+ - lib/onc_certification_g10_test_kit/single_patient_api_group.rb
271
273
  - lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb
272
274
  - lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb
273
275
  - lib/onc_certification_g10_test_kit/smart_invalid_launch_group.rb
@@ -276,6 +278,8 @@ files:
276
278
  - lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb
277
279
  - lib/onc_certification_g10_test_kit/smart_scopes_test.rb
278
280
  - lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb
281
+ - lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb
282
+ - lib/onc_certification_g10_test_kit/tasks/test_procedure.rb
279
283
  - lib/onc_certification_g10_test_kit/terminology_binding_validator.rb
280
284
  - lib/onc_certification_g10_test_kit/token_revocation_group.rb
281
285
  - lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
@@ -300,9 +304,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
300
304
  version: 2.7.0
301
305
  required_rubygems_version: !ruby/object:Gem::Requirement
302
306
  requirements:
303
- - - ">="
307
+ - - ">"
304
308
  - !ruby/object:Gem::Version
305
- version: '0'
309
+ version: 1.3.1
306
310
  requirements: []
307
311
  rubygems_version: 3.1.6
308
312
  signing_key: