import json

references = [
  {"title": "Berkowitz's Pediatrics", "author": "Berkowitz, Carol D.;", "pages": [1154,1155,1156,1158,1231]},
  {"title": "Cover", "author": "Vitalsource Download", "pages": [525]},
  {"title": "Pediatric Board Study Guide", "author": None, "pages": [1115]},
  {"title": "Illustrated Textbook of Paediatrics (Tom Lissauer, Will Carroll)", "author": "Lissauer, Tom,Carroll, Will", "pages": [124]},
  {"title": "MedStudy Pediatrics Core 11th Edition 2024-2025", "author": None, "pages": [173]}
]

short = [{"title": "In short", "content": """- CDC defines intimate partner violence (IPV) as a pattern of physical violence, sexual violence, stalking, and psychological aggression by a current or former intimate partner, meant to establish control (social isolation, deprivation, intimidation).
- Childhood exposure occurs when a child sees, hears, or observes the effects of verbal or physical assault between partners; some states (e.g., Connecticut) classify a child's exposure to IPV as maltreatment, requiring pediatricians to report to CPS.
- Epidemiology: roughly 8.5 million women and 4 million men in the US report lifetime physical violence, rape, or stalking by an intimate partner; among dating adolescents, 12% of girls and 7% of boys report physical violence in the prior 12 months; in 2007, IPV accounted for 14% of homicides nationally, mostly female victims.
- Cycle of violence has 3 phases: tension-building (threats), the violent episode (physical/sexual/emotional/psychological assault), and the honeymoon phase (apology, re-bonding) — phases escalate over time as violence becomes more frequent/severe and the honeymoon phase shortens.
- At least 50% of women with sexual IPV report multiple rapes; roughly two-thirds of men and women with physical IPV report multiple assault episodes; violence can continue after the relationship ends, most often as stalking.
- Children exposed to IPV show more internalizing (depression, anxiety, somatization) and externalizing (ADHD, aggression) disorders, plus developmental delay, low self-esteem, PTSD symptoms/hypervigilance, poor academic performance/truancy, and antisocial behavior.
- IPV is associated with increased incidence of direct child abuse in the home; children can also be injured incidentally (e.g., held in a parent's arms during an assault) or while trying to intervene.
- Adolescent-specific risk factors: female gender, age <24 years, high-risk sexual behavior, alcohol/substance use, social isolation, depression, poverty; screen for IPV at all adolescent health visits.
- Warning signs in the medical visit: frequent ED/urgent care visits while avoiding primary care, missed appointments, frequent pregnancy/STI testing requests, multiple abortions, late prenatal care, inappropriate affect, reluctance to undress, an overly attentive partner, and injuries without a consistent explanation (especially head/neck/teeth/breasts/abdomen/genitals) or bruises at different stages of healing."""}]

