From 32131fdaad9fc945a5144f12f218fb9319bdd367 Mon Sep 17 00:00:00 2001 From: "sas.fajri" Date: Tue, 9 Jun 2026 16:48:40 +0700 Subject: [PATCH] FHM09062601IBL - mask M_PatientDOB null di plain column, fix dob decrypt di search Co-Authored-By: Claude Sonnet 4.6 --- application/controllers/klinik/Registrationv3.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/application/controllers/klinik/Registrationv3.php b/application/controllers/klinik/Registrationv3.php index a6abe343..64d06d59 100644 --- a/application/controllers/klinik/Registrationv3.php +++ b/application/controllers/klinik/Registrationv3.php @@ -446,7 +446,7 @@ class Registrationv3 extends MY_Controller ->set('M_PatientM_TitleID', $prm['M_PatientM_TitleID']) ->set('M_PatientPrefix', $prm['M_PatientPrefix']) ->set('M_PatientSuffix', $prm['M_PatientSuffix']) - ->set('M_PatientDOB', $pdob) + ->set('M_PatientDOB', null) ->set('M_PatientDOB_enc', $enc->encrypt($dob_str)) ->set('M_PatientDOB_bidx', $enc->search_bidx($dob_str)) ->set('M_PatientM_SexID', $prm['M_PatientM_SexID']) @@ -536,7 +536,7 @@ class Registrationv3 extends MY_Controller 'M_PatientM_TitleID' => $prm['M_PatientM_TitleID'], 'M_PatientPrefix' => $prm['M_PatientPrefix'], 'M_PatientSuffix' => $prm['M_PatientSuffix'], - 'M_PatientDOB' => $pdob, + 'M_PatientDOB' => null, 'M_PatientDOB_enc' => $enc->encrypt($dob_str), 'M_PatientDOB_bidx' => $enc->search_bidx($dob_str), 'M_PatientM_SexID' => $prm['M_PatientM_SexID'], @@ -977,14 +977,16 @@ class Registrationv3 extends MY_Controller $rows[$k]['M_PatientPhone'] = $enc->decrypt($v['M_PatientPhone_enc']) ?? ''; $rows[$k]['M_PatientIDNumber'] = $enc->decrypt($v['M_PatientIDNumber_enc']) ?? ''; $rows[$k]['M_PatientNIK'] = $enc->decrypt($v['M_PatientNIK_enc']) ?? ''; - $rows[$k]['M_PatientDOB'] = $enc->decrypt($v['M_PatientDOB_enc']) ?? date('d-m-Y', strtotime($v['M_PatientDOB'])); + $dob_dec = $enc->decrypt($v['M_PatientDOB_enc']) ?? ''; + $rows[$k]['M_PatientDOB'] = $dob_dec; + $rows[$k]['dob_ina'] = $dob_dec; $rows[$k]['M_PatientAddressDescription'] = $enc->decrypt($v['M_PatientAddressDescription_enc']) ?? ''; $rows[$k]['M_PatientAddress'] = $rows[$k]['M_PatientAddressDescription']; foreach (array_keys($rows[$k]) as $col) { if (substr($col, -4) === '_enc') unset($rows[$k][$col]); } - unset($rows[$k]['M_PatientNameRaw'], $rows[$k]['M_PatientDOB']); + unset($rows[$k]['M_PatientNameRaw']); $info = $this->db_onedev->query("SELECT fn_fo_patient_visit(?) info", [$v['M_PatientID']])->row(); $rows[$k]['info'] = json_decode($info->info);