import json

data = {
 "topic": "Patellofemoral Pain Syndrome",
 "slug": "patellofemoral-pain-syndrome",
 "category_id": 15552,
 "summary": "Patellofemoral pain syndrome is the most common cause of anterior knee pain in adolescents, especially females, arising from overuse and abnormal patellar tracking, and is managed conservatively with activity modification and quadriceps/hip strengthening.",
 "written_by": "claude-sonnet",
 "references": [
  {"title": "2021_Fleisher_&_Ludwig's_Textbook_of_Pediatric_Emergency_Medicine.epub", "author": None, "pages": []},
  {"title": "Netters Pediatrics (Florin Т., Ludwig St.)", "author": None, "pages": [177]},
  {"title": "Kliegman R. Nelson Textbook of Pediatrics 2-Volume Set 22ed 2024", "author": None, "pages": [4270, 4352]},
  {"title": "Cover", "author": "Vitalsource Download", "pages": [3169, 3177]},
  {"title": "Pediatric Decision-Making Strategies", "author": "Pomeranz, Albert J.", "pages": [178]},
  {"title": "MedStudy Pediatrics Core 11th Edition 2024-2025", "author": None, "pages": [317]},
  {"title": "Pediatric Board Study Guide", "author": None, "pages": [1073]}
 ],
 "short": [
  {"title": "In short", "content": (
   "- Patellofemoral pain syndrome (PFPS), also called anterior knee pain syndrome or patellofemoral dysfunction, is the most common cause of knee pain in the outpatient setting and the most common cause of anterior knee pain in young athletes\n"
   "- Affects 6-7% of the general adolescent population and up to 25% of teens who participate in sports; accounts for up to 25% of all injuries in runners\n"
   "- Females account for an estimated 55-62% of cases, likely related in part to a wider Q angle (angle between tibial tubercle-patella and patella-anterior superior iliac spine lines) from wider female pelvic anatomy\n"
   "- A Q angle greater than 20 degrees is found in a significant proportion of affected individuals and increases lateral traction on the patella during extension\n"
   "- Relative weakness of the vastus medialis (which must balance the lateral pull of the vastus lateralis, vastus intermedius, and rectus femoris) is highly associated with the condition\n"
   "- Onset typically parallels the adolescent growth spurt; a recent increase in training volume/intensity is a common trigger\n"
   "- Classic symptoms: anterior or peripatellar knee pain worsened by running, stairs (especially descending), squatting, or prolonged sitting with the knee flexed (\"theater sign\"), relieved by extending the knee or ambulating\n"
   "- Exam findings can include a medially displaced patella, tenderness of the patellar articular surface with the knee extended, crepitus, and a positive patellar stress/compression test\n"
   "- Radiographs are typically normal and are not required for diagnosis - PFPS is a diagnosis of exclusion once other structural pathology is ruled out\n"
   "- First-line treatment is ice, rest/activity modification, NSAIDs, and physical therapy strengthening the quadriceps, hamstrings, and hip abductors/external rotators"
  )}
 ],
 "long": [
  {"title": "Definition", "content": (
   "Patellofemoral pain syndrome (PFPS) - also known as anterior knee pain syndrome, patellofemoral dysfunction, or informally \"runner's knee\" - describes a constellation of symptoms, principally anterior or peripatellar knee pain, arising from the patellofemoral joint without another identifiable structural cause. It is a diagnosis of exclusion. Chondromalacia patellae is a distinct pathologic diagnosis referring to actual damage (softening, fissuring, erosion) of the patellar articular cartilage; whether PFPS and chondromalacia represent the same underlying process is debated, though they share symptoms and risk factors, and PFPS may represent an earlier point on a spectrum that does or does not progress to true cartilage damage. Notably, anterior knee pain is frequently present even when the patellar articular cartilage is normal, so PFPS should not be equated with cartilage damage."
  )},
  {"title": "Epidemiology", "content": (
   "PFPS is the most common cause of knee pain seen in the outpatient setting and the most common cause of anterior knee pain in young athletes. It affects an estimated 6-7% of the general adolescent population and up to 25% of adolescents participating in sports, and accounts for up to 25% of all injuries among runners. It occurs most often in early adolescents and young adults, with incidence rising in parallel with the adolescent growth spurt. Females are affected more often than males, accounting for an estimated 55-62% of cases."
  )},
  {"title": "Etiology", "content": (
   "PFPS is multifactorial, resulting from overuse/overload of the knee combined with abnormal patellar tracking and muscular imbalance. Malalignment of the patella and abnormal tracking over the femoral condyles are considered major contributors. The quadriceps (Q) angle - measured between a line from the tibial tubercle to the patella center and a line from the patella center to the anterior superior iliac spine - is often greater than 20 degrees in affected individuals, producing disproportionate lateral traction on the patella during knee extension. Because the vastus lateralis, vastus intermedius, and rectus femoris all pull the patella laterally, they must be balanced by an adequately strong vastus medialis to keep the patella tracking correctly in the trochlear groove; relative vastus medialis weakness is highly associated with PFPS. Females tend to have a wider Q angle due to wider pelvic anatomy, which may partly explain their higher representation among cases. Repetitive loading of the knee joint without adequate recovery time - such as a recent increase in training volume, altered running surface or terrain, or inadequate footwear - is considered a key precipitant, particularly in runners and those running hills or stadium stairs."
  )},
  {"title": "Clinical features", "content": (
   "Patients report anterior knee pain or pain located behind or around the patella, of gradual onset, that is exacerbated by activities loading the patellofemoral joint during knee flexion and weight-bearing: running, descending stairs or inclines, squatting, and climbing steps. A hallmark feature is pain or stiffness after prolonged sitting with the knee flexed (e.g., in a car, theater, or classroom - sometimes called the \"theater sign\"), which improves rapidly with knee extension or ambulation. Patients may describe a sensation of the knee \"giving out\" when descending stairs, though an actual fall is uncommon. Pain is often bilateral, and a recent change in training regimen is a common historical clue. Physical examination may reveal a medially displaced patella, tenderness of the patellar articular surface with the knee extended, crepitus, and a positive patellar stress/compression test (performed with the patient supine and the knee fully extended, applying pressure to the patella). There should be no significant swelling or true mechanical symptoms (locking, instability) - findings that would suggest a different, more serious diagnosis."
  )},
  {"title": "Diagnostics", "content": (
   "PFPS is a clinical diagnosis of exclusion. Radiographs are typically normal and are not required in a classic presentation, but may be obtained to rule out other pathology when the history or exam is atypical (for example, a history of significant swelling, mechanical locking, or trauma)."
  )},
  {"title": "Differential diagnosis", "content": (
   "Other causes of anterior or peripatellar knee pain in adolescents that should be distinguished from PFPS include Osgood-Schlatter disease (traction apophysitis of the tibial tubercle, with tenderness localized directly over the tubercle rather than diffusely around the patella), Sinding-Larsen-Johansson syndrome (traction injury at the inferior pole of the patella), patellar tendinitis (\"jumper's knee\"), patellar subluxation or dislocation, meniscal tears (more common in adolescents, typically from a twisting injury with the knee flexed and foot planted, presenting with joint-line tenderness, effusion, or mechanical symptoms like locking or clicking - best evaluated with MRI rather than radiographs), and Osgood-Schlatter-related fracture or bipartite patella. The presence of significant effusion, true locking, or joint-line (rather than patellar) tenderness should prompt consideration of these alternative diagnoses rather than PFPS."
  )},
  {"title": "Treatment", "content": (
   "Treatment is conservative and aimed at symptom relief and correcting the underlying biomechanical contributors. First-line measures are rest/activity modification, ice, and NSAIDs for pain. A structured physical therapy program emphasizing strengthening of the quadriceps (particularly the vastus medialis), hamstrings, and hip abductors and external rotators is central to management and helps most patients recover. Most cases improve with this conservative approach without need for imaging-guided or surgical intervention."
  )}
 ],
 "clinical": [
  {"title": "Management at the bedside", "content": (
   "In an adolescent, especially a female athlete or runner, presenting with gradual-onset anterior/peripatellar knee pain worsened by stairs, squatting, running, or prolonged sitting with the knee flexed, and relieved by extension or walking, work through a focused exam: check for a medially displaced patella, tenderness of the patellar articular surface with the knee extended, crepitus, and a positive patellar stress/compression test, while specifically looking for red flags that argue against PFPS - significant effusion, true mechanical locking, or joint-line tenderness (which point toward a meniscal tear or other internal derangement warranting MRI rather than a PFPS diagnosis).\n\nIf the presentation is classic, treat empirically without radiographs: ice, relative rest/activity modification, NSAIDs for pain, and referral to a physical therapy program targeting the quadriceps (with attention to vastus medialis strengthening), hamstrings, and hip abductors/external rotators. Counsel the patient on any recent training changes (volume, surface, footwear) that may have precipitated the episode and address them as part of the return-to-activity plan. Reserve radiographs or further imaging for atypical presentations - significant swelling, mechanical symptoms, trauma, or failure to improve with a reasonable trial of conservative therapy."
  )}
 ]
}

with open("/tmp/pfps.article.json", "w") as f:
    json.dump(data, f, indent=1)
print("written")
