onc_certification_g10_test_kit 7.2.4 → 7.2.6
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 +4 -4
- data/lib/onc_certification_g10_test_kit/configuration_checker.rb +1 -1
- data/lib/onc_certification_g10_test_kit/g10_certification_suite.rb +3 -1
- data/lib/onc_certification_g10_test_kit/requirements/(g)(10)-test-procedure_requirements.xlsx +0 -0
- data/lib/onc_certification_g10_test_kit/requirements/generated/g10_certification_requirements_coverage.csv +300 -133
- data/lib/onc_certification_g10_test_kit/requirements/onc_certification_g10_test_kit_requirements.csv +328 -161
- data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +20 -18
- data/lib/onc_certification_g10_test_kit/tasks/generate_requirements_spreadsheet.rb +82 -0
- data/lib/onc_certification_g10_test_kit/version.rb +2 -2
- metadata +21 -15
@@ -173,33 +173,35 @@ module ONCCertificationG10TestKit
|
|
173
173
|
end
|
174
174
|
|
175
175
|
def requested_scope_test(scopes)
|
176
|
-
|
176
|
+
skip do
|
177
|
+
correct_scope_type_found = false
|
177
178
|
|
178
|
-
|
179
|
-
|
179
|
+
scopes.each do |full_scope|
|
180
|
+
scope = strip_experimental_scope_syntax(full_scope)
|
180
181
|
|
181
|
-
|
182
|
-
|
182
|
+
scope_pieces = scope.split('/')
|
183
|
+
assert scope_pieces.length == 2, bad_format_message(scope)
|
183
184
|
|
184
|
-
|
185
|
+
scope_type, resource_scope = scope_pieces
|
185
186
|
|
186
|
-
|
187
|
-
|
187
|
+
resource_scope_parts = resource_scope.split('.')
|
188
|
+
assert resource_scope_parts.length == 2, bad_format_message(scope)
|
188
189
|
|
189
|
-
|
190
|
-
|
190
|
+
resource_type, access_level = resource_scope_parts
|
191
|
+
assert access_level =~ access_level_regex, bad_format_message(scope)
|
191
192
|
|
192
|
-
|
193
|
+
assert_correct_scope_type(scope, scope_type, resource_type, 'Requested')
|
193
194
|
|
194
|
-
|
195
|
-
|
195
|
+
assert valid_resource_types.include?(resource_type),
|
196
|
+
"'#{resource_type}' must be either a permitted resource type or '*'"
|
196
197
|
|
197
|
-
|
198
|
-
|
198
|
+
correct_scope_type_found = true if scope_type == required_scope_type
|
199
|
+
end
|
199
200
|
|
200
|
-
|
201
|
-
|
202
|
-
|
201
|
+
assert correct_scope_type_found,
|
202
|
+
"#{required_scope_type.capitalize}-level scope in the format: " \
|
203
|
+
"`#{required_scope_type}/[ <ResourceType> | * ].[ #{read_format} ]` was not requested."
|
204
|
+
end
|
203
205
|
end
|
204
206
|
|
205
207
|
def received_scope_test(scopes)
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'rubyXL'
|
2
|
+
require 'rubyXL/convenience_methods'
|
3
|
+
require_relative 'test_procedure'
|
4
|
+
|
5
|
+
module ONCCertificationG10TestKit
|
6
|
+
module Tasks
|
7
|
+
class GenerateRequirementsSpreadsheet
|
8
|
+
attr_accessor :row
|
9
|
+
|
10
|
+
TEST_PROCEDURE_URL = 'https://www.healthit.gov/test-method/standardized-api-patient-and-population-services#test_procedure'.freeze
|
11
|
+
FILE_NAME = File.join('lib', 'onc_certification_g10_test_kit', 'requirements',
|
12
|
+
'(g)(10)-test-procedure_requirements.xlsx')
|
13
|
+
|
14
|
+
def inferno_to_procedure_map
|
15
|
+
@inferno_to_procedure_map ||= Hash.new { |h, k| h[k] = [] }
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_procedure
|
19
|
+
@test_procedure ||=
|
20
|
+
if File.file? File.join('lib', 'onc_certification_g10_test_kit', 'onc_program_procedure.yml')
|
21
|
+
TestProcedure.new(
|
22
|
+
YAML.load_file(File.join('lib', 'onc_certification_g10_test_kit',
|
23
|
+
'onc_program_procedure.yml')).deep_symbolize_keys
|
24
|
+
)
|
25
|
+
else
|
26
|
+
TestProcedure.new
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_suite
|
31
|
+
ONCCertificationG10TestKit::G10CertificationSuite
|
32
|
+
end
|
33
|
+
|
34
|
+
def workbook
|
35
|
+
@workbook ||= RubyXL::Parser.parse(FILE_NAME)
|
36
|
+
end
|
37
|
+
|
38
|
+
def next_row
|
39
|
+
self.row += 1
|
40
|
+
end
|
41
|
+
|
42
|
+
def run
|
43
|
+
clear_requirements_worksheet
|
44
|
+
add_test_procedure_requirements
|
45
|
+
|
46
|
+
Inferno.logger.info "Writing to #{FILE_NAME}"
|
47
|
+
workbook.write(FILE_NAME)
|
48
|
+
end
|
49
|
+
|
50
|
+
def clear_requirements_worksheet
|
51
|
+
requirements_worksheet = workbook['Requirements']
|
52
|
+
requirements_worksheet.sheet_data[1]
|
53
|
+
requirements_worksheet.delete_row(1) until requirements_worksheet.cell_at('A2').nil?
|
54
|
+
end
|
55
|
+
|
56
|
+
def add_test_procedure_requirements # rubocop:disable Metrics/CyclomaticComplexity
|
57
|
+
requirements_worksheet = workbook['Requirements']
|
58
|
+
self.row = 0
|
59
|
+
|
60
|
+
test_procedure.sections.each do |section|
|
61
|
+
section.steps.group_by(&:group).each_value do |steps|
|
62
|
+
steps.each do |step|
|
63
|
+
next_row
|
64
|
+
|
65
|
+
lines = step.s_u_t&.lines&.count || 0
|
66
|
+
requirements_worksheet.change_row_height(row, (lines * 16) + 10)
|
67
|
+
requirements_worksheet.change_row_vertical_alignment(row, 'top')
|
68
|
+
|
69
|
+
requirements_worksheet.add_cell(row, 0, "#{step.id.upcase} ")
|
70
|
+
requirements_worksheet.add_cell(row, 1, TEST_PROCEDURE_URL)
|
71
|
+
requirements_worksheet.add_cell(row, 2, step.s_u_t).change_text_wrap(true)
|
72
|
+
requirements_worksheet.add_cell(row, 3, 'SHALL')
|
73
|
+
requirements_worksheet.add_cell(row, 4, 'Server')
|
74
|
+
requirements_worksheet.add_cell(row, 5, '')
|
75
|
+
requirements_worksheet.add_cell(row, 6, 'FALSE')
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
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: 7.2.
|
4
|
+
version: 7.2.6
|
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: 2025-
|
11
|
+
date: 2025-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bloomer
|
@@ -44,14 +44,20 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0
|
47
|
+
version: '1.0'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 1.0.2
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
55
|
- - "~>"
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0
|
57
|
+
version: '1.0'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 1.0.2
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: json-jwt
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,46 +120,45 @@ dependencies:
|
|
114
120
|
requirements:
|
115
121
|
- - '='
|
116
122
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
123
|
+
version: 1.0.0
|
118
124
|
type: :runtime
|
119
125
|
prerelease: false
|
120
126
|
version_requirements: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
128
|
- - '='
|
123
129
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
130
|
+
version: 1.0.0
|
125
131
|
- !ruby/object:Gem::Dependency
|
126
132
|
name: tls_test_kit
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
135
|
- - '='
|
130
136
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
137
|
+
version: 1.0.0
|
132
138
|
type: :runtime
|
133
139
|
prerelease: false
|
134
140
|
version_requirements: !ruby/object:Gem::Requirement
|
135
141
|
requirements:
|
136
142
|
- - '='
|
137
143
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
144
|
+
version: 1.0.0
|
139
145
|
- !ruby/object:Gem::Dependency
|
140
146
|
name: us_core_test_kit
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
142
148
|
requirements:
|
143
149
|
- - '='
|
144
150
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
151
|
+
version: 1.0.0
|
146
152
|
type: :runtime
|
147
153
|
prerelease: false
|
148
154
|
version_requirements: !ruby/object:Gem::Requirement
|
149
155
|
requirements:
|
150
156
|
- - '='
|
151
157
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
158
|
+
version: 1.0.0
|
153
159
|
description: ONC Certification (g)(10) Standardized API for Patient and Population
|
154
160
|
Services Test Kit
|
155
|
-
email:
|
156
|
-
- inferno@groups.mitre.org
|
161
|
+
email:
|
157
162
|
executables: []
|
158
163
|
extensions: []
|
159
164
|
extra_rdoc_files: []
|
@@ -270,6 +275,7 @@ files:
|
|
270
275
|
- lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb
|
271
276
|
- lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb
|
272
277
|
- lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb
|
278
|
+
- lib/onc_certification_g10_test_kit/tasks/generate_requirements_spreadsheet.rb
|
273
279
|
- lib/onc_certification_g10_test_kit/tasks/test_procedure.rb
|
274
280
|
- lib/onc_certification_g10_test_kit/terminology_binding_validator.rb
|
275
281
|
- lib/onc_certification_g10_test_kit/test_procedure_requirements_manager.rb
|
@@ -289,7 +295,7 @@ metadata:
|
|
289
295
|
inferno_test_kit: 'true'
|
290
296
|
homepage_uri: https://github.com/onc-healthit/onc-certification-g10-test-kit
|
291
297
|
source_code_uri: https://github.com/onc-healthit/onc-certification-g10-test-kit
|
292
|
-
post_install_message:
|
298
|
+
post_install_message:
|
293
299
|
rdoc_options: []
|
294
300
|
require_paths:
|
295
301
|
- lib
|
@@ -305,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
311
|
version: '0'
|
306
312
|
requirements: []
|
307
313
|
rubygems_version: 3.5.22
|
308
|
-
signing_key:
|
314
|
+
signing_key:
|
309
315
|
specification_version: 4
|
310
316
|
summary: ONC Certification (g)(10) Test Kit
|
311
317
|
test_files: []
|