diff --git a/app/Controllers/Patient.php b/app/Controllers/Patient.php index be6d5cb..9da1406 100644 --- a/app/Controllers/Patient.php +++ b/app/Controllers/Patient.php @@ -62,6 +62,11 @@ class Patient extends Controller { try { $patient = $this->db->table('patient') + ->select('patient.*, country.Country as CountryName, race.Race as RaceName, religion.Religion as ReligionName, ethnic.Ethnic as EthnicName') + ->join('country', 'country.IntCountryID = patient.IntCountryID', 'left') + ->join('race', 'race.RaceID = patient.RaceID', 'left') + ->join('religion', 'religion.ReligionID = patient.ReligionID', 'left') + ->join('ethnic', 'ethnic.EthnicID = patient.EthnicID', 'left') ->where('InternalPID', (int) $InternalPID) ->get() ->getRowArray(); @@ -401,7 +406,7 @@ class Patient extends Controller { $formattedAge .= "{$diff->m} Bulan "; } if ($diff->d > 0){ - $formattedAge .= "{$diff->d} Hari "; + $formattedAge .= "{$diff->d} Hari"; } return $formattedAge;