Hospitalization constructor
Hospitalization({
- AdmitSource? admitSource,
- Period? period,
- FixedList<
CodeableConcept> ? specialCourtesy, - FixedList<
Location> ? destination, - FixedList<
Reference> ? preAdmissionIdentifier,
Constructs a new Hospitalization with optional admitSource, period, specialCourtesy, destination, and preAdmissionIdentifier.
Implementation
Hospitalization({
AdmitSource? admitSource,
Period? period,
FixedList<CodeableConcept>? specialCourtesy,
FixedList<Location>? destination,
FixedList<Reference>? preAdmissionIdentifier,
}) : this.fromJson(
JsonObject({
if (admitSource != null) admitSourceField.name: admitSource.json,
if (period != null) periodField.name: period.json,
if (specialCourtesy != null)
specialCourtesyField.name:
JsonArray.unmodifiable(specialCourtesy.map((e) => e.json)),
if (destination != null)
destinationField.name:
JsonArray.unmodifiable(destination.map((e) => e.json)),
if (preAdmissionIdentifier != null)
preAdmissionIdentifierField.name: JsonArray.unmodifiable(
preAdmissionIdentifier.map((e) => e.json),
),
}),
);