It band contracture causes etiology and mechanism deformity signs and symptoms investigation treatment explain in detail with appropriate illustrative diagrams and images
IT band iliotibial band contracture causes mechanism deformity treatment orthopedics

Key pathophysiological concept: When the IT band contracts, secondary adaptive changes occur rapidly. The resulting deformity, regardless of its duration or the patient's age, cannot be corrected by non-operative measures. Traction only increases obliquity and hyperextension of the pelvis and cannot exert any helpful corrective force on the deformity. - Campbell's Operative Orthopaedics

| Deformity | Mechanism |
|---|---|
| Flexion, abduction, external rotation contracture of hip | IT band lies lateral and anterior to the hip joint; contracture causes flexion and abduction deformity. Hip is externally rotated for comfort; if uncorrected, external rotators contract and create fixed deformity. |
| Genu valgum + flexion contracture of the knee | With growth, contracted IT band acts as a taut bowstring across the knee joint and gradually abducts and flexes the tibia. |
| External tibial torsion ± knee joint subluxation | Due to lateral distal attachment, IT band gradually rotates tibia and fibula externally on femur. Rotation is increased if short head of biceps femoris is strong. When extreme, lateral tibial condyle subluxates on lateral femoral condyle, and head of fibula lies in the popliteal space. |
| Limb-length discrepancy | Mechanism not clearly defined; may be related to loss of neurologic and muscle function. Contracted IT band on one side can be associated with considerable extremity shortening after years of growth. |
| Secondary ankle and foot deformities | Downstream consequence of tibial torsion and limb shortening. |
| Pelvic obliquity | Due to asymmetric hip deformity pulling the pelvis laterally. |
| Increased lumbar lordosis | Compensatory response to fixed hip flexion deformity. |



