Resource class abstract mixin

This class ends up functioning mostly like an abstract superclass. Some of the fields in other classes contain a generic resource, so in order for them to be able to implement a resource.toJson() function, it also has to be implemented here (although it is always overridden). Each resource class also has it's own fromJson() function as well. The fromJson function in this class is only used if the resourceType is not previously known

Implementers
Annotations
  • @JsonSerializable()

Constructors

Resource.new()

Properties

contained List<Resource>?
no setter
extension_ List<FhirExtension>?
no setter
hashCode int
The hash code for this object.
no setterinherited
id FhirId?
no setter
implicitRules FhirUri?
no setter
implicitRulesElement Element?
no setter
language FhirCode?
no setter
languageElement Element?
no setter
meta FhirMeta?
no setter
modifierExtension List<FhirExtension>?
no setter
path String
Local Reference for this Resource, form is "ResourceType/Id"
no setter
resourceType R5ResourceType?
no setter
resourceTypeString String?
produce a string of the resourceType
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text Narrative?
no setter
thisReference Reference
Convenience method to return a Reference referring to that Resource
no setter

Methods

newId() Resource
returns the same resource with a new ID (even if there is already an ID present)
newIdIfNoId() Resource
returns the same resource with a new ID if there is no current ID
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns a Map<String, dynamic> of the Resource
toJsonString() String
Another convenience method because more and more I'm transmitting FHIR data as a String and not a Map
toString() String
A string representation of this object.
inherited
toYaml() String
Produces a Yaml formatted String version of the object
updateVersion({FhirMeta? oldMeta}) Resource
Updates the meta field of this Resource, updates the meta.lastUpdated field, adds 1 to the version number

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) Resource
Acts like a constructor, returns a Resource, accepts a Map<String, Dynamic> as an argument
fromJsonString(String source) Resource
Acts like a constructor, returns a Resource, accepts a String as an argument, mostly because I got tired of typing it out
fromYaml(dynamic yaml) Resource
Returns a Resource, accepts a String in YAML format as an argument
resourceTypeFromString(String type) R5ResourceType?
resourceTypeToString(R5ResourceType type) String