Update Patient, update penamaan variabel Emailaddress[n] menjadi EmailAddress[n]

This commit is contained in:
mikael-zakaria 2025-08-06 12:58:30 +07:00
parent 7d9cbb1b69
commit abab1f4479

View File

@ -21,7 +21,7 @@ class Patient extends Controller {
$BirthDate = $this->request->getVar('BirthDate');
$qname = "LOWER(CONCAT_WS(' ', IFNULL(Prefix,''), IFNULL(NameFirst,''), IFNULL(NameMiddle,''), IFNULL(NameLast,''), IFNULL(NameMaiden,''), IFNULL(Suffix,'')))";
$builder = $this->db->table('patient');
$builder->select("InternalPID, PatientID, $qname as FullName, Gender, BirthDate, Emailaddress1 as Email, MobilePhone");
$builder->select("InternalPID, PatientID, $qname as FullName, Gender, BirthDate, EmailAddress1 as Email, MobilePhone");
if ($Name !== null) {
$sql = $qname;
$rawSql = new RawSql($sql);
@ -115,8 +115,8 @@ class Patient extends Controller {
"Province" => $input['Province'] ?? null,
"ZIP" => $input['ZIP'] ?? null,
"CountryID" => isset($input['CountryID']) ? (int) $input['CountryID'] : null,
"Emailaddress1" => $input['Emailaddress1'] ?? null,
"Emailaddress2" => $input['Emailaddress2'] ?? null,
"EmailAddress1" => $input['EmailAddress1'] ?? null,
"EmailAddress2" => $input['EmailAddress2'] ?? null,
"Phone" => $input['Phone'] ?? null,
"MobilePhone" => $input['MobilePhone'] ?? null,
"Mother" => $input['Mother'] ?? null,
@ -207,8 +207,8 @@ class Patient extends Controller {
"Province" => $input['Province'] ?? null,
"ZIP" => $input['ZIP'] ?? null,
"CountryID" => isset($input['CountryID']) ? (int) $input['CountryID'] : null,
"Emailaddress1" => $input['Emailaddress1'] ?? null,
"Emailaddress2" => $input['Emailaddress2'] ?? null,
"EmailAddress1" => $input['EmailAddress1'] ?? null,
"EmailAddress2" => $input['EmailAddress2'] ?? null,
"Phone" => $input['Phone'] ?? null,
"MobilePhone" => $input['MobilePhone'] ?? null,
"Mother" => $input['Mother'] ?? null,
@ -299,7 +299,7 @@ class Patient extends Controller {
'NameFirst', 'NameLast', 'NameMiddle',
'PatientID', 'AlternatePID', 'BirthDate', 'PlaceOfBirth',
'Street_1', 'Street_2', 'Street_3', 'City', 'Province', 'ZIP',
'Emailaddress1', 'Emailaddress2', 'Phone', 'MobilePhone', 'Mother', 'AccountNumber'
'EmailAddress1', 'EmailAddress2', 'Phone', 'MobilePhone', 'Mother', 'AccountNumber'
];
$datas = [];