Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisioneRevisione precedente | |||
docuneo:nec_calculator [2025/07/13 07:54] – admin | docuneo:nec_calculator [2025/07/13 09:30] (versione attuale) – eliminata admin | ||
---|---|---|---|
Linea 1: | Linea 1: | ||
- | < | ||
- | <html lang=" | ||
- | < | ||
- | <meta charset=" | ||
- | <meta name=" | ||
- | < | ||
- | < | ||
- | /* Stili compatibili con DokuWiki */ | ||
- | .nec-calculator { | ||
- | font-family: | ||
- | max-width: 900px; | ||
- | margin: 20px auto; | ||
- | background: #fff; | ||
- | border: 1px solid #ccc; | ||
- | border-radius: | ||
- | padding: 20px; | ||
- | } | ||
- | | ||
- | .nec-title { | ||
- | text-align: center; | ||
- | color: #333; | ||
- | margin-bottom: | ||
- | font-size: 24px; | ||
- | font-weight: | ||
- | } | ||
- | | ||
- | .section { | ||
- | margin-bottom: | ||
- | border: 2px solid #666; | ||
- | border-radius: | ||
- | overflow: hidden; | ||
- | } | ||
- | | ||
- | .section-header { | ||
- | padding: 10px 15px; | ||
- | font-weight: | ||
- | color: white; | ||
- | display: flex; | ||
- | justify-content: | ||
- | align-items: | ||
- | font-size: 16px; | ||
- | } | ||
- | | ||
- | .general { background-color: | ||
- | .abdominal { background-color: | ||
- | .biliare { background-color: | ||
- | .investigations { background-color: | ||
- | .xray { background-color: | ||
- | | ||
- | .section-content { | ||
- | background-color: | ||
- | } | ||
- | | ||
- | .item { | ||
- | display: flex; | ||
- | justify-content: | ||
- | align-items: | ||
- | padding: 12px 15px; | ||
- | border-bottom: | ||
- | background-color: | ||
- | } | ||
- | | ||
- | .item: | ||
- | background-color: | ||
- | } | ||
- | | ||
- | .item: | ||
- | border-bottom: | ||
- | } | ||
- | | ||
- | .item-text { | ||
- | flex: 1; | ||
- | font-size: 14px; | ||
- | } | ||
- | | ||
- | .item-score { | ||
- | font-weight: | ||
- | margin: 0 15px; | ||
- | min-width: 30px; | ||
- | text-align: center; | ||
- | } | ||
- | | ||
- | .checkbox-container { | ||
- | display: flex; | ||
- | align-items: | ||
- | } | ||
- | | ||
- | .custom-checkbox { | ||
- | width: 20px; | ||
- | height: 20px; | ||
- | cursor: pointer; | ||
- | transform: scale(1.2); | ||
- | } | ||
- | | ||
- | .scoring-summary { | ||
- | margin-top: 30px; | ||
- | padding: 20px; | ||
- | border: 3px solid #333; | ||
- | border-radius: | ||
- | background: linear-gradient(135deg, | ||
- | } | ||
- | | ||
- | .subtotal { | ||
- | display: flex; | ||
- | justify-content: | ||
- | margin: 8px 0; | ||
- | font-weight: | ||
- | padding: 5px 10px; | ||
- | background-color: | ||
- | border-radius: | ||
- | } | ||
- | | ||
- | .total-score { | ||
- | font-size: 24px; | ||
- | text-align: center; | ||
- | margin: 20px 0; | ||
- | padding: 15px; | ||
- | border: 2px solid #333; | ||
- | border-radius: | ||
- | background-color: | ||
- | } | ||
- | | ||
- | .interpretation { | ||
- | text-align: center; | ||
- | font-size: 18px; | ||
- | font-weight: | ||
- | padding: 15px; | ||
- | border-radius: | ||
- | margin-top: 15px; | ||
- | } | ||
- | | ||
- | .risk-low { background-color: | ||
- | .risk-moderate { background-color: | ||
- | .risk-high { background-color: | ||
- | .risk-very-high { background-color: | ||
- | | ||
- | .special-note { | ||
- | background-color: | ||
- | border: 1px solid #ffeaa7; | ||
- | border-radius: | ||
- | padding: 10px; | ||
- | margin: 10px 0; | ||
- | font-style: italic; | ||
- | font-size: 13px; | ||
- | } | ||
- | | ||
- | .reset-button { | ||
- | background-color: | ||
- | color: white; | ||
- | border: none; | ||
- | padding: 10px 20px; | ||
- | border-radius: | ||
- | cursor: pointer; | ||
- | font-size: 16px; | ||
- | margin-top: 20px; | ||
- | } | ||
- | | ||
- | .reset-button: | ||
- | background-color: | ||
- | } | ||
- | | ||
- | .print-button { | ||
- | background-color: | ||
- | color: white; | ||
- | border: none; | ||
- | padding: 10px 20px; | ||
- | border-radius: | ||
- | cursor: pointer; | ||
- | font-size: 16px; | ||
- | margin-top: 20px; | ||
- | margin-left: | ||
- | } | ||
- | | ||
- | .print-button: | ||
- | background-color: | ||
- | } | ||
- | </ | ||
- | </ | ||
- | < | ||
- | <div class=" | ||
- | <h1 class=" | ||
- | | ||
- | <!-- Segni Generali --> | ||
- | <div class=" | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | <!-- Segni Addominali --> | ||
- | <div class=" | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | <!-- Vomito Biliare --> | ||
- | <div class=" | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | <div class=" | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | <!-- Indagini --> | ||
- | <div class=" | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | <!-- Radiografia Addominale --> | ||
- | <div class=" | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | <div class=" | ||
- | <span class=" | ||
- | <span class=" | ||
- | <div class=" | ||
- | <input type=" | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | <!-- Riassunto Punteggi --> | ||
- | <div class=" | ||
- | <h3 style=" | ||
- | | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | <div class=" | ||
- | < | ||
- | < | ||
- | </ | ||
- | | ||
- | <div class=" | ||
- | < | ||
- | </ | ||
- | | ||
- | <div id=" | ||
- | Inserire i dati per la valutazione | ||
- | </ | ||
- | | ||
- | <div style=" | ||
- | <button class=" | ||
- | <button class=" | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | < | ||
- | function updateScore() { | ||
- | // Calcola punteggi grezzi per ogni categoria | ||
- | var generalRaw = 0; | ||
- | var abdominalRaw = 0; | ||
- | var biliareRaw = 0; | ||
- | var investigationsRaw = 0; | ||
- | var xrayRaw = 0; | ||
- | | ||
- | // Segni Generali (max 2) | ||
- | var generalChecked = document.querySelectorAll(' | ||
- | for (var i = 0; i < generalChecked.length; | ||
- | generalRaw += parseInt(generalChecked[i].getAttribute(' | ||
- | } | ||
- | var generalFinal = Math.min(generalRaw, | ||
- | | ||
- | // Segni Addominali | ||
- | var abdominalChecked = document.querySelectorAll(' | ||
- | for (var i = 0; i < abdominalChecked.length; | ||
- | abdominalRaw += parseInt(abdominalChecked[i].getAttribute(' | ||
- | } | ||
- | | ||
- | // Vomito Biliare | ||
- | var biliareChecked = document.querySelectorAll(' | ||
- | for (var i = 0; i < biliareChecked.length; | ||
- | biliareRaw += parseInt(biliareChecked[i].getAttribute(' | ||
- | } | ||
- | | ||
- | // Totale Addominali + Biliare (max 8) | ||
- | var abdominalTotalFinal = Math.min(abdominalRaw + biliareRaw, 8); | ||
- | | ||
- | // Indagini (max 5) | ||
- | var investigationsChecked = document.querySelectorAll(' | ||
- | for (var i = 0; i < investigationsChecked.length; | ||
- | investigationsRaw += parseInt(investigationsChecked[i].getAttribute(' | ||
- | } | ||
- | var investigationsFinal = Math.min(investigationsRaw, | ||
- | | ||
- | // Radiografia (nessun limite) | ||
- | var xrayChecked = document.querySelectorAll(' | ||
- | for (var i = 0; i < xrayChecked.length; | ||
- | xrayRaw += parseInt(xrayChecked[i].getAttribute(' | ||
- | } | ||
- | var xrayFinal = xrayRaw; | ||
- | | ||
- | // Aggiorna display headers | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | | ||
- | // Aggiorna riassunto | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | | ||
- | // Calcola punteggio totale | ||
- | var totalScore = generalFinal + abdominalTotalFinal + investigationsFinal + xrayFinal; | ||
- | if (document.getElementById(' | ||
- | document.getElementById(' | ||
- | } | ||
- | | ||
- | // Aggiorna l' | ||
- | updateInterpretation(totalScore); | ||
- | } | ||
- | | ||
- | function updateInterpretation(score) { | ||
- | var interpretationElement = document.getElementById(' | ||
- | if (!interpretationElement) return; | ||
- | | ||
- | var interpretation, | ||
- | | ||
- | if (score <= 5) { | ||
- | interpretation = "🟢 BASSO RISCHIO - Monitoraggio di routine"; | ||
- | className = " | ||
- | } else if (score <= 10) { | ||
- | interpretation = "🟡 RISCHIO MODERATO - Monitoraggio stretto consigliato"; | ||
- | className = " | ||
- | } else if (score <= 15) { | ||
- | interpretation = "🟠 ALTO RISCHIO - Considerare terapia intensiva"; | ||
- | className = " | ||
- | } else { | ||
- | interpretation = "🔴 RISCHIO MOLTO ALTO - Valutare urgentemente intervento chirurgico"; | ||
- | className = " | ||
- | } | ||
- | | ||
- | interpretationElement.textContent = interpretation; | ||
- | interpretationElement.className = className; | ||
- | } | ||
- | | ||
- | function resetCalculator() { | ||
- | // Deseleziona tutte le checkbox | ||
- | var checkboxes = document.querySelectorAll(' | ||
- | for (var i = 0; i < checkboxes.length; | ||
- | checkboxes[i].checked = false; | ||
- | } | ||
- | | ||
- | // Aggiorna tutti i punteggi | ||
- | updateScore(); | ||
- | } | ||
- | | ||
- | function printResults() { | ||
- | window.print(); | ||
- | } | ||
- | | ||
- | // Inizializza il calcolatore quando la pagina è caricata | ||
- | function initCalculator() { | ||
- | updateScore(); | ||
- | } | ||
- | | ||
- | // Compatibilità cross-browser per l' | ||
- | if (document.addEventListener) { | ||
- | document.addEventListener(' | ||
- | } else if (document.attachEvent) { | ||
- | document.attachEvent(' | ||
- | if (document.readyState === ' | ||
- | initCalculator(); | ||
- | } | ||
- | }); | ||
- | } else { | ||
- | window.onload = initCalculator; | ||
- | } | ||
- | </ | ||
- | </ | ||
- | </ |