FHM09062601IBL - fix registrationv3: IDNumber_bidx simpan ke M_PatientNIK_bidx, search e[3] pakai JSON_CONTAINS NIK_bidx
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -464,8 +464,8 @@ class Registrationv3 extends MY_Controller
|
||||
->set('M_PatientM_IdTypeID', $prm['M_PatientM_IdTypeID'])
|
||||
->set('M_PatientIDNumber', $this->_mask_id($prm['M_PatientIDNumber']))
|
||||
->set('M_PatientIDNumber_enc', $enc->encrypt($prm['M_PatientIDNumber']))
|
||||
->set('M_PatientNIK_bidx', $enc->search_bidx($prm['M_PatientIDNumber'] ?? ''))
|
||||
->set('M_PatientNIK', $prm['M_PatientNIK'])
|
||||
->set('M_PatientNIK_bidx', $enc->search_bidx($prm['M_PatientNIK'] ?? ''))
|
||||
->set('M_PatientNote', $prm['M_PatientNote'])
|
||||
->set('M_PatientJabatan', $prm['M_PatientJabatan'])
|
||||
->set('M_PatientKedudukan', $prm['M_PatientKedudukan'])
|
||||
@@ -554,8 +554,8 @@ class Registrationv3 extends MY_Controller
|
||||
'M_PatientM_IdTypeID' => $prm['M_PatientM_IdTypeID'],
|
||||
'M_PatientIDNumber' => $this->_mask_id($prm['M_PatientIDNumber']),
|
||||
'M_PatientIDNumber_enc' => $enc->encrypt($prm['M_PatientIDNumber']),
|
||||
'M_PatientNIK_bidx' => $enc->search_bidx($prm['M_PatientIDNumber'] ?? ''),
|
||||
'M_PatientNIK' => $prm['M_PatientNIK'],
|
||||
'M_PatientNIK_bidx' => $enc->search_bidx($prm['M_PatientNIK'] ?? ''),
|
||||
'M_PatientNote' => $prm['M_PatientNote'],
|
||||
'M_PatientJabatan' => $prm['M_PatientJabatan'],
|
||||
'M_PatientKedudukan' => $prm['M_PatientKedudukan'],
|
||||
@@ -867,7 +867,7 @@ class Registrationv3 extends MY_Controller
|
||||
$where_name = '';
|
||||
$where_hp = '';
|
||||
$where_dob = '';
|
||||
$where_idnum = '';
|
||||
$where_nik = '';
|
||||
$where_snorm = '';
|
||||
|
||||
if (!empty($prm['noreg'])) {
|
||||
@@ -911,8 +911,13 @@ class Registrationv3 extends MY_Controller
|
||||
}
|
||||
|
||||
if (!empty($e[3]) && mb_strlen(trim($e[3])) >= 3) {
|
||||
$id_esc = $this->db_onedev->escape_like_str(trim($e[3]));
|
||||
$where_idnum = "AND M_PatientIDNumber LIKE '%{$id_esc}%'";
|
||||
$toks = $this->ibl_encryptor->query_tokens($e[3]);
|
||||
$conds = [];
|
||||
foreach ($toks as $tok) {
|
||||
$tok_esc = $this->db_onedev->escape_str($tok);
|
||||
$conds[] = "JSON_CONTAINS(M_PatientNIK_bidx, '\"$tok_esc\"')";
|
||||
}
|
||||
if ($conds) $where_nik = 'AND (' . implode(' AND ', $conds) . ')';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,7 +949,7 @@ class Registrationv3 extends MY_Controller
|
||||
{$where_name}
|
||||
{$where_hp}
|
||||
{$where_dob}
|
||||
{$where_idnum}
|
||||
{$where_nik}
|
||||
GROUP BY M_PatientID
|
||||
LIMIT {$number_limit} OFFSET {$number_offset}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user