/**
  * @param $id
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function patient($id)
 {
     $patient = Patient::where('BCI_ID', $id)->first();
     $eventSpecialties = new EventSpecialtyCode();
     if ($patient == null) {
         return view('frontend/patient/notFound');
     }
     $patientEvents = $patient->getEvents();
     // This will be used to return patient data
     // The id here will be inserted into the template to post to the above function
     // That will then be rendered onto the patients page
     return view('frontend/patient/timeline', array('patientId' => $id, 'patientEvents' => $patientEvents, 'timeLineClusterMaxSettings' => TimeLineSettings::where('setting_code', 'cluster_max')->first(), 'activeSpecialties' => $eventSpecialties->getEnabledEventSpecialties(), 'patient' => $patient));
 }
 /**
  * @param Request $request
  * @return mixed
  */
 public function updateClusterMaxSetting(Request $request)
 {
     $timeLine = TimeLineSettings::where('setting_code', $request->input('setting_code'))->first();
     $return = $timeLine->updateTimeLineMaxCluster($request->input('timeLineClusterMax'));
     return response(json_encode($return['responseBody']), $return['status'])->header('Content-Type', 'application/json');
 }