patients.blade.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. @extends ('layouts/template')
  2. @section('content')
  3. <div class="p-3 mcp-theme-1">
  4. <div class="card">
  5. <div class="card-header px-3 py-2 d-flex align-items-center">
  6. <strong class="mr-4">
  7. <i class="fas fa-user-injured"></i>
  8. Patients
  9. </strong>
  10. <select class="ml-auto max-width-300px form-control form-control-sm" onchange="fastLoad('/patients/' + this.value, true, false, false)">
  11. <option value="" {{ $filter === '' ? 'selected' : '' }}>All patients</option>
  12. <option value="not-yet-seen" {{ $filter === 'not-yet-seen' ? 'selected' : '' }}>Patients I have not seen yet</option>
  13. </select>
  14. </div>
  15. <div class="card-body p-0">
  16. <table class="table table-condensed p-0 m-0">
  17. <thead class="bg-light">
  18. <tr>
  19. <th></th>
  20. <th class="px-3 border-0">#</th>
  21. <th class="border-0">Name</th>
  22. <th class="border-0">Created At</th>
  23. <th class="border-0">Program(s)</th>
  24. <th class="border-0">DOB</th>
  25. <th class="border-0">Sex</th>
  26. <th class="border-0">MCN</th>
  27. <th class="border-0">PCP</th>
  28. {{--<th class="border-0">RMM</th>--}}
  29. <th class="border-0">Upcoming Appointments</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @foreach($patients as $patient)
  34. <tr>
  35. <td>{{$loop->index + 1}}</td>
  36. <td class="px-3">
  37. <a href="{{route('patients.view.dashboard', $patient)}}">
  38. {{$patient->chart_number}}
  39. </a>
  40. </td>
  41. <td>
  42. {{$patient->displayName()}}
  43. @if($patient->has_mcp_done_onboarding_visit !== 'YES')
  44. <span title="MCP Onboarding Visit Pending"><i class="fa fa-exclamation-triangle"></i></span>
  45. @endif
  46. </td>
  47. <td>{{friendly_date_time_short_with_tz($patient->created_at, true, 'EASTERN')}}</td>
  48. <td>
  49. <?php $programNumber = 0; ?>
  50. @foreach($patient->clientPrograms as $clientProgram)
  51. <?php
  52. $program = $clientProgram->program;
  53. $programNumber++;
  54. ?>
  55. <div class="mb-1 text-nowrap">
  56. {{ $programNumber }}. {{ $program->title }}
  57. @if($clientProgram->has_mcp_done_onboarding_visit !== 'YES')
  58. <span title="Onboarding Pending" class="ml-1"><i class="fa fa-exclamation-triangle"></i></span>
  59. @else
  60. <span title="Onboarding Complete" class="ml-1 text-secondary"><i class="fa fa-check"></i></span>
  61. @endif
  62. </div>
  63. @endforeach
  64. </td>
  65. <td>{{ friendly_date_time($patient->dob, false) }}</td>
  66. <td>{{ $patient->sex === 'M' ? 'Male' : ($patient->sex === 'F' ? 'Female' : '-') }}</td>
  67. <td>
  68. @if($patient->was_medicare_validation_successful && $patient->is_part_b_primary == 'YES')
  69. Covered <span style="color:green"><i class="fa fa-check-circle"></i></span>
  70. @elseif($patient->was_medicare_validation_successful)
  71. <div>Valid Medicare Number</div>
  72. <div class="text-secondary">Not Medicare Part B</div>
  73. @if($patient->is_medicare_advantage == 'YES')
  74. <div class="text-secondary">Medicare Advantage: <b>{{$patient->medicare_advantage_plan}}</b></div>
  75. @endif
  76. @else
  77. @if($patient->mcn)
  78. <div>Invalid MCN</div>
  79. @else
  80. <div>No Info Provided</div>
  81. @endif
  82. @endif
  83. </td>
  84. <td>
  85. {{ $patient->mcp ? $patient->mcp->displayName() : '-' }}
  86. </td>
  87. {{--<td>
  88. {{ $patient->rmm ? $patient->rmm->displayName() : '-' }}
  89. </td>--}}
  90. <td>
  91. <table class="table table-sm border-0 my-0">
  92. <tbody>
  93. <?php $numAppts = 0; ?>
  94. @foreach($patient->upcomingAppointments as $appointment)
  95. @if($appointment->status !== 'CANCELLED' && $appointment->status !== 'ABANDONED')
  96. <tr>
  97. <td class="text-black p-0 border-0">
  98. <div class="pb-0">
  99. {{ friendly_date_time($appointment->start_time, false) }}, {{ friendly_time($appointment->raw_start_time) }}
  100. <span class="d-inline-block text-secondary text-sm">({{ $appointment->timezone }})</span>
  101. &nbsp;/&nbsp;
  102. <b class="mr-1">{{$appointment->pro->displayName()}}</b>
  103. <span class="text-secondary text-sm">({{ $appointment->status }})</span>
  104. </div>
  105. </td>
  106. </tr>
  107. <?php $numAppts++; ?>
  108. @endif
  109. @endforeach
  110. @if(!$numAppts)
  111. <tr>
  112. <td class="text-secondary p-0 border-0">
  113. No upcoming appointments
  114. </td>
  115. </tr>
  116. @endif
  117. </tbody>
  118. </table>
  119. </td>
  120. </tr>
  121. @endforeach
  122. </tbody>
  123. </table>
  124. <div class="ml-2 mt-2">
  125. {{$patients->links()}}
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. @endsection