/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $doctors = Doctor::select(DB::raw("CONCAT(doctor_fname,' ', doctor_mname,' ',doctor_lname,' - ',(select med_specialty from medspecialties where id = medspecialty_id) ) AS full_name, id"))->lists('full_name', 'id'); $beds = Bed::vacant(); $visit_type = array('in_patient' => 'in patient', 'out_patient' => 'out patient'); //dd($doctors,$beds); return view('pages.Visit.admit', compact('doctors', 'beds', 'visit_type')); }
public function fullname($id) { $doctor = Doctor::select(\DB::raw("CONCAT(doctor_fname,' ', doctor_mname,' ',doctor_lname) AS full_name"))->where('id', '=', $id)->lists('full_name')->first(); return $doctor; }
/** * Returns view for Creating Formal Physician Login * * @return previous view */ public function doctorCredentials() { $user = Session::get('user'); $formalDoctors = Doctor::select(DB::raw("CONCAT(first_name ,' ' ,last_name) AS full_name, id"))->where('formal', 1)->where('has_account', 0)->lists('full_name', 'id'); return View::make('doctor.doctorcredentials')->with('user', $user)->with('doctors', $formalDoctors); }