Class CommonCodeSystemsTerminologyService

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

public class CommonCodeSystemsTerminologyService extends Object implements ca.uhn.fhir.context.support.IValidationSupport
This validation support module can be used to validate codes against common CodeSystems that are commonly used, but are not distriuted with the FHIR specification for various reasons (size, complexity, etc.).

See CommonCodeSystemsTerminologyService in the HAPI FHIR documentation for details about what is and isn't covered by this class.

  • 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.CodeValidationIssue, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueCode, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueCoding, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueDetails, 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.GroupConceptProperty, 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
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

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

    TYPE_CODING, TYPE_GROUP, TYPE_STRING, URL_PREFIX_VALUE_SET
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommonCodeSystemsTerminologyService(ca.uhn.fhir.context.FhirContext theFhirContext)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.hl7.fhir.instance.model.api.IBaseResource
     
    static String
    getCodeSystemUrl(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem)
     
    protected String
    getErrorMessage(String errorCode, String theFirstParam, String theSecondParam)
     
    ca.uhn.fhir.context.FhirContext
     
    static ca.uhn.fhir.context.FhirVersionEnum
    getFhirVersionEnum(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theResource)
    N.B.: We are keeping this as a shim due to the upgrade we did to core 5.6.97+
     
    protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
     
    protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
    getValidateCodeResultInError(String errorCode, String theFirstParam, String theSecondParam)
     
    protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
    getValidateCodeResultOk(String theCode, String theDisplay)
     
    static String
    getValueSetUrl(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
     
    static String
    getValueSetVersion(ca.uhn.fhir.context.FhirContext theFhirContext, 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)
     
    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)
     
    ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
    validateCodeUsingSystemLookup(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theCode, String theSystem)
     

    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, fetchValueSet, generateSnapshot, invalidateCaches, isCodeableConceptValidationSuccessfulIfNotAllCodingsAreValid, isRemoteTerminologyServiceConfigured, lookupCode, lookupCode, translateConcept
  • Field Details

  • Constructor Details

  • Method Details

    • getName

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

      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
    • getValidateCodeResultInError

      protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult getValidateCodeResultInError(String errorCode, String theFirstParam, String theSecondParam)
    • getValidateCodeResultOk

      protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult getValidateCodeResultOk(String theCode, String theDisplay)
    • getValidateCodeResultError

      protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult getValidateCodeResultError(String theMessage)
    • validateCodeUsingSystemLookup

      @Nullable public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeUsingSystemLookup(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theCode, String theSystem)
    • 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
    • fetchCodeSystem

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

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

      public static String getValueSetUrl(ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
    • getCodeSystemUrl

      public static String getCodeSystemUrl(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem)
    • getValueSetVersion

      public static String getValueSetVersion(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSet)
    • getFhirVersionEnum

      public static ca.uhn.fhir.context.FhirVersionEnum getFhirVersionEnum(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource)
      N.B.: We are keeping this as a shim due to the upgrade we did to core 5.6.97+
    • getErrorMessage

      protected String getErrorMessage(String errorCode, String theFirstParam, String theSecondParam)