service_base_url_test_kit 0.11.0 → 0.11.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 +10 -13
- data/lib/service_base_url_test_kit/service_base_url_validate_group.rb +36 -12
- data/lib/service_base_url_test_kit/version.rb +1 -1
- data/lib/service_base_url_test_kit.rb +7 -5
- metadata +4 -5
- 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: 748b6e8e1419df212293e1e3c50cca2f5667b5452b8028af463795cd7ec9e3a0
|
4
|
+
data.tar.gz: c3f9455cc98c71b0cd2594942dfaff8be0f473964810c996f1bb8d8435e83414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84bac767ad36fa3ec2ef0364187dfb05f69702ff03ac6ab7cb1319e4a6d0ba5dfd5b1e7cd50dc00c84266ae2ccd44ca12ade440c8775308f8167a6e6d8a3a3c3
|
7
|
+
data.tar.gz: e268c09aeaf98dc7003aceed782ae98a438407637e35c0ff0b670abf1459c829884bca8a370afdc69a52abb9af3957faab4f145c0c421e6427159a13746f186e
|
@@ -6,22 +6,19 @@ module ServiceBaseURLTestKit
|
|
6
6
|
id :service_base_url_test_group
|
7
7
|
title 'Validate Service Base URL Publication'
|
8
8
|
description %(
|
9
|
-
Verify that the developer makes its Service Base URL publication publicly available
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
related organizational details in valid Endpoint and Organization resources
|
16
|
-
that follow the specifications detailed in the HTI-1 rule and the API
|
17
|
-
Condition and Maintenance of Certification.
|
9
|
+
Verify that the developer makes its Service Base URL publication publicly available in the Bundle resource format
|
10
|
+
with valid Endpoint and Organization entries. This test group will issue a HTTP GET request against the supplied
|
11
|
+
URL to retrieve the developer's Service Base URL publication and ensure the list is publicly accessible. It will
|
12
|
+
then ensure that the returned service base URL publication is in the Bundle resource format containing its service
|
13
|
+
base URLs and related organizational details in valid Endpoint and Organization resources that follow the
|
14
|
+
specifications detailed in the HTI-1 rule and the API Condition and Maintenance of Certification.
|
18
15
|
|
19
16
|
For systems that provide the service base URL Bundle at a URL, please run
|
20
17
|
this test with the Service Base URL Publication URL input populated and the Service Base URL Publication Bundle
|
21
|
-
input left blank. While it is the expectation of the specification for the service base URL Bundle to be served at
|
22
|
-
public-facing endpoint, testers can validate a Service Base URL Bundle not served at a public endpoint by
|
23
|
-
these tests with the Service Base URL Publication Bundle input populated and the Service Base URL
|
24
|
-
input left blank.
|
18
|
+
input left blank. While it is the expectation of the specification for the service base URL Bundle to be served at
|
19
|
+
a public-facing endpoint, testers can validate a Service Base URL Bundle not served at a public endpoint by
|
20
|
+
running these tests with the Service Base URL Publication Bundle input populated and the Service Base URL
|
21
|
+
Publication URL input left blank.
|
25
22
|
)
|
26
23
|
|
27
24
|
input_instructions <<~INSTRUCTIONS
|
@@ -76,6 +76,14 @@ module ServiceBaseURLTestKit
|
|
76
76
|
.select { |endpoint_id| endpoint_id_ref.include? endpoint_id }
|
77
77
|
end
|
78
78
|
|
79
|
+
def find_parent_organization(bundle_resource, org_reference)
|
80
|
+
bundle_resource
|
81
|
+
.entry
|
82
|
+
.map(&:resource)
|
83
|
+
.select { |resource| resource.resourceType == 'Organization' }
|
84
|
+
.find { |parent_org| org_reference.include? parent_org.id }
|
85
|
+
end
|
86
|
+
|
79
87
|
def skip_message
|
80
88
|
%(
|
81
89
|
No Service Base URL request was made in the previous test, and no Service Base URL Publication Bundle
|
@@ -274,10 +282,13 @@ module ServiceBaseURLTestKit
|
|
274
282
|
- active
|
275
283
|
- name
|
276
284
|
- Include the organization's name, location, and facility identifier
|
277
|
-
-
|
278
|
-
-
|
279
|
-
|
280
|
-
|
285
|
+
- For Endpoint information, the Organization must either:
|
286
|
+
- Use the endpoint field to reference Endpoints associated with the Organization
|
287
|
+
- Must reference only Endpoint resources in the endpoint field
|
288
|
+
- Must reference at least one Endpoint resource in the endpoint field
|
289
|
+
- Must reference only Endpoints that are contained in the Service Base URL Bundle
|
290
|
+
- Use the partOf field to reference a parent Organization that already contains the applicable endpoint
|
291
|
+
information in its own "Organization.endpoint" element
|
281
292
|
)
|
282
293
|
|
283
294
|
run do
|
@@ -313,18 +324,31 @@ module ServiceBaseURLTestKit
|
|
313
324
|
end
|
314
325
|
|
315
326
|
organization_resources.each do |organization|
|
316
|
-
assert !organization.endpoint.empty?,
|
317
|
-
"Organization with id: #{organization.id} does not have the endpoint field populated"
|
318
327
|
assert !organization.address.empty?,
|
319
328
|
"Organization with id: #{organization.id} does not have the address field populated"
|
320
329
|
|
321
|
-
|
330
|
+
if organization.endpoint.empty?
|
331
|
+
assert organization.partOf.present?, %(
|
332
|
+
Organization with id: #{organization.id} does not have the endpoint or partOf field populated
|
333
|
+
)
|
334
|
+
parent_organization = find_parent_organization(bundle_resource, organization.partOf.reference)
|
335
|
+
assert(parent_organization.present?, %(
|
336
|
+
Organization with id: #{organization.id} references parent Organization not found in the Bundle:
|
337
|
+
#{organization.partOf.reference}
|
338
|
+
))
|
339
|
+
assert(!parent_organization.endpoint.empty?, %(
|
340
|
+
Organization with id: #{organization.id} has parent Organization with id: #{parent_organization.id} that
|
341
|
+
does not have the `endpoint` field populated.
|
342
|
+
))
|
343
|
+
else
|
344
|
+
endpoint_references = organization.endpoint.map(&:reference)
|
322
345
|
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
346
|
+
endpoint_references.each do |endpoint_id_ref|
|
347
|
+
organization_referenced_endpts = find_referenced_endpoint(bundle_resource, endpoint_id_ref)
|
348
|
+
assert !organization_referenced_endpts.empty?,
|
349
|
+
"Organization with id: #{organization.id} references an Endpoint that is not contained in this
|
350
|
+
bundle."
|
351
|
+
end
|
328
352
|
end
|
329
353
|
end
|
330
354
|
end
|
@@ -47,14 +47,16 @@ module ServiceBaseURLTestKit
|
|
47
47
|
- Organization details for each service base URL must be publicly published in Organization
|
48
48
|
resource format according to the standard adopted in § 170.215(a) (FHIR v4.0.1). Each
|
49
49
|
Organization resource must contain:
|
50
|
-
- A reference, in the Organization endpoint element, to the Endpoint
|
51
|
-
resources containing service base URLs managed by this organization.
|
52
50
|
- The organization's name, location, and facility identifier.
|
51
|
+
- Either:
|
52
|
+
- A reference, in the Organization endpoint element, to the Endpoint
|
53
|
+
resources containing service base URLs managed by this organization
|
54
|
+
- A reference, in the Organization partOf element, to the parent Organization that contains the applicable
|
55
|
+
endpoint information in its own "Organization.endpoint" element
|
53
56
|
- Endpoint and Organization resources must be:
|
54
57
|
- Collected into a Bundle resource formatted according to the standard
|
55
|
-
adopted in § 170.215(a) (FHIR v4.0.1) for publication
|
56
|
-
-
|
57
|
-
necessary, updated.
|
58
|
+
adopted in § 170.215(a) (FHIR v4.0.1) for publication
|
59
|
+
- Reviewed quarterly and, as necessary, updated.
|
58
60
|
|
59
61
|
|
60
62
|
)
|
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.11.
|
4
|
+
version: 0.11.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-11-06 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.
|
19
|
+
version: 0.5.0
|
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.
|
26
|
+
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: database_cleaner-sequel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|
@@ -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
|
-
}
|