diff --git a/src/bilirubin_app.js b/src/bilirubin_app.js index 5e83c3b..c1924eb 100644 --- a/src/bilirubin_app.js +++ b/src/bilirubin_app.js @@ -22,7 +22,7 @@ function plotGraphData() { let gestation = document.getElementById('gestation').valueAsNumber; - if (isNaN(gestation) || gestation < 22) { + if (isNaN(gestation) || gestation < 23) { chart.data.datasets[0].data = []; chart.data.datasets[1].data = []; } else { @@ -145,7 +145,7 @@ function updateBilirubin() { resultDiv.className = 'hidden'; return; } - if (isNaN(gestation) || gestation < 22) { + if (isNaN(gestation) || gestation < 23) { resultDiv.className = 'hidden'; return; } diff --git a/src/bilirubin_lib.js b/src/bilirubin_lib.js index 4132177..b407adb 100644 --- a/src/bilirubin_lib.js +++ b/src/bilirubin_lib.js @@ -46,7 +46,7 @@ function phototherapy_thresh(d, gestation) { if (gestation >= 38) { return phototherapy_38wks(d); } - if (gestation < 22) { + if (gestation < 23) { throw new Error('Invalid gestation'); } if (d <= 0) { @@ -63,7 +63,7 @@ function exchange_thresh(d, gestation) { if (gestation >= 38) { return exchange_38wks(d); } - if (gestation < 22) { + if (gestation < 23) { throw new Error('Invalid gestation'); } if (d <= 0) { diff --git a/src/index.html b/src/index.html index 45a25d6..f95f3b9 100644 --- a/src/index.html +++ b/src/index.html @@ -35,7 +35,7 @@