From 48206695583dd66b25fabf9ef1eef9c057854a14 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 25 Jul 2025 18:59:56 +1000 Subject: [PATCH] Gradual disclosure for RWH extra questions --- src/bilirubin_app.js | 15 +++++++++++++++ src/index.html | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/src/bilirubin_app.js b/src/bilirubin_app.js index 44f7bea..3e83d03 100644 --- a/src/bilirubin_app.js +++ b/src/bilirubin_app.js @@ -21,6 +21,21 @@ function updateExtraQuestions() { // Show or hide extra questions according to guideline and gestation + let guideline = document.getElementById('guideline').value; + let gestation = document.getElementById('gestation').valueAsNumber; + + if (guideline === 'rwh') { + document.getElementById('questions_rwh').classList.remove('hidden'); + if (gestation >= 35) { + document.getElementById('questions_rwh_geq35').classList.remove('hidden'); + document.getElementById('questions_rwh_lt35').classList.add('hidden'); + } else { + document.getElementById('questions_rwh_geq35').classList.add('hidden'); + document.getElementById('questions_rwh_lt35').classList.remove('hidden'); + } + } else { + document.getElementById('questions_rwh').classList.add('hidden'); + } } updateExtraQuestions(); diff --git a/src/index.html b/src/index.html index ecdd6ec..a6f3c1e 100644 --- a/src/index.html +++ b/src/index.html @@ -29,6 +29,7 @@

Neonatal jaundice treatment thresholds

+
+
@@ -45,14 +47,51 @@
+ + +
+
+
@@ -63,12 +102,15 @@
+ +
+

Treatment thresholds as per: National Institute for Health and Clinical Excellence. Neonatal jaundice treatment threshold graphs. In: Jaundice in newborn babies under 28 days. London: National Institute for Health and Clinical Excellence; 2023. (NICE clinical guidelines; CG98). https://www.nice.org.uk/guidance/cg98

This tool is made available in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Information provided in this tool is intended for reference by medical professionals. Nothing in this tool is intended to constitute medical advice.