import json

SRC = "/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/prose/batch-04.json"
DST = "/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/prose/batch-04.done.json"

REWRITES = {}

REWRITES["d7e38fdb090f4b5c9c13d7ca79f3bbf1"] = '''**Initial Assessment and Monitoring**

Risk is identified in premature infants on mechanical ventilation or supplemental oxygen beyond 10–14 days. Severity is assessed at 36 weeks postmenstrual age (or 56 days of age in infants >32 weeks' gestation) based on respiratory support required to maintain arterial oxygen saturation >89%.

**Oxygen Therapy**

Supplemental oxygen is prescribed to achieve normal oxygen saturation. Oxygen therapy results in quicker discharge, improved growth, and reduced desaturation episodes. Prevention of hypoxemia reduces the risk of pulmonary hypertension development.

**Ventilation Strategy**

Early extubation is the goal for all preterm babies requiring mechanical ventilation. Gentle ventilation strategies and early, aggressive continuous positive airway pressure (CPAP) are used to reduce barotrauma.

**Preventive Pharmacotherapy**

Antenatal steroids are administered prenatally when possible. Early surfactant therapy is provided. Early caffeine therapy is considered. Systemic steroids are reserved for selective cases only.

**Supportive Care**

Nutrition is optimized to support growth. Early stimulation is provided. Parental anxiety is addressed. Associated conditions including [[245|gastroesophageal reflux]] and [[259|patent ductus arteriosus]] are screened for and managed.

**Monitoring for Complications**

Echocardiography is performed to assess for pulmonary hypertension in established BPD. Signs of chronic respiratory insufficiency and cor pulmonale are monitored. High rehospitalization risk is anticipated in the first 2 years of life.'''

REWRITES["5e97071a57ec446783778e7d35e4550e"] = '''- Concussion is [[272|traumatic brain injury]] from acceleration, deceleration, or rotational forces; loss of consciousness is not required
- Causes metabolic and vascular changes in brain tissue, not structural damage on standard imaging
- Common symptoms include confusion, headache, visual disturbance, amnesia, balance problems, dizziness, nausea, and cognitive/behavioral changes
- Most sport-related concussions resolve within 7–10 days, but some develop persistent symptoms beyond 28 days
- Diagnosis uses SCAT3, Child-SCAT3 (ages 5–12), or Acute Concussion Evaluation (ACE)
- CT imaging is rarely needed beyond 24 hours unless patient has [[142|altered mental status]], prolonged unconsciousness, repeated vomiting, severe headache, skull fracture signs, focal neurologic deficit, or severe mechanism
- Immediate removal from play is mandatory; athlete cannot return to sport on day of injury
- Management includes rest (including cognitive rest) and gradual return-to-activity progression
- Referral to a concussion specialist is made if symptoms persist beyond 10–14 days, worsen, or the patient has multiple prior concussions
- Second impact syndrome (rare but potentially fatal) occurs with second concussion while symptomatic from first'''

REWRITES["01efcfd3ae074e5e9dae90a9066f481f"] = '''**Immediate Assessment and Safety**

- Any athlete suspected of concussion is removed from play immediately
- Return to sport on the day of injury is not permitted
- The athlete is not left alone in the initial hours; monitoring for deterioration continues

**Diagnostic Evaluation**

- The Acute Concussion Evaluation (ACE) is used in clinic or emergency department settings
- Child-SCAT3 is applied for children aged 5–12 years or SCAT3 for older athletes
- Computed tomography is obtained during initial evaluation if any of the following are present:
  - Deteriorating or [[142|altered mental status]]
  - Prolonged loss of consciousness
  - Repeated vomiting
  - Severe headache
  - Signs of skull fracture
  - Focal neurologic deficit
  - Severe mechanism of injury
- CT is rarely indicated beyond 24 hours in uncomplicated cases

**Management Strategy**

- Rest, including cognitive rest, is encouraged
- The ACE Care Plan is provided to parents and child for guidance
- Strict return-to-activity guidelines are implemented, with gradual increase in both physical and mental activities

**Follow-up and Specialist Referral**

- Referral to a concussion specialist is made if:
  - Symptoms persist beyond 10–14 days
  - Symptoms worsen
  - The patient has a history of multiple concussions'''

REWRITES["0169043983484fefb09c04c671e32d1f"] = '''**Initial Assessment**

1. A detailed history of stool frequency, consistency, and difficulty; pain or straining; and recent stressors or dietary changes is taken
2. Physical examination is performed, including abdominal palpation and assessment of anal tone
3. A stool sample is obtained for occult blood testing (note: false positives occur after rare red meat or peroxidase-containing vegetables)
4. Fecal leukocytes are assessed (suggests infectious or inflammatory cause)

**Distinguishing Functional from Organic Constipation**

If clinical features suggest Hirschsprung disease (delayed meconium passage in infancy, small ribbonlike stools, tight anal tone, failure to thrive), the following are considered:
- Unprepared barium enema in very young infants with severe constipation
- Manometry or rectal biopsy

If delayed meconium passage with Hirschsprung disease ruled out, the following are performed:
- Sweat test or genetic testing for [[184|cystic fibrosis]]

**Treatment of [[289|Functional Constipation]]**

Three-pronged management is implemented:

| Component | Intervention |
|-----------|-------------|
| **Behaviour** | Regular toileting practices are established; family dynamics and parental response are addressed; stool-withholding behaviour is managed |
| **Diet** | Decreased: simple carbohydrates, refined/processed carbohydrates, saturated fat, processed meat, dairy (milk and cheese). Increased: fluid intake and dietary bulk |
| **Medication** | An initial 'clean out' of retained stool is performed, then maintenance continues with stool softeners and agents to propel stool through colon |

**When to Investigate Further**

If response to presumptive treatment with education, dietary changes, and medication is inadequate, or if concern for organic aetiology exists, further investigation proceeds.'''

