Update CustodianID

This commit is contained in:
mikael-zakaria 2025-08-25 10:35:05 +07:00
parent 59a64c876c
commit adccdcfd73

View File

@ -101,9 +101,11 @@ class Patient extends Controller {
if ($patient['Custodian'] != null) {
$custodianId = (int) $patient['Custodian'];
$patientCustodian = $this->db->table('patient')
->select('InternalPID, PatientID')
->where('InternalPID', (int) $InternalPID)
->where('InternalPID', $custodianId)
->get()
->getResultArray();
$patient["Custodian"] = $patientCustodian == [] ? null : $patientCustodian[0];