unknown 3 gadi atpakaļ
vecāks
revīzija
d1ced7bb05

+ 16 - 0
app/Http/Controllers/HomeController.php

@@ -190,6 +190,22 @@ class HomeController extends Controller
 
     private function dashboard_MCP(Request $request){
 
+
+        $keyNumbers = [];
+
+        // Patients // SELECT * FROM client WHERE mcp_pro_id = :me.id;
+        // New Patients Awaiting Visit // SELECT * FROM client WHERE mcp_pro_id = :me.id AND hasMcpDoneOnboardingVisit != 'YES';
+        // Notes Pending Signature // SELECT * FROM note WHERE hcp_pro_id = :me.id AND is_cancelled IS NOT TRUE AND has_hcp_signed IS NOT TRUE;
+        // Notes Pending Billing // SELECT * FROM note WHERE hcp_pro_id = :me.id AND is_cancelled IS NOT TRUE AND has_hcp_signed IS TRUE AND is_billing_marked_done IS FALSE;
+        // Reports Pending Signature // SELECT * FROM incoming_report WHERE hcp_pro_id = :me.id AND isEntryError IS NOT TRUE AND hasHcpProSigned IS NOT TRUE;
+        // Patients w/o Appointments // SELECT * FROM client WHERE mcp_pro_id = :me.id AND client.next_mcp_appointment_date < today();
+        // Patients Overdue for Visit // SELECT * FROM client WHERE mcp_pro_id = :me.id AND client.next_expected_mcp_visit_date < today();
+        // Cancelled Appts. Pending Review // SELECT * FROM appointment WHERE hcp_pro_id = :me.id AND status = 'REJECTED' AND wasAcknowledgedByAppointmentPro IS NOT TRUE;
+        // Cancelled Bills Pending Review // SELECT * FROM bill WHERE bill_service_type = 'NOTE' AND is_cancelled IS TRUE AND isCancellationAcknowledged IS FALSE;
+        // Cancelled Supply Orders Pending Review // SELECT * FROM supply_order WHERE signed_by_pro_id = :me.id AND is_cancelled IS TRUE AND isCancellationAcknowledged IS NOT TRUE;
+        // ERx & Orders Pending Signature // SELECT * FROM erx WHERE hcp_pro_id = :me.id AND pro_declared_status <> 'CANCELLED' AND hasHcpProSigned IS NOT TRUE;
+        // Supply Orders Pending Signature // SELECT supply_order.id FROM supply_order WHERE signed_by_pro_id IS NOT TRUE AND is_cancelled IS NOT TRUE AND created_by_pro_id = :me.id;
+
         $performer = $this->performer();
         $pro = $performer->pro;
         $performerProID = $performer->pro->id;

+ 6 - 0
app/Http/Controllers/McpController.php

@@ -38,12 +38,16 @@ class McpController extends Controller
     public function patients(Request $request)
     {
         $patients = Client::paginate(5);
+        // SELECT * FROM client WHERE mcp_pro_id = :me.id
         return view('app.mcp.patients', compact('patients'));
     }
 
     public function notes(Request $request)
     {
         $notes = Note::paginate(5);
+
+        // SELECT * FROM note WHERE client_id IN (SELECT id FROM client WHERE mcp_pro_id = :me.id);
+
         return view('app.mcp.notes', compact('notes'));
     }
 
@@ -87,10 +91,12 @@ class McpController extends Controller
 
     public function new_patients_awaiting_visit(Request $request){
         $data = [];
+        // SELECT * FROM client WHERE mcp_pro_id = :me.id AND has_mcp_done_onboarding_visit != 'YES'
         return view('app.mcp.new_patients_awaiting_visit', $data);
     }
     public function notes_pending_signature(Request $request){
         $data = [];
+        // SELECT * FROM note WHERE hcp_pro_id = :me.id AND
         return view('app.mcp.notes_pending_signature', $data);
     }
     public function notes_pending_billing(Request $request){

+ 0 - 30
resources/views/app/dashboard-mcp.blade.php

@@ -280,26 +280,6 @@
                                     @include('app.mcp.dashboard.measurements')
                                 </div>
                             </div>
-                            <div class="card mb-4">
-                                <div class="card-header pl-2">
-                                    <strong>
-                                        ERx & Orders
-                                    </strong>
-                                </div>
-                                <div class="card-body">
-                                    @include('app.mcp.dashboard.erx_orders')
-                                </div>
-                            </div>
-                            <div class="card mb-4">
-                                <div class="card-header pl-2">
-                                    <strong>
-                                        Supply Orders
-                                    </strong>
-                                </div>
-                                <div class="card-body">
-                                    @include('app.mcp.dashboard.supply_orders')
-                                </div>
-                            </div>
                         </div>
                         <div class="col-md-6 mcp-theme-1">
                             <div class="card mb-4">
@@ -312,16 +292,6 @@
                                     @include('app.mcp.dashboard.notifications')
                                 </div>
                             </div>
-                            <div class="card mb-4">
-                                <div class="card-header pl-2">
-                                    <strong>
-                                        Reports
-                                    </strong>
-                                </div>
-                                <div class="card-body">
-                                    @include('app.mcp.dashboard.reports')
-                                </div>
-                            </div>
                             <div class="card mb-4">
                                 <div class="card-header pl-2">
                                     <strong>

+ 1 - 3
resources/views/app/mcp/notes.blade.php

@@ -19,7 +19,6 @@
                 <thead class="bg-light">
                     <tr>
                         <th class="px-3 border-0">Date</th>
-                        <th class="px-3 border-0">HCP</th>
                         <th class="px-3 border-0">Patient</th>
                         <th class="px-3 border-0">ICD</th>
                         <th class="px-3 border-0">Status</th>
@@ -29,9 +28,8 @@
                     @foreach($notes as $note)
                     <tr>
                         <td>{{-- date --}} -</td>
-                        <td>{{-- hcp --}} -</td>
                         <td>{{-- patient --}} - </td>
-                        <td>{{-- ICD --}} - </td>                        
+                        <td>{{-- ICD --}} - </td>
                         <td>{{-- Status --}} - </td>
                     </tr>
                     @endforeach