/**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $dataAccess = new DataAccess();
     $dataAccessVisit = new VisitsMng();
     $userid = $dataAccess->userIdByEmail($request->email);
     $list = ['userid' => $userid, 'email' => $request->email, 'height' => $request->height, 'weight' => $request->weight, 'date' => "{$request->year}-{$request->month}-{$request->day}", 'symptoms' => $request->symptoms, 'allergies' => $request->allergies, 'time' => $request->time, 'end_time' => $request->end_time];
     $dataAccessVisit->visitSave($list);
     return redirect('/clientlist');
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $dataAccess = new VisitsMng();
     $visits = $dataAccess->getVisits($id);
     return Response::json(array('error' => false, 'data' => $visits), 200);
 }