
Package org.hl7.fhir.r5.hapi.ctx
Class HapiWorkerContext
java.lang.Object
org.hl7.fhir.utilities.i18n.I18nBase
org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext
- All Implemented Interfaces:
- IWorkerContext
public final class HapiWorkerContext
extends org.hl7.fhir.utilities.i18n.I18nBase
implements IWorkerContext
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.hl7.fhir.r5.context.IWorkerContextIWorkerContext.ITerminologyOperationDetails, IWorkerContext.OIDDefinition, IWorkerContext.OIDDefinitionComparer, IWorkerContext.OIDSummary, IWorkerContext.SystemSupportInformation
- 
Field SummaryFields inherited from class org.hl7.fhir.utilities.i18n.I18nBaseKEY_DELIMITER, uncontainedKeys
- 
Constructor SummaryConstructorsConstructorDescriptionHapiWorkerContext(ca.uhn.fhir.context.FhirContext theCtx, ca.uhn.fhir.context.support.IValidationSupport theValidationSupport) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidcachePackage(PackageInformation packageInformation) Inform the cache about package dependencies.voidcacheResource(Resource theRes) cache a resource for later retrieval using fetchResource.voidcacheResourceFromPackage(Resource res, PackageInformation packageDetails) cache a resource for later retrieval using fetchResource.org.hl7.fhir.utilities.TimeTrackerclock()static ca.uhn.fhir.context.support.ConceptValidationOptionsconvertConceptValidationOptions(org.hl7.fhir.utilities.validation.ValidationOptions theOptions) expandVS(IWorkerContext.ITerminologyOperationDetails iTerminologyOperationDetails, ValueSet.ConceptSetComponent conceptSetComponent, boolean b, boolean b1) Value set expanion inside the internal expansion engine - used for references to supported system (see "supportsSystem") for which there is no value set.expandVS(Resource src, ElementDefinition.ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) ValueSet Expansion - see $expand, but resolves the binding firstValueSet Expansion - see $expandValueSet Expansion - see $expandfetchCodeSystem(String theSystem) Find the code system definition for the nominated system uri.fetchCodeSystem(String theSystem, String version) fetchCodeSystem(String system, String version, org.hl7.fhir.utilities.FhirPublication fhirVersion) fetchCodeSystem(String system, org.hl7.fhir.utilities.FhirPublication fhirVersion) <T extends Resource>
 TfetchResource(Class<T> theClass, String theUri) Find an identified resource.<T extends Resource>
 TfetchResource(Class<T> theClass, String theUri, String theVersion) <T extends Resource>
 TfetchResource(Class<T> class_, String uri, String version, org.hl7.fhir.utilities.FhirPublication fhirVersion) <T extends Resource>
 TfetchResource(Class<T> class_, String uri, Resource canonicalForSource) has the same functionality as fetchResource, but passes in information about the source of the reference (this may affect resolution of version)<T extends Resource>
 TfetchResource(Class<T> class_, String uri, org.hl7.fhir.utilities.FhirPublication fhirVersion) 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. http://acme.org/fhir/ValueSet/[id] - a relative URL e.g.fetchResourceById(String type, String uri, org.hl7.fhir.utilities.FhirPublication fhirVersion) <T extends Resource>
 TfetchResourceRaw(Class<T> class_, String uri) Find an identified resource, but do not do any processing on it.fetchResourcesByType(Class<T> theClass) Fetch all the resources of a particular type. if class == (null | Resource | DomainResource | CanonicalResource) return everythingfetchResourcesByType(Class<T> class_, org.hl7.fhir.utilities.FhirPublication fhirVersion) fetchResourcesByUrl(Class<T> class_, String url) Fetch all the resources for the given URL - all matching versionsfetchResourceVersionsByTypeAndUrl(Class<T> class_, String url) <T extends Resource>
 TfetchResourceWithException(Class<T> theClass, String theUri) <T extends Resource>
 TfetchResourceWithException(Class<T> theClass, String uri, Resource sourceOfReference) Like fetchCodeSystem, except that the context will find any CodeSysetm supplements and merge them into thefetchSupplementedCodeSystem(String theS, String theS1) fetchSupplementedCodeSystem(String system, String version, org.hl7.fhir.utilities.FhirPublication fhirVersion) fetchSupplementedCodeSystem(String system, org.hl7.fhir.utilities.FhirPublication fhirVersion) fetchTypeDefinition(String typeName) This is a short cut for fetchResource(StructureDefinition.class, ...)fetchTypeDefinition(String typeName, org.hl7.fhir.utilities.FhirPublication fhirVersion) This finds all the structure definitions that have the given typeNamefetchTypeDefinitions(String n, org.hl7.fhir.utilities.FhirPublication fhirPublication) <T extends Resource>
 TfindTxResource(Class<T> class_, String canonical) <T extends Resource>
 TfindTxResource(Class<T> class_, String canonical, String version) <T extends Resource>
 TfindTxResource(Class<T> class_, String canonical, Resource sourceOfReference) this first does a fetch resource, and if nothing is found, looks in the terminology eco-system for a matching definition for the resource usually used (and so far only tested with) ValueSet.classbyte[]Returns the binary for the keyReturns a set of keys that can be used to get binaries from this context.intSet the expansion parameters passed through the terminology server when txServer calls are made Note that the Validation Options override these when they are specified on validateCodeget/set the locale used when creating messages todo: what's the difference?getPackage(String id, String ver) getProfiledElementBuilder(PEBuilder.PEElementPropertiesPolicy thePEElementPropertiesPolicy, boolean theB) getResourceNames(org.hl7.fhir.utilities.FhirPublication fhirVersion) getResourceNamesAsSet(org.hl7.fhir.utilities.FhirPublication fhirVersion) getTxSupportInfo(String system) getTxSupportInfo(String system, String version) return the System Support Information for the server that serves the specified code systemorg.fhir.ucum.UcumServiceGet the UCUM service that provides access to units of measure reasoning services This service might not be availableGet the version of the base definitions loaded in context This *does not* have to be 5.0 (R5) - the context can load other versions Note that more than one version might be loaded at once, but one version is always the default / masterbooleanReturns true if this worker context contains a binary for this key.booleanhasPackage(String id, String ver) booleanhasPackage(PackageInformation packageVersion) <T extends Resource>
 booleanhasResource(Class<T> theClass_, String theUri) find whether a resource is available.<T extends Resource>
 booleanhasResource(Class<T> class_, String uri, String fhirVersion) <T extends Resource>
 booleanhasResource(Class<T> class_, String uri, Resource sourceOfReference) booleanisDataType(String s) return whether type is data type.booleanbooleanbooleanreturn whether type is primitive type.booleanisServerSideSystem(String url) intloadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader) Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resourceintloadFromPackageAndDependencies(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm) Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource This method also loads all the packages that the package depends on (recursively)Get a validator that can check whether a resource is validsetClientRetryCount(int value) voidsetExpansionParameters(Parameters expParameters) Get the expansion parameters passed through the terminology server when txServer calls are made Note that the Validation Options override these when they are specified on validateCodevoidsetExpansionProfile(Parameters theExpParameters) voidsetForPublication(boolean b) voidSets the locale for this worker context.voidsetLogger(ILoggingService theLogger) setPackageTracker(IWorkerContextManager.IPackageLoadingTracker theIPackageLoadingTracker) voidsetUcumService(org.fhir.ucum.UcumService ucumService) subsumes(org.hl7.fhir.utilities.validation.ValidationOptions optionsArg, Coding parent, Coding child) ask the terminology system whether parent subsumes child.booleansupportsSystem(String theSystem) True if the underlying terminology service provider will do expansion and code validation for the terminology.booleansupportsSystem(String system, org.hl7.fhir.utilities.FhirPublication fhirVersion) urlsForOid(String oid, String resourceType) validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, String theSystem, String theVersion, String theCode, String theDisplay) Validation of a code - consult the terminology infrstructure and/or service to see whether it is known.validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, String theSystem, String theVersion, String theCode, String theDisplay, ValueSet theVs) Validation of a code - consult the terminology infrstructure and/or service to see whether it is known.validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, String code, ValueSet vs) Validation of a code - consult the terminology infrstructure and/or service to see whether it is known.validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, CodeableConcept theCode, ValueSet theVs) Validation of a code - consult the terminology infrstructure and/or service to see whether it is known.validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, Coding theCode, ValueSet theVs) Validation of a code - consult the terminology infrstructure and/or service to see whether it is known.validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, ValueSet vs, ValidationContextCarrier ctxt) See comments in ValidationContextCarrier.voidvalidateCodeBatch(org.hl7.fhir.utilities.validation.ValidationOptions options, List<? extends CodingValidationRequest> codes, ValueSet vs, boolean passVS) Batch validate code - reduce latency and do a bunch of codes in a single server call.validateTxResource(org.hl7.fhir.utilities.validation.ValidationOptions options, Resource resource) Methods inherited from class org.hl7.fhir.utilities.i18n.I18nBaseformatMessage, formatMessagePlural, getMessages, getMessagesSourceFileName, getPluralKey, getPluralKeys, getPluralRules, getPluralSuffixes, getRootKeyFromPlural, isWarnAboutMissingMessages, logUncontainedMessage, messageKeyExistsForLocale, setValidationMessageLanguage, setWarnAboutMissingMessages, typeOfStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hl7.fhir.r5.context.IWorkerContextformatMessage, formatMessagePlural, setValidationMessageLanguage