REWRITES["74c3c2d81cc240f699b377658c7f3399"] = '''- Corneal abrasion is loss of the superficial epithelial layer, exposing underlying nerves and causing severe pain, tearing, and photophobia
- Most common ocular injury of childhood; contact lens wearers at increased risk
- Typical mechanism is accidental trauma during play, sports, or self-inflicted scratching in infants
- Diagnosis: fluorescein dye under blue light (cobalt blue, Wood lamp, or slit lamp blue filter) shows bright yellow-green staining; abrasion appears transparent without dye
- Eyelids are always everted to check for retained foreign bodies, particularly under the upper lid
- Treatment is with frequent topical antibiotic ointment until healed; oral analgesia is used for pain
- Topical anesthetics are used only for examination and are not sent home with the patient, as they slow healing and inhibit blinking
- Contact lens wearers need topical fluoroquinolones to cover Pseudomonas
- Semipressure patching does not improve healing and may cause further abrasion
- Complications include corneal scarring and vision loss if infection develops'''

REWRITES["5991076f73e34866ac03d76eff398a3c"] = '''**Examination and Diagnosis**

1. Topical anesthetic drops (proparacaine 0.5%) are instilled to facilitate examination and provide temporary pain relief
2. Fluorescein dye is instilled using either:
   - Dry impregnated strip (preferred): wetted with water, normal saline, or Ringer's solution, then gently touched to pink palpebral conjunctiva of lower lid or bulbar conjunctiva
   - Liquid drop form
3. Examination is under blue-filtered light (cobalt blue on direct ophthalmoscope, slit lamp, or Wood lamp)
4. The upper eyelid is everted to inspect for foreign bodies
5. The lower eyelid is retracted to inspect inferior conjunctiva
6. Vision testing is performed

**Treatment**

1. **Topical antibiotic ointment**: Applied frequently until the epithelium is completely healed
   - For contact lens wearers: topical fluoroquinolones are used to cover Pseudomonas species

2. **Oral analgesia**: Initiated in all cases for pain control

3. **Topical cycloplegic agent** (for large abrasions): Cyclopentolate hydrochloride 1% relieves pain from ciliary spasm

4. **Foreign body removal** (if present):
   - Superficial foreign bodies: removed with moist cotton-tipped applicator
   - Deeper foreign bodies: referred to an ophthalmologist

**Important Notes**

- Topical anesthetic drops are not sent home with the patient—they retard epithelial healing and inhibit blinking reflex
- Semipressure patch is not used—it does not improve healing time or decrease pain, and may itself cause abrasion
- Referral to an ophthalmologist is made if vision changes are present or if a deeper foreign body is suspected'''

REWRITES["0265f7928b6e4ad39a27ed2044402c46"] = '''**Initial Assessment**

1. The pattern is confirmed: history of episode frequency, duration, timing of onset, and intervening symptom-free periods is obtained
2. Warning signs requiring urgent investigation are assessed:
   - Severe abdominal pain
   - Bilious or bloody vomiting
   - [[142|Altered mental status]] or neurological signs
   - Fever or signs of systemic illness

**Baseline Investigations (if CVS criteria met and no warning signs)**

- Upper gastrointestinal series (to exclude malrotation)
- Serum electrolytes, blood urea nitrogen, creatinine
- If warning signs are present: liver and pancreatic function tests, abdominal imaging (ultrasound ± CT/MRI), and oesophagogastroduodenoscopy are added or considered
- If metabolic triggers are suspected (fasting, high-protein meals, intercurrent illness): a serum and urine metabolic panel (lactate, ammonia, carnitine profile, amino acids, organic acids) is obtained **prior to IV fluid treatment**
- If neurological abnormalities are present: brain MRI and neurology consultation are obtained

**Acute Episode Management**

**Prodromal phase (if recognised):**
- A 5HT3 antagonist antiemetic is administered:
  - Ondansetron or granisetron (specific doses not provided in passages)

**Active vomiting phase:**
- Intravenous fluid rehydration (primary treatment; most episodes respond promptly)
- 5HT3 antagonist antiemetic (ondansetron or granisetron)
- Sedation with lorazepam if needed
- Analgesia as necessary for pain
- Serum urea and electrolytes are monitored during treatment

**Expected course:** Episodes typically resolve within 24–48 hours with supportive care.'''

REWRITES["969d710845684aa7b8c77ec8c6b02780"] = '''**Initial evaluation**

1. Detailed clinical history is obtained, including mood, functioning, and change from baseline
2. Mental status examination is performed
3. Suicidal ideation and self-harm risk are screened for
4. Psychotic features are assessed by asking directly: "Do you ever feel your eyes or ears play tricks on you?"
5. Family history of depression, anxiety, and suicide is taken
6. Environmental stressors and adverse childhood experiences are identified
7. Comorbid anxiety, ADHD, [[286|conduct disorder]], and chronic medical conditions are screened for
8. A validated screening tool is used as an adjunct (PHQ-9: Modified for Teens, Beck Depression Inventory, or Children's Depression Inventory)

**Referral for definitive diagnosis**

Referral is made to a psychiatrist or psychologist for formal diagnostic assessment and treatment planning.

**Treatment initiation**

**Psychotherapy (first-line for mild-to-moderate symptoms)**
- Cognitive behaviour therapy (CBT) — strongest evidence
- CBT combined with parental involvement
- Family therapy
- For toddlers and young children: parent–child relational therapy
- Alternative approaches with good support: client-centred therapy, interpersonal therapy, relaxation techniques

**Pharmacotherapy (for moderate-persistent or severe symptoms)**

Antidepressant medications may be indicated. Positive family history of depression increases likelihood of response. Specific dosing and medication selection are determined by the psychiatrist.

**Psychoeducation for family**

- Depression is explained as common and not due to lack of coping ability or personal strength
- Family history is discussed to reduce stigma
- Symptoms are clarified as real, not fabricated
- Apparent laziness or irritability are explained as symptoms, not character flaws
- Hopelessness is emphasised as a symptom, not reality
- Reassurance is given that treatment works, though improvement takes several weeks
- The affected individual is often the last to recognise improvement'''

