当前位置: 首页>>代码示例>>PHP>>正文


PHP Patient::find方法代码示例

本文整理汇总了PHP中Patient::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Patient::find方法的具体用法?PHP Patient::find怎么用?PHP Patient::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Patient的用法示例。


在下文中一共展示了Patient::find方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * Display a listing of diagonosticprocedures
  *
  * @return Response
  */
 public function index()
 {
     $patient_id = Input::get('id');
     $patient = Patient::find($patient_id);
     $appointments = $patient->appointments()->has('diagonosticprocedure')->get();
     return View::make('diagonosticprocedures.index', compact('appointments'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:12,代码来源:DiagonosticproceduresController.php

示例2: index

 /**
  * Display a listing of checkupfees
  *
  * @return Response
  */
 public function index()
 {
     $patient_id = Input::get('id');
     $patient = Patient::find($patient_id);
     $appointments = $patient->appointments()->has('checkupfee')->get();
     return View::make('checkupfees.index', compact('appointments'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:12,代码来源:CheckupfeesController.php

示例3: create

 public function create()
 {
     $user = Confide::user();
     //throw new Exception($user);
     if (Request::isMethod('GET')) {
         $patient = Patient::find($user->id);
         return View::make('home/patient/create', compact('user', 'patient'));
     } elseif (Request::isMethod('POST')) {
         // Create a new Appointment with the given data
         $user = Confide::user();
         $user->fill(Input::all());
         $user->save();
         // If patient already exists in system
         $patient = Patient::find($user->id);
         if ($patient != null) {
             // Retreive Patient
         } else {
             // Create a new account for the Patient
             $account = new Account();
             $account->patient_id = $user->id;
             $account->save();
             // Create a new Patient
             $patient = new Patient();
             $patient->fill(Input::all());
             //$patient->dob = new Date();
             $patient->user_id = $user->id;
             $patient->save();
         }
         return Redirect::route('home.index');
     }
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:31,代码来源:PatientController.php

示例4: getIndex

 public function getIndex()
 {
     $user = Confide::user();
     if (!$user->isStaff() && Patient::find($user->id) == null) {
         return Redirect::route('patient.create');
     } else {
         return View::make('home/index', compact('user'));
     }
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:9,代码来源:HomeController.php

示例5: create

 /**
  * Display a form for creating a new Test.
  *
  * @return Response
  */
 public function create($patientID = 0)
 {
     if ($patientID == 0) {
         $patientID = Input::get('patient_id');
     }
     $testTypes = TestType::where('orderable_test', 1)->orderBy('name', 'asc')->get();
     $patient = Patient::find($patientID);
     //Load Test Create View
     return View::make('test.create')->with('testtypes', $testTypes)->with('patient', $patient);
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:15,代码来源:TestController.php

示例6: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //
     $p = Patient::find($id);
     if ($p) {
         return Helpers::Show($p);
     } else {
         return Helpers::Mgs("Error {$id} Incorrecto");
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:16,代码来源:DoctorController.php

示例7: testGetGender

 public function testGetGender()
 {
     $data = array(array('patient_number' => '6666', 'name' => 'Paul Mamboleo', 'dob' => '1930-07-05', 'gender' => '0', 'email' => 'mambo@saharara.com', 'address' => 'Godric Hollows', 'phone_number' => '+189012402938', 'created_at' => '0000-00-00', 'updated_at' => '0000-00-00'), array('patient_number' => '5555', 'name' => 'Akellus Judith Pocos Black', 'dob' => '1900-07-05', 'gender' => '1', 'email' => 'buildandt@saharara.com', 'address' => '12 Grimmauld Place', 'phone_number' => '+18966602938', 'created_at' => '0000-00-00', 'updated_at' => '0000-00-00'));
     Patient::insert($data);
     $patientSaved = Patient::orderBy('id', 'desc')->take(2)->get()->toArray();
     $patientfemale = Patient::find($patientSaved[1]['id']);
     $patientmale = Patient::find($patientSaved[0]['id']);
     $this->assertEquals('F', $patientfemale->getGender());
     $this->assertEquals('M', $patientmale->getGender());
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:10,代码来源:PatientModelTest.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     // $id= $_GET['id'];
     $id = Input::get('id');
     $patient = Patient::find($id);
     //echo $patient;
     $UpdateHs = $patient->UpdateHs()->get();
     //$UpdateHs = UpdateHs::all();
     return View::make('nurse.layouts.nursePmr', compact('UpdateHs'));
     //        return View::make('nurse.layouts.nursePmr');
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:16,代码来源:NurseController.php

示例9: listCons

 public function listCons()
 {
     //        return Redirect::back();
     //        $id= Input::get('id');
     //        $patients = Patient::find($id);
     //   $Consumptions = $patients->Consumptions()->get();
     //   $id= $_GET['id'];
     $id = Input::get('id');
     $patients = Patient::find($id);
     //        return Redirect::back();
     $Consumptions = $patients->Consumptions()->get();
     return \Illuminate\Support\Facades\View::make('consumptions.listcons', compact('Consumptions'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:13,代码来源:ConsumptionsController.php

示例10: editOldPatientindb

 /**
  * Store a newly created resource in storage.
  * POST /search
  *
  * @return Response
  */
 public function editOldPatientindb()
 {
     $destinationPath = public_path('patient_image/');
     $link_address = "/view/patients_managment/appointment";
     $patient_id = null;
     $rules = ['field_id' => 'required', 'field_name' => 'required', 'field_dob' => 'required', 'field_gender' => 'required', 'field_religion' => 'required', 'field_visitNo' => 'required'];
     $data = Input::all();
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator);
     } else {
         if (!Input::hasFile('field_image')) {
             $patient = Patient::find($data['field_id']);
             $patient->name = $data['field_name'];
             $patient->dob = $data['field_dob'];
             $patient->gender = $data['field_gender'];
             $patient->religion = $data['field_religion'];
             $patient->no_of_visit = $data['field_visitNo'];
             if ($patient->save()) {
                 return View::make('SearchResult')->with('title', 'search result')->with('name', $data['field_name'])->with('dob', $data['field_dob'])->withSuccess('Update Successful');
             } else {
                 return Redirect::back()->withErrors("Something went wrong, please try again");
             }
         } else {
             $photo_fileName = null;
             if (Input::hasFile('field_image')) {
                 $photo = Input::file('field_image');
                 $photo_fileName = strtotime(date('Y-m-d H:i:s')) . md5($photo->getClientOriginalName()) . "." . $photo->getClientOriginalExtension();
                 $photo->move($destinationPath, $photo_fileName);
             }
             $patient = Patient::find($data['field_id']);
             $patient->name = $data['field_name'];
             $patient->dob = $data['field_dob'];
             $patient->gender = $data['field_gender'];
             $patient->religion = $data['field_religion'];
             $patient->no_of_visit = $data['field_visitNo'];
             $patient->image = $photo_fileName;
             if ($patient->save()) {
                 return View::make('SearchResult')->with('title', 'search result')->with('name', $data['field_name'])->with('dob', $data['field_dob'])->withSuccess('Update Successful');
             } else {
                 return Redirect::back()->withErrors("Something went wrong, please try again");
             }
         }
     }
 }
开发者ID:Nishikanto,项目名称:Website,代码行数:51,代码来源:SearchController.php

示例11: showAll

 public function showAll($requestID = null)
 {
     $user = Confide::user();
     $patient = Patient::find($requestID);
     $patient = Patient::join('user', 'user.id', '=', 'patient.user_id')->where('patient.user_id', '=', $user->id)->first();
     if ($user->isStaff() && $requestID !== null) {
         // If weare requesting a patient's appointments and we are Staff
         $appointments = Appointment::where('patient_id', '=', $requestID)->get();
         $patient = Patient::join('user', 'user.id', '=', 'patient.user_id')->where('patient.user_id', '=', $requestID)->first();
     } else {
         $appointments = Appointment::where('patient_id', '=', $user->id)->get();
     }
     foreach ($appointments as $appointment) {
         $doctor = User::find($appointment->staff_id);
         $appointment->doctor = $doctor->first_name . ' ' . $doctor->last_name;
     }
     return View::make('home/appointment/show-all', compact('user', 'appointments', 'patient'));
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:18,代码来源:AppointmentController.php

示例12: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $bill = new bill();
     //        $bill->patient_id =\Illuminate\Support\Facades\Input::get('patient');
     $patient = Patient::find(Input::get('patient'));
     $bill->patient_id = $patient->id;
     $bill->save();
     if (Input::has('room')) {
         $bill->room_charges = Input::get('room');
         $bill->save();
     } else {
         $bill->room_charges = 'N/A';
         $bill->save();
     }
     if (Input::has('bed')) {
         $bill->bed_charges = Input::get('bed');
         $bill->save();
     } else {
         $bill->bed_charges = 'N/A';
         $bill->save();
     }
     $bill->operation_charges = Input::get('operation');
     $bill->save();
     $bill->meal_charges = Input::get('meal');
     $bill->save();
     $bill->medicine_charges = Input::get('medicine');
     $bill->save();
     $bill->total_charges = Input::get('total');
     $bill->save();
     if (Input::get('note') == '') {
         $bill->note = 'N/A';
     } else {
         $bill->note = Input::get('note');
     }
     $bill->save();
     $bill->bill_id = "B0" . $bill->id;
     $bill->save();
     return Redirect::route('bill.index');
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:44,代码来源:BillsController.php

示例13: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     $id = $_GET['id'];
     //        $patient->bed = Input::get('bed');
     $patient = Patient::find($id);
     //        echo $id;
     \Illuminate\Support\Facades\DB::update("update beds set status ='active' where id='{$patient->bed}'");
     \Illuminate\Support\Facades\DB::update("update rooms set status ='active' where id='{$patient->room}'");
     \Illuminate\Support\Facades\DB::table('bills')->where('patient_id', $id)->delete();
     \Illuminate\Support\Facades\DB::table('consumptions')->where('patient_id', $id)->delete();
     //        \Illuminate\Support\Facades\DB::table('bills')->where($patient,'id')
     //        $bill->delete();
     $patient->delete();
     return Redirect::route('ipd.index');
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:21,代码来源:IPDController.php

示例14: index

 /**
  * Display a listing of previousdiseases
  *
  * @return Response
  */
 public function index()
 {
     $patient_id = Input::get('id');
     $patient = Patient::find($patient_id);
     return View::make('previousdiseases.index', compact('patient'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:11,代码来源:PreviousdiseasesController.php

示例15: date

        $id = Input::get('id');
        $appointment = Appointment::findOrFail($id);
        $tests = $appointment->labtests()->where('total_fee', '!=', 0)->get();
        $patient = $appointment->patient;
        $date = date('j F, Y', strtotime($appointment->date));
        $time = date('H:i:s', strtotime($appointment->time));
        $doctor_name = $appointment->employee->name;
        $sum = 0;
        foreach ($tests as $test) {
            $sum += $test->total_fee;
        }
        return View::make('printables.test_invoice_print', compact('sum', 'tests', 'date', 'time', 'doctor_name', 'patient'));
    });
    Route::get('pdf_record', function () {
        $id = Input::get('id');
        $patient = Patient::find($id);
        $appointments = $patient->appointments()->get();
        $flag = "pdf_record";
        return View::make('appointment_based_data.appointments', compact('appointments', 'flag'));
    });
    Route::get('pdf', 'HomeController@pdf_record');
    //    Ajax Requests
    Route::get('getSlots', 'TimeslotsController@getFreeSlots');
    //****************************************************************//
});
//Roles
// 1- Administrator
// 2- Doctor
// 3- Accountant
// 4- Receptionist
// 5- Lab Manager
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:31,代码来源:routes.php


注:本文中的Patient::find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。