Add placeholder RWH dropdown

This commit is contained in:
RunasSudo 2025-07-25 18:21:22 +10:00
parent 39b3131939
commit 267c11e37c
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,10 @@ function plotGraphData() {
} else if (guideline === 'nice') { } else if (guideline === 'nice') {
chart.data.datasets[0].data = [...Array(14*24).keys()].map((i) => i / 24).map((d) => ({x: d, y: nice_phototherapy_thresh(d, gestation)})); chart.data.datasets[0].data = [...Array(14*24).keys()].map((i) => i / 24).map((d) => ({x: d, y: nice_phototherapy_thresh(d, gestation)}));
chart.data.datasets[1].data = [...Array(14*24).keys()].map((i) => i / 24).map((d) => ({x: d, y: nice_exchange_thresh(d, gestation)})); chart.data.datasets[1].data = [...Array(14*24).keys()].map((i) => i / 24).map((d) => ({x: d, y: nice_exchange_thresh(d, gestation)}));
} else if (guideline === 'rwh') {
// NYI
chart.data.datasets[0].data = [];
chart.data.datasets[1].data = [];
} else { } else {
throw new Error('Unexpected guideline'); throw new Error('Unexpected guideline');
} }
@ -176,6 +180,10 @@ function updateBilirubin() {
if (guideline === 'nice') { if (guideline === 'nice') {
[d, result_text, text_colour, background_colour, accent_colour] = describeBilirubin(gestation, new Date(document.getElementById('time_birth').value), new Date(document.getElementById('time_measurement').value), bilirubin); [d, result_text, text_colour, background_colour, accent_colour] = describeBilirubin(gestation, new Date(document.getElementById('time_birth').value), new Date(document.getElementById('time_measurement').value), bilirubin);
} else if (guideline === 'rwh') {
// NYI
resultDiv.className = 'hidden';
return;
} else { } else {
throw new Error('Unexpected guideline'); throw new Error('Unexpected guideline');
} }

View File

@ -33,6 +33,7 @@
<label for="guideline" class="text-sm font-medium text-gray-900 pt-1.5">Guideline:</label> <label for="guideline" class="text-sm font-medium text-gray-900 pt-1.5">Guideline:</label>
<select id="guideline" onchange="updateExtraQuestions();plotGraphData();updateBilirubin()" class="col-span-2 w-full rounded-md shadow-sm border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 text-sm"> <select id="guideline" onchange="updateExtraQuestions();plotGraphData();updateBilirubin()" class="col-span-2 w-full rounded-md shadow-sm border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 text-sm">
<option value="nice" selected>National Institute for Health and Clinical Excellence (NICE)</option> <option value="nice" selected>National Institute for Health and Clinical Excellence (NICE)</option>
<option value="rwh">Royal Women's Hospital (RWH)</option>
</select> </select>
</div> </div>
<div class="sm:grid sm:grid-cols-3"> <div class="sm:grid sm:grid-cols-3">