copyWith method

Patient copyWith({
  1. String? id,
  2. Meta? meta,
  3. Uri? implicitRules,
  4. Language? language,
  5. Narrative? text,
  6. FixedList<Resource>? contained,
  7. FixedList<Extension>? extension,
  8. FixedList<Extension>? modifierExtension,
  9. FixedList<Identifier>? identifier,
  10. bool? active,
  11. FixedList<HumanName>? name,
  12. FixedList<ContactPoint>? telecom,
  13. AdministrativeGender? gender,
  14. DateTime? birthDate,
  15. BooleanOrDateTimeChoice? deceased,
  16. FixedList<Address>? address,
  17. MaritalStatus? maritalStatus,
  18. BooleanOrIntegerChoice? multipleBirth,
  19. FixedList<Attachment>? photo,
  20. FixedList<BackboneElement>? contact,
  21. FixedList<BackboneElement>? communication,
  22. FixedList<Reference>? generalPractitioner,
  23. Reference? managingOrganization,
  24. FixedList<BackboneElement>? link,
})

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

Implementation

Patient copyWith({
  String? id,
  Meta? meta,
  Uri? implicitRules,
  Language? language,
  Narrative? text,
  FixedList<Resource>? contained,
  FixedList<Extension>? extension,
  FixedList<Extension>? modifierExtension,
  FixedList<Identifier>? identifier,
  bool? active,
  FixedList<HumanName>? name,
  FixedList<ContactPoint>? telecom,
  AdministrativeGender? gender,
  DateTime? birthDate,
  BooleanOrDateTimeChoice? deceased,
  FixedList<Address>? address,
  MaritalStatus? maritalStatus,
  BooleanOrIntegerChoice? multipleBirth,
  FixedList<Attachment>? photo,
  FixedList<BackboneElement>? contact,
  FixedList<BackboneElement>? communication,
  FixedList<Reference>? generalPractitioner,
  Reference? managingOrganization,
  FixedList<BackboneElement>? link,
}) =>
    Patient(
      id: id ?? this.id,
      meta: meta ?? this.meta,
      implicitRules: implicitRules ?? this.implicitRules,
      language: language ?? this.language,
      text: text ?? this.text,
      contained: contained ?? this.contained,
      extension: extension ?? this.extension,
      modifierExtension: modifierExtension ?? this.modifierExtension,
      identifier: identifier ?? this.identifier,
      active: active ?? this.active,
      name: name ?? this.name,
      telecom: telecom ?? this.telecom,
      gender: gender ?? this.gender,
      birthDate: birthDate ?? this.birthDate,
      deceased: deceased ?? this.deceased,
      address: address ?? this.address,
      maritalStatus: maritalStatus ?? this.maritalStatus,
      multipleBirth: multipleBirth ?? this.multipleBirth,
      photo: photo ?? this.photo,
      contact: contact ?? this.contact,
      communication: communication ?? this.communication,
      generalPractitioner: generalPractitioner ?? this.generalPractitioner,
      managingOrganization: managingOrganization ?? this.managingOrganization,
      link: link ?? this.link,
    );