{{-- This Blade will receive $entry (the Call model) --}}
| ID | RX Status | Location | Medicine | Repeats | Action | @foreach($entry->aiPrescriptions as $prescription) @php $class = ""; $hasCollect = $prescription->has_collect; if ( $hasCollect ) { $class = "completed"; } @endphp
|---|---|---|---|---|---|
| {{ $prescription->rx_id }} | {{ $prescription->rxStatus->name ?? "" }} | {{ $prescription->location->name ?? "" }} |
@if(!empty($prescription->medicines))
@foreach($prescription->medicines as $med)
{{ $med->name }}
@endforeach
@else
N/A
@endif
|
@if(!empty($prescription->repeats))
@foreach($prescription->repeats as $repeat)
{{ $repeat->name }}
@endforeach
@else
N/A
@endif
|
@php $entryId = $entry->getKey(); $messageUrl = route('message', [ 'call_id' => $entryId, 'prescription_id' => $prescription->id, ]); $updateUrl = route('updateAiPrescriptionAiEndpoint', ['prescription_id' => $prescription->id]); $completeUrl = route('collectAiPrescriptionAiEndpoint', ['prescription_id' => $prescription->id]); $pivot = $prescription->calls()->wherePivot('call_id', $entryId)->first(); $textBackNumber = $pivot->pivot->text_back_number; @endphp @if ( !empty($textBackNumber )) @endif {{-- --}} |