-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix group generator so that search test generator does not exclude Pa…
…tient, Practitioner, Organization, and Related Person resource. Creates the id and lastUpdated test for all of these resources and makes lastUpdated optional
- Loading branch information
1 parent
2dd956c
commit d98d926
Showing
34 changed files
with
748 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...on_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_id_search_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
require_relative '../../../carin_search_test' | ||
require_relative '../../../generator/group_metadata' | ||
|
||
module CarinForBlueButtonTestKit | ||
module CARIN4BBV200DEVNONFINANCIAL | ||
class OrganizationIdSearchTest < Inferno::Test | ||
include CarinForBlueButtonTestKit::CarinSearchTest | ||
|
||
title 'Server returns valid results for Organization search by _id' | ||
description %( | ||
A server SHALL support searching by | ||
_id on the Organization resource. This test | ||
will pass if resources are returned and match the search criteria. If | ||
none are returned, the test is skipped. | ||
Because this is the first search of the sequence, resources in the | ||
response will be used for subsequent tests. | ||
Additionally, this test will check that GET and POST search methods | ||
return the same number of results. Search by POST is required by the | ||
FHIR R4 specification, and these tests interpret search by GET as a | ||
requirement of CARIN IG for Blue Button® v2.0.0-dev-nonfinancial. | ||
) | ||
|
||
id :c4bb_v200devnonfinancial_organization__id_search_test | ||
|
||
input :c4bb_v200devnonfinancial_organization__id_search_test_param, | ||
title: 'Organization search parameter for _id | ||
', | ||
type: 'text', | ||
description: 'Organization search parameter: _id | ||
' | ||
|
||
def self.properties | ||
@properties ||= SearchTestProperties.new( | ||
first_search: true, | ||
resource_type: 'Organization', | ||
search_param_names: ['_id'], | ||
test_post_search: true | ||
) | ||
end | ||
|
||
def self.metadata | ||
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)) | ||
end | ||
|
||
def scratch_resources | ||
scratch[:organization_resources] ||= {} | ||
end | ||
|
||
run do | ||
run_search_test(c4bb_v200devnonfinancial_organization__id_search_test_param) | ||
end | ||
end | ||
end | ||
end |
51 changes: 51 additions & 0 deletions
51
...it/generated/v2.0.0-dev-nonfinancial/organization/organization_lastupdated_search_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
require_relative '../../../carin_search_test' | ||
require_relative '../../../generator/group_metadata' | ||
|
||
module CarinForBlueButtonTestKit | ||
module CARIN4BBV200DEVNONFINANCIAL | ||
class OrganizationLastupdatedSearchTest < Inferno::Test | ||
include CarinForBlueButtonTestKit::CarinSearchTest | ||
|
||
title 'Server returns valid results for Organization search by _lastUpdated' | ||
description %( | ||
A server SHOULD support searching by | ||
_lastUpdated on the Organization resource. This test | ||
will pass if resources are returned and match the search criteria. If | ||
none are returned, the test is skipped. | ||
) | ||
|
||
id :c4bb_v200devnonfinancial_organization__lastUpdated_search_test | ||
optional | ||
|
||
|
||
input :c4bb_v200devnonfinancial_organization__lastUpdated_search_test_param, | ||
title: 'Organization search parameter for _lastUpdated | ||
', | ||
type: 'text', | ||
description: 'Organization search parameter: _lastUpdated | ||
', | ||
optional: true | ||
|
||
def self.properties | ||
@properties ||= SearchTestProperties.new( | ||
resource_type: 'Organization', | ||
search_param_names: ['_lastUpdated'] | ||
) | ||
end | ||
|
||
def self.metadata | ||
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)) | ||
end | ||
|
||
def scratch_resources | ||
scratch[:organization_resources] ||= {} | ||
end | ||
|
||
run do | ||
run_search_test(c4bb_v200devnonfinancial_organization__lastUpdated_search_test_param) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
..._blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_id_search_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
require_relative '../../../carin_search_test' | ||
require_relative '../../../generator/group_metadata' | ||
|
||
module CarinForBlueButtonTestKit | ||
module CARIN4BBV200DEVNONFINANCIAL | ||
class PatientIdSearchTest < Inferno::Test | ||
include CarinForBlueButtonTestKit::CarinSearchTest | ||
|
||
title 'Server returns valid results for Patient search by _id' | ||
description %( | ||
A server SHALL support searching by | ||
_id on the Patient resource. This test | ||
will pass if resources are returned and match the search criteria. If | ||
none are returned, the test is skipped. | ||
Because this is the first search of the sequence, resources in the | ||
response will be used for subsequent tests. | ||
Additionally, this test will check that GET and POST search methods | ||
return the same number of results. Search by POST is required by the | ||
FHIR R4 specification, and these tests interpret search by GET as a | ||
requirement of CARIN IG for Blue Button® v2.0.0-dev-nonfinancial. | ||
) | ||
|
||
id :c4bb_v200devnonfinancial_patient__id_search_test | ||
|
||
input :c4bb_v200devnonfinancial_patient__id_search_test_param, | ||
title: 'Patient search parameter for _id | ||
', | ||
type: 'text', | ||
description: 'Patient search parameter: _id | ||
' | ||
|
||
def self.properties | ||
@properties ||= SearchTestProperties.new( | ||
first_search: true, | ||
resource_type: 'Patient', | ||
search_param_names: ['_id'], | ||
test_post_search: true | ||
) | ||
end | ||
|
||
def self.metadata | ||
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)) | ||
end | ||
|
||
def scratch_resources | ||
scratch[:patient_resources] ||= {} | ||
end | ||
|
||
run do | ||
run_search_test(c4bb_v200devnonfinancial_patient__id_search_test_param) | ||
end | ||
end | ||
end | ||
end |
51 changes: 51 additions & 0 deletions
51
...ton_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_lastupdated_search_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
require_relative '../../../carin_search_test' | ||
require_relative '../../../generator/group_metadata' | ||
|
||
module CarinForBlueButtonTestKit | ||
module CARIN4BBV200DEVNONFINANCIAL | ||
class PatientLastupdatedSearchTest < Inferno::Test | ||
include CarinForBlueButtonTestKit::CarinSearchTest | ||
|
||
title 'Server returns valid results for Patient search by _lastUpdated' | ||
description %( | ||
A server SHOULD support searching by | ||
_lastUpdated on the Patient resource. This test | ||
will pass if resources are returned and match the search criteria. If | ||
none are returned, the test is skipped. | ||
) | ||
|
||
id :c4bb_v200devnonfinancial_patient__lastUpdated_search_test | ||
optional | ||
|
||
|
||
input :c4bb_v200devnonfinancial_patient__lastUpdated_search_test_param, | ||
title: 'Patient search parameter for _lastUpdated | ||
', | ||
type: 'text', | ||
description: 'Patient search parameter: _lastUpdated | ||
', | ||
optional: true | ||
|
||
def self.properties | ||
@properties ||= SearchTestProperties.new( | ||
resource_type: 'Patient', | ||
search_param_names: ['_lastUpdated'] | ||
) | ||
end | ||
|
||
def self.metadata | ||
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)) | ||
end | ||
|
||
def scratch_resources | ||
scratch[:patient_resources] ||= {} | ||
end | ||
|
||
run do | ||
run_search_test(c4bb_v200devnonfinancial_patient__lastUpdated_search_test_param) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...on_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_id_search_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
require_relative '../../../carin_search_test' | ||
require_relative '../../../generator/group_metadata' | ||
|
||
module CarinForBlueButtonTestKit | ||
module CARIN4BBV200DEVNONFINANCIAL | ||
class PractitionerIdSearchTest < Inferno::Test | ||
include CarinForBlueButtonTestKit::CarinSearchTest | ||
|
||
title 'Server returns valid results for Practitioner search by _id' | ||
description %( | ||
A server SHALL support searching by | ||
_id on the Practitioner resource. This test | ||
will pass if resources are returned and match the search criteria. If | ||
none are returned, the test is skipped. | ||
Because this is the first search of the sequence, resources in the | ||
response will be used for subsequent tests. | ||
Additionally, this test will check that GET and POST search methods | ||
return the same number of results. Search by POST is required by the | ||
FHIR R4 specification, and these tests interpret search by GET as a | ||
requirement of CARIN IG for Blue Button® v2.0.0-dev-nonfinancial. | ||
) | ||
|
||
id :c4bb_v200devnonfinancial_practitioner__id_search_test | ||
|
||
input :c4bb_v200devnonfinancial_practitioner__id_search_test_param, | ||
title: 'Practitioner search parameter for _id | ||
', | ||
type: 'text', | ||
description: 'Practitioner search parameter: _id | ||
' | ||
|
||
def self.properties | ||
@properties ||= SearchTestProperties.new( | ||
first_search: true, | ||
resource_type: 'Practitioner', | ||
search_param_names: ['_id'], | ||
test_post_search: true | ||
) | ||
end | ||
|
||
def self.metadata | ||
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)) | ||
end | ||
|
||
def scratch_resources | ||
scratch[:practitioner_resources] ||= {} | ||
end | ||
|
||
run do | ||
run_search_test(c4bb_v200devnonfinancial_practitioner__id_search_test_param) | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.