Class RemoteTerminologyServiceValidationSupport

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

public class RemoteTerminologyServiceValidationSupport extends BaseValidationSupport implements ca.uhn.fhir.context.support.IValidationSupport
This class is an implementation of IValidationSupport that fetches validation codes from a remote FHIR based terminology server. It will invoke the FHIR ValueSet/$validate-code operation in order to validate codes.
  • 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

    TYPE_CODING, TYPE_STRING, URL_PREFIX_VALUE_SET
  • Constructor Summary

    Constructors
    Constructor
    Description
    RemoteTerminologyServiceValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext)
    Constructor
    RemoteTerminologyServiceValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, String theBaseUrl)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addClientInterceptor(Object theClientInterceptor)
    Adds an interceptor that will be registered to all clients.
    protected org.hl7.fhir.instance.model.api.IBaseParameters
    buildValidateCodeInputParameters(String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
     
    static ca.uhn.fhir.context.support.IValidationSupport.BaseConceptProperty
    createConceptProperty(String theName, org.hl7.fhir.instance.model.api.IBaseDatatype theValue)
     
    org.hl7.fhir.instance.model.api.IBaseResource
     
    org.hl7.fhir.instance.model.api.IBaseResource
    fetchValueSet(String theValueSetUrl)
     
     
    protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
    invokeRemoteValidateCode(String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
     
    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, ca.uhn.fhir.context.support.LookupCodeRequest theLookupCodeRequest)
     
    void
    setBaseUrl(String theBaseUrl)
    Sets the FHIR Terminology Server base URL
    ca.uhn.fhir.context.support.TranslateConceptResults
    translateConcept(ca.uhn.fhir.context.support.IValidationSupport.TranslateCodeRequest theRequest)
     
    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)
     

    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, fetchAllConformanceResources, fetchAllNonBaseStructureDefinitions, fetchAllSearchParameters, fetchAllStructureDefinitions, fetchBinary, fetchResource, fetchStructureDefinition, generateSnapshot, getFhirContext, invalidateCaches, isEnabledValidationForCodingsLogicalAnd, isRemoteTerminologyServiceConfigured, lookupCode, lookupCode
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName 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
    • fetchCodeSystem

      public org.hl7.fhir.instance.model.api.IBaseResource fetchCodeSystem(String theSystem)
      Specified by:
      fetchCodeSystem 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, @Nonnull ca.uhn.fhir.context.support.LookupCodeRequest theLookupCodeRequest)
      Specified by:
      lookupCode in interface ca.uhn.fhir.context.support.IValidationSupport
    • createConceptProperty

      public static ca.uhn.fhir.context.support.IValidationSupport.BaseConceptProperty createConceptProperty(String theName, org.hl7.fhir.instance.model.api.IBaseDatatype theValue)
    • fetchValueSet

      public org.hl7.fhir.instance.model.api.IBaseResource fetchValueSet(String theValueSetUrl)
      Specified by:
      fetchValueSet 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
    • translateConcept

      public ca.uhn.fhir.context.support.TranslateConceptResults translateConcept(ca.uhn.fhir.context.support.IValidationSupport.TranslateCodeRequest theRequest)
      Specified by:
      translateConcept in interface ca.uhn.fhir.context.support.IValidationSupport
    • invokeRemoteValidateCode

      protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult invokeRemoteValidateCode(String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
    • buildValidateCodeInputParameters

      protected org.hl7.fhir.instance.model.api.IBaseParameters buildValidateCodeInputParameters(String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
    • setBaseUrl

      public void setBaseUrl(String theBaseUrl)
      Sets the FHIR Terminology Server base URL
      Parameters:
      theBaseUrl - The base URL, e.g. "..."
    • addClientInterceptor

      public void addClientInterceptor(@Nonnull Object theClientInterceptor)
      Adds an interceptor that will be registered to all clients.

      Note that this method is not thread-safe and should only be called prior to this module being used.

      Parameters:
      theClientInterceptor - The interceptor (must not be null)