Package ca.uhn.fhir.jpa.term
Class BaseTermReadSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.term.BaseTermReadSvcImpl
- All Implemented Interfaces:
ca.uhn.fhir.context.support.IValidationSupport
,ITermReadSvc
- Direct Known Subclasses:
TermReadSvcDstu2
,TermReadSvcDstu3
,TermReadSvcR4
,TermReadSvcR5
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionstatic final int
protected ITermCodeSystemDao
protected ITermConceptDao
protected ITermConceptDesignationDao
protected ITermConceptPropertyDao
protected ca.uhn.fhir.context.FhirContext
protected ca.uhn.fhir.jpa.api.dao.DaoRegistry
protected javax.persistence.EntityManager
protected ITermValueSetDao
protected ITermValueSetConceptDao
protected ITermValueSetConceptDesignationDao
Fields inherited from interface ca.uhn.fhir.context.support.IValidationSupport
URL_PREFIX_VALUE_SET
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyFilter
(String theDisplay, String theFilterDisplay) void
This method is present only for unit tests, do not call from client codeca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
codeSystemValidateCode
(org.hl7.fhir.instance.model.api.IIdType theCodeSystemId, String theCodeSystemUrl, String theVersion, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseDatatype theCoding, org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConcept) Version independentvoid
deleteValueSetAndChildren
(ResourceTable theResourceTable) void
deleteValueSetForResource
(ResourceTable theResourceTable) org.hl7.fhir.r4.model.ValueSet
expandValueSet
(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, String theValueSetCanonicalUrl) org.hl7.fhir.r4.model.ValueSet
expandValueSet
(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.r4.model.ValueSet theValueSetToExpand) void
expandValueSet
(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.r4.model.ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) List<ca.uhn.fhir.util.FhirVersionIndependentConcept>
expandValueSetIntoConceptList
(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, String theValueSetCanonicalUrl) org.hl7.fhir.r4.model.CodeSystem
org.hl7.fhir.r4.model.ValueSet
fetchCanonicalValueSetFromCompleteContext
(String theSystem) org.hl7.fhir.instance.model.api.IBaseResource
fetchCodeSystem
(String theSystem) org.hl7.fhir.instance.model.api.IBaseResource
fetchValueSet
(String theValueSetUrl) findCodesAbove
(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) List<ca.uhn.fhir.util.FhirVersionIndependentConcept>
findCodesAbove
(String theSystem, String theCode) List<ca.uhn.fhir.util.FhirVersionIndependentConcept>
findCodesAboveUsingBuiltInSystems
(String theSystem, String theCode) findCodesBelow
(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) List<ca.uhn.fhir.util.FhirVersionIndependentConcept>
findCodesBelow
(String theSystem, String theCode) List<ca.uhn.fhir.util.FhirVersionIndependentConcept>
findCodesBelowUsingBuiltInSystems
(String theSystem, String theCode) findCurrentTermValueSet
(String theUrl) When the search is for unversioned loinc system it uses the forcedId to obtain the current version, as it is not necessarily the last one anymore.ca.uhn.fhir.context.FhirContext
protected abstract org.hl7.fhir.r4.model.ValueSet
getValueSetFromResourceTable
(ResourceTable theResourceTable) invalidatePreCalculatedExpansion
(org.hl7.fhir.instance.model.api.IIdType theValueSetId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) boolean
isCodeSystemSupported
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) boolean
isValueSetPreExpandedForCodeValidation
(org.hl7.fhir.r4.model.ValueSet theValueSet) protected ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult
lookupCode
(String theSystem, String theCode, String theDisplayLanguage) void
Optional<org.hl7.fhir.instance.model.api.IBaseResource>
readCodeSystemByForcedId
(String theForcedId) Version independentvoid
static void
setInvokeOnNextCallForUnitTest
(Runnable theInvokeOnNextCallForUnitTest) void
start()
void
storeTermValueSet
(ResourceTable theResourceTable, org.hl7.fhir.r4.model.ValueSet theValueSet) ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem.SubsumesResult
subsumes
(org.hl7.fhir.instance.model.api.IPrimitiveType<String> theCodeA, org.hl7.fhir.instance.model.api.IPrimitiveType<String> theCodeB, org.hl7.fhir.instance.model.api.IPrimitiveType<String> theSystem, org.hl7.fhir.instance.model.api.IBaseCoding theCodingA, org.hl7.fhir.instance.model.api.IBaseCoding theCodingB) protected abstract org.hl7.fhir.r4.model.CodeableConcept
toCanonicalCodeableConcept
(org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConcept) protected abstract org.hl7.fhir.r4.model.CodeSystem
toCanonicalCodeSystem
(org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem) protected abstract org.hl7.fhir.r4.model.Coding
toCanonicalCoding
(org.hl7.fhir.instance.model.api.IBaseCoding theCoding) protected abstract org.hl7.fhir.r4.model.Coding
toCanonicalCoding
(org.hl7.fhir.instance.model.api.IBaseDatatype theCoding) protected abstract org.hl7.fhir.r4.model.ValueSet
toCanonicalValueSet
(org.hl7.fhir.instance.model.api.IBaseResource theValueSet) ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
validateCode
(ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, org.hl7.fhir.instance.model.api.IIdType theValueSetId, String theValueSetIdentifier, String theCodeSystemIdentifierToValidate, String theCodeToValidate, String theDisplayToValidate, org.hl7.fhir.instance.model.api.IBaseDatatype theCodingToValidate, org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConceptToValidate) Version independentca.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) protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
validateCodeIsInPreExpandedValueSet
(ca.uhn.fhir.context.support.ConceptValidationOptions theValidationOptions, org.hl7.fhir.r4.model.ValueSet theValueSet, String theSystem, String theCode, String theDisplay, org.hl7.fhir.r4.model.Coding theCoding, org.hl7.fhir.r4.model.CodeableConcept theCodeableConcept) 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.jpa.term.api.ITermReadSvc
expandValueSet, expandValueSet, isValueSetPreExpandedForCodeValidation, validateCodeIsInPreExpandedValueSet
Methods inherited from interface ca.uhn.fhir.context.support.IValidationSupport
expandValueSet, fetchAllConformanceResources, fetchAllNonBaseStructureDefinitions, fetchAllStructureDefinitions, fetchResource, fetchStructureDefinition, generateSnapshot, invalidateCaches, isRemoteTerminologyServiceConfigured, isValueSetSupported, lookupCode, lookupCode, translateConcept
-
Field Details
-
DEFAULT_FETCH_SIZE
- See Also:
-
myDaoRegistry
-
myCodeSystemDao
-
myConceptDao
-
myConceptPropertyDao
-
myConceptDesignationDao
-
myTermValueSetDao
-
myValueSetConceptDao
-
myValueSetConceptDesignationDao
-
myContext
-
myEntityManager
-
-
Constructor Details
-
BaseTermReadSvcImpl
public BaseTermReadSvcImpl()
-
-
Method Details
-
isCodeSystemSupported
public boolean isCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) - Specified by:
isCodeSystemSupported
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
clearCaches
This method is present only for unit tests, do not call from client code -
deleteValueSetForResource
-
deleteValueSetAndChildren
- Specified by:
deleteValueSetAndChildren
in interfaceITermReadSvc
-
expandValueSetIntoConceptList
@Transactional public List<ca.uhn.fhir.util.FhirVersionIndependentConcept> expandValueSetIntoConceptList(@Nullable ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, @Nonnull String theValueSetCanonicalUrl) - Specified by:
expandValueSetIntoConceptList
in interfaceITermReadSvc
-
expandValueSet
@Transactional public org.hl7.fhir.r4.model.ValueSet expandValueSet(@Nullable ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, @Nonnull String theValueSetCanonicalUrl) - Specified by:
expandValueSet
in interfaceITermReadSvc
-
expandValueSet
@Transactional(propagation=REQUIRED) public org.hl7.fhir.r4.model.ValueSet expandValueSet(@Nullable ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, @Nonnull org.hl7.fhir.r4.model.ValueSet theValueSetToExpand) - Specified by:
expandValueSet
in interfaceITermReadSvc
-
applyFilter
-
expandValueSet
@Transactional(propagation=REQUIRED) public void expandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.r4.model.ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) - Specified by:
expandValueSet
in interfaceITermReadSvc
-
invalidatePreCalculatedExpansion
@Transactional public String invalidatePreCalculatedExpansion(org.hl7.fhir.instance.model.api.IIdType theValueSetId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
invalidatePreCalculatedExpansion
in interfaceITermReadSvc
-
isValueSetPreExpandedForCodeValidation
@Transactional public boolean isValueSetPreExpandedForCodeValidation(org.hl7.fhir.r4.model.ValueSet theValueSet) - Specified by:
isValueSetPreExpandedForCodeValidation
in interfaceITermReadSvc
-
validateCodeIsInPreExpandedValueSet
protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeIsInPreExpandedValueSet(ca.uhn.fhir.context.support.ConceptValidationOptions theValidationOptions, org.hl7.fhir.r4.model.ValueSet theValueSet, String theSystem, String theCode, String theDisplay, org.hl7.fhir.r4.model.Coding theCoding, org.hl7.fhir.r4.model.CodeableConcept theCodeableConcept) -
findCode
- Specified by:
findCode
in interfaceITermReadSvc
-
findCodesAbove
@Transactional(propagation=REQUIRED) public Set<TermConcept> findCodesAbove(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) - Specified by:
findCodesAbove
in interfaceITermReadSvc
-
findCodesAbove
@Transactional public List<ca.uhn.fhir.util.FhirVersionIndependentConcept> findCodesAbove(String theSystem, String theCode) - Specified by:
findCodesAbove
in interfaceITermReadSvc
-
findCodesBelow
@Transactional(propagation=REQUIRED) public Set<TermConcept> findCodesBelow(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) - Specified by:
findCodesBelow
in interfaceITermReadSvc
-
findCodesBelow
@Transactional public List<ca.uhn.fhir.util.FhirVersionIndependentConcept> findCodesBelow(String theSystem, String theCode) - Specified by:
findCodesBelow
in interfaceITermReadSvc
-
start
-
scheduleJob
-
preExpandDeferredValueSetsToTerminologyTables
- Specified by:
preExpandDeferredValueSetsToTerminologyTables
in interfaceITermReadSvc
-
validateCode
@Transactional public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCode(ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, org.hl7.fhir.instance.model.api.IIdType theValueSetId, String theValueSetIdentifier, String theCodeSystemIdentifierToValidate, String theCodeToValidate, String theDisplayToValidate, org.hl7.fhir.instance.model.api.IBaseDatatype theCodingToValidate, org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConceptToValidate) Description copied from interface:ITermReadSvc
Version independent- Specified by:
validateCode
in interfaceITermReadSvc
-
getValueSetFromResourceTable
protected abstract org.hl7.fhir.r4.model.ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable) -
storeTermValueSet
@Transactional public void storeTermValueSet(ResourceTable theResourceTable, org.hl7.fhir.r4.model.ValueSet theValueSet) - Specified by:
storeTermValueSet
in interfaceITermReadSvc
-
subsumes
@Transactional public ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem.SubsumesResult subsumes(org.hl7.fhir.instance.model.api.IPrimitiveType<String> theCodeA, org.hl7.fhir.instance.model.api.IPrimitiveType<String> theCodeB, org.hl7.fhir.instance.model.api.IPrimitiveType<String> theSystem, org.hl7.fhir.instance.model.api.IBaseCoding theCodingA, org.hl7.fhir.instance.model.api.IBaseCoding theCodingB) - Specified by:
subsumes
in interfaceITermReadSvc
-
toCanonicalValueSet
protected abstract org.hl7.fhir.r4.model.ValueSet toCanonicalValueSet(org.hl7.fhir.instance.model.api.IBaseResource theValueSet) -
lookupCode
protected ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult lookupCode(String theSystem, String theCode, String theDisplayLanguage) -
validateCodeInValueSet
@Transactional 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 interfaceca.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 interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchCodeSystem
- Specified by:
fetchCodeSystem
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchCanonicalCodeSystemFromCompleteContext
public org.hl7.fhir.r4.model.CodeSystem fetchCanonicalCodeSystemFromCompleteContext(String theSystem) - Specified by:
fetchCanonicalCodeSystemFromCompleteContext
in interfaceITermReadSvc
-
fetchCanonicalValueSetFromCompleteContext
-
toCanonicalCodeSystem
protected abstract org.hl7.fhir.r4.model.CodeSystem toCanonicalCodeSystem(org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem) -
fetchValueSet
- Specified by:
fetchValueSet
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
getFhirContext
- Specified by:
getFhirContext
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
findCodesAboveUsingBuiltInSystems
public List<ca.uhn.fhir.util.FhirVersionIndependentConcept> findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) - Specified by:
findCodesAboveUsingBuiltInSystems
in interfaceITermReadSvc
-
findCodesBelowUsingBuiltInSystems
public List<ca.uhn.fhir.util.FhirVersionIndependentConcept> findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) - Specified by:
findCodesBelowUsingBuiltInSystems
in interfaceITermReadSvc
-
toCanonicalCoding
@Nullable protected abstract org.hl7.fhir.r4.model.Coding toCanonicalCoding(@Nullable org.hl7.fhir.instance.model.api.IBaseDatatype theCoding) -
toCanonicalCoding
@Nullable protected abstract org.hl7.fhir.r4.model.Coding toCanonicalCoding(@Nullable org.hl7.fhir.instance.model.api.IBaseCoding theCoding) -
toCanonicalCodeableConcept
@Nullable protected abstract org.hl7.fhir.r4.model.CodeableConcept toCanonicalCodeableConcept(@Nullable org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConcept) -
codeSystemValidateCode
@Transactional public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult codeSystemValidateCode(org.hl7.fhir.instance.model.api.IIdType theCodeSystemId, String theCodeSystemUrl, String theVersion, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseDatatype theCoding, org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConcept) Description copied from interface:ITermReadSvc
Version independent- Specified by:
codeSystemValidateCode
in interfaceITermReadSvc
-
findCurrentTermValueSet
When the search is for unversioned loinc system it uses the forcedId to obtain the current version, as it is not necessarily the last one anymore. For other cases it keeps on considering the last uploaded as the current- Specified by:
findCurrentTermValueSet
in interfaceITermReadSvc
-
readCodeSystemByForcedId
public Optional<org.hl7.fhir.instance.model.api.IBaseResource> readCodeSystemByForcedId(String theForcedId) Description copied from interface:ITermReadSvc
Version independent- Specified by:
readCodeSystemByForcedId
in interfaceITermReadSvc
-
setInvokeOnNextCallForUnitTest
-