From 4fbfc913d00d8def4c30c7edc926c0690b2a461d Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 9 Apr 2026 17:56:30 +0200 Subject: [PATCH] Add pediatric calculators: BP, BMI, growth, bilirubin, vitals, BSA, dosing Calculators tab with 7 tools: - BP Percentile (AAP 2017) with age/sex/height classification - BMI Percentile (CDC 2000) with extended obesity classification (Class 1/2/3 using % of 95th percentile per CDC 2022) - Growth Charts: weight-for-age, length-for-age, head circumference, weight-for-length (WHO/CDC LMS), Fenton preterm (22-50 weeks) - Bilirubin: AAP 2022 phototherapy threshold + Bhutani nomogram with Nelson Table 137.1 risk factors for severe hyperbilirubinemia - Vital Signs by Age (Harriet Lane) with quick reference formulas (estimated weight, min SBP, ETT size, maintenance fluids 4-2-1) - Body Surface Area (Mosteller formula) - Weight-Based Dosing with max cap and volume calculation Fix growth chart sub-tab navigation (pills scoped separately from top-level nav to prevent panel disappearing) --- public/components/calculators.html | 424 +++++++++++++++++ public/css/styles.css | 17 + public/index.html | 6 + public/js/calculators.js | 728 +++++++++++++++++++++++++++++ 4 files changed, 1175 insertions(+) create mode 100644 public/components/calculators.html create mode 100644 public/js/calculators.js diff --git a/public/components/calculators.html b/public/components/calculators.html new file mode 100644 index 0000000..6cf3030 --- /dev/null +++ b/public/components/calculators.html @@ -0,0 +1,424 @@ +
+

Pediatric Calculators

+

Clinical calculators for pediatric medicine

+
+ + +
+ + + + + + + +
+ + +
+
+
+

Blood Pressure Percentile

+ AAP 2017 Clinical Practice Guideline +
+
+

Based on normative tables for normal-weight children ages 1-17. Flynn et al., Pediatrics 2017;140(3):e20171904.

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/public/css/styles.css b/public/css/styles.css index fcc28f2..220d970 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -264,6 +264,23 @@ textarea.full-input{resize:vertical;} .faq-answer strong{color:var(--g800);} .faq-answer em{color:var(--g500);font-size:12.5px;} +/* Calculators */ +.calc-pill,.calc-nav-pill{padding:8px 16px;border-radius:20px;border:1.5px solid var(--g200);background:white;font-size:13px;font-weight:600;color:var(--g600);cursor:pointer;transition:all 0.15s;} +.calc-pill:hover,.calc-nav-pill:hover{border-color:var(--blue);color:var(--blue);} +.calc-pill.active,.calc-nav-pill.active{background:var(--blue);color:white;border-color:var(--blue);} +.calc-panel.hidden{display:none;} +.calc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:12px;} +.calc-field label{display:block;font-size:12px;font-weight:600;color:var(--g600);margin-bottom:3px;} +.calc-field input,.calc-field select{width:100%;padding:8px 10px;border:1.5px solid var(--g300);border-radius:6px;font-size:13px;font-family:inherit;} +.calc-field input:focus,.calc-field select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-light);} +.calc-result{margin-top:16px;} +.calc-result-header{padding:16px;border-radius:10px;border-left:4px solid;text-align:center;} +.calc-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-top:12px;} +.calc-result-item{padding:12px;background:var(--g50);border-radius:8px;text-align:center;} +.calc-result-label{font-size:11px;font-weight:600;color:var(--g500);text-transform:uppercase;letter-spacing:0.5px;} +.calc-result-value{font-size:24px;font-weight:700;color:var(--g800);margin:4px 0;} +.calc-result-sub{font-size:11px;color:var(--g500);} + /* Non-blocking inline busy bar */ .busy-bar{position:sticky;top:0;z-index:100;display:none;align-items:center;gap:8px;padding:8px 16px;background:linear-gradient(135deg,#eff6ff,#e0f2fe);border-bottom:1px solid #bfdbfe;font-size:13px;font-weight:500;color:#1d4ed8;animation:busySlideIn 0.2s ease;} .busy-bar.active{display:flex;} diff --git a/public/index.html b/public/index.html index 89eba52..feb76d7 100644 --- a/public/index.html +++ b/public/index.html @@ -213,6 +213,10 @@ Catch-Up Schedule +