Make two detailed PowerPoint presentations for ortho residents on 1. Clavicle fractures 2. Genu Varum and Valgum Include relevant images and havard referencing at the end. Make the first one gold themed and with circles and not the Vertical design you always use, make the second one royal red themed
midshaft clavicle fracture radiograph displaced

This diagnostic series consists of three anteroposterior (AP) X-ray radiographs of a left clavicle, demonstrating the progression from acute injury to surgical repair and secondary healing. (A) Preoperative image showing a displaced midshaft clavicle fracture with clear cortical discontinuity and superior displacement of the medial fragment. (B) Immediate postoperative radiograph illustrating anatomical reduction of the fracture site achieved via internal fixation. A long superior locking compression plate is visible, secured by six cortical screws (three medial and three lateral to the fracture zone). (C) Follow-up radiograph at three months post-surgery demonstrating clinical bone union. The fracture line is largely obliterated by the formation of bridging callus, and the orthopedic hardware remains stable without signs of loosening, lucency, or implant failure. The series serves as an educational example of midshaft clavicle fracture management using open reduction and internal fixation (ORIF) with locking plate technology.

This composite educational image illustrates the surgical management of a midshaft clavicle fracture through plate osteosynthesis. Panels A and B are intra-operative clinical photographs. Panel A shows the fracture reduction phase, where surgical instruments (reduction clamps and retractors) are used to align the cortical bone fragments. Panel B demonstrates the fixation phase, showing a 3.5 mm dynamic compression plate (DCP) being contoured and secured to the superior aspect of the clavicle. Panels C and D are anteroposterior (AP) radiographs of the left shoulder. Radiograph C displays the preoperative displaced midshaft clavicle fracture with clear discontinuity and superior displacement of the medial fragment. Radiograph D is a 6-month post-operative follow-up showing successful fracture union and consolidation. The internal fixation hardware, consisting of a superiorly placed plate and six cortical screws, remains in situ with restored anatomical alignment. This sequence highlights the transition from acute injury to clinical recovery via open reduction and internal fixation (ORIF).

This anteroposterior radiograph of the left shoulder region demonstrates a malunion of a midshaft clavicular fracture. The image shows a significant anatomical deformity where the proximal clavicular fragment is displaced superiorly, while the distal fragment is displaced inferiorly and exhibits medial translation, leading to substantial overlapping of the bone ends. There is evidence of irregular cortical thickening and callus formation at the fracture site, indicating a progressed but non-anatomical healing process. The acromioclavicular and glenohumeral joints appear intact. This diagnostic image illustrates the classic visual findings of clavicular malunion, which can lead to secondary complications such as neurogenic thoracic outlet syndrome due to the protrusion of bone fragments into the infraclavicular space. It serves as an educational example of orthopedic fracture sequelae and the importance of anatomical alignment in midshaft clavicle injuries.

This diagnostic image is an anteroposterior x-ray radiograph of the shoulder region, demonstrating a displaced midshaft clavicle fracture. The fracture site exhibits clear cortical discontinuity with superior displacement of the medial fragment and inferior-medial displacement of the lateral fragment, resulting in significant overlapping of bone ends. Overlaid on the radiograph is a standardized geometric methodology for quantifying clavicular shortening in millimeters. Red annotation lines trace the longitudinal axes of the medial and lateral fragments, starting from the sternoclavicular and acromioclavicular joints respectively. Perpendicular and parallel reference lines at the fracture plane facilitate the measurement of linear shortening, indicated by a double-headed arrow labeled 'Shortening in mm'. The image serves as an educational tool for orthopedic evaluation, illustrating how to assess fragment overlap and displacement in midshaft fractures of the pectoral girdle, which is critical for determining surgical versus conservative management strategies.

Anteroposterior (AP) radiograph of the right shoulder and upper chest demonstrating a complete, displaced midshaft clavicle fracture. The image shows a clear break in the middle third of the clavicle bone, resulting in two main fragments. The proximal (medial) fragment is superiorly displaced, with a white arrow indicating the sharp, jagged distal edge of this segment. The distal (lateral) fragment exhibits inferior and medial displacement, characteristic of the downward pull of the weight of the arm and the pectoralis major muscle. Surrounding skeletal anatomy is visible, including the scapula, proximal humerus, and upper thoracic ribs. The glenohumeral and acromioclavicular joints appear intact within this view. This diagnostic image is used to educate on orthopedic trauma, specifically common clavicular fracture patterns and the associated anatomical displacement caused by muscular and gravitational forces.

This diagnostic image is an anterior-posterior (AP) uptilt radiograph of the right shoulder region, demonstrating a displaced midshaft clavicle fracture. The fracture is localized to the middle third of the clavicle (Robinson Type 2b1) and exhibits significant inferior displacement of the lateral fragment and superior displacement of the medial fragment. There is evidence of comminution with at least two distinct cortical fragments and visible overriding of the fractured ends, resulting in subjective clavicular shortening. Adjacent anatomical structures visualized include the proximal humerus, the glenoid and acromion process of the scapula, and the superior ribs, all of which appear intact without acute dislocation or secondary fractures. This image is clinically significant for orthopedic education regarding common equestrian trauma and the assessment of clavicular malalignment in pediatric/adolescent patients. The radiograph is essential for determining management strategies between conservative immobilization and surgical intervention.
Allman classification clavicle fracture Neer distal clavicle
clavicle plate fixation postoperative radiograph

This diagnostic series consists of three anteroposterior (AP) X-ray radiographs of a left clavicle, demonstrating the progression from acute injury to surgical repair and secondary healing. (A) Preoperative image showing a displaced midshaft clavicle fracture with clear cortical discontinuity and superior displacement of the medial fragment. (B) Immediate postoperative radiograph illustrating anatomical reduction of the fracture site achieved via internal fixation. A long superior locking compression plate is visible, secured by six cortical screws (three medial and three lateral to the fracture zone). (C) Follow-up radiograph at three months post-surgery demonstrating clinical bone union. The fracture line is largely obliterated by the formation of bridging callus, and the orthopedic hardware remains stable without signs of loosening, lucency, or implant failure. The series serves as an educational example of midshaft clavicle fracture management using open reduction and internal fixation (ORIF) with locking plate technology.

This postoperative anterior-posterior (AP) uptilt radiograph of the right shoulder demonstrates surgical internal fixation of a midshaft clavicle fracture. A metallic superior-superior locking compression plate is visible, spanning the length of the clavicle to provide stabilization. The hardware consists of a contoured plate fixed with six bicortical screws: three screws positioned medially and three screws positioned laterally to the midshaft osteotomy/fracture site. The radiograph confirms appropriate hardware alignment and anatomical restoration of the clavicular length and contour. Key anatomical landmarks visible include the humerus, the glenohumeral joint, the acromioclavicular joint, the scapula, and the superior ribs. The alignment of the shoulder girdle appears restored relative to the thoracic cage, indicating successful surgical correction of a previous malunion. This diagnostic image is representative of orthopedic trauma management and postoperative evaluation of clavicular hardware integrity.

A multi-panel clinical montage illustrating the progression and surgical management of a left midshaft clavicle fracture. (a) Anteroposterior (AP) radiograph showing an acute, displaced fracture of the left clavicle shaft. (b) AP radiograph demonstrating a symptomatic hypertrophic non-union with significant bony callus formation and lack of cortical bridging. (c) A 3D computed tomography (CT) reconstruction detailing the complex morphology of the non-union site. (d) Intraoperative fluoroscopy in the axial plane showing internal fixation using an anatomically contoured 3.5 mm locking compression plate (LCP) and an interfragmentary lag screw. (e) Postoperative AP radiograph confirming anatomic alignment and superior placement of the reconstruction plate. (f) Macroscopic intraoperative photograph of the resected hypertrophic non-union tissue, including four disc-shaped cortical bone segments and several smaller morcellated fragments, positioned alongside a ruler for scale. This sequence highlights the transition from acute injury to failed conservative healing and subsequent successful surgical revision with plate osteosynthesis.

A multi-panel clinical imaging figure demonstrating a distal clavicular fracture and associated coracoclavicular ligament avulsion. (a) Preoperative radiograph of the shoulder shows a distal clavicle fracture and a bony avulsion of the coracoid process (white arrow). (b) Postoperative radiograph displays internal fixation with a superior distal clavicle plate and screws, along with a suture anchor fixating the coracoid fragment. (c) Follow-up radiograph at one year shows hardware removal (plate) and firm bony union of both the clavicular and coracoid fractures; the suture anchor remains in situ. (d) A 3D CT reconstruction at one year post-injury highlights new bone formation and remodeling at the conoid tubercle (white arrow), indicating successful healing of the conoid ligament attachment site. This sequence illustrates the surgical management and chronological healing progression of a complex acromioclavicular injury involving both fracture and ligamentous disruption.

This composite figure illustrates a case of orthopedic implant failure following surgical fixation of a right clavicle fracture. Subfigure (a) contains two anterior-posterior X-rays of the right shoulder girdle. The left radiograph shows initial postoperative stabilization with a contoured superior locking plate and cortical screws. The right radiograph demonstrates a catastrophic implant failure characterized by a complete transverse fracture of the metallic plate at the mid-shaft level, resulting in loss of reduction and displacement of the underlying clavicular fracture. Subfigure (b) provides a clinical photograph of the explanted hardware, showing the anatomical locking plate broken into two distinct segments with six corresponding cortical screws. The fracture site on the plate reveals irregular, rough edges consistent with mechanical fatigue or acute structural failure. Subfigure (c) is an intraoperative clinical photograph showing the surgical exposure of the clavicle, highlighting the fracture site and the soft tissue environment during the revision procedure. This image set serves as an educational tool for identifying hardware failure, understanding the mechanical stresses on clavicle plates, and recognizing indications for revision osteosynthesis in orthopedic trauma.
genu varum bowlegs clinical photograph child
Blount disease tibia vara radiograph

This standing anteroposterior (AP) radiograph of a 7-year-old child's lower extremities demonstrates a significant unilateral varus deformity of the right tibia, consistent with infantile Blount’s disease (tibia vara). Key radiographic features include a pronounced depression and fragmentation of the medial tibial plateau on the right side, along with metaphyseal beaking. Surgical hardware, consisting of a metallic plate and multiple screws, is visible along the proximal medial metaphysis of the right tibia, indicating a previous attempt at corrective osteotomy. A resulting limb length discrepancy is evident, with the right leg appearing shorter than the left, and a secondary compensatory pelvic tilt. In contrast, the left lower extremity shows normal anatomical alignment and growth plate morphology without surgical intervention. This diagnostic image illustrates the complications of medial physeal bar formation following failed growth-guiding procedures and the associated multiplanar mechanical axis deviation common in late-stage Blount’s disease.

A composite medical visual containing an intraoperative clinical photograph (j) and a corresponding fluoroscopic diagnostic image (k) documenting an opening-wedge high tibial osteotomy (OWHTO) for Blount's disease (infantile tibia vara). Image (j) shows a medial approach to the proximal tibia with the surgical site retracted by two metal bone levers. The field demonstrates a press-fit cancellous bone graft wedge inserted into the osteotomy site to achieve valgus angular correction. Image (k) is an anteroposterior (AP) fluoroscopic view of the right knee, confirming the placement of the radiodense bone graft wedge within the medial proximal tibia. The radiograph shows the tibial and femoral epiphyses, the physis, and the restored alignment of the mechanical axis. This case illustrates the surgical technique of utilizing a press-fit allograft to stabilize a tibial osteotomy in a pediatric patient.

