service_base_url_test_kit 0.9.1 → 0.10.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7930c517e65b84c6011ba94dc5419c9d26548b931194bad1724bda2e26f632e6
|
4
|
+
data.tar.gz: d73dcf49c51873fb5aad07f079bc66b72d0912fea69e52d4a4e790bb167b6af2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d572a5d516ad116afc9787c4816493fb48788c89a163c4365ee664dd94bbd745a19eef429ae0095a13d2e7742113f64f134f80e399469798a60f08442c33157
|
7
|
+
data.tar.gz: b7b0e8b87f62e5ecedeaadb0b3693ec81d9a94dd6d916616fbef54d6c023c603e30f6eb6c12567a780686a2472c64348423b757ec40e45fb0fcb444ec4837251
|
@@ -6,14 +6,14 @@ module ServiceBaseURLTestKit
|
|
6
6
|
id :service_base_url_test_group
|
7
7
|
title 'Retrieve and Validate Service Base URL List'
|
8
8
|
description %(
|
9
|
-
Verify that the developer makes its Service Base URL
|
9
|
+
Verify that the developer makes its Service Base URL publication publicly available
|
10
10
|
in the Bundle resource format with valid Endpoint and Organization entries.
|
11
11
|
This test group will issue a HTTP GET request against the supplied URL to
|
12
12
|
retrieve the developer's Service Base URL list and ensure the list is
|
13
13
|
publicly accessible. It will then ensure that the returned service base URL
|
14
|
-
|
14
|
+
publication is in the Bundle resource format containing its service base URLs and
|
15
15
|
related organizational details in valid Endpoint and Organization resources
|
16
|
-
that follow the specifications detailed in the HTI-1 rule
|
16
|
+
that follow the specifications detailed in the HTI-1 rule and the API
|
17
17
|
Condition and Maintenance of Certification.
|
18
18
|
|
19
19
|
For systems that provide the service base URL Bundle at a URL, please run
|
@@ -3,10 +3,10 @@ module ServiceBaseURLTestKit
|
|
3
3
|
id :service_base_url_validate_list
|
4
4
|
title 'Validate Service Base URL List'
|
5
5
|
description %(
|
6
|
-
These tests ensure that the developer's Service Base URL
|
7
|
-
Bundle resource format, with its service base URLs and organizational
|
6
|
+
These tests ensure that the developer's Service Base URL publication is in
|
7
|
+
the Bundle resource format, with its service base URLs and organizational
|
8
8
|
details contained in valid Endpoint and Organization entries that follow
|
9
|
-
the specifications detailed in the HTI-1 rule
|
9
|
+
the specifications detailed in the HTI-1 rule and the API Condition and
|
10
10
|
Maintenance of Certification.
|
11
11
|
)
|
12
12
|
run_as_group
|
@@ -15,7 +15,7 @@ module ServiceBaseURLTestKit
|
|
15
15
|
title: 'Service Base URL List Bundle',
|
16
16
|
description: 'The developer\'s Service Base URL List in the JSON string format',
|
17
17
|
type: 'textarea'
|
18
|
-
|
18
|
+
|
19
19
|
# @private
|
20
20
|
def find_referenced_org(bundle_resource, endpoint_id)
|
21
21
|
bundle_resource
|
@@ -58,7 +58,7 @@ module ServiceBaseURLTestKit
|
|
58
58
|
The given Bundle does not contain any resources
|
59
59
|
)
|
60
60
|
end
|
61
|
-
end
|
61
|
+
end
|
62
62
|
end
|
63
63
|
|
64
64
|
# VALID ENDPOINT TESTS
|
@@ -79,7 +79,7 @@ module ServiceBaseURLTestKit
|
|
79
79
|
)
|
80
80
|
|
81
81
|
run do
|
82
|
-
|
82
|
+
|
83
83
|
skip_if bundle_response.blank?, 'No Bundle response was provided'
|
84
84
|
|
85
85
|
bundle_resource = FHIR.from_contents(bundle_response)
|
@@ -91,7 +91,7 @@ module ServiceBaseURLTestKit
|
|
91
91
|
'Endpoint': nil
|
92
92
|
}
|
93
93
|
)
|
94
|
-
|
94
|
+
|
95
95
|
endpoint_ids =
|
96
96
|
bundle_resource
|
97
97
|
.entry
|
@@ -105,7 +105,7 @@ module ServiceBaseURLTestKit
|
|
105
105
|
assert !endpoint_referenced_orgs.empty?, "Endpoint with id: #{endpoint_id} does not have any associated Organizations in the Bundle."
|
106
106
|
|
107
107
|
end
|
108
|
-
end
|
108
|
+
end
|
109
109
|
end
|
110
110
|
|
111
111
|
# ENDPOINT VALID URL TESTS
|
@@ -131,15 +131,17 @@ module ServiceBaseURLTestKit
|
|
131
131
|
.map(&:resource)
|
132
132
|
.select { |resource| resource.resourceType == 'Endpoint' }
|
133
133
|
.map(&:address)
|
134
|
+
.uniq
|
134
135
|
.each do |address|
|
135
|
-
assert_valid_http_uri(address)
|
136
|
+
assert_valid_http_uri(address)
|
136
137
|
|
137
138
|
address = address.delete_suffix("/")
|
138
|
-
get("#{address}/metadata", client: nil, headers: {'Accept': 'application/
|
139
|
+
get("#{address}/metadata", client: nil, headers: {'Accept': 'application/fhir+json'})
|
139
140
|
assert_response_status(200)
|
140
|
-
|
141
|
+
assert resource.present?, 'The content received does not appear to be a valid FHIR resource'
|
142
|
+
assert_resource_type(:capability_statement)
|
141
143
|
end
|
142
|
-
end
|
144
|
+
end
|
143
145
|
end
|
144
146
|
|
145
147
|
|
@@ -155,7 +157,7 @@ module ServiceBaseURLTestKit
|
|
155
157
|
- Contain must have elements including:
|
156
158
|
- active
|
157
159
|
- name
|
158
|
-
- Include the organization's name, location, and
|
160
|
+
- Include the organization's name, location, and facility identifier
|
159
161
|
- Use the endpoint field to reference Endpoints associated with the Organization:
|
160
162
|
- Must reference only Endpoint resources in the endpoint field
|
161
163
|
- Must reference at least one Endpoint resource in the endpoint field
|
@@ -174,7 +176,7 @@ module ServiceBaseURLTestKit
|
|
174
176
|
'Organization': nil
|
175
177
|
}
|
176
178
|
)
|
177
|
-
|
179
|
+
|
178
180
|
endpoint_ids =
|
179
181
|
bundle_resource
|
180
182
|
.entry
|
@@ -188,14 +190,14 @@ module ServiceBaseURLTestKit
|
|
188
190
|
assert !organization.endpoint.empty?, "Organization with id: #{organization.id} does not have the endpoint field populated"
|
189
191
|
assert !organization.address.empty?, "Organization with id: #{organization.id} does not have the address field populated"
|
190
192
|
|
191
|
-
|
193
|
+
|
192
194
|
for endpoint_id_ref in organization.endpoint.map(&:reference)
|
193
195
|
organization_referenced_endpts = find_referenced_endpoint(bundle_resource, endpoint_id_ref)
|
194
196
|
assert !organization_referenced_endpts.empty?, "Organization with id: #{organization.id} references an Endpoint that is not contained in this bundle."
|
195
|
-
|
197
|
+
|
196
198
|
end
|
197
|
-
end
|
198
|
-
end
|
199
|
+
end
|
200
|
+
end
|
199
201
|
end
|
200
202
|
end
|
201
|
-
end
|
203
|
+
end
|
@@ -7,49 +7,54 @@ module ServiceBaseURLTestKit
|
|
7
7
|
id :service_base_url
|
8
8
|
title 'Service Base URL Test Suite'
|
9
9
|
description %(
|
10
|
-
This
|
11
|
-
|
12
|
-
[
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
This Test Kit provides a set of tests that verify conformance of Service
|
11
|
+
Base URL publications to data format requirements as described in
|
12
|
+
[Conditions of Maintenance of Certification - Application programming
|
13
|
+
interfaces](https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-D/part-170/subpart-D/section-170.404#p-170.404(b)(2))
|
14
|
+
and the [ONC HTI-1 Final
|
15
|
+
Rule](https://www.healthit.gov/topic/laws-regulation-and-policy/health-data-technology-and-interoperability-certification-program).
|
16
|
+
Please review the [Application Programming Interfaces Certification Companion
|
17
|
+
Guide](https://www.healthit.gov/condition-ccg/application-programming-interfaces)
|
18
|
+
for additional guidance.
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
- Service based URLs are published in the Endpoint resource format
|
24
|
-
according to the standard adopted in § 170.215\(a\) - FHIR 4.0.1 release
|
25
|
-
- Organization details for each service base URL are published in the
|
26
|
-
Organization resource format according to the standard adopted in §
|
27
|
-
170.215\(a\) - FHIR 4.0.1 release
|
28
|
-
- Each Endpoint resource must:
|
29
|
-
- Have at least one Organization resource that references it in the Bundle
|
30
|
-
- Each Organization resource must:
|
31
|
-
- Have a populated Organization.endpoint field that contains
|
32
|
-
references to the Endpoint resources containing service base URLs
|
33
|
-
managed by this organization
|
34
|
-
- Contain the organization's name, location, and provider identifier
|
35
|
-
- Endpoint and Organization resources must be:
|
36
|
-
- Collected into a Bundle resource formatted according to the standard
|
37
|
-
adopted in FHIR v4.0.1: § 170.215\(a\) for publication
|
38
|
-
|
39
|
-
While these tests do not specifically verify conformance to
|
40
|
-
[Patient-Access
|
41
|
-
Brands](https://build.fhir.org/ig/HL7/smart-app-launch/brands.html) within
|
42
|
-
the draft SMART App Launch v2.2.0 standard, systems that implement that
|
43
|
-
standard should pass these tests. Please report an issue if there are any
|
44
|
-
problems.
|
45
|
-
|
46
|
-
The tests within this test kit are available for developers that would
|
47
|
-
like to evaluate their service list against the specified format. This is
|
48
|
-
a draft set of tests and may contain errors or issues. Please provide
|
49
|
-
feedback on these tests by reporting an issue in
|
20
|
+
This Test Kit is provided as a tool to help developers identify potential issues
|
21
|
+
or problems with the structure of their Service Base URL publication. Test
|
22
|
+
failures do not necessarily indicate non-conformance to the Conditions of
|
23
|
+
Maintenance of Certification. Use of these tests is not required. Please
|
24
|
+
provide feedback on these tests by reporting an issue in
|
50
25
|
[GitHub](https://github.com/inferno-framework/service-base-url-test-kit/issues),
|
51
26
|
or by reaching out to the team on the [Inferno FHIR Zulip
|
52
27
|
channel](https://chat.fhir.org/#narrow/stream/179309-inferno).
|
28
|
+
|
29
|
+
Relevant requirements from the Conditions of [Maintenance of Certification -
|
30
|
+
Application programming interfaces](https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-D/part-170/subpart-D/section-170.404#p-170.404(b)(2)):
|
31
|
+
|
32
|
+
Service Base URL publication:
|
33
|
+
|
34
|
+
For all Health IT Modules certified to § 170.315(g)(10), a Certified API
|
35
|
+
Developer must publish, at no charge, the service base URLs and related
|
36
|
+
organization details that can be used by patients to access their
|
37
|
+
electronic health information, by December 31, 2024. This includes all
|
38
|
+
customers regardless of whether the Health IT Modules certified to §
|
39
|
+
170.315(g)(10) are centrally managed by the Certified API Developer or
|
40
|
+
locally deployed by an API Information Source. These service base URLs and
|
41
|
+
organization details must conform to the following:
|
42
|
+
|
43
|
+
- Service base URLs must be publicly published in Endpoint resource format
|
44
|
+
according to the standard adopted in § 170.215(a) (FHIR v4.0.1).
|
45
|
+
- Organization details for each service base URL must be publicly published in Organization
|
46
|
+
resource format according to the standard adopted in § 170.215(a) (FHIR v4.0.1). Each
|
47
|
+
Organization resource must contain:
|
48
|
+
- A reference, in the Organization endpoint element, to the Endpoint
|
49
|
+
resources containing service base URLs managed by this organization.
|
50
|
+
- The organization’s name, location, and facility identifier.
|
51
|
+
- Endpoint and Organization resources must be:
|
52
|
+
- Collected into a Bundle resource formatted according to the standard
|
53
|
+
adopted in § 170.215(a) (FHIR v4.0.1) for publication;
|
54
|
+
- and Reviewed quarterly and, as
|
55
|
+
necessary, updated.
|
56
|
+
|
57
|
+
|
53
58
|
)
|
54
59
|
version VERSION
|
55
60
|
|
@@ -80,12 +85,15 @@ module ServiceBaseURLTestKit
|
|
80
85
|
route :get, File.join('/examples/', filename), my_bundle_route_handler
|
81
86
|
end
|
82
87
|
|
83
|
-
|
84
|
-
|
85
|
-
|
88
|
+
VALIDATION_MESSAGE_FILTERS = [
|
89
|
+
/A resource should have narrative for robust management/,
|
90
|
+
/\A\S+: \S+: URL value '.*' does not resolve/
|
91
|
+
]
|
86
92
|
|
93
|
+
# All FHIR validation requests will use this FHIR validator
|
94
|
+
fhir_resource_validator :default do
|
87
95
|
exclude_message do |message|
|
88
|
-
|
96
|
+
VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
|
89
97
|
end
|
90
98
|
end
|
91
99
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_base_url_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inferno Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.4.
|
19
|
+
version: 0.4.37
|
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.4.
|
26
|
+
version: 0.4.37
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: database_cleaner-sequel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|