FhirWorkerContext class
The engine's worker: type metadata (StructureDefinitions and the
binding's type table), canonical resources, and terminology, over any
model. A binding package subclasses it to supply its FhirModelBinding
and keep its WorkerContext() constructor.
- Implemented types
Constructors
- FhirWorkerContext({required FhirModelBinding binding, FhirToolingClient? txClient, ResourceCache? resourceCache})
Properties
- binding → FhirModelBinding
-
What the model supplies.
final
-
cached
→ Set<
String> -
final
- cacheId ↔ String?
-
getter/setter pair
-
codeSystemsUsed
→ Set<
String> -
final
-
expParameters
↔ Map<
String, dynamic> ? -
The expansion profile sent to a terminology server, as Parameters JSON.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isTxCaching ↔ bool
-
getter/setter pair
- locator → ValidatorFetcher
-
final
- logger → LoggingService?
-
final
- noTerminologyServer ↔ bool
-
getter/setter pair
- resourceCache → ResourceCache
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tlogging ↔ bool
-
getter/setter pair
- txCache → TerminologyCache
-
final
- txClient → FhirToolingClient?
-
final
- txLog → ClientLogger
-
final
- ucumService → UcumService
-
The UCUM service used for Quantity arithmetic/comparison canonicals.
final
- valueFactory → IFhirValueFactory
-
The binding's value factory — how the engine constructs the FHIR-typed
values it yields as results.
no setteroverride
Methods
-
addDependentResources(
Map< String, dynamic> oldPin, FhirNode vs) → Future<(bool, Map< String, dynamic> )> -
addDependentResourcesForComponent(
Map< String, dynamic> oldPin, FhirNode inc) → Future<(bool, Map< String, dynamic> )> -
addTypeAndDescendents(
List< FhirNode> sdl, FhirNode dt, List<FhirNode> types) → void -
allStructures(
) → Future< List< FhirNode> > -
fetchCodeSystem(
String? system) → Future< FhirNode?> -
fetchCodeSystemWithVersion(
String system, String version) → Future< FhirNode?> -
fetchResource(
{String? uri, String? version, String? type}) → Future< FhirNode?> -
The canonical resource at
uri(andversion), oftypewhen given. -
fetchTypeDefinition(
String typeName) → Future< FhirNode?> -
The StructureDefinition that type code
typeNamenames, at the one canonical typeCodeCanonical gives it. This tried the bare name and then a terminology.hl7.org address as well; the spec resolves a relative code against http://hl7.org/fhir/StructureDefinition only, and the terminology.hl7.org address found an extension, never a type. -
fetchTypeDefinitionByUrl(
String url) → Future< FhirNode?> -
The
StructureDefinitionresource with canonical URLurlas an opaque node (handed back to resolveContextTypeDetails), or null.override -
fetchValueSet(
String? url) → Future< FhirNode?> -
The
ValueSetresource forurlas an opaque node, or null.override -
formatMessage(
String theMessage, List theMessageArguments) → String -
Formats the message-catalog entry
theMessagewiththeMessageArguments(engine error texts).override -
formatMessagePlural(
int pl, String theMessage, List theMessageArguments) → String -
As formatMessage, with a plural count.
override
-
getChildTypesByName(
String? type, String name, TypeDetails result, ExpressionNode expr, {required bool allowPolymorphicNames}) → Future< void> -
Accumulates into
resultthe types reachable by navigatingnamefromtype(static type analysis).override -
getClassInfoChildTypesByName(
String name, TypeDetails result) → void -
getElementDefinition(
FhirNode sd, String path, bool allowTypedName, ExpressionNode expr) → Future< ElementDefinitionMatch?> -
getElementDefinitionById(
FhirNode sd, String ref) → ElementDefinitionMatch? -
getOverrideVersionNs(
) → String -
getResourceNames(
) → Future< List< String> > -
getSimpleTypeChildTypesByName(
String name, TypeDetails result) → void -
getStructures(
) → Future< List< FhirNode> > -
getVersion(
) → String -
The FHIR publication version of the bound model (e.g.
'4.0.1').override -
hasDataType(
FhirNode ed) → bool -
Whether
eddeclares a concrete data type (not Element or BackboneElement). Javaed.hasType()is "has a type"; the earlier port asked the element whether its own type name was in an empty list, which was always false, so this branch had never run. -
hasDelimiter(
String s1, String s2, String delimiter) → bool -
isAbstractType(
List< FhirNode> list) → bool -
isKnownType(
String typeName) → Future< bool> -
Whether
typeNamenames a known FHIR type: the binding's own type lists and table first (so the check needs no definitions loaded), then a StructureDefinition in the cache.override -
isSubtypeOf(
String type, String superType) → Future< bool> -
Whether
typeissuperTypeor descends from it. The walk does NOT stop at primitive-type definitions (JavafuncIs/isAncestor): this is what makesPatient.gender.is(string)true for acode.override -
isValueOfType(
FhirNode node, String ns, String name) → Future< bool> -
The FHIRPath type-membership test shared by the
isoperator and theis()function: doesnodebelong to the type namednamein namespacens('System'or'FHIR')? A resource is never a System value; a System value is one the binding marks as outside the element tree or a bare primitive, matched by its capitalised type name (plus the Date→DateTime lattice rule); a FHIR test walks the subtype chain. Matches the Java referenceFHIRPathEngine.funcIs.override -
laterDelimitedVersion(
String newVersion, String oldVersion, String delimiter) → bool -
laterVersion(
String newVersion, String oldVersion) → bool -
loadResource(
FhirNode resource) → Future< void> -
Keeps
resource, a canonical resource node with an id or a version id. -
loadStructureDefinition(
FhirNode sd) → Future< void> -
Keeps
sd, a StructureDefinition node with a name and a url. -
loadStructureDefinitions(
List< FhirNode> sds) → Future<void> -
matchesOfType(
FhirNode node, String tn) → Future< bool> -
The
ofType()filter fornodeagainst the type specifiertn(System.XorFHIR.X), matching the Java referencefuncOfType/funcAs: System values match by exact type name; FHIR values match through the subtype hierarchy, but theofTypewalk STOPS at primitive-type definitions (sogender.ofType(string)is false for acodeeven thoughgender.is(string)is true).override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
primitiveTypeNames(
) → Future< Set< String> > -
Names of the model's primitive types.
override
-
processValidationResponse(
Map< String, dynamic> response) → ValidationResult -
processValidationResult(
Map< String, dynamic> pOut) → ValidationResult - The ValidationResult a server's $validate-code Parameters answer means.
-
resolveContextTypeDetails(
FhirNode structureDefinition, String context, String abstractTypePrefix, ExpressionNode expr) → Future< TypeDetails?> -
Resolves the type details of element
contextwithin the StructureDefinition nodestructureDefinition(enginecheck()API).override -
setTerminologyOptions(
ValidationOptions options, Map< String, dynamic> pIn) → Map<String, dynamic> -
pInwith the parameters the validation options add. -
specializedTypeNames(
) → Future< List< String> > -
Names of every specialization (non-logical) type of the bound model.
override
-
tlog(
String msg) → void -
toString(
) → String -
A string representation of this object.
inherited
-
typeAncestry(
String uri) → Future< List< (String, String)> > -
The canonical-URL ancestry chain of the type at
uri: this type, then each successivebaseDefinition, as(url, typeName)pairs. Mirrors the walk in the Java reference'sTypeDetails.hasType, including itsuri→stringredirect.override -
typeCanonicalUrl(
String type) → Future< String?> -
The canonical URL of the type named
type, or null when unknown.override -
validateCode(
ValidationOptions options, String? system, String? version, String code, String? display) → Future< ValidationResult> -
validateCodeForCodeableConceptValue(
ValidationOptions options, FhirNode node, FhirNode valueSet) → Future< ValidationResult> -
As validateCodeForCodingValue, for a
CodeableConcept-typed value.override -
validateCodeForCodingValue(
ValidationOptions options, FhirNode node, FhirNode? valueSet) → Future< ValidationResult> -
Validates a code-carrying value (what the binding reads as a Coding)
against
valueSet.override -
validateCodeOnServer(
ValidationOptions options, CodingValue coding, FhirNode? valueSet) → ValidationResult -
validateCodeWithCodeableConcept(
ValidationOptions options, ConceptValue code, FhirNode vs) → Future< ValidationResult> -
validateCodeWithCoding(
ValidationOptions options, CodingValue coding, FhirNode? valueSet) → Future< ValidationResult> -
Validates
codingagainstvalueSet(a ValueSet node, or null for the code system alone), on the client when the options allow it. -
validateOnServer(
FhirNode? vs, Map< String, dynamic> pin, ValidationOptions options) → ValidationResult -
Prepares
pin(Parameters JSON) for a server validation ofvs. The server call itself is not yet implemented.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited