FAILURE MAP
← Case archive

FA-64521 / Clinical triage scoring / Open access

Paediatric warning score with age-banded vital ranges: two-sided heart rate deviation · case 01

Bradycardic infants score 0 for heart rate.

Verified by executionVariant 1 · 11 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Only tachycardia is measured; heart rates below the range give no deviation.

THE FAILURE

Only tachycardia is measured; heart rates below the range give no deviation.

Unsuccessful approach: Measuring from the band midpoint scores normal heart rates as abnormal.

Case contract

Input {age_months, hr, rr, behavior, crt_s, o2_lpm}. Toy normal ranges by age: < 12 months HR 100-160 RR 30-50; 12-47 HR 90-150 RR 24-40; 48-143 HR 70-120 RR 18-30; >= 144 HR 60-100 RR 12-20. Deviation = distance outside the range (0 inside). Cardiovascular: 2 if HR deviation > 20 or refill >= 4 s, 1 if any HR deviation or refill 3 s, else 0. Respiratory: 2 if RR deviation > 10 or oxygen >= 4 L/min, 1 if any RR deviation or any oxygen, else 0. Behaviour: playing/sleeping 0, irritable 1, lethargic 3. escalate when total >= 5 or behaviour scores 3. Return {score, escalate}.

Why this case matters

