Skip to content

Commit

Permalink
Release 5.3.0 (#507)
Browse files Browse the repository at this point in the history
* bump version

* bump smart test kit

* use new validator

* bump core

* bump us core

* regenerate matrix

* use final version

* update specs for skipping on missing inputs

* update skips for new core behavior

* use new core release

* update validator url for ruby

* update changelog
  • Loading branch information
Jammjammjamm authored Apr 9, 2024
1 parent 7834808 commit f541232
Show file tree
Hide file tree
Showing 24 changed files with 128 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ G10_VALIDATOR_URL=http://validator_service:4567
G10_FHIR_RESOURCE_VALIDATOR_URL=http://hl7_validator_service:3500
REDIS_URL=redis://redis:6379/0

USE_HL7_RESOURCE_VALIDATOR=false
USE_HL7_RESOURCE_VALIDATOR=true
# To use the HL7 validator wrapper instead of the inferno validator wrapper, set the above to true,
# and uncomment the relevant settings in the following files:
# - docker-compose.yml -- "hl7_validator_service" section at the bottom
Expand Down
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
G10_VALIDATOR_URL=http://localhost/validatorapi
G10_FHIR_RESOURCE_VALIDATOR_URL=http://localhost/hl7validatorapi
V311_VALIDATOR_URL=http://localhost/validatorapi
V400_VALIDATOR_URL=http://localhost/validatorapi
V501_VALIDATOR_URL=http://localhost/validatorapi
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 5.3.0

* Use HL7 validator wrapper (#488).
* Fix an issue identifying Coverage.identifier:membershipid.type Must Support
slice when it is not the first identifier (#504).
* Remove remaining US Core 5 references from descriptions (#506).

# 5.2.0

* Fix Must Support for Patient's previous name and address (#496).
Expand Down
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ source "https://rubygems.org"

gemspec

# rc1 has been released, but don't want to risk updating the day of our release
gem 'hanami-utils', '2.0.0.beta1'

group :development, :test do
gem 'rubocop', '~> 1.9'
gem 'rubocop-rspec', require: false
Expand Down
48 changes: 24 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
PATH
remote: .
specs:
onc_certification_g10_test_kit (5.2.0)
onc_certification_g10_test_kit (5.3.0)
bloomer (~> 1.0.0)
colorize (~> 0.8.1)
inferno_core (~> 0.4.20)
inferno_core (~> 0.4.34)
json-jwt (~> 1.15.3)
mime-types (~> 3.4.0)
ndjson (~> 1.0.0)
rubyzip (~> 2.3.2)
smart_app_launch_test_kit (= 0.4.1)
smart_app_launch_test_kit (= 0.4.2)
tls_test_kit (= 0.2.1)
us_core_test_kit (= 0.6.4)
us_core_test_kit (= 0.6.5)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -80,7 +80,8 @@ GEM
dry-core (~> 0.5, >= 0.5)
dry-inflector (~> 0.1, >= 0.1.2)
dry-struct (~> 1.0)
dry-transformer (0.1.1)
dry-transformer (1.0.1)
zeitwerk (~> 2.6)
dry-types (1.5.1)
concurrent-ruby (~> 1.0)
dry-container (~> 0.3)
Expand Down Expand Up @@ -148,9 +149,9 @@ GEM
mustermann (~> 1.0)
mustermann-contrib (~> 1.0)
rack (~> 2.0)
hanami-utils (2.0.0.beta1)
hanami-utils (2.0.0)
concurrent-ruby (~> 1.0)
dry-transformer (~> 0.1)
dry-transformer (~> 1.0, < 2)
hansi (0.2.1)
hashdiff (1.0.1)
http-accept (1.7.0)
Expand All @@ -160,7 +161,7 @@ GEM
i18n (1.14.4)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
inferno_core (0.4.30)
inferno_core (0.4.34)
activesupport (~> 6.1.7.5)
base62-rb (= 0.3.1)
blueprinter (= 0.25.2)
Expand Down Expand Up @@ -204,7 +205,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0305)
mini_portile2 (2.8.5)
minitest (5.22.2)
minitest (5.22.3)
msgpack (1.7.2)
multi_json (1.15.0)
multi_xml (0.6.0)
Expand All @@ -216,15 +217,15 @@ GEM
mustermann (= 1.1.2)
ndjson (1.0.0)
netrc (0.11.0)
nio4r (2.7.0)
nokogiri (1.16.2)
nio4r (2.7.1)
nokogiri (1.16.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.2-arm64-darwin)
nokogiri (1.16.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-darwin)
nokogiri (1.16.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
nokogiri (1.16.3-x86_64-linux)
racc (~> 1.4)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
Expand All @@ -248,9 +249,9 @@ GEM
puma (5.6.8)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8.1)
rack (2.2.9)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.1)
redis (4.8.1)
regexp_parser (2.6.1)
reline (0.3.1)
Expand All @@ -261,7 +262,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.6)
rouge (4.2.0)
rouge (4.2.1)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand Down Expand Up @@ -300,16 +301,16 @@ GEM
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
smart_app_launch_test_kit (0.4.1)
smart_app_launch_test_kit (0.4.2)
inferno_core (>= 0.4.2)
json-jwt (~> 1.15.3)
jwt (~> 2.6)
tls_test_kit (~> 0.2.0)
sqlite3 (1.7.2)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
sqlite3 (1.7.2-arm64-darwin)
sqlite3 (1.7.2-x86_64-darwin)
sqlite3 (1.7.2-x86_64-linux)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
Expand All @@ -332,7 +333,7 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode_utils (1.4.0)
us_core_test_kit (0.6.4)
us_core_test_kit (0.6.5)
inferno_core (>= 0.4.2)
smart_app_launch_test_kit (>= 0.4.0)
tls_test_kit (~> 0.2.0)
Expand All @@ -352,7 +353,6 @@ DEPENDENCIES
database_cleaner-sequel (~> 1.8)
debug
factory_bot (~> 6.1)
hanami-utils (= 2.0.0.beta1)
onc_certification_g10_test_kit!
rspec (~> 3.10)
rubocop (~> 1.9)
Expand Down
30 changes: 15 additions & 15 deletions config/nginx.background.conf
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ http {

# To enable the HL7 Validator Wrapper, both the section below and
# the section in docker-compose.background.yml need to be uncommented
# location /hl7validatorapi/ {
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header X-Forwarded-Port $server_port;
# proxy_redirect off;
# proxy_set_header Connection '';
# proxy_http_version 1.1;
# chunked_transfer_encoding off;
# proxy_buffering off;
# proxy_cache off;
# proxy_read_timeout 600s;
#
# proxy_pass http://hl7_validator_service:3500/;
# }
location /hl7validatorapi/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_redirect off;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 600s;

proxy_pass http://hl7_validator_service:3500/;
}
}
}
22 changes: 11 additions & 11 deletions docker-compose.background.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ services:
volumes:
- ./data/redis:/data
command: redis-server --appendonly yes
# hl7_validator_service:
# image: infernocommunity/inferno-resource-validator:1.0.51
# environment:
# # Defines how long validator sessions last if unused, in minutes:
# # Negative values mean sessions never expire, 0 means sessions immediately expire
# SESSION_CACHE_DURATION: -1
# volumes:
# - ./lib/onc_certification_g10_test_kit/igs:/home/igs
# # To let the service share your local FHIR package cache,
# # uncomment the below line
# # - ~/.fhir:/home/ktor/.fhir
hl7_validator_service:
image: infernocommunity/inferno-resource-validator:1.0.51
environment:
# Defines how long validator sessions last if unused, in minutes:
# Negative values mean sessions never expire, 0 means sessions immediately expire
SESSION_CACHE_DURATION: -1
volumes:
- ./lib/onc_certification_g10_test_kit/igs:/home/igs
# To let the service share your local FHIR package cache,
# uncomment the below line
# - ~/.fhir:/home/ktor/.fhir
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
extends:
file: docker-compose.background.yml
service: redis
# hl7_validator_service:
# extends:
# file: docker-compose.background.yml
# service: hl7_validator_service
hl7_validator_service:
extends:
file: docker-compose.background.yml
service: hl7_validator_service
2 changes: 0 additions & 2 deletions lib/onc_certification_g10_test_kit/bulk_data_authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ class BulkDataAuthorization < Inferno::TestGroup
output :bearer_token

