onc_certification_g10_test_kit 7.2.5 → 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/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 +7 -6
@@ -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
|
@@ -158,7 +158,7 @@ dependencies:
|
|
158
158
|
version: 1.0.0
|
159
159
|
description: ONC Certification (g)(10) Standardized API for Patient and Population
|
160
160
|
Services Test Kit
|
161
|
-
email:
|
161
|
+
email:
|
162
162
|
executables: []
|
163
163
|
extensions: []
|
164
164
|
extra_rdoc_files: []
|
@@ -275,6 +275,7 @@ files:
|
|
275
275
|
- lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb
|
276
276
|
- lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb
|
277
277
|
- lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb
|
278
|
+
- lib/onc_certification_g10_test_kit/tasks/generate_requirements_spreadsheet.rb
|
278
279
|
- lib/onc_certification_g10_test_kit/tasks/test_procedure.rb
|
279
280
|
- lib/onc_certification_g10_test_kit/terminology_binding_validator.rb
|
280
281
|
- lib/onc_certification_g10_test_kit/test_procedure_requirements_manager.rb
|
@@ -294,7 +295,7 @@ metadata:
|
|
294
295
|
inferno_test_kit: 'true'
|
295
296
|
homepage_uri: https://github.com/onc-healthit/onc-certification-g10-test-kit
|
296
297
|
source_code_uri: https://github.com/onc-healthit/onc-certification-g10-test-kit
|
297
|
-
post_install_message:
|
298
|
+
post_install_message:
|
298
299
|
rdoc_options: []
|
299
300
|
require_paths:
|
300
301
|
- lib
|
@@ -310,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
310
311
|
version: '0'
|
311
312
|
requirements: []
|
312
313
|
rubygems_version: 3.5.22
|
313
|
-
signing_key:
|
314
|
+
signing_key:
|
314
315
|
specification_version: 4
|
315
316
|
summary: ONC Certification (g)(10) Test Kit
|
316
317
|
test_files: []
|