瀏覽代碼

added fixes

root 3 年之前
父節點
當前提交
8e987c9816

+ 5 - 4
app/Http/Controllers/PracticeManagementController.php

@@ -55,10 +55,11 @@ class PracticeManagementController extends Controller
 		$proID = $this->performer()->pro->id;
 		$isAdmin = $this->performer()->pro->pro_type == 'ADMIN';
 		//$rows = $isAdmin ? ClientMeasurementDaysPerMonth::all() : ClientMeasurementDaysPerMonth::where('mcp_pro_id', $proID)->orderBy('year_month', 'asc')->orderBy('num_of_days_with_measurement', 'asc')->get();
-        $rows = CareMonth::whereNotNull('mcp_pro_id')
-            ->where('number_of_days_with_remote_measurements', '>=', 16)
-            ->orderByRaw(DB::raw('start_date DESC'))->paginate(50) ;
-        return view ('app.practice-management.remote-monitoring-report', compact('rows'));
+        $query = CareMonth::whereNotNull('mcp_pro_id')
+            ->where('number_of_days_with_remote_measurements', '>=', 16);
+	if(!$isAdmin) $query->where('mcp_pro_id', '=', $proID);
+	$rows = $query->orderByRaw(DB::raw('start_date DESC'))->paginate(50) ;
+        return view ('app.practice-management.remote-monitoring-report', compact('rows', 'isAdmin'));
 	}
 
     public function billingReport(Request $request)

+ 12 - 4
resources/views/app/practice-management/remote-monitoring-report.blade.php

@@ -11,7 +11,7 @@
             </div>
 
             <div class="card-body p-0">
-                <div class="d-flex flex-row">
+                <div class="d-flex_ d-none flex-row">
                     <div class="ml-2 mt-2">
                         <div>Patient</div>
                         <input type="text"  class="form-control input-sm" name="patient">
@@ -83,22 +83,27 @@
                 <table class="table table-sm table-condensed p-0 m-0" style="table-layout: fixed">
                     <thead class="bg-light">
                         <tr>
-                            <th class="border-0">MCP</th>
+				@if($isAdmin)
+			    <th class="border-0">MCP</th>
+				@endif
                             <th class="border-0">Patient</th>
                             <th class="border-0">Month/Year</th>
                             <th class="border-0"># Days w/ Meas.</th>
                             <th class="border-0">Most Recent MCP Note</th>
                             <th class="border-0">Days Between Note and EOM</th>
-                            <th class="border-0">RM Bill</th>
+                            @if($isAdmin)
+			    <th class="border-0">RM Bill</th>
                             <th class="border-0">Is Bill Closed</th>
                             <th class="border-0">Bill Closed At</th>
                             <th class="border-0">Is Claim Closed</th>
+			    @endif
                         </tr>
                     </thead>
 
                     <tbody>
                         @foreach($rows as $row)
                             <tr>
+				@if($isAdmin)
                                 <td>
                                     @if($row->mcp)
                                         <b>{{ implode(", ", [$row->mcp->name_display]) }}</b>
@@ -106,6 +111,7 @@
                                         --
                                     @endif
                                 </td>
+				@endif
                                 <td>
                                     <a href="/patients/view/{{ $row->patient->uid }}">
                                         <b>{{ implode(", ", [$row->patient->name_last,$row->patient->name_first]) }}</b>
@@ -129,7 +135,8 @@
                                     @endif
                                 </td>
                                 <td>{{$row->days_between_most_recent_mcp_note_date_and_end_of_care_month}}</td>
-                                <td>
+                                @if($isAdmin)
+				<td>
                                     @if($row->rmBill)
                                         <a href="{{route('patients.view.care-months.view.dashboard', ['patient'=>$row->patient, 'careMonth'=>$row])}}">{{ $row->rmBill->code  }}</a>
                                     @else
@@ -139,6 +146,7 @@
                                 <td>{{$row->is_bill_closed? 'Yes':'No'}}</td>
                                 <td>{{friendly_date_time($row->bill_closed_at)}}</td>
                                 <td>{{$row->is_claim_closed? 'Yes':'No'}}</td>
+				@endif
                             </tr>
                         @endforeach
                     </tbody>

+ 1 - 0
resources/views/layouts/template.blade.php

@@ -188,6 +188,7 @@
                             <a class="dropdown-item" href="{{ route('practice-management.myFavorites') }}">Favorites</a>
                             <a class="dropdown-item" href="{{ route('practice-management.proAvailability') }}">Availability</a>
                             <a class="dropdown-item" href="{{ route('practice-management.proCalendar') }}">Calendar</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.remoteMonitoringReport') }}">Remote Monitoring Report</a>
 
                             <a class="dropdown-item" href="{{ route('mcp.notes') }}">Notes</a>
                             <a class="dropdown-item" href="{{ route('mcp.appointments') }}">Appointments</a>