Update Index untuk search2
This commit is contained in:
parent
475c10a6d6
commit
77a5746fe9
@ -28,14 +28,14 @@ class Patient extends Controller {
|
||||
$builder = $this->db->table('patient');
|
||||
|
||||
if ($Name !== null) {
|
||||
$sql = "LOWER(CONCAT_WS(' ', IFNULL(prefix,''), IFNULL(name_first,''), IFNULL(name_middle,''), IFNULL(name_last,''), IFNULL(name_maiden,''), IFNULL(suffix,'')))";
|
||||
$sql = "LOWER(CONCAT_WS(' ', IFNULL(Prefix,''), IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''), IFNULL(NameMaiden,''), IFNULL(Suffix,'')))";
|
||||
$rawSql = new RawSql($sql);
|
||||
$builder->like($rawSql, $Name, 'both');
|
||||
}
|
||||
if ($InternalPID !== null) { $builder->where('InternalPID', $InternalPID); }
|
||||
if ($PatientID !== null) { $builder->where('PatientID', $PatientID); }
|
||||
// if ($AlternatePID !== null) { $builder->where('AlternatePID', $pat_altnum); }
|
||||
if ($BirthDate !== null) { $builder->where('BirthDate', $pat_dob); }
|
||||
if ($BirthDate !== null) { $builder->where('BirthDate', $BirthDate); }
|
||||
/*
|
||||
if ($startDate !== null || $endDate !== null) {
|
||||
$builder->join('requests', 'pat_id=patients.pat_id','left');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user