run do
skip_if authentication_response.blank?, 'No authentication response received.'

assert_valid_json(authentication_response)
response_body = JSON.parse(authentication_response)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class BulkDataGroupExportCancelSTU1 < Inferno::TestGroup
correct behavior.
)

input :bearer_token
input :bearer_token,
optional: true
input :bulk_server_url,
title: 'Bulk Data FHIR URL',
description: 'The URL of the Bulk FHIR server.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ class BulkDataGroupExportSTU1 < Inferno::TestGroup
include ExportKickOffPerformer

run do
skip_if bearer_token.blank?, 'Could not verify this functionality when bearer token is not set'

perform_export_kick_off_request(use_token: false)
assert_response_status([400, 401])
end
Expand Down Expand Up @@ -188,8 +186,6 @@ class BulkDataGroupExportSTU1 < Inferno::TestGroup
output :status_response, :requires_access_token

run do
skip 'Server response did not have Content-Location in header' unless polling_url.present?

timeout = bulk_timeout.to_i

if !timeout.positive?
Expand Down Expand Up @@ -262,8 +258,6 @@ class BulkDataGroupExportSTU1 < Inferno::TestGroup
output :status_output, :bulk_download_url

run do
assert status_response.present?, 'Bulk Data Server status response not found'

assert_valid_json(status_response)
status_output = JSON.parse(status_response)['output']
assert status_output, 'Bulk Data Server status response does not contain output'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,11 @@ class BulkDataGroupExportValidation < Inferno::TestGroup
DESCRIPTION
# link 'http://hl7.org/fhir/uv/bulkdata/STU1.0.1/export/index.html#file-request'

