@@ -909,4 +909,10 @@ if(!function_exists('format_phone_number')) {
if(empty($number)) return $default;
return preg_replace('~.*(\d{3})[^\d]{0,7}(\d{3})[^\d]{0,7}(\d{4}).*~', '($1) $2-$3', $number). "\n";
}
+}
+
+if(!function_exists('format_number')) {
+ function format_number($number, $places = 2) {
+ return number_format((float)$number, $places, '.', '');
+ }
@@ -73,6 +73,13 @@
<td>{{$patient->mailing_address_state}}</td>
<td>
@include('app.patient.coverage_column_renderer', ['patient'=>$patient])
+ @if($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>
+ </small>
+ @endif
</td>
{{ friendly_date($patient->most_recent_completed_mcp_note_date) }}
@@ -326,7 +326,9 @@ $addressParts .= implode(", ", $addressPart2);
</span>
</div>
@if($performer->pro->pro_type == 'ADMIN')
- <div class="ml-2">Deductible: {{@$patient->latestClientPrimaryCoverage->auto_medicare_mpb_remaining ?? '--'}} </div>
+ <div class="ml-2">Deductible: {{format_number(@$patient->latestClientPrimaryCoverage->auto_medicare_mpb_remaining)}} </div>
@endif