@php $pattern = '/\b0\d{7,12}\b/'; // adjust length if needed @endphp
| Summary | Call Create | Call End | Duration | Action |
|---|---|---|---|---|
|
Summary: {!! $contentWithLinks !!}
Initial Request: {!! !empty($firstMessageWithLinks) ? $firstMessageWithLinks : "No Message" !!} |
{{ \Carbon\Carbon::parse($call->call_created_at)->format('Y-m-d H:i:s'); }} | {{ \Carbon\Carbon::parse($call->call_ended_at)->format('Y-m-d H:i:s'); }} |
@php
$start = \Carbon\Carbon::parse($call->call_created_at)->setTimezone('Pacific/Auckland');
$end = \Carbon\Carbon::parse($call->call_ended_at)->setTimezone('Pacific/Auckland');
$diffInSeconds = $start->diffInSeconds($end) - $call->pharmacist_duration ?? 0 ;
// Format as mm:ss
$minutes = floor($diffInSeconds / 60);
$seconds = $diffInSeconds % 60;
$return = sprintf("%02d:%02d", $minutes, $seconds);
$pharmacistDurationMinutes = null;
if (!empty($call->pharmacist_duration)) {
$pharmacistDurationMinutes = floor($call->pharmacist_duration / 60);
$pharmacistDurationSecond = $call->pharmacist_duration % 60;
$return .= "/ ". sprintf("%02d:%02d", $pharmacistDurationMinutes, $pharmacistDurationSecond); } echo $return; @endphp |
@php $downloadTranscriptAiEndpointUrl = route('downloadTranscriptAiEndpoint', ['callId' => $call->id]); $downloadTranscriptTextAiEndpointUrl = route('downloadTranscriptTextAiEndpoint', ['callId' => $call->id, 'download' => 'view']); @endphp @foreach( $call->aiPrescriptions as $prescription) @php $class = ""; if ( $prescription->has_update) { $class = "collect"; } if ( $prescription->has_collect ) { $class = "completed"; } $showUrl = backpack_url('ai-prescription/' . $prescription->id . '/edit'); $messageUrl = route('message', [ 'call_id' => $call->id, 'prescription_id' => $prescription->id, ]); $updateUrl = route('updateAiPrescriptionAiEndpoint', ['prescription_id' => $prescription->id]); $completeUrl = route('collectAiPrescriptionAiEndpoint', ['prescription_id' => $prescription->id]); $pivot = $prescription->calls()->wherePivot('call_id', $call->id)->first(); $textBackNumber = $pivot->pivot->text_back_number; @endphp @endforeach |