- 
Constructor Details- 
HapiWorkerContextpublic HapiWorkerContext(ca.uhn.fhir.context.FhirContext theCtx, ca.uhn.fhir.context.support.IValidationSupport theValidationSupport) 
 
- 
- 
Method Details- 
fetchCodeSystemDescription copied from interface:IWorkerContextFind the code system definition for the nominated system uri. return null if there isn't one (then the tool might try supportsSystem) This is a short cut for fetchResource(CodeSystem.class...)- Specified by:
- fetchCodeSystemin interface- IWorkerContext
- Parameters:
- theSystem-
- Returns:
 
- 
fetchCodeSystem- Specified by:
- fetchCodeSystemin interface- IWorkerContext
 
- 
fetchCodeSystempublic CodeSystem fetchCodeSystem(String system, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchCodeSystemin interface- IWorkerContext
 
- 
fetchCodeSystempublic CodeSystem fetchCodeSystem(String system, String version, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchCodeSystemin interface- IWorkerContext
 
- 
fetchSupplementedCodeSystemDescription copied from interface:IWorkerContextLike fetchCodeSystem, except that the context will find any CodeSysetm supplements and merge them into the- Specified by:
- fetchSupplementedCodeSystemin interface- IWorkerContext
- Parameters:
- theS-
- Returns:
 
- 
fetchSupplementedCodeSystem- Specified by:
- fetchSupplementedCodeSystemin interface- IWorkerContext
 
- 
fetchSupplementedCodeSystempublic CodeSystem fetchSupplementedCodeSystem(String system, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchSupplementedCodeSystemin interface- IWorkerContext
 
- 
fetchSupplementedCodeSystempublic CodeSystem fetchSupplementedCodeSystem(String system, String version, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchSupplementedCodeSystemin interface- IWorkerContext
 
- 
getResourceNames- Specified by:
- getResourceNamesin interface- IWorkerContext
- Returns:
- a list of the resource names defined for this version
 
- 
getResourceNames- Specified by:
- getResourceNamesin interface- IWorkerContext
 
- 
newValidatorDescription copied from interface:IWorkerContextGet a validator that can check whether a resource is valid- Specified by:
- newValidatorin interface- IWorkerContext
- Returns:
- a prepared generator
 
- 
getNSUrlMap- Specified by:
- getNSUrlMapin interface- IWorkerContext
 
- 
supportsSystemDescription copied from interface:IWorkerContextTrue if the underlying terminology service provider will do expansion and code validation for the terminology. Corresponds to the extension http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system in the Conformance resource Not that not all supported code systems have an available CodeSystem resource- Specified by:
- supportsSystemin interface- IWorkerContext
- Parameters:
- theSystem-
- Returns:
 
- 
supportsSystempublic boolean supportsSystem(String system, org.hl7.fhir.utilities.FhirPublication fhirVersion) throws org.hl7.fhir.exceptions.TerminologyServiceException - Specified by:
- supportsSystemin interface- IWorkerContext
- Throws:
- org.hl7.fhir.exceptions.TerminologyServiceException
 
- 
getTxSupportInfoDescription copied from interface:IWorkerContextreturn the System Support Information for the server that serves the specified code system- Specified by:
- getTxSupportInfoin interface- IWorkerContext
- Parameters:
- system-
- version-
- Returns:
 
- 
getTxSupportInfo- Specified by:
- getTxSupportInfoin interface- IWorkerContext
 
- 
validateCodepublic ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, CodeableConcept theCode, ValueSet theVs) Description copied from interface:IWorkerContextValidation of a code - consult the terminology infrstructure and/or 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 Note that this doesn't validate binding strength (e.g. is just text allowed?)- Specified by:
- validateCodein interface- IWorkerContext
- Parameters:
- theOptions- - validation options (required)
- theCode- - CodeableConcept to validate
- theVs- the applicable valueset (optional)
- Returns:
 
- 
validateCodepublic ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, Coding theCode, ValueSet theVs) Description copied from interface:IWorkerContextValidation of a code - consult the terminology infrstructure and/or 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 in this case, the system will be inferred from the value set. It's an error to call this one without the value set- Specified by:
- validateCodein interface- IWorkerContext
- Parameters:
- theOptions- - validation options (required)
- theCode- - Coding to validate
- theVs- the applicable valueset (optional)
- Returns:
 
- 
validateCodepublic ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, ValueSet vs, ValidationContextCarrier ctxt) Description copied from interface:IWorkerContextSee comments in ValidationContextCarrier. This is called when there might be additional value sets etc available in the context, but we don't want to pre-process them.- Specified by:
- validateCodein interface- IWorkerContext
- Parameters:
- options-
- code-
- vs-
- ctxt-
- Returns:
 
- 
validateCodeBatchpublic void validateCodeBatch(org.hl7.fhir.utilities.validation.ValidationOptions options, List<? extends CodingValidationRequest> codes, ValueSet vs, boolean passVS) Description copied from interface:IWorkerContextBatch validate code - reduce latency and do a bunch of codes in a single server call. Each is the same as a validateCode- Specified by:
- validateCodeBatchin interface- IWorkerContext
- Parameters:
- options-
- codes-
- vs-
 
- 
expandVSpublic ValueSetExpansionOutcome expandVS(ValueSet theValueSet, boolean cacheOk, boolean heiarchical, boolean incompleteOk) Description copied from interface:IWorkerContextValueSet Expansion - see $expand- Specified by:
- expandVSin interface- IWorkerContext
- Parameters:
- theValueSet-
- Returns:
 
- 
expandVS- Specified by:
- expandVSin interface- IWorkerContext
 
- 
validateCodepublic ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, String theSystem, String theVersion, String theCode, String theDisplay) Description copied from interface:IWorkerContextValidation of a code - consult the terminology infrstructure and/or 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:
- validateCodein interface- IWorkerContext
- Parameters:
- theOptions- - validation options (required)
- theSystem- - equals Coding.system (required)
- theCode- - equals Coding.code (required)
- theDisplay- - equals Coding.display (optional)
- Returns:
 
