← Módulos
Relatório mensal da clínica
Live no VPSS.19 Camada Agência: diagnóstico executivo mensal (agregações + narrativa por IA com revisão humana).
Jornada clínica
modules/relatorio.py · platform/relatorio.py · agents/relatorio.py · migration 039Interface pronta no Persana✓ Entregue
- Migration 039: clinic_reports (RLS FORCE, status CHECK rascunho|aprovado, UNIQUE NULLS NOT DISTINCT)
- Agrega consultas, funil→protocolo, adesão, honorários (serviço próprio, S.16.3), no-show, cobertura de automação, churn — reusa as fontes já verificadas E2E
- Narrativa executiva + 3–5 recomendações por Claude sobre AGREGADOS (D-2 ok, sem PHI; fallback determinístico sem key)
- Invariante: IA gera rascunho → admin aprova; re-gerar não sobrescreve aprovado. Tela Tinta /relatorios
- PDF apresentável branded (reportlab, on-demand) — GET /relatorios/{id}/pdf + botão Baixar PDF
○ Falta
- Logo no PDF (branding traz logo_url; hoje só nome+cores)