public abstract class BaseWorkerContext extends Object 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 String |
tsServer |
protected TerminologyCache |
txCache |
protected FHIRToolingClient |
txServer |
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 |
|---|---|
void |
addNonSupportedCodeSystems(String s) |
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(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() |
IWorkerContext.ILoggingService |
getLogger() |
String |
getName() |
String |
getOverrideVersionNs() |
Set<String> |
getResourceNamesAsSet() |
SearchParameter |
getSearchParameter(String code) |
StructureDefinition |
getStructure(String code) |
StructureMap |
getTransform(String code) |
<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() |
List<ConceptMap> |
listMaps() |
String |
listNonSupportedSystems() |
List<StructureDefinition> |
listStructures() |
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 |
setTranslator(org.hl7.fhir.utilities.TranslationServices translator) |
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(CodeableConcept code,
ValueSet vs) |
IWorkerContext.ValidationResult |
validateCode(Coding code,
ValueSet vs) |
IWorkerContext.ValidationResult |
validateCode(String system,
String code,
String display)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(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(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(String code,
ValueSet vs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallStructures, getAbbreviation, getNarrativeGenerator, getParser, getParser, getResourceNames, getTypeNames, getUcumService, getVersion, hasCache, newJsonParser, newValidator, newXmlParser, typeTailsprotected Map<String,Map<String,IWorkerContext.ValidationResult>> validationCache
protected FHIRToolingClient txServer
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(String system, String code, String display)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String system, String code, String display, ValueSet vs)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String code, ValueSet vs)
validateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String system, String code, String display, ValueSet.ConceptSetComponent vsi)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(Coding code, ValueSet vs)
validateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult doValidateCode(Coding code, ValueSet vs, boolean implySystem)
public IWorkerContext.ValidationResult validateCode(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 void addNonSupportedCodeSystems(String s)
public String listNonSupportedSystems()
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 IWorkerContextCopyright © 2014–2018 University Health Network. All rights reserved.