This full-length weight-bearing anteroposterior (AP) radiograph of a 16-year-old adolescent depicts a unilateral lower extremity with complex multi-level angular deformities characteristic of Late-Onset Tibia Vara (LOTV). The image captures the mechanical axis from the hip to the ankle. Key findings include a varus deformity of the distal femur and a concurrent varus deformity of the proximal tibia, which together result in a marked genu varum (bow-legged) appearance at the knee. Additionally, a compensatory valgus deformity is visible in the distal tibia near the ankle joint. The radiograph demonstrates the typical findings of adolescent Blount's disease, including widening of the medial tibial physis without the significant medial plateau depression often seen in the infantile form. Significant soft tissue shadows are present, consistent with obesity, a common comorbidity in LOTV. This image serves as a clinical example for orthopedic deformity analysis and preoperative planning for guided growth or osteotomy procedures.

This diagnostic image is an anteroposterior (AP) X-ray radiography of a human knee joint, captured one year following surgical intervention for Blount’s disease (infantile tibia vara). The radiograph demonstrates the distal femur and proximal tibia with successful correction of a previous pronounced varus deformity. Centrally, the knee joint exhibits relatively normal alignment and good apposition of the femoral condyles and tibial plateau. The medial tibial plateau shows signs of post-operative remodeling and osseous healing after an intraepiphyseal osteotomy. Key visual features include continuous trabecular patterns across the previous osteotomy site on the medial tibial condyle, indicating complete bone consolidation and union. While some structural irregularities remain in the medial metaphysis and epiphysis due to previous surgical elevation of the joint surface, there is no evidence of radiolucency or non-union. The image serves as an educational example of pediatric orthopedic surgical outcomes for growth plate disorders and long-term bone remodeling.

