Skip to content

Commit

Permalink
FI-3648 Add metadata and make platform deployable (#40)
Browse files Browse the repository at this point in the history
* impl platform deployment spec wip

* impl failing rspecs

* debug

* rm unnecessary require version

* use inferno core >=0.6.4

* gemfile lock
  • Loading branch information
Shaumik-Ashraf authored Feb 25, 2025
1 parent 1eb303e commit 6afd0bc
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
ruby-version: ['3.3.6']

steps:
- uses: actions/checkout@v2
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
ruby-version: ['3.3.6']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.3.6
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.1.2
ruby 3.3.6
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2
FROM ruby:3.3.6

ENV INSTALL_PATH=/opt/inferno/
ENV APP_ENV=production
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ gemspec

group :development, :test do
gem 'debug'
gem 'rack-test', '~> 2.2'
end
8 changes: 6 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
service_base_url_test_kit (0.11.1)
inferno_core (~> 0.5.0)
inferno_core (>= 0.6.4)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -132,10 +132,11 @@ GEM
domain_name (~> 0.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
inferno_core (0.5.0)
inferno_core (0.6.4)
activesupport (~> 6.1.7.5)
base62-rb (= 0.3.1)
blueprinter (= 0.25.2)
concurrent-ruby (= 1.3.4)
dotenv (~> 2.7)
dry-configurable (= 1.0.0)
dry-container (= 0.10.0)
Expand Down Expand Up @@ -217,6 +218,8 @@ GEM
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.10)
rack-test (2.2.0)
rack (>= 1.3)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
Expand Down Expand Up @@ -294,6 +297,7 @@ DEPENDENCIES
database_cleaner-sequel (~> 1.8)
debug
factory_bot (~> 6.1)
rack-test (~> 2.2)
rspec (~> 3.10)
service_base_url_test_kit!
webmock (~> 3.11)
Expand Down
7 changes: 5 additions & 2 deletions lib/service_base_url_test_kit.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative 'service_base_url_test_kit/version'
require_relative 'service_base_url_test_kit/metadata'
require_relative 'service_base_url_test_kit/service_base_url_test_group'
require 'erb'

Expand Down Expand Up @@ -60,7 +60,6 @@ class ServiceBaseURLTestSuite < Inferno::TestSuite
)
version VERSION