REWRITES["f6a9e97563be4113a3f023aa92ae14fe"] = '''**Immediate assessment:**
- The temporal relationship between drug exposure and symptom onset is identified
- IgE-mediated reactions occur within minutes and require prior sensitization; rashes developing after several days of therapy are seldom IgE-mediated
- DRESS typically begins 2–8 weeks after drug initiation

**For suspected IgE-mediated [[143|anaphylaxis]]:**
- The offending drug is discontinued immediately
- Supportive care and airway management are provided as needed

**For DRESS:**
- **Primary intervention:** The offending drug is discontinued immediately
- Similar cross-reacting drugs are avoided
- Supportive care is provided
- Systemic glucocorticoids are considered (evidence is limited but believed effective)
- Persistent or worsening symptoms are monitored, as these may continue for weeks to months after drug withdrawal
- Multiorgan involvement is assessed, particularly hepatic and renal function

**For other cutaneous drug reactions:**
- The offending drug is discontinued
- Most reactions confined to the skin resolve without sequelae after drug withdrawal
- Supportive care is provided'''

REWRITES["79e9bd05ad5b44c7a088806619d48fb2"] = '''### Initial Assessment

When a child presents with a first seizure, whether it was provoked or unprovoked is established. A detailed history of the event is obtained, including duration, type of movements, consciousness level, and postictal state. Neurological examination is performed and EEG is considered to help categorize seizure type and epilepsy type.

### Diagnosis and Investigation

Epilepsy diagnosis requires either:
- Two unprovoked [[315|seizures]] separated by >24 hours, OR
- One unprovoked seizure with ≥60% recurrence risk based on clinical, EEG and/or MRI findings, OR
- Confirmed epilepsy syndrome

Interictal EEG is performed when epilepsy is diagnosed, to help categorize the epilepsy type. Ictal EEG may support diagnosis if available.

### Treatment Initiation

Antiepileptic drug therapy can be initiated following the first seizure in certain situations where recurrence risk is high (≥60%) or when two seizures have occurred. Approximately 65–70% of children with epilepsy will achieve seizure remission with appropriate medication.

### Special Considerations

For epileptic encephalopathy with continuous spike waves in slow-wave sleep (CSWS), where discharges occur in >85% of slow-wave sleep (electrical status epilepticus in sleep or ESES):
- Nocturnal diazepam 0.2–0.5 mg/kg orally at bedtime for several months is often used as first- or second-line therapy
- Valproic acid and benzodiazepines are commonly used but evidence favours steroids and nocturnal diazepam for associated aphasia
- Some children respond to valproic acid combined with clobazam or to levetiracetam'''

REWRITES["5d06186510f54e8d82d5c481f2907a79"] = '''**Assessment**

Erythema toxicum neonatorum is a clinical diagnosis. Rash distribution, morphology, and timing of onset are examined. The diagnosis is confirmed if needed by obtaining a Wright-stained smear of intralesional contents to demonstrate eosinophils and exclude organisms.

**Treatment**

No therapy is required. The condition resolves spontaneously within 3–7 days. Parents are reassured that the rash is benign and self-limited.

**Monitoring**

No specific follow-up is necessary. Lesions resolve without intervention, scarring, or pigmentation changes.'''

REWRITES["ef2515315c9f4d9494c93c41afb1e123"] = '''**Assessment and diagnosis**

Clinical presentation is identified: vesicular lesions on erythematous base (typically grouped), oral ulceration (gingivostomatitis), or systemic symptoms. In neonates, timing of presentation is determined (5–14 days suggests localised SEM disease; 14–28 days suggests CNS involvement). Maternal history of genital herpes and immunity status is obtained where possible.

**Risk stratification**

High-risk groups requiring urgent evaluation and treatment are identified:
- Neonates with any signs of infection
- Immunocompromised children
- Children with severe systemic symptoms or CNS involvement
- Neonates born to mothers with primary genital HSV at delivery (25–50% transmission risk)

**Treatment**

Aciclovir is indicated for severe symptomatic skin, ophthalmic, cerebral, and systemic infections. Specific dosing regimens are not detailed in the provided passages; current formulary guidance should be consulted for age-appropriate and weight-based dosing.

For neonates and immunocompromised children with suspected or confirmed HSV infection, aciclovir is initiated promptly given the risk of severe or life-threatening disseminated disease.

**Supportive care**

Pain and fever are managed symptomatically. Most primary infections in immunocompetent hosts are self-limiting; HSV esophagitis in those with normal immune function typically resolves spontaneously within 1–2 weeks.'''

REWRITES["c8b4c3f243dd4a2ba782f63eec1f0fa1"] = '''**Immediate steps:**

1. **Airway and breathing:** The airway is ensured open and clear; intubation is considered if needed. Oxygen is administered via nonrebreather mask at 10–15 L/min.

2. **Position:** If hypotensive, the child is placed in Trendelenburg position (unless breathing is compromised). If stable, the child remains in a position of comfort with the caregiver.

3. **Vascular access:** Intravenous or intraosseous access is established.

4. **Initial fluid bolus:** Isotonic crystalloid (0.9% sodium chloride or lactated Ringer's solution) is given at **20 mL/kg body weight** (maximum 1 L bolus) over 5–10 minutes.

5. **Reassess:** Perfusion is checked (pulses, capillary refill, skin temperature, urine output, mental status).

**Repeat boluses:** If perfusion has not normalized, the 20 mL/kg bolus is repeated. In nonhemorrhagic hypovolemic shock, up to 40 mL/kg may be needed before response occurs. Typically no more than 60 mL/kg is required, though more may be necessary with ongoing losses.

**Blood transfusion:** In trauma patients who do not respond to initial crystalloid bolus, packed red blood cells are transfused. Specific volumes are not defined in the literature.

**Monitoring and reassessment:** Frequent clinical reassessment guides ongoing therapy. Pressors are not required in simple hypovolemic shock.

**Special note for newborns:** An emergency umbilical catheter is placed and volume expansion is given with 0.9% sodium chloride or emergency non-cross-matched type-O, Rh-negative packed red blood cells in aliquots of **10 mL/kg** given over 5–10 minutes.'''