This standing anteroposterior (AP) radiograph of a 20-month-old child demonstrates significant bilateral lower extremity varus alignment (genu varum). The mechanical axis is deviated medially, characterized by outward bowing of the femurs and tibias. Key diagnostic features are visible at the proximal tibias, including medial metaphyseal beaking and focal angulation of the medial proximal tibial metaphysis. These radiographic findings are characteristic of bilateral infantile tibia vara (ITV), also known as Blount’s disease. The severity is quantified by the metaphyseal-diaphyseal angle (MDA), which is 22° on the right and 16° on the left, indicating asymmetric involvement with more pronounced deformity on the right side. The proximal epiphyses show slight wedging medially. The soft tissue silhouettes show increased adiposity, a common association with this condition. This diagnostic image serves as a clinical example for differentiating pathologic bowing from physiologic varus in pediatric orthopedics.
"clavicle"[MeSH Terms] AND "fracture fixation"
"genu valgum" OR "genu varum" guided growth
clavicle fracture sling figure-of-eight nonoperative treatment shoulder shortening
guided growth eight-plate genu valgum hemiepiphysiodesis radiograph
physiologic bowing genu varum infant lower limbs femorotibial angle
mkdir -p /tmp/workspace/ortho-decks/assets && cd /tmp/workspace/ortho-decks && cat > fetch.py <<'EOF' import json, subprocess, base64 B="https://cdn.orris.care/cdss_images/" P="pmc_clinical_VQA_" items={ "cl_displaced":P+"19c3e4dfbe6f49b76e674be0edbfe894f1218a53c54b82724830ea3707a94e66.jpg", "cl_lcp_series":P+"385cf13eed0ef498cc4b0b051ad0358a614ca855435a0d00aab062b6218e974b.jpg", "cl_shortening":P+"6d1755418c4361b6b8a8874d78430a249007d2629e760337ba21f361dadba01c.jpg", "cl_malunion":P+"6db904d84d360f5e600e1e914287e82afe28184e5e0428a04d6ee515fbfbf4c3.jpg", "cl_nonunion":P+"1eb58226a335074d26658d4cb1e12be869c5011ed826d8a95dc931af1cc199fd.jpg", "cl_allman1":P+"2e780ba7c80b861f0bab361e7a3f073e3562cf43fef7fc48a8b37cb5b1b4cea3.jpg", "cl_neer5":P+"4129ad0c72ff7ca62dde2a422dcbb6c25c7a3f4c47d9345f66fc1866a71c73cc.jpg", "cl_distalplate":P+"673ae076a60f85bab251b607b4e222d105c03f67e42abcc6553186b4d0aa7ec9.jpg", "cl_failure":P+"33d65692878ca65052bb947efb55e73b271e817906c861217f42e2be199e07e5.jpg", "cl_orif":P+"40e0fdf9057e9079747fad7a27104dafd91abbfb5e98cd5afb4a626a866a2d72.jpg", "cl_epi":"7f98c2f6643ec983b171fe8876392a12de212caa91dbc700204667a310a852b6.png", "gv_physio":"54e6985d0911e03bc0a06df2f3d46b891ee48d9a2ff6efa087ce0b5780067919.png", "gv_mda":"dc77584ec036899fcde2cb9991fd14e74be9c612e413407018ee2586bc991afd.png", "gv_graph":"d367a16f7532be1f89bb0eebf7282786dcde824415af474ae8131c477faa0ebd.png", "gv_valgum_mad":P+"09f340851faeb0b0a1b473d156d626f6da9e28f9a7cd8fbe21f31a6cf4381e83.jpg", "gv_itv":P+"2e45f922bf3ce3427f2199b47d7714bcba32d7997eda222ef86e9fb1bb422528.jpg", "gv_blount7":P+"523ad6b4cd05ac3" , } EOF echo ok
cd /tmp/workspace/ortho-decks && python - <<'EOF' import re s=open('fetch.py').read() s=s.replace('"gv_blount7":P+"523ad6b4cd05ac3" ,','''"gv_blount7":P+"523ad6b413340cc82096aa95ffdd8972e8b0fb16dab88d08c310d1fb07546b78.jpg", "gv_lotv":P+"10c7ad9108b1831dab84ef641810795994d984965b12007d118609b7e79af496.jpg", "gv_gg_seq":P+"6d2674804f1916d20ee96b9b5b082a73b052aaa66229944a61254f6ab870d8eb.jpg", "gv_gg_valgum":P+"6bdde5a8b7359516e8e1dd3da5af0f5c31df9449e1bf28fed39544f944173837.jpg", "gv_eightplate":P+"38aaadf8134c9e0e1b49f84ea72bfae22ed9443589356594d31599a0d7ce2158.jpg", "gv_postosteo":P+"4ce151d3d0061933c3824c5d9951e9941c6aaebd08742ff4fc6b129c7542f38e.jpg", "gv_rickets":P+"1da3070ece4b2e5f8f4352d64d2d7229b18a86cdf14175fa15c83a39535229ba.jpg",''') s+=''' urls=[v if v.startswith("pmc") is False else v for v in items.values()] full=[B+v for v in items.values()] res=json.loads(subprocess.check_output(["python","/tmp/skills/shared/scripts/fetch_images.py"]+full)) from PIL import Image from io import BytesIO for (k,v),r in zip(items.items(),res): if r["base64"]: raw=base64.b64decode(r["base64"].split("base64,")[1]) im=Image.open(BytesIO(raw)); ext="png" if im.format=="PNG" else "jpg" open(f"assets/{k}.{ext}","wb").write(raw) print(k,ext,im.size) else: print(k,"ERR",r["error"]) ''' open('fetch.py','w').write(s) EOF python fetch.py
PMID: 37432981
PMID: 35459544
"Blount Disease"[MeSH Terms] OR "tibia vara" guided growth
"genu valgum" hemiepiphysiodesis children
~/ortho-decks/lib.py
import math
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
from pptx.oxml.ns import qn
from lxml import etree
from PIL import Image
WARN = []
def rgb(h):
h = h.lstrip('#')
return RGBColor(int(h[0:2], 16), int(h[2:4], 16), int(h[4:6], 16))
def new_prs():
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
return prs
def blank(prs, bg):
s = prs.slides.add_slide(prs.slide_layouts[6])
f = s.background.fill
f.solid()
f.fore_color.rgb = rgb(bg)
return s
def shape(slide, kind, x, y, w, h, fill=None, line=None, lw=1.0):
sh = slide.shapes.add_shape(kind, Inches(x), Inches(y), Inches(w), Inches(h))
if fill:
sh.fill.solid()
sh.fill.fore_color.rgb = rgb(fill)
else:
sh.fill.background()
if line:
sh.line.color.rgb = rgb(line)
sh.line.width = Pt(lw)
else:
sh.line.fill.background()
sh.shadow.inherit = False
return sh
def rect(slide, x, y, w, h, fill=None, line=None, lw=1.0):
return shape(slide, MSO_SHAPE.RECTANGLE, x, y, w, h, fill, line, lw)
def rrect(slide, x, y, w, h, fill=None, line=None, lw=1.0, adj=0.08):
sh = shape(slide, MSO_SHAPE.ROUNDED_RECTANGLE, x, y, w, h, fill, line, lw)
sh.adjustments[0] = adj
return sh
def circle(slide, cx, cy, d, fill=None, line=None, lw=1.0):
return shape(slide, MSO_SHAPE.OVAL, cx - d / 2, cy - d / 2, d, d, fill, line, lw)
def est_height(paras, w, font_scale=0.50):
"""paras: list of (text, size_pt, space_after_pt, indent_in)"""
tot = 0
for t, size, sa, ind in paras:
cpl = max(1, (w - ind) * 72 / (size * font_scale * 1.0))
lines = max(1, math.ceil(len(t) / cpl))
tot += lines * size * 1.2 / 72 + sa / 72
return tot
def _style_run(r, size, color, bold=False, italic=False, font=None):
r.font.size = Pt(size)
r.font.bold = bold
r.font.italic = italic
r.font.color.rgb = rgb(color)
if font:
r.font.name = font
def tb(slide, x, y, w, h, text, size=16, color='000000', bold=False, italic=False,
align='l', anchor='t', font='Calibri', check=True, tag=''):
box = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = box.text_frame
tf.word_wrap = True
tf.margin_left = tf.margin_right = Inches(0.05)
tf.margin_top = tf.margin_bottom = Inches(0.03)
tf.vertical_anchor = {'t': MSO_ANCHOR.TOP, 'm': MSO_ANCHOR.MIDDLE, 'b': MSO_ANCHOR.BOTTOM}[anchor]
lines = text if isinstance(text, list) else [text]
for i, ln in enumerate(lines):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.alignment = {'l': PP_ALIGN.LEFT, 'c': PP_ALIGN.CENTER, 'r': PP_ALIGN.RIGHT}[align]
r = p.add_run()
r.text = ln
_style_run(r, size, color, bold, italic, font)
if check:
fs = 0.56 if font in ('Georgia', 'Cambria') else 0.50
if bold:
fs += 0.04
eh = est_height([(l, size, 0, 0) for l in lines], w - 0.1, fs)
if eh > h + 0.08:
WARN.append(f'TEXT overflow {tag} "{lines[0][:40]}" est {eh:.2f} > {h:.2f}')
return box
def bullets(slide, x, y, w, h, items, size=16, color='222222', bucolor='C8A02A', lead_color=None,
space=6, bu='\u25CF', font='Calibri', tag=''):
box = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = box.text_frame
tf.word_wrap = True
tf.margin_left = tf.margin_right = Inches(0.05)
tf.margin_top = tf.margin_bottom = Inches(0.03)
est = []
first = True
for it in items:
lvl = 0
if isinstance(it, tuple):
it, lvl = it
p = tf.paragraphs[0] if first else tf.add_paragraph()
first = False
sz = size if lvl == 0 else size - 2
lead, rest = (it.split('||', 1) + [''])[:2] if '||' in it else ('', it)
if lead:
r = p.add_run()
r.text = lead + ': '
_style_run(r, sz, lead_color or color, True, False, font)
r = p.add_run()
r.text = rest
_style_run(r, sz, color, False, False, font)
p.space_after = Pt(space)
ind = 0.26 if lvl == 0 else 0.5
pPr = p._p.get_or_add_pPr()
pPr.set('marL', str(int(Inches(ind))))
pPr.set('indent', str(-int(Inches(0.24))))
buClr = etree.SubElement(pPr, qn('a:buClr'))
c = etree.SubElement(buClr, qn('a:srgbClr'))
c.set('val', bucolor)
buSz = etree.SubElement(pPr, qn('a:buSzPct'))
buSz.set('val', '70000')
ch = etree.SubElement(pPr, qn('a:buChar'))
ch.set('char', bu if lvl == 0 else '\u25CB')
est.append(((lead + ': ' if lead else '') + rest, sz, space, ind))
eh = est_height(est, w - 0.1, 0.51)
if eh > h + 0.05:
WARN.append(f'BULLETS overflow {tag} est {eh:.2f} > {h:.2f}')
return box
def pic(slide, path, x, y, w, h, frame=None, caption=None, cap_color='555555', cap_size=10,
pad=0.06, bg='FFFFFF', align='c'):
"""fit image within box (x,y,w,h); draws frame; returns bottom y."""
im = Image.open(path)
iw, ih = im.size
ch = 0.3 if caption else 0
bw, bh = w - 2 * pad, h - 2 * pad - ch
sc = min(bw / iw, bh / ih)
dw, dh = iw * sc, ih * sc
fx = x + (w - (dw + 2 * pad)) / 2
fy = y
if frame is not None:
rect(slide, fx, fy, dw + 2 * pad, dh + 2 * pad, bg, frame, 1.25)
slide.shapes.add_picture(path, Inches(fx + pad), Inches(fy + pad), Inches(dw), Inches(dh))
if caption:
tb(slide, x, fy + dh + 2 * pad + 0.02, w, 0.5, caption, cap_size, cap_color, italic=True, align='c',
check=False)
return fy + dh + 2 * pad
def circ_pic(slide, path, cx, cy, d, line='C8A02A', lw=3.0, focus=(0.5, 0.5)):
im = Image.open(path)
iw, ih = im.size
side = min(iw, ih)
pic_ = slide.shapes.add_picture(path, Inches(cx - d / 2), Inches(cy - d / 2), Inches(d), Inches(d))
# crop to square around focus
if iw > ih:
extra = (iw - side) / iw
l = extra * focus[0] * 2
l = min(max(l, 0), extra)
pic_.crop_left = l
pic_.crop_right = extra - l
else:
extra = (ih - side) / ih
t = min(max(extra * focus[1] * 2, 0), extra)
pic_.crop_top = t
pic_.crop_bottom = extra - t
pic_.auto_shape_type = MSO_SHAPE.OVAL
pic_.line.color.rgb = rgb(line)
pic_.line.width = Pt(lw)
return pic_
def table(slide, x, y, w, rows, colw, rowh, hdr_fill, hdr_color, fills, text_color, size=13, hdr_size=13,
font='Calibri', bold_first_col=True, border='FFFFFF'):
nr, nc = len(rows), len(rows[0])
gs = slide.shapes.add_table(nr, nc, Inches(x), Inches(y), Inches(w), Inches(rowh * nr))
t = gs.table
# strip default style banding
tblPr = t._tbl.tblPr
tblPr.set('firstRow', '0')
tblPr.set('bandRow', '0')
tot = sum(colw)
for i, cw in enumerate(colw):
t.columns[i].width = Inches(w * cw / tot)
total_h = 0
for r in range(nr):
rh = rowh[r] if isinstance(rowh, list) else rowh
t.rows[r].height = Inches(rh)
# estimate needed
need = 0
for c in range(nc):
cw = w * colw[c] / tot - 0.2
sz = hdr_size if r == 0 else size
need = max(need, est_height([(rows[r][c], sz, 0, 0)], cw, 0.52) + 0.14)
if need > rh + 0.02:
WARN.append(f'TABLE row {r} "{rows[r][0][:25]}" needs {need:.2f} > {rh:.2f}')
total_h += max(rh, need)
for c in range(nc):
cell = t.cell(r, c)
cell.margin_left = cell.margin_right = Inches(0.08)
cell.margin_top = cell.margin_bottom = Inches(0.04)
cell.vertical_anchor = MSO_ANCHOR.MIDDLE
cell.fill.solid()
if r == 0:
cell.fill.fore_color.rgb = rgb(hdr_fill)
else:
cell.fill.fore_color.rgb = rgb(fills[(r - 1) % len(fills)])
tf = cell.text_frame
tf.word_wrap = True
p = tf.paragraphs[0]
run = p.add_run()
run.text = rows[r][c]
if r == 0:
_style_run(run, hdr_size, hdr_color, True, False, font)
else:
_style_run(run, size, text_color, bold_first_col and c == 0, False, font)
return total_h
def notes(slide, text):
slide.notes_slide.notes_text_frame.text = text
def check_bounds(prs, name):
W, H = prs.slide_width, prs.slide_height
for i, s in enumerate(prs.slides, 1):
for sh in s.shapes:
if sh.width is None:
continue
if sh.left + sh.width > W + 20000 or sh.top + sh.height > H + 20000 or sh.left < -20000 or sh.top < -20000:
if sh.shape_type == 13 or (sh.has_text_frame and sh.text_frame.text.strip()):
WARN.append(f'{name} slide {i}: shape out of bounds {sh.name}')
~/ortho-decks/deck1.py
import sys
sys.path.insert(0, '/tmp/workspace/ortho-decks')
from lib import *
A = '/tmp/workspace/ortho-decks/assets/'
DARK, CREAM, GOLD, DEEP, LIGHT, MID, TXT, GREY = '1E1A10', 'FBF7EC', 'C8A02A', '8C6D12', 'F5EBC8', 'EBD58A', '2A2315', '6B6250'
SHORT = 'Clavicle Fractures | Orthopaedic Resident Teaching'
prs = new_prs()
pg = [1]
def content(title, size=28):
s = blank(prs, CREAM)
pg[0] += 1
circle(s, 12.95, 0.25, 2.3, LIGHT)
circle(s, 11.75, 0.0, 0.9, MID)
circle(s, 13.1, 7.4, 1.6, LIGHT)
circle(s, 0.95, 0.78, 0.7, GOLD)
tb(s, 0.6, 0.55, 0.7, 0.45, str(pg[0]), 18, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, 1.45, 0.4, 10.1, 0.8, title, size, DEEP, True, anchor='m', font='Georgia', tag='title:' + title)
rect(s, 0.7, 1.33, 11.93, 0.025, GOLD)
circle(s, 0.7, 1.345, 0.16, GOLD)
circle(s, 12.63, 1.345, 0.16, GOLD)
tb(s, 0.7, 7.08, 8, 0.3, SHORT, 10, GREY, check=False)
return s
def card(s, x, y, w, h, head, body_items, size=14, head_fill=DEEP, bg='FFFFFF'):
rrect(s, x, y, w, h, bg, GOLD, 1.25, 0.04)
rrect(s, x, y, w, 0.5, head_fill, None, 0, 0.3)
tb(s, x + 0.1, y + 0.02, w - 0.2, 0.46, head, 15, 'FFFFFF', True, anchor='m', font='Georgia', tag='cardhead')
bullets(s, x + 0.15, y + 0.62, w - 0.3, h - 0.7, body_items, size, TXT, GOLD, DEEP, 5, tag='card:' + head)
def stat(s, cx, cy, d, big, label, lw=2.2, fs=22, lab_w=2.6, lab_h=0.75, lab_size=12):
circle(s, cx, cy, d + 0.2, None, GOLD, 1.5)
circle(s, cx, cy, d, GOLD)
tb(s, cx - d / 2, cy - 0.3, d, 0.6, big, fs, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, cx - lab_w / 2, cy + d / 2 + 0.15, lab_w, lab_h, label, lab_size, TXT, align='c', tag='stat:' + big)
# ---------- 1 Title ----------
s = blank(prs, DARK)
for d, c, w in [(6.9, DEEP, 1.5), (6.0, GOLD, 1.0), (5.4, DEEP, 0.75)]:
circle(s, 10.0, 3.75, d, None, c, w)
circ_pic(s, A + 'cl_displaced.jpg', 10.0, 3.75, 4.7, GOLD, 3.5, focus=(0.5, 0.5))
circle(s, 6.9, 6.5, 0.35, GOLD)
circle(s, 13.0, 0.5, 0.5, MID)
circle(s, 7.6, 0.9, 0.18, GOLD)
tb(s, 0.8, 1.3, 6.0, 0.4, 'ORTHOPAEDIC RESIDENT TEACHING SERIES', 14, GOLD, True, font='Calibri')
tb(s, 0.8, 1.85, 6.2, 2.3, ['Clavicle', 'Fractures'], 56, 'FFFFFF', True, font='Georgia', tag='t1')
rect(s, 0.85, 4.3, 1.6, 0.04, GOLD)
tb(s, 0.8, 4.5, 5.9, 1.0, 'Applied anatomy, classification, evidence-based management and complications', 20, 'E8DDB5',
tag='sub')
tb(s, 0.8, 6.3, 5.8, 0.6, 'Sources: Rockwood and Green 10th ed, Campbell 15th ed, AAOS guideline 2023', 12, 'B8A96A',
check=False)
notes(s, 'Clavicle fractures: common injury, evolving evidence base. Radiograph shows a displaced midshaft fracture.')
# ---------- 2 Objectives ----------
s = content('Learning objectives')
objs = ['Describe applied anatomy and the deforming forces', 'Recognise injury patterns and associated injuries',
'Classify fractures: Allman, Robinson, Neer', 'Choose operative versus nonoperative care using evidence',
'Apply fixation principles and rehabilitation', 'Manage nonunion, malunion and hardware problems']
for i, o in enumerate(objs):
cx = 1.35 + (i % 3) * 4.1
cy = 2.45 + (i // 3) * 2.3
circle(s, cx, cy, 1.15, None, GOLD, 1.5)
circle(s, cx, cy, 0.95, GOLD)
tb(s, cx - 0.45, cy - 0.3, 0.9, 0.6, str(i + 1), 28, 'FFFFFF', True, align='c', anchor='m', font='Georgia',
check=False)
tb(s, cx + 0.75, cy - 0.55, 2.55, 1.1, o, 15, TXT, True, anchor='m', tag='obj')
tb(s, 0.7, 6.15, 11.9, 0.6,
'Format: anatomy and assessment, classification, treatment decisions, surgery and rehab, complications, viva pearls.',
14, GREY, italic=True)
# ---------- 3 Epidemiology ----------
s = content('Epidemiology')
stat(s, 1.95, 2.45, 1.4, '2.6-4%', 'of all fractures', fs=20)
stat(s, 4.95, 2.45, 1.4, '80-85%', 'midshaft: thin, curved, no muscle or ligament protection', fs=20)
stat(s, 1.95, 5.0, 1.4, '15-20%', 'distal third: older patients, simple falls', fs=20)
stat(s, 4.95, 5.0, 1.4, '0-5%', 'medial third: often high energy, easily missed', fs=20)
pic(s, A + 'cl_epi.png', 6.95, 1.65, 5.7, 3.1, GOLD,
'Fractures by age and sex, Swedish Fracture Register (Kihlstrom et al., 2017)')
bullets(s, 6.95, 5.15, 5.7, 1.8, [
'Incidence||29 to 64 per 100,000 per year',
'Males||peak under 25 years, smaller second peak in middle age',
'Females||modest peaks in teenagers and the elderly (osteoporotic falls)'], 14, TXT, GOLD, DEEP, 5, tag='epi')
notes(s, 'Figures from Rockwood and Green 10th ed (Woltz and McKee). Hippocrates advised benign neglect; modern data challenge this for displaced fractures.')
# ---------- 4 Anatomy ----------
s = content('Applied anatomy')
bullets(s, 0.7, 1.6, 7.1, 5.3, [
'Shape||S-shaped; medial two thirds convex anteriorly, lateral third concave anteriorly',
'Development||first bone to ossify, shaft forms by intramembranous ossification; medial physis fuses in the early to mid 20s',
'Weak point||thin junction of middle and lateral thirds, unprotected by muscle or ligament',
'Ligaments||sternoclavicular and costoclavicular medially; conoid and trapezoid (coracoclavicular, CC) laterally suspend the scapula',
'Neurovascular||subclavian vessels, brachial plexus and lung apex lie behind the middle third',
'Supraclavicular nerves||cross the bone anteriorly; injury gives numbness below the incision'],
15, TXT, GOLD, DEEP, 7, tag='anat')
rrect(s, 8.1, 1.6, 4.53, 5.2, 'FFFFFF', GOLD, 1.25, 0.04)
tb(s, 8.2, 1.65, 4.3, 0.5, 'Deforming forces: displaced midshaft', 15, DEEP, True, font='Georgia', tag='df')
forces = [('SCM', 'Elevates the medial fragment'),
('Arm weight + pectoralis major', 'Pull the lateral fragment down, in and forward: shortening'),
('Subclavius, CC ligaments', 'Tether the lateral fragment and limit distal displacement')]
for i, (a, b) in enumerate(forces):
cy = 2.9 + i * 1.3
circle(s, 8.75, cy, 0.75, GOLD)
tb(s, 8.4, cy - 0.25, 0.7, 0.5, str(i + 1), 20, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, 9.3, cy - 0.5, 3.2, 0.35, a, 13, DEEP, True, tag='force')
tb(s, 9.3, cy - 0.15, 3.2, 0.7, b, 12, TXT, tag='force2')
notes(s, 'Mention only 1/3 of clavicle lateral is anterior concave; medial physis is last in the body to close.')
# ---------- 5 Mechanism and associated ----------
s = content('Mechanism and associated injuries')
card(s, 0.7, 1.65, 5.8, 5.2, 'Mechanisms', [
'Fall onto the point of the shoulder||most common',
'Direct blow||contact sport, seatbelt, assault',
'High energy||cycling, motorcycle, football, hockey; young males',
'Low energy||elderly: distal third, osteoporotic',
'Fall on outstretched hand||uncommon',
'Birth trauma||neonates, heals with remodelling'], 14)
card(s, 6.83, 1.65, 5.8, 5.2, 'Look for associated injuries', [
'Ribs, pneumothorax, haemothorax||auscultate, chest film',
'Scapula and glenoid||floating shoulder',
'AC or SC dislocation||esp. with lateral or medial fractures',
'Brachial plexus and subclavian vessels||rare, but document',
'Medial third||concomitant injuries in up to 80% and mortality about 20% from head and chest trauma',
'Skin||tenting, open wounds'], 14)
# ---------- 6 Clinical evaluation ----------
s = content('Clinical evaluation')
cols = [('H', 'History', ['Mechanism and energy', 'Dominant arm, sport, job', 'Smoking, diabetes, anticoagulants', 'Paraesthesia, dyspnoea, dysphagia', 'Previous shoulder problems']),
('E', 'Examination', ['Drooped, shortened shoulder', 'Step, crepitus, bruising', 'Skin tenting or wound', 'Full upper limb neurovascular exam', 'Chest auscultation, C-spine, scapula, SC and AC joints']),
('!', 'Red flags', ['Open fracture or threatened skin', 'Pulse deficit or expanding haematoma', 'Progressive neurological deficit', 'Pneumothorax or respiratory compromise', 'Posterior SC injury with mediastinal signs'])]
for i, (ic, h, items) in enumerate(cols):
x = 0.7 + i * 4.05
circle(s, x + 1.95, 2.2, 1.0, GOLD)
tb(s, x + 1.45, 1.85, 1.0, 0.7, ic, 32, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, x, 2.85, 3.9, 0.45, h, 18, DEEP, True, align='c', font='Georgia')
rrect(s, x, 3.35, 3.9, 3.5, 'FFFFFF', GOLD, 1.25, 0.04)
bullets(s, x + 0.12, 3.45, 3.66, 3.3, items, 14, TXT, GOLD, DEEP, 6, tag='clin' + h)
# ---------- 7 Imaging ----------
s = content('Imaging')
bullets(s, 0.7, 1.6, 6.3, 5.3, [
'AP clavicle||plus 15 to 30 degree cephalic tilt to show true displacement and overlap',
'Zanca view||lateral third; centred on AC joint with lower penetration',
'Serendipity view or CT||medial third and SC joint',
'CT with 3D||medial fractures, comminution, planning for nonunion or malunion',
'Measure||shortening against the contralateral side, and displacement as a proportion of shaft width',
'Chest film||if rib or lung injury is suspected'], 15, TXT, GOLD, DEEP, 8, tag='img')
pic(s, A + 'cl_displaced.jpg', 7.3, 1.6, 5.3, 2.85, GOLD, 'Displaced midshaft fracture, superior medial fragment')
pic(s, A + 'cl_shortening.jpg', 7.3, 4.6, 5.3, 2.2, GOLD, 'Quantifying shortening in millimetres')
# ---------- 8 Classification ----------
s = content('Classification: whole clavicle and midshaft')
rows = [['System', 'Categories', 'Comment'],
['Allman 1967', 'Group I middle third; II lateral third; III medial third', 'Simple, location based'],
['Robinson 1998', 'Type 1 medial, 2 diaphyseal, 3 lateral; A undisplaced, B displaced; 2B1 simple or wedge, 2B2 comminuted or segmental', 'Most used for midshaft; links to outcome'],
['OTA/AO', '15.1 medial, 15.2 diaphyseal, 15.3 lateral; A simple, B wedge, C multifragmentary', 'Research and registries']]
table(s, 0.7, 1.6, 11.93, rows, [1.6, 6.3, 3.4], [0.45, 0.6, 0.95, 0.7], DEEP, 'FFFFFF', ['FFFFFF', LIGHT], TXT, 13, 14)
pic(s, A + 'cl_allman1.jpg', 0.7, 4.65, 6.6, 2.2, GOLD, 'Allman group I with marked displacement and shortening')
rrect(s, 7.7, 4.7, 4.93, 2.1, LIGHT, GOLD, 1.25, 0.05)
tb(s, 7.85, 4.78, 4.65, 0.4, 'Why it matters', 15, DEEP, True, font='Georgia')
bullets(s, 7.85, 5.2, 4.65, 1.6, ['Displacement and shortening predict nonunion and symptomatic malunion',
'Comminution (2B2) is a recognised risk factor'], 13, TXT, GOLD, DEEP, 4, tag='why')
# ---------- 9 Neer ----------
s = content('Lateral third: Neer classification')
rows = [['Type', 'Pattern', 'Stability and usual plan'],
['I', 'Lateral to CC ligaments; CC intact; minimal displacement', 'Stable; nonoperative'],
['IIA', 'Medial to CC ligaments; conoid and trapezoid attached to distal fragment', 'Unstable; consider fixation'],
['IIB', 'Conoid torn, trapezoid on distal fragment', 'Unstable; fixation'],
['III', 'Intra-articular, AC joint; CC intact', 'Usually nonoperative; late AC arthritis'],
['IV', 'Paediatric periosteal sleeve avulsion', 'Usually nonoperative; remodels'],
['V', 'Comminuted; inferior fragment held by CC ligaments', 'Unstable; fixation']]
table(s, 0.7, 1.6, 8.0, rows, [0.7, 4.3, 3.0], [0.42] + [0.72] * 6, DEEP, 'FFFFFF', ['FFFFFF', LIGHT], TXT, 12, 13)
pic(s, A + 'cl_neer5.jpg', 9.0, 1.6, 3.65, 3.1, GOLD, 'Neer type V, axillary view')
rrect(s, 9.0, 5.05, 3.65, 1.75, LIGHT, GOLD, 1.25, 0.05)
tb(s, 9.1, 5.1, 3.45, 1.65, 'Key idea: the CC ligaments keep the medial fragment from the distal one; once separated, the shaft rides up and nonunion is common.', 13, TXT, tag='neerkey')
# ---------- 10 Medial and special ----------
s = content('Medial third injuries')
bullets(s, 0.7, 1.6, 7.5, 5.3, [
'Diagnosis||easy to miss on plain film; CT is advised (Rockwood)',
'Look for||mediastinal structures, trachea, oesophagus, great vessels if posterior displacement',
'Undisplaced or minimally displaced||sling and observation',
'Posterior displacement with compression||reduce under anaesthesia with thoracic surgery available; open reduction and plate if unstable',
'Avoid||smooth pins across the SC joint (migration risk)',
'Children and adolescents||usually physeal injury (Salter-Harris I or II); remodelling is good'],
15, TXT, GOLD, DEEP, 7, tag='med')
stat(s, 9.5, 2.9, 1.7, 'Up to 80%', 'have concomitant injuries (Rockwood)', fs=17, lab_w=3.2)
stat(s, 11.9, 5.2, 1.3, '~20%', 'mortality from associated head and chest trauma', fs=20, lab_w=2.4, lab_h=0.9)
# ---------- 11 Nonoperative ----------
s = content('Nonoperative treatment')
bullets(s, 0.7, 1.6, 11.9, 3.2, [
'Indications||undisplaced or minimally displaced midshaft; Neer I and III; low-demand patients; informed preference',
'Sling for comfort||until pain settles, usually 1 to 3 weeks; figure-of-eight bandage offers no advantage over a sling',
'Early motion||pendulums, then active-assisted range as pain allows',
'Restrictions||no heavy lifting, pushing or pulling for about 6 weeks',
'Follow-up||films at 1 to 2 weeks if displaced, then at about 6 weeks; counsel on nonunion, malunion and a visible lump'],
15, TXT, GOLD, DEEP, 6, tag='nonop')
steps = [('0-2 wk', 'Sling, pendulums'), ('2-6 wk', 'Active-assisted ROM'), ('6-12 wk', 'Strengthen if healing'),
('~12 wk', 'Contact sport once united')]
for i, (a, b) in enumerate(steps):
cx = 1.9 + i * 3.1
circle(s, cx, 5.4, 1.25, GOLD)
tb(s, cx - 0.62, 5.15, 1.24, 0.5, a, 15, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, cx - 1.25, 6.1, 2.5, 0.6, b, 13, TXT, align='c', tag='step')
if i < 3:
shape(s, MSO_SHAPE.RIGHT_ARROW, cx + 0.85, 5.25, 0.55, 0.3, DEEP)
tb(s, 0.7, 4.6, 5, 0.35, 'Typical timeline (individualise)', 12, GREY, italic=True, check=False)
# ---------- 12 Evidence ----------
s = content('Evidence: operative versus nonoperative')
stat(s, 1.9, 2.45, 1.5, '15%', 'nonunion after nonoperative care of displaced fractures (Campbell)', fs=24, lab_w=2.9, lab_h=0.9)
stat(s, 5.1, 2.45, 1.5, '24 RCTs', 'network meta-analysis, 2161 patients (Shi 2022)', fs=19, lab_w=2.9, lab_h=0.9)
stat(s, 8.3, 2.45, 1.5, '4 + 10', 'AAOS 2023 guideline: 4 recommendations, 10 options', fs=22, lab_w=2.9, lab_h=0.9)
bullets(s, 0.7, 4.85, 11.9, 2.2, [
'COTS 2007 RCT||completely displaced midshaft fractures: plating gave earlier function and fewer nonunions and symptomatic malunions than a sling',
'Network meta-analysis||nonoperative care has more nonunion in markedly displaced or comminuted fractures; plating and nailing have similar low nonunion and function; long-term differences may be small',
'Risk factors in nonoperative care||complete displacement, shortening above 2 cm, comminution, associated fractures'],
13.5, TXT, GOLD, DEEP, 5, tag='evid')
rrect(s, 10.7, 1.7, 1.95, 2.0, LIGHT, GOLD, 1.25, 0.06)
tb(s, 10.78, 1.75, 1.8, 1.9, 'Select, do not treat everyone the same', 13, DEEP, True, align='c', anchor='m', font='Georgia', tag='sel')
notes(s, 'Canadian Orthopaedic Trauma Society 2007 JBJS Am. Network MA: Shi et al 2022 Injury PMID 35459544. AAOS CPG summary: Wright and Della Rocca 2023 PMID 37432981. New 2024-2026 meta-analyses should be checked before final recommendation.')
# ---------- 13 Indications ----------
s = content('Indications for surgery')
card(s, 0.7, 1.65, 5.8, 5.2, 'Absolute / urgent', [
'Open fracture',
'Skin tenting with impending compromise',
'Vascular injury needing repair',
'Progressive neurological deficit',
'Displaced fracture compressing mediastinal structures (medial)'], 15)
card(s, 6.83, 1.65, 5.8, 5.2, 'Relative (shared decision)', [
'Complete displacement and shortening above 2 cm',
'Comminuted or segmental midshaft',
'Floating shoulder',
'Polytrauma or need for early weight bearing through arm',
'High-demand athlete or manual worker',
'Symptomatic nonunion or malunion',
'Unstable Neer II and V lateral fractures'], 14.5)
# ---------- 14 Surgical options ----------
s = content('Fixation options')
rows = [['Option', 'Advantages', 'Drawbacks'],
['Superior plate', 'Strong in tension; easy exposure', 'Prominent; more hardware removal'],
['Anteroinferior plate', 'Less prominent; drill points away from vessels', 'Harder exposure; contouring'],
['Intramedullary nail or pin', 'Small incision, less prominence', 'Poor control of comminution and length'],
['Distal: locking or hook plate', 'Short fragment fixation', 'Hook: subacromial erosion, removal'],
['CC reconstruction or suture button', 'Restores CC suspension', 'Often combined with plate']]
table(s, 0.7, 1.6, 8.3, rows, [2.3, 3.2, 2.8], [0.45] + [0.9] * 5, DEEP, 'FFFFFF', ['FFFFFF', LIGHT], TXT, 12.5, 13)
pic(s, A + 'cl_lcp_series.jpg', 9.3, 1.6, 3.35, 5.3, GOLD, 'Pre-op, post-op, 3 months')
# ---------- 15 Technique ----------
s = content('Plating: technique pearls')
bullets(s, 0.7, 1.6, 6.6, 5.3, [
'Set-up||beach chair or supine with bump; image intensifier from the opposite side',
'Incision||along or just below the clavicle; protect supraclavicular nerves',
'Reduce||clamps to restore length and rotation; lag screw for wedge fragments',
'Plate||precontoured; at least six cortices on each side of the fracture',
'Drill safely||soft tissue guard, controlled depth; subclavian vessels and lung lie beneath',
'Close||myofascial layer over the plate to reduce prominence'],
15, TXT, GOLD, DEEP, 8, tag='tech')
pic(s, A + 'cl_orif.jpg', 7.6, 1.6, 5.05, 5.25, GOLD, 'Reduction, plate contouring, pre- and post-op films')
# ---------- 16 Rehab ----------
s = content('Postoperative rehabilitation')
ph = [('0-2 wk', 'Sling for comfort; pendulums; hand, wrist, elbow motion'),
('2-6 wk', 'Active-assisted motion; elevation limited to about 90 degrees; light daily use'),
('6-12 wk', 'Check radiograph; progress to full motion and strengthening'),
('>12 wk', 'Return to heavy work and contact sport when united and strong')]
for i, (a, b) in enumerate(ph):
cx = 2.0 + i * 3.1
circle(s, cx, 2.6, 1.7, None, GOLD, 1.5)
circle(s, cx, 2.6, 1.45, GOLD)
tb(s, cx - 0.7, 2.3, 1.4, 0.6, a, 18, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, cx - 1.4, 3.65, 2.8, 1.5, b, 13, TXT, align='c', tag='rehab')
if i < 3:
shape(s, MSO_SHAPE.RIGHT_ARROW, cx + 1.0, 2.45, 0.6, 0.3, DEEP)
rrect(s, 0.7, 5.35, 11.93, 1.5, LIGHT, GOLD, 1.25, 0.05)
bullets(s, 0.9, 5.45, 11.5, 1.35, [
'Timelines are typical; follow the operating surgeon protocol and fixation stability.',
'Hardware removal is considered only for symptoms, after union, with refracture risk counselled.'],
14, TXT, GOLD, DEEP, 6, tag='rehab2')
# ---------- 17 Lateral surgical ----------
s = content('Lateral third: surgical options')
bullets(s, 0.7, 1.6, 6.6, 5.3, [
'Who||Neer IIB and V, and displaced IIA; Neer I and III usually nonoperative',
'Superior locking plate||short fragment fixation with several distal screws',
'Hook plate||spans the AC joint; plan removal because of subacromial erosion and stiffness',
'CC ligament reconstruction||suture button or tendon graft, with or without plate',
'Tension band or wires||historic; migration risk',
'Evidence||see network meta-analysis of fixation methods for unstable distal fractures (Xu 2022)'],
14.5, TXT, GOLD, DEEP, 8, tag='lat')
pic(s, A + 'cl_distalplate.jpg', 7.6, 1.6, 5.05, 4.8, GOLD, 'Distal plate with coracoid anchor, healed at 1 year')
# ---------- 18 Complications ----------
s = content('Complications')
rows = [['Complication', 'Notes'],
['Nonunion', 'Higher with displacement, comminution, nonoperative care in displaced fractures'],
['Malunion', 'Shortening above 2 cm; weakness, scapular dyskinesis, thoracic outlet symptoms'],
['Hardware prominence', 'Common reason for removal'],
['Infection', 'Superficial or deep; lower with careful soft tissue handling'],
['Nerve numbness', 'Supraclavicular branches, anterior chest wall'],
['Fixation failure', 'Plate breakage, loss of reduction (see image)'],
['Refracture', 'After plate removal; protect for months']]
table(s, 0.7, 1.6, 8.3, rows, [2.2, 6.1], [0.42] + [0.7] * 7, DEEP, 'FFFFFF', ['FFFFFF', LIGHT], TXT, 12.5, 13)
pic(s, A + 'cl_failure.jpg', 9.3, 1.6, 3.35, 5.3, GOLD, 'Plate fracture and revision')
# ---------- 19 Nonunion malunion ----------
s = content('Nonunion and malunion')
pic(s, A + 'cl_nonunion.jpg', 0.7, 1.6, 5.4, 3.4, GOLD, 'Hypertrophic nonunion: CT and plate revision')
pic(s, A + 'cl_malunion.jpg', 0.7, 5.15, 3.0, 1.9, GOLD, 'Malunion with overlap')
bullets(s, 6.4, 1.6, 6.25, 5.3, [
'Nonunion work-up||symptoms, CT, CRP and ESR, smoking status, exclude infection',
'Hypertrophic||stable compression plating with lag screw; resect and decorticate',
'Atrophic||plating plus autograft (iliac crest)',
'Plate placement||superior or anteroinferior; at least six cortices each side',
'Malunion||offer corrective osteotomy only if symptomatic, with shortening, dyskinesis or thoracic outlet signs',
'Prevention||anatomic length and rotation at index surgery; stop smoking'],
14.5, TXT, GOLD, DEEP, 7, tag='nu')
# ---------- 20 Special situations ----------
s = content('Special situations')
card(s, 0.7, 1.65, 3.85, 5.2, 'Children', [
'Remodel well; nonoperative in most',
'Surgery: open, tenting, neurovascular injury, adolescent with floating shoulder',
'Medial physis: Salter-Harris I or II'], 13.5)
card(s, 4.75, 1.65, 3.85, 5.2, 'Floating shoulder', [
'Ipsilateral clavicle plus glenoid neck or scapula fracture',
'Fixing a displaced clavicle may help scapular alignment',
'Assess glenoid displacement on CT'], 13.5)
card(s, 8.8, 1.65, 3.83, 5.2, 'Polytrauma and others', [
'Early weight bearing through the arm favours fixation',
'Open fractures: debride and fix',
'Elderly: osteoporotic, lower demand, accept nonoperative more often'], 13.5)
# ---------- 21 Algorithm ----------
s = content('Decision pathway')
nodes = [('1', 'Red flags?', 'Open, skin threat, vascular or neuro deficit: surgery urgently'),
('2', 'Which third?', 'Medial: CT. Lateral: Neer type. Midshaft: Robinson'),
('3', 'How displaced?', 'Complete displacement, shortening above 2 cm, comminution: consider fixation'),
('4', 'Patient factors', 'Age, demand, dominance, smoking, job: shared decision')]
for i, (n, a, b) in enumerate(nodes):
cx = 1.9 + i * 3.1
circle(s, cx, 2.5, 1.6, None, GOLD, 1.5)
circle(s, cx, 2.5, 1.35, GOLD)
tb(s, cx - 0.6, 2.15, 1.2, 0.7, n, 32, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, cx - 1.4, 3.5, 2.8, 0.4, a, 16, DEEP, True, align='c', font='Georgia')
tb(s, cx - 1.4, 3.95, 2.8, 1.3, b, 13, TXT, align='c', tag='alg')
if i < 3:
shape(s, MSO_SHAPE.RIGHT_ARROW, cx + 1.0, 2.35, 0.6, 0.3, DEEP)
rrect(s, 0.7, 5.5, 5.8, 1.3, LIGHT, GOLD, 1.25, 0.06)
tb(s, 0.85, 5.55, 5.5, 1.2, 'Sling, early motion, radiographs at about 6 weeks. Surgery if symptomatic nonunion or malunion.', 14, TXT, anchor='m', tag='algA')
rrect(s, 6.83, 5.5, 5.8, 1.3, LIGHT, GOLD, 1.25, 0.06)
tb(s, 6.98, 5.55, 5.5, 1.2, 'Plate or nail with a defined rehab plan; counsel on hardware prominence and numbness.', 14, TXT, anchor='m', tag='algB')
# ---------- 22 Viva pearls ----------
s = content('Viva pearls')
pearls = ['80-85% of clavicle fractures are midshaft', 'Medial fragment goes up (SCM); lateral goes down and in (arm weight)',
'Neer II = fracture medial to CC ligaments, unstable', 'Shortening above 2 cm and complete displacement raise nonunion risk',
'Plate and nail both lower nonunion than sling in displaced fractures', 'Always check chest, scapula and neurovascular status']
for i, p in enumerate(pearls):
cx = 1.3 + (i % 2) * 6.2
cy = 2.2 + (i // 2) * 1.6
circle(s, cx, cy, 0.9, GOLD)
tb(s, cx - 0.4, cy - 0.3, 0.8, 0.6, str(i + 1), 24, 'FFFFFF', True, align='c', anchor='m', font='Georgia', check=False)
tb(s, cx + 0.65, cy - 0.5, 4.8, 1.0, p, 15, TXT, True, anchor='m', tag='pearl')
# ---------- 23-24 References ----------
refs1 = [
'Allman, F.L. (1967) \'Fractures and ligamentous injuries of the clavicle and its articulation\', Journal of Bone and Joint Surgery (American Volume), 49(4), pp. 774-784.',
'Campbell\'s Operative Orthopaedics (2026) 15th edn. Philadelphia: Elsevier.',
'Canadian Orthopaedic Trauma Society (2007) \'Nonoperative treatment compared with plate fixation of displaced midshaft clavicular fractures: a multicenter, randomized clinical trial\', Journal of Bone and Joint Surgery (American Volume), 89(1), pp. 1-10.',
'Kihlstrom, C., Moller, M., Lonn, K. and Wolf, O. (2017) \'Clavicle fractures: epidemiology, classification and treatment of 2422 fractures in the Swedish Fracture Register; an observational study\', BMC Musculoskeletal Disorders, 18(1), p. 82.',
'Neer, C.S. (1968) \'Fractures of the distal third of the clavicle\', Clinical Orthopaedics and Related Research, 58, pp. 43-50.',
'Robinson, C.M. (1998) \'Fractures of the clavicle in the adult: epidemiology and classification\', Journal of Bone and Joint Surgery (British Volume), 80(3), pp. 476-484.']
refs2 = [
'Shi, F., Hu, H., Tian, M., Fang, X. and Li, X. (2022) \'Comparison of 3 treatment methods for midshaft clavicle fractures: a systematic review and network meta-analysis of randomized clinical trials\', Injury. doi:10.1016/j.injury.2022.04.005 (PMID 35459544).',
'Woltz, S. and McKee, M.D. (2025) \'Clavicle fractures\', in Rockwood and Green\'s Fractures in Adults. 10th edn. Philadelphia: Wolters Kluwer.',
'Wright, M. and Della Rocca, G.J. (2023) \'American Academy of Orthopaedic Surgeons clinical practice guideline summary on the treatment of clavicle fractures\', Journal of the American Academy of Orthopaedic Surgeons. doi:10.5435/JAAOS-D-23-00472 (PMID 37432981).',
'Xu, Y., Guo, X., Peng, H. et al. (2022) \'Different internal fixation methods for unstable distal clavicle fractures in adults: a systematic review and network meta-analysis\', Journal of Orthopaedic Surgery and Research. doi:10.1186/s13018-021-02904-6 (PMID 35073954).',
'Radiographs and clinical figures: pmc_clinical_VQA, open-access PubMed Central figures and captions. Hugging Face. Available at: https://huggingface.co (Accessed: 8 November 2026). Epidemiology chart reproduced via Rockwood and Green\'s (Woltz and McKee, 2025) from Kihlstrom et al. (2017), CC BY 4.0.']
for ttl, refs in [('References (1 of 2)', refs1), ('References (2 of 2)', refs2)]:
s = content(ttl)
bullets(s, 0.7, 1.6, 11.9, 5.4, refs, 12.5, TXT, GOLD, DEEP, 8, tag=ttl)
check_bounds(prs, 'clav')
prs.save('/tmp/workspace/ortho-decks/Clavicle_Fractures_Gold.pptx')
print('\n'.join(WARN) or 'no warnings', len(prs.slides))
cd /tmp/workspace/ortho-decks && python deck1.py
Complete the above task
ls -la /tmp/workspace/ortho-decks/ /tmp/workspace/ortho-decks/assets | head -50
cd /tmp/workspace/ortho-decks && python deck1.py
cd /tmp/workspace/ortho-decks && python - <<'EOF' s=open('lib.py').read() s=s.replace("Inches(w), Inches(rowh * nr))","Inches(w), Inches(sum(rowh) if isinstance(rowh, list) else rowh * nr))") open('lib.py','w').write(s) EOF python deck1.py
~/ortho-decks/deck1.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/ortho-decks/deck1.py'
~/ortho-decks/deck2.py
import sys
sys.path.insert(0, '/tmp/workspace/ortho-decks')
from lib import *
A = '/tmp/workspace/ortho-decks/assets/'
RED, DEEP, ROSE, BG, GOLD, TXT, GREY = '8B0A1F', '5C0615', 'F6E3E5', 'FBF6F4', 'C9A24B', '2B1A1C', '7A6A6C'
SHORT = 'Genu Varum and Genu Valgum | Orthopaedic Resident Teaching'
HF = 'Cambria'
prs = new_prs()
pg = [1]
def content(title, size=28):
s = blank(prs, BG)
pg[0] += 1
rect(s, 0, 0, 13.333, 1.15, RED)
rect(s, 0, 1.15, 13.333, 0.06, GOLD)
tb(s, 0.7, 0.15, 11.0, 0.85, title, size, 'FFFFFF', True, anchor='m', font=HF, tag='title:' + title)
tb(s, 12.0, 0.3, 0.8, 0.55, str(pg[0]), 20, 'F0C9CE', True, align='r', anchor='m', font=HF, check=False)
rect(s, 0, 7.12, 13.333, 0.38, DEEP)
tb(s, 0.7, 7.15, 9, 0.3, SHORT, 10, 'E9C9CD', check=False)
return s
def card(s, x, y, w, h, head, items, size=14):
rect(s, x, y, w, h, 'FFFFFF', 'E3C5C9', 1.0)
rect(s, x, y, w, 0.09, RED)
tb(s, x + 0.15, y + 0.15, w - 0.3, 0.45, head, 16, RED, True, font=HF, anchor='m', tag='cardhead')
bullets(s, x + 0.15, y + 0.7, w - 0.3, h - 0.8, items, size, TXT, RED, RED, 5, bu='\u25A0', tag='card:' + head)
def stat(s, x, y, w, h, big, label, fs=26, ls=12):
rect(s, x, y, w, h, RED)
rect(s, x, y + h - 0.07, w, 0.07, GOLD)
tb(s, x + 0.1, y + 0.1, w - 0.2, h * 0.5, big, fs, 'FFFFFF', True, align='c', anchor='m', font=HF, check=False)
tb(s, x + 0.12, y + h * 0.52, w - 0.24, h * 0.42, label, ls, 'F8E6E8', align='c', anchor='m', tag='stat:' + big)
def vtable(s, x, y, w, rows, colw, rowh, size=12.5):
return table(s, x, y, w, rows, colw, rowh, RED, 'FFFFFF', ['FFFFFF', ROSE], TXT, size, 13.5, font='Calibri')
# 1 Title
s = blank(prs, DEEP)
rect(s, 0, 0, 13.333, 0.25, GOLD)
rect(s, 0, 7.25, 13.333, 0.25, GOLD)
tb(s, 0.8, 1.0, 6.0, 0.4, 'ORTHOPAEDIC RESIDENT TEACHING SERIES', 14, GOLD, True)
tb(s, 0.8, 1.6, 6.3, 2.4, ['Genu Varum', 'and Genu Valgum'], 46, 'FFFFFF', True, font=HF, tag='t1')
rect(s, 0.85, 4.2, 1.8, 0.05, GOLD)
tb(s, 0.8, 4.4, 5.9, 1.4, 'Physiology, assessment, Blount disease, metabolic causes and guided growth versus osteotomy', 19,
'F0D6D9', tag='sub')
tb(s, 0.8, 6.4, 6, 0.5, 'Sources: Miller\'s Review 9th ed, Campbell 15th ed, Bailey and Love 28th ed, PubMed 2019-2026', 12,
'D9AEB4', check=False)
pic(s, A + 'gv_valgum_mad.jpg', 7.3, 0.7, 5.4, 3.2, GOLD)
pic(s, A + 'gv_gg_seq.jpg', 7.3, 4.2, 5.4, 2.7, GOLD)
notes(s, 'Top: bilateral genu valgum with lateral mechanical axis deviation. Bottom: guided growth correction sequence.')
# 2 Objectives
s = content('Learning objectives')
objs = ['Define varus and valgus and use the key alignment angles', 'Separate physiologic from pathologic deformity',
'Work up the child: history, exam, long-leg films, labs', 'Diagnose and stage Blount disease',
'Recognise metabolic and post-traumatic causes', 'Choose guided growth, osteotomy or gradual correction']
for i, o in enumerate(objs):
x = 0.7 + (i % 3) * 4.05
y = 1.65 + (i // 3) * 2.65
rect(s, x, y, 3.85, 2.4, 'FFFFFF', 'E3C5C9', 1)
rect(s, x, y, 3.85, 0.09, RED)
tb(s, x + 0.2, y + 0.3, 1.0, 0.8, str(i + 1), 40, RED, True, font=HF, check=False)
tb(s, x + 0.2, y + 1.15, 3.45, 1.1, o, 15, TXT, True, tag='obj')
# 3 Definitions
s = content('Terms and normal alignment values')
rows = [['Term / angle', 'Normal', 'What it tells you'],
['Varus', 'Distal segment toward midline', 'Knee apex lateral: bowlegs'],
['Valgus', 'Distal segment away from midline', 'Knee apex medial: knock knees'],
['Mechanical axis deviation (MAD)', 'Passes just medial to knee centre (about 8 mm +/- 7 mm)', 'Whole-limb alignment'],
['mLDFA (mechanical lateral distal femoral angle)', '85 to 90 degrees (mean about 87.5)', 'Below 85: femoral valgus; above 90: femoral varus'],
['MPTA (medial proximal tibial angle)', '85 to 90 degrees (mean about 87)', 'Below 85: tibial varus; above 90: tibial valgus'],
['JLCA (joint line convergence angle)', 'About 2 degrees or less', 'Ligamentous or cartilage contribution'],
['Adult anatomic tibiofemoral angle', 'About 5 to 7 degrees valgus', 'Clinical and plain film check']]
vtable(s, 0.7, 1.55, 11.93, rows, [3.6, 4.2, 4.1], [0.42] + [0.66] * 7, 12.5)
tb(s, 0.7, 6.65, 11.9, 0.4, 'Values after Paley (2002); verify against your institutional norms.', 11, GREY, italic=True, check=False)
# 4 Normal development
s = content('Normal development of limb alignment')
pic(s, A + 'gv_graph.png', 0.7, 1.55, 6.6, 4.3, RED, 'Tibiofemoral angle versus age (Bailey and Love, Fig 44.3)')
bullets(s, 7.6, 1.55, 5.05, 5.4, [
'Birth||all children start with bowlegs, often with internal tibial torsion',
'About 18 months||bowing begins to improve; corrected by age 3 to 4 years',
'Age 3 to 4||peak valgus; up to 15 degrees is common from 2 to 6 years',
'By age 7||settles near the adult value of about 7 degrees valgus',
'Implication||most deformity under age 6 is physiologic and needs observation only'],
14.5, TXT, RED, RED, 8, bu='\u25A0', tag='dev')
# 5 Physio image
s = content('Physiologic genu varum: the expected course')
pic(s, A + 'gv_physio.png', 0.7, 1.5, 11.93, 4.35, RED, 'Newborn to 4 to 6 years (Miller\'s Review, Fig 3.15)')
bullets(s, 0.7, 5.95, 11.93, 1.1, [
'Symmetric, mild, proportionate to age; femur and tibia bow smoothly; no pain; normal height and bloods',
'Review at 6 to 12 month intervals; refer if progressive, asymmetric, painful, or varus persists beyond 2 to 3 years'],
14, TXT, RED, RED, 4, bu='\u25A0', tag='physio')
# 6 Physiologic vs pathologic
s = content('Physiologic versus pathologic')
rows = [['Feature', 'Physiologic', 'Pathologic'],
['Age', 'Varus under 2 years; valgus 2 to 6 years', 'Varus beyond 2 to 3 years; valgus beyond 7 to 8 years'],
['Symmetry', 'Symmetric, bilateral', 'Often asymmetric or unilateral'],
['Severity and course', 'Mild; improves with growth', 'Marked; static or worsening'],
['Stature and bloods', 'Normal height; normal Ca, PO4, ALP', 'Short or disproportionate; abnormal metabolic profile'],
['Radiograph (varus)', 'Smooth bowing of femur and tibia; MDA below 11 degrees', 'Focal proximal tibial angulation, beaking; MDA above 16 degrees'],
['Valgus clue', 'Within 15 degrees; intermalleolar gap settles', 'Over 15 degrees or gap above 10 cm in a child over 10 years']]
vtable(s, 0.7, 1.55, 11.93, rows, [2.4, 4.7, 4.8], [0.42] + [0.8] * 6, 13)
tb(s, 0.7, 6.65, 11.9, 0.4, 'MDA = metaphyseal-diaphyseal angle (Levine and Drennan, 1982). Thresholds: Miller\'s Review.', 11, GREY, italic=True, check=False)
# 7 Clinical assessment
s = content('Clinical assessment')
card(s, 0.7, 1.55, 3.85, 5.4, 'History', [
'Age at onset, progression',
'Unilateral or bilateral',
'Age walking began; obesity',
'Diet, sun exposure, family history of rickets or short stature',
'Trauma or infection near the knee',
'Pain, function, sport'], 13.5)
card(s, 4.75, 1.55, 3.85, 5.4, 'Examination', [
'Stand barefoot, patellae forward',
'Intercondylar or intermalleolar distance',
'Lateral thrust in gait (varus)',
'Rotational profile: tibial torsion',
'Limb length, BMI, ligament laxity',
'Rachitic signs: wrist widening, rosary'], 13.5)
card(s, 8.8, 1.55, 3.83, 5.4, 'Screen for pathology', [
'Height and arm span for dysplasia',
'Bilateral valgus: think renal or metabolic',
'Unilateral: physeal injury, infection, tumour',
'Early walker, heavy, tibial angulation: Blount',
'Always inspect spine and hips'], 13.5)
# 8 Imaging
s = content('Imaging and investigations')
bullets(s, 0.7, 1.55, 6.8, 5.4, [
'Standing long-leg AP||patellae forward, both limbs on one film; measure MAD, mLDFA, MPTA, JLCA',
'Tibia vara||metaphyseal-diaphyseal angle and Langenskiold stage',
'Lateral knee||procurvatum, physeal contour',
'Bone age||plan growth modulation timing',
'CT or MRI||suspected physeal bar or plateau depression (late Blount)',
'Labs||calcium, phosphate, ALP, PTH, 25-OH vitamin D, creatinine; FGF23 or genetics if hypophosphataemia'],
14.5, TXT, RED, RED, 8, bu='\u25A0', tag='imaging')
pic(s, A + 'gv_valgum_mad.jpg', 7.8, 1.55, 4.85, 3.4, RED, 'Bilateral valgus with lateral MAD')
rect(s, 7.8, 5.2, 4.85, 1.6, ROSE, RED, 1)
tb(s, 7.95, 5.25, 4.55, 1.5, 'Always hold the limb in neutral rotation. A rotated film gives a false varus or valgus reading.', 13.5, TXT, True, anchor='m', tag='imgnote')
# 9 Varus differential
s = content('Genu varum: causes')
causes = [('Physiologic', 'Under 2 to 3 years, symmetric, resolves'),
('Blount disease', 'Infantile or adolescent tibia vara; proximal tibial physis'),
('Metabolic', 'Nutritional rickets, hypophosphataemic rickets, renal osteodystrophy'),
('Skeletal dysplasia', 'Achondroplasia, metaphyseal chondrodysplasia, osteogenesis imperfecta'),
('Post-traumatic or infective', 'Physeal arrest or malunion; the commonest pathological cause with rickets and dysplasia (Bailey and Love)'),
('Focal lesions', 'Focal fibrocartilaginous dysplasia, osteochondroma, Ollier disease')]
for i, (a, b) in enumerate(causes):
x = 0.7 + (i % 3) * 4.05
y = 1.6 + (i // 3) * 2.7
rect(s, x, y, 3.85, 2.5, 'FFFFFF', 'E3C5C9', 1)
rect(s, x, y, 3.85, 0.09, RED)
tb(s, x + 0.2, y + 0.25, 3.45, 0.5, a, 17, RED, True, font=HF, tag='cause')
tb(s, x + 0.2, y + 0.85, 3.45, 1.5, b, 14, TXT, tag='cause2')
# 10 Blount types
s = content('Blount disease: pathogenesis and types')
bullets(s, 0.7, 1.55, 5.6, 5.4, [
'Definition||acquired disorder of the proximal tibial physis (Campbell)',
'Deformity||varus, internal tibial torsion and procurvatum',
'Cause||unknown; altered enchondral ossification under excess mechanical stress',
'Weight bearing needed||does not occur in nonambulant children',
'Risks||early walking, obesity, vitamin D deficiency; more common in Black children'],
14, TXT, RED, RED, 8, bu='\u25A0', tag='blount')
rows = [['Feature', 'Infantile', 'Adolescent'],
['Onset', 'Under 3 years', 'Over 10 years'],
['Laterality', 'Often bilateral', 'Often unilateral'],
['Severity', 'Can be severe; medial plateau depression', 'Milder'],
['Radiograph', 'Metaphyseal beaking, MDA above 16', 'Widened medial physis; no beaking'],
['Typical child', 'Heavy early walker', 'Obese adolescent']]
vtable(s, 6.6, 1.55, 6.03, rows, [1.3, 2.4, 2.3], [0.42] + [0.85] * 5, 12.5)
tb(s, 6.6, 6.35, 6.0, 0.5, 'A juvenile form (ages 4 to 10) is also described.', 11.5, GREY, italic=True, check=False)
# 11 Blount radiology
s = content('Blount disease: radiographic assessment')
pic(s, A + 'gv_mda.png', 0.7, 1.5, 3.4, 5.5, RED, 'TFA 32 vs MDA 20 degrees (Miller\'s, Fig 3.16)')
pic(s, A + 'gv_itv.jpg', 4.3, 1.5, 3.4, 5.5, RED, 'Bilateral infantile tibia vara, MDA 22 and 16')
bullets(s, 7.95, 1.55, 4.7, 5.4, [
'MDA||angle between a line across the two metaphyseal beaks and the line perpendicular to the tibial shaft; above 16 degrees is abnormal',
'Langenskiold I to VI||I irregular medial metaphysis, through to VI bony bridge across the medial physis',
'Beyond MDA||medial plateau depression, physeal bar, joint line obliquity',
'Do not rely on the tibiofemoral angle alone||it is affected by rotation and femoral bowing'],
13.5, TXT, RED, RED, 8, bu='\u25A0', tag='blountrad')
# 12 Late disease images
s = content('Blount disease: late presentations and surgery')
bullets(s, 0.7, 1.55, 4.3, 5.4, [
'Failed early surgery||medial physeal bar with recurrence and limb length discrepancy',
'Late onset||multilevel deformity: distal femur varus, proximal tibia varus, compensatory distal tibial valgus',
'Plateau depression||may need intra-epiphyseal osteotomy to elevate the medial plateau',
'Plan with full-length films and mechanical axis'],
13.5, TXT, RED, RED, 8, bu='\u25A0', tag='late')
pic(s, A + 'gv_blount7.jpg', 5.2, 1.5, 2.55, 5.5, RED, 'Age 7: failed osteotomy')
pic(s, A + 'gv_lotv.jpg', 7.95, 1.5, 2.1, 5.5, RED, 'Age 16: late-onset')
pic(s, A + 'gv_postosteo.jpg', 10.25, 1.5, 2.4, 5.5, RED, '1 year after osteotomy')
# 13 Blount management
s = content('Blount disease: management')
rows = [['Stage / patient', 'Option', 'Comment'],
['Langenskiold I-II, under 3 years', 'Bracing', 'Better if unilateral and nonobese; compliance is difficult'],
['Stage II over 3 years, stage III', 'Proximal tibial and fibular valgus osteotomy', 'Overcorrect because medial physeal growth stays abnormal'],
['Early disease or adolescent with growth left', 'Lateral hemiepiphysiodesis (guided growth)', 'Larger plates; implant failure is more frequent'],
['Stage IV-VI', 'Physeal bar resection, epiphysiolysis, plateau elevation', 'Complex; often staged or combined'],
['Limb length discrepancy', 'Ilizarov or hexapod correction and lengthening', 'Acute versus gradual: see Gilbody 2009'],
['Physis closed, severe', 'Osteotomy; later arthroplasty if arthritic', 'Blount-like TKA reviewed 2025']]
vtable(s, 0.7, 1.55, 11.93, rows, [3.3, 4.4, 4.2], [0.42] + [0.78] * 6, 12.5)
tb(s, 0.7, 6.7, 11.9, 0.35, 'Source: Miller\'s Review of Orthopaedics; Campbell\'s Operative Orthopaedics.', 11, GREY, italic=True, check=False)
# 14 Metabolic
s = content('Metabolic causes and rickets')
pic(s, A + 'gv_rickets.jpg', 0.7, 1.55, 5.3, 4.5, RED, 'Genu valgum with metabolic bone disease: 38 and 26 degrees')
card(s, 6.3, 1.55, 6.33, 1.65, 'Nutritional rickets', ['Vitamin D and calcium repletion first; many deformities improve'], 13.5)
card(s, 6.3, 3.35, 6.33, 1.65, 'Hypophosphataemic rickets (XLH)', ['Phosphate and active vitamin D, or burosumab; surgery after metabolic control'], 13.5)
card(s, 6.3, 5.15, 6.33, 1.75, 'Renal osteodystrophy', ['Most common cause of bilateral valgus (Miller\'s Review); treat renal and mineral disease'], 13.5)
tb(s, 0.7, 6.2, 5.3, 0.7, 'Deformity surgery is more reliable once ALP is falling and healing is seen on films.', 12.5, TXT, italic=True, tag='metnote')
# 15 Valgum aetiology
s = content('Genu valgum: causes and natural history')
stat(s, 0.7, 1.55, 2.9, 1.5, '3 to 4 yr', 'peak physiologic valgus', 28)
stat(s, 3.8, 1.55, 2.9, 1.5, 'up to 15\u00B0', 'common between 2 and 6 years', 28)
stat(s, 6.9, 1.55, 2.9, 1.5, '7\u00B0', 'adult valgus reached by about age 7', 28)
stat(s, 10.0, 1.55, 2.63, 1.5, '>10 cm', 'intermalleolar gap: consider surgery if older than 10', 28)
bullets(s, 0.7, 3.35, 11.93, 3.7, [
'Physiologic||no treatment needed',
'Renal osteodystrophy and rickets||commonest causes of bilateral pathologic valgus',
'Post-traumatic||including proximal tibial metaphyseal fracture overgrowth (Cozen)',
'Tumour and dysplasia||osteochondromas, Ollier disease, Morquio, spondyloepiphyseal dysplasia',
'Infection||may stimulate asymmetric proximal tibial growth',
'Obesity||increases load and may worsen deformity'],
14.5, TXT, RED, RED, 7, bu='\u25A0', tag='valgcause')
# 16 Consequences
s = content('Why correct: natural history and joint effects')
card(s, 0.7, 1.55, 5.8, 3.4, 'Valgus', [
'Lateral compartment overload',
'Patellar maltracking and instability',
'Distal femoral osteotomy improves recurrent patellar instability with genu valgum (Moran 2024)'], 14)
card(s, 6.83, 1.55, 5.8, 3.4, 'Varus', [
'Medial compartment overload and early arthritis',
'Lateral thrust and lateral ligament attenuation',
'Unilateral cases bring limb length discrepancy'], 14)
rect(s, 0.7, 5.2, 11.93, 1.65, ROSE, RED, 1)
bullets(s, 0.9, 5.3, 11.5, 1.5, [
'Evidence is limited for the benefit of correcting mild idiopathic deformity; treat based on severity, symptoms and progression.',
'Sport and genu varum in youth: systematic review 2026 (Isin et al.); assess before attributing deformity to training.'],
13.5, TXT, RED, RED, 6, bu='\u25A0', tag='conseq')
# 17 Valgum treatment
s = content('Genu valgum: treatment')
bullets(s, 0.7, 1.55, 6.3, 5.4, [
'Physiologic||observe; shoes, braces and exercises do not change the course',
'Pathologic||treat the cause; conservative care is ineffective (Miller\'s Review)',
'Surgical trigger||child over 10 years with more than 10 cm between the malleoli or more than 15 degrees valgus',
'Growth left||medial hemiepiphysiodesis of distal femur and/or proximal tibia with a tension-band plate',
'Plate versus staple||compared in a 2019 systematic review (Knapik)',
'Timing||isolated medial femoral hemiepiphysiodesis: indications and timing reviewed 2023 (Artioli)',
'Physis closed||femoral or tibial osteotomy at the apex'],
14, TXT, RED, RED, 7, bu='\u25A0', tag='valgtx')
pic(s, A + 'gv_gg_valgum.jpg', 7.3, 1.55, 5.35, 3.4, RED, 'Guided growth for genu valgum over about 8 months')
pic(s, A + 'gv_eightplate.jpg', 7.3, 5.05, 5.35, 1.95, RED, 'Proximal medial tibial eight-plate steps')
# 18 Guided growth principles
s = content('Guided growth: principles')
pic(s, A + 'gv_gg_seq.jpg', 0.7, 1.55, 5.7, 3.1, RED, 'Progressive correction of bilateral genu valgum')
bullets(s, 0.7, 4.85, 5.7, 2.2, [
'Tether one side of the physis; the other side keeps growing',
'Place at the level of deformity: femur if mLDFA is abnormal, tibia if MPTA is abnormal'],
13.5, TXT, RED, RED, 5, bu='\u25A0', tag='ggp1')
card(s, 6.7, 1.55, 5.93, 2.55, 'Planning', [
'Needs enough growth: bone age and remaining years',
'Distal femur gives about 70% of femoral growth; proximal tibia about 55 to 60% of tibial growth',
'Review every 3 to 4 months'], 13)
card(s, 6.7, 4.25, 5.93, 2.7, 'Pitfalls', [
'Remove at neutral alignment; watch for rebound after removal',
'Overcorrection, implant breakage, physeal arrest, infection',
'Obesity and Blount disease: higher failure, use stronger implants'], 13)
# 19 Options table
s = content('Surgical options compared')
rows = [['Option', 'Best for', 'Advantages', 'Drawbacks'],
['Guided growth', 'Skeletally immature, idiopathic or metabolic', 'Minimal incision, reversible', 'Needs growth, follow-up; rebound'],
['Acute osteotomy', 'Near or at maturity; severe or multiplanar', 'Immediate correction', 'Neurovascular and compartment risk; fixation'],
['Gradual correction (frame)', 'Large deformity, LLD, Blount', 'Fine control, lengthening', 'Pin sites, burden, duration'],
['Physeal bar resection / plateau elevation', 'Late Blount stage IV-VI', 'Restores growth or joint line', 'Technically demanding; recurrence'],
['Adults: HTO or DFO', 'Unicompartmental overload, young active', 'Preserves the joint', 'Hardware; slower return']]
vtable(s, 0.7, 1.55, 11.93, rows, [2.8, 3.2, 2.9, 3.0], [0.45] + [0.9] * 5, 12.5)
tb(s, 0.7, 6.65, 11.9, 0.4, 'HTO high tibial osteotomy; DFO distal femoral osteotomy; LLD limb length discrepancy.', 11, GREY, italic=True, check=False)
# 20 Planning principles
s = content('Deformity planning principles')
card(s, 0.7, 1.55, 2.85, 5.4, 'Where?', [
'Use mLDFA and MPTA to find the bone',
'Apex = CORA (Paley)',
'Check JLCA for soft tissue part'], 13)
card(s, 3.7, 1.55, 2.85, 5.4, 'How much?', [
'Aim MAD back through knee centre',
'Overcorrect in Blount',
'Joint line should stay near horizontal'], 13)
card(s, 6.7, 1.55, 2.85, 5.4, 'How?', [
'Osteotomy at the CORA avoids translation',
'If one cut makes the joint line oblique (MPTA above about 95), consider double-level',
'Plan frame or plate fixation'], 13)
card(s, 9.7, 1.55, 2.93, 5.4, 'Stay safe', [
'Peroneal nerve stretch with acute varus correction',
'Compartment syndrome after proximal tibial osteotomy',
'Check rotation, not only coronal plane'], 13)
# 21 Algorithm
s = content('Approach to the bowlegged or knock-kneed child')
steps = ['Age and pattern', 'Physiologic?', 'Cause work-up', 'Severity and growth', 'Treat']
txts = ['Onset, laterality, family history', 'Symmetric, mild, age-appropriate: observe', 'Long-leg film, MDA, labs, bone age',
'Angle, MAD, remaining growth', 'Medical, guided growth, osteotomy or frame']
for i, (a, b) in enumerate(zip(steps, txts)):
x = 0.7 + i * 2.4
sh = shape(s, MSO_SHAPE.PENTAGON if i == 0 else MSO_SHAPE.CHEVRON, x, 1.7, 2.55, 1.2, RED if i % 2 == 0 else DEEP)
tb(s, x + 0.45, 1.85, 1.65, 0.9, a, 14, 'FFFFFF', True, align='c', anchor='m', font=HF, tag='step')
tb(s, x + 0.1, 3.05, 2.2, 1.3, b, 12.5, TXT, align='c', tag='steptxt')
card(s, 0.7, 4.5, 3.85, 2.4, 'Observe', ['Physiologic pattern', 'Review every 6 to 12 months'], 13.5)
card(s, 4.75, 4.5, 3.85, 2.4, 'Treat the cause', ['Rickets, renal, infection, tumour', 'Brace for Blount under 3 years'], 13.5)
card(s, 8.8, 4.5, 3.83, 2.4, 'Correct the deformity', ['Guided growth if growth remains', 'Osteotomy or frame if not'], 13.5)
# 22 Recent evidence
s = content('Recent and key evidence (PubMed)')
rows = [['Paper', 'Focus'],
['Artioli et al., The Knee 2023 (PMID 36410251)', 'Indications and timing of medial femoral hemiepiphysiodesis for idiopathic valgum'],
['Knapik et al., Orthopedics 2019 (PMID 31355901)', 'Staples versus tension-band plating for idiopathic genu valgum'],
['Moran et al., J ISAKOS 2024 (PMID 39260775)', 'Distal femoral osteotomy for patellar instability with genu valgum'],
['Arias Perez et al., Musculoskelet Surg 2025 (PMID 39890771)', 'MPFL reconstruction plus varus osteotomy in valgum and recurrent dislocation'],
['Isin et al., Br Med Bull 2026 (PMID 42830708)', 'Sports participation and genu varum in youth'],
['Gilbody et al., J Pediatr Orthop 2009 (PMID 19352233)', 'Acute versus gradual correction of idiopathic tibia vara'],
['Banwarie et al., J Pediatr Orthop B 2020 (PMID 31651748)', 'Possible aetiologies of Blount disease']]
vtable(s, 0.7, 1.55, 11.93, rows, [5.0, 6.9], [0.42] + [0.68] * 7, 12.5)
tb(s, 0.7, 6.65, 11.9, 0.4, 'Read the full text before changing practice; this slide lists topics found on a PubMed search, not conclusions.', 11, GREY, italic=True, check=False)
# 23 Pearls
s = content('Viva pearls')
pearls = ['Bowlegs at birth, straight by 2 to 3 years, peak knock knees at 3 to 4, adult valgus about 7 degrees',
'MDA above 16 degrees suggests Blount disease; Langenskiold stages I to VI',
'Bilateral valgus beyond the physiologic age: think renal osteodystrophy or rickets',
'Blount: brace under 3 years early; osteotomy overcorrects; plates fail more in the obese',
'Place guided growth at the level of deformity and remove at neutral to avoid rebound',
'Always use a standing long-leg film with patellae forward']
for i, p in enumerate(pearls):
x = 0.7 + (i % 2) * 6.05
y = 1.6 + (i // 2) * 1.8
rect(s, x, y, 5.88, 1.6, 'FFFFFF', 'E3C5C9', 1)
rect(s, x, y, 0.09, 1.6, RED)
tb(s, x + 0.25, y + 0.1, 0.7, 1.4, str(i + 1), 30, RED, True, anchor='m', font=HF, check=False)
tb(s, x + 0.95, y + 0.1, 4.8, 1.4, p, 14, TXT, True, anchor='m', tag='pearl')
# References
refs1 = [
'Arias Perez, R.D., Jaramillo Quiceno, G.A., Sarmiento Riveros, P.A. et al. (2025) \'The efficacy of medial patellofemoral ligament reconstruction combined with distal femoral varus osteotomy in recurrent patellar dislocation and genu valgum\', Musculoskeletal Surgery. doi:10.1007/s12306-024-00878-2.',
'Artioli, E., Mazzotti, A., Ramacci, V. et al. (2023) \'Indications and timing in isolated medial femoral hemiepiphysiodesis for idiopathic genu valgum: a systematic review\', The Knee. doi:10.1016/j.knee.2022.11.009.',
'Bailey and Love\'s Short Practice of Surgery (2023) 28th edn. Boca Raton: CRC Press.',
'Banwarie, R.R., Hollman, F., Meijs, N. et al. (2020) \'Insight into the possible aetiologies of Blount\'s disease: a systematic review of the literature\', Journal of Pediatric Orthopaedics Part B. doi:10.1097/BPB.0000000000000677.',
'Campbell\'s Operative Orthopaedics (2026) 15th edn. Philadelphia: Elsevier.',
'Gilbody, J., Thomas, G., Ho, K. et al. (2009) \'Acute versus gradual correction of idiopathic tibia vara in children: a systematic review\', Journal of Pediatric Orthopaedics. doi:10.1097/BPO.0b013e31819849aa.']
refs2 = [
'Isin, A., Akdag, E., Demirkiran, B. et al. (2026) \'Impact of sports participation on genu varum among youth: a systematic review\', British Medical Bulletin. doi:10.1093/bmb/ldag033.',
'Knapik, D.M., Buschbach, J., Sabharwal, S. et al. (2019) \'Hemiepiphysiodesis for idiopathic genu valgum using physeal staples versus tension-band plating: a systematic review\', Orthopedics. doi:10.3928/01477447-20190723-04.',
'Levine, A.M. and Drennan, J.C. (1982) \'Physiological bowing and tibia vara: the metaphyseal-diaphyseal angle in the measurement of bowleg deformities\', Journal of Bone and Joint Surgery (American Volume), 64(8), pp. 1158-1163.',
'Miller\'s Review of Orthopaedics (2025) 9th edn. Philadelphia: Elsevier.',
'Moran, T.E., Driskill, E.K., Goodloe, J.B. et al. (2024) \'Distal femoral osteotomies improves recurrent patellar instability in patients with genu valgum: a systematic review\', Journal of ISAKOS. doi:10.1016/j.jisako.2024.100318.',
'Paley, D. (2002) Principles of Deformity Correction. Berlin: Springer.',
'Figures: radiographs and clinical images from pmc_clinical_VQA, open-access PubMed Central figures and captions. Hugging Face. Available at: https://huggingface.co (Accessed: 8 November 2026). Physiologic course and MDA figures from Miller\'s Review (Figs 3.15, 3.16); tibiofemoral angle graph from Bailey and Love (Fig 44.3).']
for ttl, refs in [('References (1 of 2)', refs1), ('References (2 of 2)', refs2)]:
s = content(ttl)
bullets(s, 0.7, 1.55, 11.9, 5.4, refs, 12.5, TXT, RED, RED, 8, bu='\u25A0', tag=ttl)
check_bounds(prs, 'genu')
prs.save('/tmp/workspace/ortho-decks/Genu_Varum_Valgum_RoyalRed.pptx')
print('\n'.join(WARN) or 'no warnings', len(prs.slides))
cd /tmp/workspace/ortho-decks && python deck1.py && python deck2.py
cd /tmp/workspace/ortho-decks && python - <<'EOF' from pptx import Presentation from pptx.util import Emu for f in ['Clavicle_Fractures_Gold.pptx','Genu_Varum_Valgum_RoyalRed.pptx']: p=Presentation(f) print(f,len(p.slides)) for i,s in enumerate(p.slides,1): for sh in s.shapes: if sh.shape_type==13: b=(sh.top+sh.height)/914400 # caption follows if next textbox if b>6.85 and i>1: print(' slide',i,'pic bottom',round(b,2),sh.name) txt=[sh for sh in s.shapes if sh.has_text_frame and sh.text_frame.text.strip()] for sh in txt: bt=(sh.top+sh.height)/914400 if bt>7.45: print(' slide',i,'text bottom',round(bt,2),sh.text_frame.text[:30]) EOF
Clavicle Fractures Gold
Presentation · PPTX
Genu Varum Valgum RoyalRed
Presentation · PPTX