public final class HapiWorkerContext extends Object implements IWorkerContext, ValueSetExpander, ValueSetExpanderFactory
IWorkerContext.ILoggingService, IWorkerContext.ValidationResultValueSetExpander.ETooCostly, ValueSetExpander.TerminologyServiceErrorClass, ValueSetExpander.ValueSetExpansionOutcome| Constructor and Description |
|---|
HapiWorkerContext(FhirContext theCtx,
IValidationSupport theValidationSupport) |
| Modifier and Type | Method and Description |
|---|---|
List<MetadataResource> |
allConformanceResources() |
List<StructureDefinition> |
allStructures() |
ValueSetExpander.ValueSetExpansionOutcome |
expand(ValueSet theSource,
ExpansionProfile theProfile) |
ValueSet.ValueSetExpansionComponent |
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.
|
<T extends Resource> |
fetchResourceWithException(Class<T> theClass_,
String theUri) |
List<ConceptMap> |
findMapsForSource(String theUrl)
find concept maps for a source
|
String |
getAbbreviation(String theName)
returns the recommended tla for the type
|
ValueSetExpander |
getExpander() |
ExpansionProfile |
getExpansionProfile() |
INarrativeGenerator |
getNarrativeGenerator(String thePrefix,
String theBasePath)
Get a generator that can generate narrative for the instance
|
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() |
List<String> |
getTypeNames() |
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() |
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(ExpansionProfile theExpProfile) |
void |
setLogger(IWorkerContext.ILoggingService theLogger) |
boolean |
supportsSystem(String theSystem)
True if the underlying terminology service provider will do
expansion and code validation for the terminology.
|
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.
|
public HapiWorkerContext(FhirContext theCtx, IValidationSupport theValidationSupport)
public List<StructureDefinition> allStructures()
allStructures in interface IWorkerContextpublic CodeSystem fetchCodeSystem(String theSystem)
IWorkerContextfetchCodeSystem in interface IWorkerContextpublic <T extends Resource> T fetchResource(Class<T> theClass, String theUri)
IWorkerContextfetchResource 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 <T extends Resource> boolean hasResource(Class<T> theClass_, String theUri)
IWorkerContexthasResource 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 List<MetadataResource> allConformanceResources()
allConformanceResources in interface IWorkerContextpublic boolean hasCache()
hasCache in interface IWorkerContextpublic ValueSetExpander.ValueSetExpansionOutcome expand(ValueSet theSource, ExpansionProfile theProfile)
expand in interface ValueSetExpandertheSource - the value set definition to expandtheProfile - a profile affecting the outcome. If you don't supply a profile, the default internal expansion profile will be used.public ExpansionProfile getExpansionProfile()
getExpansionProfile in interface IWorkerContextpublic void setExpansionProfile(ExpansionProfile theExpProfile)
setExpansionProfile in interface IWorkerContextpublic ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHeiarchical)
IWorkerContextexpandVS in interface IWorkerContextpublic ValueSet.ValueSetExpansionComponent expandVS(ValueSet.ConceptSetComponent theInc, boolean theHeiarchical) throws TerminologyServiceException
IWorkerContextexpandVS in interface IWorkerContextTerminologyServiceExceptionpublic void setLogger(IWorkerContext.ILoggingService theLogger)
setLogger in interface IWorkerContextpublic String getVersion()
IWorkerContextgetVersion in interface IWorkerContextpublic boolean isNoTerminologyServer()
isNoTerminologyServer in interface IWorkerContextpublic <T extends Resource> T fetchResourceWithException(Class<T> theClass_, String theUri) throws FHIRException
fetchResourceWithException in interface IWorkerContextFHIRExceptionpublic List<String> getTypeNames()
getTypeNames in interface IWorkerContextCopyright © 2014–2017 University Health Network. All rights reserved.