input :bulk_download_url
input :bulk_download_url, :requires_access_token, :requires_access_token, :bearer_token

run do
skip_if bulk_download_url.blank?, 'Could not verify this functionality when no download link was provided'
skip_if requires_access_token.blank?,
'Could not verify this functionality when requiresAccessToken is not provided'
omit_if requires_access_token == 'false',
'Could not verify this functionality when requiresAccessToken is false'
skip_if bearer_token.blank?, 'Could not verify this functionality when Bearer Token is not provided'

get(bulk_download_url, headers: { accept: 'application/fhir+ndjson' })
assert_response_status([400, 401])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class SMARTInvalidTokenRefreshTest < Inferno::Test
input :client_secret, optional: true

run do
skip_if refresh_token.blank?, 'No refresh token was received'

oauth2_params = {
'grant_type' => 'refresh_token',
'refresh_token' => SecureRandom.uuid
Expand Down
2 changes: 1 addition & 1 deletion lib/onc_certification_g10_test_kit/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ONCCertificationG10TestKit
VERSION = '5.2.0'.freeze
VERSION = '5.3.0'.freeze
end
Binary file modified onc_certification_g10_matrix.xlsx
Binary file not shown.
6 changes: 3 additions & 3 deletions onc_certification_g10_test_kit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Gem::Specification.new do |spec|
spec.license = 'Apache-2.0'
spec.add_runtime_dependency 'bloomer', '~> 1.0.0'
spec.add_runtime_dependency 'colorize', '~> 0.8.1'
spec.add_runtime_dependency 'inferno_core', '~> 0.4.20'
spec.add_runtime_dependency 'inferno_core', '~> 0.4.34'
spec.add_runtime_dependency 'json-jwt', '~> 1.15.3'
spec.add_runtime_dependency 'mime-types', '~> 3.4.0'
spec.add_runtime_dependency 'ndjson', '~> 1.0.0'
spec.add_runtime_dependency 'rubyzip', '~> 2.3.2'
spec.add_runtime_dependency 'smart_app_launch_test_kit', '0.4.1'
spec.add_runtime_dependency 'smart_app_launch_test_kit', '0.4.2'
spec.add_runtime_dependency 'tls_test_kit', '0.2.1'
spec.add_runtime_dependency 'us_core_test_kit', '0.6.4'
spec.add_runtime_dependency 'us_core_test_kit', '0.6.5'
spec.add_development_dependency 'database_cleaner-sequel', '~> 1.8'
spec.add_development_dependency 'factory_bot', '~> 6.1'
spec.add_development_dependency 'rspec', '~> 3.10'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,36 +156,36 @@ def run(runnable, inputs = {})
end

it 'skips when no authentication response received' do
result = run(runnable)
result = run(runnable, input)

expect(result.result).to eq('skip')
expect(result.result_message).to eq('No authentication response received.')
expect(result.result_message).to match(/authentication_response/)
end

it 'fails when authentication response is invalid JSON' do
result = run(runnable, { authentication_response: '{/}' })
result = run(runnable, input.merge(authentication_response: '{/}'))

expect(result.result).to eq('fail')
expect(result.result_message).to eq('Invalid JSON. ')
end

it 'fails when authentication response does not contain access_token' do
result = run(runnable, { authentication_response: '{"response_body":"post"}' })
result = run(runnable, input.merge(authentication_response: '{"response_body":"post"}'))

expect(result.result).to eq('fail')
expect(result.result_message).to eq('Token response did not contain access_token as required')
end

it 'fails when access_token is present but does not contain required keys' do
missing_key_auth_response = { 'access_token' => 'its_the_token' }
result = run(runnable, { authentication_response: missing_key_auth_response.to_json })
result = run(runnable, input.merge(authentication_response: missing_key_auth_response.to_json))

expect(result.result).to eq('fail')
expect(result.result_message).to eq('Token response did not contain token_type as required')
end

it 'passes when access_token is present and contains the required keys' do
result = run(runnable, { authentication_response: response_body.to_json })
result = run(runnable, input.merge(authentication_response: response_body.to_json))

expect(result.result).to eq('pass')
end
Expand Down
Loading

0 comments on commit f541232

Please sign in to comment.