long = [
 {"title": "Definition", "content": """Intimate partner violence is a pattern of behavior — physical violence, sexual violence, stalking, and psychological aggression — perpetrated by someone who is or was in an intimate relationship with the victim, intended to establish control through tactics such as social isolation, deprivation, and intimidation. It affects both sexes and occurs across all ethnic, socioeconomic, sexual-orientation, and religious groups. Childhood exposure to IPV is considered to occur whenever a child sees, hears, or observes the effects of verbal or physical assault between partners or family members, regardless of the sex or sexuality of those involved. Threatening behavior and psychological, physical, sexual, or financial abuse all contribute to poor short- and long-term outcomes for exposed children."""},
 {"title": "Epidemiology", "content": """In the United States, approximately 8.5 million women and 4 million men report experiencing physical violence, rape, or stalking from an intimate partner during their lifetime. Among adolescents who date, 12% of girls and 7% of boys report physical violence in a dating relationship within the prior 12 months. IPV is a significant contributor to lethal violence: in 2007, 14% of homicides nationwide resulted from IPV, with most victims female. IPV is also a frequent risk factor for child abuse in the same household, and childhood exposure to corporal punishment and IPV is associated with children being more likely to exhibit aggressive or violent behavior themselves later — making the violence intergenerational."""},
 {"title": "Pathophysiology", "content": """The central dynamic in an IPV relationship is one partner's need to dominate or control the other; early on, this control may be misread as devotion, but the abuser progressively isolates the victim socially and financially. Violence typically has a psychological component — threats, humiliation, intimidation — that precedes physical or sexual violence and can be the hardest component to treat. The relationship classically cycles through three phases: tension-building (verbal, emotional, and physical threats), the violent episode itself (some combination of physical, sexual, emotional, and psychological assault), and a honeymoon phase (apology and reassurance, driving re-bonding). Over time these cycles escalate — violence becomes more frequent and severe while the honeymoon phase shortens. At least half of women who experience sexual IPV report multiple rapes, and about two-thirds of men and women with physical IPV report repeated assaults; violence can persist after the relationship ends, most commonly as stalking."""},
 {"title": "Clinical features", "content": """Children exposed to IPV present differently depending on developmental stage but commonly show developmental delay, low self-esteem, PTSD symptoms and hypervigilance, poor academic performance or truancy, and antisocial behavior. Compared with nonexposed children, they have significantly more internalizing disorders (depression, anxiety, somatization) and externalizing disorders (ADHD, aggression). Children may also sustain direct physical trauma — for instance, while being held in a parent's arms during an assault, or while intervening to protect a parent — or may be direct targets of abuse themselves, presenting with head, skin, skeletal, or abdominal findings from physical abuse. Risk factors for IPV itself include a history of childhood abuse, adolescent or young adult age, disparity in partners' professional/educational status, geographic or cultural isolation, dependency on the partner due to chronic illness or disability, pregnancy, depression, anxiety, frequent physical injury, substance abuse, and poor compliance with medical care; adolescent-specific risk factors include female gender, age under 24, high-risk sexual behavior, alcohol/substance use, social isolation, depression, and poverty."""},
 {"title": "Diagnostics", "content": """There is no laboratory test for IPV; identification relies on screening and recognizing warning signs. Concerning patterns include frequent visits to urgent care or the emergency department while avoiding the primary care provider, missed or delayed appointments, frequent requests for pregnancy or STI testing, multiple abortions, late prenatal care, inappropriate affect (fearful, defensive, poor eye contact), reluctance to undress, and an overly attentive partner who will not leave the room. Physical findings raising concern include any injury without a reasonable or consistent explanation — especially to the head, neck, teeth, breasts, abdomen, or genital area — and bruises at different stages of healing. Chronic conditions such as headaches, pelvic pain, and recurrent urinary tract infections or STIs are also associated. Screening for IPV should be performed at all adolescent health visits."""}
]

clinical = [
 {"title": "Approach when IPV is identified", "content": """When a screening tool is positive, first ensure privacy and safety before proceeding further — never discuss IPV in front of the partner, and consider removing children from the room. Clarify the circumstances. Use a reflect–empathize–teach–offer approach: reflect back what you heard ("It looks like you've had some tough experiences with your partner"); empathize and remove blame ("The violence is not your fault. You do not deserve to be hurt this way."); teach why help matters (violence usually continues and worsens, it is a crime, and children can be hurt emotionally and physically by exposure); and offer intervention and connect the patient with community resources and options. Note state-specific mandatory reporting rules — in some states, a child's exposure to IPV is itself considered maltreatment and must be reported to CPS.

For an adolescent, screen for IPV at every health visit given how common and under-disclosed it is, and look actively for the warning signs above (avoidance of primary care, frequent ED visits, unexplained injuries, an overly attentive partner). Document findings thoroughly, including any injury without a consistent explanation or bruising at different stages of healing. When treating wounds, monitor for poor healing and signs of infection as medically indicated. Coordinate care around identified mental health needs (depression, anxiety, PTSD symptoms) with therapy modalities shown to help, and involve social work/behavioral health and community domestic-violence resources as part of the ongoing management and follow-up plan."""}
]

article = {
 "topic": "Intimate Partner Violence",
 "slug": "intimate-partner-violence",
 "category_id": 15467,
 "summary": "How intimate partner violence affects children who witness it, the warning signs pediatricians should recognize, and a structured approach to screening and response.",
 "written_by": "claude-sonnet",
 "references": references,
 "short": short,
 "long": long,
 "clinical": clinical
}
with open("/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/articles/ipv.article.json", "w") as f:
    json.dump(article, f, indent=1)
print("done")
