davinci_pas_test_kit 0.12.0 → 0.12.2
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/davinci_pas_test_kit/client_suite.rb +24 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_test.rb +32 -1
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb +30 -4
- data/lib/davinci_pas_test_kit/{generated/v2.0.1/client_tests/client_pended_pas_inquiry_request_bundle_validation_test.rb → custom_groups/v2.0.1/client_tests/pas_client_inquire_request_bundle_validation_test.rb} +26 -20
- data/lib/davinci_pas_test_kit/{generated/v2.0.1/client_tests/client_denial_pas_response_bundle_validation_test.rb → custom_groups/v2.0.1/client_tests/pas_client_inquire_response_bundle_validation_test.rb} +34 -21
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_test.rb +130 -5
- data/lib/davinci_pas_test_kit/{generated/v2.0.1/client_tests/client_pas_request_bundle_validation_test.rb → custom_groups/v2.0.1/client_tests/pas_client_request_bundle_validation_test.rb} +28 -20
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/{pas_client_approval_submit_response_attest.rb → pas_client_response_attest.rb} +26 -9
- data/lib/davinci_pas_test_kit/{generated/v2.0.1/client_tests/client_pended_pas_response_bundle_validation_test.rb → custom_groups/v2.0.1/client_tests/pas_client_response_bundle_validation_test.rb} +44 -20
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_submit_must_support_test.rb +3 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_create_test.rb +52 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_pas_conformance_test.rb +49 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/pas_submission_error_test.rb +1 -0
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_approval_group.rb +21 -9
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_authentication_group.rb +2 -2
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_denial_group.rb +21 -22
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_pended_group.rb +97 -31
- data/lib/davinci_pas_test_kit/docs/client_suite_description_v201.md +213 -72
- data/lib/davinci_pas_test_kit/endpoints/claim_endpoint.rb +85 -134
- data/lib/davinci_pas_test_kit/endpoints/subscription_create_endpoint.rb +96 -0
- data/lib/davinci_pas_test_kit/endpoints/subscription_status_endpoint.rb +90 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claim/claim_operation_test.rb +1 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/server_inquire_response_claiminquiryresponse_must_support_test.rb +1 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/server_submit_response_claimresponse_must_support_test.rb +1 -0
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/metadata.yml +0 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test.rb +3 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_response_bundle/server_pas_inquiry_response_bundle_validation_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/metadata.yml +0 -2
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_pas_request_bundle_validation_test.rb +3 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/metadata.yml +0 -4
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_response_bundle/server_pas_response_bundle_validation_test.rb +2 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_denial_use_case_group.rb +1 -1
- data/lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_pended_use_case_group.rb +6 -5
- data/lib/davinci_pas_test_kit/generated/v2.0.1/server_suite.rb +1 -0
- data/lib/davinci_pas_test_kit/generator/group_generator.rb +9 -8
- data/lib/davinci_pas_test_kit/generator/group_metadata_extractor.rb +7 -3
- data/lib/davinci_pas_test_kit/generator/templates/suite.rb.erb +1 -0
- data/lib/davinci_pas_test_kit/generator/validation_test_generator.rb +19 -56
- data/lib/davinci_pas_test_kit/generator/value_extractor.rb +4 -1
- data/lib/davinci_pas_test_kit/generator.rb +1 -1
- data/lib/davinci_pas_test_kit/jobs/send_pas_subscription_notification.rb +136 -0
- data/lib/davinci_pas_test_kit/jobs/send_subscription_handshake.rb +139 -0
- data/lib/davinci_pas_test_kit/pas_bundle_validation.rb +12 -11
- data/lib/davinci_pas_test_kit/requirements/davinci-pas-test-kit_out_of_scope_requirements.csv +11 -0
- data/lib/davinci_pas_test_kit/requirements/davinci-pas-test-kit_requirements.csv +214 -0
- data/lib/davinci_pas_test_kit/requirements/generated/davinci-pas-test-kit_requirements_coverage.csv +214 -0
- data/lib/davinci_pas_test_kit/response_generator.rb +397 -0
- data/lib/davinci_pas_test_kit/tags.rb +9 -0
- data/lib/davinci_pas_test_kit/urls.rb +8 -0
- data/lib/davinci_pas_test_kit/user_input_response.rb +11 -8
- data/lib/davinci_pas_test_kit/validation_test.rb +0 -1
- data/lib/davinci_pas_test_kit/version.rb +2 -2
- data/lib/davinci_pas_test_kit.rb +1 -0
- data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +284 -0
- data/lib/requirements_config.yaml +17 -0
- metadata +36 -14
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_response_attest.rb +0 -38
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_response_attest.rb +0 -39
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_test.rb +0 -35
- data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_response_attest.rb +0 -39
- data/lib/davinci_pas_test_kit/generator/templates/validation_client.rb.erb +0 -50
@@ -0,0 +1,284 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'csv'
|
4
|
+
require 'yaml'
|
5
|
+
require_relative '../ext/inferno_core/runnable'
|
6
|
+
|
7
|
+
module InfernoRequirementsTools
|
8
|
+
module Tasks
|
9
|
+
# This class manages the mapping of test kit tests to requirements that they verify
|
10
|
+
# and creates a CSV file with the tests that cover each requirement.
|
11
|
+
# It expects a CSV file in the repo at `lib/[test kit id]/requirements/[test kit id]_requirements.csv`
|
12
|
+
# that serves as the source of the requirement set for the test kit. The requirements in
|
13
|
+
# this files are identified by a requirement set and an id and tests, groups, and suites
|
14
|
+
# within in the test kit can claim that they verify a requirement by including a reference
|
15
|
+
# to that requirementin the form <requirement set>@<id> in their `verifies_requirements` field.
|
16
|
+
# Requirements that are out of scope can be listed in a companion file
|
17
|
+
# `lib/[test kit id]/requirements/[test kit id]_out_of_scope_requirements.csv`.
|
18
|
+
#
|
19
|
+
# The `run` method generates a CSV file at
|
20
|
+
# `lib/[test kit id]/requirements/generated/[test kit id]_requirements_coverage.csv``.
|
21
|
+
# This file will be identical to the input spreadsheet, plus an additional column which holds a comma separated
|
22
|
+
# list of inferno test IDs that test each requirement. These test IDs are Inferno short form IDs that represent the
|
23
|
+
# position of the test within its group and suite. For example, the fifth test in the second group will have an ID
|
24
|
+
# of 2.05. This ID is also shown in the Inferno web UI.
|
25
|
+
#
|
26
|
+
# The `run_check` method will check whether the previously generated file is up-to-date.
|
27
|
+
class RequirementsCoverage
|
28
|
+
VERSION = '0.2.0' # update when making meaningful changes to this method for tracking used versions
|
29
|
+
CONFIG = YAML.load_file(File.join('lib', 'requirements_config.yaml'))
|
30
|
+
|
31
|
+
TEST_KIT_ID = CONFIG['test_kit_id']
|
32
|
+
TEST_SUITES = CONFIG['suites'].map do |test_suite|
|
33
|
+
Object.const_get(test_suite['class_name'])
|
34
|
+
end
|
35
|
+
|
36
|
+
SUITE_ID_TO_ACTOR_MAP = CONFIG['suites'].each_with_object({}) do |test_suite, hash|
|
37
|
+
hash[test_suite['id']] = test_suite['suite_actor']
|
38
|
+
end
|
39
|
+
|
40
|
+
# Derivative constants
|
41
|
+
TEST_KIT_CODE_FOLDER = TEST_KIT_ID
|
42
|
+
DASHERIZED_TEST_KIT_ID = TEST_KIT_ID.gsub('_', '-')
|
43
|
+
INPUT_HEADERS = [
|
44
|
+
'Req Set',
|
45
|
+
'ID',
|
46
|
+
'URL',
|
47
|
+
'Requirement',
|
48
|
+
'Conformance',
|
49
|
+
'Actor',
|
50
|
+
'Sub-Requirement(s)',
|
51
|
+
'Conditionality'
|
52
|
+
].freeze
|
53
|
+
SHORT_ID_HEADER = 'Short ID(s)'
|
54
|
+
FULL_ID_HEADER = 'Full ID(s)'
|
55
|
+
INPUT_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_requirements.csv".freeze
|
56
|
+
INPUT_FILE = File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', INPUT_FILE_NAME).freeze
|
57
|
+
NOT_TESTED_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_out_of_scope_requirements.csv".freeze
|
58
|
+
NOT_TESTED_FILE = File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', NOT_TESTED_FILE_NAME).freeze
|
59
|
+
OUTPUT_HEADERS = INPUT_HEADERS + TEST_SUITES.flat_map do |suite|
|
60
|
+
["#{suite.title} #{SHORT_ID_HEADER}", "#{suite.title} #{FULL_ID_HEADER}"]
|
61
|
+
end
|
62
|
+
OUTPUT_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_requirements_coverage.csv".freeze
|
63
|
+
OUTPUT_FILE_DIRECTORY = File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', 'generated')
|
64
|
+
OUTPUT_FILE = File.join(OUTPUT_FILE_DIRECTORY, OUTPUT_FILE_NAME).freeze
|
65
|
+
|
66
|
+
def input_rows
|
67
|
+
@input_rows ||=
|
68
|
+
CSV.parse(File.open(INPUT_FILE, 'r:bom|utf-8'), headers: true).map do |row|
|
69
|
+
row.to_h.slice(*INPUT_HEADERS)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def not_tested_requirements_map
|
74
|
+
@not_tested_requirements_map ||= load_not_tested_requirements
|
75
|
+
end
|
76
|
+
|
77
|
+
def load_not_tested_requirements
|
78
|
+
return {} unless File.exist?(NOT_TESTED_FILE)
|
79
|
+
|
80
|
+
not_tested_requirements = {}
|
81
|
+
CSV.parse(File.open(NOT_TESTED_FILE, 'r:bom|utf-8'), headers: true).each do |row|
|
82
|
+
row_hash = row.to_h
|
83
|
+
not_tested_requirements["#{row_hash['Req Set']}@#{row_hash['ID']}"] = row_hash
|
84
|
+
end
|
85
|
+
|
86
|
+
not_tested_requirements
|
87
|
+
end
|
88
|
+
|
89
|
+
# Of the form:
|
90
|
+
# {
|
91
|
+
# 'req-id-1': [
|
92
|
+
# { short_id: 'short-id-1', full_id: 'long-id-1', suite_id: 'suite-id-1' },
|
93
|
+
# { short_id: 'short-id-2', full_id: 'long-id-2', suite_id: 'suite-id-2' }
|
94
|
+
# ],
|
95
|
+
# 'req-id-2': [{ short_id: 'short-id-3', full_id: 'long-id-3', suite_id: 'suite-id-3' }],
|
96
|
+
# ...
|
97
|
+
# }
|
98
|
+
def inferno_requirements_map
|
99
|
+
@inferno_requirements_map ||= TEST_SUITES.each_with_object({}) do |suite, requirements_map|
|
100
|
+
serialize_requirements(suite, 'suite', suite.id, requirements_map)
|
101
|
+
suite.groups.each do |group|
|
102
|
+
map_group_requirements(group, suite.id, requirements_map)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def new_csv
|
108
|
+
@new_csv ||=
|
109
|
+
CSV.generate(+"\xEF\xBB\xBF") do |csv|
|
110
|
+
csv << OUTPUT_HEADERS
|
111
|
+
input_rows.each do |row| # NOTE: use row order from source file
|
112
|
+
next if row['Conformance'] == 'DEPRECATED' # filter out deprecated rows
|
113
|
+
|
114
|
+
TEST_SUITES.each do |suite|
|
115
|
+
suite_actor = SUITE_ID_TO_ACTOR_MAP[suite.id]
|
116
|
+
if row['Actor']&.include?(suite_actor)
|
117
|
+
add_suite_tests_for_row(row, suite)
|
118
|
+
else
|
119
|
+
row["#{suite.title} #{SHORT_ID_HEADER}"] = 'NA'
|
120
|
+
row["#{suite.title} #{FULL_ID_HEADER}"] = 'NA'
|
121
|
+
end
|
122
|
+
end
|
123
|
+
csv << row.values
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def add_suite_tests_for_row(row, suite)
|
129
|
+
set_and_req_id = "#{row['Req Set']}@#{row['ID']}"
|
130
|
+
items = get_items_for_requirement(set_and_req_id, suite)
|
131
|
+
short_ids = items[0]
|
132
|
+
full_ids = items[1]
|
133
|
+
if short_ids.blank? && not_tested_requirements_map.key?(set_and_req_id)
|
134
|
+
row["#{suite.title} #{SHORT_ID_HEADER}"] = 'Not Tested'
|
135
|
+
row["#{suite.title} #{FULL_ID_HEADER}"] = 'Not Tested'
|
136
|
+
else
|
137
|
+
row["#{suite.title} #{SHORT_ID_HEADER}"] = short_ids&.join(', ')
|
138
|
+
row["#{suite.title} #{FULL_ID_HEADER}"] = full_ids&.join(', ')
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def get_items_for_requirement(set_and_req_id, suite)
|
143
|
+
suite_requirement_items = inferno_requirements_map[set_and_req_id]&.filter do |item|
|
144
|
+
item[:suite_id] == suite.id
|
145
|
+
end
|
146
|
+
[
|
147
|
+
suite_requirement_items&.map { |item| item[:short_id] },
|
148
|
+
suite_requirement_items&.map { |item| item[:full_id] }
|
149
|
+
]
|
150
|
+
end
|
151
|
+
|
152
|
+
def input_requirement_ids
|
153
|
+
@input_requirement_ids ||= input_rows.map { |row| "#{row['Req Set']}@#{row['ID']}" }
|
154
|
+
end
|
155
|
+
|
156
|
+
# The requirements present in Inferno that aren't in the input spreadsheet
|
157
|
+
def unmatched_requirements_map
|
158
|
+
@unmatched_requirements_map ||= inferno_requirements_map.except(*input_requirement_ids)
|
159
|
+
end
|
160
|
+
|
161
|
+
def old_csv
|
162
|
+
@old_csv ||= File.read(OUTPUT_FILE)
|
163
|
+
end
|
164
|
+
|
165
|
+
def run
|
166
|
+
unless File.exist?(INPUT_FILE)
|
167
|
+
puts "Could not find input file: #{INPUT_FILE}. Aborting requirements coverage generation..."
|
168
|
+
exit(1)
|
169
|
+
end
|
170
|
+
|
171
|
+
if unmatched_requirements_map.any?
|
172
|
+
puts "WARNING: The following requirements indicated in the test kit are not present in #{INPUT_FILE_NAME}"
|
173
|
+
output_requirements_map_table(unmatched_requirements_map)
|
174
|
+
end
|
175
|
+
|
176
|
+
if File.exist?(OUTPUT_FILE)
|
177
|
+
if old_csv == new_csv
|
178
|
+
puts "'#{OUTPUT_FILE_NAME}' file is up to date."
|
179
|
+
return
|
180
|
+
else
|
181
|
+
puts 'Requirements coverage has changed.'
|
182
|
+
end
|
183
|
+
else
|
184
|
+
puts "No existing #{OUTPUT_FILE_NAME}."
|
185
|
+
end
|
186
|
+
|
187
|
+
puts "Writing to file #{OUTPUT_FILE}..."
|
188
|
+
FileUtils.mkdir_p(OUTPUT_FILE_DIRECTORY)
|
189
|
+
File.write(OUTPUT_FILE, new_csv)
|
190
|
+
puts 'Done.'
|
191
|
+
end
|
192
|
+
|
193
|
+
def run_check
|
194
|
+
unless File.exist?(INPUT_FILE)
|
195
|
+
puts "Could not find input file: #{INPUT_FILE}. Aborting requirements coverage check..."
|
196
|
+
exit(1)
|
197
|
+
end
|
198
|
+
|
199
|
+
if unmatched_requirements_map.any?
|
200
|
+
puts "The following requirements indicated in the test kit are not present in #{INPUT_FILE_NAME}"
|
201
|
+
output_requirements_map_table(unmatched_requirements_map)
|
202
|
+
end
|
203
|
+
|
204
|
+
if File.exist?(OUTPUT_FILE)
|
205
|
+
if old_csv == new_csv
|
206
|
+
puts "'#{OUTPUT_FILE_NAME}' file is up to date."
|
207
|
+
return unless unmatched_requirements_map.any?
|
208
|
+
else
|
209
|
+
puts <<~MESSAGE
|
210
|
+
#{OUTPUT_FILE_NAME} file is out of date.
|
211
|
+
To regenerate the file, run:
|
212
|
+
|
213
|
+
bundle exec rake requirements:generate_coverage
|
214
|
+
|
215
|
+
MESSAGE
|
216
|
+
end
|
217
|
+
else
|
218
|
+
puts <<~MESSAGE
|
219
|
+
No existing #{OUTPUT_FILE_NAME} file.
|
220
|
+
To generate the file, run:
|
221
|
+
|
222
|
+
bundle exec rake requirements:generate_coverage
|
223
|
+
|
224
|
+
MESSAGE
|
225
|
+
end
|
226
|
+
|
227
|
+
puts 'Check failed.'
|
228
|
+
exit(1)
|
229
|
+
end
|
230
|
+
|
231
|
+
def map_group_requirements(group, suite_id, requirements_map)
|
232
|
+
serialize_requirements(group, group.short_id, suite_id, requirements_map)
|
233
|
+
group.tests&.each { |test| serialize_requirements(test, test.short_id, suite_id, requirements_map) }
|
234
|
+
group.groups&.each { |subgroup| map_group_requirements(subgroup, suite_id, requirements_map) }
|
235
|
+
end
|
236
|
+
|
237
|
+
def serialize_requirements(runnable, short_id, suite_id, requirements_map)
|
238
|
+
runnable.verifies_requirements&.each do |requirement_id|
|
239
|
+
requirement_id_string = requirement_id.to_s
|
240
|
+
|
241
|
+
requirements_map[requirement_id_string] ||= []
|
242
|
+
requirements_map[requirement_id_string] << { short_id:, full_id: runnable.id, suite_id: }
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
# Output the requirements in the map like so:
|
247
|
+
#
|
248
|
+
# requirement_id | short_id | full_id
|
249
|
+
# ---------------+------------+----------
|
250
|
+
# req-id-1 | short-id-1 | full-id-1
|
251
|
+
# req-id-2 | short-id-2 | full-id-2
|
252
|
+
#
|
253
|
+
def output_requirements_map_table(requirements_map)
|
254
|
+
headers = %w[requirement_id short_id full_id]
|
255
|
+
col_widths = headers.map(&:length)
|
256
|
+
col_widths[0] = [col_widths[0], requirements_map.keys.map(&:length).max].max
|
257
|
+
col_widths[1] = ([col_widths[1]] + requirements_map.values.flatten.map { |item| item[:short_id].length }).max
|
258
|
+
col_widths[2] = ([col_widths[2]] + requirements_map.values.flatten.map { |item| item[:full_id].length }).max
|
259
|
+
col_widths.map { |width| width + 3 }
|
260
|
+
|
261
|
+
puts [
|
262
|
+
headers[0].ljust(col_widths[0]),
|
263
|
+
headers[1].ljust(col_widths[1]),
|
264
|
+
headers[2].ljust(col_widths[2])
|
265
|
+
].join(' | ')
|
266
|
+
puts col_widths.map { |width| '-' * width }.join('-+-')
|
267
|
+
output_requirements_map_table_contents(requirements_map, col_widths)
|
268
|
+
puts
|
269
|
+
end
|
270
|
+
|
271
|
+
def output_requirements_map_table_contents(requirements_map, col_widths)
|
272
|
+
requirements_map.each do |requirement_id, runnables|
|
273
|
+
runnables.each do |runnable|
|
274
|
+
puts [
|
275
|
+
requirement_id.ljust(col_widths[0]),
|
276
|
+
runnable[:short_id].ljust(col_widths[1]),
|
277
|
+
runnable[:full_id].ljust(col_widths[2])
|
278
|
+
].join(' | ')
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
test_kit_id: davinci_pas_test_kit
|
2
|
+
|
3
|
+
suites:
|
4
|
+
- id: davinci_pas_client_suite_v201
|
5
|
+
class_name: DaVinciPASTestKit::ClientSuite
|
6
|
+
suite_actor: Client
|
7
|
+
- id: davinci_pas_server_suite_v201
|
8
|
+
class_name: DaVinciPASTestKit::DaVinciPASV201::ServerSuite
|
9
|
+
suite_actor: Server
|
10
|
+
|
11
|
+
requirement_sets:
|
12
|
+
- id: hl7.fhir.us.davinci-pas_2.0.1
|
13
|
+
folder: Prior Auth Support (PAS)
|
14
|
+
requirements: All
|
15
|
+
actor_map:
|
16
|
+
- {spec: Client, test_kit: Client}
|
17
|
+
- {spec: Server, test_kit: Server}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: davinci_pas_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inferno Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.6.
|
19
|
+
version: 0.6.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.6.
|
26
|
+
version: 0.6.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: subscriptions_test_kit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.11.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.11.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: database_cleaner-sequel
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,16 +107,18 @@ files:
|
|
93
107
|
- lib/davinci_pas_test_kit.rb
|
94
108
|
- lib/davinci_pas_test_kit/client_suite.rb
|
95
109
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/claim_response_decision/pas_claim_response_decision_test.rb
|
96
|
-
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_response_attest.rb
|
97
110
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_approval_submit_test.rb
|
98
|
-
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_response_attest.rb
|
99
111
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_denial_submit_test.rb
|
100
112
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_must_support_test.rb
|
101
|
-
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/
|
102
|
-
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/
|
103
|
-
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_response_attest.rb
|
113
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_request_bundle_validation_test.rb
|
114
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_response_bundle_validation_test.rb
|
104
115
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_submit_test.rb
|
116
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_request_bundle_validation_test.rb
|
117
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_response_attest.rb
|
118
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_response_bundle_validation_test.rb
|
105
119
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_submit_must_support_test.rb
|
120
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_create_test.rb
|
121
|
+
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_subscription_pas_conformance_test.rb
|
106
122
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_request_test.rb
|
107
123
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_token_validation_test.rb
|
108
124
|
- lib/davinci_pas_test_kit/custom_groups/v2.0.1/error_tests/nonconformant_pas_bundle.json
|
@@ -124,6 +140,8 @@ files:
|
|
124
140
|
- lib/davinci_pas_test_kit/docs/client_suite_description_v201.md
|
125
141
|
- lib/davinci_pas_test_kit/docs/server_suite_description_v201.md
|
126
142
|
- lib/davinci_pas_test_kit/endpoints/claim_endpoint.rb
|
143
|
+
- lib/davinci_pas_test_kit/endpoints/subscription_create_endpoint.rb
|
144
|
+
- lib/davinci_pas_test_kit/endpoints/subscription_status_endpoint.rb
|
127
145
|
- lib/davinci_pas_test_kit/endpoints/token_endpoint.rb
|
128
146
|
- lib/davinci_pas_test_kit/fhir_resource_navigation.rb
|
129
147
|
- lib/davinci_pas_test_kit/generated/v2.0.1/beneficiary/client_inquire_request_beneficiary_must_support_test.rb
|
@@ -146,10 +164,6 @@ files:
|
|
146
164
|
- lib/davinci_pas_test_kit/generated/v2.0.1/claiminquiryresponse/server_inquire_response_claiminquiryresponse_must_support_test.rb
|
147
165
|
- lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/metadata.yml
|
148
166
|
- lib/davinci_pas_test_kit/generated/v2.0.1/claimresponse/server_submit_response_claimresponse_must_support_test.rb
|
149
|
-
- lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_denial_pas_response_bundle_validation_test.rb
|
150
|
-
- lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pas_request_bundle_validation_test.rb
|
151
|
-
- lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_inquiry_request_bundle_validation_test.rb
|
152
|
-
- lib/davinci_pas_test_kit/generated/v2.0.1/client_tests/client_pended_pas_response_bundle_validation_test.rb
|
153
167
|
- lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/metadata.yml
|
154
168
|
- lib/davinci_pas_test_kit/generated/v2.0.1/communication_request/server_submit_response_communication_request_must_support_test.rb
|
155
169
|
- lib/davinci_pas_test_kit/generated/v2.0.1/coverage/client_inquire_request_coverage_must_support_test.rb
|
@@ -252,21 +266,29 @@ files:
|
|
252
266
|
- lib/davinci_pas_test_kit/generator/templates/resource_list.rb.erb
|
253
267
|
- lib/davinci_pas_test_kit/generator/templates/suite.rb.erb
|
254
268
|
- lib/davinci_pas_test_kit/generator/templates/validation.rb.erb
|
255
|
-
- lib/davinci_pas_test_kit/generator/templates/validation_client.rb.erb
|
256
269
|
- lib/davinci_pas_test_kit/generator/terminology_binding_metadata_extractor.rb
|
257
270
|
- lib/davinci_pas_test_kit/generator/validation_test_generator.rb
|
258
271
|
- lib/davinci_pas_test_kit/generator/value_extractor.rb
|
259
272
|
- lib/davinci_pas_test_kit/igs/README.md
|
260
273
|
- lib/davinci_pas_test_kit/igs/davinci_pas_2.0.1.tgz
|
274
|
+
- lib/davinci_pas_test_kit/jobs/send_pas_subscription_notification.rb
|
275
|
+
- lib/davinci_pas_test_kit/jobs/send_subscription_handshake.rb
|
261
276
|
- lib/davinci_pas_test_kit/metadata.rb
|
262
277
|
- lib/davinci_pas_test_kit/must_support_test.rb
|
263
278
|
- lib/davinci_pas_test_kit/pas_bundle_validation.rb
|
279
|
+
- lib/davinci_pas_test_kit/requirements/davinci-pas-test-kit_out_of_scope_requirements.csv
|
280
|
+
- lib/davinci_pas_test_kit/requirements/davinci-pas-test-kit_requirements.csv
|
281
|
+
- lib/davinci_pas_test_kit/requirements/generated/davinci-pas-test-kit_requirements_coverage.csv
|
282
|
+
- lib/davinci_pas_test_kit/response_generator.rb
|
264
283
|
- lib/davinci_pas_test_kit/tags.rb
|
265
284
|
- lib/davinci_pas_test_kit/urls.rb
|
266
285
|
- lib/davinci_pas_test_kit/user_input_response.rb
|
267
286
|
- lib/davinci_pas_test_kit/validation_test.rb
|
268
287
|
- lib/davinci_pas_test_kit/validator_suppressions.rb
|
269
288
|
- lib/davinci_pas_test_kit/version.rb
|
289
|
+
- lib/inferno_requirements_tools/ext/inferno_core/runnable.rb
|
290
|
+
- lib/inferno_requirements_tools/tasks/requirements_coverage.rb
|
291
|
+
- lib/requirements_config.yaml
|
270
292
|
homepage: https://github.com/inferno-framework/davinci-pas-test-kit
|
271
293
|
licenses:
|
272
294
|
- Apache-2.0
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require_relative '../../../urls'
|
2
|
-
|
3
|
-
module DaVinciPASTestKit
|
4
|
-
module DaVinciPASV201
|
5
|
-
class PASClientDenialSubmitResponseAttest < Inferno::Test
|
6
|
-
include URLs
|
7
|
-
|
8
|
-
id :pas_client_v201_denial_submit_response_attest
|
9
|
-
title 'Check that the client registers the request as denied (Attestation)'
|
10
|
-
description %(
|
11
|
-
This test provides the tester an opportunity to observe their client following
|
12
|
-
the receipt of the denied response and attest that users are able to determine
|
13
|
-
that the response has been denied.
|
14
|
-
)
|
15
|
-
input :access_token,
|
16
|
-
title: 'Access Token',
|
17
|
-
description: %(
|
18
|
-
Access token that the client will provide in the Authorization header of each request
|
19
|
-
made during this test.
|
20
|
-
)
|
21
|
-
|
22
|
-
run do
|
23
|
-
wait(
|
24
|
-
identifier: access_token,
|
25
|
-
message: %(
|
26
|
-
**Denial Workflow Test**:
|
27
|
-
|
28
|
-
I attest that the client system displays the submitted claim as 'denied'.
|
29
|
-
|
30
|
-
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is true.
|
31
|
-
|
32
|
-
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is false.
|
33
|
-
)
|
34
|
-
)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require_relative '../../../urls'
|
2
|
-
|
3
|
-
module DaVinciPASTestKit
|
4
|
-
module DaVinciPASV201
|
5
|
-
class PASClientPendedInquireResponseAttest < Inferno::Test
|
6
|
-
include URLs
|
7
|
-
|
8
|
-
id :pas_client_v201_pended_inquire_response_attest
|
9
|
-
title 'Check that the client registers the request as approved (Attestation)'
|
10
|
-
description %(
|
11
|
-
This test provides the tester an opportunity to observe their client following
|
12
|
-
the receipt of the inquiry response with a final decision and attest that users
|
13
|
-
are able to determine that the response has been approved in full.
|
14
|
-
)
|
15
|
-
input :access_token,
|
16
|
-
title: 'Access Token',
|
17
|
-
description: %(
|
18
|
-
Access token that the client will provide in the Authorization header of each request
|
19
|
-
made during this test.
|
20
|
-
)
|
21
|
-
|
22
|
-
run do
|
23
|
-
wait(
|
24
|
-
identifier: access_token,
|
25
|
-
message: %(
|
26
|
-
**Pended Workflow Test**:
|
27
|
-
|
28
|
-
I attest that the client system displays the submitted claim as 'approved' meaning that
|
29
|
-
the user can proceed with ordering or providing the requested service.
|
30
|
-
|
31
|
-
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
|
32
|
-
|
33
|
-
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
|
34
|
-
)
|
35
|
-
)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
data/lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_pended_inquire_test.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require_relative '../../../urls'
|
2
|
-
|
3
|
-
module DaVinciPASTestKit
|
4
|
-
module DaVinciPASV201
|
5
|
-
class PASClientPendedInquireTest < Inferno::Test
|
6
|
-
include URLs
|
7
|
-
|
8
|
-
id :pas_client_v201_pended_inquire_test
|
9
|
-
title 'Client inquires about a pended claim using the $inquire operation'
|
10
|
-
description %(
|
11
|
-
Inferno will wait for a prior authorization inquiry request
|
12
|
-
from the client. Upon receipt, Inferno will generate a response
|
13
|
-
with an approved status and respond with it.
|
14
|
-
)
|
15
|
-
input :access_token,
|
16
|
-
title: 'Access Token',
|
17
|
-
description: %(
|
18
|
-
Access token that the client will provide in the Authorization header of each request
|
19
|
-
made during this test.
|
20
|
-
)
|
21
|
-
|
22
|
-
run do
|
23
|
-
wait(
|
24
|
-
identifier: access_token,
|
25
|
-
message: %(
|
26
|
-
**Pended Workflow Test**:
|
27
|
-
|
28
|
-
Submit a PAS claim inquiry request for the pended prior authorization request to `#{inquire_url}`.
|
29
|
-
An approval response generated by Inferno will be returned.
|
30
|
-
)
|
31
|
-
)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require_relative '../../../urls'
|
2
|
-
|
3
|
-
module DaVinciPASTestKit
|
4
|
-
module DaVinciPASV201
|
5
|
-
class PASClientPendedSubmitResponseAttest < Inferno::Test
|
6
|
-
include URLs
|
7
|
-
|
8
|
-
id :pas_client_v201_pended_submit_response_attest
|
9
|
-
title 'Check that the client registers the request as pended (Attestation)'
|
10
|
-
description %(
|
11
|
-
This test provides the tester an opportunity to observe their client following
|
12
|
-
the receipt of the pended response and attest that users are able to determine
|
13
|
-
that the response has been pended and a decision will be forth coming.
|
14
|
-
)
|
15
|
-
input :access_token,
|
16
|
-
title: 'Access Token',
|
17
|
-
description: %(
|
18
|
-
Access token that the client will provide in the Authorization header of each request
|
19
|
-
made during this test.
|
20
|
-
)
|
21
|
-
|
22
|
-
run do
|
23
|
-
wait(
|
24
|
-
identifier: access_token,
|
25
|
-
message: %(
|
26
|
-
**Pended Workflow Test**:
|
27
|
-
|
28
|
-
I attest that the client system displays the submitted claim as 'pended' meaning that
|
29
|
-
a final decision has not yet been made.
|
30
|
-
|
31
|
-
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
|
32
|
-
|
33
|
-
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
|
34
|
-
)
|
35
|
-
)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
require_relative '../../../pas_bundle_validation'
|
2
|
-
require_relative '../../../<% if request_type.include?('response') %>user_input_response'<% else %>urls'<% end %>
|
3
|
-
|
4
|
-
module DaVinciPASTestKit
|
5
|
-
module <%= module_name %>
|
6
|
-
class <%= class_name %> < Inferno::Test
|
7
|
-
include DaVinciPASTestKit::PasBundleValidation
|
8
|
-
include <% if request_type.include?('response') %>UserInputResponse<% else %>URLs<% end %>
|
9
|
-
|
10
|
-
id :<%= test_id %>
|
11
|
-
title '<%= title %>'
|
12
|
-
description %(
|
13
|
-
<%=description.strip.gsub("\n", "\n" + " "*8) %>
|
14
|
-
)
|
15
|
-
|
16
|
-
def resource_type
|
17
|
-
'<%= resource_type %>'
|
18
|
-
end
|
19
|
-
|
20
|
-
def request_type
|
21
|
-
'<%= request_type.split('_').first %>'
|
22
|
-
end
|
23
|
-
|
24
|
-
run do<% if request_type.include?('request') %><% type = request_type.split('_').first == 'submit' ? 'submit' : 'inquire' %>
|
25
|
-
assert request.url == <%= type %>_url,
|
26
|
-
"Request made to wrong URL: #{request.url}. Should instead be to #{<%= type %>_url}"
|
27
|
-
|
28
|
-
validate_pas_bundle_json(
|
29
|
-
request.request_body,
|
30
|
-
'<%= profile_url %>',
|
31
|
-
'<%= profile_version %>',
|
32
|
-
request_type,
|
33
|
-
'request_bundle',
|
34
|
-
message: 'The <%= type%> Bundle request provided for the Claim/$<%= type%> operation is invalid:'
|
35
|
-
)
|
36
|
-
<% else %>
|
37
|
-
check_user_inputted_response :<%= workflow %>_json_response
|
38
|
-
validate_pas_bundle_json(
|
39
|
-
<%= workflow %>_json_response,
|
40
|
-
'<%= profile_url %>',
|
41
|
-
'<%= profile_version %>',
|
42
|
-
request_type,
|
43
|
-
'response_bundle',
|
44
|
-
skips: true,
|
45
|
-
message: "Invalid input for '#{input_title(:<%= workflow %>_json_response)}':"
|
46
|
-
)<% end %>
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|