diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/metadata.yml index 7b46e67b..0a6c88d8 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/metadata.yml @@ -131,6 +131,10 @@ :file_name: organization_validation_test.rb - :id: c4bb_v200devnonfinancial_organization_must_support_test :file_name: organization_must_support_test.rb +- :id: c4bb_v200devnonfinancial_organization__id_search_test + :file_name: organization_id_search_test.rb +- :id: c4bb_v200devnonfinancial_organization__lastUpdated_search_test + :file_name: organization_lastupdated_search_test.rb :id: c4bb_v200devnonfinancial_organization :file_name: organization_group.rb :delayed_references: [] diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_id_search_test.rb new file mode 100644 index 00000000..b81ce252 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_id_search_test.rb @@ -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 diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_lastupdated_search_test.rb new file mode 100644 index 00000000..00d04cbb --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization/organization_lastupdated_search_test.rb @@ -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 diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization_group.rb index 37cff755..9fcf675b 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/organization_group.rb @@ -1,6 +1,8 @@ require_relative 'organization/organization_read_test' require_relative 'organization/organization_validation_test' require_relative 'organization/organization_must_support_test' + require_relative 'organization/organization_id_search_test' + require_relative 'organization/organization_lastupdated_search_test' module CarinForBlueButtonTestKit module CARIN4BBV200DEVNONFINANCIAL @@ -75,6 +77,8 @@ def self.metadata test from: :c4bb_v200devnonfinancial_organization_read_test test from: :c4bb_v200devnonfinancial_organization_validation_test test from: :c4bb_v200devnonfinancial_organization_must_support_test + test from: :c4bb_v200devnonfinancial_organization__id_search_test + test from: :c4bb_v200devnonfinancial_organization__lastUpdated_search_test end end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/metadata.yml index ef7ffce4..377d30b6 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/metadata.yml @@ -219,6 +219,10 @@ :file_name: patient_validation_test.rb - :id: c4bb_v200devnonfinancial_patient_must_support_test :file_name: patient_must_support_test.rb +- :id: c4bb_v200devnonfinancial_patient__id_search_test + :file_name: patient_id_search_test.rb +- :id: c4bb_v200devnonfinancial_patient__lastUpdated_search_test + :file_name: patient_lastupdated_search_test.rb :id: c4bb_v200devnonfinancial_patient :file_name: patient_group.rb :delayed_references: [] diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_id_search_test.rb new file mode 100644 index 00000000..febd423e --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_id_search_test.rb @@ -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 diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_lastupdated_search_test.rb new file mode 100644 index 00000000..c5b5cb43 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient/patient_lastupdated_search_test.rb @@ -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 diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient_group.rb index a3e2643e..177ea2fe 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/patient_group.rb @@ -1,6 +1,8 @@ require_relative 'patient/patient_read_test' require_relative 'patient/patient_validation_test' require_relative 'patient/patient_must_support_test' + require_relative 'patient/patient_id_search_test' + require_relative 'patient/patient_lastupdated_search_test' module CarinForBlueButtonTestKit module CARIN4BBV200DEVNONFINANCIAL @@ -75,6 +77,8 @@ def self.metadata test from: :c4bb_v200devnonfinancial_patient_read_test test from: :c4bb_v200devnonfinancial_patient_validation_test test from: :c4bb_v200devnonfinancial_patient_must_support_test + test from: :c4bb_v200devnonfinancial_patient__id_search_test + test from: :c4bb_v200devnonfinancial_patient__lastUpdated_search_test end end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/metadata.yml index f49a0025..97b3920c 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/metadata.yml @@ -107,6 +107,10 @@ :file_name: practitioner_validation_test.rb - :id: c4bb_v200devnonfinancial_practitioner_must_support_test :file_name: practitioner_must_support_test.rb +- :id: c4bb_v200devnonfinancial_practitioner__id_search_test + :file_name: practitioner_id_search_test.rb +- :id: c4bb_v200devnonfinancial_practitioner__lastUpdated_search_test + :file_name: practitioner_lastupdated_search_test.rb :id: c4bb_v200devnonfinancial_practitioner :file_name: practitioner_group.rb :delayed_references: [] diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_id_search_test.rb new file mode 100644 index 00000000..745ba4fb --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_id_search_test.rb @@ -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 diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_lastupdated_search_test.rb new file mode 100644 index 00000000..56dcdf1a --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner/practitioner_lastupdated_search_test.rb @@ -0,0 +1,51 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200DEVNONFINANCIAL + class PractitionerLastupdatedSearchTest < Inferno::Test + include CarinForBlueButtonTestKit::CarinSearchTest + + title 'Server returns valid results for Practitioner search by _lastUpdated' + description %( +A server SHOULD support searching by +_lastUpdated 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. + + + ) + + id :c4bb_v200devnonfinancial_practitioner__lastUpdated_search_test + optional + + + input :c4bb_v200devnonfinancial_practitioner__lastUpdated_search_test_param, + title: 'Practitioner search parameter for _lastUpdated +', + type: 'text', + description: 'Practitioner search parameter: _lastUpdated +', + optional: true + + def self.properties + @properties ||= SearchTestProperties.new( + resource_type: 'Practitioner', + 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[:practitioner_resources] ||= {} + end + + run do + run_search_test(c4bb_v200devnonfinancial_practitioner__lastUpdated_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner_group.rb index 9effa4db..3bd117e3 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/practitioner_group.rb @@ -1,6 +1,8 @@ require_relative 'practitioner/practitioner_read_test' require_relative 'practitioner/practitioner_validation_test' require_relative 'practitioner/practitioner_must_support_test' + require_relative 'practitioner/practitioner_id_search_test' + require_relative 'practitioner/practitioner_lastupdated_search_test' module CarinForBlueButtonTestKit module CARIN4BBV200DEVNONFINANCIAL @@ -75,6 +77,8 @@ def self.metadata test from: :c4bb_v200devnonfinancial_practitioner_read_test test from: :c4bb_v200devnonfinancial_practitioner_validation_test test from: :c4bb_v200devnonfinancial_practitioner_must_support_test + test from: :c4bb_v200devnonfinancial_practitioner__id_search_test + test from: :c4bb_v200devnonfinancial_practitioner__lastUpdated_search_test end end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/metadata.yml index a8f14180..57b039b3 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/metadata.yml @@ -96,6 +96,10 @@ :file_name: related_person_validation_test.rb - :id: c4bb_v200devnonfinancial_related_person_must_support_test :file_name: related_person_must_support_test.rb +- :id: c4bb_v200devnonfinancial_related_person__id_search_test + :file_name: related_person_id_search_test.rb +- :id: c4bb_v200devnonfinancial_related_person__lastUpdated_search_test + :file_name: related_person_lastupdated_search_test.rb :id: c4bb_v200devnonfinancial_related_person :file_name: related_person_group.rb :delayed_references: [] diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/related_person_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/related_person_id_search_test.rb new file mode 100644 index 00000000..827d36d3 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/related_person_id_search_test.rb @@ -0,0 +1,58 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200DEVNONFINANCIAL + class RelatedPersonIdSearchTest < Inferno::Test + include CarinForBlueButtonTestKit::CarinSearchTest + + title 'Server returns valid results for RelatedPerson search by _id' + description %( +A server SHALL support searching by +_id on the RelatedPerson 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_related_person__id_search_test + + input :c4bb_v200devnonfinancial_related_person__id_search_test_param, + title: 'RelatedPerson search parameter for _id +', + type: 'text', + description: 'RelatedPerson search parameter: _id +' + + def self.properties + @properties ||= SearchTestProperties.new( + first_search: true, + resource_type: 'RelatedPerson', + 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[:related_person_resources] ||= {} + end + + run do + run_search_test(c4bb_v200devnonfinancial_related_person__id_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/related_person_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/related_person_lastupdated_search_test.rb new file mode 100644 index 00000000..670eba38 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person/related_person_lastupdated_search_test.rb @@ -0,0 +1,51 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200DEVNONFINANCIAL + class RelatedPersonLastupdatedSearchTest < Inferno::Test + include CarinForBlueButtonTestKit::CarinSearchTest + + title 'Server returns valid results for RelatedPerson search by _lastUpdated' + description %( +A server SHOULD support searching by +_lastUpdated on the RelatedPerson 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_related_person__lastUpdated_search_test + optional + + + input :c4bb_v200devnonfinancial_related_person__lastUpdated_search_test_param, + title: 'RelatedPerson search parameter for _lastUpdated +', + type: 'text', + description: 'RelatedPerson search parameter: _lastUpdated +', + optional: true + + def self.properties + @properties ||= SearchTestProperties.new( + resource_type: 'RelatedPerson', + 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[:related_person_resources] ||= {} + end + + run do + run_search_test(c4bb_v200devnonfinancial_related_person__lastUpdated_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person_group.rb index 440263cb..1abab2ed 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/related_person_group.rb @@ -1,6 +1,8 @@ require_relative 'related_person/related_person_read_test' require_relative 'related_person/related_person_validation_test' require_relative 'related_person/related_person_must_support_test' + require_relative 'related_person/related_person_id_search_test' + require_relative 'related_person/related_person_lastupdated_search_test' module CarinForBlueButtonTestKit module CARIN4BBV200DEVNONFINANCIAL @@ -75,6 +77,8 @@ def self.metadata test from: :c4bb_v200devnonfinancial_related_person_read_test test from: :c4bb_v200devnonfinancial_related_person_validation_test test from: :c4bb_v200devnonfinancial_related_person_must_support_test + test from: :c4bb_v200devnonfinancial_related_person__id_search_test + test from: :c4bb_v200devnonfinancial_related_person__lastUpdated_search_test end end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/metadata.yml index c94512b5..bb53d320 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/metadata.yml @@ -131,6 +131,8 @@ :file_name: organization_validation_test.rb - :id: c4bb_v200_organization_must_support_test :file_name: organization_must_support_test.rb +- :id: c4bb_v200_organization__id_search_test + :file_name: organization_id_search_test.rb - :id: c4bb_v200_organization__lastUpdated_search_test :file_name: organization_lastupdated_search_test.rb :id: c4bb_v200_organization diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_id_search_test.rb new file mode 100644 index 00000000..73321393 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_id_search_test.rb @@ -0,0 +1,58 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200 + 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. + + + ) + + id :c4bb_v200_organization__id_search_test + + input :c4bb_v200_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_v200_organization__id_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_lastupdated_search_test.rb index ebc00c59..ee6194d7 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_lastupdated_search_test.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_lastupdated_search_test.rb @@ -12,14 +12,20 @@ class OrganizationLastupdatedSearchTest < Inferno::Test _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_v200_organization__lastUpdated_search_test + optional + input :c4bb_v200_organization__lastUpdated_search_test_param, - title: 'Organization search parameter for _lastUpdated', + title: 'Organization search parameter for _lastUpdated +', type: 'text', - description: 'Organization search parameter: _lastUpdated', + description: 'Organization search parameter: _lastUpdated +', optional: true def self.properties @@ -38,7 +44,6 @@ def scratch_resources end run do - skip '_lastUpdated optional and not provided' unless c4bb_v200_organization__lastUpdated_search_test_param.present? run_search_test(c4bb_v200_organization__lastUpdated_search_test_param) end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization_group.rb index aeb9e866..5c03f972 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization_group.rb @@ -1,6 +1,7 @@ require_relative 'organization/organization_read_test' require_relative 'organization/organization_validation_test' require_relative 'organization/organization_must_support_test' + require_relative 'organization/organization_id_search_test' require_relative 'organization/organization_lastupdated_search_test' module CarinForBlueButtonTestKit @@ -76,6 +77,7 @@ def self.metadata test from: :c4bb_v200_organization_read_test test from: :c4bb_v200_organization_validation_test test from: :c4bb_v200_organization_must_support_test + test from: :c4bb_v200_organization__id_search_test test from: :c4bb_v200_organization__lastUpdated_search_test end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/metadata.yml index 892cdb6b..8de73557 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/metadata.yml @@ -219,6 +219,8 @@ :file_name: patient_validation_test.rb - :id: c4bb_v200_patient_must_support_test :file_name: patient_must_support_test.rb +- :id: c4bb_v200_patient__id_search_test + :file_name: patient_id_search_test.rb - :id: c4bb_v200_patient__lastUpdated_search_test :file_name: patient_lastupdated_search_test.rb :id: c4bb_v200_patient diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_id_search_test.rb new file mode 100644 index 00000000..12619daa --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_id_search_test.rb @@ -0,0 +1,58 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200 + 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. + + + ) + + id :c4bb_v200_patient__id_search_test + + input :c4bb_v200_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_v200_patient__id_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_lastupdated_search_test.rb index 385f0074..48cb1641 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_lastupdated_search_test.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_lastupdated_search_test.rb @@ -12,14 +12,20 @@ class PatientLastupdatedSearchTest < Inferno::Test _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_v200_patient__lastUpdated_search_test + optional + input :c4bb_v200_patient__lastUpdated_search_test_param, - title: 'Patient search parameter for _lastUpdated', + title: 'Patient search parameter for _lastUpdated +', type: 'text', - description: 'Patient search parameter: _lastUpdated', + description: 'Patient search parameter: _lastUpdated +', optional: true def self.properties @@ -38,7 +44,6 @@ def scratch_resources end run do - skip '_lastUpdated optional and not provided' unless c4bb_v200_patient__lastUpdated_search_test_param.present? run_search_test(c4bb_v200_patient__lastUpdated_search_test_param) end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient_group.rb index dc9b8f5b..276b7394 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient_group.rb @@ -1,6 +1,7 @@ require_relative 'patient/patient_read_test' require_relative 'patient/patient_validation_test' require_relative 'patient/patient_must_support_test' + require_relative 'patient/patient_id_search_test' require_relative 'patient/patient_lastupdated_search_test' module CarinForBlueButtonTestKit @@ -76,6 +77,7 @@ def self.metadata test from: :c4bb_v200_patient_read_test test from: :c4bb_v200_patient_validation_test test from: :c4bb_v200_patient_must_support_test + test from: :c4bb_v200_patient__id_search_test test from: :c4bb_v200_patient__lastUpdated_search_test end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/metadata.yml index b6a312b1..ed14c015 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/metadata.yml @@ -107,6 +107,8 @@ :file_name: practitioner_validation_test.rb - :id: c4bb_v200_practitioner_must_support_test :file_name: practitioner_must_support_test.rb +- :id: c4bb_v200_practitioner__id_search_test + :file_name: practitioner_id_search_test.rb - :id: c4bb_v200_practitioner__lastUpdated_search_test :file_name: practitioner_lastupdated_search_test.rb :id: c4bb_v200_practitioner diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_id_search_test.rb new file mode 100644 index 00000000..c02c2f29 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_id_search_test.rb @@ -0,0 +1,58 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200 + 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. + + + ) + + id :c4bb_v200_practitioner__id_search_test + + input :c4bb_v200_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_v200_practitioner__id_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_lastupdated_search_test.rb index 8cc13c34..a5b3f34c 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_lastupdated_search_test.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_lastupdated_search_test.rb @@ -12,14 +12,20 @@ class PractitionerLastupdatedSearchTest < Inferno::Test _lastUpdated 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. + + ) id :c4bb_v200_practitioner__lastUpdated_search_test + optional + input :c4bb_v200_practitioner__lastUpdated_search_test_param, - title: 'Practitioner search parameter for _lastUpdated', + title: 'Practitioner search parameter for _lastUpdated +', type: 'text', - description: 'Practitioner search parameter: _lastUpdated', + description: 'Practitioner search parameter: _lastUpdated +', optional: true def self.properties @@ -38,7 +44,6 @@ def scratch_resources end run do - skip '_lastUpdated optional and not provided' unless c4bb_v200_practitioner__lastUpdated_search_test_param.present? run_search_test(c4bb_v200_practitioner__lastUpdated_search_test_param) end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner_group.rb index cb21edbf..d6f27dbf 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner_group.rb @@ -1,6 +1,7 @@ require_relative 'practitioner/practitioner_read_test' require_relative 'practitioner/practitioner_validation_test' require_relative 'practitioner/practitioner_must_support_test' + require_relative 'practitioner/practitioner_id_search_test' require_relative 'practitioner/practitioner_lastupdated_search_test' module CarinForBlueButtonTestKit @@ -76,6 +77,7 @@ def self.metadata test from: :c4bb_v200_practitioner_read_test test from: :c4bb_v200_practitioner_validation_test test from: :c4bb_v200_practitioner_must_support_test + test from: :c4bb_v200_practitioner__id_search_test test from: :c4bb_v200_practitioner__lastUpdated_search_test end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/metadata.yml b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/metadata.yml index f7ec8472..255c640a 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/metadata.yml +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/metadata.yml @@ -96,6 +96,8 @@ :file_name: related_person_validation_test.rb - :id: c4bb_v200_related_person_must_support_test :file_name: related_person_must_support_test.rb +- :id: c4bb_v200_related_person__id_search_test + :file_name: related_person_id_search_test.rb - :id: c4bb_v200_related_person__lastUpdated_search_test :file_name: related_person_lastupdated_search_test.rb :id: c4bb_v200_related_person diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_id_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_id_search_test.rb new file mode 100644 index 00000000..ba69e536 --- /dev/null +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_id_search_test.rb @@ -0,0 +1,58 @@ +require_relative '../../../carin_search_test' +require_relative '../../../generator/group_metadata' + +module CarinForBlueButtonTestKit + module CARIN4BBV200 + class RelatedPersonIdSearchTest < Inferno::Test + include CarinForBlueButtonTestKit::CarinSearchTest + + title 'Server returns valid results for RelatedPerson search by _id' + description %( +A server SHALL support searching by +_id on the RelatedPerson 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. + + + ) + + id :c4bb_v200_related_person__id_search_test + + input :c4bb_v200_related_person__id_search_test_param, + title: 'RelatedPerson search parameter for _id +', + type: 'text', + description: 'RelatedPerson search parameter: _id +' + + def self.properties + @properties ||= SearchTestProperties.new( + first_search: true, + resource_type: 'RelatedPerson', + 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[:related_person_resources] ||= {} + end + + run do + run_search_test(c4bb_v200_related_person__id_search_test_param) + end + end + end +end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_lastupdated_search_test.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_lastupdated_search_test.rb index 4f127dd5..7bae35fe 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_lastupdated_search_test.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_lastupdated_search_test.rb @@ -12,14 +12,20 @@ class RelatedPersonLastupdatedSearchTest < Inferno::Test _lastUpdated on the RelatedPerson resource. This test will pass if resources are returned and match the search criteria. If none are returned, the test is skipped. + + ) id :c4bb_v200_related_person__lastUpdated_search_test + optional + input :c4bb_v200_related_person__lastUpdated_search_test_param, - title: 'RelatedPerson search parameter for _lastUpdated', + title: 'RelatedPerson search parameter for _lastUpdated +', type: 'text', - description: 'RelatedPerson search parameter: _lastUpdated', + description: 'RelatedPerson search parameter: _lastUpdated +', optional: true def self.properties @@ -38,7 +44,6 @@ def scratch_resources end run do - skip '_lastUpdated optional and not provided' unless c4bb_v200_related_person__lastUpdated_search_test_param.present? run_search_test(c4bb_v200_related_person__lastUpdated_search_test_param) end end diff --git a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person_group.rb b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person_group.rb index ebb9c7fa..bd373d39 100644 --- a/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person_group.rb +++ b/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person_group.rb @@ -1,6 +1,7 @@ require_relative 'related_person/related_person_read_test' require_relative 'related_person/related_person_validation_test' require_relative 'related_person/related_person_must_support_test' + require_relative 'related_person/related_person_id_search_test' require_relative 'related_person/related_person_lastupdated_search_test' module CarinForBlueButtonTestKit @@ -76,6 +77,7 @@ def self.metadata test from: :c4bb_v200_related_person_read_test test from: :c4bb_v200_related_person_validation_test test from: :c4bb_v200_related_person_must_support_test + test from: :c4bb_v200_related_person__id_search_test test from: :c4bb_v200_related_person__lastUpdated_search_test end end diff --git a/lib/carin_for_blue_button_test_kit/generator/search_test_generator.rb b/lib/carin_for_blue_button_test_kit/generator/search_test_generator.rb index 67d62ee6..66f99520 100644 --- a/lib/carin_for_blue_button_test_kit/generator/search_test_generator.rb +++ b/lib/carin_for_blue_button_test_kit/generator/search_test_generator.rb @@ -8,7 +8,6 @@ class SearchTestGenerator class << self def generate(ig_metadata, base_output_dir) ig_metadata.groups - .reject { |group| SpecialCases.exclude_group? group } .select { |group| group.searches.present? } .each do |group| group.searches.each { |search| new(group, search, base_output_dir).generate } diff --git a/lib/carin_for_blue_button_test_kit/generator/special_cases.rb b/lib/carin_for_blue_button_test_kit/generator/special_cases.rb index 40edc709..a5c9e5c7 100644 --- a/lib/carin_for_blue_button_test_kit/generator/special_cases.rb +++ b/lib/carin_for_blue_button_test_kit/generator/special_cases.rb @@ -2,10 +2,6 @@ module CarinForBlueButtonTestKit class Generator module SpecialCases RESOURCES_TO_EXCLUDE = [ - 'Patient', - 'Organization', - 'Practitioner', - 'RelatedPerson' ].freeze PROFILES_TO_EXCLUDE = [