REWRITES["a9ee162405b1450fb2ca3944b8229ce2"] = '''**Initial approach:** The airway is ensured open, clear, and maintained; intubation is considered if needed. Oxygen is administered via nonrebreather mask at 10–15 L/min to optimize arterial oxygen content. The child is positioned in Trendelenburg position if hypotensive, unless breathing is compromised; otherwise the child remains in a position of comfort with a caregiver.

**Fluid resuscitation:** Isotonic crystalloid solutions (normal saline or lactated Ringer's solution) are as effective as colloid solutions for most patients. An initial bolus of 20 mL/kg body weight (maximum 1 L) is given and repeated as necessary until perfusion normalizes. In nonhemorrhagic hypovolemic shock, up to 40 mL/kg may be needed before the child responds; typically no more than 60 mL/kg is required, though more may be necessary if ongoing losses are severe.

**Blood transfusion:** In trauma patients who do not respond to initial crystalloid bolus, packed red blood cell transfusion is indicated, though the specific volume required is not well established.

**Pressors:** Not required in simple hypovolemic states.

**Prehospital care:** Further injury is prevented, the cervical spine is immobilized if trauma is suspected, and fractures are splinted. Transport to hospital is rapid. For [[273|acute gastroenteritis]] with dehydration, oral rehydration solution is started at home and continued during transport.'''

REWRITES["385076335f5d47e897fb2287521d3835"] = '''**Initial evaluation:**

1. Detailed developmental history is obtained, including pregnancy, birth history, and achievement of [[10|developmental milestones]] across motor, cognitive, language, and social domains
2. Detailed family history is obtained and assessed for familial or reproductive history suggestive of chromosomal rearrangements
3. Complete physical examination is performed, evaluating specifically for dysmorphic features and [[115|congenital anomalies]]
4. Newborn screening results are reviewed

**Cognitive and adaptive assessment:**

- Standardized intelligence testing is administered (generally possible at age 3–4 years or older)
- Adaptive behavior is assessed across conceptual, social, and practical domains
- Deficits are documented as manifesting during the developmental period and causing functional impairment

**Diagnostic considerations:**

- Cultural, linguistic, sensory, motor, and behavioral factors that may affect assessment are accounted for
- In children younger than 5 years with delays in two or more developmental domains, the term "global [[82|developmental delay]]" is used rather than intellectual disability
- Diagnosis is recognized as potentially challenging in children with comorbid [[117|autism spectrum disorder]], behavioral issues, language disorders, or [[94|mental health]] conditions

**Further investigation if indicated:**

- Chromosomal microarray analysis (CMA) if dysmorphic features or [[115|congenital anomalies]] are present
- Banded karyotype analysis if familial or reproductive history suggests chromosomal rearrangements
- Metabolic evaluation as clinically indicated
- Fragile X testing if suggested by clinical features
- Neuroimaging if clinically warranted
- Genetic consultation for complex cases
- Whole exome sequencing is considered for cases with features suggesting a specific genetic diagnosis

**Early intervention:**

- Infants and young children with delayed cognitive development are referred to early intervention programs to increase the probability of functional improvements over time'''

REWRITES["65d02b5faabb41a58ea19b41cfd695ee"] = '''**Educational and functional planning:**

- Individualized education programs (IEP) or individualized family service plans (IFSP) are developed as appropriate
- Limitations often coexist with strengths; supports are determined based on identified limitations
- Supports are implemented across multiple settings (home, school, community) rather than restricted to structured environments

**Communication support:**

- Need for augmentative and alternative communication (AAC) supports is assessed
- AAC use can be beneficial for at least 30% of school-age individuals requiring such supports
- AAC use is generalized across all settings to maximize functional communication

**Inclusive environment:**

- Participation in inclusive environments typical of same-age peers is facilitated
- Appropriate supports are provided to enable individuals to live and learn successfully in community settings
- Individuals with intellectual disability can gain functional skills over time with appropriate support systems in place'''

REWRITES["43eae9079e9d4abbb39f17f9dced4f9b"] = '''**Initial Evaluation**

Long QT syndrome is suspected in any child presenting with:
- Unexplained [[334|syncope]], particularly during exertion, emotion, or sleep
- [[315|Seizures]] without clear neurological cause
- Palpitations
- Family history of sudden cardiac death or syncope
- Cardiac arrest

**Electrocardiography**

A resting 12-lead ECG is obtained immediately. The QT interval is measured and the corrected QT interval (QTc) is calculated using the Bazett formula: QTc = QT/√(RR interval).

Interpretation is as follows:
- QTc <0.45 seconds in males: normal
- QTc <0.46 seconds in females and children <15 years: normal
- QTc >0.46 seconds in females and children <15 years: prolonged
- QTc >0.45 seconds in males: prolonged
- QTc >0.48 seconds with [[334|syncope]]: highly suggestive of long QT syndrome

**Further Diagnostic Testing**

- 24-hour ambulatory ECG (Holter monitor) to assess QT interval variability and detect arrhythmias
- Exercise stress testing to evaluate QT response to exertion and identify exercise-triggered events
- Genetic testing for pathogenic variants in KCNQ1, KCNH2, SCN5A, and other genes; useful for family screening, with a 25% false negative rate

**Electrolyte Assessment**

In any patient with QT prolongation, serum potassium, calcium, and magnesium are measured to exclude acquired causes, and any deficiencies are corrected.

**Family Screening**

ECG is performed on first-degree relatives. Genetic testing should be offered to family members of confirmed cases.

**Treatment Principles**

Asymptomatic patients with a prolonged QT interval and positive family history are treated to prevent sudden death. Management is individualised based on genetic subtype and symptom triggers. Medications known to prolong QT interval (class Ia and III antiarrhythmics, azithromycin, and others) are avoided. Electrolyte abnormalities are corrected and underlying causes of acquired QT prolongation are addressed.'''

