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


PHP Appointment::find方法代码示例

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


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

示例1: create

 /**
  * Show the form for creating a new diagonosticprocedure
  *
  * @return Response
  */
 public function create()
 {
     $appointment = Appointment::find(Input::get('id'));
     $patient_id = $appointment->patient->id;
     $patient_id = Input::get('id');
     return View::make('diagonosticprocedures.create', compact('appointment', 'patient_id'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:12,代码来源:DiagonosticproceduresController.php

示例2: update

 /**
  * Update the specified appointment in storage.
  *
  * @param  int  $appointment_id
  * @return Response
  *
  */
 public function update($appointment_id)
 {
     $appointment = Appointment::find($appointment_id);
     $input = Input::all();
     if (isset($input['category_id'])) {
         $appointment->category_id = $input['category_id'];
     }
     if (isset($input['title'])) {
         $appointment->title = $input['title'];
     }
     if (isset($input['start'])) {
         $appointment->start = Carbon::parse($input['start'])->toDateTimeString();
     }
     if (isset($input['end'])) {
         $appointment->end = Carbon::parse($input['end'])->toDateTimeString();
     }
     $start = Carbon::parse($appointment->start);
     $end = Carbon::parse($appointment->end);
     // Check that start is before end
     if ($start->gt($end)) {
         return Response::json(array('message' => 'Start can not be after end'), 400);
     }
     $appointment->save();
     return Response::json($appointment);
 }
开发者ID:homeski,项目名称:csc436_sched,代码行数:32,代码来源:AppointmentAPIController.php

示例3: create

 /**
  * Show the form for creating a new prescription
  *
  * @return Response
  */
 public function create()
 {
     $appointment = Appointment::find(Input::get('id'));
     $patient_id = $appointment->patient->id;
     $doctors = Employee::where('role', 'Doctor')->where('status', 'Active')->get();
     $medicines = Medicine::all()->lists('name', 'id');
     return View::make('prescriptions.create', compact('medicines', 'appointment', 'patient_id', 'doctors'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:13,代码来源:PrescriptionsController.php

示例4: edit

 /**
  * Show the form for editing the specified appointment.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $doctors = Employee::where('role', 'Doctor')->where('status', 'active')->get();
     $patients = Patient::all();
     $appointment = Appointment::find($id);
     $timeslot = $appointment->timeslot->first()->where('dutyday_id', $appointment->timeslot->dutyday_id)->lists('slot', 'id');
     return View::make('appointments.edit', compact('timeslot', 'appointment', 'doctors', 'patients'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:14,代码来源:AppointmentsController.php

示例5: postDelete

 public function postDelete($id)
 {
     $event = Appointment::find($id);
     if ($event) {
         $event->delete();
         return Response::json(array('status' => 'success'));
     }
     return Response::json(array('status' => 'error'));
 }
开发者ID:joreyesl,项目名称:calendar,代码行数:9,代码来源:CalendarController.php

示例6: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $app = $this->appointment->find($id);
     if ($app) {
         $userid = $app->patient_id;
         $pfid = $app->patient_encounter_form_id;
         $pef = $this->patientencounterform->find($pfid);
         DB::statement('SET FOREIGN_KEY_CHECKS = 0');
         if ($pef) {
             $pef->delete();
         }
         $app->delete();
         DB::statement('SET FOREIGN_KEY_CHECKS = 1');
         return $this->getAppointmentsOfAUser($userid);
         /*
         			$userdata['message'] = "Appointment successfully deleted";	
         			$userdata['error'] = false;*/
     } else {
         $userdata['error'] = true;
         $userdata['message'] = "Appointment not found.";
     }
     return $userdata;
     //return Redirect::route('appointments.index');
 }
开发者ID:achyut,项目名称:Medico-backend,代码行数:30,代码来源:AppointmentsController.php

示例7: create

 /**
  * Show the form for creating a new labtest
  *
  * @return Response
  */
 public function create()
 {
     $appointment = Appointment::find(Input::get('id'));
     return View::make('labtests.create', compact('appointment'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:10,代码来源:LabtestsController.php

示例8: dataCancelAppointment

 public function dataCancelAppointment($id)
 {
     $instituteId = Session::get('institute_id');
     if (!isset($instituteId)) {
         return 'not logged';
     }
     if (!isset($id)) {
         return 'invalid';
     }
     $appointment = Appointment::find($id);
     if (is_null($appointment)) {
         return 'invalid';
     } else {
         $appointment->status = 'institute-cancelled';
         $appointment->updated_at = date('Y-m-d H:i:s');
         $appointment->save();
         return 'done';
     }
 }
开发者ID:ashutoshpandey,项目名称:dicom,代码行数:19,代码来源:InstituteController.php

示例9: getCancelAppointment

 public function getCancelAppointment()
 {
     $id = Input::get("cita_id");
     $cita = Appointment::find($id);
     $cita->state = 'not-accepted';
     $cita->save();
     if ($cita) {
         $mgs = new MgsAppointment();
         $mgs->appointment_id = $id;
         $mgs->text = "Su cita no fue aceptada";
         $mgs->save();
     }
     return Redirect::back()->withFlashMessage('Cita Cancelada');
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:14,代码来源:ClinicController.php

示例10: create

 /**
  * Show the form for creating a new checkupfee
  *
  * @return Response
  */
 public function create()
 {
     $appointment = Appointment::find(Input::get('id'));
     $patient_id = $appointment->patient->id;
     return View::make('checkupfees.create', compact('appointment', 'patient_id'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:11,代码来源:CheckupfeesController.php

示例11: getEditAjaxAppointments

 public function getEditAjaxAppointments()
 {
     if (Request::ajax()) {
         //validamos el formulario
         $registerData = array('start' => Input::get('start'), 'end' => Input::get('end'));
         $rules = array('start' => 'required|min:2', 'end' => 'required|min:2');
         $messages = array('required' => 'El campo :attribute es obligatorio.', 'min' => 'El campo :attribute no puede tener menos de :min carácteres.');
         $validation = Validator::make($registerData, $rules, $messages);
         //si la validación falla redirigimos al formulario de registro con los errores
         if ($validation->fails()) {
             //como ha fallado el formulario, devolvemos los datos en formato json
             //esta es la forma de hacerlo en laravel, o una de ellas
             return Response::json(array('success' => false, 'errors' => $validation->getMessageBag()->toArray()));
             //en otro caso ingresamos al usuario en la tabla usuarios
         } else {
             $dt = Carbon::now();
             if (Input::get("start") <= $dt) {
                 return Response::json(array('success' => false));
             }
             $id = Input::get("id");
             $AgendaAppo = Appointment::find($id);
             $AgendaAppo->state = "delayed";
             $AgendaAppo->start_date = Input::get("start");
             $AgendaAppo->end_date = Input::get("end");
             $AgendaAppo->save();
             return Response::json(array('success' => true));
         }
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:29,代码来源:ClinicDoctorsController.php

示例12: showMyAppointments

 public function showMyAppointments($id)
 {
     return $id . " . ";
     $citas = Appointment::find($id);
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:5,代码来源:PatientController.php

示例13: calendar_data

 public function calendar_data()
 {
     $this->autoRender = false;
     $start_date = date('Y-m-d', $this->request->query['start']);
     $end_date = date('Y-m-d', $this->request->query['end']);
     //    debug($start_date);
     //    debug($end_date);
     App::import('Model', 'ScheduleManager.ServiceEntry');
     $serviceEntryModel = new ServiceEntry();
     $serviceEntryData = $serviceEntryModel->find('all', array('conditions' => array('ServiceEntry.booked_for >' => $start_date, 'ServiceEntry.booked_for <=' => $end_date)));
     //    debug($serviceEntryData);
     App::import('Model', 'ScheduleManager.InstallerSchedule');
     $installerScheduleModel = new InstallerSchedule();
     $installerScheduleData = $installerScheduleModel->find('all', array('conditions' => array('InstallerSchedule.start_install >' => $start_date, 'InstallerSchedule.start_install <=' => $end_date)));
     //    debug($installerScheduleData);
     App::import('Model', 'ScheduleManager.Appointment');
     $appointmentModel = new Appointment();
     $start_date = date('Y-m-d H:i:s', $this->request->query['start']);
     $end_date = date('Y-m-d H:i:s', $this->request->query['end']);
     $appointmentData = $appointmentModel->find('all', array('conditions' => array('Appointment.start_date >' => $start_date, 'Appointment.end_date <=' => $end_date)));
     //    debug($appointmentData);
     $calendarData = array();
     $calendarData = $this->Calendar->dataFormat('Service', $serviceEntryData, $calendarData);
     $calendarData = $this->Calendar->dataFormat('Installation', $installerScheduleData, $calendarData);
     $calendarData = $this->Calendar->dataFormat('Appointment', $appointmentData, $calendarData);
     echo json_encode($calendarData);
 }
开发者ID:khaled-saiful-islam,项目名称:zen_v1.0,代码行数:27,代码来源:AppointmentsController.php


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