Update Patient, semua variabel menjadi PascalCase mengikuti Penamaan Kolom DB
This commit is contained in:
parent
b77d88487c
commit
06f62fdde0
@ -107,44 +107,44 @@ class Patient extends Controller {
|
|||||||
$input = $this->request->getJSON(true);
|
$input = $this->request->getJSON(true);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
"PatientID" => $input['patientID'] ?? null,
|
"PatientID" => $input['PatientID'] ?? null,
|
||||||
"AlternatePID" => $input['alternateID'] ?? null,
|
"AlternatePID" => $input['AlternateID'] ?? null,
|
||||||
"Prefix" => $input['title'] ?? null,
|
"Prefix" => $input['Title'] ?? null,
|
||||||
"NameFirst" => $input['nameFirst'] ?? null,
|
"NameFirst" => $input['NameFirst'] ?? null,
|
||||||
"NameMiddle" => $input['nameMiddle'] ?? null,
|
"NameMiddle" => $input['NameMiddle'] ?? null,
|
||||||
"NameMaiden" => $input['nameMaiden'] ?? null,
|
"NameMaiden" => $input['NameMaiden'] ?? null,
|
||||||
"NameLast" => $input['nameLast'] ?? null,
|
"NameLast" => $input['NameLast'] ?? null,
|
||||||
"Suffix" => $input['suffix'] ?? null,
|
"Suffix" => $input['Suffix'] ?? null,
|
||||||
"NameAlias" => null,
|
"NameAlias" => null,
|
||||||
"Gender" => ((int) $input['gender']) ?? null, //int
|
"Gender" => ((int) $input['Gender']) ?? null,
|
||||||
"PlaceOfBirth" => $input['placeOfBirthdate'] ?? null,
|
"PlaceOfBirth" => $input['PlaceOfBirthdate'] ?? null,
|
||||||
"BirthDate" => $input['birthdate'] ?? null,
|
"BirthDate" => $input['Birthdate'] ?? null,
|
||||||
"Street_1" => $input['street1'] ?? null,
|
"Street1" => $input['Street1'] ?? null,
|
||||||
"Street_2" => $input['street2'] ?? null,
|
"Street2" => $input['Street2'] ?? null,
|
||||||
"Street_3" => null,
|
"Street3" => null,
|
||||||
"City" => $input['city'] ?? null,
|
"City" => $input['City'] ?? null,
|
||||||
"Province" => $input['province'] ?? null,
|
"Province" => $input['Province'] ?? null,
|
||||||
"ZIP" => null,
|
"ZIP" => null,
|
||||||
"CountryID" => null, // int
|
"CountryID" => null,
|
||||||
"EmailAddress1" => $input['email1'] ?? null,
|
"EmailAddress1" => $input['Email1'] ?? null,
|
||||||
"EmailAddress2" => $input['email2'] ?? null,
|
"EmailAddress2" => $input['Email2'] ?? null,
|
||||||
"Phone" => $input['phone'] ?? null,
|
"Phone" => $input['Phone'] ?? null,
|
||||||
"Mobilephone" => $input['mobile'] ?? null,
|
"MobilePhone" => $input['Mobile'] ?? null,
|
||||||
"Mother" => $input['mother'] ?? null, //int
|
"Mother" => $input['Mother'] ?? null,
|
||||||
"Accountnumber" => null, //int
|
"AccountNumber" => null,
|
||||||
"RaceID" => ((int) $input['race']) ?? null, //int
|
"RaceID" => ((int) $input['Race']) ?? null,
|
||||||
"MaritalStatus" => $input['maritalStatus'] ?? null,
|
"MaritalStatus" => $input['MaritalStatus'] ?? null,
|
||||||
"ReligionID" => ((int)$input['religion']) ?? null, //int
|
"ReligionID" => ((int) $input['Religion']) ?? null,
|
||||||
"EthnicID" => ((int)$input['ethnic']) ?? null, //int
|
"EthnicID" => ((int) $input['Ethnic']) ?? null,
|
||||||
"Citizenship" => null,
|
"Citizenship" => null,
|
||||||
"DeathIndicator" => ((int)$input['death']) ?? null, //int
|
"DeathIndicator" => ((int) $input['Death']) ?? null,
|
||||||
"DeathDateTime" => $input['deathTime'] ?? null,
|
"DeathDateTime" => $input['DeathTime'] ?? null,
|
||||||
"CreateDate" => date('Y-m-d H:i:s')
|
"CreateDate" => date('Y-m-d H:i:s'),
|
||||||
|
|
||||||
// "LinkTo" => $input['linkTo'] ?? null,
|
"LinkTo" => $input['LinkTo'] ?? null,
|
||||||
// "PatientComment" => $input['patientComment'] ?? null,
|
"PatientComment" => $input['PatientComment'] ?? null,
|
||||||
// "IdentityIDType" => $input['identityIDType'] ?? null,
|
"IdentityIDType" => $input['IdentityIDType'] ?? null,
|
||||||
// "IdentityID" => $input['identityID'] ?? null,
|
"IdentityID" => $input['IdentityID'] ?? null
|
||||||
];
|
];
|
||||||
|
|
||||||
$rules = [
|
$rules = [
|
||||||
@ -196,44 +196,44 @@ class Patient extends Controller {
|
|||||||
$input = $this->request->getJSON(true);
|
$input = $this->request->getJSON(true);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
"PatientID" => $input['patientID'] ?? null,
|
"PatientID" => $input['PatientID'] ?? null,
|
||||||
"AlternatePID" => $input['alternateID'] ?? null,
|
"AlternatePID" => $input['AlternateID'] ?? null,
|
||||||
"Prefix" => $input['title'] ?? null,
|
"Prefix" => $input['Title'] ?? null,
|
||||||
"NameFirst" => $input['nameFirst'] ?? null,
|
"NameFirst" => $input['NameFirst'] ?? null,
|
||||||
"NameMiddle" => $input['nameMiddle'] ?? null,
|
"NameMiddle" => $input['NameMiddle'] ?? null,
|
||||||
"NameMaiden" => $input['nameMaiden'] ?? null,
|
"NameMaiden" => $input['NameMaiden'] ?? null,
|
||||||
"NameLast" => $input['nameLast'] ?? null,
|
"NameLast" => $input['NameLast'] ?? null,
|
||||||
"Suffix" => $input['suffix'] ?? null,
|
"Suffix" => $input['Suffix'] ?? null,
|
||||||
"NameAlias" => null,
|
"NameAlias" => null,
|
||||||
"Gender" => ((int) $input['gender']) ?? null, //int
|
"Gender" => ((int) $input['Gender']) ?? null, //int
|
||||||
"PlaceOfBirth" => $input['placeOfBirthdate'] ?? null,
|
"PlaceOfBirth" => $input['PlaceOfBirthdate'] ?? null,
|
||||||
"BirthDate" => $input['birthdate'] ?? null,
|
"BirthDate" => $input['BirthDate'] ?? null,
|
||||||
"Street_1" => $input['street1'] ?? null,
|
"Street1" => $input['Street1'] ?? null,
|
||||||
"Street_2" => $input['street2'] ?? null,
|
"Street2" => $input['Street2'] ?? null,
|
||||||
"Street_3" => null,
|
"Street3" => null,
|
||||||
"City" => $input['city'] ?? null,
|
"City" => $input['City'] ?? null,
|
||||||
"Province" => $input['province'] ?? null,
|
"Province" => $input['Province'] ?? null,
|
||||||
"ZIP" => null,
|
"ZIP" => null,
|
||||||
"CountryID" => null, // int
|
"CountryID" => null, // int
|
||||||
"EmailAddress1" => $input['email1'] ?? null,
|
"EmailAddress1" => $input['Email1'] ?? null,
|
||||||
"EmailAddress2" => $input['email2'] ?? null,
|
"EmailAddress2" => $input['Email2'] ?? null,
|
||||||
"Phone" => $input['phone'] ?? null,
|
"Phone" => $input['Phone'] ?? null,
|
||||||
"Mobilephone" => $input['mobile'] ?? null,
|
"MobilePhone" => $input['Mobile'] ?? null,
|
||||||
"Mother" => ((int) $input['mother']) ?? null, //int
|
"Mother" => ((int) $input['Mother']) ?? null, //int
|
||||||
"Accountnumber" => null, //int
|
"AccountNumber" => null, //int
|
||||||
"RaceID" => ((int) $input['race']) ?? null, //int
|
"RaceID" => ((int) $input['Race']) ?? null, //int
|
||||||
"MaritalStatus" => $input['maritalStatus'] ?? null,
|
"MaritalStatus" => $input['MaritalStatus'] ?? null,
|
||||||
"ReligionID" => ((int)$input['religion']) ?? null, //int
|
"ReligionID" => ((int) $input['Religion']) ?? null, //int
|
||||||
"EthnicID" => ((int)$input['ethnic']) ?? null, //int
|
"EthnicID" => ((int) $input['Ethnic']) ?? null, //int
|
||||||
"Citizenship" => null,
|
"Citizenship" => null,
|
||||||
"DeathIndicator" => ((int)$input['death']) ?? null, //int
|
"DeathIndicator" => ((int) $input['Death']) ?? null, //int
|
||||||
"DeathDateTime" => $input['deathTime'] ?? null,
|
"DeathDateTime" => $input['DeathTime'] ?? null,
|
||||||
"CreateDate" => date('Y-m-d H:i:s')
|
"CreateDate" => date('Y-m-d H:i:s'),
|
||||||
|
|
||||||
// "LinkTo" => $input['linkTo'] ?? null,
|
"LinkTo" => $input['LinkTo'] ?? null,
|
||||||
// "PatientComment" => $input['patientComment'] ?? null,
|
"PatientComment" => $input['PatientComment'] ?? null,
|
||||||
// "IdentityIDType" => $input['identityIDType'] ?? null,
|
"IdentityIDType" => $input['IdentityIDType'] ?? null,
|
||||||
// "IdentityID" => $input['identityID'] ?? null,
|
"IdentityID" => $input['IdentityID'] ?? null
|
||||||
];
|
];
|
||||||
|
|
||||||
$rules = [
|
$rules = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user