copyWith method

Observation copyWith({
  1. String? id,
  2. Meta? meta,
  3. FixedList<Identifier>? identifier,
  4. FixedList<Reference>? basedOn,
  5. FixedList<Reference>? partOf,
  6. String? status,
  7. FixedList<CodeableConcept>? category,
  8. CodeableConcept? code,
  9. Reference? subject,
  10. Reference? encounter,
  11. DateTime? effectiveDateTime,
  12. Period? effectivePeriod,
  13. Timing? effectiveTiming,
  14. DateTime? effectiveInstant,
  15. DateTime? issued,
  16. Quantity? valueQuantity,
  17. CodeableConcept? valueCodeableConcept,
  18. String? valueString,
  19. bool? valueBoolean,
  20. int? valueInteger,
  21. Range? valueRange,
  22. Ratio? valueRatio,
  23. SampledData? valueSampledData,
  24. Time? valueTime,
  25. DateTime? valueDateTime,
  26. Period? valuePeriod,
  27. CodeableConcept? dataAbsentReason,
  28. FixedList<CodeableConcept>? interpretation,
  29. FixedList<Annotation>? note,
  30. CodeableConcept? bodySite,
  31. CodeableConcept? method,
  32. Reference? specimen,
  33. Reference? device,
  34. FixedList<ObservationReferenceRange>? referenceRange,
  35. FixedList<Reference>? hasMember,
  36. FixedList<Reference>? derivedFrom,
  37. FixedList<ObservationComponent>? component,
  38. FixedList<CodeableReference>? complicatedBy,
  39. FixedList<CodeableReference>? contextOfUse,
})

Creates a copy of the Observation instance and allows for non-destructive mutation.

Implementation

Observation copyWith({
  String? id,
  Meta? meta,
  FixedList<Identifier>? identifier,
  FixedList<Reference>? basedOn,
  FixedList<Reference>? partOf,
  String? status,
  FixedList<CodeableConcept>? category,
  CodeableConcept? code,
  Reference? subject,
  Reference? encounter,
  DateTime? effectiveDateTime,
  Period? effectivePeriod,
  Timing? effectiveTiming,
  DateTime? effectiveInstant,
  DateTime? issued,
  Quantity? valueQuantity,
  CodeableConcept? valueCodeableConcept,
  String? valueString,
  bool? valueBoolean,
  int? valueInteger,
  Range? valueRange,
  Ratio? valueRatio,
  SampledData? valueSampledData,
  Time? valueTime,
  DateTime? valueDateTime,
  Period? valuePeriod,
  CodeableConcept? dataAbsentReason,
  FixedList<CodeableConcept>? interpretation,
  FixedList<Annotation>? note,
  CodeableConcept? bodySite,
  CodeableConcept? method,
  Reference? specimen,
  Reference? device,
  FixedList<ObservationReferenceRange>? referenceRange,
  FixedList<Reference>? hasMember,
  FixedList<Reference>? derivedFrom,
  FixedList<ObservationComponent>? component,
  FixedList<CodeableReference>? complicatedBy,
  FixedList<CodeableReference>? contextOfUse,
}) =>
    Observation(
      id: id ?? this.id,
      meta: meta ?? this.meta,
      identifier: identifier ?? this.identifier,
      basedOn: basedOn ?? this.basedOn,
      partOf: partOf ?? this.partOf,
      status: status ?? this.status,
      category: category ?? this.category,
      code: code ?? this.code,
      subject: subject ?? this.subject,
      encounter: encounter ?? this.encounter,
      effectiveDateTime: effectiveDateTime ?? this.effectiveDateTime,
      effectivePeriod: effectivePeriod ?? this.effectivePeriod,
      effectiveTiming: effectiveTiming ?? this.effectiveTiming,
      effectiveInstant: effectiveInstant ?? this.effectiveInstant,
      issued: issued ?? this.issued,
      valueQuantity: valueQuantity ?? this.valueQuantity,
      valueCodeableConcept: valueCodeableConcept ?? this.valueCodeableConcept,
      valueString: valueString ?? this.valueString,
      valueBoolean: valueBoolean ?? this.valueBoolean,
      valueInteger: valueInteger ?? this.valueInteger,
      valueRange: valueRange ?? this.valueRange,
      valueRatio: valueRatio ?? this.valueRatio,
      valueSampledData: valueSampledData ?? this.valueSampledData,
      valueTime: valueTime ?? this.valueTime,
      valueDateTime: valueDateTime ?? this.valueDateTime,
      valuePeriod: valuePeriod ?? this.valuePeriod,
      dataAbsentReason: dataAbsentReason ?? this.dataAbsentReason,
      interpretation: interpretation ?? this.interpretation,
      note: note ?? this.note,
      bodySite: bodySite ?? this.bodySite,
      method: method ?? this.method,
      specimen: specimen ?? this.specimen,
      device: device ?? this.device,
      referenceRange: referenceRange ?? this.referenceRange,
      hasMember: hasMember ?? this.hasMember,
      derivedFrom: derivedFrom ?? this.derivedFrom,
      component: component ?? this.component,
      complicatedBy: complicatedBy ?? this.complicatedBy,
      contextOfUse: contextOfUse ?? this.contextOfUse,
    );