diff --git a/order-helper/index.html b/order-helper/index.html index 1eae62f..203b4b0 100644 --- a/order-helper/index.html +++ b/order-helper/index.html @@ -6,28 +6,18 @@ --- - + @@ -36,13 +26,24 @@ document.addEventListener('DOMContentLoaded', async () => { const s = document.getElementById('status'); if (!s) return; + + const url = document.querySelector('meta[name="oh-rules-path"]')?.content; + if (!url) { + s.textContent = 'Missing oh-rules-path meta.'; + s.className = 'status error'; + return; + } + try { - const url = document.querySelector('meta[name="oh-rules-path"]')?.content; - if (!url) { s.textContent = 'Missing oh-rules-path meta.'; s.className = 'status error'; return; } s.textContent = 'Boot check… fetching rules…'; const r = await fetch(url, { cache: 'no-store' }); - if (r.ok) { s.textContent = 'Boot check OK. Loading app…'; s.className = 'status success'; } - else { s.textContent = `Rules fetch failed (${r.status}). Check path/case: ` + url; s.className = 'status error'; } + if (r.ok) { + s.textContent = 'Boot check OK. Loading app…'; + s.className = 'status success'; + } else { + s.textContent = `Rules fetch failed (${r.status}). Check path/case: ` + url; + s.className = 'status error'; + } } catch (e) { s.textContent = 'Rules fetch error: ' + e.message; s.className = 'status error'; @@ -72,6 +73,7 @@
- Rules load from /order-helper/data/rules.json. You can update that file anytime
- (no code changes). The selector scores by keywords, context, and region; if weak, it falls
- back to generic oncology tags.
+ Rules load from /order-helper/data/rules.json. You can update that file anytime (no code changes). The selector scores by keywords, context, and region; if weak, it falls back to generic oncology tags.