Update Patient kolom BirthDate menjadi Birthdate
This commit is contained in:
parent
abab1f4479
commit
9124b49813
@ -18,10 +18,10 @@ class Patient extends Controller {
|
||||
$InternalPID = $this->request->getVar('InternalPID');
|
||||
$PatientID = $this->request->getVar('PatientID');
|
||||
$Name = $this->request->getVar('Name');
|
||||
$BirthDate = $this->request->getVar('BirthDate');
|
||||
$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);
|
||||
@ -29,7 +29,7 @@ class Patient extends Controller {
|
||||
}
|
||||
if ($InternalPID !== null) { $builder->where('InternalPID', $InternalPID); }
|
||||
if ($PatientID !== null) { $builder->like('PatientID', $PatientID, 'both'); }
|
||||
if ($BirthDate !== null) { $builder->where('BirthDate', $BirthDate); }
|
||||
if ($Birthdate !== null) { $builder->where('Birthdate', $Birthdate); }
|
||||
|
||||
$filteredPatients = $builder->get()->getResultArray();
|
||||
|
||||
@ -107,7 +107,7 @@ class Patient extends Controller {
|
||||
"NameAlias" => null,
|
||||
"Gender" => isset($input['Gender']) ? (int) $input['Gender'] : null,
|
||||
"PlaceOfBirth" => $input['PlaceOfBirth'] ?? null,
|
||||
"BirthDate" => $input['BirthDate'] ?? null,
|
||||
"Birthdate" => $input['Birthdate'] ?? null,
|
||||
"Street_1" => $input['Street_1'] ?? null,
|
||||
"Street_2" => $input['Street_2'] ?? null,
|
||||
"Street_3" => null,
|
||||
@ -199,7 +199,7 @@ class Patient extends Controller {
|
||||
"NameAlias" => null,
|
||||
"Gender" => isset($input['Gender']) ? (int) $input['Gender'] : null,
|
||||
"PlaceOfBirth" => $input['PlaceOfBirth'] ?? null,
|
||||
"BirthDate" => $input['BirthDate'] ?? null,
|
||||
"Birthdate" => $input['Birthdate'] ?? null,
|
||||
"Street_1" => $input['Street_1'] ?? null,
|
||||
"Street_2" => $input['Street_2'] ?? null,
|
||||
"Street_3" => null,
|
||||
@ -241,7 +241,7 @@ class Patient extends Controller {
|
||||
// "NameAlias" => null,
|
||||
// "Gender" => ((int) $input['Gender']) ?? null, //int
|
||||
// "PlaceOfBirth" => $input['PlaceOfBirthdate'] ?? null,
|
||||
// "BirthDate" => $input['BirthDate'] ?? null,
|
||||
// "Birthdate" => $input['Birthdate'] ?? null,
|
||||
// "Street1" => $input['Street1'] ?? null,
|
||||
// "Street2" => $input['Street2'] ?? null,
|
||||
// "Street3" => null,
|
||||
@ -297,7 +297,7 @@ class Patient extends Controller {
|
||||
|
||||
$allowedUpdateFields = [
|
||||
'NameFirst', 'NameLast', 'NameMiddle',
|
||||
'PatientID', 'AlternatePID', 'BirthDate', 'PlaceOfBirth',
|
||||
'PatientID', 'AlternatePID', 'Birthdate', 'PlaceOfBirth',
|
||||
'Street_1', 'Street_2', 'Street_3', 'City', 'Province', 'ZIP',
|
||||
'EmailAddress1', 'EmailAddress2', 'Phone', 'MobilePhone', 'Mother', 'AccountNumber'
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user