- 
validateCodepublic ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, String theSystem, String theVersion, String theCode, String theDisplay, ValueSet theVs) Description copied from interface:IWorkerContextValidation of a code - consult the terminology infrstructure and/or 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:
- validateCodein interface- IWorkerContext
- Parameters:
- theOptions- - validation options (required)
- theSystem- - equals Coding.system (required)
- theCode- - equals Coding.code (required)
- theDisplay- - equals Coding.display (optional)
- theVs- the applicable valueset (optional)
- Returns:
 
- 
validateCodepublic ValidationResult validateCode(org.hl7.fhir.utilities.validation.ValidationOptions theOptions, String code, ValueSet vs) Description copied from interface:IWorkerContextValidation of a code - consult the terminology infrstructure and/or 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 in this case, the system will be inferred from the value set. It's an error to call this one without the value set- Specified by:
- validateCodein interface- IWorkerContext
- Parameters:
- theOptions- - validation options (required)
- code- he code to validate (required)
- vs- the applicable valueset (required)
- Returns:
 
- 
getExpansionParametersDescription copied from interface:IWorkerContextSet the expansion parameters passed through the terminology server when txServer calls are made Note that the Validation Options override these when they are specified on validateCode- Specified by:
- getExpansionParametersin interface- IWorkerContext
 
