Patient Details Patient Details @php $isReadOnly = $patient?->latestVisit?->step == 6; @endphp
{{-- Patient Info Tab --}}
Basic Information
Patient Image

Patient No: {{ $patient->patient_no ?? '-' }}

Name: {{ $patient->name }}

Mobile: {{ $patient->mobile ?? '-' }}

Email: {{ $patient->email ?? '-' }}

Age: {{ $patient->age ?? '-' }}

Gender: {{ ucfirst($patient->gender) ?? '-' }}

Caste: {{ $patient->caste->name ?? '-' }}

Occupation: {{ $patient->occupation->name ?? '-' }}

Address: {{ $patient->address ?? '-' }}

Aadhaar No: {{ $patient->aadhaar_no ?? '-' }}

Abha No: {{ $patient->abha_no ?? '-' }}

@if ($patient->latestVisit)
Latest Visit Details

Case No: {{ $patient->latestVisit->case_no ?? '-' }}

Symptoms: {{ $patient->latestVisit?->display_symptoms ?? '-' }}

Vital Signs

@if ($patient->latestVisit && $patient->latestVisit->vitalSigns->isNotEmpty())
    @foreach ($patient->latestVisit->vitalSigns as $vital)
  • {{ $vital->vitalType->name }}: {{ $vital->value ?? '-' }}
  • @endforeach
@else

No vital signs recorded.

@endif

Date & Time: {{ $patient->latestVisit->appointment_datetime }}

@if ($patient->latestVisit && $patient->latestVisit->patientVisitDocuments->isNotEmpty())

Uploaded medical reports:

    @foreach ($patient->latestVisit->patientVisitDocuments as $doc)
  • View Document
  • @endforeach
@endif
@endif
@if ($patient->latestVisit)
Notes & Prescription
Doctor's Notes: *
@if (!$isReadOnly) @endif

Investigation (Lab test):
{{--
@if (!$isReadOnly) @endif
--}}
@foreach ($testCategories as $category)
@endforeach

Prescription
@if (!$isReadOnly) @endif
@if ($patient->latestVisit->prescriptions->count() > 0) @foreach ($patient->latestVisit->prescriptions as $prescription) @endforeach @else @for ($i = 0; $i < 4; $i++) @endfor @endif
Medicine Categoty Medicine Name Schedule Days Action
@if (!$isReadOnly) @endif
@if (!$isReadOnly) @endif
@if (!$isReadOnly) @can('doctor.view')
@endcan @endif
@else
No recent visit found. Please create a visit before adding prescriptions or notes.
@endif
Investigation Details
@if ($patient->patientVisitDocuments->isEmpty()) @else
@foreach ($patient->patientVisitDocuments as $doc) @php $fileName = basename($doc->file_path); $filePath = storage_path('app/public/' . $doc->file_path); $fileSize = file_exists($filePath) ? round(filesize($filePath) / 1024, 2) . ' KB' : ''; @endphp
{{ \Illuminate\Support\Str::limit($fileName, 40) }}
{{ $fileSize }}
View
@endforeach
@endif
{{-- Treatment History Tab --}}
Treatment History
@if ($patient->patientVisits->isEmpty())

No treatment history available.

@else @foreach ($patient->patientVisits as $visit) @endforeach
Case No Medicines Notes Vital Signs Symptoms Date & Time
{{ $visit->case_no }} @if ($visit->prescriptions->isEmpty()) No medicines prescribed @else
    @foreach ($visit->prescriptions as $prescription)
  • {{ $prescription->medicine->name ?? 'Unknown Medicine' }} ({{ $prescription->days }} days)
  • @endforeach
@endif
{{ $visit->note ?? '-' }} @if ($visit && $visit->vitalSigns->isNotEmpty())
    @foreach ($visit->vitalSigns as $vital)
  • {{ $vital->vitalType->name }}: {{ $vital->value ?? '-' }}
  • @endforeach
@else

No vital signs recorded.

@endif
{{-- @php dd($visit->id,$visit->other_symptom ,$visit->symptoms->pluck('id')->toArray()); @endphp --}} {{ $visit?->display_symptoms }} {{ $visit->appointment_datetime }}
@endif
{{-- JS for adding/removing prescription rows and AJAX save --}} @if (!$isReadOnly) @endif