public final class HapiWorkerContext extends Object implements IWorkerContext, ValueSetExpander, ValueSetExpanderFactory
IWorkerContext.ILoggingService, IWorkerContext.ValidationResultValueSetExpander.ETooCostly, ValueSetExpander.TerminologyServiceErrorClass, ValueSetExpander.ValueSetExpansionOutcome| Constructor and Description |
|---|
HapiWorkerContext(ca.uhn.fhir.context.FhirContext theCtx,
IValidationSupport theValidationSupport) |
| Modifier and Type | Method and Description |
|---|---|
List<MetadataResource> |
allConformanceResources() |
List<StructureDefinition> |
allStructures() |
void |
cacheResource(Resource theRes)
cache a resource for later retrieval using fetchResource.
|
ValueSetExpander.ValueSetExpansionOutcome |
expand(ValueSet theSource,
Parameters theProfile) |
ValueSetExpander.ValueSetExpansionOutcome |
expandVS(ElementDefinition.ElementDefinitionBindingComponent theBinding,
boolean theCacheOk,
boolean theHeiarchical)
ValueSet Expansion - see $expand, but resolves the binding first
|
ValueSetExpander.ValueSetExpansionOutcome |
expandVS(ValueSet.ConceptSetComponent theInc,
boolean theHeiarchical)
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 theSource,
boolean theCacheOk,
boolean theHeiarchical)
ValueSet Expansion - see $expand
|
CodeSystem |
fetchCodeSystem(String theSystem)
Find the code system definition for the nominated system uri.
|
<T extends Resource> |
fetchResource(Class<T> theClass,
String theUri)
Find an identified resource.
|
Resource |
fetchResourceById(String theType,
String theUri)
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> theClass,
String theUri) |
StructureDefinition |
fetchTypeDefinition(String typeName) |
List<ConceptMap> |
findMapsForSource(String theUrl)
find concept maps for a source
|
String |
getAbbreviation(String theName)
returns the recommended tla for the type
|
ValueSetExpander |
getExpander() |
Parameters |
getExpansionParameters() |
IWorkerContext.ILoggingService |
getLogger() |
INarrativeGenerator |
getNarrativeGenerator(String thePrefix,
String theBasePath)
Get a generator that can generate narrative for the instance
|
String |
getOverrideVersionNs() |
IParser |
getParser(ParserType theType)
Get a parser to read/write instances.
|
IParser |
getParser(String theType)
Get a parser to read/write instances.
|
List<String> |
getResourceNames() |
Set<String> |
getResourceNamesAsSet() |
StructureMap |
getTransform(String url) |
List<String> |
getTypeNames() |
org.fhir.ucum.UcumService |
getUcumService() |
String |
getVersion()
Get the versions of the definitions loaded in context
|
boolean |
hasCache() |
<T extends Resource> |
hasResource(Class<T> theClass_,
String theUri)
find whether a resource is available.
|
boolean |
isNoTerminologyServer() |
List<StructureMap> |
listTransforms() |
IParser |
newJsonParser()
Get a JSON parser
|
IResourceValidator |
newValidator()
Get a validator that can check whether a resource is valid
|
IParser |
newXmlParser()
Get an XML parser
|
String |
oid2Uri(String theCode) |
void |
setExpansionProfile(Parameters theExpParameters) |
void |
setLogger(IWorkerContext.ILoggingService theLogger) |
void |
setOverrideVersionNs(String value) |
boolean |
supportsSystem(String theSystem)
True if the underlying terminology service provider will do
expansion and code validation for the terminology.
|
org.hl7.fhir.utilities.TranslationServices |
translator() |
Set<String> |
typeTails() |
IWorkerContext.ValidationResult |
validateCode(CodeableConcept theCode,
ValueSet theVs) |
IWorkerContext.ValidationResult |
validateCode(Coding theCode,
ValueSet theVs) |
IWorkerContext.ValidationResult |
validateCode(String theSystem,
String theCode,
String theDisplay)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(String theSystem,
String theCode,
String theDisplay,
ValueSet.ConceptSetComponent theVsi)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(String theSystem,
String theCode,
String theDisplay,
ValueSet theVs)
Validation of a code - consult the terminology service
to see whether it is known.
|
IWorkerContext.ValidationResult |
validateCode(String code,
ValueSet vs) |
public HapiWorkerContext(ca.uhn.fhir.context.FhirContext theCtx, IValidationSupport theValidationSupport)
public List<StructureDefinition> allStructures()
allStructures in interface IWorkerContextpublic CodeSystem fetchCodeSystem(String theSystem)
IWorkerContextfetchCodeSystem in interface IWorkerContextpublic List<ConceptMap> findMapsForSource(String theUrl)
IWorkerContextfindMapsForSource in interface IWorkerContextpublic String getAbbreviation(String theName)
IWorkerContextgetAbbreviation in interface IWorkerContextpublic ValueSetExpander getExpander()
getExpander in interface ValueSetExpanderFactorypublic INarrativeGenerator getNarrativeGenerator(String thePrefix, String theBasePath)
IWorkerContextgetNarrativeGenerator in interface IWorkerContextpublic IParser getParser(ParserType theType)
IWorkerContextgetParser in interface IWorkerContextpublic IParser getParser(String theType)
IWorkerContextgetParser in interface IWorkerContextpublic List<String> getResourceNames()
getResourceNames in interface IWorkerContextpublic IParser newJsonParser()
IWorkerContextnewJsonParser in interface IWorkerContextpublic IResourceValidator newValidator()
IWorkerContextnewValidator in interface IWorkerContextpublic IParser newXmlParser()
IWorkerContextnewXmlParser in interface IWorkerContextpublic String oid2Uri(String theCode)
oid2Uri in interface IWorkerContextpublic boolean supportsSystem(String theSystem)
IWorkerContextsupportsSystem in interface IWorkerContextpublic Set<String> typeTails()
typeTails in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(CodeableConcept theCode, ValueSet theVs)
validateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(Coding theCode, ValueSet theVs)
validateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String theSystem, String theCode, String theDisplay)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ValueSet.ConceptSetComponent theVsi)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ValueSet theVs)
IWorkerContextvalidateCode in interface IWorkerContextpublic IWorkerContext.ValidationResult validateCode(String code, ValueSet vs)
validateCode in interface IWorkerContextpublic List<MetadataResource> allConformanceResources()
allConformanceResources in interface IWorkerContextpublic Parameters getExpansionParameters()
getExpansionParameters in interface IWorkerContextpublic void setExpansionProfile(Parameters theExpParameters)
setExpansionProfile in interface IWorkerContextpublic boolean hasCache()
hasCache in interface IWorkerContextpublic ValueSetExpander.ValueSetExpansionOutcome expand(ValueSet theSource, Parameters theProfile)
expand in interface ValueSetExpandertheSource - the value set definition to expandpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHeiarchical)
IWorkerContextexpandVS in interface IWorkerContextpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet.ConceptSetComponent theInc, boolean theHeiarchical) throws org.hl7.fhir.exceptions.TerminologyServiceException
IWorkerContextexpandVS in interface IWorkerContextorg.hl7.fhir.exceptions.TerminologyServiceExceptionpublic void setLogger(IWorkerContext.ILoggingService theLogger)
setLogger in interface IWorkerContextpublic IWorkerContext.ILoggingService getLogger()
getLogger in interface IWorkerContextpublic String getVersion()
IWorkerContextgetVersion in interface IWorkerContextpublic org.fhir.ucum.UcumService getUcumService()
getUcumService in interface IWorkerContextpublic boolean isNoTerminologyServer()
isNoTerminologyServer in interface IWorkerContextpublic org.hl7.fhir.utilities.TranslationServices translator()
translator in interface IWorkerContextpublic List<StructureMap> listTransforms()
listTransforms in interface IWorkerContextpublic StructureMap getTransform(String url)
getTransform in interface IWorkerContextpublic String getOverrideVersionNs()
getOverrideVersionNs in interface IWorkerContextpublic void setOverrideVersionNs(String value)
setOverrideVersionNs in interface IWorkerContextpublic StructureDefinition fetchTypeDefinition(String typeName)
fetchTypeDefinition in interface IWorkerContextpublic List<String> getTypeNames()
getTypeNames in interface IWorkerContextpublic <T extends Resource> T fetchResource(Class<T> theClass, String theUri)
IWorkerContextfetchResource in interface IWorkerContextpublic <T extends Resource> T fetchResourceWithException(Class<T> theClass, String theUri) throws org.hl7.fhir.exceptions.FHIRException
fetchResourceWithException in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionpublic Resource fetchResourceById(String theType, String theUri)
IWorkerContextfetchResourceById in interface IWorkerContextpublic <T extends Resource> boolean hasResource(Class<T> theClass_, String theUri)
IWorkerContexthasResource in interface IWorkerContextpublic void cacheResource(Resource theRes) throws org.hl7.fhir.exceptions.FHIRException
IWorkerContextcacheResource in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionpublic Set<String> getResourceNamesAsSet()
getResourceNamesAsSet in interface IWorkerContextpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ElementDefinition.ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHeiarchical) throws org.hl7.fhir.exceptions.FHIRException
IWorkerContextexpandVS in interface IWorkerContextorg.hl7.fhir.exceptions.FHIRExceptionCopyright © 2014–2018 University Health Network. All rights reserved.