- 
setExpansionParametersDescription copied from interface:IWorkerContextGet the expansion parameters passed through the terminology server when txServer calls are made Note that the Validation Options override these when they are specified on validateCode- Specified by:
- setExpansionParametersin interface- IWorkerContext
 
- 
setExpansionProfile
- 
expandVSpublic ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHierarchical) Description copied from interface:IWorkerContextValueSet Expansion - see $expand- Specified by:
- expandVSin interface- IWorkerContext
- Parameters:
- theSource-
- Returns:
 
- 
expandVSpublic ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHierarchical, int i) - Specified by:
- expandVSin interface- IWorkerContext
 
- 
getLocaleDescription copied from interface:IWorkerContextget/set the locale used when creating messages todo: what's the difference?- Specified by:
- getLocalein interface- IWorkerContext
- Overrides:
- getLocalein class- org.hl7.fhir.utilities.i18n.I18nBase
- Returns:
 
- 
setLocaleDescription copied from interface:IWorkerContextSets the locale for this worker context.- Specified by:
- setLocalein interface- IWorkerContext
- Overrides:
- setLocalein class- org.hl7.fhir.utilities.i18n.I18nBase
- Parameters:
- locale- The locale to use.
 
- 
getLogger- Specified by:
- getLoggerin interface- IWorkerContext
 