REWRITES["39e3b0f3f2704d70abafef30b1a9e641"] = '''**Initial Assessment**

1. Complete family and patient history is obtained
2. Full physical examination is performed
3. Anthropometrics are measured (weight, height, BMI)
4. BMI z-score is calculated

**Formal Documentation in Medical Record**

The diagnosis is stated as: [degree of malnutrition] related to [underlying cause] as evidenced by [supporting evidence]

Example: Moderate malnutrition related to congenital heart disease as evidenced by a BMI z-score of –2.5

**Classification**

Malnutrition is classified as:
- Primary (socioeconomic) or secondary (disease-related)
- Illness-related or non-illness related
- Acute (<3 months) or chronic (>3 months)'''

REWRITES["42fc358fdcb04d198dfb1cca8402c8b7"] = '''**For Non-Illness-Related Malnutrition**

1. Environmental and familial psychosocial factors are addressed
2. An observed feeding trial with age-appropriate diet is implemented
3. Response to intervention is assessed

**Intervention Framework**

Both nutrition-specific and nutrition-sensitive approaches are considered:

- **Nutrition-specific interventions**: food fortification, supplementation
- **Nutrition-sensitive interventions**: education, clean water access, sanitation, agriculture programs, regulatory interventions, deworming

**Coordination**

Collaboration with government, nongovernment, national, and international organizations occurs where possible to maximize intervention success.'''

REWRITES["def70036de444d1f8c45be2e0e3e1942"] = '''**Recognition and Referral**

Suspicious skin lesions are identified by their appearance: red-brown-black colour with diffuse periphery, crusting, bleeding, pain, or itching. Particular attention is paid to rapid changes in size, shape, or other characteristics of existing nevi.

Any suspicious lesion warrants prompt referral for specialist evaluation and possible biopsy. Referral is not delayed pending observation of lesion changes.

**Risk Stratification**

Patients at higher risk are identified:
- Personal or family history of atypical mole–melanoma syndrome
- Xeroderma pigmentosum
- Giant congenital melanocytic nevi
- History of immunosuppression, [[122|immunodeficiency]], radiation therapy, or stem cell transplant
- Multiple acquired nevi or dysplastic nevi

These patients require more frequent clinical surveillance and photographic documentation.

**Prevention Counselling**

All patients and families are given prevention advice:
- Intense midday sun exposure between 10 am and 3 pm is avoided
- Protective clothing is worn: hat, long sleeves, and pants
- Sunscreen is used (specific formulations and SPF not detailed in available guidance)
- Adolescents are specifically counselled against tanning booth use

**Surveillance**

For at-risk patients, frequent clinical examinations with photographic documentation are arranged to enable detection of changes over time. A schedule appropriate to individual risk level is established, with prompt evaluation of any reported changes.'''

REWRITES["029c02fcc60b4cfe8efddc962ab7f918"] = '''**Empiric Antibiotic Therapy**

Ceftriaxone is the drug of choice for empiric therapy when meningococcus is considered. Penicillin G can be used as an alternative.

**Prophylaxis for Close Contacts**

When prophylaxis is indicated for close intimate contacts, household members, or those with direct exposure to patient secretions, one of the following is administered:

- **Rifampin**: 10 mg/kg (maximum dose 600 mg) orally every 12 hours for 2 days
- **Ceftriaxone**: 125 mg intramuscularly as a single dose for children under 15 years of age

**Diagnostic Approach**

Blood cultures are obtained and Gram stain of petechial scrapings is performed, which may reveal gram-negative diplococcal organisms (*Neisseria meningitidis*).

**Supportive Care**

Hypotension, shock, and disseminated intravascular coagulation are managed with appropriate supportive measures. Complications including adrenal insufficiency, neurologic sequelae, and tissue necrosis requiring possible surgical intervention are monitored for.'''

REWRITES["e846a1d0ce234a5f9682d51849542b6d"] = '''- Occult fractures are bone breaks not visible on initial radiographs but suspected from clinical signs (swelling, tenderness, persistent pain) and soft tissue changes
- Common sites in children: lateral ankle malleolus and distal humerus
- Posterior fat pad sign at the elbow is 75% sensitive for occult fracture; anterior humeral line displacement also suggests occult injury
- Treated as a fracture: immobilised and elevated
- Follow-up radiographs at 7–10 days show callus formation confirming diagnosis
- Rib and other fractures may become visible radiographically over 2 weeks
- Three weeks splint or cast immobilisation is standard treatment
- In suspected abuse, skeletal survey needed in children under 24 months; repeat survey at 2 weeks if initial survey normal but concern remains
- Multiple fractures raise suspicion for nonaccidental trauma
- Transphyseal fracture in very young child lacking protective reflex suggests abuse'''

REWRITES["41b58af5da8f4ab4a9b3f5bbbc2e53f3"] = '''**Initial assessment**
- Thorough clinical examination is performed: swelling, localised tenderness, and functional impairment are documented
- Radiographs are obtained in at least two planes (anterior/posterior and lateral)
- Soft tissue swelling is examined to localise injury
- At the elbow: posterior fat pad sign, anterior fat pad elevation ('sail sign'), and anterior humeral line displacement are assessed
- At the ankle: lateral swelling suggesting lateral malleolus fracture is noted

**Immediate management of suspected occult fracture**
- The affected limb is immobilised with splint or cast
- The limb is elevated
- Analgesia is provided as needed
- Immobilisation typically results in significantly reduced pain

**Follow-up imaging**
- Follow-up radiographs are scheduled at 7–10 days to assess for callus formation
- For rib fractures, radiographic visibility is expected over 2 weeks
- For toddler's fracture (spiral tibia fracture): diffuse new periosteal bone formation is expected, evident 3 weeks after injury

**Duration of immobilisation**
- Three weeks of splint or cast immobilisation for most occult fractures
- Three to four weeks in a long-leg, weight-bearing cast for toddler's fracture of the tibia

**Safeguarding**
- If nonaccidental trauma is suspected, the child protection team is consulted
- In children under 24 months with suspected abuse: skeletal survey is arranged
- If initial skeletal survey is normal but concern for occult injury persists: a repeat survey is arranged at 2 weeks (skull, spine, and pelvis films are omitted on repeat to reduce radiation)'''

