Package org.hl7.fhir.dstu2.utils
Class BaseWorkerContext
java.lang.Object
org.hl7.fhir.utilities.i18n.I18nBase
org.hl7.fhir.dstu2.utils.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.dstu2.utils.IWorkerContext
IWorkerContext.ValidationResult
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected ValueSetExpanderFactory
protected Map
<String, ConceptMap> protected FHIRToolingClient
protected Map
<String, Map<String, IWorkerContext.ValidationResult>> Fields inherited from class org.hl7.fhir.utilities.i18n.I18nBase
KEY_DELIMITER, PLURAL_SUFFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionValue 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 a value set for the nominated system uri.fetchTypeDefinition
(String typeName) findMapsForSource
(String url) find concept maps for a sourceboolean
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.dstu2.utils.IWorkerContext
allStructures, fetchResource, formatMessage, getAbbreviation, getLocale, getNarrativeGenerator, getParser, getParser, getResourceNames, hasResource, newJsonParser, newValidator, newXmlParser, setLocale, setValidationMessageLanguage
-
Field Details
-
codeSystems
-
valueSets
-
maps
-
expansionCache
-
cacheValidation
-
validationCache
-
txServer
-
-
Constructor Details
-
BaseWorkerContext
public BaseWorkerContext()
-
-
Method Details
-
fetchCodeSystem
Description copied from interface:IWorkerContext
Find a value set 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
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/conformance-supported-system in the Conformance resource- Specified by:
supportsSystem
in interfaceIWorkerContext
- Parameters:
system
-- Returns:
-
expandVS
Description copied from interface:IWorkerContext
ValueSet Expansion - see $expand- Specified by:
expandVS
in interfaceIWorkerContext
- Parameters:
vs
-- Returns:
-
expandVS
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:
-
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:
-
findMapsForSource
Description copied from interface:IWorkerContext
find concept maps for a source- Specified by:
findMapsForSource
in interfaceIWorkerContext
- Parameters:
url
-- Returns:
-
fetchTypeDefinition
- Specified by:
fetchTypeDefinition
in interfaceIWorkerContext
-