瀏覽代碼

updated on server

root 3 年之前
父節點
當前提交
73c23b76cc

+ 12 - 12
app/Http/Controllers/PracticeManagementController.php

@@ -3638,15 +3638,15 @@ ORDER BY c.name_last, c.name_first
 	        n.visit_number,
             ROUND(b.number_of_units * 60) as minutes,
 
- n.note_reason_icd1 AS icd1,
- n.note_reason_icd1description AS icd1description,
- n.note_reason_icd2 AS icd2,
- n.note_reason_icd2description AS icd2description,
- n.note_reason_icd3 AS icd3,
- n.note_reason_icd3description AS icd3description,
- n.note_reason_icd4 AS icd4,
- n.note_reason_icd4description AS icd4description,
- n.note_reason_memo AS icd_memo
+ 		n.note_reason_icd1 AS icd1,
+ 		n.note_reason_icd1description AS icd1description,
+ 		n.note_reason_icd2 AS icd2,
+ 		n.note_reason_icd2description AS icd2description,
+ 		n.note_reason_icd3 AS icd3,
+ 		n.note_reason_icd3description AS icd3description,
+ 		n.note_reason_icd4 AS icd4,
+ 		n.note_reason_icd4description AS icd4description,
+ 		n.note_reason_memo AS icd_memo
 
             ";
         $from = "FROM note AS n
@@ -3669,9 +3669,9 @@ ORDER BY c.name_last, c.name_first
             c.name_last NOT ILIKE '%test%' AND
             n.id IN (SELECT note_id FROM bill WHERE code ILIKE '%treatment%' AND bill.is_cancelled IS NOT TRUE AND note_id IS NOT NULL) AND
             -- n.id NOT IN (SELECT note_id FROM claim WHERE note_id IS NOT NULL) AND
-            c.is_part_b_primary = 'YES' AND
-            c.latest_eligible_refresh_at::DATE >= '2022-01-01' AND
-            c.mpb_remaining = 0 -- AND
+            c.is_part_b_primary <> 'YES' -- AND
+            -- c.latest_eligible_refresh_at::DATE >= '2022-01-01' AND
+            -- c.mpb_remaining = 0 -- AND
             -- c.created_at::DATE >= '2022-01-01'::DATE
             ";
         $filters = [];

+ 12 - 2
resources/views/app/admin/patients-table-extended.blade.php

@@ -19,6 +19,9 @@
             @endif
             <th class="border-0">Mailing Address State</th>
             <th class="border-0">Insurance</th>
+            @if($performer->pro->pro_type == 'ADMIN')
+		<th class="border-0">Ded.</th>
+	    @endif
             <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("admin.patients"), 'label' => 'Last Visit', 'key' => 'most_recent_completed_mcp_note_date'])</th>
             <th class="border-0">Next Appt.</th>
             <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("admin.patients"), 'label' => 'BP/Pulse Timestamp', 'key' => 'most_recent_cellular_bp_measurement_at'])</th>
@@ -71,9 +74,9 @@
                     {{--<td>{{$patient->source}}</td>--}}
                 @endif
                 <td>{{$patient->mailing_address_state}}</td>
-                <td>
+                <td class="{{ $patient->latestClientPrimaryCoverage && $patient->latestClientPrimaryCoverage->auto_medicare_mpb_remaining === 0 ? 'deductible-zero' : '' }}">
                     @include('app.patient.coverage_column_renderer', ['patient'=>$patient])
-                    @if($performer->pro->pro_type == 'ADMIN')
+                    @if(false && $performer->pro->pro_type == 'ADMIN')
                         @if(@$patient->latestClientPrimaryCoverage->auto_medicare_mpb_remaining)
                         <small class="d-block text-sm text-muted ml-3">
                             Deductible: <span class="font-weight-bold">{{ format_number(@$patient->latestClientPrimaryCoverage->auto_medicare_mpb_remaining)}}</span>
@@ -81,6 +84,13 @@
                         @endif
                     @endif 
                 </td>
+		@if($performer->pro->pro_type == 'ADMIN')
+		<td>
+                        <small class="d-block text-sm text-muted">
+                            <span class="font-weight-bold">{{ format_number(@$patient->latestClientPrimaryCoverage->auto_medicare_mpb_remaining)}}</span>
+                        </small>
+		</td>
+		@endif
                 <td>
                     {{ friendly_date($patient->most_recent_completed_mcp_note_date) }}
                     {{-- {{$patient->lastMcpAppointment ? friendly_date_time($patient->lastMcpAppointment->raw_date.' '.$patient->lastMcpAppointment->raw_start_time) : '-'}}--}}