REWRITES["eb2d103300e8499b96789ff57b299c40"] = '''**Initial Assessment**

Detailed history of dietary intake and feeding practices is obtained. Nutritional status is classified using weight-for-length or weight-for-age measurements as appropriate to age. Signs of specific micronutrient deficiencies are assessed.

**Feeding Route Selection**

When nutritional support is indicated, enteral feeding is used if the gastrointestinal tract is functional. Parenteral nutrition is reserved for situations where enteral access is not possible or tolerance cannot be achieved.

**Monitoring During Support**

Overfeeding in critically ill children is avoided, as this can be counterproductive. Tolerance of enteral feeds is monitored and composition is adjusted as needed. For children receiving parenteral nutrition, the formulation is individualized based on clinical status and metabolic needs rather than relying on standard protocols alone.

**Special Populations**

Children with developmental disabilities may require modified feeding approaches and texture modifications. Those with chronic conditions (renal disease, cancer, [[254|inflammatory bowel disease]]) need disease-specific nutritional adjustments. Bone health status is assessed in children with chronic illness and micronutrient intake is optimized accordingly.'''

REWRITES["c46a767aa704416cae886edaa163a41f"] = '''**Initial Evaluation**

1. **History and physical examination** are the foundation. Age of onset, tempo of development, growth pattern, and any neurological symptoms are documented. Examination is for café-au-lait spots, bony deformities, and focal neurological deficits.

2. **Risk stratification**: Girls aged 7–8 years with normal history and physical examination findings can be observed without further workup. Referral to [[124|pediatric endocrinology]] is made if:
   - Age <6 years (black girls) or <7 years (white girls)
   - Rapid tempo of pubertal progression
   - Growth retardation (suggests [[171|hypothyroidism]] or GH deficiency)
   - Neurological signs or symptoms
   - Concern for exogenous hormone exposure

**Diagnostic Testing** (when indicated)

- **Bone age radiograph**: Obtained if advanced bone age (>2 years ahead of chronological age) is suspected
- **Basal LH and FSH**: Elevated levels indicate central precocious puberty; suppressed levels indicate peripheral precocious puberty
- **GnRH stimulation test**: Performed if basal gonadotropins are borderline or if central precocious puberty is suspected. Elevated LH response confirms central precocious puberty; prepubertal response suggests peripheral precocious puberty
- **Thyroid function (T4, TSH)**: Used to screen for [[171|hypothyroidism]]
- **17-OHP, DHEA, androstenedione**: Obtained if adrenal pathology is suspected
- **Pelvic ultrasound**: Used to identify ovarian tumors or cysts
- **Abdominal ultrasound**: Used to identify adrenal masses
- **Cranial MRI**: Indicated for CNS evaluation if central precocious puberty is confirmed, especially with very early onset, rapid progression, or neurological findings

**Management Principles**

The evaluation and ongoing management of precocious puberty is best coordinated with a pediatric endocrinologist. Treatment decisions depend on the underlying etiology, age at presentation, and rate of progression. Specific pharmacological interventions and dosing are determined by the endocrinology team.'''

REWRITES["7a825ef126d84a7bb1649cf4243e6be0"] = '''**Initial Assessment**

1. **Confirm the diagnosis**: All previous chest radiographs are obtained and reviewed together by a pediatric radiologist with clinical context. Radiographic clearing is confirmed to have occurred between episodes, to distinguish recurrence from persistence.

2. **Focused history**: Specific questioning covers foreign body aspiration, [[107|asthma]] symptoms, signs of malabsorption ([[104|failure to thrive]], steatorrhoea), cough with feeding, choking episodes, and [[245|gastroesophageal reflux]] symptoms.

3. **Physical examination**: Respiratory rate and lung sounds are assessed. Nutritional status is evaluated, neurologic examination is performed, and clubbing is sought.

4. **Radiographic pattern recognition**: The pattern is classified as (1) recurrent infiltrates in the same location, (2) recurrent dense infiltrates in different locations, or (3) recurrent interstitial infiltrates. This guides further testing.

**Tailored Investigation**

Based on clinical suspicion, investigations are ordered in this sequence:

- **Suspected aspiration**: Videofluoroscopic swallow study (with speech therapist) or fiberoptic endoscopic evaluation of swallowing; oesophagography, upper gastrointestinal series, gastric emptying study, or pH/impedance probe are considered
- **Suspected airway obstruction or [[107|asthma]]**: Pulmonary function testing with flow-volume loops before and after bronchodilator, lung volume studies, and challenge tests (exercise, methacholine, or cold air)
- **Suspected [[184|cystic fibrosis]]**: Sweat chloride test or DNA analysis
- **Suspected primary ciliary dyskinesia**: Fractional nasal exhaled nitric oxide, electron microscopy of respiratory cilia, and DNA analysis
- **Suspected [[122|immunodeficiency]]**: Immunodeficiency screening panel
- **Structural abnormalities**: Chest computed tomography with expiratory images; flexible bronchoscopy with bronchoalveolar lavage if diagnosis remains unclear

**Referral Criteria**

Referral to [[123|pediatric pulmonology]] is made if the child has:
- Recurrent [[150|pneumonia]] or persistent chest radiographic abnormality
- Dysphagia, coughing, or choking with feedings
- Recurrent wheezing not responsive to routine [[107|asthma]] therapy

For complex cases, referral to a multidisciplinary aerodigestive team (pulmonologist, otolaryngologist, gastroenterologist, speech-language pathologist) is considered.

**Admission Criteria**

Hospital admission is indicated for:
- Clinically significant dyspnoea
- Hypoxaemia
- Worsening pulmonary signs or symptoms
- Equivocal history
- Acute life-threatening event

These findings may indicate acute or cumulative effects of chronic aspiration.'''

