IFhirValueFactory class abstract

The engine's contract for constructing the FHIR-typed values it yields as evaluation results. The engine logic never names concrete FHIR value classes (FhirBoolean, FhirString, …); every literal/result it constructs goes through this factory, whose implementation lives in the FHIR binding (reached via IWorkerContext.valueFactory).

Results stay FHIR-typed (the value model is behavior-preserving). disallowExtensions mirrors the engine's historical .noExtensions() usage: FHIRPath results are System values that disallow extensions, but a handful of call sites constructed bare primitives, and that per-site behavior is preserved exactly.

Constructors

IFhirValueFactory()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

boolean(bool? value, {bool disallowExtensions = true}) → FhirNode
Builds a boolean result.
classTypeInfo(FhirNode instance) → FhirNode
Builds the type() reflection value for instance (the System-vs-FHIR namespace decision needs the binding's System-value marker).
dateTimeOfType(String fhirType, String value, {bool disallowExtensions = false}) → FhirNode
Builds a date/dateTime/instant result from a canonical FHIRPath date-time value string, of the concrete FHIR type named by fhirType.
decimal(num? value, {bool disallowExtensions = true}) → FhirNode
Builds a decimal result.
decimalFromString(String? value, {bool disallowExtensions = true}) → FhirNode
Builds a decimal from its STRING form, preserving the exact representation (trailing zeros included).
integer(num? value, {bool disallowExtensions = true}) → FhirNode
Builds an integer result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nowFrom(DateTime instant) → FhirNode
The now() value — a dateTime for instant.
numericAbs(FhirNode number) → FhirNode
Returns abs(number) preserving the FHIR numeric subtype exactly.
quantity({num? value, String? unit, String? system, String? code, bool disallowExtensions = false}) → FhirNode
Builds a Quantity result from model-independent scalar parts.
quantityLiteral({String? value, String? unit, String? ucumCode}) → FhirNode
Builds the Quantity for a parsed quantity LITERAL (5 'mg', 4 days), value string preserved exactly.
quantityWithValue(FhirNode quantity, num? value) → FhirNode
Returns a copy of the Quantity node quantity with its value replaced by value, preserving every other field.
quantityWithValueString(FhirNode quantity, String? value) → FhirNode
quantityWithValue, but from the value's exact STRING form.
string(String? value, {bool disallowExtensions = true}) → FhirNode
Builds a string result.
time(String? value, {bool disallowExtensions = true}) → FhirNode
Builds a time result.
timeOfDayFrom(DateTime instant) → FhirNode
The timeOfDay() value — a time for the time-of-day of instant.
todayFrom(DateTime instant) → FhirNode
The today() value — a date for the calendar day of instant.
toString() → String
A string representation of this object.
inherited
tryDate(String? value) → FhirNode?
Parses value as a date System value, or null when invalid.
tryDateTime(String? value) → FhirNode?
Parses value as a dateTime System value, or null when invalid.
tryTime(String? value) → FhirNode?
Parses value as a time System value, or null when invalid.

Operators

operator ==(Object other) → bool
The equality operator.
inherited