Browse Source

dev-remote-monitoring

Josh 3 năm trước cách đây
mục cha
commit
3b92be05ef

+ 3 - 2
app/Http/Controllers/PracticeManagementController.php

@@ -55,8 +55,9 @@ 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 = $isAdmin ? CareMonth::orderByRaw(DB::raw('number_of_days_with_remote_measurements DESC NULLS LAST'))->paginate(50) : CareMonth::where('mcp_pro_id', $proID)->orderBy(DB::raw('number_of_days_with_remote_measurements DESC NULLS LAST'))->paginate(50);
-
+        $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'));
 	}
 

+ 35 - 10
resources/views/app/practice-management/remote-monitoring-report.blade.php

@@ -76,44 +76,69 @@
                         <input type="date1" class="form-control  input-sm mb-2">
                         <input type="date1" class="form-control  input-sm mb-2">
                     </div>
+                    <div class="ml-2 mt-2">
+                        <button class="btn btn-primary"><i class="fa fa-filter"></i> Filter</button>
+                    </div>
                 </div>
                 <table class="table table-sm table-condensed p-0 m-0" style="table-layout: fixed">
                     <thead class="bg-light">
                         <tr>
-                            <th class="px-3 border-0">Patient</th>
+                            <th class="border-0">MCP</th>
+                            <th class="border-0">Patient</th>
                             <th class="border-0">Month/Year</th>
-                            <th class="border-0"># Days with Measurements</th>
-                            <th>Most Recent Mcp Note Date</th>
-                            <th>Days Between Most Recent Mcp Note Date And End Of Care Month</th>
-                            <th class="border-0">HCP</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>
+                            <th class="border-0">Is Bill Closed</th>
+                            <th class="border-0">Bill Closed At</th>
+                            <th class="border-0">Is Claim Closed</th>
                         </tr>
                     </thead>
-                    
+
                     <tbody>
                         @foreach($rows as $row)
                             <tr>
+                                <td>
+                                    @if($row->mcp)
+                                        <b>{{ implode(", ", [$row->mcp->name_display]) }}</b>
+                                    @else
+                                        --
+                                    @endif
+                                </td>
                                 <td>
                                     <a href="/patients/view/{{ $row->patient->uid }}">
                                         <b>{{ implode(", ", [$row->patient->name_last,$row->patient->name_first]) }}</b>
                                     </a>
                                 </td>
                                 <td>
-                                    {{ $row->start_date }}
+                                    <a href="{{route('patients.view.care-months.view.dashboard', ['patient'=>$row->patient, 'careMonth'=>$row])}}">
+                                        {{ friendly_date_month_year($row->start_date) }}
+                                    </a>
                                 </td>
                                 <td>
                                 	{{ $row->number_of_days_with_remote_measurements }}
 				                </td>
                                 <td>
                                     @if($row->mostRecentMcpNote)
-                                        <a href="{{route('patients.view.notes.view.dashboard',['patient'=>$row->patient, 'note'=>$row->mostRecentMcpNote])}}">{{$row->most_recent_mcp_note_date}}</a>
+                                        <a href="{{route('patients.view.notes.view.dashboard',['patient'=>$row->patient, 'note'=>$row->mostRecentMcpNote])}}">
+                                            {{friendly_date($row->most_recent_mcp_note_date)}}
+                                        </a>
                                     @else
                                         --
                                     @endif
                                 </td>
                                 <td>{{$row->days_between_most_recent_mcp_note_date_and_end_of_care_month}}</td>
                                 <td>
-                                    <b>{{ implode(", ", [$row->mcp->name_first, $row->mcp->name_last]) }}</b>
-				                </td>
+                                    @if($row->rmBill)
+                                        <a href="{{route('patients.view.care-months.view.dashboard', ['patient'=>$row->patient, 'careMonth'=>$row])}}">{{ $row->rmBill->code  }}</a>
+                                    @else
+                                        --
+                                    @endif
+                                </td>
+                                <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>
                             </tr>
                         @endforeach
                     </tbody>