Paediatric warning scores depend on the right age band and on two-sided deviation from normal ranges.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    m = x['age_months']
    bands = [(12, 100, 160, 30, 50), (48, 90, 150, 24, 40), (144, 70, 120, 18, 30), (10 ** 6, 60, 100, 12, 20)]
    for lim, hlo, hhi, rlo, rhi in bands:
        if m < lim:
            break
    dh = max(x['hr'] - hhi, 0)
    dr = max(rlo - x['rr'], x['rr'] - rhi, 0)
    crt = x['crt_s']
    card = 2 if dh > 20 or crt >= 4 else 1 if dh > 0 or crt == 3 else 0
    o2 = x['o2_lpm']
    resp = 2 if dr > 10 or o2 >= 4 else 1 if dr > 0 or o2 > 0 else 0
    beh = {'playing': 0, 'sleeping': 0, 'irritable': 1, 'lethargic': 3}[x['behavior']]
    total = card + resp + beh
    return {'score': total, 'escalate': total >= 5 or beh == 3}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('school-age control',
   {'age_months': 60, 'hr': 91, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 27, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 151, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 84, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 101, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 81, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 1, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 81, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 52, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 126, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 101, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 92, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 28, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 152, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 83, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 102, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 82, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 0, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 82, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 53, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 127, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 102, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 93, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 26, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 153, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 82, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 103, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 83, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 1, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 83, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 54, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 128, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 103, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 94, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 27, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 154, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 81, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 104, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 84, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 0, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 84, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 55, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 129, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 104, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 95, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 28, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 155, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 80, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 105, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 85, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 1, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 85, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 56, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 130, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 105, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
school-age control{'escalate': False, 'score': 0}{'escalate': False, 'score': 0}Passed
first birthday uses toddler band{'escalate': False, 'score': 0}{'escalate': False, 'score': 0}Passed
newborn in infant band{'escalate': False, 'score': 0}{'escalate': False, 'score': 0}Passed
bradycardic infant{'escalate': False, 'score': 0}{'escalate': False, 'score': 1}Failed
capillary refill 3 seconds{'escalate': False, 'score': 1}{'escalate': False, 'score': 1}Passed
refill 4 seconds{'escalate': False, 'score': 2}{'escalate': False, 'score': 2}Passed
slow breathing adolescent{'escalate': False, 'score': 2}{'escalate': False, 'score': 2}Passed
rate exactly 10 above range{'escalate': False, 'score': 1}{'escalate': False, 'score': 1}Passed
fast breathing toddler{'escalate': False, 'score': 2}{'escalate': False, 'score': 2}Passed
irritable with oxygen{'escalate': False, 'score': 3}{'escalate': False, 'score': 3}Passed
lethargic alone escalates{'escalate': True, 'score': 3}{'escalate': True, 'score': 3}Passed

SHA-256 / 67717ab3da11e8538d512d5c842111c0009448ff584c037bbfaf7ab3453e9084

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    m = x['age_months']
    bands = [(12, 100, 160, 30, 50), (48, 90, 150, 24, 40), (144, 70, 120, 18, 30), (10 ** 6, 60, 100, 12, 20)]
    for lim, hlo, hhi, rlo, rhi in bands:
        if m < lim:
            break
    dh = abs(x['hr'] - (hlo + hhi) // 2)
    dr = max(rlo - x['rr'], x['rr'] - rhi, 0)
    crt = x['crt_s']
    card = 2 if dh > 20 or crt >= 4 else 1 if dh > 0 or crt == 3 else 0
    o2 = x['o2_lpm']
    resp = 2 if dr > 10 or o2 >= 4 else 1 if dr > 0 or o2 > 0 else 0
    beh = {'playing': 0, 'sleeping': 0, 'irritable': 1, 'lethargic': 3}[x['behavior']]
    total = card + resp + beh
    return {'score': total, 'escalate': total >= 5 or beh == 3}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('school-age control',
   {'age_months': 60, 'hr': 91, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 27, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 151, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 84, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 101, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 81, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 1, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 81, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 52, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 126, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 101, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 92, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 28, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 152, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 83, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 102, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 82, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 0, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 82, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 53, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 127, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 102, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 93, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 26, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 153, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 82, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 103, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 83, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 1, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 83, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 54, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 128, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 103, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 94, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 27, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 154, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 81, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 104, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 84, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 0, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 84, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 55, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 129, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 104, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})],
 [('school-age control',
   {'age_months': 60, 'hr': 95, 'rr': 24, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('first birthday uses toddler band',
   {'age_months': 12, 'hr': 95, 'rr': 28, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('newborn in infant band',
   {'age_months': 0, 'hr': 155, 'rr': 45, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 0, 'escalate': False}),
  ('bradycardic infant',
   {'age_months': 6, 'hr': 80, 'rr': 40, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('capillary refill 3 seconds',
   {'age_months': 60, 'hr': 105, 'rr': 24, 'behavior': 'playing', 'crt_s': 3, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('refill 4 seconds',
   {'age_months': 60, 'hr': 85, 'rr': 24, 'behavior': 'playing', 'crt_s': 4, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('slow breathing adolescent',
   {'age_months': 150, 'hr': 80, 'rr': 1, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('rate exactly 10 above range',
   {'age_months': 150, 'hr': 85, 'rr': 30, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 1, 'escalate': False}),
  ('fast breathing toddler',
   {'age_months': 30, 'hr': 120, 'rr': 56, 'behavior': 'playing', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 2, 'escalate': False}),
  ('irritable with oxygen',
   {'age_months': 60, 'hr': 130, 'rr': 24, 'behavior': 'irritable', 'crt_s': 2, 'o2_lpm': 2},
   {'score': 3, 'escalate': False}),
  ('lethargic alone escalates',
   {'age_months': 60, 'hr': 105, 'rr': 24, 'behavior': 'lethargic', 'crt_s': 2, 'o2_lpm': 0},
   {'score': 3, 'escalate': True})]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
school-age control{'escalate': False, 'score': 1}{'escalate': False, 'score': 0}Failed
first birthday uses toddler band{'escalate': False, 'score': 2}{'escalate': False, 'score': 0}Failed
newborn in infant band{'escalate': False, 'score': 2}{'escalate': False, 'score': 0}Failed
bradycardic infant{'escalate': False, 'score': 2}{'escalate': False, 'score': 1}Failed
capillary refill 3 seconds{'escalate': False, 'score': 1}{'escalate': False, 'score': 1}Passed
refill 4 seconds{'escalate': False, 'score': 2}{'escalate': False, 'score': 2}Passed
slow breathing adolescent{'escalate': False, 'score': 2}{'escalate': False, 'score': 2}Passed
rate exactly 10 above range{'escalate': False, 'score': 2}{'escalate': False, 'score': 1}Failed
fast breathing toddler{'escalate': False, 'score': 2}{'escalate': False, 'score': 2}Passed
irritable with oxygen{'escalate': False, 'score': 4}{'escalate': False, 'score': 3}Failed
lethargic alone escalates{'escalate': True, 'score': 4}{'escalate': True, 'score': 3}Failed

SHA-256 / 524e0d20e8aba6c39c7713722d3cbb88d17b203861067f65f0d149290b94eece

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 11 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic toy software model with explicitly stipulated thresholds and formulas; it is not clinical guidance, not a validated medical calculator, and makes no claim of conformance to any published protocol. Numbered variants vary patient and order inputs. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:47:25.403646+00:00.

Case digest / a96fb0ae900845d0d640dc9601b509248032375863678d9c94eb74bfe2adfa12