|
@@ -41,21 +41,6 @@ class NoteController extends Controller
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // load tickets created on note->effective_date for patient
|
|
|
|
- $ticketsOnNote = Ticket::where('client_id', $patient->id)
|
|
|
|
- ->where('is_entry_error', false)
|
|
|
|
- ->where('note_id', $note->id)
|
|
|
|
- ->get();
|
|
|
|
-
|
|
|
|
- // other open tickets as of today
|
|
|
|
- $otherOpenTickets = Ticket::where('client_id', $patient->id)
|
|
|
|
- ->where('is_entry_error', false)
|
|
|
|
- ->where('is_open', true)
|
|
|
|
- ->where(function ($query) use ($note) {
|
|
|
|
- $query->where('note_id', '<>', $note->id)->orWhereNull('note_id'); // weird, but just the <> isn't working!
|
|
|
|
- })
|
|
|
|
- ->get();
|
|
|
|
-
|
|
|
|
// load supplyOrders created on note->effective_date for patient
|
|
// load supplyOrders created on note->effective_date for patient
|
|
$supplyOrdersOnNote = SupplyOrder::where('client_id', $patient->id)
|
|
$supplyOrdersOnNote = SupplyOrder::where('client_id', $patient->id)
|
|
->where('is_cancelled', false)
|
|
->where('is_cancelled', false)
|
|
@@ -67,8 +52,6 @@ class NoteController extends Controller
|
|
->where('is_cancelled', false)
|
|
->where('is_cancelled', false)
|
|
->where('note_id', '<>', $note->id)
|
|
->where('note_id', '<>', $note->id)
|
|
->get();
|
|
->get();
|
|
-
|
|
|
|
- $templates = $this->filterClientDocuments(get_doc_templates());
|
|
|
|
|
|
|
|
$companyProIDs = DB::select('SELECT company_pro_id FROM company_pro_document WHERE related_client_id = ?', [$patient->id]);
|
|
$companyProIDs = DB::select('SELECT company_pro_id FROM company_pro_document WHERE related_client_id = ?', [$patient->id]);
|
|
|
|
|
|
@@ -81,9 +64,8 @@ class NoteController extends Controller
|
|
|
|
|
|
return view('app.patient.note.dashboard', compact('patient', 'note',
|
|
return view('app.patient.note.dashboard', compact('patient', 'note',
|
|
'allSections',
|
|
'allSections',
|
|
- 'ticketsOnNote', 'otherOpenTickets',
|
|
|
|
'companyPros',
|
|
'companyPros',
|
|
- 'supplyOrdersOnNote', 'otherOpenSupplyOrders', 'templates'));
|
|
|
|
|
|
+ 'supplyOrdersOnNote', 'otherOpenSupplyOrders'));
|
|
}
|
|
}
|
|
|
|
|
|
private function filterClientDocuments($documents){
|
|
private function filterClientDocuments($documents){
|