ソースを参照

added client memos

= 3 年 前
コミット
bbf509c17d

+ 0 - 2
app/Http/Controllers/DnaController.php

@@ -80,8 +80,6 @@ class DnaController extends Controller
                 break;
         }
 
-
-
         $patients = $patients->orderBy('created_at', 'DESC')->paginate(20);
         return view('app.dna.patients', compact('patients', 'filters'));
     }

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

@@ -396,6 +396,7 @@ FROM client c join client_memo cm on c.id = cm.client_id
 WHERE
       c.mcp_pro_id = {$performerProID} AND
       cm.mcp_stamp_id IS NULL
+      AND (is_admin_only IS FALSE OR is_admin_only IS NULL)
 ORDER BY cm.created_at DESC
             ")
         );
@@ -528,6 +529,329 @@ WHERE cl.shadow_pro_id IS NULL
     private function dashboard_DNA(Request $request){
         $performer = $this->performer();
         $pro = $performer->pro;
+
+        $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;
+
+        $keyNumbers  = [];
+
+        $queryClients = $this->performer()->pro->getAccessibleClientsQuery();
+
+        $pendingNotesToSign = Note::where('ally_pro_id', $performerProID)->where('is_signed_by_ally', false)->where('is_cancelled', false)->count();
+        $keyNumbers['pendingNotesToSign'] = $pendingNotesToSign;
+
+        // notes pending mcp sign (applicable to dnas only)
+        $pendingNotesToSignMCP = Note::where('ally_pro_id', $performerProID)->where('is_signed_by_hcp', false)->where('is_cancelled', false)->count();
+        $keyNumbers['$pendingNotesToSignMCP'] = $pendingNotesToSignMCP;
+
+        $pendingNotesToSignAllySigned = Note::where(function ($query) use ($performerProID) {
+            $query->where('hcp_pro_id', $performerProID)->where('is_signed_by_hcp', false)->where('is_signed_by_ally', true)->where('is_cancelled', false);;
+        })->count();
+        $keyNumbers['pendingNotesToSignAllySigned'] = $pendingNotesToSignAllySigned;
+
+
+        $signedNotesWithoutBills = Note::where(function ($query) use ($performerProID) {
+            $query->where('hcp_pro_id', $performerProID)->where('is_signed_by_hcp', true)->where('is_cancelled', false);
+        })->whereDoesntHave('bills')->count();
+
+        $keyNumbers['signedNotesWithoutBills'] = $signedNotesWithoutBills;
+
+        // open tickets
+        $keyNumbers['numOpenTickets'] = Ticket::where('is_open', true)
+            ->where(function ($q) use ($performerProID) {
+                $q->where('assigned_pro_id', $performerProID)
+                    ->orWhere('manager_pro_id', $performerProID)
+                    ->orWhere('ordering_pro_id', $performerProID)
+                    ->orWhere('initiating_pro_id', $performerProID);
+            })
+            ->count();
+
+        // unacknowledged cancelled bills for authed pro
+        $keyNumbers['unacknowledgedCancelledBills'] = Bill::where('hcp_pro_id', $performerProID)
+            ->where('is_cancelled', true)
+            ->where('is_cancellation_acknowledged', false)
+            ->count();
+
+        // unacknowledged cancelled supply orders for authed pro
+        $keyNumbers['unacknowledgedCancelledSupplyOrders'] = SupplyOrder::where('signed_by_pro_id', $performerProID)
+            ->where('is_cancelled', true)
+            ->where('is_cancellation_acknowledged', false)
+            ->count();
+
+        // unsigned supply orders created by authed pro
+        $keyNumbers['unsignedSupplyOrders'] = SupplyOrder
+            ::where('is_cancelled', false)
+            ->where('is_signed_by_pro', false)
+            ->whereRaw('created_by_session_id IN (SELECT id FROM app_session WHERE pro_id = ?)', [$performerProID])
+            ->count();
+
+        // patientsHavingBirthdayToday
+        $queryClients = $this->performer()->pro->getAccessibleClientsQuery();
+        $keyNumbers['patientsHavingBirthdayToday'] = $queryClients
+            ->whereRaw('EXTRACT(DAY from dob) = ?', [date('d')])
+            ->whereRaw('EXTRACT(MONTH from dob) = ?', [date('m')])
+            ->count();
+
+        $reimbursement = [];
+        $reimbursement["currentBalance"] =  $performer->pro->balance;
+        $reimbursement["nextPaymentDate"] = '--';
+        $lastPayment = ProTransaction::where('pro_id', $performerProID)->where('plus_or_minus', 'PLUS')->orderBy('created_at', 'DESC')->first();
+        if ($lastPayment) {
+            $reimbursement["lastPayment"] =  $lastPayment->amount;
+            $reimbursement["lastPaymentDate"] = $lastPayment->created_at;
+        } else {
+            $reimbursement["lastPayment"] = '--';
+            $reimbursement["lastPaymentDate"] = '--';
+        }
+
+        //if today is < 15th, next payment is 15th, else nextPayment is
+        $today = strtotime(date('Y-m-d'));
+        $todayDate = date('j', $today);
+
+        $todayMonth =  date('m', $today);
+        $todayYear = date('Y', $today);
+        if ($todayDate < 15) {
+            $nextPaymentDate = new DateTime();
+            $nextPaymentDate->setDate($todayYear, $todayMonth, 15);
+            $reimbursement['nextPaymentDate'] = $nextPaymentDate->format('m/d/Y');
+        } else {
+            $nextPaymentDate = new \DateTime();
+            $lastDayOfMonth = date('t', $today);
+            $nextPaymentDate->setDate($todayYear, $todayMonth, $lastDayOfMonth);
+            $reimbursement['nextPaymentDate'] = $nextPaymentDate->format('m/d/Y');
+        }
+
+        //expectedPay
+        $expectedForHcp = DB::select(DB::raw("SELECT coalesce(SUM(hcp_expected_payment_amount),0) as expected_pay FROM bill WHERE hcp_pro_id = :performerProID  AND has_hcp_been_paid = false AND is_signed_by_hcp IS TRUE AND is_cancelled = false"), ['performerProID' => $performerProID])[0]->expected_pay;
+        $expectedForCm = DB::select(DB::raw("SELECT coalesce(SUM(cm_expected_payment_amount),0) as expected_pay  FROM bill WHERE cm_pro_id = :performerProID  AND has_cm_been_paid = false AND is_signed_by_cm IS TRUE AND is_cancelled = false"), ['performerProID' => $performerProID])[0]->expected_pay;
+        $expectedForRme = DB::select(DB::raw("SELECT coalesce(SUM(rme_expected_payment_amount),0) as expected_pay  FROM bill WHERE rme_pro_id = :performerProID  AND has_rme_been_paid = false AND is_signed_by_rme IS TRUE AND is_cancelled = false"), ['performerProID' => $performerProID])[0]->expected_pay;
+        $expectedForRmm = DB::select(DB::raw("SELECT coalesce(SUM(rmm_expected_payment_amount),0) as expected_pay  FROM bill WHERE rmm_pro_id = :performerProID  AND has_rmm_been_paid = false AND is_signed_by_rmm IS TRUE AND is_cancelled = false"), ['performerProID' => $performerProID])[0]->expected_pay;
+        $expectedForNa = DB::select(DB::raw("SELECT coalesce(SUM(generic_pro_expected_payment_amount),0) as expected_pay  FROM bill WHERE generic_pro_id = :performerProID  AND has_generic_pro_been_paid = false AND is_signed_by_generic_pro IS TRUE AND is_cancelled = false"), ['performerProID' => $performerProID])[0]->expected_pay;
+
+        $totalExpectedAmount =  $expectedForHcp + $expectedForCm + $expectedForRme + $expectedForRmm + $expectedForNa;
+        $reimbursement['nextPaymentAmount'] =  $totalExpectedAmount;
+
+        $milliseconds = strtotime(date('Y-m-d')) . '000';
+
+        // bills & claims
+        $businessNumbers = [];
+
+        // Notes with bills to resolve
+        $businessNumbers['notesWithBillsToResolve'] = Note::where('is_cancelled', '!=', true)
+            ->where('is_bill_closed', '!=', true)
+            ->whereRaw('(SELECT count(id) FROM bill WHERE note_id = note.id AND is_cancelled = false AND is_verified = false) > 0')
+            ->count();
+
+        // Notes pending bill closure
+        $businessNumbers['notesPendingBillingClosure'] = Note::where('is_cancelled', '!=', true)
+            ->where('is_bill_closed', '!=', true)
+            ->whereRaw('(SELECT count(id) FROM bill WHERE note_id = note.id AND (is_cancelled = true OR is_verified = true)) = 0')
+            ->count();
+
+        // incoming reports not signed
+        $incomingReports = IncomingReport::where('hcp_pro_id', $performerProID)
+            ->where('has_hcp_pro_signed', false)
+            ->where('is_entry_error', false)
+            ->orderBy('created_at', 'ASC')
+            ->get();
+        // erx, labs & imaging that are not closed
+        $tickets = Ticket::where('ordering_pro_id', $performerProID)
+            ->where('is_entry_error', false)
+            ->where('is_open', true)
+            ->orderBy('created_at', 'ASC')
+            ->get();
+        $supplyOrders = SupplyOrder::where('is_cleared_for_shipment', false)
+            ->where('is_cancelled', false)
+            ->whereRaw('created_by_session_id IN (SELECT id FROM app_session where pro_id = ?)', [$performer->pro->id])
+            ->orderBy('created_at', 'ASC')
+            ->get();
+
+        $numERx = Ticket::where('ordering_pro_id', $performerProID)
+            ->where('category', 'erx')
+            ->where('is_entry_error', false)
+            ->where('is_open', true)
+            ->count();
+        $numLabs = Ticket::where('ordering_pro_id', $performerProID)
+            ->where('category', 'lab')
+            ->where('is_entry_error', false)
+            ->where('is_open', true)
+            ->count();
+        $numImaging = Ticket::where('ordering_pro_id', $performerProID)
+            ->where('category', 'imaging')
+            ->where('is_entry_error', false)
+            ->where('is_open', true)
+            ->count();
+        $numSupplyOrders = SupplyOrder::where('is_cleared_for_shipment', false)
+            ->where('is_cancelled', false)
+            ->whereRaw('created_by_session_id IN (SELECT id FROM app_session where pro_id = ?)', [$performer->pro->id])
+            ->count();
+
+        $newMCPAssociations = ClientProChange
+            ::where('new_pro_id', $performerProID)
+            ->where('responsibility_type', 'MCP')
+            ->whereNull('current_client_pro_change_decision_id')
+            ->get();
+
+        $newNAAssociations = ClientProChange
+            ::where('new_pro_id', $performerProID)
+            ->where('responsibility_type', 'DEFAULT_NA')
+            ->whereNull('current_client_pro_change_decision_id')
+            ->get();
+
+        // unstamped client memos
+        // for mcp
+        $mcpClientMemos = DB::select(
+            DB::raw("
+SELECT c.uid as client_uid, c.name_first, c.name_last,
+       cm.uid, cm.content, cm.created_at
+FROM client c join client_memo cm on c.id = cm.client_id
+WHERE
+      c.mcp_pro_id = {$performerProID} AND
+      cm.mcp_stamp_id IS NULL
+ORDER BY cm.created_at DESC
+            ")
+        );
+        // for na
+        $naClientMemos = DB::select(
+            DB::raw("
+SELECT c.uid as client_uid, c.name_first, c.name_last,
+       cm.uid, cm.content, cm.created_at
+FROM client c join client_memo cm on c.id = cm.client_id
+WHERE
+      c.default_na_pro_id = {$performerProID} AND
+      cm.default_na_stamp_id IS NULL
+ORDER BY cm.created_at DESC
+            ")
+        );
+
+        $keyNumbers['rmBillsToSign'] = Bill
+            ::where('is_cancelled', false)
+            ->where('cm_or_rm', 'RM')
+            ->where(function ($q) use ($performerProID) {
+                $q
+                    ->where(function ($q2) use ($performerProID) {
+                        $q2->where('hcp_pro_id', $performerProID)->where('is_signed_by_hcp', false);
+                    })
+                    ->orWhere(function ($q2) use ($performerProID) {
+                        $q2->where('rme_pro_id', $performerProID)->where('is_signed_by_rme', false);
+                    })
+                    ->orWhere(function ($q2) use ($performerProID) {
+                        $q2->where('rmm_pro_id', $performerProID)->where('is_signed_by_rmm', false);
+                    })
+                    ->orWhere(function ($q2) use ($performerProID) {
+                        $q2->where('generic_pro_id', $performerProID)->where('is_signed_by_generic_pro', false);
+                    });
+            })
+            ->count();
+
+        $count = DB::select(
+            DB::raw(
+                "
+SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
+WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->id})
+          OR (client.rme_pro_id = {$performer->pro->id}) OR (client.default_na_pro_id = {$performer->pro->id}))
+  AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
+  AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
+  AND (care_month.number_of_days_with_remote_measurements < 16 OR care_month.number_of_days_with_remote_measurements IS NULL)
+"
+            )
+        );
+        $keyNumbers['rmPatientsWithLT16MD'] = $count[0]->cnt;
+
+        $count = DB::select(
+            DB::raw(
+                "
+SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
+WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->id})
+          OR (client.rme_pro_id = {$performer->pro->id}) OR (client.default_na_pro_id = {$performer->pro->id}))
+  AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
+  AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
+  AND (care_month.number_of_days_with_remote_measurements >= 16 AND care_month.number_of_days_with_remote_measurements IS NOT NULL)
+"
+            )
+        );
+        $keyNumbers['rmPatientsWithGTE16MD'] = $count[0]->cnt;
+
+        $count = DB::select(
+            DB::raw(
+                "
+SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
+WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->id})
+          OR (client.rme_pro_id = {$performer->pro->id}) OR (client.default_na_pro_id = {$performer->pro->id}))
+  AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
+  AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
+  AND (care_month.has_anyone_interacted_with_client_about_rm_outside_note = TRUE AND care_month.has_anyone_interacted_with_client_about_rm_outside_note IS NOT NULL)
+"
+            )
+        );
+        $keyNumbers['rmPatientsWithWhomCommDone'] = $count[0]->cnt;
+
+        $count = DB::select(
+            DB::raw(
+                "
+SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
+WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->id})
+          OR (client.rme_pro_id = {$performer->pro->id}) OR (client.default_na_pro_id = {$performer->pro->id}))
+  AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
+  AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
+  AND (care_month.has_anyone_interacted_with_client_about_rm_outside_note = FALSE OR care_month.has_anyone_interacted_with_client_about_rm_outside_note IS NULL)
+"
+            )
+        );
+        $keyNumbers['rmPatientsWithWhomCommNotDone'] = $count[0]->cnt;
+
+        // num measurements that need stamping
+        $keyNumbers['measurementsToBeStamped'] = $this->performer()->pro->getUnstampedMeasurementsFromCurrentMonth(true, null, null);
+
+        if($performer->pro->pro_type === 'ADMIN') {
+
+            // patients without coverage information
+            $keyNumbers['patientsWithoutCoverageInformation'] = DB::select(DB::raw("
+SELECT count(DISTINCT (cl.id)) as cnt
+FROM client cl
+WHERE cl.shadow_pro_id IS NULL AND cl.latest_client_primary_coverage_id IS NULL -- no coverage record"
+            ))[0]->cnt;
+
+            // patients pending coverage verification
+            $keyNumbers['patientsPendingCoverageVerification'] = DB::select(DB::raw("
+SELECT count(DISTINCT (cl.id)) as cnt
+FROM client cl
+         LEFT JOIN client_primary_coverage cpc ON cl.latest_client_primary_coverage_id = cpc.id
+WHERE cl.shadow_pro_id IS NULL
+    AND (cl.latest_client_primary_coverage_id IS NOT NULL -- coverage exists, but status is null or unknown
+    AND (
+               (cpc.plan_type = 'MEDICARE' AND (cpc.is_partbprimary = 'UNKNOWN' OR cpc.is_partbprimary IS NULL))
+               OR
+               (cpc.plan_type != 'MEDICARE' AND
+                (cpc.manual_determination_category = 'UNKNOWN' OR cpc.manual_determination_category IS NULL))
+           ))"
+            ))[0]->cnt;
+
+        }
+
+
+        return view('app/dashboard-dna', compact('keyNumbers', 'reimbursement', 'milliseconds',
+            'businessNumbers',
+            'incomingReports', 'tickets', 'supplyOrders',
+            'numERx', 'numLabs', 'numImaging', 'numSupplyOrders',
+            'newMCPAssociations', 'newNAAssociations',
+            'mcpClientMemos', 'naClientMemos'));
     }
 
     private function dashboard_ADMIN(Request $request){
@@ -904,6 +1228,7 @@ WHERE cl.shadow_pro_id IS NULL
     {
         $performer = $this->performer();
         $pro = $performer->pro;
+        
         if($pro->is_enrolled_as_mcp){
             return $this->dashboard_MCP($request);
         }elseif($pro->pro_type === 'ADMIN'){

+ 1 - 4
app/Models/Pro.php

@@ -56,10 +56,7 @@ class Pro extends Model
 
     public function isDefaultNA()
     {
-        $numTeams = ProTeam::where('assistant_pro_id', $this->id)
-            ->where('is_active', true)
-            ->count();
-        return !!$numTeams;
+        return $this->is_considered_for_dna;
     }
 
     public function lastPayment() {

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

@@ -1 +1,26 @@
 <h1>Phone Calls & Memos</h1>
+<div>
+	<table class="table table-sm">
+		<thead>
+			<tr>
+				<th>Client</th>
+				<th>Content</th>
+				<th>Created At</th>
+			</tr>
+		</thead>
+		<tbody>
+			@foreach($mcpClientMemos as $memo)
+			<tr>
+				<td>
+					<a href="{{route('patients.view.dashboard', $memo->client_uid)}}">
+						{{$memo->name_first}} {{$memo->name_last}}
+					</a>	
+				</td>
+				<td>{{$memo->content}}</td>
+				<td>{{$memo->created_at}}</td>
+			</tr>
+			@endforeach
+		</tbody>
+	</table>
+</div>
+

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

@@ -1,9 +1,11 @@
 <?php
+    
     $apptsPending = [
         'status' => $pro->getAppointmentsPendingStatusChangeAck(),
         'decision' => $pro->getAppointmentsPendingDecisionAck(),
         // 'time' => $pro->getAppointmentsPendingTimeChangeAck()
     ];
+
 ?>
 @if(!count($apptsPending['status']) && !count($apptsPending['decision'])/* && !count($apptsPending['time'])*/)
     No appointment changes

+ 18 - 0
resources/views/app/patient/dashboard.blade.php

@@ -989,6 +989,14 @@
                                 <div class="mb-2">
                                     <textarea class="form-control form-control-sm" rows="5" name="content" placeholder="Content"></textarea>
                                 </div>
+                                @if($performer->pro->pro_type === 'ADMIN')
+                                <div class="mb-2">
+                                    <label for="" class="checkbox">
+                                        <input type="checkbox" name="isAdminOnly">
+                                        Admins only
+                                    </label>
+                                </div>
+                                @endif
                                 <div class="d-flex align-items-center">
                                     <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
                                 </div>
@@ -1001,11 +1009,15 @@
                                     <th class="px-2 text-secondary">Category</th>
                                     <th class="px-2 text-secondary w-75">Summary</th>
                                     <th class="px-2 text-secondary">Created</th>
+                                    @if($performer->pro->pro_type === 'ADMIN')
+                                    <th class="px-2 text-secondary">Admins Only</th>
+                                    @endif
                                     <th class="px-2 text-secondary delete-column">&nbsp;</th>
                                 </tr>
                                 </thead>
                                 <tbody>
                                 @foreach($patient->memos as $memo)
+                                    @if(!$memo->is_admin_only || ($memo->is_admin_only && $performer->pro->pro_type === 'ADMIN') )
                                     <tr>
                                         <td class="px-2 text-nowrap">{{ $memo->category }}</td>
                                         <td class="px-2">
@@ -1019,6 +1031,7 @@
                                                         <th>Category</th>
                                                         <th>Summary</th>
                                                         <th>Created</th>
+                                                        
                                                         </thead>
                                                         <tbody>
                                                         @foreach($memo->updates as $update)
@@ -1026,6 +1039,7 @@
                                                                 <td>{{$update->category}}</td>
                                                                 <td>{{$update->content}}</td>
                                                                 <td><strong>{{$update->createdBy->proname_first}} {{$update->createdBy->pro->name_last}}</strong><br/>{{ friendly_date_time($update->created_at) }}</td>
+                                                               
                                                             </tr>
                                                         @endforeach
                                                         </tbody>
@@ -1040,6 +1054,9 @@
                                             @endif
                                             {{ friendly_date_time($memo->created_at) }}
                                         </td>
+                                        @if($performer->pro->pro_type === 'ADMIN' )
+                                        <td class="px-2 text-secondary">{{$memo->is_admin_only?'Yes':'No'}}</td>
+                                        @endif
                                         <td class="px-2 text-center delete-column">
                                             <div moe wide relative class="mr-2">
                                                 <a class="on-hover-opaque" start show title="Edit">
@@ -1080,6 +1097,7 @@
                                             </div>
                                         </td>
                                     </tr>
+                                    @endif
                                 @endforeach
                                 </tbody>
                             @else

+ 35 - 0
resources/views/app/practice-management/pro-financials.blade.php

@@ -103,6 +103,7 @@
                                             <th>Bill Amount</th>
                                             <th>Debited?</th>
                                             <th>Paid Amount</th>
+                                            <th>Is Verified</th>
                                             <th></th>
                                         </tr>
                                         @foreach($row->debitBills as $debitBill)
@@ -110,7 +111,41 @@
                                             <td>{{$debitBill->debit_pro_expected_amount}}</td>
                                             <td>{{$debitBill->has_debit_pro_been_debited}}</td>
                                             <td>{{$debitBill->debit_pro_expected_amount?'Yes':'No'}}</td>
+                                            <td>{{$debitBill->is_verified?'Yes':'No'}}</td>
                                             <td>
+                                                @if($debitBill->is_verified)
+                                                    <div moe class="ml-1" relative>
+                                                        <a class="text-danger" href="" show start>Undo Mark As Verified</a>
+                                                        <form url="/api/bill/undoMarkAsVerified" right>
+                                                            <input type="hidden" name="uid" value="{{$debitBill->uid}}">
+
+                                                            <div class="form-group">
+                                                                <label for="" class="control-label">Are you sure?</label>
+                                                            </div>
+                                                            
+                                                            <div class="mb-0">
+                                                                <button class="btn btn-primary btn-sm" submit>Submit</button>
+                                                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                            </div>
+                                                        </form>
+                                                    </div>
+                                                @else 
+                                                    <div moe class="ml-1" relative>
+                                                        <a class="text-danger" href="" show start>Mark As Verified</a>
+                                                        <form url="/api/bill/markAsVerified" right>
+                                                            <input type="hidden" name="uid" value="{{$debitBill->uid}}">
+
+                                                            <div class="form-group">
+                                                                <label for="" class="control-label">Are you sure?</label>
+                                                            </div>
+                                                            
+                                                            <div class="mb-0">
+                                                                <button class="btn btn-primary btn-sm" submit>Submit</button>
+                                                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                            </div>
+                                                        </form>
+                                                    </div>
+                                                @endif
                                                 
                                                 <div moe class="ml-1" relative>
                                                     <a class="text-danger" href="" show start>Debit expected amount</a>