pediatric-ai-scribe-v3/test/fixtures/deck-reply-early-close.json
Daniel 89f1aca8ed
Some checks failed
Forgejo Docker Build / Build Docker image (push) Has been skipped
Forgejo Docker Build / End-to-end (browser) (push) Has been skipped
Forgejo Docker Build / Root app tests (push) Failing after 47s
fix: a deck reply that closed a slide early is repaired, and a modification keeps the theme
Three generations in a row fell back to plain slides for the same reason,
visible once a failed reply was kept whole: the model wrote "rows":[[…]]}
and then ,"notes":"…"} — the slide closed before its notes, which is not
JSON. On parse failure the one premature brace is removed, bounded to the
schema's slide keys; a brace that legitimately closes an inner object is
left alone. Both test generations now come back as designed decks.

Modify used to hand the model's new deck back without its theme; the look
is the author's, so it is carried over, and the column agrees.

Failed deck replies are kept under data/logs/deck-failures for the next
time "the reply was not a deck" needs reading rather than guessing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-13 13:43:21 +02:00

1 line
No EOL
3.4 KiB
JSON

{"title":"Bronchiolitis in Infants Under 12 Months","subtitle":"Assessment and Admission Criteria","date":"2024-06-01","slides":[{"type":"section","heading":"Introduction to Bronchiolitis"},{"type":"bullets","heading":"Overview of Bronchiolitis","bullets":[{"text":"Common viral lower respiratory tract infection in infants <12 months"},{"text":"Most frequently caused by Respiratory Syncytial Virus (RSV)"},{"text":"Peak incidence between 2-6 months of age"},{"text":"Characterized by inflammation, edema, and mucus in small airways"},{"text":"Seasonal peaks in fall and winter months"}],"notes":"Introduce bronchiolitis as a common and important condition in young infants, emphasizing viral etiology and typical age group."},{"type":"figure","heading":"Clinical Features of Bronchiolitis","bullets":[{"text":"Initial symptoms: rhinorrhea, mild cough, low-grade fever"},{"text":"Progression: increased cough, wheezing, tachypnea"},{"text":"Signs of respiratory distress: nasal flaring, chest retractions, grunting"},{"text":"Feeding difficulties and irritability common"},{"text":"Apnea may occur in very young or high-risk infants"}],"image_prompt":"schematic infant with highlighted nasal flaring, chest retractions, wheezing lungs, and feeding difficulty icons"},{"type":"compare","heading":"Assessment: Mild vs Severe Bronchiolitis","columns":[{"label":"MILD","bullets":["Normal or mildly increased respiratory rate","No or mild chest retractions","Feeding well, >50% usual intake","No or mild hypoxia (SpO2 ≥ 92%)","Alert and consolable"]},{"label":"SEVERE","bullets":["Marked tachypnea (>70 breaths/min)","Moderate to severe chest retractions and nasal flaring","Feeding poorly, <50% usual intake or vomiting","Hypoxia (SpO2 < 92%) or cyanosis","Lethargy, apnea, or altered consciousness"]}]},{"type":"table","heading":"Admission Criteria for Infants with Bronchiolitis","header":["Criteria","Indication for Admission"],"rows":[["Respiratory distress (severe retractions, grunting)","Admit for monitoring and supportive care"],["Hypoxia (SpO2 < 92%) on room air","Admit for oxygen therapy"],["Poor oral intake (<50% usual) or dehydration","Admit for IV fluids"],["Apnea or history of apnea","Admit for close monitoring"],["Underlying risk factors (prematurity, chronic lung disease, congenital heart disease)","Lower threshold for admission"],["Age < 3 months with bronchiolitis","Consider admission due to higher risk"]]},"notes":"Use this table to guide decisions on when to admit infants based on clinical severity and risk factors."},{"type":"callout","heading":"Key Red Flag","text":"Apnea or cyanosis in any infant with bronchiolitis requires urgent admission and monitoring."},{"type":"bullets","heading":"Summary and Management Principles","bullets":[{"text":"Supportive care is mainstay: oxygen, hydration, and monitoring"},{"text":"Avoid routine use of bronchodilators, steroids, or antibiotics"},{"text":"Educate caregivers on signs of deterioration"},{"text":"Close follow-up for infants discharged home"},{"text":"Consider admission for infants meeting criteria or with social concerns"}],"notes":"Reinforce that management is mostly supportive and highlight importance of caregiver education and follow-up."},{"type":"table","heading":"References","header":["Source"],"rows":[["American Academy of Pediatrics Clinical Practice Guideline, 2014"],["NICE Guideline NG9, Bronchiolitis in children, 2015"],["UpToDate: Bronchiolitis in infants and children"]]}]}