@extends('layouts.mobile_master') @section('page_css') @endsection @section('content')
Medical Report
@if(isset($appointment->medicalReport) && $appointment->medicalReport) Report Exists @else Create New @endif
{{ substr($appointment->pat->name ?? 'N/A', 0, 1) }}

{{ $appointment->pat->name ?? 'N/A' }}

Patient Phone: {{ $appointment->pat->phone ?? 'N/A' }}

Appointment:
{{ \Carbon\Carbon::parse($appointment->date_time)->format('d M Y, H:i') }}
Doctor:
{{ $appointment->usr->name ?? 'Not assigned' }}
@if(isset($appointment->medicalReport) && $appointment->medicalReport)
Last Updated:
{{ \Carbon\Carbon::parse($appointment->medicalReport->updated_at)->format('d M Y, H:i') }}
@endif
@if($patientAppointments && count($patientAppointments) > 0)
@foreach($patientAppointments as $pastAppointment)
{{ \Carbon\Carbon::parse($pastAppointment->date_time)->format('d M Y, H:i') }}
{!! appointment_status($pastAppointment->status) !!}
{{ $pastAppointment->usr->name ?? 'Not assigned' }}
@if(!empty($pastAppointment->diagnosis))
Diagnosis: {{ $pastAppointment->diagnosis }}
@endif @if(!empty($pastAppointment->treatment))
Treatment: {{ $pastAppointment->treatment }}
@endif
@endforeach
@else

Patient's first visit.

@endif
@csrf @if(isset($appointment->medicalReport)) @method('POST') @endif
Medical Report
@if($isFirstVisit)
Case History
@foreach($cases as $case)
@foreach($case->casequestions as $item) @php $isChecked = in_array((int)$item->id, array_map('intval', $selectedQuestions ?? [])); @endphp
@endforeach
@endforeach
@endif
Prescription
@if(isset($medical_prescriptions) && count($medical_prescriptions) > 0) @foreach($medical_prescriptions as $p)
@endforeach @endif
@endsection @section('page_js') @endsection