Download index.html from saiane/caps: direct link, hf CLI and curl.
- Browser
- Download file 34.9 kB
-
https://huggingface.co/spaces/saiane/caps/resolve/main/index.html
- Command line
-
hf download hf://spaces/saiane/caps/index.html
-
curl -L -o index.html https://huggingface.co/spaces/saiane/caps/resolve/main/index.html
34.9 kB
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Relatório de Produção Aprovada - CAPS</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .fade-in { | |
| animation: fadeIn 0.5s ease-in-out; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .chart-container { | |
| transition: all 0.3s ease; | |
| } | |
| .chart-container:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 25px rgba(0,0,0,0.1); | |
| } | |
| .data-table { | |
| max-height: 400px; | |
| overflow-y: auto; | |
| } | |
| .data-table::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| .data-table::-webkit-scrollbar-track { | |
| background: #f1f1f1; | |
| border-radius: 10px; | |
| } | |
| .data-table::-webkit-scrollbar-thumb { | |
| background: #888; | |
| border-radius: 10px; | |
| } | |
| .data-table::-webkit-scrollbar-thumb:hover { | |
| background: #555; | |
| } | |
| .highlight { | |
| background-color: #f0f9ff; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <!-- Header --> | |
| <header class="bg-blue-700 text-white rounded-xl shadow-lg p-6 mb-8 fade-in"> | |
| <div class="flex flex-col md:flex-row justify-between items-start md:items-center"> | |
| <div> | |
| <h1 class="text-2xl md:text-3xl font-bold mb-2">RELATÓRIO DE PRODUÇÃO APROVADA</h1> | |
| <h2 class="text-xl md:text-2xl font-semibold mb-4">Períodos: Agosto, Setembro, Outubro e Novembro de 2023 e 2024</h2> | |
| <p class="text-blue-100">Data de geração: 22/04/2025</p> | |
| </div> | |
| <div class="mt-4 md:mt-0 bg-white text-blue-700 px-4 py-2 rounded-lg shadow"> | |
| <p class="font-bold">FONTE: SIASUS</p> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Summary Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in hover:shadow-lg transition-shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500 font-medium">Total 2023</p> | |
| <p class="text-3xl font-bold text-blue-600">5,279</p> | |
| </div> | |
| <div class="bg-blue-100 p-3 rounded-full"> | |
| <i class="fas fa-calendar-alt text-blue-600 text-xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm text-gray-500">Procedimentos realizados</p> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in hover:shadow-lg transition-shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500 font-medium">Total 2024</p> | |
| <p class="text-3xl font-bold text-green-600">11,628</p> | |
| </div> | |
| <div class="bg-green-100 p-3 rounded-full"> | |
| <i class="fas fa-chart-line text-green-600 text-xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm text-gray-500">Procedimentos realizados (+120%)</p> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in hover:shadow-lg transition-shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500 font-medium">Unidades</p> | |
| <p class="text-3xl font-bold text-purple-600">2</p> | |
| </div> | |
| <div class="bg-purple-100 p-3 rounded-full"> | |
| <i class="fas fa-hospital text-purple-600 text-xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <p class="text-sm text-gray-500">CAPS analisados</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Unit Selector --> | |
| <div class="mb-8"> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in"> | |
| <h3 class="text-lg font-semibold mb-4 text-gray-700">Selecione as unidades para comparação</h3> | |
| <div class="flex flex-wrap gap-4"> | |
| <button id="all-units" class="px-4 py-2 bg-blue-600 text-white rounded-lg shadow hover:bg-blue-700 transition-colors"> | |
| Todas as unidades | |
| </button> | |
| <button id="unit-1953" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg shadow hover:bg-gray-300 transition-colors"> | |
| US 318 CAPS CPTRA | |
| </button> | |
| <button id="unit-28657" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg shadow hover:bg-gray-300 transition-colors"> | |
| US 277 CAPS ESPERANÇA | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Charts --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8"> | |
| <!-- Monthly Comparison Chart --> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in chart-container"> | |
| <h3 class="text-lg font-semibold mb-4 text-gray-700">Comparativo Mensal de Procedimentos</h3> | |
| <div class="h-80"> | |
| <canvas id="monthlyComparisonChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Unit Distribution Chart --> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in chart-container"> | |
| <h3 class="text-lg font-semibold mb-4 text-gray-700">Distribuição por Unidade</h3> | |
| <div class="h-80"> | |
| <canvas id="unitDistributionChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Yearly Growth Chart --> | |
| <div class="bg-white rounded-xl shadow-md p-6 mb-8 fade-in chart-container"> | |
| <h3 class="text-lg font-semibold mb-4 text-gray-700">Crescimento Anual</h3> | |
| <div class="h-96"> | |
| <canvas id="yearlyGrowthChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Procedure Details --> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 fade-in"> | |
| <div class="p-6 border-b border-gray-200"> | |
| <h3 class="text-lg font-semibold text-gray-700">Detalhamento de Procedimentos</h3> | |
| <p class="text-sm text-gray-500">Comparativo entre unidades e anos</p> | |
| </div> | |
| <div class="p-4 data-table"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Procedimento</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Unidade</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Set/23</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Out/23</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nov/23</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Set/24</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Out/24</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nov/24</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <!-- Row for ACOLHIMENTO DIURNO --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ACOLHIMENTO DIURNO</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 318 CAPS CPTRA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">154</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">198</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">95</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">393</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">369</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">373</td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ACOLHIMENTO DIURNO</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 277 CAPS ESPERANÇA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">9</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">11</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">13</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">12</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">117</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">218</td> | |
| </tr> | |
| <!-- Row for ATENDIMENTO INDIVIDUAL --> | |
| <tr class="bg-gray-50 hover:bg-gray-100"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ATENDIMENTO INDIVIDUAL</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 318 CAPS CPTRA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">466</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">407</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">289</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">666</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">563</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">489</td> | |
| </tr> | |
| <tr class="bg-gray-50 hover:bg-gray-100"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ATENDIMENTO INDIVIDUAL</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 277 CAPS ESPERANÇA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">219</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">212</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">275</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">160</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">92</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">202</td> | |
| </tr> | |
| <!-- Row for ATENDIMENTO EM GRUPO --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ATENDIMENTO EM GRUPO</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 318 CAPS CPTRA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">474</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">548</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">531</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">1,046</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">827</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">655</td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ATENDIMENTO EM GRUPO</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 277 CAPS ESPERANÇA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">339</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">302</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">386</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">250</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">679</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">766</td> | |
| </tr> | |
| <!-- Row for ATENCAO AS SITUACOES DE CRISE --> | |
| <tr class="bg-gray-50 hover:bg-gray-100"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ATENÇÃO ÀS SITUAÇÕES DE CRISE</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 318 CAPS CPTRA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">349</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">338</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">254</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">802</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">798</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">684</td> | |
| </tr> | |
| <tr class="bg-gray-50 hover:bg-gray-100"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ATENÇÃO ÀS SITUAÇÕES DE CRISE</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">US 277 CAPS ESPERANÇA</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">16</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">30</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">11</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">16</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600 font-semibold">17</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Top Procedures --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-8"> | |
| <!-- Top Procedures 2023 --> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in chart-container"> | |
| <h3 class="text-lg font-semibold mb-4 text-gray-700">Top 5 Procedimentos 2023</h3> | |
| <div class="h-80"> | |
| <canvas id="topProcedures2023Chart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Top Procedures 2024 --> | |
| <div class="bg-white rounded-xl shadow-md p-6 fade-in chart-container"> | |
| <h3 class="text-lg font-semibold mb-4 text-gray-700">Top 5 Procedimentos 2024</h3> | |
| <div class="h-80"> | |
| <canvas id="topProcedures2024Chart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Footer --> | |
| <footer class="bg-gray-100 rounded-xl p-6 text-center text-gray-600 text-sm"> | |
| <p>Relatório gerado automaticamente pelo sistema SIASUS em 22/04/2025</p> | |
| <p class="mt-2">Secretaria Municipal de Saúde - Gerência de Saúde Mental</p> | |
| </footer> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Monthly Comparison Chart | |
| const monthlyCtx = document.getElementById('monthlyComparisonChart').getContext('2d'); | |
| const monthlyComparisonChart = new Chart(monthlyCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Set/23', 'Out/23', 'Nov/23', 'Set/24', 'Out/24', 'Nov/24'], | |
| datasets: [ | |
| { | |
| label: 'US 318 CAPS CPTRA', | |
| data: [2405, 2802, 1988, 4553, 3836, 3407], | |
| backgroundColor: 'rgba(59, 130, 246, 0.7)', | |
| borderColor: 'rgba(59, 130, 246, 1)', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: 'US 277 CAPS ESPERANÇA', | |
| data: [984, 893, 1130, 721, 1132, 2706], | |
| backgroundColor: 'rgba(124, 58, 237, 0.7)', | |
| borderColor: 'rgba(124, 58, 237, 1)', | |
| borderWidth: 1 | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| title: { | |
| display: true, | |
| text: 'Quantidade de Procedimentos' | |
| } | |
| }, | |
| x: { | |
| title: { | |
| display: true, | |
| text: 'Mês/Ano' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.dataset.label + ': ' + context.raw.toLocaleString(); | |
| } | |
| } | |
| }, | |
| legend: { | |
| position: 'top', | |
| } | |
| } | |
| } | |
| }); | |
| // Unit Distribution Chart | |
| const unitCtx = document.getElementById('unitDistributionChart').getContext('2d'); | |
| const unitDistributionChart = new Chart(unitCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['US 318 CAPS CPTRA', 'US 277 CAPS ESPERANÇA'], | |
| datasets: [{ | |
| data: [17045, 7566], | |
| backgroundColor: [ | |
| 'rgba(59, 130, 246, 0.7)', | |
| 'rgba(124, 58, 237, 0.7)' | |
| ], | |
| borderColor: [ | |
| 'rgba(59, 130, 246, 1)', | |
| 'rgba(124, 58, 237, 1)' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'right', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| const label = context.label || ''; | |
| const value = context.raw || 0; | |
| const total = context.dataset.data.reduce((a, b) => a + b, 0); | |
| const percentage = Math.round((value / total) * 100); | |
| return `${label}: ${value.toLocaleString()} (${percentage}%)`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Yearly Growth Chart | |
| const yearlyCtx = document.getElementById('yearlyGrowthChart').getContext('2d'); | |
| const yearlyGrowthChart = new Chart(yearlyCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Set', 'Out', 'Nov'], | |
| datasets: [ | |
| { | |
| label: '2023 - US 318 CAPS CPTRA', | |
| data: [2405, 2802, 1988], | |
| borderColor: 'rgba(59, 130, 246, 0.5)', | |
| backgroundColor: 'rgba(59, 130, 246, 0.1)', | |
| borderWidth: 2, | |
| tension: 0.3, | |
| fill: true | |
| }, | |
| { | |
| label: '2024 - US 318 CAPS CPTRA', | |
| data: [4553, 3836, 3407], | |
| borderColor: 'rgba(59, 130, 246, 1)', | |
| backgroundColor: 'rgba(59, 130, 246, 0.2)', | |
| borderWidth: 3, | |
| tension: 0.3, | |
| fill: true | |
| }, | |
| { | |
| label: '2023 - US 277 CAPS ESPERANÇA', | |
| data: [984, 893, 1130], | |
| borderColor: 'rgba(124, 58, 237, 0.5)', | |
| backgroundColor: 'rgba(124, 58, 237, 0.1)', | |
| borderWidth: 2, | |
| tension: 0.3, | |
| fill: true | |
| }, | |
| { | |
| label: '2024 - US 277 CAPS ESPERANÇA', | |
| data: [721, 1132, 2706], | |
| borderColor: 'rgba(124, 58, 237, 1)', | |
| backgroundColor: 'rgba(124, 58, 237, 0.2)', | |
| borderWidth: 3, | |
| tension: 0.3, | |
| fill: true | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| title: { | |
| display: true, | |
| text: 'Quantidade de Procedimentos' | |
| } | |
| }, | |
| x: { | |
| title: { | |
| display: true, | |
| text: 'Mês' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.dataset.label + ': ' + context.raw.toLocaleString(); | |
| } | |
| } | |
| }, | |
| legend: { | |
| position: 'top', | |
| } | |
| } | |
| } | |
| }); | |
| // Top Procedures 2023 Chart | |
| const top2023Ctx = document.getElementById('topProcedures2023Chart').getContext('2d'); | |
| const topProcedures2023Chart = new Chart(top2023Ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: [ | |
| 'ATEND. INDIVIDUAL (318)', | |
| 'ATEND. EM GRUPO (318)', | |
| 'ATENÇÃO CRISE (318)', | |
| 'PROMOÇÃO CONTRATUALIDADE (318)', | |
| 'PRÁTICAS EXPRESSIVAS (318)' | |
| ], | |
| datasets: [{ | |
| label: 'Procedimentos 2023', | |
| data: [952, 1361, 641, 922, 584], | |
| backgroundColor: [ | |
| 'rgba(59, 130, 246, 0.7)', | |
| 'rgba(16, 185, 129, 0.7)', | |
| 'rgba(245, 158, 11, 0.7)', | |
| 'rgba(244, 63, 94, 0.7)', | |
| 'rgba(139, 92, 246, 0.7)' | |
| ], | |
| borderColor: [ | |
| 'rgba(59, 130, 246, 1)', | |
| 'rgba(16, 185, 129, 1)', | |
| 'rgba(245, 158, 11, 1)', | |
| 'rgba(244, 63, 94, 1)', | |
| 'rgba(139, 92, 246, 1)' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| indexAxis: 'y', | |
| scales: { | |
| x: { | |
| beginAtZero: true, | |
| title: { | |
| display: true, | |
| text: 'Quantidade' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| display: false | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.raw.toLocaleString() + ' procedimentos'; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Top Procedures 2024 Chart | |
| const top2024Ctx = document.getElementById('topProcedures2024Chart').getContext('2d'); | |
| const topProcedures2024Chart = new Chart(top2024Ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: [ | |
| 'ATEND. EM GRUPO (318)', | |
| 'ATENÇÃO CRISE (318)', | |
| 'ATEND. INDIVIDUAL (318)', | |
| 'PROMOÇÃO CONTRATUALIDADE (318)', | |
| 'ATEND. EM GRUPO (277)' | |
| ], | |
| datasets: [{ | |
| label: 'Procedimentos 2024', | |
| data: [2528, 2284, 1718, 1617, 1795], | |
| backgroundColor: [ | |
| 'rgba(16, 185, 129, 0.7)', | |
| 'rgba(245, 158, 11, 0.7)', | |
| 'rgba(59, 130, 246, 0.7)', | |
| 'rgba(244, 63, 94, 0.7)', | |
| 'rgba(139, 92, 246, 0.7)' | |
| ], | |
| borderColor: [ | |
| 'rgba(16, 185, 129, 1)', | |
| 'rgba(245, 158, 11, 1)', | |
| 'rgba(59, 130, 246, 1)', | |
| 'rgba(244, 63, 94, 1)', | |
| 'rgba(139, 92, 246, 1)' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| indexAxis: 'y', | |
| scales: { | |
| x: { | |
| beginAtZero: true, | |
| title: { | |
| display: true, | |
| text: 'Quantidade' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| display: false | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return context.raw.toLocaleString() + ' procedimentos'; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Unit selector functionality | |
| const allUnitsBtn = document.getElementById('all-units'); | |
| const unit1953Btn = document.getElementById('unit-1953'); | |
| const unit28657Btn = document.getElementById('unit-28657'); | |
| function updateCharts(show1953, show28657) { | |
| // Update monthly comparison chart | |
| monthlyComparisonChart.data.datasets[0].hidden = !show1953; | |
| monthlyComparisonChart.data.datasets[1].hidden = !show28657; | |
| monthlyComparisonChart.update(); | |
| // Update yearly growth chart | |
| yearlyGrowthChart.data.datasets[0].hidden = !show1953; | |
| yearlyGrowthChart.data.datasets[1].hidden = !show1953; | |
| yearlyGrowthChart.data.datasets[2].hidden = !show28657; | |
| yearlyGrowthChart.data.datasets[3].hidden = !show28657; | |
| yearlyGrowthChart.update(); | |
| // Update button styles | |
| if (show1953 && show28657) { | |
| allUnitsBtn.classList.remove('bg-gray-200', 'text-gray-700'); | |
| allUnitsBtn.classList.add('bg-blue-600', 'text-white'); | |
| unit1953Btn.classList.remove('bg-blue-600', 'text-white'); | |
| unit1953Btn.classList.add('bg-gray-200', 'text-gray-700'); | |
| unit28657Btn.classList.remove('bg-blue-600', 'text-white'); | |
| unit28657Btn.classList.add('bg-gray-200', 'text-gray-700'); | |
| } else if (show1953) { | |
| allUnitsBtn.classList.remove('bg-blue-600', 'text-white'); | |
| allUnitsBtn.classList.add('bg-gray-200', 'text-gray-700'); | |
| unit1953Btn.classList.remove('bg-gray-200', 'text-gray-700'); | |
| unit1953Btn.classList.add('bg-blue-600', 'text-white'); | |
| unit28657Btn.classList.remove('bg-blue-600', 'text-white'); | |
| unit28657Btn.classList.add('bg-gray-200', 'text-gray-700'); | |
| } else if (show28657) { | |
| allUnitsBtn.classList.remove('bg-blue-600', 'text-white'); | |
| allUnitsBtn.classList.add('bg-gray-200', 'text-gray-700'); | |
| unit1953Btn.classList.remove('bg-blue-600', 'text-white'); | |
| unit1953Btn.classList.add('bg-gray-200', 'text-gray-700'); | |
| unit28657Btn.classList.remove('bg-gray-200', 'text-gray-700'); | |
| unit28657Btn.classList.add('bg-blue-600', 'text-white'); | |
| } | |
| } | |
| allUnitsBtn.addEventListener('click', () => updateCharts(true, true)); | |
| unit1953Btn.addEventListener('click', () => updateCharts(true, false)); | |
| unit28657Btn.addEventListener('click', () => updateCharts(false, true)); | |
| // Highlight rows on table hover | |
| const tableRows = document.querySelectorAll('tbody tr'); | |
| tableRows.forEach(row => { | |
| row.addEventListener('mouseenter', () => { | |
| const procedureName = row.querySelector('td:first-child').textContent.trim(); | |
| tableRows.forEach(r => { | |
| if (r.querySelector('td:first-child').textContent.trim() === procedureName) { | |
| r.classList.add('highlight'); | |
| } | |
| }); | |
| }); | |
| row.addEventListener('mouseleave', () => { | |
| tableRows.forEach(r => { | |
| r.classList.remove('highlight'); | |
| }); | |
| }); | |
| }); | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=saiane/caps" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |