// JavaScript Document $(document).ready(function () { function befundStad(){ var pT = "T0"; var pN = "Nx"; var pM = "Mx"; var LDH = ""; var t = parseFloat($("input#breslow").val()); var ulz = $("input#ulz").is(':checked') ? true : false; switch (true) { case (t > 0 && t < 0.8 && !ulz): pT = "T1a"; break; case ((t > 0 && t < 0.8 && ulz) || (t >= 0.8 && t <= 1)): pT = "T1b"; break; case (t > 1 && t <= 2 && !ulz): pT = "T2a"; break; case (t > 1 && t <= 2 && ulz): pT = "T2b"; break; case (t > 2 && t <= 4 && !ulz): pT = "T3a"; break; case (t > 2 && t <= 4 && ulz): pT = "T3b"; break; case (t > 4 && !ulz): pT = "T4a"; break; case (t > 4 && ulz): pT = "T4b"; break; default: pT = "T0"; break; } pN = $('input[name=N]:checked').val(); if (typeof pN === 'undefined') { pN = "Nx"; } pM = $('input[name=M]:checked').val(); if (typeof pM === 'undefined') { pM = "Mx"; LDH=""; } LDH = '(' + $('input[name=LDH]:checked').val() + ')'; if (typeof LDH === 'undefined' || LDH.indexOf("undefined") !== -1 || LDH === '()' || pM === "M0" || pM === "Mx") { LDH = ""; } showStad(pT, pN, pM+LDH); } function changeLang() { var lang = $("select#langSelect").val(); if (lang != null && lang != ""){ location.replace("./index.jsp?language=" +lang); } } function showStad(t, n, m) { var pT = t === null ? $("select#selectT").val() : t; var pN = n === null ? $("select#selectN").val() : n; var pM = m === null ? $("select#selectM").val() : m; var stadNr = "?"; var stadChar = "?"; var vorl = "", clinical = ""; $("select#selectT").val(pT); $("select#selectN").val(pN); $("select#selectM").val(pM); if (pT && pN && pM) { if (pM.charAt(1) !== "1") { if ((pT === "T1a" || pT === "T1b") && (pN === "N0")) { stadNr = "I"; stadChar = "A"; }else if ((pT === "T1a") && (pN === "Nx")) { stadNr = "I"; stadChar = "A"; }else if ((pT === "T1b") && (pN === "Nx")) { stadNr = "I"; stadChar = "B"; clinical = ' (clinical )\³\<\/a\>'; } else if ((pT === "T2a") && (pN === "N0" || pN === "Nx")) { stadNr = "I"; stadChar = "B"; } else if ((pT === "T3a" || pT === "T2b") && (pN === "N0" || pN === "Nx")) { stadNr = "II"; stadChar = "A"; } else if ((pT === "T4a" || pT === "T3b") && (pN === "N0" || pN === "Nx")) { stadNr = "II"; stadChar = "B"; } else if ((pT === "T4b") && (pN === "N0" || pN === "Nx")) { stadNr = "II"; stadChar = "C"; } else if ((pT.indexOf("T1") !== -1 || pT === "T2a") && (pN === "N1a" || pN === "N2a")) { stadNr = "III"; stadChar = "A"; } else if (((pT === "T0" || pT === "Tx") && (pN === "N1a" || pN === "N2a" || pN === "N3a"))) { stadNr = "Berechnung "; stadChar = "nicht möglich"; } else if ((pT === "T2b" || pT === "T3a") && (pN.charAt(1) === "1" || pN === "N2a" || pN === "N2b")) { stadNr = "III"; stadChar = "B"; } else if (((pT === "T0" || pT === "Tx") && (pN === "N1b" || pN === "N1c") || ((pT.indexOf("T1") !== -1 || pT === "T2a") && (pN === "N1b" || pN === "N1c" || pN === "N2b")))) { stadNr = "III"; stadChar = "B"; } else if (((pT === "T0" || pT === "Tx") && (pN === "N2b" || pN === "N2c" || pN === "N3b" || pN === "N3c"))) { stadNr = "III"; stadChar = "C"; } else if ((pT.charAt(1) === "1" || pT.charAt(1) === "2" || pT === "T3a") && (pN.charAt(1) === "3" || pN === "N2c")) { stadNr = "III"; stadChar = "C"; } else if ((pT === "T3b" || pT === "T4a") && (parseInt(pN.charAt(1)) > 0)) { stadNr = "III"; stadChar = "C"; } else if ((pT === "T4b") && (parseInt(pN.charAt(1)) > 0 && parseInt(pN.charAt(1)) < 3)) { stadNr = "III"; stadChar = "C"; } else if ((pT === "T4b") && (parseInt(pN.charAt(1)) === 3)) { stadNr = "III"; stadChar = "D"; } if (pN === "Nx" || pM === "Mx") { vorl = ' (prel. )\¹\<\/a\>'; } if (pT === "Tis") { stadNr = "0"; stadChar = ""; vorl = ""; } } else { stadNr = "IV"; stadChar = ""; } } $(".result").html('Your stage: ' + stadNr + stadChar + vorl + clinical); $(".tnmcalc").html("

