Class InMemoryTerminologyServerValidationSupport

java.lang.Object
org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport
All Implemented Interfaces:
ca.uhn.fhir.context.support.IValidationSupport

public class InMemoryTerminologyServerValidationSupport extends Object implements ca.uhn.fhir.context.support.IValidationSupport
This class is a basic in-memory terminology service, designed to expand ValueSets and validate codes completely in-memory. It is suitable for runtime validation purposes where no dedicated terminology service exists (either an internal one such as the HAPI FHIR JPA terminology service, or an external term service API)
  • Nested Class Summary

    Nested Classes

    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 interface ca.uhn.fhir.context.support.IValidationSupport

    URL_PREFIX_VALUE_SET
  • Constructor Summary

    Constructors
    Constructor
    Description
    InMemoryTerminologyServerValidationSupport(ca.uhn.fhir.context.FhirContext theCtx)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    void
    expandValueSetIncludeOrExclude(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, Consumer<ca.uhn.fhir.util.FhirVersionIndependentConcept> theConsumer, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent theIncludeOrExclude)
    Use with caution - this is not a stable API
    ca.uhn.fhir.context.FhirContext
     
    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, String theDisplayLanguage)
     
    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 theCodeSystemUrlAndVersion, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
     

    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, fetchAllConformanceResources, fetchAllNonBaseStructureDefinitions, fetchAllStructureDefinitions, fetchCodeSystem, fetchResource, fetchStructureDefinition, fetchValueSet, generateSnapshot, invalidateCaches, isRemoteTerminologyServiceConfigured, lookupCode, translateConcept
  • Constructor Details

  • Method Details

    • getFhirContext

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

      public ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcome expandValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSetToExpand)
      Specified by:
      expandValueSet 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 theCodeSystemUrlAndVersion, String theCode, String theDisplay, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
      Specified by:
      validateCodeInValueSet in interface ca.uhn.fhir.context.support.IValidationSupport
    • validateCode

      @Nullable public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCode(@Nonnull ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, @Nonnull 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
    • lookupCode

      public ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult lookupCode(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem, String theCode, String theDisplayLanguage)
      Specified by:
      lookupCode 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
    • expandValueSetIncludeOrExclude

      public void expandValueSetIncludeOrExclude(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, Consumer<ca.uhn.fhir.util.FhirVersionIndependentConcept> theConsumer, org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent theIncludeOrExclude) throws InMemoryTerminologyServerValidationSupport.ExpansionCouldNotBeCompletedInternallyException
      Use with caution - this is not a stable API
      Throws:
      InMemoryTerminologyServerValidationSupport.ExpansionCouldNotBeCompletedInternallyException
      Since:
      5.6.0