service_base_url_test_kit 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/service_base_url_test_kit/service_base_url_test_group.rb +3 -3
- data/lib/service_base_url_test_kit/service_base_url_validate_group.rb +21 -19
- data/lib/service_base_url_test_kit/version.rb +1 -1
- data/lib/service_base_url_test_kit.rb +44 -39
- metadata +3 -4
- data/lib/service_base_url_test_kit/examples/SmartAccessBrand.json.erb +0 -105
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
|
|
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.10.
|
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
|
@@ -90,7 +90,6 @@ files:
|
|
90
90
|
- LICENSE
|
91
91
|
- lib/service_base_url_test_kit.rb
|
92
92
|
- lib/service_base_url_test_kit/examples/CapabilityStatement.json
|
93
|
-
- lib/service_base_url_test_kit/examples/SmartAccessBrand.json.erb
|
94
93
|
- lib/service_base_url_test_kit/examples/testBundleValid.json.erb
|
95
94
|
- lib/service_base_url_test_kit/service_base_url_retrieve_group.rb
|
96
95
|
- lib/service_base_url_test_kit/service_base_url_test_group.rb
|
@@ -117,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
116
|
- !ruby/object:Gem::Version
|
118
117
|
version: '0'
|
119
118
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
119
|
+
rubygems_version: 3.3.7
|
121
120
|
signing_key:
|
122
121
|
specification_version: 4
|
123
122
|
summary: Inferno Service Base URL Test Kit
|
@@ -1,105 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"resourceType" : "Bundle",
|
3
|
-
"id" : "example1",
|
4
|
-
"type" : "collection",
|
5
|
-
"timestamp" : "2023-09-05T20:00:43.241070-07:00",
|
6
|
-
"entry" : [{
|
7
|
-
"fullUrl" : "https://fhir.labs.example.com/Organization/examplelabs",
|
8
|
-
"resource" : {
|
9
|
-
"resourceType" : "Organization",
|
10
|
-
"id" : "examplelabs",
|
11
|
-
"extension" : [{
|
12
|
-
"extension" : [{
|
13
|
-
"url" : "brandLogo",
|
14
|
-
"valueUrl" : "https://labs.example.com/images/logo.svg"
|
15
|
-
}],
|
16
|
-
"url" : "http://hl7.org/fhir/StructureDefinition/organization-brand"
|
17
|
-
},
|
18
|
-
{
|
19
|
-
"extension" : [{
|
20
|
-
"url" : "portalName",
|
21
|
-
"valueString" : "Example Labs HealthCentral Portal"
|
22
|
-
},
|
23
|
-
{
|
24
|
-
"url" : "portalUrl",
|
25
|
-
"valueUrl" : "https://healthcentral.labs.example.com"
|
26
|
-
},
|
27
|
-
{
|
28
|
-
"url" : "portalLogo",
|
29
|
-
"valueUrl" : "https://healthcentral.labs.example.com/logo.png"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"url" : "portalEndpoint",
|
33
|
-
"valueReference" : {
|
34
|
-
"reference" : "Endpoint/examplelabs",
|
35
|
-
"display" : "FHIR R4 Endpoint for ExampleLabs Brand"
|
36
|
-
}
|
37
|
-
}],
|
38
|
-
"url" : "http://hl7.org/fhir/StructureDefinition/organization-portal"
|
39
|
-
}],
|
40
|
-
"identifier" : [{
|
41
|
-
"system" : "urn:ietf:rfc:3986",
|
42
|
-
"value" : "https://examplelabs.org"
|
43
|
-
}],
|
44
|
-
"active" : true,
|
45
|
-
"type" : [{
|
46
|
-
"coding" : [{
|
47
|
-
"system" : "http://hl7.org/fhir/smart-app-launch/CodeSystem/patient-access-category",
|
48
|
-
"code" : "laboratory",
|
49
|
-
"display" : "Laboratory"
|
50
|
-
}]
|
51
|
-
}],
|
52
|
-
"name" : "ExampleLabs",
|
53
|
-
"alias" : ["ExampleLabs Alaska",
|
54
|
-
"...(more here)...",
|
55
|
-
"ExampleLabs Wisconsin"],
|
56
|
-
"telecom" : [{
|
57
|
-
"system" : "url",
|
58
|
-
"value" : "https://labs.example.com"
|
59
|
-
}],
|
60
|
-
"address" : [{
|
61
|
-
"line" : ["4015 Lake Otis Pkwy"],
|
62
|
-
"city" : "Anchorage",
|
63
|
-
"state" : "AK",
|
64
|
-
"postalCode" : "99508"
|
65
|
-
},
|
66
|
-
{
|
67
|
-
"state" : "...(more here)..."
|
68
|
-
},
|
69
|
-
{
|
70
|
-
"line" : ["123 Main St"],
|
71
|
-
"city" : "Madison",
|
72
|
-
"state" : "WI",
|
73
|
-
"postalCode" : "53726"
|
74
|
-
}]
|
75
|
-
}
|
76
|
-
},
|
77
|
-
{
|
78
|
-
"fullUrl" : "https://fhir.labs.example.com/Endpoint/examplelabs",
|
79
|
-
"resource" : {
|
80
|
-
"resourceType" : "Endpoint",
|
81
|
-
"id" : "examplelabs",
|
82
|
-
"extension" : [{
|
83
|
-
"url" : "http://hl7.org/fhir/StructureDefinition/endpoint-fhir-version",
|
84
|
-
"valueCode" : "4.0.1"
|
85
|
-
}],
|
86
|
-
"status" : "active",
|
87
|
-
"connectionType" : {
|
88
|
-
"system" : "http://terminology.hl7.org/CodeSystem/endpoint-connection-type",
|
89
|
-
"code" : "hl7-fhir-rest"
|
90
|
-
},
|
91
|
-
"name" : "FHIR R4 Endpoint for ExampleLabs",
|
92
|
-
"contact" : [{
|
93
|
-
"system" : "url",
|
94
|
-
"value" : "https://dev-portal.labs.example.com"
|
95
|
-
}],
|
96
|
-
"payloadType" : [{
|
97
|
-
"coding" : [{
|
98
|
-
"system" : "http://terminology.hl7.org/CodeSystem/endpoint-payload-type",
|
99
|
-
"code" : "none"
|
100
|
-
}]
|
101
|
-
}],
|
102
|
-
"address" : "<%= ENV['INFERNO_HOST'] %>/custom/service_base_url_test_kit_suite/examples/CapabilityStatement"
|
103
|
-
}
|
104
|
-
}]
|
105
|
-
}
|