Exemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $request = Topup::find($id);
     $items = Item::lists('name', 'id');
     $item = $request->item_id;
     $testCategories = TestCategory::lists('name', 'id');
     $testCategory = $request->test_category_id;
     return view('inventory.request.edit')->with('testCategories', $testCategories)->with('items', $items)->with('item', $item)->with('request', $request)->with('testCategory', $testCategory);
 }
Exemplo n.º 2
0
 /**
  * turnaroundTime() function returns the turnaround time blade with necessary contents
  *
  * @return Response
  */
 public function turnaroundTime()
 {
     $today = date('Y-m-d');
     $from = Input::get('start');
     $to = Input::get('end');
     if (!$to) {
         $to = $today;
     }
     $testCategory = Input::get('section_id');
     $testType = Input::get('test_type');
     $labSections = ['' => trans('messages.select-lab-section')] + TestCategory::lists('name', 'id')->all();
     $interval = Input::get('period');
     $error = null;
     $accredited = array();
     if (!$testType) {
         $error = trans('messages.select-test-type');
     }
     if ($testCategory) {
         $testTypes = TestCategory::find($testCategory)->testTypes->lists('name', 'id');
     } else {
         $testTypes = array("" => "");
     }
     if ($from || $to) {
         if (strtotime($from) > strtotime($to) || strtotime($from) > strtotime($today) || strtotime($to) > strtotime($today)) {
             $error = trans('messages.check-date-range');
         } else {
             $toPlusOne = date_add(new DateTime($to), date_interval_create_from_date_string('1 day'));
             Session::flash('fine', '');
         }
     }
     $resultset = self::getTatStats($from, $to, $testCategory, $testType, $interval);
     return view('reports.tat.index')->with('labSections', $labSections)->with('testTypes', $testTypes)->with('resultset', $resultset)->with('testCategory', $testCategory)->with('testType', $testType)->with('interval', $interval)->with('error', $error)->with('accredited', $accredited)->withInput(Input::all());
 }
Exemplo n.º 3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //Get the Analyser
     $analyser = Analyser::find($id);
     // Get lab sections
     $testcategories = TestCategory::lists('name', 'id');
     // Get selected category
     $testcategory = $analyser->test_category_id;
     // Feed-sources RS232,TCP/IP, MSACCESS,HTTP,TEXT
     $feedsources = [Analyser::RS232 => 'RS232', Analyser::TCPIP => 'TCP/IP', Analyser::MSACCESS => 'MSACCESS', Analyser::HTTP => 'HTTP', Analyser::TEXT => 'TEXT'];
     // selected source
     $feedsource = $analyser->feed_source;
     // Communication-types
     $commtypes = [Analyser::UNIDIRECTIONAL => 'Uni-directional', Analyser::BIDIRECTIONAL => 'Bi-directional'];
     // selected comm-type
     $commtype = $analyser->comm_type;
     //Open the Edit View and pass to it the $analyser
     return view('config.analyser.edit', compact('analyser', 'testcategories', 'testcategory', 'feedsources', 'feedsource', 'commtypes', 'commtype'));
 }
Exemplo n.º 4
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //Get the testtype
     $testtype = TestType::find($id);
     $measures = Measure::all();
     $measuretype = MeasureType::all()->sortBy('id');
     $specimentypes = SpecimenType::orderBy('name')->get();
     $testcategory = $testtype->testCategory->id;
     $testcategories = TestCategory::lists('name', 'id');
     $organisms = Organism::orderBy('name')->get();
     //Open the Edit View and pass to it the $testtype
     return view('testtype.edit', compact('testtype', 'testcategories', 'testcategory', 'measures', 'measuretype', 'specimentypes', 'organisms'));
 }