diff --git a/public/js/calculators.js b/public/js/calculators.js
index dd47483..1a5e18a 100644
--- a/public/js/calculators.js
+++ b/public/js/calculators.js
@@ -1427,5 +1427,204 @@
document.getElementById('bili-result').classList.add('hidden');
var bc = document.getElementById('bili-chart-container'); if (bc) bc.classList.add('hidden');
});
+
+ // ═══════════════════════════════════════════════════════════
+ // VITAL SIGNS — Interactive age selector
+ // Harriet Lane Handbook 23rd Edition reference values
+ // ═══════════════════════════════════════════════════════════
+
+ var VITALS_DATA = {
+ preterm: {
+ label: 'Preterm (<37 weeks GA)',
+ hr: { awake: '120-170', sleeping: '100-150' },
+ rr: '40-70',
+ sbp: '55-75', dbp: '35-45',
+ temp: '36.5-37.5',
+ weight: '0.5-2.5 kg',
+ spo2: '88-95% (target)',
+ notes: [
+ 'HR and RR are highly variable and depend on gestational age',
+ 'BP increases with gestational age and postnatal age',
+ 'Target SpO2 88-95% to reduce retinopathy of prematurity risk',
+ 'Temperature instability is common — use servo-controlled warmers',
+ 'Bradycardia (<100 bpm) and apnea are common in premature infants'
+ ]
+ },
+ newborn: {
+ label: 'Newborn (0-28 days)',
+ hr: { awake: '100-165', sleeping: '90-145' },
+ rr: '30-60',
+ sbp: '60-80', dbp: '35-55',
+ temp: '36.5-37.5',
+ weight: '2.5-4.5 kg',
+ spo2: '>95%',
+ notes: [
+ 'HR normally increases with crying (up to 180-190 bpm) — this is physiologic',
+ 'Periodic breathing (pauses <10 sec) is normal in newborns',
+ 'Acrocyanosis (blue hands/feet) is normal; central cyanosis is not',
+ 'BP is best measured in the right arm (pre-ductal)',
+ 'Normal weight loss of 5-7% in first 3-5 days; regain by 10-14 days'
+ ]
+ },
+ '1-6mo': {
+ label: '1-6 Months',
+ hr: { awake: '100-150', sleeping: '85-135' },
+ rr: '30-53',
+ sbp: '70-90', dbp: '40-63',
+ temp: '36.5-37.5',
+ weight: '4-8 kg',
+ spo2: '>95%',
+ notes: [
+ 'Expected weight gain: 20-30 g/day (150-200 g/week)',
+ 'HR gradually decreases as vagal tone matures',
+ 'RR >60 at rest may indicate lower respiratory tract disease',
+ 'BP should be measured with appropriate cuff size (width 40% of arm circumference)'
+ ]
+ },
+ '6-12mo': {
+ label: '6-12 Months',
+ hr: { awake: '80-140', sleeping: '75-130' },
+ rr: '25-40',
+ sbp: '72-95', dbp: '40-65',
+ temp: '36.0-37.5',
+ weight: '8-10 kg',
+ spo2: '>95%',
+ notes: [
+ 'Expected weight: triple birth weight by 12 months (~10 kg average)',
+ 'Weight gain slows to ~10-15 g/day',
+ 'Sinus arrhythmia (HR varies with breathing) is normal',
+ 'Febrile tachycardia: HR increases ~10 bpm per 1 degree C above 37'
+ ]
+ },
+ '1-3yr': {
+ label: '1-3 Years',
+ hr: { awake: '80-130', sleeping: '70-120' },
+ rr: '20-30',
+ sbp: '80-105', dbp: '45-70',
+ temp: '36.0-37.5',
+ weight: '10-15 kg',
+ spo2: '>95%',
+ notes: [
+ 'Expected weight gain: ~200-250 g/month (2-2.5 kg/year)',
+ 'Tachycardia: HR >130 at rest warrants evaluation',
+ 'Tachypnea: RR >30 at rest may indicate respiratory distress',
+ 'BP screening begins at age 3 per AAP 2017 guidelines',
+ 'Estimated weight: 2 x (age in years) + 8'
+ ]
+ },
+ '4-5yr': {
+ label: '4-5 Years',
+ hr: { awake: '75-120', sleeping: '65-110' },
+ rr: '20-25',
+ sbp: '85-108', dbp: '48-70',
+ temp: '36.0-37.5',
+ weight: '15-20 kg',
+ spo2: '>95%',
+ notes: [
+ 'Annual BP screening recommended from age 3',
+ 'Normal BP <90th percentile for age, sex, and height',
+ 'Elevated BP: 90th to <95th percentile (or 120/80 if lower)',
+ 'Estimated weight: 2 x (age in years) + 8',
+ 'ETT size (uncuffed): (age/4) + 4 = 5.0-5.25'
+ ]
+ },
+ '6-9yr': {
+ label: '6-9 Years',
+ hr: { awake: '70-115', sleeping: '60-105' },
+ rr: '18-24',
+ sbp: '88-115', dbp: '50-75',
+ temp: '36.0-37.5',
+ weight: '20-30 kg',
+ spo2: '>95%',
+ notes: [
+ 'Resting HR >115 or <60 warrants evaluation',
+ 'BP should be measured at every clinical encounter',
+ 'Stage 1 HTN: >=95th percentile on 3 separate occasions',
+ 'Estimated weight: 3 x (age in years) + 7',
+ 'ETT size (cuffed): (age/4) + 3.5 = 5.0-5.75'
+ ]
+ },
+ '10-12yr': {
+ label: '10-12 Years',
+ hr: { awake: '65-110', sleeping: '58-100' },
+ rr: '16-22',
+ sbp: '95-120', dbp: '55-78',
+ temp: '36.0-37.5',
+ weight: '30-45 kg',
+ spo2: '>95%',
+ notes: [
+ 'Pre-pubertal and early pubertal changes may affect vitals',
+ 'Orthostatic hypotension may emerge during growth spurts',
+ 'BP classification uses percentile tables for age <13',
+ 'HR may decrease with athletic training',
+ 'ETT size (cuffed): (age/4) + 3.5 = 6.0-6.5'
+ ]
+ },
+ '13-15yr': {
+ label: '13-15 Years',
+ hr: { awake: '60-100', sleeping: '50-90' },
+ rr: '14-20',
+ sbp: '100-128', dbp: '58-80',
+ temp: '36.0-37.5',
+ weight: '45-65 kg',
+ spo2: '>95%',
+ notes: [
+ 'From age 13: use adult BP thresholds (AAP 2017)',
+ 'Normal: <120/<80 mmHg',
+ 'Elevated: 120-129/<80 mmHg',
+ 'Stage 1 HTN: 130-139/80-89 mmHg',
+ 'Stage 2 HTN: >=140/>=90 mmHg',
+ 'Athletic bradycardia (HR 45-60) may be normal in trained adolescents'
+ ]
+ },
+ '16-18yr': {
+ label: '16-18 Years',
+ hr: { awake: '55-95', sleeping: '45-85' },
+ rr: '12-18',
+ sbp: '105-135', dbp: '60-85',
+ temp: '36.0-37.5',
+ weight: '55-80 kg',
+ spo2: '>95%',
+ notes: [
+ 'Vital signs approach adult values',
+ 'Adult BP thresholds apply (same as age 13+)',
+ 'Orthostatic vitals: measure lying, sitting, standing if dizzy',
+ 'Positive orthostatic test: SBP drop >20 or DBP drop >10 on standing',
+ 'Consider screening for eating disorders if bradycardia + low BMI'
+ ]
+ }
+ };
+
+ var vitalsSelect = document.getElementById('vitals-age-select');
+ if (vitalsSelect) {
+ vitalsSelect.addEventListener('change', function() {
+ var key = vitalsSelect.value;
+ var resultDiv = document.getElementById('vitals-result');
+ if (!key || !VITALS_DATA[key]) { resultDiv.classList.add('hidden'); return; }
+
+ var v = VITALS_DATA[key];
+ resultDiv.classList.remove('hidden');
+ resultDiv.innerHTML =
+ '' +
+ '
' +
+ '
Heart Rate (awake)
' + v.hr.awake + '
bpm
' +
+ '
Heart Rate (sleep)
' + v.hr.sleeping + '
bpm
' +
+ '
Respiratory Rate
' + v.rr + '
breaths/min
' +
+ '
Systolic BP
' + v.sbp + '
mmHg
' +
+ '
Diastolic BP
' + v.dbp + '
mmHg
' +
+ '
Temperature
' + v.temp + '
°C
' +
+ '
' +
+ '
Weight Range
' + v.weight + '
' +
+ '
' +
+ '
' +
+ '
Clinical Notes
' +
+ '
' +
+ v.notes.map(function(n) { return '- ' + n + '
'; }).join('') +
+ '
' +
+ '
';
+ });
+ }
}
})();