AdmissionResponse class
DTO de respuesta de la API para un ingreso hospitalario.
Incluye el paciente embebido como PatientPreviewResponse.
Las fechas se reciben como cadenas ISO-8601 generadas por
LocalDateTime de Spring Boot y se parsean a DateTime.
Constructors
- AdmissionResponse({required String admissionId, required PatientPreviewResponse patient, required String serviceId, required String assignedDoctorId, DateTime? dischargeDate, int? hospitalizationLength, String? principalDiagnosis, String? medicalHistory, String? allergies, String? chronicTreatment, int? basalBarthel, int? roomNumber, required DateTime createdAt, required String createdBy, DateTime? lastModifiedAt, String? lastModifiedBy})
-
AdmissionResponse.fromJson(Map<
String, dynamic> json) -
Parsea el JSON de la API incluyendo el sub-objeto
patienty las fechas ISO-8601 opcionales (dischargeDate,lastModifiedAt).factory
Properties
- admissionId → String
-
final
- allergies → String?
-
final
- assignedDoctorId → String
-
final
- basalBarthel → int?
-
final
- chronicTreatment → String?
-
final
- createdAt → DateTime
-
final
- createdBy → String
-
final
- dischargeDate → DateTime?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hospitalizationLength → int?
-
final
- lastModifiedAt → DateTime?
-
final
- lastModifiedBy → String?
-
final
- medicalHistory → String?
-
final
- patient → PatientPreviewResponse
-
final
- principalDiagnosis → String?
-
final
- roomNumber → int?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceId → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDomain(
) → Admission -
Convierte este DTO en la entidad de dominio Admission,
extrayendo el
patientIddel objeto patient embebido. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited