예제 #1
0
 public static function getNewHospitalNo()
 {
     $maxHN = Patient::max('hospitalNo');
     if ($maxHN == null) {
         $newHN = 1;
     } else {
         $newHN = $maxHN + 1;
     }
     return $newHN;
 }