REWRITES["2f7ccdb5be914a1ba39af73fb3583e60"] = '''**Initial Evaluation**

The child is examined for visible trunk asymmetry, rib hump (thoracic involvement), or flank prominence (lumbar involvement). Associated features suggesting syndromic or neuromuscular scoliosis are assessed, including skin manifestations (neurofibromatosis), skeletal features (Marfan syndrome), or neurological signs.

A standing posteroanterior radiograph of the spine is obtained to measure the Cobb angle. Curves measuring less than 10 degrees represent spinal asymmetry and do not require further imaging or orthopedic follow-up.

**Curve Classification and Prognosis**

Curves of 10 degrees or greater constitute scoliosis. Whether the curve is functional (flexible, correctable) or structural (fixed) is determined. The anatomic location (thoracic, lumbar, or cervical) and direction of convexity are identified.

For idiopathic scoliosis, skeletal maturity is assessed and family history is documented. Girls with idiopathic scoliosis are at higher risk for curve progression than boys.

**Management by Curve Severity**

For arthrogryposis-associated scoliosis:
- Curves <30 degrees: initial management with thoracolumbar spinal orthosis (TLSO) brace is considered
- Curves >40 degrees: surgical fusion is generally indicated

**Monitoring for Complications**

In severe or progressive scoliosis, particularly neuromuscular forms, respiratory function is assessed. Thoracic curves with Cobb angles ≥35 degrees carry risk for restrictive lung disease. Children with progressive neuromuscular disease (such as [[242|Duchenne muscular dystrophy]]) require close monitoring for respiratory compromise and potential cor pulmonale.

**Specialist Referral**

Referral to orthopedic surgery is made for curves requiring intervention. Multidisciplinary team involvement is recommended for severe cases, syndromic scoliosis, or scoliosis associated with significant comorbidities.'''

REWRITES["77a7a94f647a440ca2298a1a50cfe797"] = '''**Initial Assessment and Stabilization**

All treatable causes of seizure are rapidly considered. Baseline neurologic examination findings are obtained. Focal neurologic findings, persistent altered mental status, or signs of increased intracranial pressure are assessed.

**Consultation Triggers**

Referral to neurology is made for: focal neurologic findings, persistent altered mental status, status epilepticus, [[292|febrile seizure]] in infants younger than 6 months, afebrile seizure in patients younger than 24 months, concern for [[301|infantile spasms]], or recurrent seizures.

Referral to neurosurgery is made for signs of increased intracranial pressure or abnormal head imaging findings.

**Diagnostic Workup**

Electroencephalography is performed for seizure classification and characterization. For children aged 6–12 months who are well-appearing and fully immunized with simple febrile seizure, lumbar puncture is not routinely recommended. Lumbar puncture is considered as an option for children with incomplete or unknown immunization status, deficient immunization (particularly Haemophilus influenzae type b and pneumococcus), or any pretreatment with antibiotics in the days preceding the seizure.

**Disposition**

Transfer to ICU occurs for status epilepticus, respiratory depression secondary to antiepileptic drugs, or persistent altered mental status. A video electroencephalogram monitoring unit is considered for concern about nonepileptic disorder mimicking seizures, ruling out subclinical seizures, or capturing events not witnessed by medical providers.

**Discharge and Follow-up**

Discharge occurs when baseline neurologic examination findings are restored. Primary care follow-up is arranged within 2 to 3 days and neurology follow-up within 1 to 2 weeks.

**Safety Considerations**

Excessive benzodiazepine use is monitored for, as it can cause respiratory failure.'''

REWRITES["280fb25aae45459aa38d2406cf19f892"] = '''**Initial assessment and stabilization**

1. [[178|Septic shock]] is recognised clinically: suspected infection with hypothermia or hyperthermia plus any of:
   - Decreased or [[142|altered mental status]]
   - Abnormal capillary refill time or pulse characteristics
   - Urine output <1 mL/kg/h
   - Note: hypotension is not required for diagnosis

2. Blood cultures are obtained before antibiotics

3. Specimens from non-blood sites (urine, cerebrospinal fluid, wound) are obtained for culture as soon as possible

4. The first dose of antibiotics is administered without delay; every hour of delay beyond 3 hours incrementally increases harm

**Respiratory support**

- Supplemental oxygen is provided to all patients with sepsis to optimise oxygen delivery to tissues
- Oxygenation is monitored with pulse oximetry
- For sepsis-induced paediatric acute [[102|[[151|respiratory distress]] syndrome]], noninvasive mechanical ventilation (continuous positive airway pressure or biphasic positive airway pressure) is preferred
- Intubation and mechanical ventilation are commonly used in children with [[178|septic shock]] in [[264|respiratory failure]] and in those with fluid-refractory, catecholamine-resistant septic shock without respiratory failure

**Laboratory studies**

After intravenous access is established, the following are obtained:
- Complete blood count (may show leukocytosis or leukopenia)
- Serum electrolytes
- Rapid glucose measurement

**Fluid resuscitation and further support**

- Intravenous access is established
- Initial fluid bolus is administered
- Further support is determined by response to initial fluid resuscitation'''