input_instructions <<~INSTRUCTIONS
For systems that make their Service Base URL Bundle available at a public endpoint, please input
Expand All @@ -81,6 +80,10 @@ class ServiceBaseURLTestSuite < Inferno::TestSuite
label: 'Open Source',
url: 'https://github.com/inferno-framework/service-base-url-test-kit'
},
{
label: 'Download',
url: 'https://github.com/inferno-framework/service-base-url-test-kit/releases'
},
{
label: 'Service base URL requirements',
url: 'https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-D/part-170/subpart-D/section-170.404#p-170.404(b)(2)'
Expand Down
79 changes: 79 additions & 0 deletions lib/service_base_url_test_kit/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
module ServiceBaseURLTestKit
class Metadata < Inferno::TestKit
id :service_base_url_test_kit
title 'Service Base URL Test Kit'
suite_ids ['service_base_url']
tags ['Endpoint Publication']
last_updated ::ServiceBaseURLTestKit::LAST_UPDATED
version ::ServiceBaseURLTestKit::VERSION
maturity 'Medium'
authors ['Inferno Team']
repo 'https://github.com/inferno-framework/service-base-url-test-kit'
description <<~DESCRIPTION
The Service Base URL Test Kit provides a set of tests that verify
conformance of Service Base URL publications to data format requirements
as described in
[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))
and the
[ONC HTI-1 Final Rule](https://www.healthit.gov/topic/laws-regulation-and-policy/health-data-technology-and-interoperability-certification-program).
Please review the
[Application Programming Interfaces Certification Companion Guide](https://www.healthit.gov/condition-ccg/application-programming-interfaces)
for additional guidance. <!-- break -->This Test Kit is provided as a tool
to help developers identify potential issues or problems with the
structure of their Service Base URL publication. Test failures do not
necessarily indicate non-conformance to the Conditions and Maintenance of
Certification. Use of these tests is not required for participants of the
ONC Health IT Certification Program. Please provide feedback on these
tests by reporting an issue in
[GitHub](https://github.com/inferno-framework/service-base-url-test-kit/issues),
or by reaching out to the team on the
[Inferno FHIR Zulip channel](https://chat.fhir.org/#narrow/stream/179309-inferno).
This Test Kit specifically targets requirements provided within the Conditions
and Maintenance of Certification. Testing for the related
[SMART User-access Brands and Endpoints](http://hl7.org/fhir/smart-app-launch/STU2.2/brands.html)
specification is provided separately within the
[SMART App Launch Test Kit](https://inferno.healthit.gov/test-kits/smart-app-launch).
Relevant requirements from the Conditions and Maintenance of
Certification - Application programming interfaces:
**Service Base URL publication:**
For all Health IT Modules certified to § 170.315(g)(10), a Certified API
Developer must publish, at no charge, the service base URLs and related
organization details that can be used by patients to access their
electronic health information, by December 31, 2024. This includes all
customers regardless of whether the Health IT Modules certified
to § 170.315(g)(10) are centrally managed by the Certified API Developer
or locally deployed by an API Information Source. These service base URLs
and organization details must conform to the following:
- Service base URLs must be publicly published in Endpoint resource format
according to the standard adopted in § 170.215(a) (FHIR v4.0.1).
- Organization details for each service base URL must be publicly
published in Organization resource format according to the standard
adopted in § 170.215(a) (FHIR v4.0.1). Each Organization resource must
contain:
+ A reference, in the Organization endpoint element, to the Endpoint resources containing service base URLs managed by this organization.
+ The organization’s name, location, and facility identifier.
- Endpoint and Organization resources must be:
+ Collected into a Bundle resource formatted according to the standard adopted in § 170.215(a) (FHIR v4.0.1) for publication;
+ and Reviewed quarterly and, as necessary, updated.
## Providing Feedback and Reporting Issues
We welcome feedback on the tests, including but not limited to the following areas:
- Validation logic, such as potential bugs, lax checks, and unexpected failures.
- Requirements coverage, such as requirements that have been missed, tests that
necessitate features that the IG does not require, or other issues with the
interpretation of the IG’s requirements.
- User experience, such as confusing or missing information in the test UI.
Please report any issues with this set of tests in the
[issues section](https://github.com/inferno-framework/service-base-url-test-kit/issues)
of the source code repository.
DESCRIPTION
end
end
3 changes: 2 additions & 1 deletion lib/service_base_url_test_kit/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

module ServiceBaseURLTestKit
VERSION = '0.11.1'
VERSION = '0.11.1' # TODO breaking change
LAST_UPDATED = '2024-11-06'
end
13 changes: 4 additions & 9 deletions service_base_url_test_kit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@ Gem::Specification.new do |spec|
spec.description = 'Inferno Service Base URL Test Kit'
spec.homepage = 'https://github.com/inferno-framework/service-base-url-test-kit'
spec.license = 'Apache-2.0'
spec.add_runtime_dependency 'inferno_core', '~> 0.5.0'
spec.add_runtime_dependency 'inferno_core', '>= 0.6.4'
spec.add_development_dependency 'database_cleaner-sequel', '~> 1.8'
spec.add_development_dependency 'factory_bot', '~> 6.1'
spec.add_development_dependency 'rspec', '~> 3.10'
spec.add_development_dependency 'webmock', '~> 3.11'
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.2')
spec.required_ruby_version = Gem::Requirement.new('>= 3.3.6')
spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://github.com/inferno-framework/service-base-url-test-kit'
spec.files = [
Dir['lib/**/*.rb'],
Dir['lib/**/*.json'],
Dir['lib/**/*.erb'],
'LICENSE'
].flatten

spec.files = `[ -d .git ] && git ls-files -z lib config/presets LICENSE`.split("\x0")
spec.require_paths = ['lib']
spec.metadata['inferno_test_kit'] = 'true'
end
3 changes: 3 additions & 0 deletions spec/service_base_url_test_kit_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RSpec.describe ServiceBaseURLTestKit, order: :defined do
it_behaves_like 'platform_deployable_test_kit'
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
require 'inferno'
Inferno::Application.finalize!

require Inferno::SpecSupport::FACTORY_BOT_SUPPORT_PATH
Inferno::SpecSupport.require_helpers

FactoryBot.definition_file_paths = [
Inferno::SpecSupport::FACTORY_PATH
Expand Down

0 comments on commit 6afd0bc

Please sign in to comment.