Update Rules Patient Index menampilkan Gender

This commit is contained in:
mikael-zakaria 2025-11-24 15:38:12 +07:00
parent 5a3eb5a63d
commit e342df68f6

View File

@ -23,7 +23,8 @@ class PatientModel extends BaseModel {
public function getPatients($filters = []) {
$qname = "CONCAT_WS(' ', IFNULL(Prefix,''), IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''), IFNULL(NameMaiden,''), IFNULL(Suffix,''))";
$this->select("InternalPID, PatientID, $qname as FullName, Gender, Birthdate, EmailAddress1 as Email, MobilePhone");
$this->select("InternalPID, PatientID, $qname as FullName, vs.VDesc as Gender, Birthdate, EmailAddress1 as Email, MobilePhone");
$this->join('valueset vs', 'vs.vid = Gender', 'left');
if (!empty($filters['Name'])) {
$this->like($qname, $filters['Name'], 'both');