onc_certification_g10_test_kit 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb +48 -0
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb +36 -0
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb +96 -0
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +0 -22
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu2.rb +0 -57
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +3 -0
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +6 -0
- data/lib/onc_certification_g10_test_kit/onc_program_procedure.yml +5 -3
- data/lib/onc_certification_g10_test_kit/short_id_map.yml +9 -6
- data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +6 -18
- data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +49 -27
- data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +6 -18
- data/lib/onc_certification_g10_test_kit/version.rb +1 -1
- data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +50 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cb9581f7ee4744446ca16c9f22e240d122ea66a0664855fb84105e493711b12
|
4
|
+
data.tar.gz: 599e962523e39a5acde1d806dca01bdcc833cfcf8765d3ec4011b30b68461565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28a4f109f4790920c4651e4b5dcbe2f54f84729c8253df0ded0edfd0e4ee2be116de27f0b301e8cb91942d467e7ce7cc926124c3d72085279f3a92e56cdd2494
|
7
|
+
data.tar.gz: 539f9c928ba1c7f912cbb5c449835043f1e33bc84d9c365d9d6bba66aad8f2116a354c4ff55a4828d496dd6b26a60dee7d427ec8fec596cf81426f5604b64d32
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative 'export_kick_off_performer'
|
2
|
+
|
3
|
+
module ONCCertificationG10TestKit
|
4
|
+
class BulkDataGroupExportCancelSTU1 < Inferno::TestGroup
|
5
|
+
id :g10_bulk_data_export_cancel_stu1
|
6
|
+
title 'Group Compartment Export Cancel Tests'
|
7
|
+
description %(
|
8
|
+
Verify that the Bulk Data server supports cancelling requested exports.
|
9
|
+
This group initiates a new export and immediately cancels it to verify
|
10
|
+
correct behavior.
|
11
|
+
)
|
12
|
+
|
13
|
+
input :bearer_token
|
14
|
+
input :bulk_server_url,
|
15
|
+
title: 'Bulk Data FHIR URL',
|
16
|
+
description: 'The URL of the Bulk FHIR server.'
|
17
|
+
input :group_id,
|
18
|
+
title: 'Group ID',
|
19
|
+
description: 'The Group ID associated with the group of patients to be exported.'
|
20
|
+
|
21
|
+
http_client :bulk_server do
|
22
|
+
url :bulk_server_url
|
23
|
+
end
|
24
|
+
|
25
|
+
test do
|
26
|
+
id :g10_bulk_export_cancel
|
27
|
+
title 'Bulk Data Server returns "202 Accepted" for delete request'
|
28
|
+
description <<~DESCRIPTION
|
29
|
+
After a bulk data request has been started, a client MAY send a delete request to the URL provided in the Content-Location header to cancel the request.
|
30
|
+
Bulk Data Server MUST support client's delete request and return HTTP Status Code of "202 Accepted"
|
31
|
+
DESCRIPTION
|
32
|
+
# link 'http://hl7.org/fhir/uv/bulkdata/STU1.0.1/export/index.html#bulk-data-delete-request'
|
33
|
+
|
34
|
+
include ExportKickOffPerformer
|
35
|
+
|
36
|
+
output :cancelled_polling_url
|
37
|
+
|
38
|
+
run do
|
39
|
+
perform_export_kick_off_request
|
40
|
+
assert_response_status(202)
|
41
|
+
|
42
|
+
output cancelled_polling_url: request.response_header('content-location')&.value
|
43
|
+
|
44
|
+
delete_export_kick_off_request
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative 'bulk_data_group_export_cancel_stu1'
|
2
|
+
|
3
|
+
module ONCCertificationG10TestKit
|
4
|
+
class BulkDataGroupExportCancelSTU2 < BulkDataGroupExportCancelSTU1
|
5
|
+
id :g10_bulk_data_export_cancel_stu2
|
6
|
+
|
7
|
+
test do
|
8
|
+
title 'Bulk Data Server returns a 404 and OperationOutcome for polling requests to cancelled exports'
|
9
|
+
description <<~DESCRIPTION
|
10
|
+
> Following the delete request, when subsequent requests are made to the
|
11
|
+
polling location, the server SHALL return a 404 Not Found error and an
|
12
|
+
associated FHIR OperationOutcome in JSON format.
|
13
|
+
|
14
|
+
http://hl7.org/fhir/uv/bulkdata/STU2/export.html#bulk-data-delete-request
|
15
|
+
DESCRIPTION
|
16
|
+
|
17
|
+
id :bulk_data_poll_cancelled_export
|
18
|
+
|
19
|
+
input :cancelled_polling_url
|
20
|
+
|
21
|
+
run do
|
22
|
+
skip 'No polling url available' unless cancelled_polling_url.present?
|
23
|
+
|
24
|
+
get(cancelled_polling_url, headers: { authorization: "Bearer #{bearer_token}", accept: 'application/json' })
|
25
|
+
|
26
|
+
assert_response_status(404)
|
27
|
+
|
28
|
+
assert_valid_json(response[:body])
|
29
|
+
response_body = JSON.parse(response[:body])
|
30
|
+
|
31
|
+
assert response_body['resourceType'] == 'OperationOutcome', 'Server did not return an OperationOutcome'
|
32
|
+
assert_valid_resource(resource: FHIR::OperationOutcome.new(response_body))
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require_relative 'export_kick_off_performer'
|
2
|
+
|
3
|
+
module ONCCertificationG10TestKit
|
4
|
+
class BulkDataGroupExportParameters < Inferno::TestGroup
|
5
|
+
id :g10_bulk_data_export_parameters
|
6
|
+
title 'Group Compartment Export Parameters Tests'
|
7
|
+
description %(
|
8
|
+
Verify that the Bulk Data server supports required query parameters.
|
9
|
+
)
|
10
|
+
|
11
|
+
input :bearer_token
|
12
|
+
input :bulk_server_url,
|
13
|
+
title: 'Bulk Data FHIR URL',
|
14
|
+
description: 'The URL of the Bulk FHIR server.'
|
15
|
+
input :group_id,
|
16
|
+
title: 'Group ID',
|
17
|
+
description: 'The Group ID associated with the group of patients to be exported.'
|
18
|
+
|
19
|
+
http_client :bulk_server do
|
20
|
+
url :bulk_server_url
|
21
|
+
end
|
22
|
+
|
23
|
+
test do
|
24
|
+
title 'Bulk Data Server supports "_outputFormat" query parameter'
|
25
|
+
description <<~DESCRIPTION
|
26
|
+
[_outputFormat](http://hl7.org/fhir/uv/bulkdata/STU2/export.html#query-parameters):
|
27
|
+
The format for the requested Bulk Data files to be
|
28
|
+
generated as per FHIR Asynchronous Request Pattern. Defaults to
|
29
|
+
application/fhir+ndjson. The server SHALL support Newline Delimited
|
30
|
+
JSON, but MAY choose to support additional output formats. The server
|
31
|
+
SHALL accept the full content type of application/fhir+ndjson as well
|
32
|
+
as the abbreviated representations application/ndjson and ndjson.
|
33
|
+
DESCRIPTION
|
34
|
+
|
35
|
+
id :output_format_in_export_response
|
36
|
+
|
37
|
+
include ExportKickOffPerformer
|
38
|
+
|
39
|
+
run do
|
40
|
+
['application/fhir+ndjson', 'application/ndjson', 'ndjson'].each do |format|
|
41
|
+
perform_export_kick_off_request(params: { _outputFormat: format })
|
42
|
+
assert_response_status(202)
|
43
|
+
|
44
|
+
delete_export_kick_off_request
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
test do
|
50
|
+
title 'Bulk Data Server supports "_since" query parameter'
|
51
|
+
description <<~DESCRIPTION
|
52
|
+
This test verifies that the server accepts an export request with the
|
53
|
+
`[_since](http://hl7.org/fhir/uv/bulkdata/STU2/export.html#query-parameters)`
|
54
|
+
query parameter. It initiates a new export using a _since parameter of
|
55
|
+
one week ago, and ensures that the export was initiated succesfully.
|
56
|
+
|
57
|
+
The test does not attempt to verify that resources returned were
|
58
|
+
modified after the _since date that was requested, because the Bulk Data
|
59
|
+
specification provides latitude in determining exactly what data is
|
60
|
+
returned by the server. The purpose of this test is to ensure that
|
61
|
+
export requests with this parameter are accepted and to highlight that
|
62
|
+
support of this parameter is required.
|
63
|
+
|
64
|
+
After the export was successfully initiated, it is then cancelled.
|
65
|
+
DESCRIPTION
|
66
|
+
|
67
|
+
id :g10_since_in_export_response
|
68
|
+
|
69
|
+
include ExportKickOffPerformer
|
70
|
+
|
71
|
+
input :since_timestamp,
|
72
|
+
title: 'Timestamp for _since parameter',
|
73
|
+
description: 'A timestamp formatted as a FHIR instant which will be used to test the ' \
|
74
|
+
"server's support for the `_since` query parameter",
|
75
|
+
default: 1.week.ago.iso8601
|
76
|
+
|
77
|
+
run do
|
78
|
+
fhir_instant_regex = /
|
79
|
+
([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)
|
80
|
+
-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])
|
81
|
+
T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)
|
82
|
+
?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))
|
83
|
+
/x
|
84
|
+
|
85
|
+
assert since_timestamp.match?(fhir_instant_regex),
|
86
|
+
"The provided `_since` timestamp `#{since_timestamp}` is not a valid " \
|
87
|
+
'[FHIR instant](https://www.hl7.org/fhir/datatypes.html#instant).'
|
88
|
+
|
89
|
+
perform_export_kick_off_request(params: { _since: since_timestamp })
|
90
|
+
assert_response_status(202)
|
91
|
+
|
92
|
+
delete_export_kick_off_request
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -275,27 +275,5 @@ module ONCCertificationG10TestKit
|
|
275
275
|
end
|
276
276
|
end
|
277
277
|
end
|
278
|
-
|
279
|
-
test do
|
280
|
-
title 'Bulk Data Server returns "202 Accepted" for delete request'
|
281
|
-
description <<~DESCRIPTION
|
282
|
-
After a bulk data request has been started, a client MAY send a delete request to the URL provided in the Content-Location header to cancel the request.
|
283
|
-
Bulk Data Server MUST support client's delete request and return HTTP Status Code of "202 Accepted"
|
284
|
-
DESCRIPTION
|
285
|
-
# link 'http://hl7.org/fhir/uv/bulkdata/STU1.0.1/export/index.html#bulk-data-delete-request'
|
286
|
-
|
287
|
-
include ExportKickOffPerformer
|
288
|
-
|
289
|
-
output :cancelled_polling_url
|
290
|
-
|
291
|
-
run do
|
292
|
-
perform_export_kick_off_request
|
293
|
-
assert_response_status(202)
|
294
|
-
|
295
|
-
output cancelled_polling_url: request.response_header('content-location')&.value
|
296
|
-
|
297
|
-
delete_export_kick_off_request
|
298
|
-
end
|
299
|
-
end
|
300
278
|
end
|
301
279
|
end
|
@@ -7,62 +7,5 @@ module ONCCertificationG10TestKit
|
|
7
7
|
id :bulk_data_group_export_stu2
|
8
8
|
|
9
9
|
config(options: { require_absolute_urls_in_output: true })
|
10
|
-
|
11
|
-
test do
|
12
|
-
title 'Bulk Data Server supports "_outputFormat" query parameter'
|
13
|
-
description <<~DESCRIPTION
|
14
|
-
[_outputFormat](http://hl7.org/fhir/uv/bulkdata/STU2/export.html#query-parameters):
|
15
|
-
The format for the requested Bulk Data files to be
|
16
|
-
generated as per FHIR Asynchronous Request Pattern. Defaults to
|
17
|
-
application/fhir+ndjson. The server SHALL support Newline Delimited
|
18
|
-
JSON, but MAY choose to support additional output formats. The server
|
19
|
-
SHALL accept the full content type of application/fhir+ndjson as well
|
20
|
-
as the abbreviated representations application/ndjson and ndjson.
|
21
|
-
DESCRIPTION
|
22
|
-
|
23
|
-
id :output_format_in_export_response
|
24
|
-
|
25
|
-
include ExportKickOffPerformer
|
26
|
-
|
27
|
-
input :bearer_token, :group_id, :bulk_server_url
|
28
|
-
|
29
|
-
run do
|
30
|
-
['application/fhir+ndjson', 'application/ndjson', 'ndjson'].each do |format|
|
31
|
-
perform_export_kick_off_request(params: { _outputFormat: format })
|
32
|
-
assert_response_status(202)
|
33
|
-
|
34
|
-
delete_export_kick_off_request
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
test do
|
40
|
-
title 'Bulk Data Server returns a 404 and OperationOutcome for polling requests to cancelled exports'
|
41
|
-
description <<~DESCRIPTION
|
42
|
-
> Following the delete request, when subsequent requests are made to the
|
43
|
-
polling location, the server SHALL return a 404 Not Found error and an
|
44
|
-
associated FHIR OperationOutcome in JSON format.
|
45
|
-
|
46
|
-
http://hl7.org/fhir/uv/bulkdata/STU2/export.html#bulk-data-delete-request
|
47
|
-
DESCRIPTION
|
48
|
-
|
49
|
-
id :bulk_data_poll_cancelled_export
|
50
|
-
|
51
|
-
input :cancelled_polling_url
|
52
|
-
|
53
|
-
run do
|
54
|
-
skip 'No polling url available' unless cancelled_polling_url.present?
|
55
|
-
|
56
|
-
get(cancelled_polling_url, headers: { authorization: "Bearer #{bearer_token}", accept: 'application/json' })
|
57
|
-
|
58
|
-
assert_response_status(404)
|
59
|
-
|
60
|
-
assert_valid_json(response[:body])
|
61
|
-
response_body = JSON.parse(response[:body])
|
62
|
-
|
63
|
-
assert response_body['resourceType'] == 'OperationOutcome', 'Server did not return an OperationOutcome'
|
64
|
-
assert_valid_resource(resource: FHIR::OperationOutcome.new(response_body))
|
65
|
-
end
|
66
|
-
end
|
67
10
|
end
|
68
11
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative 'bulk_data_authorization'
|
2
2
|
require_relative 'bulk_data_group_export_stu1'
|
3
|
+
require_relative 'bulk_data_group_export_cancel_stu1'
|
3
4
|
require_relative 'bulk_data_group_export_validation'
|
4
5
|
require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
|
5
6
|
|
@@ -75,5 +76,7 @@ module ONCCertificationG10TestKit
|
|
75
76
|
|
76
77
|
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
77
78
|
id: :g10_bulk_group_export_validation_messages_setup
|
79
|
+
|
80
|
+
group from: :g10_bulk_data_export_cancel_stu1
|
78
81
|
end
|
79
82
|
end
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require_relative 'bulk_data_authorization'
|
2
|
+
require_relative 'bulk_data_group_export_cancel_stu2'
|
3
|
+
require_relative 'bulk_data_group_export_parameters'
|
2
4
|
require_relative 'bulk_data_group_export_stu2'
|
3
5
|
require_relative 'bulk_data_group_export_validation'
|
4
6
|
|
@@ -74,5 +76,9 @@ module ONCCertificationG10TestKit
|
|
74
76
|
|
75
77
|
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
76
78
|
id: :g10_bulk_group_export_validation_messages_setup
|
79
|
+
|
80
|
+
group from: :g10_bulk_data_export_cancel_stu2
|
81
|
+
|
82
|
+
group from: :g10_bulk_data_export_parameters
|
77
83
|
end
|
78
84
|
end
|
@@ -2160,6 +2160,8 @@ procedure:
|
|
2160
2160
|
inferno_tests:
|
2161
2161
|
- 7.2.04 - 7.2.05
|
2162
2162
|
- 8.2.04 - 8.2.05
|
2163
|
+
- 8.5.01
|
2164
|
+
- 8.5.02
|
2163
2165
|
- id: DAT-PAT-11
|
2164
2166
|
SUT: |
|
2165
2167
|
The health IT developer demonstrates the ability of the Health IT
|
@@ -2184,9 +2186,9 @@ procedure:
|
|
2184
2186
|
adopted in § 170.215(a)(4).
|
2185
2187
|
inferno_supported: 'yes'
|
2186
2188
|
inferno_tests:
|
2187
|
-
- 7.
|
2188
|
-
- 8.
|
2189
|
-
- 8.
|
2189
|
+
- 7.4.01
|
2190
|
+
- 8.4.01
|
2191
|
+
- 8.4.02
|
2190
2192
|
- id: DAT-PAT-13
|
2191
2193
|
SUT: |
|
2192
2194
|
The health IT developer demonstrates the ability of the Health IT
|
@@ -522,7 +522,6 @@ g10_certification-g10_single_patient_us_core_4_api-us_core_v400_device-us_core_v
|
|
522
522
|
g10_certification-g10_single_patient_us_core_4_api-us_core_v400_device-us_core_v400_device_validation_test: 5.7.04
|
523
523
|
g10_certification-g10_single_patient_us_core_4_api-us_core_v400_device-us_core_v400_device_must_support_test: 5.7.05
|
524
524
|
g10_certification-g10_single_patient_us_core_4_api-us_core_v400_device-us_core_v400_device_reference_resolution_test: 5.7.06
|
525
|
-
g10_certification-g10_single_patient_us_core_4_api-us_core_v400_device-us_core_v400_device_udi_pi_test: 5.7.07
|
526
525
|
g10_certification-g10_single_patient_us_core_4_api-us_core_v400_diagnostic_report_lab: '5.8'
|
527
526
|
? g10_certification-g10_single_patient_us_core_4_api-us_core_v400_diagnostic_report_lab-us_core_v400_diagnostic_report_lab_patient_category_search_test
|
528
527
|
: 5.8.01
|
@@ -922,7 +921,6 @@ g10_certification-g10_single_patient_us_core_5_api-us_core_v501_device-us_core_v
|
|
922
921
|
g10_certification-g10_single_patient_us_core_5_api-us_core_v501_device-us_core_v501_device_validation_test: 6.8.04
|
923
922
|
g10_certification-g10_single_patient_us_core_5_api-us_core_v501_device-us_core_v501_device_must_support_test: 6.8.05
|
924
923
|
g10_certification-g10_single_patient_us_core_5_api-us_core_v501_device-us_core_v501_device_reference_resolution_test: 6.8.06
|
925
|
-
g10_certification-g10_single_patient_us_core_5_api-us_core_v501_device-us_core_v400_device_udi_pi_test: 6.8.07
|
926
924
|
g10_certification-g10_single_patient_us_core_5_api-us_core_v501_diagnostic_report_note: '6.9'
|
927
925
|
? g10_certification-g10_single_patient_us_core_5_api-us_core_v501_diagnostic_report_note-us_core_v501_diagnostic_report_note_patient_category_search_test
|
928
926
|
: 6.9.01
|
@@ -1365,7 +1363,6 @@ g10_certification-multi_patient_api-bulk_data_group_export-Test03: 7.2.03
|
|
1365
1363
|
g10_certification-multi_patient_api-bulk_data_group_export-Test04: 7.2.04
|
1366
1364
|
g10_certification-multi_patient_api-bulk_data_group_export-Test05: 7.2.05
|
1367
1365
|
g10_certification-multi_patient_api-bulk_data_group_export-Test06: 7.2.06
|
1368
|
-
g10_certification-multi_patient_api-bulk_data_group_export-Test07: 7.2.07
|
1369
1366
|
g10_certification-multi_patient_api-g10_bulk_group_export_tls_messages_setup: '7.02'
|
1370
1367
|
g10_certification-multi_patient_api-bulk_data_group_export_validation: '7.3'
|
1371
1368
|
g10_certification-multi_patient_api-bulk_data_group_export_validation-g10_bulk_file_server_tls_version: 7.3.01
|
@@ -1396,6 +1393,8 @@ g10_certification-multi_patient_api-bulk_data_group_export_validation-Test25: 7.
|
|
1396
1393
|
g10_certification-multi_patient_api-bulk_data_group_export_validation-Test26: 7.3.26
|
1397
1394
|
g10_certification-multi_patient_api-bulk_data_group_export_validation-Test27: 7.3.27
|
1398
1395
|
g10_certification-multi_patient_api-g10_bulk_group_export_validation_messages_setup: '7.03'
|
1396
|
+
g10_certification-multi_patient_api-g10_bulk_data_export_cancel_stu1: '7.4'
|
1397
|
+
g10_certification-multi_patient_api-g10_bulk_data_export_cancel_stu1-g10_bulk_export_cancel: 7.4.01
|
1399
1398
|
g10_certification-multi_patient_api_stu2: '8'
|
1400
1399
|
g10_certification-multi_patient_api_stu2-bulk_data_authorization: '8.1'
|
1401
1400
|
g10_certification-multi_patient_api_stu2-bulk_data_authorization-g10_bulk_token_tls_version: 8.1.01
|
@@ -1412,9 +1411,6 @@ g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-Test03: 8.2
|
|
1412
1411
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-Test04: 8.2.04
|
1413
1412
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-Test05: 8.2.05
|
1414
1413
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-Test06: 8.2.06
|
1415
|
-
g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-Test07: 8.2.07
|
1416
|
-
g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-output_format_in_export_response: 8.2.08
|
1417
|
-
g10_certification-multi_patient_api_stu2-bulk_data_group_export_stu2-bulk_data_poll_cancelled_export: 8.2.09
|
1418
1414
|
g10_certification-multi_patient_api_stu2-g10_bulk_group_export_tls_messages_setup: '8.02'
|
1419
1415
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_validation: '8.3'
|
1420
1416
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_validation-g10_bulk_file_server_tls_version: 8.3.01
|
@@ -1445,6 +1441,12 @@ g10_certification-multi_patient_api_stu2-bulk_data_group_export_validation-Test2
|
|
1445
1441
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_validation-Test26: 8.3.26
|
1446
1442
|
g10_certification-multi_patient_api_stu2-bulk_data_group_export_validation-Test27: 8.3.27
|
1447
1443
|
g10_certification-multi_patient_api_stu2-g10_bulk_group_export_validation_messages_setup: '8.03'
|
1444
|
+
g10_certification-multi_patient_api_stu2-g10_bulk_data_export_cancel_stu2: '8.4'
|
1445
|
+
g10_certification-multi_patient_api_stu2-g10_bulk_data_export_cancel_stu2-g10_bulk_export_cancel: 8.4.01
|
1446
|
+
g10_certification-multi_patient_api_stu2-g10_bulk_data_export_cancel_stu2-bulk_data_poll_cancelled_export: 8.4.02
|
1447
|
+
g10_certification-multi_patient_api_stu2-g10_bulk_data_export_parameters: '8.5'
|
1448
|
+
g10_certification-multi_patient_api_stu2-g10_bulk_data_export_parameters-output_format_in_export_response: 8.5.01
|
1449
|
+
g10_certification-multi_patient_api_stu2-g10_bulk_data_export_parameters-g10_since_in_export_response: 8.5.02
|
1448
1450
|
g10_certification-Group06: '9'
|
1449
1451
|
g10_certification-Group06-g10_public_standalone_launch: '9.1'
|
1450
1452
|
g10_certification-Group06-g10_public_standalone_launch-standalone_auth_tls: 9.1.01
|
@@ -1538,3 +1540,4 @@ g10_certification-Group06-g10_visual_inspection_and_attestations-Test13: 9.10.13
|
|
1538
1540
|
g10_certification-Group06-g10_visual_inspection_and_attestations-g10_public_url_attestation: 9.10.14
|
1539
1541
|
g10_certification-Group06-g10_visual_inspection_and_attestations-g10_tls_version_attestation: 9.10.15
|
1540
1542
|
g10_certification-Group06-g10_visual_inspection_and_attestations-g10_refresh_token_refresh_attestation: 9.10.16
|
1543
|
+
g10_certification-Group06-g10_visual_inspection_and_attestations-g10_bulk_v2_since_attestation: 9.10.17
|
@@ -137,17 +137,11 @@ module ONCCertificationG10TestKit
|
|
137
137
|
received_scopes: { name: :ehr_received_scopes }
|
138
138
|
},
|
139
139
|
options: {
|
140
|
-
scope_version: :v1
|
140
|
+
scope_version: :v1,
|
141
|
+
required_scope_type: 'user',
|
142
|
+
required_scopes: ['openid', 'fhirUser', 'launch', 'offline_access']
|
141
143
|
}
|
142
144
|
)
|
143
|
-
|
144
|
-
def required_scopes
|
145
|
-
['openid', 'fhirUser', 'launch', 'offline_access']
|
146
|
-
end
|
147
|
-
|
148
|
-
def required_scope_type
|
149
|
-
'user'
|
150
|
-
end
|
151
145
|
end
|
152
146
|
|
153
147
|
test from: :g10_unauthorized_access,
|
@@ -289,17 +283,11 @@ module ONCCertificationG10TestKit
|
|
289
283
|
received_scopes: { name: :ehr_received_scopes }
|
290
284
|
},
|
291
285
|
options: {
|
292
|
-
scope_version: :v2
|
286
|
+
scope_version: :v2,
|
287
|
+
required_scope_type: 'user',
|
288
|
+
required_scopes: ['openid', 'fhirUser', 'launch', 'offline_access']
|
293
289
|
}
|
294
290
|
)
|
295
|
-
|
296
|
-
def required_scopes
|
297
|
-
['openid', 'fhirUser', 'launch', 'offline_access']
|
298
|
-
end
|
299
|
-
|
300
|
-
def required_scope_type
|
301
|
-
'user'
|
302
|
-
end
|
303
291
|
end
|
304
292
|
|
305
293
|
test from: :g10_unauthorized_access,
|
@@ -75,13 +75,25 @@ module ONCCertificationG10TestKit
|
|
75
75
|
V5_VALID_RESOURCE_TYPES
|
76
76
|
end
|
77
77
|
|
78
|
+
def required_scope_type
|
79
|
+
config.options[:required_scope_type]
|
80
|
+
end
|
81
|
+
|
82
|
+
def required_scopes
|
83
|
+
config.options[:required_scopes]
|
84
|
+
end
|
85
|
+
|
86
|
+
def scope_version
|
87
|
+
config.options[:scope_version]
|
88
|
+
end
|
89
|
+
|
78
90
|
def read_format
|
79
91
|
@read_format ||=
|
80
92
|
begin
|
81
93
|
v1_read_format = 'read'
|
82
94
|
v2_read_format = 'c?ru?d?s?'
|
83
95
|
|
84
|
-
case
|
96
|
+
case scope_version
|
85
97
|
when :v1
|
86
98
|
"#{v1_read_format} | *"
|
87
99
|
when :v2
|
@@ -94,13 +106,13 @@ module ONCCertificationG10TestKit
|
|
94
106
|
|
95
107
|
def access_level_regex
|
96
108
|
@access_level_regex ||=
|
97
|
-
case
|
109
|
+
case scope_version
|
98
110
|
when :v1
|
99
|
-
/\A(\*|read)/
|
111
|
+
/\A(\*|read)\b/
|
100
112
|
when :v2
|
101
|
-
/\A(\*|c?ru?d?s
|
113
|
+
/\A(\*|c?ru?d?s?)\b/
|
102
114
|
else
|
103
|
-
/\A(\*|read|c?ru?d?s
|
115
|
+
/\A(\*|read|c?ru?d?s?)\b/
|
104
116
|
end
|
105
117
|
end
|
106
118
|
|
@@ -112,41 +124,45 @@ module ONCCertificationG10TestKit
|
|
112
124
|
end
|
113
125
|
|
114
126
|
def strip_experimental_scope_syntax(full_scope)
|
115
|
-
if
|
127
|
+
if scope_version == :v1
|
116
128
|
full_scope
|
117
129
|
else
|
118
130
|
full_scope.split('?').first
|
119
131
|
end
|
120
132
|
end
|
121
133
|
|
122
|
-
def
|
134
|
+
def assert_correct_scope_type(scope, scope_type, resource_type)
|
135
|
+
if required_scope_type == 'patient' && patient_compartment_resource_types.exclude?(resource_type)
|
136
|
+
assert ['user', 'patient'].include?(scope_type),
|
137
|
+
"Requested scope '#{scope}' must begin with either 'user/' or 'patient/'"
|
138
|
+
else
|
139
|
+
assert scope_type == required_scope_type, bad_format_message(scope)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
def requested_scope_test(scopes)
|
123
144
|
correct_scope_type_found = false
|
124
145
|
|
125
146
|
scopes.each do |full_scope|
|
126
147
|
scope = strip_experimental_scope_syntax(full_scope)
|
127
148
|
|
128
149
|
scope_pieces = scope.split('/')
|
129
|
-
assert scope_pieces.
|
150
|
+
assert scope_pieces.length == 2, bad_format_message(scope)
|
130
151
|
|
131
152
|
scope_type, resource_scope = scope_pieces
|
132
|
-
resource_scope_parts = resource_scope.split('.')
|
133
153
|
|
154
|
+
resource_scope_parts = resource_scope.split('.')
|
134
155
|
assert resource_scope_parts.length == 2, bad_format_message(scope)
|
135
156
|
|
136
157
|
resource_type, access_level = resource_scope_parts
|
137
|
-
|
158
|
+
assert access_level =~ access_level_regex, bad_format_message(scope)
|
138
159
|
|
139
|
-
|
140
|
-
assert ['user', 'patient'].include?(scope_type),
|
141
|
-
"Requested scope '#{scope}' must begin with either 'user/' or 'patient/'"
|
142
|
-
else
|
143
|
-
assert scope_type == required_scope_type, bad_format_message(scope)
|
144
|
-
end
|
160
|
+
assert_correct_scope_type(scope, scope_type, resource_type)
|
145
161
|
|
146
|
-
assert valid_resource_types.include?(resource_type),
|
147
|
-
|
162
|
+
assert valid_resource_types.include?(resource_type),
|
163
|
+
"'#{resource_type}' must be either a permitted resource type or '*'"
|
148
164
|
|
149
|
-
correct_scope_type_found = true
|
165
|
+
correct_scope_type_found = true if scope_type == required_scope_type
|
150
166
|
end
|
151
167
|
|
152
168
|
assert correct_scope_type_found,
|
@@ -154,22 +170,28 @@ module ONCCertificationG10TestKit
|
|
154
170
|
"`#{required_scope_type}/[ <ResourceType> | * ].[ #{read_format} ]` was not requested."
|
155
171
|
end
|
156
172
|
|
157
|
-
def received_scope_test(scopes
|
173
|
+
def received_scope_test(scopes)
|
158
174
|
granted_resource_types = []
|
159
175
|
|
160
176
|
scopes.each do |full_scope|
|
161
177
|
scope = strip_experimental_scope_syntax(full_scope)
|
162
178
|
|
163
179
|
scope_pieces = scope.split('/')
|
164
|
-
next unless scope_pieces.
|
180
|
+
next unless scope_pieces.length == 2
|
165
181
|
|
166
|
-
|
182
|
+
scope_type, resource_scope = scope_pieces
|
167
183
|
|
168
184
|
resource_scope_parts = resource_scope.split('.')
|
169
|
-
next unless resource_scope_parts.
|
185
|
+
next unless resource_scope_parts.length == 2
|
170
186
|
|
171
187
|
resource_type, access_level = resource_scope_parts
|
172
|
-
|
188
|
+
next unless access_level =~ access_level_regex
|
189
|
+
|
190
|
+
next unless ['patient', 'user', 'system'].include?(scope_type)
|
191
|
+
|
192
|
+
assert_correct_scope_type(scope, scope_type, resource_type)
|
193
|
+
|
194
|
+
granted_resource_types << resource_type
|
173
195
|
end
|
174
196
|
|
175
197
|
missing_resource_types =
|
@@ -209,12 +231,12 @@ module ONCCertificationG10TestKit
|
|
209
231
|
# 'launch/patient' for EHR launch and Standalone launch.
|
210
232
|
# 'launch/encounter' is mentioned by SMART App Launch though not in
|
211
233
|
# (g)(10) test procedure
|
212
|
-
scopes -= ['online_access', 'launch', 'launch/patient', 'launch/encounter']
|
234
|
+
scopes -= ['online_access', 'offline_access', 'launch', 'launch/patient', 'launch/encounter']
|
213
235
|
|
214
236
|
if received_or_requested == 'requested'
|
215
|
-
requested_scope_test(scopes
|
237
|
+
requested_scope_test(scopes)
|
216
238
|
else
|
217
|
-
received_scope_test(scopes
|
239
|
+
received_scope_test(scopes)
|
218
240
|
end
|
219
241
|
end
|
220
242
|
end
|
@@ -151,17 +151,11 @@ module ONCCertificationG10TestKit
|
|
151
151
|
received_scopes: { name: :standalone_received_scopes }
|
152
152
|
},
|
153
153
|
options: {
|
154
|
-
scope_version: :v1
|
154
|
+
scope_version: :v1,
|
155
|
+
required_scope_type: 'patient',
|
156
|
+
required_scopes: ['openid', 'fhirUser', 'launch/patient', 'offline_access']
|
155
157
|
}
|
156
158
|
)
|
157
|
-
|
158
|
-
def required_scopes
|
159
|
-
['openid', 'fhirUser', 'launch/patient', 'offline_access']
|
160
|
-
end
|
161
|
-
|
162
|
-
def required_scope_type
|
163
|
-
'patient'
|
164
|
-
end
|
165
159
|
end
|
166
160
|
|
167
161
|
test from: :g10_unauthorized_access,
|
@@ -267,17 +261,11 @@ module ONCCertificationG10TestKit
|
|
267
261
|
received_scopes: { name: :standalone_received_scopes }
|
268
262
|
},
|
269
263
|
options: {
|
270
|
-
scope_version: :v2
|
264
|
+
scope_version: :v2,
|
265
|
+
required_scope_type: 'patient',
|
266
|
+
required_scopes: ['openid', 'fhirUser', 'launch/patient', 'offline_access']
|
271
267
|
}
|
272
268
|
)
|
273
|
-
|
274
|
-
def required_scopes
|
275
|
-
['openid', 'fhirUser', 'launch/patient', 'offline_access']
|
276
|
-
end
|
277
|
-
|
278
|
-
def required_scope_type
|
279
|
-
'patient'
|
280
|
-
end
|
281
269
|
end
|
282
270
|
|
283
271
|
test from: :g10_unauthorized_access,
|
@@ -637,5 +637,55 @@ module ONCCertificationG10TestKit
|
|
637
637
|
pass refresh_token_refresh_notes if refresh_token_refresh_notes.present?
|
638
638
|
end
|
639
639
|
end
|
640
|
+
|
641
|
+
test do
|
642
|
+
required_suite_options G10Options::BULK_DATA_2_REQUIREMENT
|
643
|
+
title 'Health IT developer attested that the Health IT Module meets the ' \
|
644
|
+
'requirements for supporting the `_since` parameter for bulk data exports.'
|
645
|
+
description %(
|
646
|
+
Resources will be included in the response if their state has changed
|
647
|
+
after the supplied time (e.g., if `Resource.meta.lastUpdated` is later
|
648
|
+
than the supplied `_since` time). In the case of a Group level export, the
|
649
|
+
server MAY return additional resources modified prior to the supplied
|
650
|
+
time if the resources belong to the patient compartment of a patient
|
651
|
+
added to the Group after the supplied time (this behavior SHOULD be
|
652
|
+
clearly documented by the server). For Patient- and Group-level
|
653
|
+
requests, the server MAY return resources that are referenced by the
|
654
|
+
resources being returned regardless of when the referenced resources
|
655
|
+
were last updated. For resources where the server does not maintain a
|
656
|
+
last updated time, the server MAY include these resources in a response
|
657
|
+
irrespective of the _since value supplied by a client.
|
658
|
+
)
|
659
|
+
id :g10_bulk_v2_since_attestation
|
660
|
+
input :bulk_v2_since_attestation,
|
661
|
+
title: 'Health IT developer attested that the Health IT Module meets the ' \
|
662
|
+
'requirements for supporting the `_since` parameter for bulk data exports.',
|
663
|
+
type: 'radio',
|
664
|
+
default: 'false',
|
665
|
+
options: {
|
666
|
+
list_options: [
|
667
|
+
{
|
668
|
+
label: 'Yes',
|
669
|
+
value: 'true'
|
670
|
+
},
|
671
|
+
{
|
672
|
+
label: 'No',
|
673
|
+
value: 'false'
|
674
|
+
}
|
675
|
+
]
|
676
|
+
}
|
677
|
+
input :bulk_v2_since_attestation_notes,
|
678
|
+
title: 'Notes, if applicable:',
|
679
|
+
type: 'textarea',
|
680
|
+
optional: true
|
681
|
+
|
682
|
+
run do
|
683
|
+
assert bulk_v2_since_attestation == 'true',
|
684
|
+
'Health IT developer did not attest that the Health IT Module meets the ' \
|
685
|
+
'requirements for supporting the `_since` parameter for bulk data exports.'
|
686
|
+
|
687
|
+
pass bulk_v2_since_attestation_notes if bulk_v2_since_attestation_notes.present?
|
688
|
+
end
|
689
|
+
end
|
640
690
|
end
|
641
691
|
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: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen MacVicar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bloomer
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.4.
|
145
|
+
version: 0.4.6
|
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.4.
|
152
|
+
version: 0.4.6
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: database_cleaner-sequel
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,6 +250,9 @@ files:
|
|
250
250
|
- lib/onc_certification_g10_test_kit/authorization_request_builder.rb
|
251
251
|
- lib/onc_certification_g10_test_kit/base_token_refresh_group.rb
|
252
252
|
- lib/onc_certification_g10_test_kit/bulk_data_authorization.rb
|
253
|
+
- lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb
|
254
|
+
- lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb
|
255
|
+
- lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb
|
253
256
|
- lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb
|
254
257
|
- lib/onc_certification_g10_test_kit/bulk_data_group_export_stu2.rb
|
255
258
|
- lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb
|