Răsfoiți Sursa

Admin patients matrix updates

Vijayakrishnan 3 ani în urmă
părinte
comite
5a08340e5c
1 a modificat fișierele cu 75 adăugiri și 67 ștergeri
  1. 75 67
      resources/views/app/admin/patients-table.blade.php

+ 75 - 67
resources/views/app/admin/patients-table.blade.php

@@ -1,5 +1,5 @@
 <div class="table-responsive">
-	<table class="table table-striped p-0 m-0 table-sm border-top border-bottom text-nowrap">
+	<table class="table p-0 m-0 table-sm border-top border-bottom text-nowrap">
 		<thead class="bg-light">
 			<tr>
 				<th class="border-0 width-90px">#</th>
@@ -50,7 +50,12 @@
 				<td>
 					<div class="d-flex align-items-center flex-nowrap">
 						<span>{{$patient->displayName()}}</span>
-						<a href="#" class="btn-toggle-notes-row ml-3 on-hover-opaque" onclick="$(this).closest('tr').next('.notes-row').toggleClass('d-none'); return false"><i class="fa fa-file-alt"></i> <i class="fa fa-sort"></i></a>
+						@if(count($patient->activeNotes))
+							<a href="#" class="btn-toggle-notes-row ml-3 on-hover-opaque text-sm" onclick="$(this).closest('tr').next('.notes-row').toggleClass('d-none'); return false">
+								<i class="fa fa-file-alt"></i> <i class="fa fa-sort"></i>
+								{{count($patient->activeNotes)}}
+							</a>
+						@endif
 					</div>
 				</td>
 				<td>{{ friendly_date_time($patient->dob, false) }}</td>
@@ -108,76 +113,79 @@
 				<td>{{$patient->initiative}}</td>
 				@endif
 			</tr>
-				<tr class="notes-row d-none">
-					<td colspan="20">
-						<div class="my-2 ml-4">
-							@if(count($patient->activeNotes))
-								Notes for <b>{{$patient->displayName()}}</b>
-								<table class="table table-sm table-striped table-bordered mb-0 mt-2">
-									<thead class="bg-light">
-									<tr>
-										<th class="border-0 text-secondary">Effective Date</th>
-										<th class="border-0 text-secondary">New / Follow-up</th>
-										<th class="border-0 text-secondary">Method</th>
-										<th class="border-0 text-secondary">HCP</th>
-										<th class="border-0 text-secondary">NA</th>
-										<th class="border-0 text-secondary">HCP Signed</th>
-										<th class="border-0 text-secondary">ICDs</th>
-									</tr>
-									</thead>
-									<tbody>
-									@foreach ($patient->activeNotes as $note)
-										<tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
-											<td>
-												<a native target="_blank" href="/patients/view/{{ $patient->uid }}/notes/view/{{ $note->uid }}">
-													{{ friendly_date_time($note->effective_dateest, false) }}
-												</a>
-												@if(!!$note->visitTemplate)
-													<span class="text-info font-weight-bold">*</span>
-												@endif
-												<span class="ml-1">{{ $note->is_cancelled ? '[cancelled]' : '' }}</span>
-											</td>
-											<td>
-												{{ $note->new_or_fu_or_na === 'NEW' ? 'New' : 'Follow-up' }}
-											</td>
-											@if($pro->pro_type == 'ADMIN')
+				@if(count($patient->activeNotes))
+					<tr class="notes-row bg-light">
+						<td></td>
+						<td colspan="20">
+							<div class="my-2">
+								@if(count($patient->activeNotes))
+									Notes for <b>{{$patient->displayName()}}</b>
+									<table class="table table-sm table-striped table-bordered mb-0 mt-2">
+										<thead class="bg-light">
+										<tr>
+											<th class="border-0 text-secondary">Effective Date</th>
+											<th class="border-0 text-secondary">New / Follow-up</th>
+											<th class="border-0 text-secondary">Method</th>
+											<th class="border-0 text-secondary">HCP</th>
+											<th class="border-0 text-secondary">NA</th>
+											<th class="border-0 text-secondary">HCP Signed</th>
+											<th class="border-0 text-secondary">ICDs</th>
+										</tr>
+										</thead>
+										<tbody>
+										@foreach ($patient->activeNotes as $note)
+											<tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
 												<td>
-													{{ noteMethodDisplay($note->method) }}
+													<a native target="_blank" href="/patients/view/{{ $patient->uid }}/notes/view/{{ $note->uid }}">
+														{{ friendly_date_time($note->effective_dateest, false) }}
+													</a>
+													@if(!!$note->visitTemplate)
+														<span class="text-info font-weight-bold">*</span>
+													@endif
+													<span class="ml-1">{{ $note->is_cancelled ? '[cancelled]' : '' }}</span>
 												</td>
-											@endif
-											<td>
-												{{$note->hcpPro ? $note->hcpPro->name_display: '-'}}
-											</td>
-											@if($pro->pro_type == 'ADMIN')
 												<td>
-													{{$note->allyPro ? $note->allyPro->name_display: '-'}}
+													{{ $note->new_or_fu_or_na === 'NEW' ? 'New' : 'Follow-up' }}
 												</td>
-											@endif
-											<td>
-												{!! $note->hcpPro && $note->is_signed_by_hcp ? '<b class="text-success">Yes</b>' : 'No' !!}
-											</td>
-											<td class="max-width-200px">
-												@if(count($note->reasons))
-													@foreach ($note->reasons as $reason)
-														<div class="mb-1">
-															<span>{{ $reason->code }}</span>
-															<span class="text-secondary text-sm">{{ $reason->description}}</span>
-														</div>
-													@endforeach
-												@else
-													-
+												@if($pro->pro_type == 'ADMIN')
+													<td>
+														{{ noteMethodDisplay($note->method) }}
+													</td>
 												@endif
-											</td>
-										</tr>
-									@endforeach
-									</tbody>
-								</table>
-							@else
-								<span class="text-secondary">No active notes for <b>{{$patient->displayName()}}</b></span>
-							@endif
-						</div>
-					</td>
-				</tr>
+												<td>
+													{{$note->hcpPro ? $note->hcpPro->name_display: '-'}}
+												</td>
+												@if($pro->pro_type == 'ADMIN')
+													<td>
+														{{$note->allyPro ? $note->allyPro->name_display: '-'}}
+													</td>
+												@endif
+												<td>
+													{!! $note->hcpPro && $note->is_signed_by_hcp ? '<b class="text-success">Yes</b>' : 'No' !!}
+												</td>
+												<td class="max-width-200px">
+													@if(count($note->reasons))
+														@foreach ($note->reasons as $reason)
+															<div class="mb-1">
+																<span>{{ $reason->code }}</span>
+																<span class="text-secondary text-sm">{{ $reason->description}}</span>
+															</div>
+														@endforeach
+													@else
+														-
+													@endif
+												</td>
+											</tr>
+										@endforeach
+										</tbody>
+									</table>
+								@else
+									<span class="text-secondary">No active notes for <b>{{$patient->displayName()}}</b></span>
+								@endif
+							</div>
+						</td>
+					</tr>
+				@endif
 			@endforeach
 
 			@if(count($patients) === 0)