PatientPreviewResponse.fromJson constructor
Crea una instancia a partir del sub-objeto patient del JSON de ingreso.
Implementation
factory PatientPreviewResponse.fromJson(Map<String, dynamic> json) {
return PatientPreviewResponse(
patientId: json['patientId'] as String,
name: json['name'] as String,
surname: json['surname'] as String,
birthdate: DateTime.parse(json['birthdate'] as String),
sex: json['sex'].toString(),
);
}