PatientPreviewResponse class

DTO resumido de paciente embebido dentro de AdmissionResponse.

Contiene solo los datos básicos necesarios para mostrar al paciente en listados de ingresos sin realizar una consulta adicional.

Constructors

PatientPreviewResponse({required String patientId, required String name, required String surname, required DateTime birthdate, required String sex})
PatientPreviewResponse.fromJson(Map<String, dynamic> json)
Crea una instancia a partir del sub-objeto patient del JSON de ingreso.
factory

Properties

age int
Calcula la edad actual del paciente a partir de birthdate, ajustando si aún no ha cumplido años en el año en curso.
no setter
birthdate DateTime
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
patientId String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sex String
final
surname String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited