Преглед на файлове

Patient coverage info table cell

Samson Mutunga преди 3 години
родител
ревизия
e3fa67a9a0

+ 1 - 14
resources/views/app/mcp/patients-table.blade.php

@@ -55,20 +55,7 @@
 					</div>
 				</td>
 				<td>
-					<?php $coverage = $patient->getPrimaryCoverage(); ?>
-					<?php $coverageStatus = $coverage ? $coverage->getStatus() : 'NO' ?>
-					<div class="text-nowrap">
-						@if($coverageStatus === 'YES')
-						<i class="fa fa-check-circle text-success" data-toggle="tooltip" data-placement="bottom" title="Covered"></i>
-						@elseif($coverageStatus === 'NO')
-						<i class="fa fa-times text-danger" data-toggle="tooltip" data-placement="bottom" title="Not Covered"></i>
-						@else
-						<i class="fa fa-exclamation-triangle text-warning-mellow" data-toggle="tooltip" data-placement="bottom" title="Unknown"></i>
-						@endif
-						@if($coverage)
-						{{$coverage->insuranceDisplayName()}}
-						@endif
-					</div>
+					@include('app.patient.coverage_column_renderer', ['patient'=>$patient])
 				</td>
 				<td>
 					{{ friendly_date($patient->most_recent_completed_mcp_note_date) }}

+ 2 - 0
resources/views/app/patient/coverage_column_renderer.blade.php

@@ -10,5 +10,7 @@
 <?php $coverage = $patient->getPrimaryCoverage(); ?>
 @if($coverage)
     <span class="ml-2">{{$coverage->insuranceDisplayName()}}</span>
+@else
+<small class="ml-2 text-muted">(No insurance)</small>
 @endif
 </div>

+ 1 - 15
resources/views/app/patients.blade.php

@@ -170,21 +170,7 @@
                         </td>
                         @endif
                         <td>
-                            <?php $coverageStatus = $patient->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 = $patient->getPrimaryCoverage(); ?>
-                            @if($coverage)
-                                {{$coverage->insuranceDisplayName()}}
-                            @endif
-                            @include('app.patient.coverage-status')
+                            @include('app.patient.coverage_column_renderer', ['patient'=>$patient])
                         </td>
                         <td>
                             {{ $patient->mcp ? $patient->mcp->displayName() : '-' }}