copyWith method

Hospitalization copyWith({
  1. AdmitSource? admitSource,
  2. Period? period,
  3. FixedList<CodeableConcept>? specialCourtesy,
  4. FixedList<Location>? destination,
  5. FixedList<Reference>? preAdmissionIdentifier,
})

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

Implementation

Hospitalization copyWith({
  AdmitSource? admitSource,
  Period? period,
  FixedList<CodeableConcept>? specialCourtesy,
  FixedList<Location>? destination,
  FixedList<Reference>? preAdmissionIdentifier,
}) =>
    Hospitalization(
      admitSource: admitSource ?? this.admitSource,
      period: period ?? this.period,
      specialCourtesy: specialCourtesy ?? this.specialCourtesy,
      destination: destination ?? this.destination,
      preAdmissionIdentifier:
          preAdmissionIdentifier ?? this.preAdmissionIdentifier,
    );