Substance class
Substance A homogeneous material with a definite composition.
- Mixed in types
- Annotations
-
- @freezed
Constructors
-
Substance({@Default(R4ResourceType.Substance) @JsonKey(unknownEnumValue: R4ResourceType.Substance) R4ResourceType resourceType, @JsonKey(includeFromJson: true, includeToJson: false) int? dbId, @JsonKey(name: 'id') String? fhirId, FhirMeta? meta, FhirUri? implicitRules, @JsonKey(name: '_implicitRules') Element? implicitRulesElement, FhirCode? language, @JsonKey(name: '_language') Element? languageElement, Narrative? text, List<
Resource> ? contained, @JsonKey(name: 'extension') List<FhirExtension> ? extension_, List<FhirExtension> ? modifierExtension, List<Identifier> ? identifier, FhirCode? status, @JsonKey(name: '_status') Element? statusElement, List<CodeableConcept> ? category, required CodeableConcept code, String? description, @JsonKey(name: '_description') Element? descriptionElement, List<SubstanceInstance> ? instance, List<SubstanceIngredient> ? ingredient}) -
Substance A homogeneous material with a definite composition.
constfactory
-
Substance.fromJson(Map<
String, dynamic> json) -
Factory constructor, accepts Map<String, dynamic> as an argument
factory
- Substance.fromJsonString(String source)
-
Acts like a constructor, returns a Substance, accepts a
String as an argument, mostly because I got tired of typing it out
factory
- Substance.fromYaml(dynamic yaml)
-
Factory constructor that accepts a String in YAML format as an argument
factory
Properties
-
category
→ List<
CodeableConcept> ? -
category Nutrition products can have different classifications - according to its nutritional properties, preparation methods, etc.;
no setterinherited
- code → CodeableConcept
-
no setterinherited
-
contained
→ List<
Resource> ? -
no setterinherited
-
copyWith
→ $SubstanceCopyWith<
Substance> -
no setterinherited
- dbId → int?
-
no setterinherited
- description → String?
-
no setterinherited
- descriptionElement → Element?
-
no setterinherited
-
extension_
→ List<
FhirExtension> ? -
no setterinherited
- fhirId → String?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
identifier
→ List<
Identifier> ? -
no setterinherited
- implicitRules → FhirUri?
-
no setterinherited
- implicitRulesElement → Element?
-
no setterinherited
-
ingredient
→ List<
SubstanceIngredient> ? -
no setterinherited
-
instance
→ List<
SubstanceInstance> ? -
no setterinherited
- language → FhirCode?
-
no setterinherited
- languageElement → Element?
-
no setterinherited
- meta → FhirMeta?
-
no setterinherited
-
modifierExtension
→ List<
FhirExtension> ? -
no setterinherited
- path → String
-
Local Reference for this Resource, form is "ResourceType/Id"
no setterinherited
- resourceType → R4ResourceType
-
no setterinherited
- resourceTypeString → String?
-
produce a string of the resourceType
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → FhirCode?
-
status The current state of the product.;
no setterinherited
- statusElement → Element?
-
statusElement (_status): Extensions for status;
no setterinherited
- text → Narrative?
-
no setterinherited
- thisReference → Reference
-
Convenience method to return a Reference referring to that Resource
no setterinherited
Methods
-
newId(
) → Resource -
returns the same resource with a new ID (even if there is already an ID
present)
inherited
-
newIdIfNoId(
) → Resource -
returns the same resource with a new ID if there is no current ID
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDbJson(
) → Map< String, dynamic> -
The normal toJson ignores the dbId, and produces the fhirId as the id
However, if you're going to use this as a database entry, you have to
switch those two ids
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toJsonString(
) → String -
Another convenience method because more and more I'm transmitting FHIR
data as a String and not a Map
override
-
toString(
) → String -
A string representation of this object.
inherited
-
toYaml(
) → String -
Produces a Yaml formatted String version of the object
inherited
-
updateVersion(
{FhirMeta? oldMeta}) → Resource -
Updates the meta field of this Resource, updates the meta.lastUpdated
field, adds 1 to the version number
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited