Package org.hl7.fhir.dstu3.context
Class BaseWorkerContext
java.lang.Object
org.hl7.fhir.utilities.i18n.I18nBase
org.hl7.fhir.dstu3.context.BaseWorkerContext
- All Implemented Interfaces:
IWorkerContext
- Direct Known Subclasses:
SimpleWorkerContext
public abstract class BaseWorkerContext
extends org.hl7.fhir.utilities.i18n.I18nBase
implements IWorkerContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hl7.fhir.dstu3.context.IWorkerContext
IWorkerContext.ILoggingService, IWorkerContext.ValidationResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected booleanprotected Map<String,CodeSystem>protected Map<String,DataElement>protected ValueSetExpanderFactoryprotected ExpansionProfileprotected Map<String,StructureDefinition>protected IWorkerContext.ILoggingServiceprotected Map<String,ConceptMap>protected Stringprotected booleanprotected Map<String,OperationDefinition>protected Map<String,StructureDefinition>protected Map<String,Questionnaire>protected Map<String,SearchParameter>protected Map<String,StructureMap>protected Stringprotected FHIRToolingClientprotected Map<String,Map<String,IWorkerContext.ValidationResult>>protected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddropCodeSystem(String id)voidvoiddropProfile(String id)voiddropResource(String type, String id)voiddropValueSet(String id)expandOnServer(ValueSet vs, String fn)expandVS(ValueSet.ConceptSetComponent inc, boolean heirachical)Value set expanion inside the internal expansion engine - used for references to supported system (see "supportsSystem") for which there is no value set.ValueSet Expansion - see $expandfetchCodeSystem(String system)Find the code system definition for the nominated system uri.fetchTypeDefinition(String typeName)findMapsForSource(String url)find concept maps for a sourceintgetMaps()getName()voidbooleanbooleanbooleanprotected voidvoidreportStatus(com.google.gson.JsonObject json)voidseeCodeSystem(String url, CodeSystem cs)voidseeExtensionDefinition(String url, StructureDefinition ed)voidvoidseeProfile(String url, StructureDefinition p)voidseeQuestionnaire(String url, Questionnaire theQuestionnaire)voidseeValueSet(String url, ValueSet vs)voidsetAllowLoadingDuplicates(boolean allowLoadingDuplicates)voidsetCanRunWithoutTerminology(boolean canRunWithoutTerminology)voidsetExpandCodesLimit(int expandCodesLimit)voidsetExpansionProfile(ExpansionProfile expProfile)voidsetLogger(IWorkerContext.ILoggingService logger)voidbooleansupportsSystem(String system)True if the underlying terminology service provider will do expansion and code validation for the terminology.validateCode(String system, String code, String display)Validation of a code - consult the terminology service to see whether it is known.validateCode(String system, String code, String display, ValueSet vs)Validation of a code - consult the terminology service to see whether it is known.validateCode(String system, String code, String display, ValueSet.ConceptSetComponent vsi)Validation of a code - consult the terminology service to see whether it is known.validateCode(CodeableConcept code, ValueSet vs)validateCode(Coding code, ValueSet vs)Methods inherited from class org.hl7.fhir.utilities.i18n.I18nBase
formatMessage, getLocale, isWarnAboutMissingMessages, setLocale, setValidationMessageLanguage, setWarnAboutMissingMessagesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hl7.fhir.dstu3.context.IWorkerContext
allConformanceResources, allStructures, fetchResource, fetchResourceWithException, formatMessage, getAbbreviation, getLocale, getNarrativeGenerator, getParser, getParser, getResourceNames, getTypeNames, getVersion, hasCache, hasResource, newJsonParser, newValidator, newXmlParser, oid2Uri, setLocale, setValidationMessageLanguage, typeTails
-
Field Details
-
codeSystems
-
nonSupportedCodeSystems
-
valueSets
-
maps
-
transforms
-
dataElements
-
profiles
-
searchParameters
-
extensionDefinitions
-
questionnaires
-
operations
-
expansionCache
-
cacheValidation
-
validationCache
-
tsServer
-
validationCachePath
-
name
-
txServer
-
allowLoadingDuplicates
-
noTerminologyServer
-
cache
-
logger
-
expProfile
-
-
Constructor Details
-
BaseWorkerContext
public BaseWorkerContext()
-
-
Method Details
-
getCodeSystems
-
getDataElements
-
getValueSets
-
getMaps
-
getProfiles
-
getExtensionDefinitions
-
getQuestionnaires
-
getOperations
-
seeExtensionDefinition
- Throws:
Exception
-
dropExtensionDefinition
-
seeQuestionnaire
- Throws:
Exception
-
seeOperation
- Throws:
Exception
-
seeValueSet
- Throws:
Exception
-
dropValueSet
-
seeCodeSystem
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
dropCodeSystem
-
seeProfile
- Throws:
Exception
-
dropProfile
-
fetchCodeSystem
Description copied from interface:IWorkerContextFind the code system definition for the nominated system uri. return null if there isn't one (then the tool might try supportsSystem)- Specified by:
fetchCodeSystemin interfaceIWorkerContext- Returns:
-
supportsSystem
public boolean supportsSystem(String system) throws org.hl7.fhir.exceptions.TerminologyServiceExceptionDescription copied from interface:IWorkerContextTrue if the underlying terminology service provider will do expansion and code validation for the terminology. Corresponds to the extension http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system in the Conformance resource- Specified by:
supportsSystemin interfaceIWorkerContext- Returns:
- Throws:
org.hl7.fhir.exceptions.TerminologyServiceException
-
expandVS
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet vs, boolean cacheOk, boolean heirarchical)Description copied from interface:IWorkerContextValueSet Expansion - see $expand- Specified by:
expandVSin interfaceIWorkerContext- Returns:
-
expandOnServer
public ValueSetExpander.ValueSetExpansionOutcome expandOnServer(ValueSet vs, String fn) throws Exception- Throws:
Exception
-
expandVS
public ValueSet.ValueSetExpansionComponent expandVS(ValueSet.ConceptSetComponent inc, boolean heirachical) throws org.hl7.fhir.exceptions.TerminologyServiceExceptionDescription copied from interface:IWorkerContextValue set expanion inside the internal expansion engine - used for references to supported system (see "supportsSystem") for which there is no value set.- Specified by:
expandVSin interfaceIWorkerContext- Returns:
- Throws:
org.hl7.fhir.exceptions.TerminologyServiceException
-
validateCode
Description copied from interface:IWorkerContextValidation of a code - consult the terminology service to see whether it is known. If known, return a description of it note: always return a result, with either an error or a code description corresponds to 2 terminology service calls: $validate-code and $lookup- Specified by:
validateCodein interfaceIWorkerContext- Returns:
-
validateCode
- Specified by:
validateCodein interfaceIWorkerContext
-
validateCode
- Specified by:
validateCodein interfaceIWorkerContext
-
validateCode
public IWorkerContext.ValidationResult validateCode(String system, String code, String display, ValueSet vs)Description copied from interface:IWorkerContextValidation of a code - consult the terminology service to see whether it is known. If known, return a description of it Also, check whether it's in the provided value set note: always return a result, with either an error or a code description, or both (e.g. known code, but not in the value set) corresponds to 2 terminology service calls: $validate-code and $lookup- Specified by:
validateCodein interfaceIWorkerContext- Returns:
-
validateCode
public IWorkerContext.ValidationResult validateCode(String system, String code, String display, ValueSet.ConceptSetComponent vsi)Description copied from interface:IWorkerContextValidation of a code - consult the terminology service to see whether it is known. If known, return a description of it Also, check whether it's in the provided value set fragment (for supported systems with no value set definition) note: always return a result, with either an error or a code description, or both (e.g. known code, but not in the value set) corresponds to 2 terminology service calls: $validate-code and $lookup- Specified by:
validateCodein interfaceIWorkerContext- Returns:
-
initTS
- Throws:
Exception
-
loadValidationCache
- Throws:
com.google.gson.JsonSyntaxExceptionException
-
findMapsForSource
Description copied from interface:IWorkerContextfind concept maps for a source- Specified by:
findMapsForSourcein interfaceIWorkerContext- Returns:
-
getNonSupportedCodeSystems
-
isCanRunWithoutTerminology
-
setCanRunWithoutTerminology
-
getExpandCodesLimit
-
setExpandCodesLimit
-
setLogger
- Specified by:
setLoggerin interfaceIWorkerContext
-
getExpansionProfile
- Specified by:
getExpansionProfilein interfaceIWorkerContext
-
setExpansionProfile
- Specified by:
setExpansionProfilein interfaceIWorkerContext
-
isNoTerminologyServer
- Specified by:
isNoTerminologyServerin interfaceIWorkerContext
-
getName
-
setName
-
getResourceNamesAsSet
- Specified by:
getResourceNamesAsSetin interfaceIWorkerContext
-
reportStatus
-
cacheResource
- Throws:
Exception
-
dropResource
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isAllowLoadingDuplicates
-
setAllowLoadingDuplicates
-
fetchTypeDefinition
- Specified by:
fetchTypeDefinitionin interfaceIWorkerContext
-