Exemple #1
0
 public static function worksheetSamples($id)
 {
     $ret = LiveData::leftjoin('vl_samples AS s', 's.id', '=', 'sampleID')->leftjoin('vl_patients As p', 'p.id', '=', 'patientID')->leftjoin('vl_facilities AS f', 'f.id', '=', 's.facilityID')->leftjoin('vl_hubs AS h', 'h.id', '=', 'f.hubID')->leftjoin('vl_facility_printing AS fp', 'fp.sample_id', '=', 's.id')->select('lrCategory', 'lrEnvelopeNumber', 'lrNumericID', 'sampleID', 'formNumber', 'collectionDate', 'receiptDate', 'hub', 'facility', 'artNumber', 'otherID', 'fp.id As fp_id')->from('vl_samples_worksheet')->where('worksheetID', '=', $id)->orderby('lrEnvelopeNumber', 'ASC')->orderby('lrNumericID', 'ASC')->get();
     return $ret;
 }
 public function getData()
 {
     $results = LiveData::leftjoin('vl_samples AS s', 's.id', '=', 'p.sample_id')->leftjoin('vl_facilities AS f', 'f.id', '=', 's.facilityID')->leftjoin('vl_hubs AS h', 'h.id', '=', 'f.hubID')->select('printed_by', 'printed_at', 'formNumber', 'facility', 'hub')->from('vl_facility_printing AS p')->where('printed', 'YES')->orderby('printed_at', 'DESC');
     return \Datatables::of($results)->make(true);
 }