- 
setLogger- Specified by:
- setLoggerin interface- IWorkerContext
 
- 
getVersionDescription copied from interface:IWorkerContextGet the version of the base definitions loaded in context This *does not* have to be 5.0 (R5) - the context can load other versions Note that more than one version might be loaded at once, but one version is always the default / master- Specified by:
- getVersionin interface- IWorkerContext
- Returns:
 
- 
getUcumServiceDescription copied from interface:IWorkerContextGet the UCUM service that provides access to units of measure reasoning services This service might not be available- Specified by:
- getUcumServicein interface- IWorkerContext
- Returns:
 
- 
setUcumService- Specified by:
- setUcumServicein interface- IWorkerContext
 
- 
isNoTerminologyServer- Specified by:
- isNoTerminologyServerin interface- IWorkerContext
 
- 
getCodeSystemsUsed- Specified by:
- getCodeSystemsUsedin interface- IWorkerContext
 
- 
fetchTypeDefinitionDescription copied from interface:IWorkerContextThis is a short cut for fetchResource(StructureDefinition.class, ...) but it accepts a typename - that is, it resolves based on StructureDefinition.type or StructureDefinition.url. This only resolves to http://hl7.org/fhir/StructureDefinition/{typename}- Specified by:
- fetchTypeDefinitionin interface- IWorkerContext
- Parameters:
- typeName-
- Returns:
 
- 
isPrimitiveTypeDescription copied from interface:IWorkerContextreturn whether type is primitive type. This is called a lot, and needs a high performance implementation- Specified by:
- isPrimitiveTypein interface- IWorkerContext
- Parameters:
- s-
- Returns:
 
- 
isDataTypeDescription copied from interface:IWorkerContextreturn whether type is data type. This is called a lot, and needs a high performance implementation- Specified by:
- isDataTypein interface- IWorkerContext
- Parameters:
- s-
- Returns:
 
