
Package ca.uhn.fhir.jpa.term
Class TermReadSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.term.TermReadSvcImpl
- All Implemented Interfaces:
ca.uhn.fhir.context.support.IValidationSupport,ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs,ITermReadSvc
public class TermReadSvcImpl
extends Object
implements ITermReadSvc, ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs
-
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.BooleanConceptProperty, 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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprotected ITermCodeSystemDaoprotected ITermConceptDaoprotected ca.uhn.fhir.context.FhirContextprotected DaoRegistryprotected jakarta.persistence.EntityManagerprotected ITermValueSetDaoprotected ITermValueSetConceptDaoprotected ITermValueSetConceptDesignationDaoFields inherited from interface ca.uhn.fhir.context.support.IValidationSupport
TYPE_BOOLEAN, TYPE_CODING, TYPE_GROUP, TYPE_STRING, URL_PREFIX_STRUCTURE_DEFINITION, URL_PREFIX_VALUE_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyFilter(String theDisplay, String theFilterDisplay) voiddeleteValueSetAndChildren(ResourceTable theResourceTable) deleteValueSetForResource(ResourceTable theResourceTable) ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcomeexpandValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.instance.model.api.IBaseResource theValueSetToExpand) org.hl7.fhir.r4.model.ValueSetexpandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, String theValueSetCanonicalUrl) org.hl7.fhir.instance.model.api.IBaseResourceexpandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.instance.model.api.IBaseResource theInput) Version independentvoidexpandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.instance.model.api.IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) org.hl7.fhir.r4.model.ValueSetexpandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.r4.model.ValueSet theValueSetToExpand) voidexpandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.r4.model.ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) expandValueSetIntoConceptList(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, String theValueSetCanonicalUrl) org.hl7.fhir.r4.model.CodeSystemorg.hl7.fhir.r4.model.ValueSetfetchCanonicalValueSetFromCompleteContext(String theSystem) org.hl7.fhir.instance.model.api.IBaseResourcefetchValueSet(String theValueSetUrl) findCodesAbove(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) findCodesAbove(String theSystem, String theCode) findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) findCodesBelow(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) findCodesBelow(String theSystem, String theCode) 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.FhirContextvoidinvalidatePreCalculatedExpansion(org.hl7.fhir.instance.model.api.IIdType theValueSetId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) booleanisCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) booleanisValueSetPreExpandedForCodeValidation(org.hl7.fhir.instance.model.api.IBaseResource theValueSet) Version independentbooleanisValueSetPreExpandedForCodeValidation(org.hl7.fhir.r4.model.ValueSet theValueSet) booleanisValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl) ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResultlookupCode(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.LookupCodeRequest theLookupCodeRequest) voidprotected ca.uhn.fhir.context.support.IValidationSupportOptional<org.hl7.fhir.instance.model.api.IBaseResource> readCodeSystemByForcedId(String theForcedId) Version independentVersion independent Recreates freetext indexes for TermConcept and nested TermConceptPropertyvoidscheduleJobs(ca.uhn.fhir.jpa.model.sched.ISchedulerService theSchedulerService) static voidsetForceDisableHibernateSearchForUnitTest(boolean theForceDisableHibernateSearchForUnitTest) static voidsetInvokeOnNextCallForUnitTest(Runnable theInvokeOnNextCallForUnitTest) voidstart()voidstoreTermValueSet(ResourceTable theResourceTable, org.hl7.fhir.r4.model.ValueSet theValueSet) 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) ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResultvalidateCode(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystemUrl, String theCode, String theDisplay, String theValueSetUrl) ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResultvalidateCodeInValueSet(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.CodeValidationResultvalidateCodeIsInPreExpandedValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, org.hl7.fhir.instance.model.api.IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseDatatype theCoding, org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConcept) Version independentprotected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResultvalidateCodeIsInPreExpandedValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, 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, waitMethods inherited from interface ca.uhn.fhir.jpa.term.api.ITermReadSvc
getNameMethods inherited from interface ca.uhn.fhir.context.support.IValidationSupport
expandValueSet, fetchAllConformanceResources, fetchAllNonBaseStructureDefinitions, fetchAllSearchParameters, fetchAllStructureDefinitions, fetchBinary, fetchCodeSystem, fetchResource, fetchStructureDefinition, generateSnapshot, isCodeableConceptValidationSuccessfulIfNotAllCodingsAreValid, isRemoteTerminologyServiceConfigured, lookupCode, lookupCode, translateConcept
-
Field Details
-
DEFAULT_FETCH_SIZE
- See Also:
-
DEFAULT_MASS_INDEXER_OBJECT_LOADING_THREADS
- See Also:
-
MAX_MASS_INDEXER_OBJECT_LOADING_THREADS
- See Also:
-
myDaoRegistry
-
myCodeSystemDao
-
myConceptDao
-
myTermValueSetDao
-
myValueSetConceptDao
-
myValueSetConceptDesignationDao
-
myContext
-
myEntityManager
-
-
Constructor Details
-
TermReadSvcImpl
public TermReadSvcImpl()
-
-
Method Details
-
isCodeSystemSupported
public boolean isCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) - Specified by:
isCodeSystemSupportedin interfaceca.uhn.fhir.context.support.IValidationSupport
-
isValueSetSupported
public boolean isValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl) - Specified by:
isValueSetSupportedin interfaceca.uhn.fhir.context.support.IValidationSupport
-
deleteValueSetForResource
-
deleteValueSetAndChildren
- Specified by:
deleteValueSetAndChildrenin interfaceITermReadSvc
-
expandValueSetIntoConceptList
@Transactional public List<FhirVersionIndependentConcept> expandValueSetIntoConceptList(@Nullable ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, @Nonnull String theValueSetCanonicalUrl) - Specified by:
expandValueSetIntoConceptListin interfaceITermReadSvc
-
expandValueSet
public org.hl7.fhir.r4.model.ValueSet expandValueSet(@Nullable ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, @Nonnull String theValueSetCanonicalUrl) - Specified by:
expandValueSetin interfaceITermReadSvc
-
expandValueSet
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:
expandValueSetin interfaceITermReadSvc
-
applyFilter
-
expandValueSet
public void expandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.r4.model.ValueSet theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) - Specified by:
expandValueSetin interfaceITermReadSvc
-
invalidatePreCalculatedExpansion
@Transactional public String invalidatePreCalculatedExpansion(org.hl7.fhir.instance.model.api.IIdType theValueSetId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
invalidatePreCalculatedExpansionin interfaceITermReadSvc
-
isValueSetPreExpandedForCodeValidation
@Transactional(readOnly=true) public boolean isValueSetPreExpandedForCodeValidation(org.hl7.fhir.r4.model.ValueSet theValueSet) - Specified by:
isValueSetPreExpandedForCodeValidationin interfaceITermReadSvc
-
validateCodeIsInPreExpandedValueSet
protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeIsInPreExpandedValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, 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:
findCodein interfaceITermReadSvc
-
findCodes
- Specified by:
findCodesin interfaceITermReadSvc
-
findCodesAbove
@Transactional(propagation=REQUIRED, readOnly=true) public Set<TermConcept> findCodesAbove(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) - Specified by:
findCodesAbovein interfaceITermReadSvc
-
findCodesAbove
@Transactional(readOnly=true) public List<FhirVersionIndependentConcept> findCodesAbove(String theSystem, String theCode) - Specified by:
findCodesAbovein interfaceITermReadSvc
-
findCodesBelow
@Transactional(propagation=REQUIRED, readOnly=true) public Set<TermConcept> findCodesBelow(Long theCodeSystemResourcePid, Long theCodeSystemVersionPid, String theCode) - Specified by:
findCodesBelowin interfaceITermReadSvc
-
findCodesBelow
@Transactional(readOnly=true) public List<FhirVersionIndependentConcept> findCodesBelow(String theSystem, String theCode) - Specified by:
findCodesBelowin interfaceITermReadSvc
-
start
-
scheduleJobs
- Specified by:
scheduleJobsin interfaceca.uhn.fhir.jpa.model.sched.IHasScheduledJobs
-
preExpandDeferredValueSetsToTerminologyTables
- Specified by:
preExpandDeferredValueSetsToTerminologyTablesin interfaceITermReadSvc
-
invalidateCaches
- Specified by:
invalidateCachesin interfaceca.uhn.fhir.context.support.IValidationSupport
-
storeTermValueSet
@Transactional public void storeTermValueSet(ResourceTable theResourceTable, org.hl7.fhir.r4.model.ValueSet theValueSet) - Specified by:
storeTermValueSetin interfaceITermReadSvc
-
subsumes
@Transactional public 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:
subsumesin interfaceITermReadSvc
-
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:
lookupCodein interfaceca.uhn.fhir.context.support.IValidationSupport
-
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:
validateCodeInValueSetin interfaceca.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 theCodeSystemUrl, String theCode, String theDisplay, String theValueSetUrl) - Specified by:
validateCodein interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchCanonicalCodeSystemFromCompleteContext
public org.hl7.fhir.r4.model.CodeSystem fetchCanonicalCodeSystemFromCompleteContext(String theSystem) - Specified by:
fetchCanonicalCodeSystemFromCompleteContextin interfaceITermReadSvc
-
provideValidationSupport
-
fetchCanonicalValueSetFromCompleteContext
-
fetchValueSet
- Specified by:
fetchValueSetin interfaceca.uhn.fhir.context.support.IValidationSupport
-
getFhirContext
- Specified by:
getFhirContextin interfaceca.uhn.fhir.context.support.IValidationSupport
-
findCodesAboveUsingBuiltInSystems
public List<FhirVersionIndependentConcept> findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) - Specified by:
findCodesAboveUsingBuiltInSystemsin interfaceITermReadSvc
-
findCodesBelowUsingBuiltInSystems
public List<FhirVersionIndependentConcept> findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) - Specified by:
findCodesBelowUsingBuiltInSystemsin 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:
findCurrentTermValueSetin interfaceITermReadSvc
-
readCodeSystemByForcedId
public Optional<org.hl7.fhir.instance.model.api.IBaseResource> readCodeSystemByForcedId(String theForcedId) Description copied from interface:ITermReadSvcVersion independent- Specified by:
readCodeSystemByForcedIdin interfaceITermReadSvc
-
reindexTerminology
Description copied from interface:ITermReadSvcVersion independent Recreates freetext indexes for TermConcept and nested TermConceptProperty- Specified by:
reindexTerminologyin interfaceITermReadSvc- Throws:
InterruptedException
-
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:
expandValueSetin interfaceca.uhn.fhir.context.support.IValidationSupport
-
expandValueSet
public org.hl7.fhir.instance.model.api.IBaseResource expandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.instance.model.api.IBaseResource theInput) Description copied from interface:ITermReadSvcVersion independent- Specified by:
expandValueSetin interfaceITermReadSvc
-
expandValueSet
public void expandValueSet(ca.uhn.fhir.context.support.ValueSetExpansionOptions theExpansionOptions, org.hl7.fhir.instance.model.api.IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) - Specified by:
expandValueSetin interfaceITermReadSvc
-
validateCodeIsInPreExpandedValueSet
public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeIsInPreExpandedValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, org.hl7.fhir.instance.model.api.IBaseResource theValueSet, String theSystem, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseDatatype theCoding, org.hl7.fhir.instance.model.api.IBaseDatatype theCodeableConcept) Description copied from interface:ITermReadSvcVersion independent- Specified by:
validateCodeIsInPreExpandedValueSetin interfaceITermReadSvc
-
isValueSetPreExpandedForCodeValidation
public boolean isValueSetPreExpandedForCodeValidation(org.hl7.fhir.instance.model.api.IBaseResource theValueSet) Description copied from interface:ITermReadSvcVersion independent- Specified by:
isValueSetPreExpandedForCodeValidationin interfaceITermReadSvc
-
setForceDisableHibernateSearchForUnitTest
public static void setForceDisableHibernateSearchForUnitTest(boolean theForceDisableHibernateSearchForUnitTest) -
setInvokeOnNextCallForUnitTest
-