TNM classification (AJCC 8th edition): " + pT + pN + pM + "

"); if (stadNr === "?" || stadNr === "0") { $(".result").css("color", "#008000"); } else if (stadNr === "I" || stadNr === "II") { $(".result").css("color", "#EC7601"); } else { $(".result").css("color", "#800000"); } return "Dein Stadium:" + stadNr + stadChar + vorl; } $("form#befund input").bind("change", function () { setTimeout(function () { befundStad(); }, 100); return true; }); $("form#tnm select").bind("change", function () { showStad(null, null, null); }); $("form#lang select").bind("change", function () { changeLang(); }); $("form#tnm").bind("submit", function () { showStad(null, null, null); return false; }); $("form#befund").bind("submit", function () { befundStad(); return false; }); $('.content p, .container p,.container td, .block p, .footer li, .container span, .block strong, .form-container label') .highlight('TNM classification', 'TNM classification') .highlight('tumor thickness', 'tumor thickness') .highlight('ulceration', 'ulceration') .highlight('sentinel lymph node', 'sentinel lymph node') .highlight('in-transit', 'in-transit') .highlight('distant metastasis', 'distant metastasis') .highlight('visceral', 'Viszeralorgane') .highlight('CNS', 'CNS') .highlight('LDH', 'LDH') .highlight('pT1aN0M0', 'pT1aN0M0') .highlight('AJCC', 'AJCC') .highlight('occult', 'occult') .highlight('okkulter', 'occult') ; $(document).on('click', '.footer .highlight, .content .highlight, p .highlight, td .highlight, span .highlight, label .highlight', function () { $('.ttip').remove(); var template = '
' + $(this).data('headline') + '' + highlights[$(this).data('tooltip')] + '
'; $(template).appendTo('body'); if (navigator.userAgent.match(/iPhone OS 7/i) || navigator.userAgent.match(/iPhone OS 4/i) || navigator.userAgent.match(/iPhone OS 5/i)) { //$('.ttip').css("left", "0px"); } $('.ttip').fadeIn(); }); $(document).on('click', '#tooltip__close', function () { $('.ttip').fadeOut().remove(); }); }); // Highlight var highlights = []; highlights['TNM classification'] = 'The TNM Classification of Malignant Tumours (TNM) is a notation system that describes the stage of a cancer which originates from a solid tumour with alphanumeric codes:
T (Tumour) describes the size of the primary tumour,
N (Nodus) describes nearby (regional) lymph nodes that are involved
M (Metastasis) describes presence and site of distant metastasis'; highlights['ulceration'] = 'Ulceration is defined as the full thickness absence of an intact epidermis above any portion of the primary tumor with an associated host reaction based on histopathological examination.'; highlights['tumor thickness'] = 'Tumor depth is one of the cornerstones of the current AJCC TNM staging of malignant melanoma. Tumor depth is most accurately measured by evaluating the entire tumor via an excisional biopsy. Breslow depth is measured from the epidermis down to the deepest point of invasion. '; highlights['sentinel lymph node'] = 'The sentinel lymph node is the first lymph node or group of nodes draining a cancer.'; highlights['in-transit'] = 'metastasis in which skin cancer spreads through a lymph vessel and begins to grow more than 2 centimeters away from the primary tumor but before it reaches the nearest lymph node'; highlights['distant metastasis'] = 'Cancer has spread from the original (primary) tumor to distant organs or distant lymph nodes. Also known as distant cancer.'; highlights['Viszeralorgane'] = 'the soft internal organs of the body and the organs of the digestive, excretory, reproductive, and circulatory systems.'; highlights['CNS'] = 'The brain and spinal cord. Also called central nervous system.'; highlights['LDH'] = 'Serum LDH (lactate dehydrogenase) level is a clinically significant factor associated with response, progression-free survival, MSS, and overall survival among patients with stage IV disease'; highlights['AJCC'] = '
American Joint Commitee on Cancer'; highlights['pT1aN0M0'] = 'Please note that the TNM classification changed on 2018/01/01. For the new classification, please enter the data below!'; highlights['occult'] = '“Clinically occult” nodal metastasis - microscopically identified regional node metastasis detected by SLN biopsy and without clinical or radiographic evidence of regional node metastasis (termed “microscopic” nodal metastasis in prior editions). '; jQuery.fn.highlight = function (str, tooltip) { var regex = new RegExp("\\b" + str + "\\b", "g"); //var i = 0; return this.each(function () { $(this).contents().filter(function () { return this.nodeType === 3 && regex.test(this.nodeValue); }).replaceWith(function () { return (this.nodeValue || '').replace(regex, function (mtch) { return '' + mtch + ''; }); }); }); };