- 
fetchTypeDefinitionpublic StructureDefinition fetchTypeDefinition(String typeName, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchTypeDefinitionin interface- IWorkerContext
 
- 
fetchTypeDefinitionsDescription copied from interface:IWorkerContextThis finds all the structure definitions that have the given typeName- Specified by:
- fetchTypeDefinitionsin interface- IWorkerContext
- Returns:
 
- 
fetchTypeDefinitionspublic List<StructureDefinition> fetchTypeDefinitions(String n, org.hl7.fhir.utilities.FhirPublication fhirPublication) - Specified by:
- fetchTypeDefinitionsin interface- IWorkerContext
 
- 
fetchResourceRawDescription copied from interface:IWorkerContextFind an identified resource, but do not do any processing on it. The usual processing that happens is ensuring that the snapshot is generated before returning it; This routine is used in the snapshot generation routines to avoid circular dependency challenges generating snapshots. class can be Resource, DomainResource or CanonicalResource, which means resource of all kinds- Specified by:
- fetchResourceRawin interface- IWorkerContext
- Parameters:
- class_-
- uri-
- Returns:
 
- 
fetchResourceDescription copied from interface:IWorkerContextFind an identified resource. The most common use of this is to access the the standard conformance resources that are part of the standard - structure definitions, value sets, concept maps, etc. Also, the narrative generator uses this, and may access any kind of resource The URI is called speculatively for things that might exist, so not finding a matching resource, return null, not an error The URI can have one of 3 formats: - a full URL e.g. http://acme.org/fhir/ValueSet/[id] - a relative URL e.g. ValueSet/[id] - a logical id e.g. [id] It's an error if the second form doesn't agree with class_. It's an error if class_ is null for the last form class can be Resource, DomainResource or CanonicalResource, which means resource of all kinds- Specified by:
- fetchResourcein interface- IWorkerContext
- Returns:
 
- 
fetchResourcepublic <T extends Resource> T fetchResource(Class<T> class_, String uri, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchResourcein interface- IWorkerContext
 
- 
fetchResourceWithExceptionpublic <T extends Resource> T fetchResourceWithException(Class<T> theClass, String theUri) throws org.hl7.fhir.exceptions.FHIRException - Specified by:
- fetchResourceWithExceptionin interface- IWorkerContext
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
fetchResourceWithExceptionpublic <T extends Resource> T fetchResourceWithException(Class<T> theClass, String uri, Resource sourceOfReference) throws org.hl7.fhir.exceptions.FHIRException - Specified by:
- fetchResourceWithExceptionin interface- IWorkerContext
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
fetchResource- Specified by:
- fetchResourcein interface- IWorkerContext
 
- 
fetchResourcepublic <T extends Resource> T fetchResource(Class<T> class_, String uri, String version, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchResourcein interface- IWorkerContext
 
- 
fetchResourcepublic <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource canonicalForSource) Description copied from interface:IWorkerContexthas the same functionality as fetchResource, but passes in information about the source of the reference (this may affect resolution of version)- Specified by:
- fetchResourcein interface- IWorkerContext
- Type Parameters:
- T-
- Parameters:
- class_-
- uri-
- Returns:
 
- 
fetchResourcesByTypepublic <T extends Resource> List<T> fetchResourcesByType(Class<T> class_, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchResourcesByTypein interface- IWorkerContext
 
- 
fetchResourceByIdDescription copied from interface:IWorkerContextVariation 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. http://acme.org/fhir/ValueSet/[id] - a relative URL e.g. ValueSet/[id] - a logical id e.g. [id] if type == null, the URI can't be a simple logical id- Specified by:
- fetchResourceByIdin interface- IWorkerContext
- Parameters:
- theType-
- theUri-
- Returns:
 
- 
fetchResourceByIdpublic Resource fetchResourceById(String type, String uri, org.hl7.fhir.utilities.FhirPublication fhirVersion) - Specified by:
- fetchResourceByIdin interface- IWorkerContext
 
- 
hasResourceDescription copied from interface:IWorkerContextfind whether a resource is available. Implementations of the interface can assume that if hasResource ruturns true, the resource will usually be fetched subsequently- Specified by:
- hasResourcein interface- IWorkerContext
- Parameters:
- theClass_-
- theUri-
- Returns:
 
- 
hasResourcepublic <T extends Resource> boolean hasResource(Class<T> class_, String uri, Resource sourceOfReference) - Specified by:
- hasResourcein interface- IWorkerContext
 
- 
hasResource- Specified by:
- hasResourcein interface- IWorkerContext
 
- 
cacheResourceDescription copied from interface:IWorkerContextcache a resource for later retrieval using fetchResource. Note that various context implementations will have their own ways of loading rseources, and not all need implement cacheResource. If the resource is loaded out of a package, call cacheResourceFromPackage instead- Specified by:
- cacheResourcein interface- IWorkerContext
- Parameters:
- theRes-
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
cacheResourceFromPackagepublic void cacheResourceFromPackage(Resource res, PackageInformation packageDetails) throws org.hl7.fhir.exceptions.FHIRException Description copied from interface:IWorkerContextcache a resource for later retrieval using fetchResource. The package information is used to help manage the cache internally, and to help with reference resolution. Packages should be define using cachePackage (but don't have to be) Note that various context implementations will have their own ways of loading rseources, and not all need implement cacheResource- Specified by:
- cacheResourceFromPackagein interface- IWorkerContext
- Parameters:
- res-
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
cachePackageDescription copied from interface:IWorkerContextInform the cache about package dependencies. This can be used to help resolve references Note that the cache doesn't load dependencies- Specified by:
- cachePackagein interface- IWorkerContext
- Parameters:
- packageInformation-
 
- 
getResourceNamesAsSet- Specified by:
- getResourceNamesAsSetin interface- IWorkerContext
- Returns:
- a set of the resource names defined for this version
 
- 
getResourceNamesAsSet- Specified by:
- getResourceNamesAsSetin interface- IWorkerContext
 
- 
expandVSpublic ValueSetExpansionOutcome expandVS(Resource src, ElementDefinition.ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws org.hl7.fhir.exceptions.FHIRException Description copied from interface:IWorkerContextValueSet Expansion - see $expand, but resolves the binding first- Specified by:
- expandVSin interface- IWorkerContext
- Returns:
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
expandVSpublic ValueSetExpansionOutcome expandVS(IWorkerContext.ITerminologyOperationDetails iTerminologyOperationDetails, ValueSet.ConceptSetComponent conceptSetComponent, boolean b, boolean b1) throws org.hl7.fhir.exceptions.TerminologyServiceException Description copied from interface:IWorkerContextValue set expanion inside the internal expansion engine - used for references to supported system (see "supportsSystem") for which there is no value set.- Specified by:
- expandVSin interface- IWorkerContext
- Parameters:
- conceptSetComponent-
- Returns:
- Throws:
- org.hl7.fhir.exceptions.TerminologyServiceException
 
- 
getBinaryKeysAsSetDescription copied from interface:IWorkerContextReturns a set of keys that can be used to get binaries from this context. The binaries come from the loaded packages (mostly the pubpack)- Specified by:
- getBinaryKeysAsSetin interface- IWorkerContext
- Returns:
- a set of binaries or null
 
- 
hasBinaryKeyDescription copied from interface:IWorkerContextReturns true if this worker context contains a binary for this key.- Specified by:
- hasBinaryKeyin interface- IWorkerContext
- Parameters:
- s-
- Returns:
- true if binary is available for this key
 
- 
getBinaryForKeyDescription copied from interface:IWorkerContextReturns the binary for the key- Specified by:
- getBinaryForKeyin interface- IWorkerContext
- Parameters:
- s-
- Returns:
 
- 
loadFromPackagepublic int loadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader) throws org.hl7.fhir.exceptions.FHIRException Description copied from interface:IWorkerContextLoad relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource- Specified by:
- loadFromPackagein interface- IWorkerContext
- Parameters:
- pi- - the package to load
- loader- - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).
- Returns:
- the number of resources loaded
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
loadFromPackageAndDependenciespublic int loadFromPackageAndDependencies(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm) throws org.hl7.fhir.exceptions.FHIRException Description copied from interface:IWorkerContextLoad relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource This method also loads all the packages that the package depends on (recursively)- Specified by:
- loadFromPackageAndDependenciesin interface- IWorkerContext
- Parameters:
- pi- - the package to load
- loader- - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).
- pcm- - used to find and load additional dependencies
- Returns:
- the number of resources loaded
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
hasPackage- Specified by:
- hasPackagein interface- IWorkerContext
 
- 
hasPackage- Specified by:
- hasPackagein interface- IWorkerContext
 
- 
getPackage- Specified by:
- getPackagein interface- IWorkerContext
 
- 
getClientRetryCount- Specified by:
- getClientRetryCountin interface- IWorkerContext
 
- 
setClientRetryCount- Specified by:
- setClientRetryCountin interface- IWorkerContext
 
- 
clock- Specified by:
- clockin interface- IWorkerContext
 
- 
getPackageTracker- Specified by:
- getPackageTrackerin interface- IWorkerContext
 
- 
getPackageForUrl- Specified by:
- getPackageForUrlin interface- IWorkerContext
 
- 
convertConceptValidationOptionspublic static ca.uhn.fhir.context.support.ConceptValidationOptions convertConceptValidationOptions(org.hl7.fhir.utilities.validation.ValidationOptions theOptions) 
- 
fetchResourcesByTypeDescription copied from interface:IWorkerContextFetch all the resources of a particular type. if class == (null | Resource | DomainResource | CanonicalResource) return everything- Specified by:
- fetchResourcesByTypein interface- IWorkerContext
- Type Parameters:
- T-
- Parameters:
- theClass-
- Returns:
 
- 
fetchResourceVersionsByTypeAndUrl- Specified by:
- fetchResourceVersionsByTypeAndUrlin interface- IWorkerContext
 
- 
fetchResourcesByUrlDescription copied from interface:IWorkerContextFetch all the resources for the given URL - all matching versions- Specified by:
- fetchResourcesByUrlin interface- IWorkerContext
- Parameters:
- url-
- Returns:
 
- 
setPackageTrackerpublic IWorkerContext setPackageTracker(IWorkerContextManager.IPackageLoadingTracker theIPackageLoadingTracker) - Specified by:
- setPackageTrackerin interface- IWorkerContext
 
- 
getSpecUrl- Specified by:
- getSpecUrlin interface- IWorkerContext
 
- 
getProfiledElementBuilderpublic PEBuilder getProfiledElementBuilder(PEBuilder.PEElementPropertiesPolicy thePEElementPropertiesPolicy, boolean theB) - Specified by:
- getProfiledElementBuilderin interface- IWorkerContext
 
- 
isForPublication- Specified by:
- isForPublicationin interface- IWorkerContext
 
- 
setForPublication- Specified by:
- setForPublicationin interface- IWorkerContext
 
- 
urlsForOid- Specified by:
- urlsForOidin interface- IWorkerContext
- Parameters:
- oid-
- resourceType- - null to search on all resource types
- Returns:
 
- 
findTxResourcepublic <T extends Resource> T findTxResource(Class<T> class_, String canonical, Resource sourceOfReference) Description copied from interface:IWorkerContextthis first does a fetch resource, and if nothing is found, looks in the terminology eco-system for a matching definition for the resource usually used (and so far only tested with) ValueSet.class- Specified by:
- findTxResourcein interface- IWorkerContext
- Returns:
 
- 
findTxResource- Specified by:
- findTxResourcein interface- IWorkerContext
 
- 
findTxResource- Specified by:
- findTxResourcein interface- IWorkerContext
 
- 
subsumespublic Boolean subsumes(org.hl7.fhir.utilities.validation.ValidationOptions optionsArg, Coding parent, Coding child) Description copied from interface:IWorkerContextask the terminology system whether parent subsumes child.- Specified by:
- subsumesin interface- IWorkerContext
- Returns:
- true if it does, false if it doesn't, and null if it's not know whether it does
 
- 
isServerSideSystem- Specified by:
- isServerSideSystemin interface- IWorkerContext
 
- 
validateTxResourcepublic OperationOutcome validateTxResource(org.hl7.fhir.utilities.validation.ValidationOptions options, Resource resource) - Specified by:
- validateTxResourcein interface- IWorkerContext
 
 
-