feat/things-munaja: fix enc status

This commit is contained in:
2025-12-05 09:26:00 +07:00
parent 786107ddd9
commit dbe8e34d07
15 changed files with 252 additions and 82 deletions
+5 -2
View File
@@ -502,9 +502,12 @@ export function mapResponseToEncounter(result: any): any {
? result.visitDate
: result.registeredAt || result.patient?.registeredAt || null,
adm_employee_id: result.adm_employee_id || 0,
appointment_doctor_id: result.appointment_doctor_id || null,
responsible_doctor_id: result.responsible_doctor_id || null,
adm_employee: result.adm_employee || null,
responsible_nurse_code: result.responsible_nurse_code || null,
responsible_nurse: result.responsible_nurse || null,
appointment_doctor_code: result.appointment_doctor_code || null,
appointment_doctor: result.appointment_doctor || null,
responsible_doctor_code: result.responsible_doctor_id || null,
responsible_doctor: result.responsible_doctor || null,
refSource_name: result.refSource_name || null,
appointment_id: result.appointment_id || null,
+6 -2
View File
@@ -9,7 +9,11 @@ export async function getEncounterData(id: string | number) {
try {
const dataRes = await getDetail(id, {
includes:
'patient,patient-person,patient-person-addresses,unit,Appointment_Doctor,Appointment_Doctor-employee,Appointment_Doctor-employee-person,Responsible_Doctor,Responsible_Doctor-employee,Responsible_Doctor-employee-person',
'patient,patient-person,patient-person-addresses,unit,' +
'Adm_Employee,Adm_Employee,Adm_Employee-Person,' +
'Responsible_Nurse,Responsible_Nurse-Employee,Responsible_Nurse-Employee-Person,' +
'Appointment_Doctor,Appointment_Doctor-employee,Appointment_Doctor-employee-person,' +
'Responsible_Doctor,Responsible_Doctor-employee,Responsible_Doctor-employee-person',
})
const dataResBody = dataRes.body ?? null
const result = dataResBody?.data ?? null
@@ -29,4 +33,4 @@ export async function getEncounterData(id: string | number) {
data = null
}
return data
}
}