Browse Source

Popup matrix: patients list coverage info

Vijayakrishnan 3 years ago
parent
commit
f51b61bbbb
1 changed files with 24 additions and 3 deletions
  1. 24 3
      resources/views/app/mcp/new_patients_awaiting_visit.blade.php

+ 24 - 3
resources/views/app/mcp/new_patients_awaiting_visit.blade.php

@@ -40,14 +40,35 @@
                             <td class="border-bottom-0">{{$row->dob}}</td>
                             <td class="border-bottom-0">{{$row->dob}}</td>
                             <td class="border-bottom-0">{{$row->sex}}</td>
                             <td class="border-bottom-0">{{$row->sex}}</td>
                             <td class="border-bottom-0">{{$row->usual_bmi}}</td>
                             <td class="border-bottom-0">{{$row->usual_bmi}}</td>
-                            <td class="border-bottom-0">{{$row->Insurance}}</td>
+                            <td class="border-bottom-0">
+                                <?php $coverageStatus = $row->getPrimaryCoverageStatus(); ?>
+                                @if($coverageStatus === 'YES')
+                                    <div class="text-nowrap">Covered <i class="fa fa-check-circle text-success"></i>
+                                    </div>
+                                @elseif($coverageStatus === 'NO')
+                                    <div class="text-nowrap">Not Covered <i class="fa fa-times text-danger"></i></div>
+                                @else
+                                    <div class="text-nowrap">Unknown <i
+                                                class="fa fa-exclamation-triangle text-warning-mellow"></i></div>
+                                @endif
+                                <?php $coverage = $row->getPrimaryCoverage(); ?>
+                                @if($coverage)
+                                    {{$coverage->toString()}}
+                                @endif
+                            </td>
                             <td class="border-bottom-0">{{$row->lastMcpAppointment() ? $row->lastMcpAppointment()->start_date : '-'}}</td>
                             <td class="border-bottom-0">{{$row->lastMcpAppointment() ? $row->lastMcpAppointment()->start_date : '-'}}</td>
                             <td class="border-bottom-0">{{$row->nextMcpAppointment() ? $row->nextMcpAppointment()->start_date : '-'}}</td>
                             <td class="border-bottom-0">{{$row->nextMcpAppointment() ? $row->nextMcpAppointment()->start_date : '-'}}</td>
                             <td class="border-bottom-0">{{$row->nextMcpAppointment() ? $row->nextMcpAppointment()->status : '-'}}</td>
                             <td class="border-bottom-0">{{$row->nextMcpAppointment() ? $row->nextMcpAppointment()->status : '-'}}</td>
                             <td class="border-bottom-0">{{$row->is_enrolled_in_cm ? 'Yes' : 'No'}}</td>
                             <td class="border-bottom-0">{{$row->is_enrolled_in_cm ? 'Yes' : 'No'}}</td>
                             <td class="border-bottom-0">{{$row->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>
                             <td class="border-bottom-0">{{$row->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>
-                            <td class="border-bottom-0">{{$row->lastMeasurementOfType('Wt. (lbs.)') ? $row->lastMeasurementOfType('Wt. (lbs.)') : '-'}}</td>
-                            <td class="border-bottom-0">{{$row->lastMeasurementOfType('BP') ? $row->lastMeasurementOfType('BP') : '-'}}</td>
+                            <td class="border-bottom-0">
+                                <?php $m = $row->lastMeasurementOfType('Wt. (lbs.)'); ?>
+                                {{$m && $m->value ? round($m->value, 2) : '-'}}
+                            </td>
+                            <td class="border-bottom-0">
+                                <?php $m = $row->lastMeasurementOfType('BP'); ?>
+                                {{$m && $m->value ? $m->value : '-'}}
+                            </td>
                             <td class="border-bottom-0">{{$row->getMcpAssignedOn()}}</td>
                             <td class="border-bottom-0">{{$row->getMcpAssignedOn()}}</td>
                         </tr>
                         </tr>
                     @endforeach
                     @endforeach