Update Show Paient, Birthdate dan BirthdateConversion
This commit is contained in:
parent
d8b68b923a
commit
20a149188c
@ -82,7 +82,17 @@ class Patient extends Controller {
|
||||
} else {
|
||||
|
||||
$patient["Age"] = $this->calculateAgeFromBirthdate($patient["Birthdate"]);
|
||||
$patient["Birthdate"] = date("d-m-Y", strtotime($patient["Birthdate"]));
|
||||
|
||||
$date = \DateTime::createFromFormat('Y-m-d H:i', $patient["Birthdate"]);
|
||||
if ($date) {
|
||||
// Simpan versi format database
|
||||
$patient["Birthdate"] = $date->format('Y-m-d H:i');
|
||||
|
||||
// Simpan versi format tampilan
|
||||
$patient["BirthdateConversion"] = $date->format('j M Y');
|
||||
} else {
|
||||
$patient["BirthdateConversion"] = null; // Jika parsing gagal
|
||||
}
|
||||
|
||||
if ($patient['LinkTo'] != null) {
|
||||
|
||||
@ -249,7 +259,6 @@ class Patient extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// OK - Done
|
||||
// public function update($InternalPID = null) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user