Fix update patient

This commit is contained in:
poetrasapoetra
2025-11-28 19:43:53 +07:00
parent 214bbb0e4a
commit 6a49f09180
2 changed files with 22 additions and 9 deletions
@@ -89,6 +89,7 @@ type MPasienDto struct {
func (mp MPasienDto) ToPatient() e.Patient {
patient := e.Patient{
// TODO get patient person_id from database
Person_Id: &mp.Id,
NewBornStatus: mp.ParentNomr != nil,
RegisteredAt: parseTimeDateOnly(mp.Tgldaftar),
@@ -115,7 +116,7 @@ func (mp MPasienDto) ToPatient() e.Patient {
BirthDate: parseTimeDateOnly(mp.Tgllahir),
BirthRegency_Code: &bc,
Gender_Code: &gc,
ResidentIdentityNumber: nilEmptyString(*mp.Nip),
ResidentIdentityNumber: nilEmptyString(mp.Noktp),
PassportNumber: nilEmptyString(*mp.Paspor),
DrivingLicenseNumber: nilEmptyString(*mp.Sim),
Religion_Code: &rc,