Module: USCoreTestKit::Generator::SpecialCases

Defined in:
lib/us_core_test_kit/generator/special_cases.rb

Constant Summary collapse

RESOURCES_TO_EXCLUDE =

These resources are excluded from US Core Test Suite

{
  'Location' => ['v311', 'v400', 'v501', 'v610'],
  'Medication' => ['v311', 'v400', 'v501', 'v610', 'v700', 'v800'],
  'PractitionerRole' => ['v311', 'v400']
}.freeze
PROFILES_TO_EXCLUDE =

These profiles are excluded from US Core Test Suite

[
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-survey',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-vital-signs'
].freeze
OPTIONAL_RESOURCES =
[
  'PractitionerRole',
  'QuestionnaireResponse'
].freeze
OPTIONAL_PROFILES =
{
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-simple-observation' => ['v610', 'v700']
}.freeze
NON_USCDI_RESOURCES =

These resources relies on references from other resources and do not have search tests. Test groups for these resources are placed at the bottom of US Core test group.

{
  'Encounter' => ['v311', 'v400'],
  'Organization' => ['v311', 'v400', 'v501', 'v610', 'v700', 'v800'],
  'Practitioner' => ['v311', 'v400', 'v501', 'v610', 'v700', 'v800'],
  'PractitionerRole' => ['v311', 'v400', 'v501', 'v610', 'v700', 'v800'],
  'Provenance' => ['v311', 'v400', 'v501', 'v610', 'v700', 'v800'],
  'RelatedPerson' => ['v501', 'v610', 'v700', 'v800']
}.freeze
SEARCHABLE_DELAYED_RESOURCES =

These resources relies on references from other resources but they also have mandatory search tests.

{
  'Location' => ['v700', 'v800']
}.freeze
ALL_VERSION_CATEGORY_FIRST_PROFILES =
[
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-result',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-test',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-imaging',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-screening-assessment',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-sdoh-assessment',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-social-history',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-survey',
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-simple-observation'
].freeze
VERSION_SPECIFIC_CATEGORY_FIRST_PROFILES =
{
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis' => ['v610', 'v700',
                                                                                              'v800'],
  'http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-problems-health-concerns' => ['v610',
                                                                                                   'v700', 'v800']
}.freeze

Class Method Summary collapse

Class Method Details

.exclude_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


65
66
67
68
# File 'lib/us_core_test_kit/generator/special_cases.rb', line 65

def exclude_group?(group)
  RESOURCES_TO_EXCLUDE.key?(group.resource) &&
    RESOURCES_TO_EXCLUDE[group.resource].include?(group.reformatted_version)
end