FhirId class
A subclass of FhirUri representing the FHIR primitive type id.
According to FHIR, an id is a string of length 1..64 matching
the pattern:
[A-Za-z0-9\-\.]{1}[A-Za-z0-9\-\.]{0,63}
(with a slight variation for underscores).
- Inheritance
- Implemented types
-
- ValueXParametersParameter
- ValueXStructureMapParameter
- ValueXTaskInput
- ValueXTaskOutput
- ValueXTransportInput
- ValueXTransportOutput
- DefaultValueXElementDefinition
- FixedXElementDefinition
- PatternXElementDefinition
- ValueXElementDefinitionExample
- ValueXExtension
- ValueXEvidenceVariableDefinitionByTypeAndValue
- EventXEvidenceVariableTimeFromEvent
Constructors
-
FhirId(dynamic rawValue, {Element? element, FhirString? id, List<
FhirExtension> ? extension_, bool? disallowExtensions}) -
Creates a FhirId by validating
rawValueas a String or Uri.factory -
FhirId.fromJson(Map<
String, dynamic> json) -
Constructs a FhirId from a JSON Map.
factory
Properties
-
allExtensions
→ List<
FhirExtension> ? -
Returns a list of all extensions, including those in element.
no setterinherited
-
Returns the authority portion of the URI, if any.
no setterinherited
-
copyWith
→ $FhirIdCopyWithImpl<
FhirId> -
Creates a new instance with the specified fields replaced.
no setteroverride
- disallowExtensions → bool?
-
This is used in the FHIRPath engine to record that no extensions are
allowed for this item in the context in which it is used.
to do: enforce this....
finalinherited
- element → Element?
-
Optional FHIR metadata element (usually carrying extensions).
finalinherited
-
extension_
→ List<
FhirExtension> ? -
List of extensions for additional information.
finalinherited
- fhirType → String
-
Returns
"id"as the FHIR type.no setteroverride - hasElement → bool
-
Returns
trueif element is non-null.no setterinherited - hasElementOnly → bool
-
Returns
trueif there is an element but no valueString.no setterinherited - hashCode → int
-
Hash code override.
no setteroverride
- hasId → bool
-
Getter for checking if the element has an id.
no setterinherited
- hasPrimitiveValue → bool
-
Checks if the object has a primitive value.
no setterinherited
- hasValue → bool
-
Returns
trueif valueString is non-null.no setterinherited - hasValueAndElement → bool
-
Returns
trueif both valueString and element are non-null.no setterinherited - host → String?
-
Returns the host portion of the URI, if any.
no setterinherited
- id → FhirString?
-
Unique id for the element within a resource.
finalinherited
- isMetadataBased → bool
-
All Elements are metadata based.
no setterinherited
- isPrimitive → bool
-
Checks if the object is primitive.
no setterinherited
-
pathSegments
→ List<
String> ? -
Returns the list of path segments in the URI.
no setterinherited
- port → int?
-
Returns the port of the URI, if any.
no setterinherited
- primitiveValue → String?
-
The primitive value as a string.
no setteroverride
- query → String?
-
Returns the query string portion of the URI, if any.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringBased → bool
-
Returns
trueif the Type is considered string-based, otherwisefalseno setteroverride - userInfo → String?
-
Returns the userInfo portion of the URI, if any.
no setterinherited
- valueAndElement → bool
-
Returns
trueif both valueString and element are non-null.no setterinherited - valueOnly → bool
-
Returns
trueif there is a valueString but no element.no setterinherited - valueString → String?
-
The primitive FHIR value as a String.
finalinherited
- valueUri → Uri?
-
Returns the valueString parsed as a Dart Uri, or
nullif valueString isnull.no setterinherited
Methods
-
addExtension(
FhirExtension ext) → void -
Method to add an extension.
inherited
-
clone(
) → FhirId -
Creates a deep copy of this FhirId.
override
-
compareDeepStrings(
String? s1, String? s2, bool allowNull) → bool -
Checks if the object is equal to another object.
inherited
-
equals(
Object other) → bool -
Checks equality with FhirId or String.
override
-
equalsDeep(
FhirBase? other) → bool -
Deep equality check for FhirId.
override
-
equalsShallow(
FhirBase other) → bool -
By default, shallow equality checks only valueString.
inherited
-
getChildByName(
String name) → FhirBase? -
Retrieves a property by name, or if its a list that contains only one
element, returns that element.
inherited
-
getChildrenByName(
String name, [bool checkValid = false]) → List< FhirBase> -
Retrieves the properties of the object.
inherited
-
getExtensionFirstRep(
) → FhirExtension -
Getter for the first extension.
inherited
-
getExtensionsByUrl(
String url) → List< FhirExtension> -
Getter for the first extension by url.
inherited
-
hasExtension(
) → bool -
Extension handling methods.
inherited
-
hasExtensionByUrl(
String url) → bool -
Method to check if an extension exists by url.
inherited
-
hasType(
List< String> names) → bool -
Checks if the object has a given type.
inherited
-
hasValues(
) → bool -
Checks if the object has values.
inherited
-
isAs<
T extends FhirBase> () → T? -
Returns an Object cast as a Type if it is that type.
inherited
-
isEmpty(
) → bool -
Checks if the object is empty.
inherited
-
listChildrenNames(
) → List< String> -
Lists the JSON keys for the object.
inherited
-
noExtensions(
) → FhirUri -
Returns a copy that disallows further extensions.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prettyPrint(
) → String -
Converts the object to a pretty JSON string.
inherited
-
removeExtension(
String url) → void -
Method to remove an extension by url.
inherited
-
toFilePath(
{bool? windows}) → String? -
Converts the URI to a file path, respecting
windowsif needed.inherited -
toJson(
) → Map< String, dynamic> -
Converts this FhirId into a JSON Map.
override
-
toJsonString(
) → String -
Converts the object to a JSON string.
inherited
-
toString(
) → String -
Provides a string representation of the instance.
override
-
toYaml(
) → String -
Converts the object to a YAML string.
inherited
Operators
-
operator ==(
Object other) → bool -
Operator
==override.override
Static Methods
-
fromJsonList(
List values, List? elements) → List< FhirId> -
Converts parallel lists of
valuesandelementsinto a list of FhirId.override -
fromYaml(
dynamic yaml) → FhirId -
Constructs a FhirId from a YAML input (String or
YamlMap).override -
toJsonList(
List< FhirId> values) → Map<String, dynamic> -
Converts a list of FhirId to a JSON map with
'value'and'_value'arrays.override -
tryParse(
dynamic input) → FhirId? -
Attempts to parse
inputas a FhirId. Returnsnullif parsing fails.override