@if(!empty($prescription->medications)) @endif @if(!empty($prescription->instructions)) @endif
@php $establishment = $prescription->establishment ?? null; $logoData = $establishment ? \App\Helpers\LogoHelper::getLogoBase64(null, $establishment->id) : null; @endphp @if($logoData) Logo @endif

Recetario

@php $nh = $prescription->number_history ?? null; $nhFmt = ($nh !== null && $nh !== '') ? str_pad(preg_replace('/\D/', '', preg_replace('/^H-/', '', (string) $nh)), 7, '0', STR_PAD_LEFT) : null; $folioReceta = $prescription->prescription_correlative ?? null; if (!$folioReceta && !empty($prescription->prescription_number)) { $folioReceta = $nhFmt . str_pad((string) $prescription->prescription_number, 3, '0', STR_PAD_LEFT); } @endphp @if($nhFmt) Historia clínica N° {{ $nhFmt }}
@if($folioReceta) Folio receta: {{ $folioReceta }} @endif @elseif($folioReceta) Receta N° {{ $folioReceta }} @endif
Fecha: {{ $prescription->prescription_date ? \Carbon\Carbon::parse($prescription->prescription_date)->format('d-m-Y') : 'N/A' }}
Tel.: {{ optional($establishment)->telephone ?? 'N/A' }}
Correo: {{ optional($establishment)->email ?? 'N/A' }}
Clínica: {{ optional($establishment)->description ?? 'Clínica Dental' }}
Dr(a): {{ optional($prescription->doctor)->name ?? 'No asignado' }}
DATOS DEL PACIENTE
Paciente: {{ strtoupper(optional($prescription->patient)->name ?? 'N/A') }}
Documento: {{ optional($prescription->patient)->number ?? 'N/A' }}
 
PRESCRIPCIÓN
Diagnóstico
{{ $prescription->diagnosis ?? 'N/A' }}
Observaciones
{{ $prescription->observations ?? 'N/A' }}
Medicamentos
@foreach($prescription->medications as $medication) @endforeach
Medicamento Dosis Frecuencia Duración Instrucción
{{ $medication['name'] ?? 'N/A' }} {{ $medication['dose'] ?? $medication['dosage'] ?? 'N/A' }} {{ $medication['frequency'] ?? 'N/A' }} {{ $medication['duration'] ?? 'N/A' }} {{ $medication['instruction'] ?? 'N/A' }} @if(!empty($medication['time'])) ({{ $medication['time'] }}) @endif
Indicaciones
    @foreach($prescription->instructions as $instruction)
  • {{ $instruction['instruction'] ?? 'N/A' }} @if(!empty($instruction['time'])) ({{ $instruction['time'] }}) @endif
  • @endforeach
 
Firma y Sello