Class ValidationSupportChain

  • All Implemented Interfaces:
    ca.uhn.fhir.context.support.IValidationSupport

    public class ValidationSupportChain
    extends Object
    implements ca.uhn.fhir.context.support.IValidationSupport
    • 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.ValueSetExpansionOutcome
    • Field Summary

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

        URL_PREFIX_VALUE_SET
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValidationSupport​(int theIndex, ca.uhn.fhir.context.support.IValidationSupport theValidationSupport)
      Add a validation support module to the chain at the given index.
      void addValidationSupport​(ca.uhn.fhir.context.support.IValidationSupport theValidationSupport)
      Add a validation support module to the chain.
      ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcome expandValueSet​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.instance.model.api.IBaseResource theValueSetToExpand)  
      List<org.hl7.fhir.instance.model.api.IBaseResource> fetchAllConformanceResources()  
      List<org.hl7.fhir.instance.model.api.IBaseResource> fetchAllStructureDefinitions()  
      org.hl7.fhir.instance.model.api.IBaseResource fetchCodeSystem​(String theSystem)  
      <T extends org.hl7.fhir.instance.model.api.IBaseResource>
      T
      fetchResource​(Class<T> theClass, String theUri)  
      org.hl7.fhir.instance.model.api.IBaseResource fetchStructureDefinition​(String theUrl)  
      org.hl7.fhir.instance.model.api.IBaseResource fetchValueSet​(String theUrl)  
      org.hl7.fhir.instance.model.api.IBaseResource generateSnapshot​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, org.hl7.fhir.instance.model.api.IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName)  
      ca.uhn.fhir.context.FhirContext getFhirContext()  
      void invalidateCaches()  
      boolean isCodeSystemSupported​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem)  
      boolean isValueSetSupported​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl)  
      ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult lookupCode​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem, String theCode)  
      void removeValidationSupport​(ca.uhn.fhir.context.support.IValidationSupport theValidationSupport)
      Removes an item from the chain.
      ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCode​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl)  
      ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeInValueSet​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)  
    • Constructor Detail

      • ValidationSupportChain

        public ValidationSupportChain​(ca.uhn.fhir.context.support.IValidationSupport... theValidationSupportModules)
        Constructor
    • Method Detail

      • invalidateCaches

        public void invalidateCaches()
        Specified by:
        invalidateCaches 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
      • generateSnapshot

        public org.hl7.fhir.instance.model.api.IBaseResource generateSnapshot​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext,
                                                                              org.hl7.fhir.instance.model.api.IBaseResource theInput,
                                                                              String theUrl,
                                                                              String theWebUrl,
                                                                              String theProfileName)
        Specified by:
        generateSnapshot in interface ca.uhn.fhir.context.support.IValidationSupport
      • getFhirContext

        public ca.uhn.fhir.context.FhirContext getFhirContext()
        Specified by:
        getFhirContext in interface ca.uhn.fhir.context.support.IValidationSupport
      • addValidationSupport

        public void addValidationSupport​(ca.uhn.fhir.context.support.IValidationSupport theValidationSupport)
        Add a validation support module to the chain.

        Note that this method is not thread-safe. All validation support modules should be added prior to use.

        Parameters:
        theValidationSupport - The validation support. Must not be null, and must have a FhirContext that is configured for the same FHIR version as other entries in the chain.
      • addValidationSupport

        public void addValidationSupport​(int theIndex,
                                         ca.uhn.fhir.context.support.IValidationSupport theValidationSupport)
        Add a validation support module to the chain at the given index.

        Note that this method is not thread-safe. All validation support modules should be added prior to use.

        Parameters:
        theIndex - The index to add to
        theValidationSupport - The validation support. Must not be null, and must have a FhirContext that is configured for the same FHIR version as other entries in the chain.
      • removeValidationSupport

        public void removeValidationSupport​(ca.uhn.fhir.context.support.IValidationSupport theValidationSupport)
        Removes an item from the chain. Note that this method is mostly intended for testing. Removing items from the chain while validation is actually occurring is not an expected use case for this class.
      • expandValueSet

        public ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcome expandValueSet​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext,
                                                                                                      ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions,
                                                                                                      org.hl7.fhir.instance.model.api.IBaseResource theValueSetToExpand)
        Specified by:
        expandValueSet in interface ca.uhn.fhir.context.support.IValidationSupport
      • fetchAllConformanceResources

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

        public List<org.hl7.fhir.instance.model.api.IBaseResource> 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 theUrl)
        Specified by:
        fetchValueSet in interface ca.uhn.fhir.context.support.IValidationSupport
      • fetchResource

        public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T fetchResource​(Class<T> theClass,
                                                                                         String theUri)
        Specified by:
        fetchResource 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
      • validateCode

        public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCode​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext,
                                                                                                ca.uhn.fhir.context.support.ConceptValidationOptions theOptions,
                                                                                                String theCodeSystem,
                                                                                                String theCode,
                                                                                                String theDisplay,
                                                                                                String theValueSetUrl)
        Specified by:
        validateCode in interface ca.uhn.fhir.context.support.IValidationSupport
      • validateCodeInValueSet

        public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeInValueSet​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext,
                                                                                                          ca.uhn.fhir.context.support.ConceptValidationOptions theOptions,
                                                                                                          String theCodeSystem,
                                                                                                          String theCode,
                                                                                                          String theDisplay,
                                                                                                          @Nonnull
                                                                                                          org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
        Specified by:
        validateCodeInValueSet in interface ca.uhn.fhir.context.support.IValidationSupport
      • lookupCode

        public ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult lookupCode​(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext,
                                                                                          String theSystem,
                                                                                          String theCode)
        Specified by:
        lookupCode in interface ca.uhn.fhir.context.support.IValidationSupport