Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update endpoints to $cqfm.package #21

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/measure_repository_service_test_kit/library_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
require_relative '../utils/general_utils'

module MeasureRepositoryServiceTestKit
# tests for Library $package service
# tests for Library $cqfm.package service
# rubocop:disable Metrics/ClassLength
class LibraryPackage < Inferno::TestGroup
include PackageUtils
include GeneralUtils

title 'Library $package'
description 'Ensure measure repository service can execute the $package operation to the Library endpoint'
title 'Library $cqfm.package'
description 'Ensure measure repository service can execute the $cqfm.package operation to the Library endpoint'
id 'library_package'
custom_headers = { 'content-type': 'application/fhir+json' }

Expand All @@ -28,7 +28,7 @@ class LibraryPackage < Inferno::TestGroup
input :library_id, title: 'Library id'
makes_request :library_package
run do
fhir_operation("Library/#{library_id}/$package", name: :library_package)
fhir_operation("Library/#{library_id}/$cqfm.package", name: :library_package)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand All @@ -54,7 +54,7 @@ class LibraryPackage < Inferno::TestGroup

params = FHIR::Parameters.new params_hash

fhir_operation('Library/$package', body: params)
fhir_operation('Library/$cqfm.package', body: params)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand All @@ -80,7 +80,7 @@ class LibraryPackage < Inferno::TestGroup

params = FHIR::Parameters.new params_hash

fhir_operation('Library/$package', body: params)
fhir_operation('Library/$cqfm.package', body: params)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand Down Expand Up @@ -114,7 +114,7 @@ class LibraryPackage < Inferno::TestGroup

params = FHIR::Parameters.new params_hash

fhir_operation("Library/#{library_id}/$package", body: params)
fhir_operation("Library/#{library_id}/$cqfm.package", body: params)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand Down Expand Up @@ -148,7 +148,7 @@ class LibraryPackage < Inferno::TestGroup
description 'returns 404 status code with OperationOutcome when no Library exists with passed-in id'

run do
fhir_operation('Library/INVALID_ID/$package')
fhir_operation('Library/INVALID_ID/$cqfm.package')
assert_response_status(404)
assert_valid_json(response[:body])
assert(resource.resourceType == 'OperationOutcome')
Expand All @@ -162,7 +162,7 @@ class LibraryPackage < Inferno::TestGroup
description 'returns 400 status code with OperationOutcome when no id, url, or identifier provided'

run do
fhir_operation('Library/$package')
fhir_operation('Library/$cqfm.package')
assert_response_status(400)
assert_valid_json(response[:body])
assert(resource.resourceType == 'OperationOutcome')
Expand All @@ -179,7 +179,7 @@ class LibraryPackage < Inferno::TestGroup
input :library_id, title: 'Library id'

run do
fhir_operation("Library/#{library_id}/$package?include-terminology=true")
fhir_operation("Library/#{library_id}/$cqfm.package?include-terminology=true")
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand Down
20 changes: 10 additions & 10 deletions lib/measure_repository_service_test_kit/measure_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
require_relative '../utils/general_utils'

module MeasureRepositoryServiceTestKit
# tests for Measure $package service
# tests for Measure $cqfm.package service
# rubocop:disable Metrics/ClassLength
class MeasurePackage < Inferno::TestGroup
include PackageUtils
include GeneralUtils

title 'Measure $package'
description 'Ensure measure repository service can execute the $package operation to the Measure endpoint'
title 'Measure $cqfm.package'
description 'Ensure measure repository service can execute the $cqfm.package operation to the Measure endpoint'
id 'measure_package'
custom_headers = { 'content-type': 'application/fhir+json' }

Expand All @@ -28,7 +28,7 @@ class MeasurePackage < Inferno::TestGroup
input :measure_id, title: 'Measure id'
makes_request :measure_package
run do
fhir_operation("Measure/#{measure_id}/$package", name: :measure_package)
fhir_operation("Measure/#{measure_id}/$cqfm.package", name: :measure_package)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand All @@ -54,7 +54,7 @@ class MeasurePackage < Inferno::TestGroup

params = FHIR::Parameters.new params_hash

fhir_operation('Measure/$package', body: params)
fhir_operation('Measure/$cqfm.package', body: params)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand All @@ -80,7 +80,7 @@ class MeasurePackage < Inferno::TestGroup

params = FHIR::Parameters.new params_hash

fhir_operation('Measure/$package', body: params)
fhir_operation('Measure/$cqfm.package', body: params)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand Down Expand Up @@ -119,7 +119,7 @@ class MeasurePackage < Inferno::TestGroup

params = FHIR::Parameters.new params_hash

fhir_operation("Measure/#{measure_id}/$package", body: params)
fhir_operation("Measure/#{measure_id}/$cqfm.package", body: params)
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand Down Expand Up @@ -154,7 +154,7 @@ class MeasurePackage < Inferno::TestGroup
description 'returns 404 status code with OperationOutcome when no Measure exists with passed-in id'

run do
fhir_operation('Measure/INVALID_ID/$package')
fhir_operation('Measure/INVALID_ID/$cqfm.package')
assert_response_status(404)
assert_valid_json(response[:body])
assert(resource.resourceType == 'OperationOutcome')
Expand All @@ -168,7 +168,7 @@ class MeasurePackage < Inferno::TestGroup
description 'returns 400 status code with OperationOutcome when no id, url, or identifier provided'

run do
fhir_operation('Measure/$package')
fhir_operation('Measure/$cqfm.package')
assert_response_status(400)
assert_valid_json(response[:body])
assert(resource.resourceType == 'OperationOutcome')
Expand All @@ -185,7 +185,7 @@ class MeasurePackage < Inferno::TestGroup
input :measure_id, title: 'Measure id'

run do
fhir_operation("Measure/#{measure_id}/$package?include-terminology=true")
fhir_operation("Measure/#{measure_id}/$cqfm.package?include-terminology=true")
assert_response_status(200)
assert_resource_type(:bundle)
assert_valid_json(response[:body])
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/package_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'set'

module MeasureRepositoryServiceTestKit
# Utility functions in support of the $package test group
# Utility functions in support of the $cqfm.package test group
module PackageUtils
def related_artifacts_present?(bundle, should_check_valuesets)
artifact_urls = Set[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
end
end

describe 'Server successfully returns bundle on Library $package with identifier in body' do
describe 'Server successfully returns bundle on Library $cqfm.package with identifier in body' do
let(:test) { group.tests[2] }
let(:library_identifier) { 'identifier_system|identifier_value' }

Expand Down Expand Up @@ -163,7 +163,7 @@
end
end

describe 'Server successfully returns bundle on Library $package with url, identifier, and version in body' do
describe 'Server successfully returns bundle on Library $cqfm.package with url, identifier, and version in body' do
let(:test) { group.tests[3] }
let(:library_id) { 'library_id' }
let(:library_identifier) { 'identifier_system|identifier_value' }
Expand Down
Loading
Loading