REWRITES["0c51bcd43e8846c780a017736678ffa8"] = '''**Screening approach:**

The Substance Abuse and [[94|Mental Health]] Services Administration recommends universal screening for substance use as part of routine health care in all adolescents using the SBIRT (Screening Brief Intervention Referral and Treatment) system.

**Diagnostic assessment:**

Diagnosis is made primarily through clinical interview. In moderate to severe cases, examination for signs of toxidromes is performed on physical examination. The adolescent is assessed against the 11 DSM-5 criteria across four domains:

1. **Impaired control:** consuming larger amounts than intended, persistent desire to cut down, spending significant time obtaining or using the substance, experiencing cravings
2. **Social impairment:** failure to meet obligations at work/school/home, continued use despite interpersonal problems, reduction of important activities
3. **Increased risk:** use in physically unsafe environments, continued use despite knowledge of harm
4. **Pharmacologic features:** tolerance and withdrawal

The number of criteria met over the past 12 months is counted to determine severity.

**Management by severity:**

- **Mild SUD (2–3 criteria):** Can typically be managed in primary care with brief intervention and monitoring
- **Moderate SUD (4–5 criteria):** Referral decision to subspecialty care is individualized based on clinical judgment
- **Severe SUD (≥6 criteria):** Requires referral to specialized substance use treatment services

When referring for specialty care, the primary care physician remains involved with the child and family, supporting their engagement with treatment, monitoring progress, and providing complementary primary care services.'''

REWRITES["88c598bb82c24edabd0933a36aec2ba5"] = '''**Immediate assessment:**

1. Focused history is obtained: acute onset (often nocturnal), severity of pain, presence of nausea/vomiting, abdominal or inguinal pain
2. Testicular examination is performed on all boys presenting with abdominal pain
3. TWIST score is calculated:
   - Testicular swelling: 2 points
   - Hard testis on palpation: 2 points
   - High-riding testis: 1 point
   - Absent cremasteric reflex: 1 point
   - Nausea or vomiting: 1 point

**Risk stratification and next steps:**

| TWIST Score | Risk | Action |
|---|---|---|
| 0 | Low | Imaging or close follow-up is considered |
| 1–5 | Intermediate | Immediate colour Doppler ultrasound of scrotum |
| 6–7 | High | Prompt surgical consultation without delay for imaging |

**If high-risk or clinical diagnosis of testicular torsion is made:**

- Immediate urological surgical consultation is obtained
- Delay for imaging does not occur
- If pain duration is <4–6 hours and surgical delay is anticipated, manual detorsion may be attempted:
  - The affected testis is rotated outward toward the thigh (medial-to-lateral direction)
  - Rotation is 180° at a time
  - Repetition occurs as needed (up to 4 attempts, as torsion may involve up to 720° rotation)
  - Successful detorsion produces dramatic pain relief
- Prompt surgical detorsion with bilateral orchiopexy is arranged
- If the patient is hospitalized, surgery should be performed before discharge

**For intermittent torsion:**

- Elective bilateral orchiopexy is arranged
- Clear return precautions and close follow-up instructions are provided until surgery is performed'''

REWRITES["4b9d3a62d83d4130ac7cedab3fa61739"] = '''**Identification and Assessment**

Following potential viral exposure in hospital or community settings:
- All exposed individuals are identified (healthcare professionals, patients, visitors)
- Immunity status is determined through clinical history or serological testing
- Exposure timing and route are documented

**Intervention**

For non-immune exposed individuals:
- Varicella immunization is administered if no contraindications exist
- VariZIG is administered up to day 10 postexposure for appropriate candidates
- If VariZIG is unavailable, intravenous immunoglobulin (IGIV) is considered as an alternative

**Monitoring**

Symptom development is observed during the incubation period. Immunocompromised individuals require closer surveillance for disseminated disease and complications.'''

REWRITES["47d622dc77b549a4904712e2d3927517"] = '''**Diagnosis and confirmation**

1. Serum vitamin B12 level is measured
2. If B12 is normal or low-normal but clinical suspicion remains high, ancillary testing is obtained: methylmalonic acid and homocysteine levels
3. MRI of cervical spine is considered if neurologic signs are present (T2 hyperintensity in dorsal columns is sought)

**Treatment initiation**

Vitamin B12 is administered by intramuscular injection:

- **Initial phase**: Daily doses of 25–100 μg intramuscularly
- **Maintenance phase**: Monthly intramuscular injections of 200–1,000 μg

**Special dosing**

For complete transcobalamin II deficiency: 1,000 μg intramuscularly two or three times weekly, maintaining very high serum cobalamin levels

**Duration**

Most cases of vitamin B12 deficiency require treatment throughout life. Rapid clinical improvement is expected with replacement therapy, though the duration of prior deficiency influences the likelihood of permanent neurologic sequelae.'''

REWRITES["9702d079cc8e40b8b537685be6355165"] = '''**Initial assessment:**
- Blood alcohol concentration is obtained
- Airway, breathing, and circulation are assessed
- Secondary survey for traumatic injury is performed ([[139|head trauma]] commonly accompanies intoxication)
- Blood glucose is checked immediately

**Mild intoxication (BAC <100 mg/dL):**
- Close observation
- Hydration is provided
- Analgesics are administered as needed

**Moderate to severe intoxication (BAC >300 mg/dL):**
- Airway management is established
- Artificial ventilatory support is provided (respiratory [[204|depression]] is the primary cause of death)
- Supportive care is initiated

**Hypoglycaemia management:**
- If blood glucose <60 mg/dL: IV infusion of D5W or D10W is started

**Seizures:**
- Treated with diazepam or phenytoin

**Severe withdrawal symptoms:**
- Benzodiazepines are considered

**Acute psychosis:**
- Managed with haloperidol

**Severe cases:**
- Cerebral oedema is monitored for and treated appropriately

**Dialysis consideration:**
- Considered when BAC >400 mg/dL

**Disposition:**
- Following acute stabilization, referral is made for alcohol use disorder treatment (group counselling, individualized counselling, or multifamily educational intervention)'''

with open(SRC) as f:
    data = json.load(f)

rewritten = 0
unchanged = 0
for entry in data:
    sid = entry["section_id"]
    if sid in REWRITES:
        entry["content"] = REWRITES[sid]
        rewritten += 1
    else:
        unchanged += 1

with open(DST, "w") as f:
    json.dump(data, f, ensure_ascii=False, indent=2)

print("total entries:", len(data))
print("rewritten:", rewritten)
print("unchanged (already third-person):", unchanged)
