Пример #1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if ($this->auth->guest()) {
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             return redirect()->guest('auth/login');
         }
     } else {
         if ($this->auth->user()->doctor) {
             $queue = Queue::all();
             $patient = Patient::all();
             return view('doctor.dashboard')->with('queue', $queue)->with('patient', $patient);
         } else {
             if ($this->auth->user()->admin) {
                 $queue = Queue::all();
                 $patient = Patient::all();
                 return view('doctor.dashboard')->with('queue', $queue)->with('patient', $patient);
             } else {
                 $queue = Queue::all();
                 $patient = Patient::all();
                 return view('staff.dashboard')->with('queue', $queue)->with('patient', $patient);
             }
         }
     }
     return $next($request);
 }
Пример #2
0
 public function getPatientsList()
 {
     $patients = Patient::all()->toArray();
     $response = ["count" => Patient::all()->count(), "patients" => $patients];
     header('Content-type: application/json');
     die(json_encode($response));
 }
Пример #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //$data['patient'] = patient::all();
     $patient = Patient::all();
     $queue = Queue::all();
     return view('patient.list', ['patient' => $patient])->with('queue', $queue);
 }
Пример #4
0
 public function removeQueue(Request $request)
 {
     $queue = Queue::all();
     $patient = Patient::all();
     //insert delete from queue
     $queue = Queue::find($request->input('pt_id'));
     //$queue->delete();
     return redirect()->action('StaffController@index')->with('queue', $queue)->with('patient', $patient);
     //return view('staff.dashboard');
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $gender = Input::get('gender');
     //dd($gender);
     $verified = Input::get('verified');
     $data = array();
     if (empty($gender) && empty($verified)) {
         //menampilkan semua gender
         $data['content'] = \App\Patient::all();
         $data['gender'] = null;
         $data['verified'] = null;
         //dd($data['content']);
     } else {
         $data['content'] = \App\Patient::where('gender', $gender)->where('verified', $verified)->get();
         $data['gender'] = $gender;
         $data['verified'] = $verified;
         //dd($verified);
     }
     $data['list_gender'][0] = 'L';
     $data['list_gender'][1] = 'P';
     return view('pages.admin.patient.index')->with('data', $data);
 }
 public function index()
 {
     //
     $details = Patient::all();
     return view('pages.patient.patient', compact('details'));
 }
 public function index()
 {
     $data = Patient::all();
     return view('patient/index')->with('data', $data);
 }
Пример #8
0
 public function index()
 {
     $queue = Queue::all();
     $patient = Patient::all();
     return view('doctor.dashboard')->with('queue', $queue)->with('patient', $patient);
 }
Пример #9
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(nurseRequest $Request)
 {
     patientTriage::create($Request->all());
     $patient = Patient::all();
     return view('nurse.nurseIndex', compact('patient'));
 }
Пример #10
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(DoctorRequest $Request)
 {
     patientHistory::create($Request->all());
     $patient = Patient::all();
     return view('doctor.dashDoctor', compact('patient'));
 }
Пример #11
0
 public function index()
 {
     $userDetails = \Auth::user();
     $patient = Patient::all();
     return view('app.dash', compact('patient', 'userDetails'));
 }