25 lines
689 B
PHP
25 lines
689 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Impressao\Ambulatorio;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Ambulatorio\Atendimento;
|
|
use App\Services\Ambulatorio\AtendimentoEnfermagem\PreAtendimentoService;
|
|
use App\Utils\Exports\Pdf1;
|
|
|
|
class PreAtendimentoController extends Controller
|
|
{
|
|
private const TITLE = 'PRÉ-ATENDIMENTO';
|
|
private const TEMPLATE = 'ambulatorio.pre-atendimento';
|
|
|
|
public function __invoke($atendimentoId)
|
|
{
|
|
|
|
$atendimento = Atendimento::findOrFail($atendimentoId);
|
|
|
|
$data = PreAtendimentoService::getPrintData($atendimento->preAtendimento->id);
|
|
|
|
return Pdf1::generate(self::TITLE, self::TEMPLATE, $data);
|
|
}
|
|
}
|