示例#1
0
 /**
  * Display a listing of Tests. Factors in filter parameters
  * The search string may match: patient_number, patient name, test type name, specimen ID or visit ID
  *
  * @return Response
  */
 public function index()
 {
     $fromRedirect = Session::pull('fromRedirect');
     if ($fromRedirect) {
         $input = Session::get('TESTS_FILTER_INPUT');
     } else {
         $input = Input::except('_token');
     }
     $searchString = isset($input['search']) ? $input['search'] : '';
     $testStatusId = isset($input['test_status']) ? $input['test_status'] : '';
     $dateFrom = isset($input['date_from']) ? $input['date_from'] : '';
     $dateTo = isset($input['date_to']) ? $input['date_to'] : '';
     // Search Conditions
     if ($searchString || $testStatusId || $dateFrom || $dateTo) {
         $testSet = Test::search($searchString, $testStatusId, $dateFrom, $dateTo);
         if (count($tests) == 0) {
             Session::flash('message', trans('messages.empty-search'));
         }
     } else {
         // List all the active tests
         $testSet = Test::orderBy('time_created', 'DESC');
     }
     // Create Test Statuses array. Include a first entry for ALL
     $testStatus = array('all') + TestStatus::all()->lists('name', 'id')->toArray();
     foreach ($testStatus as $key => $value) {
         $testStatus[$key] = trans("messages.{$value}");
     }
     // Pagination
     $testSet = $testSet->paginate(config('blis.page-items'))->appends($input);
     //	Barcode
     $barcode = Barcode::first();
     // Load the view and pass it the tests
     return view('test.index', compact('testSet', 'testStatus', 'barcode'))->withInput($input);
 }
示例#2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($id)
 {
     //	Get item
     $item = Item::find($id);
     //	Barcode
     $barcode = Barcode::first();
     //Load the view and pass the stocks
     return View::make('inventory.stock.index')->with('item', $item)->with('barcode', $barcode);
 }
示例#3
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //show a Item
     $item = Item::find($id);
     //	Barcode
     $barcode = Barcode::first();
     //show the view and pass the $item to it
     return view('inventory.item.show')->with('item', $item)->with('barcode', $barcode);
 }
示例#4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     // Constants for use
     $format = ['ean8', 'ean13', 'code11', 'code39', 'code128', 'codabar', 'std25', 'int25', 'code93'];
     $width = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
     $height = ['5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80'];
     $font = ['5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39'];
     //	Get variables for use
     $encoding_format = self::keyval($format);
     $barcode_width = self::keyval($width);
     $barcode_height = self::keyval($height);
     $text_size = self::keyval($font);
     //	Get already set barcode
     $barcode = Barcode::first();
     return view('barcode.index')->with('encoding_format', $encoding_format)->with('barcode_width', $barcode_width)->with('barcode_height', $barcode_height)->with('text_size', $text_size)->with('barcode', $barcode);
 }