"Hip abduction contracture can cause pelvic obliquity and scoliosis; it is treated with proximal division of the tensor fasciae latae and distal iliotibial band release (Ober-Yount procedure)."
| Aspect | Key Points |
|---|---|
| Anatomy | Fascia lata condensation; arises from coccyx/sacrum/iliac crest; formed by TFL and gluteus maximus; inserts at Gerdy's tubercle |
| Position relative to hip | Lateral AND anterior to hip joint - explains flexion + abduction deformity |
| Primary etiology | Poliomyelitis (frog position); injection fibrosis; prolonged malposition |
| Key deformities | Hip flexion-abduction-ER; genu valgum; knee flexion contracture; external tibial torsion; subluxation; LLD; pelvic obliquity |
| Mechanism at knee | Acts as taut bowstring, gradually abducts and flexes tibia; external rotation from lateral distal attachment |
| Diagnostic test | Ober test (lateral position; hip abducted then allowed to adduct; positive = limb remains abducted) |
| Non-operative | Only effective in prevention/early stage; traction is CONTRAINDICATED (worsens deformity) |
| Minor surgery | Simple fasciotomy (high recurrence) |
| Moderate surgery | Ober-Yount procedure (proximal hip release + distal IT band segment excision) |
| Severe surgery | Campbell technique (complete iliac wing muscle release ± iliac crest osteotomy) |
| Knee surgery | Hamstring lengthening; supracondylar osteotomy; IT band division + capsulotomy for severe cases |
Convert to a pdf
ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace && l…
python3 -c "import weasyprint; print('weasyprint ok')" 2>&1; python3 -c "from re…
~/it_band_pdf/create_pdf.py
import os
import urllib.request
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Image, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm, mm
from reportlab.lib import colors
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus.flowables import HRFlowable
OUTPUT_DIR = "/home/daytona/workspace/it_band_pdf"
IMG_DIR = os.path.join(OUTPUT_DIR, "images")
os.makedirs(IMG_DIR, exist_ok=True)
# Download images
images = {
"anatomy_hip": "https://cdn.orris.care/cdss_images/87bebd5f74c03d1a33011950fcbba1768cca1b228a23e208afd95eb81a79174f.png",
"knee_osteotomy": "https://cdn.orris.care/cdss_images/72ee2556f5f728cfcf170c0a5282f5f9cd96e7fe69c1a119898234592eebcd4b.png",
"surgery1": "https://cdn.orris.care/cdss_images/f328f1de58a96f16df9e3b2fba8cb92fd96ea0b3c398cc81ad6e9da5afa38ab5.png",
"surgery2": "https://cdn.orris.care/cdss_images/b2687c071fc98f6ac27dfc66e2638f4453ec5919282466484f9a501a319cc199.png",
"ober_test": "https://cdn.orris.care/cdss_images/20f8e7bfb844262b54cd352cbe5ad8c59e18b3dfd83e23e4ae13bd6794d92f3d.png",
}
img_paths = {}
for name, url in images.items():
path = os.path.join(IMG_DIR, f"{name}.png")
if not os.path.exists(path):
print(f"Downloading {name}...")
try:
urllib.request.urlretrieve(url, path)
print(f" OK: {path}")
except Exception as e:
print(f" FAILED: {e}")
img_paths[name] = path
# ── Styles ──────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
PAGE_W, PAGE_H = A4
def make_style(name, parent="Normal", **kwargs):
base = styles[parent]
return ParagraphStyle(name, parent=base, **kwargs)
title_style = make_style("DocTitle", "Title",
fontSize=22, textColor=colors.HexColor("#1a3a5c"),
spaceAfter=6, spaceBefore=0, alignment=TA_CENTER,
fontName="Helvetica-Bold")
subtitle_style = make_style("DocSubtitle", "Normal",
fontSize=11, textColor=colors.HexColor("#4a6fa5"),
spaceAfter=4, alignment=TA_CENTER, fontName="Helvetica-Oblique")
h1_style = make_style("H1", "Heading1",
fontSize=15, textColor=colors.HexColor("#1a3a5c"),
spaceBefore=14, spaceAfter=4, fontName="Helvetica-Bold",
borderPad=4)
h2_style = make_style("H2", "Heading2",
fontSize=12, textColor=colors.HexColor("#2e6da4"),
spaceBefore=10, spaceAfter=3, fontName="Helvetica-Bold")
h3_style = make_style("H3", "Heading3",
fontSize=11, textColor=colors.HexColor("#3a7abf"),
spaceBefore=7, spaceAfter=2, fontName="Helvetica-BoldOblique")
body_style = make_style("Body", "Normal",
fontSize=10, leading=15, spaceAfter=5, spaceBefore=2,
alignment=TA_JUSTIFY)
bullet_style = make_style("Bullet", "Normal",
fontSize=10, leading=14, spaceAfter=3, spaceBefore=1,
leftIndent=16, bulletIndent=6)
caption_style = make_style("Caption", "Normal",
fontSize=8.5, leading=12, textColor=colors.HexColor("#555555"),
alignment=TA_CENTER, spaceAfter=6, fontName="Helvetica-Oblique")
callout_style = make_style("Callout", "Normal",
fontSize=9.5, leading=14, textColor=colors.HexColor("#1a3a5c"),
backColor=colors.HexColor("#e8f0fa"), borderPad=6,
leftIndent=12, rightIndent=12, spaceAfter=6, spaceBefore=4,
fontName="Helvetica-Oblique")
source_style = make_style("Source", "Normal",
fontSize=8, textColor=colors.HexColor("#888888"),
alignment=TA_CENTER, spaceAfter=2)
# ── Helper functions ─────────────────────────────────────────────────────────
def H1(text): return Paragraph(text, h1_style)
def H2(text): return Paragraph(text, h2_style)
def H3(text): return Paragraph(text, h3_style)
def P(text): return Paragraph(text, body_style)
def B(text): return Paragraph(f"• {text}", bullet_style)
def CAP(text): return Paragraph(text, caption_style)
def CALL(text): return Paragraph(text, callout_style)
def SP(n=6): return Spacer(1, n)
def HR(): return HRFlowable(width="100%", thickness=0.5,
color=colors.HexColor("#2e6da4"), spaceAfter=4)
def img_flowable(key, width_cm=12, caption_text=None):
path = img_paths.get(key)
elems = []
if path and os.path.exists(path):
w = width_cm * cm
try:
from PIL import Image as PILImage
with PILImage.open(path) as im:
iw, ih = im.size
ratio = ih / iw
h = w * ratio
# cap height
max_h = 9 * cm
if h > max_h:
h = max_h
w = h / ratio
except Exception:
h = width_cm * 0.75 * cm
elems.append(Image(path, width=w, height=h, hAlign="CENTER"))
if caption_text:
elems.append(CAP(caption_text))
return elems
def section_divider(title):
return [SP(4), HR(), H1(title), HR(), SP(4)]
# ── Table helper ─────────────────────────────────────────────────────────────
def make_table(headers, rows, col_widths=None):
data = [headers] + rows
if col_widths is None:
col_widths = [((A4[0] - 4*cm) / len(headers))] * len(headers)
header_style = ParagraphStyle("TH", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white,
leading=12, alignment=TA_CENTER)
cell_style = ParagraphStyle("TD", fontName="Helvetica",
fontSize=9, leading=12, alignment=TA_LEFT)
styled = []
for i, row in enumerate(data):
styled.append([
Paragraph(str(cell), header_style if i == 0 else cell_style)
for cell in row
])
t = Table(styled, colWidths=col_widths, repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a3a5c")),
("ROWBACKGROUNDS", (0,1), (-1,-1),
[colors.HexColor("#f0f5fb"), colors.white]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0c4de")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
return t
# ═══════════════════════════════════════════════════════════════════════════
# BUILD CONTENT
# ═══════════════════════════════════════════════════════════════════════════
story = []
# ── Cover / Title ────────────────────────────────────────────────────────────
story += [
SP(30),
Paragraph("IT Band (Iliotibial Band) Contracture", title_style),
SP(6),
Paragraph("Causes · Etiology · Mechanism · Deformity · Signs & Symptoms · Investigation · Treatment",
subtitle_style),
SP(8),
HRFlowable(width="80%", thickness=2, color=colors.HexColor("#2e6da4"),
hAlign="CENTER", spaceAfter=6),
SP(4),
Paragraph("Source: Campbell's Operative Orthopaedics 15th Ed 2026 · Miller's Review of Orthopaedics 9th Ed\n"
"Gray's Anatomy for Students · Firestein & Kelley's Textbook of Rheumatology",
source_style),
PageBreak(),
]
# ── 1. Anatomy ───────────────────────────────────────────────────────────────
story += section_divider("1. Anatomy of the Iliotibial Band")
story += [
P("The <b>iliotibial band (IT band)</b> is a dense, thick condensation of the fascia lata "
"running along the lateral aspect of the thigh. It is formed by the convergence of multiple "
"fascial layers and two key muscles."),
SP(4),
]
story += [
H2("Proximal Origin"),
B("Fascia lata arises from: coccyx, sacrum, iliac crest, inguinal ligament, and pubic arch"),
B("Invests all muscles of the thigh and buttock"),
B("Both superficial and deep layers attach to the <b>gluteus maximus</b>"),
B("All of the <b>tensor fasciae latae (TFL)</b> contributes to the IT band"),
B("All fascial attachments converge to form the IT band on the lateral thigh"),
SP(4),
H2("Distal Insertion"),
B("Gerdy's tubercle on the <b>lateral tibial condyle</b>"),
B("Also attaches to the <b>lateral femoral condyle</b>"),
SP(4),
H2("Key Positional Relationship"),
CALL("The IT band lies LATERAL and ANTERIOR to the hip joint — this is the anatomical basis "
"for flexion + abduction deformity when it contracts."),
SP(6),
]
story += img_flowable("anatomy_hip", width_cm=11,
caption_text="Fig. 1 — Anatomy of the hip showing the iliotibial band and its relationship "
"with the hip joint, tensor fasciae latae, and gluteus maximus. "
"(Campbell's Operative Orthopaedics 15th Ed)")
# ── 2. Etiology ──────────────────────────────────────────────────────────────
story += section_divider("2. Etiology and Causes")
story += [
H2("A. Neurological / Paralytic Causes (Most Classic)"),
P("<b>Poliomyelitis</b> — the historically most important cause:"),
B("Spasm of hamstrings, hip flexors, TFL, and hip abductors during acute and convalescent stages"),
B("Patient assumes the 'frog position' — hips and knees flexed, extremities completely externally rotated"),
B("If this position is maintained even a few weeks, secondary soft-tissue contractures develop"),
B("When gluteal muscles are weakened, the deformity puts them at mechanical disadvantage, "
"preventing recovery of normal strength"),
B("Growth of contracted soft tissues fails to keep pace with bone growth → progressive deformity"),
SP(4),
B("<b>Cerebral palsy</b> — spasticity in TFL and hip abductors"),
B("<b>Myelomeningocele</b> — muscle imbalance around the hip"),
B("<b>Post-polio sequelae</b> — paralyzed gluteal muscles leave IT band unopposed"),
SP(6),
H2("B. Inflammatory / Fibrotic Causes"),
B("<b>Repeated intramuscular injections</b> into the lateral thigh (especially in children — "
"quinine, antibiotics) → local fibrosis → progressive contracture of TFL and IT band"),
B("<b>Dermatomyositis / polymyositis</b> — fibrotic replacement of lateral thigh muscles"),
B("<b>Tropical myositis</b> — infection causing fibrosis"),
SP(6),
H2("C. Postural / Positional Causes"),
B("Prolonged bed rest in frog position"),
B("Improper positioning during illness, surgery, or casting"),
B("Failure to carry joints through full passive ROM during muscle spasm phase"),
SP(6),
H2("D. Congenital / Idiopathic"),
B("Rare cases without identifiable cause"),
B("Associated with developmental hip dysplasia in some series"),
SP(4),
CALL("Key point: If correct positioning is not maintained while muscle spasm is present, and if joints "
"are not carried through a full range of passive motion at regular intervals after spasm disappears, "
"contractures cannot be prevented. — Campbell's Operative Orthopaedics"),
]
# ── 3. Mechanism ─────────────────────────────────────────────────────────────
story += section_divider("3. Mechanism of Deformity")
story += [
H2("Primary Mechanism at the Hip"),
P("Because the IT band lies <b>lateral AND anterior</b> to the hip joint, when it shortens/contracts:"),
B("Hip is pulled into <b>flexion</b> (band anterior to hip flexion/extension axis)"),
B("Hip is pulled into <b>abduction</b> (lateral pull of the band)"),
B("Hip is <b>externally rotated</b> for comfort to relieve tension on the band"),
B("If external rotation is not corrected, the external rotators themselves contract → <b>fixed deformity</b>"),
SP(6),
H2("Progressive Bowstring Mechanism at the Knee"),
P("With skeletal growth in children, the contracted IT band acts as a <b>taut bowstring</b> "
"across the lateral knee:"),
B("Gradually <b>abducts and flexes the tibia</b> → genu valgum + flexion contracture"),
B("<b>Externally rotates</b> the tibia on the femur (due to lateral distal attachment)"),
B("Rotation increased if short head of biceps femoris is strong"),
B("In extreme cases: <b>lateral tibial condyle subluxates</b> on lateral femoral condyle"),
B("Head of fibula may lie in the <b>popliteal space</b>"),
SP(6),
CALL("Secondary adaptive changes occur soon after the IT band contracts. The resulting deformity, "
"regardless of its duration or the patient's age, CANNOT be corrected by non-operative measures. "
"Traction only increases pelvic obliquity/hyperextension and cannot exert any corrective force. "
"— Campbell's Operative Orthopaedics"),
SP(6),
]
story += img_flowable("knee_osteotomy", width_cm=9,
caption_text="Fig. 2 — Supracondylar osteotomy (green wedge) for knee flexion contracture caused by "
"IT band contracture. The red arrow shows the corrective force direction. "
"(Campbell's Operative Orthopaedics 15th Ed)")
# ── 4. Deformities ───────────────────────────────────────────────────────────
story += section_divider("4. Deformities Caused by IT Band Contracture")
story += [
P("The following canonical classification is from <b>eBox 36.2, Campbell's Operative Orthopaedics 15th Ed</b>:"),
SP(6),
]
deformity_headers = [
Paragraph("<b>Deformity</b>", make_style("TH2", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white, leading=12)),
Paragraph("<b>Mechanism</b>", make_style("TH2", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white, leading=12)),
]
cell_s = ParagraphStyle("TD2", fontName="Helvetica", fontSize=9, leading=12)
deformity_rows_raw = [
("Flexion, abduction, external rotation contracture of the hip",
"IT band lies lateral and anterior to hip joint; contracture causes flexion and abduction deformity. Hip externally rotated for comfort; if not corrected, external rotators contract and contribute to fixed deformity."),
("Genu valgum + flexion contracture of the knee",
"With growth, contracted IT band acts as a taut bowstring across the knee joint and gradually abducts and flexes the tibia."),
("External tibial torsion ± knee joint subluxation",
"Due to lateral distal attachment, IT band gradually rotates tibia and fibula externally on femur. Rotation increased if short head of biceps is strong. When extreme, lateral tibial condyle subluxates on lateral femoral condyle; head of fibula lies in popliteal space."),
("Limb-length discrepancy",
"Mechanism not clearly defined; may relate to loss of neurologic and muscle function. Contracted IT band on one side can be associated with considerable extremity shortening after years of growth."),
("Secondary ankle and foot deformities",
"Downstream consequence of tibial torsion and limb shortening."),
("Pelvic obliquity",
"Due to asymmetric hip deformity pulling the pelvis laterally."),
("Increased lumbar lordosis",
"Compensatory response to fixed hip flexion deformity."),
]
tbl_data = [[Paragraph("<b>Deformity</b>", make_style("TH3", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white, leading=12, alignment=TA_CENTER)),
Paragraph("<b>Mechanism</b>", make_style("TH3", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white, leading=12, alignment=TA_CENTER))]]
for d, m in deformity_rows_raw:
tbl_data.append([Paragraph(d, cell_s), Paragraph(m, cell_s)])
col_w = A4[0] - 4*cm
t = Table(tbl_data, colWidths=[col_w*0.35, col_w*0.65], repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a3a5c")),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#f0f5fb"), colors.white]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0c4de")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
story += [t, SP(6)]
# ── 5. Signs & Symptoms ──────────────────────────────────────────────────────
story += section_divider("5. Signs and Symptoms")
story += [
H2("Clinical Presentation"),
B("<b>Gait abnormality</b> — hip flexed, abducted, externally rotated; knee in valgus"),
B("<b>Lateral hip pain</b> — aggravated by activity"),
B("<b>Lateral knee pain</b> — burning/aching at the lateral femoral condyle"),
B("<b>Snapping hip</b> — audible/palpable as IT band flicks over greater trochanter (external snapping hip)"),
B("<b>Difficulty with adduction</b> — cannot bring limb across midline"),
B("<b>Trendelenburg gait</b> — when gluteal weakness coexists"),
B("<b>Progressive knee deformity</b> — valgus + external tibial rotation"),
B("<b>Limping</b> — due to LLD and/or pain"),
B("<b>'Frog position'</b> — hips and knees flexed, extremities externally rotated (in paralytic cases)"),
SP(6),
H2("Key Clinical Signs"),
H3("1. Ober Test (Diagnostic Cornerstone)"),
P("The Ober test is the primary clinical test for IT band contracture:"),
B("Patient lies on the <b>unaffected side</b>"),
B("Examiner <b>abducts</b> the hip with knee flexed (~90°)"),
B("Hips slightly <b>extended</b> to allow IT band to pass over the greater trochanter"),
B("Examiner slowly <b>lowers</b> the patient's limb with muscles relaxed"),
B("<b>Positive test:</b> Limb remains abducted and does not fall to table under gravity → IT band contracture"),
B("Positive with hip <b>extended past neutral</b> = IT band tightness"),
B("Positive with hip in <b>neutral</b> flexion/extension = gluteus medius contracture or tendinopathy"),
SP(6),
]
story += img_flowable("ober_test", width_cm=10,
caption_text="Fig. 3 — Patient positioned for the Ober test (lateral decubitus). "
"The examiner abducts and extends the hip, then releases; the limb remaining "
"abducted indicates a positive test for IT band contracture. "
"(Campbell's Operative Orthopaedics 15th Ed)")
story += [
SP(4),
H3("2. Snapping Iliotibial Band Test"),
B("Similar position to Ober test"),
B("Hip flexed and extended while tensioning the IT band"),
B("In thin patients, visible snapping of the thickened IT band may be seen"),
SP(4),
H3("3. Hip ROM Assessment"),
B("Restriction of adduction"),
B("Fixed flexion deformity (measured by Thomas test)"),
B("External rotation often > internal rotation"),
B("Abduction may appear preserved early but fixed abduction develops late"),
SP(4),
H3("4. Knee Examination"),
B("Valgus alignment (genu valgum)"),
B("Flexion contracture — inability to fully extend"),
B("External tibial torsion — foot points laterally"),
B("In severe cases: lateral tibial condyle subluxation"),
SP(4),
H3("5. Gait Analysis"),
B("Stiff-legged gait with lateral trunk sway"),
B("Characteristic 'frog' posture in poliomyelitis-related cases"),
B("Trendelenburg sign when gluteals are weak"),
]
# ── 6. Investigations ────────────────────────────────────────────────────────
story += section_divider("6. Investigations")
story += [
H2("A. Clinical / Bedside Tests"),
B("<b>Ober test</b> — primary test for IT band contracture (described above)"),
B("<b>Thomas test</b> — reveals degree of fixed hip flexion contracture"),
B("<b>Straight-leg raise</b> — often limited due to hamstring spasm"),
B("<b>Goniometric measurement</b> — quantify ROM limitations at hip and knee"),
SP(6),
H2("B. Radiological Investigations"),
H3("Plain X-rays (AP Pelvis, Hip, Knee)"),
B("Hip: assess joint space, alignment; quantify pelvic obliquity"),
B("Knee: assess tibiofemoral angle for valgus degree; joint line orientation; tibial torsion"),
B("Lateral tibial condyle subluxation visible in advanced cases"),
SP(4),
H3("MRI"),
B("Definitive assessment of IT band thickness and signal intensity"),
B("Assesses associated bursitis (at lateral femoral condyle)"),
B("Rules out other causes (lateral meniscus, LCL pathology)"),
B("Demonstrates fibrotic/thickened band in contracture"),
SP(4),
H3("Ultrasound"),
B("Dynamic assessment of IT band snapping over greater trochanter"),
B("Measures IT band thickness (normal ~2–3 mm at lateral femoral condyle)"),
B("Guides corticosteroid injections"),
SP(4),
H3("CT Scan"),
B("Best for quantitative assessment of tibial torsion"),
B("Useful for surgical planning before osteotomy"),
SP(4),
H2("C. Special Tests"),
B("<b>EMG/NCS</b> — if neuromuscular etiology suspected (poliomyelitis, myelomeningocele)"),
B("<b>Scanogram (orthoroentgenogram)</b> — for precise limb-length discrepancy measurement"),
]
# ── 7. Treatment ─────────────────────────────────────────────────────────────
story += section_divider("7. Treatment")
story += [
CALL("CRITICAL PRINCIPLE: Non-operative measures cannot correct established IT band contracture. "
"Traction is CONTRAINDICATED — it only worsens pelvic obliquity without correcting the deformity. "
"Surgery is the only effective treatment for established contracture."),
SP(6),
H2("A. Non-Operative / Preventive (Early Stage Only)"),
H3("Positioning and Prophylaxis (Poliomyelitis)"),
B("Patient placed in bed with hips in <b>neutral rotation, slight abduction, and NO flexion</b>"),
B("All joints carried through <b>full passive ROM several times daily</b>"),
B("Hips stretched in extension, adduction, and internal rotation"),
B("Denis Browne-type bar to hold feet in slight internal rotation"),
B("<b>Contracture must be corrected before ambulation is allowed</b>"),
SP(4),
H3("Physiotherapy (Early/Mild Contracture)"),
B("Ober stretches — sustained IT band stretching"),
B("Hip abductor strengthening (gluteus medius)"),
B("Core and hip flexor strengthening to improve biomechanics"),
B("Foam rolling / soft tissue mobilization"),
SP(4),
H3("Pharmacological"),
B("NSAIDs — reduce inflammation in IT band friction syndrome"),
B("Corticosteroid injection — into IT band/bursa at lateral femoral condyle; ultrasound-guided"),
SP(8),
H2("B. Operative Treatment"),
H3("1. Simple Fasciotomy (Minor Contracture)"),
B("Fasciotomies around the hip and knee"),
B("<b>High recurrence rate</b> — does not address severe contracture"),
B("Only appropriate for minor, early contractures"),
SP(6),
H3("2. Ober-Yount Procedure (Moderate Contracture) — eTechnique 36.18"),
P("Indicated for abduction and external rotation contractures:"),
SP(3),
]
procedure_data = [
["Step", "Action"],
["1", "Patient lateral position; transverse incision medial and distal to ASIS, extending laterally above greater trochanter"],
["2", "Divide the iliopsoas tendon distally; excise 1 cm of it"],
["3", "Detach sartorius from ASIS; detach rectus femoris from AIIS; divide TFL from anterior border completely posteriorly"],
["4", "Detach gluteus medius, gluteus minimus, and short external rotators from the greater trochanter"],
["5", "Retract sciatic nerve posteriorly; open hip capsule from anterior to posterior, parallel to acetabular labrum"],
["6 (Yount)", "Lateral longitudinal incision just proximal to the femoral condyle"],
["7 (Yount)", "Divide IT band and fascia lata: posteriorly to biceps tendon, anteriorly to midline of thigh at 2.5 cm proximal to patella"],
["8 (Yount)", "Excise a segment of IT band and lateral intermuscular septum 5–8 cm long"],
["9", "By palpation confirm all tight bands have been divided"],
["Post-op", "Cast at 2 weeks; long-leg brace with pelvic band fitted with hip in corrected position"],
]
proc_s_bold = ParagraphStyle("PS_B", fontName="Helvetica-Bold", fontSize=9, leading=12)
proc_s_norm = ParagraphStyle("PS_N", fontName="Helvetica", fontSize=9, leading=12)
proc_styled = []
for i, row in enumerate(procedure_data):
if i == 0:
proc_styled.append([Paragraph(c, proc_s_bold) for c in row])
else:
proc_styled.append([Paragraph(row[0], proc_s_bold), Paragraph(row[1], proc_s_norm)])
cw = A4[0] - 4*cm
pt = Table(proc_styled, colWidths=[cw*0.15, cw*0.85], repeatRows=1)
pt.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#2e6da4")),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#f0f5fb"), colors.white]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0c4de")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("FONTCOLOR", (0,0), (-1,0), colors.white),
]))
story += [pt, SP(8)]
story += img_flowable("surgery1", width_cm=10,
caption_text="Fig. 4 — Intraoperative view of IT band / fascia lata exposure during the Ober-Yount procedure. "
"The dense white fascial band is being released. (Campbell's Operative Orthopaedics 15th Ed)")
story += [SP(4)]
story += img_flowable("surgery2", width_cm=10,
caption_text="Fig. 5 — Staged fascial release with planned incision line (blue) marking the "
"segment of IT band to be excised during the Yount procedure. "
"(Campbell's Operative Orthopaedics 15th Ed)")
story += [
SP(8),
H3("3. Campbell Technique (Severe Deformity) — eTechnique 36.19"),
P("For severe cases requiring complete muscle release from the iliac wing:"),
B("Incise along anterior half of iliac crest to ASIS and distally 5–10 cm on anterior thigh"),
B("Divide superficial and deep fasciae to the iliac crest"),
B("Strip origins of TFL, gluteus medius and minimus <b>subperiosteally</b> from iliac wing down to acetabulum"),
B("Resect ASIS with origin of sartorius; allow to retract distally and posteriorly"),
B("If hip cannot be hyperextended: divide hip capsule obliquely; last resort: iliopsoas tenotomy from lesser trochanter"),
B("After complete correction: resect redundant portion of denuded ilium with osteotome"),
B("<b>In young children:</b> preserve iliac physis — remove wedge of bone from iliac crest distal to physis; displace crest distally; fix with soft-tissue sutures"),
B("<b>Post-op:</b> Hip spica in hyperextension + 10° abduction for 3–4 weeks; then mobilize on crutches; night splinting for months"),
SP(8),
H2("C. Surgical Management of Knee Deformities"),
]
knee_data = [
["Severity", "Procedure"],
["15–20° flexion contracture (young children)", "Posterior hamstring lengthening + capsulotomy"],
[">20° or more severe", "Supracondylar extension osteotomy of the femur"],
[">70° in growing children", "Division of IT band + hamstring tendons + posterior capsulotomy; skeletal traction via two tibial pins post-operatively; long-leg brace; supracondylar osteotomy as second stage if needed"],
["External tibial torsion", "Derotation osteotomy of tibia; correction of valgus as part of overall plan"],
]
kw = A4[0] - 4*cm
knee_styled = []
for i, row in enumerate(knee_data):
if i == 0:
knee_styled.append([Paragraph(c, proc_s_bold) for c in row])
else:
knee_styled.append([Paragraph(c, proc_s_norm) for c in row])
kt = Table(knee_styled, colWidths=[kw*0.4, kw*0.6], repeatRows=1)
kt.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#2e6da4")),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#f0f5fb"), colors.white]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0c4de")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("FONTCOLOR", (0,0), (-1,0), colors.white),
]))
story += [kt, SP(8)]
# ── 8. Summary Table ─────────────────────────────────────────────────────────
story += section_divider("8. Summary Table")
sum_headers = ["Aspect", "Key Points"]
sum_rows = [
("Anatomy", "Fascia lata condensation; arises from coccyx/sacrum/iliac crest; formed by TFL and gluteus maximus; inserts at Gerdy's tubercle"),
("Position re: hip", "LATERAL and ANTERIOR to hip joint — explains flexion + abduction deformity"),
("Primary etiology", "Poliomyelitis (frog position); injection fibrosis; prolonged malposition"),
("Key deformities", "Hip flexion-abduction-ER; genu valgum; knee flexion contracture; external tibial torsion; knee subluxation; LLD; pelvic obliquity; lumbar lordosis"),
("Mechanism at knee", "Acts as taut bowstring; gradually abducts and flexes tibia; external rotation from lateral distal attachment"),
("Diagnostic test", "Ober test — patient lateral; hip abducted then released; positive = limb remains abducted"),
("Non-operative", "Prevention only; traction is CONTRAINDICATED"),
("Minor surgery", "Simple fasciotomy (high recurrence)"),
("Moderate surgery", "Ober-Yount procedure (proximal hip release + distal IT band segment excision)"),
("Severe surgery", "Campbell technique (complete iliac wing muscle release ± iliac crest osteotomy)"),
("Knee surgery", "Hamstring lengthening; supracondylar osteotomy; IT band division + capsulotomy for severe cases"),
]
sum_cell_s = ParagraphStyle("SC", fontName="Helvetica", fontSize=9, leading=12)
sum_bold_s = ParagraphStyle("SB", fontName="Helvetica-Bold", fontSize=9, leading=12)
sw = A4[0] - 4*cm
sum_styled = [[Paragraph("<b>Aspect</b>", proc_s_bold), Paragraph("<b>Key Points</b>", proc_s_bold)]]
for a, k in sum_rows:
sum_styled.append([Paragraph(a, sum_bold_s), Paragraph(k, sum_cell_s)])
st = Table(sum_styled, colWidths=[sw*0.28, sw*0.72], repeatRows=1)
st.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a3a5c")),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#f0f5fb"), colors.white]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0c4de")),
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("FONTCOLOR", (0,0), (-1,0), colors.white),
]))
story += [st, SP(8)]
# ── References ───────────────────────────────────────────────────────────────
story += [
HR(),
H2("References"),
B("Campbell's Operative Orthopaedics, 15th Edition (2026) — eBox 36.2; eTechniques 36.18, 36.19; pp. 1636–1643"),
B("Miller's Review of Orthopaedics, 9th Edition — Flexion Contractures section"),
B("Firestein & Kelley's Textbook of Rheumatology — Ober test; Physical Examination chapter"),
B("Gray's Anatomy for Students — Iliotibial Band anatomy"),
SP(4),
Paragraph("Generated by Orris Medical AI · July 2026", source_style),
]
# ═══════════════════════════════════════════════════════════════════════════
# BUILD PDF
# ═══════════════════════════════════════════════════════════════════════════
def add_page_number(canvas, doc):
canvas.saveState()
canvas.setFont("Helvetica", 8)
canvas.setFillColor(colors.HexColor("#888888"))
canvas.drawRightString(A4[0] - 2*cm, 1.2*cm, f"Page {doc.page}")
canvas.drawString(2*cm, 1.2*cm, "IT Band Contracture — Orris Medical AI")
canvas.restoreState()
output_path = os.path.join(OUTPUT_DIR, "IT_Band_Contracture.pdf")
doc = SimpleDocTemplate(
output_path,
pagesize=A4,
rightMargin=2*cm,
leftMargin=2*cm,
topMargin=2.5*cm,
bottomMargin=2*cm,
title="IT Band Contracture",
author="Orris Medical AI",
subject="Iliotibial Band Contracture — Orthopedics",
)
doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print(f"PDF created: {output_path}")
cd /home/daytona/workspace/it_band_pdf && python3 create_pdf.py 2>&1
ls -lh /home/daytona/workspace/it_band_pdf/IT_Band_Contracture.pdf
IT Band Contracture
PDF Document · PDF