Class PrePopulatedValidationSupport

All Implemented Interfaces:
ca.uhn.fhir.context.support.IValidationSupport
Direct Known Subclasses:
NpmPackageValidationSupport

public class PrePopulatedValidationSupport extends BaseStaticResourceValidationSupport implements ca.uhn.fhir.context.support.IValidationSupport
This class is an implementation of IValidationSupport which may be pre-populated with a collection of validation resources to be used by the validator.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface ca.uhn.fhir.context.support.IValidationSupport

    ca.uhn.fhir.context.support.IValidationSupport.BaseConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult, ca.uhn.fhir.context.support.IValidationSupport.CodingConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.ConceptDesignation, ca.uhn.fhir.context.support.IValidationSupport.IssueSeverity, ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult, ca.uhn.fhir.context.support.IValidationSupport.StringConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.TranslateCodeRequest, ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcome
  • Field Summary

    Fields inherited from class org.hl7.fhir.common.hapi.validation.support.BaseValidationSupport

    myCtx

    Fields inherited from interface ca.uhn.fhir.context.support.IValidationSupport

    URL_PREFIX_VALUE_SET
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theContext)
    Constructor
    PrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, Map<String,org.hl7.fhir.instance.model.api.IBaseResource> theStructureDefinitions, Map<String,org.hl7.fhir.instance.model.api.IBaseResource> theValueSets, Map<String,org.hl7.fhir.instance.model.api.IBaseResource> theCodeSystems)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCodeSystem(org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem)
    Add a new CodeSystem resource which will be available to the validator.
    void
    addResource(org.hl7.fhir.instance.model.api.IBaseResource theResource)
     
    void
    addStructureDefinition(org.hl7.fhir.instance.model.api.IBaseResource theStructureDefinition)
    Add a new StructureDefinition resource which will be available to the validator.
    void
    addValueSet(org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
    Add a new ValueSet resource which will be available to the validator.
    List<org.hl7.fhir.instance.model.api.IBaseResource>
     
    <T extends org.hl7.fhir.instance.model.api.IBaseResource>
    List<T>
     
    org.hl7.fhir.instance.model.api.IBaseResource
     
    org.hl7.fhir.instance.model.api.IBaseResource
     
    org.hl7.fhir.instance.model.api.IBaseResource
     
    boolean
    isCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem)
     
    boolean
    isValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl)
     

    Methods inherited from class org.hl7.fhir.common.hapi.validation.support.BaseValidationSupport

    getFhirContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ca.uhn.fhir.context.support.IValidationSupport

    expandValueSet, expandValueSet, fetchAllNonBaseStructureDefinitions, fetchResource, generateSnapshot, getFhirContext, invalidateCaches, isRemoteTerminologyServiceConfigured, lookupCode, lookupCode, translateConcept, validateCode, validateCodeInValueSet
  • Constructor Details

    • PrePopulatedValidationSupport

      public PrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theContext)
      Constructor
    • PrePopulatedValidationSupport

      public PrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, Map<String,org.hl7.fhir.instance.model.api.IBaseResource> theStructureDefinitions, Map<String,org.hl7.fhir.instance.model.api.IBaseResource> theValueSets, Map<String,org.hl7.fhir.instance.model.api.IBaseResource> theCodeSystems)
      Constructor
      Parameters:
      theStructureDefinitions - The StructureDefinitions to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.
      theValueSets - The ValueSets to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.
      theCodeSystems - The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.
  • Method Details

    • addCodeSystem

      public void addCodeSystem(org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem)
      Add a new CodeSystem resource which will be available to the validator. Note that the URL field) in this resource must contain a value as this value will be used as the logical URL. <p> Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), it will be stored in three ways: <ul> <li>Extension</li> <li>StructureDefinition/Extension</li> <li>http://hl7.org/StructureDefinition/Extension</li> </ul> </p>
    • addStructureDefinition

      public void addStructureDefinition(org.hl7.fhir.instance.model.api.IBaseResource theStructureDefinition)
      Add a new StructureDefinition resource which will be available to the validator. Note that the URL field) in this resource must contain a value as this value will be used as the logical URL. <p> Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), it will be stored in three ways: <ul> <li>Extension</li> <li>StructureDefinition/Extension</li> <li>http://hl7.org/StructureDefinition/Extension</li> </ul> </p>
    • addValueSet

      public void addValueSet(org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
      Add a new ValueSet resource which will be available to the validator. Note that the URL field) in this resource must contain a value as this value will be used as the logical URL. <p> Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), it will be stored in three ways: <ul> <li>Extension</li> <li>StructureDefinition/Extension</li> <li>http://hl7.org/StructureDefinition/Extension</li> </ul> </p>
    • addResource

      public void addResource(@Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Parameters:
      theResource - The resource. This method delegates to the type-specific methods (e.g. addCodeSystem(IBaseResource)) and will do nothing if the resource type is not supported by this class.
      Since:
      5.5.0
    • fetchAllConformanceResources

      public List<org.hl7.fhir.instance.model.api.IBaseResource> fetchAllConformanceResources()
      Specified by:
      fetchAllConformanceResources in interface ca.uhn.fhir.context.support.IValidationSupport
    • fetchAllStructureDefinitions

      public <T extends org.hl7.fhir.instance.model.api.IBaseResource> List<T> fetchAllStructureDefinitions()
      Specified by:
      fetchAllStructureDefinitions in interface ca.uhn.fhir.context.support.IValidationSupport
    • fetchCodeSystem

      public org.hl7.fhir.instance.model.api.IBaseResource fetchCodeSystem(String theSystem)
      Specified by:
      fetchCodeSystem in interface ca.uhn.fhir.context.support.IValidationSupport
    • fetchValueSet

      public org.hl7.fhir.instance.model.api.IBaseResource fetchValueSet(String theUri)
      Specified by:
      fetchValueSet in interface ca.uhn.fhir.context.support.IValidationSupport
    • fetchStructureDefinition

      public org.hl7.fhir.instance.model.api.IBaseResource fetchStructureDefinition(String theUrl)
      Specified by:
      fetchStructureDefinition in interface ca.uhn.fhir.context.support.IValidationSupport
    • isCodeSystemSupported

      public boolean isCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem)
      Specified by:
      isCodeSystemSupported in interface ca.uhn.fhir.context.support.IValidationSupport
    • isValueSetSupported

      public boolean isValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl)
      Specified by:
      isValueSetSupported in interface ca.uhn.fhir.context.support.IValidationSupport