copyWith method

Encounter copyWith({
  1. FixedList<Identifier>? identifier,
  2. EncounterStatus? status,
  3. CodeableConcept? classCode,
  4. FixedList<CodeableConcept>? type,
  5. CodeableConcept? serviceType,
  6. CodeableConcept? priority,
  7. Reference? subject,
  8. FixedList<Participant>? participant,
  9. Period? period,
  10. Length? length,
  11. FixedList<CodeableConcept>? reasonCode,
  12. Hospitalization? hospitalization,
  13. FixedList<Reference>? location,
})

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

Implementation

Encounter copyWith({
  FixedList<Identifier>? identifier,
  EncounterStatus? status,
  CodeableConcept? classCode,
  FixedList<CodeableConcept>? type,
  CodeableConcept? serviceType,
  CodeableConcept? priority,
  Reference? subject,
  FixedList<Participant>? participant,
  Period? period,
  Length? length,
  FixedList<CodeableConcept>? reasonCode,
  Hospitalization? hospitalization,
  FixedList<Reference>? location,
}) =>
    Encounter(
      id: id,
      meta: meta,
      identifier: identifier ?? this.identifier,
      status: status ?? this.status,
      classCode: classCode ?? this.classCode,
      type: type ?? this.type,
      serviceType: serviceType ?? this.serviceType,
      priority: priority ?? this.priority,
      subject: subject ?? this.subject,
      participant: participant ?? this.participant,
      period: period ?? this.period,
      length: length ?? this.length,
      reasonCode: reasonCode ?? this.reasonCode,
      hospitalization: hospitalization ?? this.hospitalization,
      location: location ?? this.location,
    );