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
Modifier and TypeFieldDescriptionprotected boolean
protected String
protected boolean
protected Map
<String, CodeSystem> protected Map
<String, DataElement> protected ValueSetExpanderFactory
protected ExpansionProfile
protected Map
<String, StructureDefinition> protected IWorkerContext.ILoggingService
protected Map
<String, ConceptMap> protected String
protected boolean
protected Map
<String, OperationDefinition> protected Map
<String, StructureDefinition> protected Map
<String, Questionnaire> protected Map
<String, SearchParameter> protected Map
<String, StructureMap> protected String
protected FHIRToolingClient
protected Map
<String, Map<String, IWorkerContext.ValidationResult>> protected String
Fields inherited from class org.hl7.fhir.utilities.i18n.I18nBase
KEY_DELIMITER, PLURAL_SUFFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
dropCodeSystem
(String id) void
void
dropProfile
(String id) void
dropResource
(String type, String id) void
dropValueSet
(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 sourceint
getMaps()
getName()
void
boolean
boolean
boolean
protected void
void
reportStatus
(com.google.gson.JsonObject json) void
seeCodeSystem
(String url, CodeSystem cs) void
void
void
seeProfile
(String url, StructureDefinition p) void
seeQuestionnaire
(String url, Questionnaire theQuestionnaire) void
seeValueSet
(String url, ValueSet vs) void
setAllowLoadingDuplicates
(boolean allowLoadingDuplicates) void
setCanRunWithoutTerminology
(boolean canRunWithoutTerminology) void
setExpandCodesLimit
(int expandCodesLimit) void
setExpansionProfile
(ExpansionProfile expProfile) void
void
boolean
supportsSystem
(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, formatMessagePlural, getLocale, getMessagesSourceFileName, getPluralKey, getPluralKeys, getPluralSuffixes, getRootKeyFromPlural, isWarnAboutMissingMessages, messageKeyExistsForLocale, setLocale, setPluralRules, setValidationMessageLanguage, setWarnAboutMissingMessages, typeOfString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:IWorkerContext
Find the code system definition for the nominated system uri. return null if there isn't one (then the tool might try supportsSystem)- Specified by:
fetchCodeSystem
in interfaceIWorkerContext
- Parameters:
system
-- Returns:
-
supportsSystem
public boolean supportsSystem(String system) throws org.hl7.fhir.exceptions.TerminologyServiceException Description copied from interface:IWorkerContext
True 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:
supportsSystem
in interfaceIWorkerContext
- Parameters:
system
-- Returns:
- Throws:
org.hl7.fhir.exceptions.TerminologyServiceException
-
expandVS
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet vs, boolean cacheOk, boolean heirarchical) Description copied from interface:IWorkerContext
ValueSet Expansion - see $expand- Specified by:
expandVS
in interfaceIWorkerContext
- Parameters:
vs
-- 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.TerminologyServiceException Description copied from interface:IWorkerContext
Value set expanion inside the internal expansion engine - used for references to supported system (see "supportsSystem") for which there is no value set.- Specified by:
expandVS
in interfaceIWorkerContext
- Parameters:
inc
-- Returns:
- Throws:
org.hl7.fhir.exceptions.TerminologyServiceException
-
validateCode
Description copied from interface:IWorkerContext
Validation 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:
validateCode
in interfaceIWorkerContext
- Parameters:
system
-code
-display
-- Returns:
-
validateCode
- Specified by:
validateCode
in interfaceIWorkerContext
-
validateCode
- Specified by:
validateCode
in interfaceIWorkerContext
-
validateCode
public IWorkerContext.ValidationResult validateCode(String system, String code, String display, ValueSet vs) Description copied from interface:IWorkerContext
Validation 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:
validateCode
in interfaceIWorkerContext
- Parameters:
system
-code
-display
-- Returns:
-
validateCode
public IWorkerContext.ValidationResult validateCode(String system, String code, String display, ValueSet.ConceptSetComponent vsi) Description copied from interface:IWorkerContext
Validation 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:
validateCode
in interfaceIWorkerContext
- Parameters:
system
-code
-display
-- Returns:
-
initTS
- Throws:
Exception
-
loadValidationCache
- Throws:
com.google.gson.JsonSyntaxException
Exception
-
findMapsForSource
Description copied from interface:IWorkerContext
find concept maps for a source- Specified by:
findMapsForSource
in interfaceIWorkerContext
- Parameters:
url
-- Returns:
-
getNonSupportedCodeSystems
-
isCanRunWithoutTerminology
-
setCanRunWithoutTerminology
-
getExpandCodesLimit
-
setExpandCodesLimit
-
setLogger
- Specified by:
setLogger
in interfaceIWorkerContext
-
getExpansionProfile
- Specified by:
getExpansionProfile
in interfaceIWorkerContext
-
setExpansionProfile
- Specified by:
setExpansionProfile
in interfaceIWorkerContext
-
isNoTerminologyServer
- Specified by:
isNoTerminologyServer
in interfaceIWorkerContext
-
getName
-
setName
-
getResourceNamesAsSet
- Specified by:
getResourceNamesAsSet
in interfaceIWorkerContext
-
reportStatus
-
cacheResource
- Throws:
Exception
-
dropResource
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isAllowLoadingDuplicates
-
setAllowLoadingDuplicates
-
fetchTypeDefinition
- Specified by:
fetchTypeDefinition
in interfaceIWorkerContext
-