@extends('layouts.master') @section('title', $title) @section('content')
Total prescriptions

{{ $total_prescriptions }}

Total drug lines

{{ $total_drug_lines }}

Prescribing doctors

{{ $prescriptions_by_doctor->count() }}

Top prescribed drugs (by quantity)
@forelse ($top_drugs as $drug => $qty) @empty @endforelse
{{ $drug }}{{ $qty }}
No prescriptions in this period
Prescriptions by doctor
@forelse ($prescriptions_by_doctor as $doctor => $count) @empty @endforelse
{{ $doctor }}{{ $count }}
No prescriptions in this period
Prescriptions ({{ \Carbon\Carbon::parse($start_date)->format('d M, Y') }} - {{ \Carbon\Carbon::parse($end_date)->format('d M, Y') }})
@forelse ($prescriptions as $prescription) @empty @endforelse
Date Patient Doctor Drug lines
{{ \Carbon\Carbon::parse($prescription->date)->format('d M, Y') }} {{ $prescription->Appointment?->Patient?->name }} (ID: {{ $prescription->Appointment?->Patient?->patient_id }}) {{ $prescription->createdBy?->Employee?->name ?? $prescription->createdBy?->name }} {{ $prescription->detail->count() }}
No prescriptions found in this period
@endsection