service_base_url_test_kit 0.11.0 → 0.12.0

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: 638bed4317d3630a7ffdfbc9cef4be2dc266ab285de017d890a1ceadec4858fc
4
- data.tar.gz: fab6cb020b68f87db82348891f3b80eb0d5e3bc9181639c9bf1b5a9505611de4
3
+ metadata.gz: e91f9cae9a6fea650a22c5b41fe94c40602926a05f6b3c0c41873cb7bed5a0f8
4
+ data.tar.gz: 0c2dffafe8294da0b5552f3bb89ba7efa77d91ad6e982d010349248c78a98dfe
5
5
  SHA512:
6
- metadata.gz: 61b58536e24b25039953dc99cc4a507202c08297a8be0f70edb0d340ec0fa77824dbaee0de8be5bb548306eaf5c0e5b47dc143405882ebb5f91537bd258ccb68
7
- data.tar.gz: 1fccec1d67cb3642771fa89360e90b3ad9f157bed70d35ee5beb09324cc5b649f74554638df4202834ffba3ca43c1578751477df79eb7c626707371ace21d205
6
+ metadata.gz: e29145b7ad925d1a511b3706d15ecd9411c819561adc94589c8b956b9736e1c68f4f9e583c3f4439b201d972ec16e47ed821fedaeb03922949391038b729a2d1
7
+ data.tar.gz: fdcdac8c678ea131b6e94772a32817a11fd064d99af05dd6d2146e37f310d08ef25144e7925f551b291f267d43f9a8111ecf50495c9ee39a76fc8db9d2957d81
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "Example Service Base URL",
3
+ "id": null,
4
+ "test_suite_id": "service_base_url",
5
+ "inputs": [
6
+ {
7
+ "name": "service_base_url_publication_url",
8
+ "value": "<%= Inferno::Application['base_url'] %>/custom/service_base_url/examples/testBundleValid.json",
9
+ "title": "Service Base URL Publication URL",
10
+ "type": "text"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,79 @@
1
+ module ServiceBaseURLTestKit
2
+ class Metadata < Inferno::TestKit
3
+ id :service_base_url_test_kit
4
+ title 'Service Base URL Test Kit'
5
+ suite_ids ['service_base_url']
6
+ tags ['Endpoint Publication']
7
+ last_updated ::ServiceBaseURLTestKit::LAST_UPDATED
8
+ version ::ServiceBaseURLTestKit::VERSION
9
+ maturity 'Medium'
10
+ authors ['Inferno Team']
11
+ repo 'https://github.com/inferno-framework/service-base-url-test-kit'
12
+ description <<~DESCRIPTION
13
+ The Service Base URL Test Kit provides a set of tests that verify
14
+ conformance of Service Base URL publications to data format requirements
15
+ as described in
16
+ [Conditions and Maintenance of Certification - 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))
17
+ and the
18
+ [ONC HTI-1 Final Rule](https://www.healthit.gov/topic/laws-regulation-and-policy/health-data-technology-and-interoperability-certification-program).
19
+ Please review the
20
+ [Application Programming Interfaces Certification Companion Guide](https://www.healthit.gov/condition-ccg/application-programming-interfaces)
21
+ for additional guidance. <!-- break -->This Test Kit is provided as a tool
22
+ to help developers identify potential issues or problems with the
23
+ structure of their Service Base URL publication. Test failures do not
24
+ necessarily indicate non-conformance to the Conditions and Maintenance of
25
+ Certification. Use of these tests is not required for participants of the
26
+ ONC Health IT Certification Program. Please provide feedback on these
27
+ tests by reporting an issue in
28
+ [GitHub](https://github.com/inferno-framework/service-base-url-test-kit/issues),
29
+ or by reaching out to the team on the
30
+ [Inferno FHIR Zulip channel](https://chat.fhir.org/#narrow/stream/179309-inferno).
31
+
32
+ This Test Kit specifically targets requirements provided within the Conditions
33
+ and Maintenance of Certification. Testing for the related
34
+ [SMART User-access Brands and Endpoints](http://hl7.org/fhir/smart-app-launch/STU2.2/brands.html)
35
+ specification is provided separately within the
36
+ [SMART App Launch Test Kit](https://inferno.healthit.gov/test-kits/smart-app-launch).
37
+
38
+ Relevant requirements from the Conditions and Maintenance of
39
+ Certification - Application programming interfaces:
40
+
41
+ **Service Base URL publication:**
42
+
43
+ For all Health IT Modules certified to § 170.315(g)(10), a Certified API
44
+ Developer must publish, at no charge, the service base URLs and related
45
+ organization details that can be used by patients to access their
46
+ electronic health information, by December 31, 2024. This includes all
47
+ customers regardless of whether the Health IT Modules certified
48
+ to § 170.315(g)(10) are centrally managed by the Certified API Developer
49
+ or locally deployed by an API Information Source. These service base URLs
50
+ and organization details must conform to the following:
51
+
52
+ - Service base URLs must be publicly published in Endpoint resource format
53
+ according to the standard adopted in § 170.215(a) (FHIR v4.0.1).
54
+ - Organization details for each service base URL must be publicly
55
+ published in Organization resource format according to the standard
56
+ adopted in § 170.215(a) (FHIR v4.0.1). Each Organization resource must
57
+ contain:
58
+ + A reference, in the Organization endpoint element, to the Endpoint resources containing service base URLs managed by this organization.
59
+ + The organization’s name, location, and facility identifier.
60
+ - Endpoint and Organization resources must be:
61
+ + Collected into a Bundle resource formatted according to the standard adopted in § 170.215(a) (FHIR v4.0.1) for publication;
62
+ + and Reviewed quarterly and, as necessary, updated.
63
+
64
+ ## Providing Feedback and Reporting Issues
65
+
66
+ We welcome feedback on the tests, including but not limited to the following areas:
67
+
68
+ - Validation logic, such as potential bugs, lax checks, and unexpected failures.
69
+ - Requirements coverage, such as requirements that have been missed, tests that
70
+ necessitate features that the IG does not require, or other issues with the
71
+ interpretation of the IG’s requirements.
72
+ - User experience, such as confusing or missing information in the test UI.
73
+
74
+ Please report any issues with this set of tests in the
75
+ [issues section](https://github.com/inferno-framework/service-base-url-test-kit/issues)
76
+ of the source code repository.
77
+ DESCRIPTION
78
+ end
79
+ end
@@ -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
- in the Bundle resource format with valid Endpoint and Organization entries.
11
- This test group will issue a HTTP GET request against the supplied URL to
12
- retrieve the developer's Service Base URL publication and ensure the list is
13
- publicly accessible. It will then ensure that the returned service base URL
14
- publication is in the Bundle resource format containing its service base URLs and
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 a
22
- public-facing endpoint, testers can validate a Service Base URL Bundle not served at a public endpoint by running
23
- these tests with the Service Base URL Publication Bundle input populated and the Service Base URL Publication 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
- - Use the endpoint field to reference Endpoints associated with the Organization:
278
- - Must reference only Endpoint resources in the endpoint field
279
- - Must reference at least one Endpoint resource in the endpoint field
280
- - Must reference only Endpoints that are contained in the Service Base URL Bundle
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
- endpoint_references = organization.endpoint.map(&:reference)
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
- endpoint_references.each do |endpoint_id_ref|
324
- organization_referenced_endpts = find_referenced_endpoint(bundle_resource, endpoint_id_ref)
325
- assert !organization_referenced_endpts.empty?,
326
- "Organization with id: #{organization.id} references an Endpoint that is not contained in this
327
- bundle."
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
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ServiceBaseURLTestKit
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
+ LAST_UPDATED = '2025-02-15'
5
6
  end
@@ -1,4 +1,4 @@
1
- require_relative 'service_base_url_test_kit/version'
1
+ require_relative 'service_base_url_test_kit/metadata'
2
2
  require_relative 'service_base_url_test_kit/service_base_url_test_group'
3
3
  require 'erb'
4
4
 
@@ -47,18 +47,19 @@ 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
- - and Reviewed quarterly and, as
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
  )
61
- version VERSION
62
63
 
63
64
  input_instructions <<~INSTRUCTIONS
64
65
  For systems that make their Service Base URL Bundle available at a public endpoint, please input
@@ -79,6 +80,10 @@ module ServiceBaseURLTestKit
79
80
  label: 'Open Source',
80
81
  url: 'https://github.com/inferno-framework/service-base-url-test-kit'
81
82
  },
83
+ {
84
+ label: 'Download',
85
+ url: 'https://github.com/inferno-framework/service-base-url-test-kit/releases'
86
+ },
82
87
  {
83
88
  label: 'Service base URL requirements',
84
89
  url: 'https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-D/part-170/subpart-D/section-170.404#p-170.404(b)(2)'
metadata CHANGED
@@ -1,29 +1,29 @@
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.0
4
+ version: 0.12.0
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-09-10 00:00:00.000000000 Z
11
+ date: 2025-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.37
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.4.37
26
+ version: 0.6.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: database_cleaner-sequel
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -88,10 +88,12 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - LICENSE
91
+ - config/presets/service_base_url_local_host_endpoint_list_preset.json.erb
91
92
  - lib/service_base_url_test_kit.rb
92
93
  - lib/service_base_url_test_kit/examples/CapabilityStatement.json
93
- - lib/service_base_url_test_kit/examples/SmartAccessBrand.json.erb
94
94
  - lib/service_base_url_test_kit/examples/testBundleValid.json.erb
95
+ - lib/service_base_url_test_kit/igs/put_ig_package_dot_tgz_here
96
+ - lib/service_base_url_test_kit/metadata.rb
95
97
  - lib/service_base_url_test_kit/service_base_url_retrieve_group.rb
96
98
  - lib/service_base_url_test_kit/service_base_url_test_group.rb
97
99
  - lib/service_base_url_test_kit/service_base_url_validate_group.rb
@@ -102,6 +104,7 @@ licenses:
102
104
  metadata:
103
105
  homepage_uri: https://github.com/inferno-framework/service-base-url-test-kit
104
106
  source_code_uri: https://github.com/inferno-framework/service-base-url-test-kit
107
+ inferno_test_kit: 'true'
105
108
  post_install_message:
106
109
  rdoc_options: []
107
110
  require_paths:
@@ -110,14 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
113
  requirements:
111
114
  - - ">="
112
115
  - !ruby/object:Gem::Version
113
- version: 3.1.2
116
+ version: 3.3.6
114
117
  required_rubygems_version: !ruby/object:Gem::Requirement
115
118
  requirements:
116
119
  - - ">="
117
120
  - !ruby/object:Gem::Version
118
121
  version: '0'
119
122
  requirements: []
120
- rubygems_version: 3.5.10
123
+ rubygems_version: 3.5.22
121
124
  signing_key:
122
125
  specification_version: 4
123
126
  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
- }