public abstract class BaseWorkerContext extends org.hl7.fhir.utilities.i18n.I18nBase implements IWorkerContext
| Modifier and Type | Class and Description |
|---|---|
class |
BaseWorkerContext.NullTranslator |
IWorkerContext.ILoggingService, IWorkerContext.ValidationResult| Modifier and Type | Field and Description |
|---|---|
protected Parameters |
expParameters |
protected IWorkerContext.ILoggingService |
logger |
protected String |
name |
protected boolean |
noTerminologyServer |
protected Map<String,StructureMap> |
transforms |
protected String |
tsServer |
protected TerminologyCache |
txCache |
protected TerminologyClient |
txClient |
protected HTMLClientLogger |
txLog |
protected Map<String,Map<String,IWorkerContext.ValidationResult>> |
validationCache |
| Constructor and Description |
|---|
BaseWorkerContext() |
BaseWorkerContext(Map<String,CodeSystem> codeSystems,
Map<String,ValueSet> valueSets,
Map<String,ConceptMap> maps,
Map<String,StructureDefinition> profiles,
Map<String,ImplementationGuide> guides) |
| Modifier and Type | Method and Description |
|---|---|
List<MetadataResource> |
allConformanceResources() |
void |
cacheResource(Resource r)
cache a resource for later retrieval using fetchResource.
|
void |
cacheVS(com.google.gson.JsonObject json,
Map<String,IWorkerContext.ValidationResult> t) |
protected void |
copy(BaseWorkerContext other) |
IWorkerContext.ValidationResult |
doValidateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
Coding code,
ValueSet vs,
boolean implySystem) |
void |
dropResource(Resource r) |
void |
dropResource(String fhirType,
String id) |
ValueSetExpander.ValueSetExpansionOutcome |
expandVS(ElementDefinition.ElementDefinitionBindingComponent binding,
boolean cacheOk,
boolean heirarchical)
ValueSet Expansion - see $expand, but resolves the binding first
|
ValueSetExpander.ValueSetExpansionOutcome |
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.
|
ValueSetExpander.ValueSetExpansionOutcome |
expandVS(ValueSet vs,
boolean cacheOk,
boolean heirarchical)
ValueSet Expansion - see $expand
|
ValueSetExpander.ValueSetExpansionOutcome |
expandVS(ValueSet vs,
boolean cacheOk,
boolean heirarchical,
Parameters p) |
CodeSystem |
fetchCodeSystem(String system)
Find the code system definition for the nominated system uri.
|
<T extends Resource> |
fetchResource(Class<T> class_,
String uri)
Find an identified resource.
|
Resource |
fetchResourceById(String type,
String uri)
Variation of fetchResource when you have a string type, and don't need the right class
The URI can have one of 3 formats:
- a full URL e.g.
|
<T extends Resource> |
fetchResourceWithException(Class<T> class_,
String uri) |
StructureDefinition |
fetchTypeDefinition(String typeName) |
List<ConceptMap> |
findMapsForSource(String url)
find concept maps for a source
|
int |
getExpandCodesLimit() |
Parameters |
getExpansionParameters() |
String |
getLinkForUrl(String corePath,
String url) |
IWorkerContext.ILoggingService |
getLogger() |
String |
getName() |
String |
getOverrideVersionNs() |
Set<String> |
getResourceNamesAsSet() |
SearchParameter |
getSearchParameter(String code) |
StructureDefinition |
getStructure(String code) |
List<StructureDefinition> |
getStructures() |
StructureMap |
getTransform(String code) |
org.fhir.ucum.UcumService |
getUcumService() |
<T extends Resource> |
hasResource(Class<T> class_,
String uri)
find whether a resource is available.
|
void |
initTS(String cachePath) |
boolean |
isAllowLoadingDuplicates() |
boolean |
isCanRunWithoutTerminology() |
boolean |
isNoTerminologyServer() |
boolean |
isTlogging() |
List<ConceptMap> |
listMaps() |
List<StructureDefinition> |
listStructures() |
String |
listSupportedSystems() |
List<StructureMap> |
listTransforms() |
String |
oid2Uri(String oid) |
void |
reportStatus(com.google.gson.JsonObject json) |
protected <T extends MetadataResource> |
seeMetadataResource(T r,
Map<String,T> map,
boolean addId) |
void |
setAllowLoadingDuplicates(boolean allowLoadingDuplicates) |
void |
setCanRunWithoutTerminology(boolean canRunWithoutTerminology) |
void |
setExpandCodesLimit(int expandCodesLimit) |
void |
setExpansionProfile(Parameters expParameters) |
void |
setLogger(IWorkerContext.ILoggingService logger) |
void |
setName(String name) |
void |
setOverrideVersionNs(String value) |
void |
setTlogging(boolean tlogging) |
void |
setTranslator(org.hl7.fhir.utilities.TranslationServices translator) |
void |
setUcumService(org.fhir.ucum.UcumService ucumService) |
boolean |
supportsSystem(String system)
True if the underlying terminology service provider will do
expansion and code validation for the terminology.
|
protected void |
tlog(String msg) |
int |
totalCount() |
org.hl7.fhir.utilities.TranslationServices |
translator() |
IWorkerContext.ValidationResult |
validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
CodeableConcept code,
ValueSet vs) |
IWorkerContext.ValidationResult |
validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
Coding code,
ValueSet vs) |
IWorkerContext.ValidationResult |
validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
String system,
String code,
String display)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
String system,
String code,
String display,
ValueSet.ConceptSetComponent vsi)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
String system,
String code,
String display,
ValueSet vs)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options,
String code,
ValueSet vs) |
formatMessage, getLocale, isWarnAboutMissingMessages, setLocale, setValidationMessageLanguage, setWarnAboutMissingMessagesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallStructures, formatMessage, generateSnapshot, getAbbreviation, getLocale, getNarrativeGenerator, getParser, getParser, getResourceNames, getTypeNames, getVersion, hasCache, newJsonParser, newValidator, newXmlParser, setLocale, setValidationMessageLanguage, typeTailsprotected Map<String,StructureMap> transforms
protected Map<String,Map<String,IWorkerContext.ValidationResult>> validationCache
protected TerminologyClient txClient
protected HTMLClientLogger txLog
protected boolean noTerminologyServer
protected IWorkerContext.ILoggingService logger
protected Parameters expParameters
protected TerminologyCache txCache
public BaseWorkerContext() throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRExceptionpublic BaseWorkerContext(Map<String,CodeSystem> codeSystems, Map<String,ValueSet> valueSets, Map<String,ConceptMap> maps, Map<String,StructureDefinition> profiles, Map<String,ImplementationGuide> guides) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRExceptionprotected void copy(BaseWorkerContext other)
public void cacheResource(Resource r) throws org.hl7.fhir.exceptions.FHIRException
IWorkerContextcacheResource in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionprotected <T extends MetadataResource> void seeMetadataResource(T r, Map<String,T> map, boolean addId) throws org.hl7.fhir.exceptions.FHIRException
org.hl7.fhir.exceptions.FHIRExceptionpublic CodeSystem fetchCodeSystem(String system)
IWorkerContextfetchCodeSystem in interface IWorkerContextpublic boolean supportsSystem(String system) throws org.hl7.fhir.exceptions.TerminologyServiceException
IWorkerContextsupportsSystem in interface IWorkerContextorg.hl7.fhir.exceptions.TerminologyServiceExceptionpublic int getExpandCodesLimit()
public void setExpandCodesLimit(int expandCodesLimit)
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean heirarchical) throws org.hl7.fhir.exceptions.FHIRException
IWorkerContextexpandVS in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet.ConceptSetComponent inc, boolean heirachical) throws org.hl7.fhir.exceptions.TerminologyServiceException
IWorkerContextexpandVS in interface IWorkerContextorg.hl7.fhir.exceptions.TerminologyServiceExceptionpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet vs, boolean cacheOk, boolean heirarchical)
IWorkerContextexpandVS in interface IWorkerContextpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet vs, boolean cacheOk, boolean heirarchical, Parameters p)
public IWorkerContext.ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, String system, String code, String display)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, String system, String code, String display, ValueSet vs)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, String code, ValueSet vs)
validateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, String system, String code, String display, ValueSet.ConceptSetComponent vsi)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, ValueSet vs)
validateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult doValidateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, ValueSet vs, boolean implySystem)
public IWorkerContext.ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, CodeableConcept code, ValueSet vs)
validateCode in interface IWorkerContextpublic List<ConceptMap> findMapsForSource(String url) throws org.hl7.fhir.exceptions.FHIRException
IWorkerContextfindMapsForSource in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionpublic boolean isCanRunWithoutTerminology()
public void setCanRunWithoutTerminology(boolean canRunWithoutTerminology)
public void setLogger(IWorkerContext.ILoggingService logger)
setLogger in interface IWorkerContextpublic Parameters getExpansionParameters()
getExpansionParameters in interface IWorkerContextpublic void setExpansionProfile(Parameters expParameters)
setExpansionProfile in interface IWorkerContextpublic boolean isNoTerminologyServer()
isNoTerminologyServer in interface IWorkerContextpublic Set<String> getResourceNamesAsSet()
getResourceNamesAsSet in interface IWorkerContextpublic boolean isAllowLoadingDuplicates()
public void setAllowLoadingDuplicates(boolean allowLoadingDuplicates)
public <T extends Resource> T fetchResourceWithException(Class<T> class_, String uri) throws org.hl7.fhir.exceptions.FHIRException
fetchResourceWithException in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionpublic Resource fetchResourceById(String type, String uri)
IWorkerContextfetchResourceById in interface IWorkerContextpublic <T extends Resource> T fetchResource(Class<T> class_, String uri)
IWorkerContextfetchResource in interface IWorkerContextpublic <T extends Resource> boolean hasResource(Class<T> class_, String uri)
IWorkerContexthasResource in interface IWorkerContextpublic org.hl7.fhir.utilities.TranslationServices translator()
translator in interface IWorkerContextpublic void setTranslator(org.hl7.fhir.utilities.TranslationServices translator)
public void reportStatus(com.google.gson.JsonObject json)
public void dropResource(Resource r) throws org.hl7.fhir.exceptions.FHIRException
org.hl7.fhir.exceptions.FHIRExceptionpublic void dropResource(String fhirType, String id)
public List<MetadataResource> allConformanceResources()
allConformanceResources in interface IWorkerContextpublic String listSupportedSystems()
public int totalCount()
public List<ConceptMap> listMaps()
public List<StructureMap> listTransforms()
listTransforms in interface IWorkerContextpublic StructureMap getTransform(String code)
getTransform in interface IWorkerContextpublic List<StructureDefinition> listStructures()
public StructureDefinition getStructure(String code)
public String oid2Uri(String oid)
oid2Uri in interface IWorkerContextpublic void cacheVS(com.google.gson.JsonObject json, Map<String,IWorkerContext.ValidationResult> t)
public SearchParameter getSearchParameter(String code)
public String getOverrideVersionNs()
getOverrideVersionNs in interface IWorkerContextpublic void setOverrideVersionNs(String value)
setOverrideVersionNs in interface IWorkerContextpublic IWorkerContext.ILoggingService getLogger()
getLogger in interface IWorkerContextpublic StructureDefinition fetchTypeDefinition(String typeName)
fetchTypeDefinition in interface IWorkerContextpublic boolean isTlogging()
public void setTlogging(boolean tlogging)
public org.fhir.ucum.UcumService getUcumService()
getUcumService in interface IWorkerContextpublic void setUcumService(org.fhir.ucum.UcumService ucumService)
setUcumService in interface IWorkerContextpublic List<StructureDefinition> getStructures()
getStructures in interface IWorkerContextpublic String getLinkForUrl(String corePath, String url)
getLinkForUrl in interface IWorkerContextCopyright © 2014–2021 Health Level 7. All rights reserved.