4. In children: Malformations of the diaphragm and esophagus in children (esophageal atresia, chalasia, achalasia). Pyloric stenosis. Congenital intestinal obstruction. Hirschsprung's disease. Megacolon. Dolichosigma. Anorectal malformations in children Create a presentation on above topic with Information basic to advance in detail in both English and Russian in single presentation. Add name Aditi Sanjay Malvankar. Group 653. Subject Pediatric Surgery. Make it informative + creative with pictures and graphs and tabular information
pediatric congenital gastrointestinal malformations
pediatric surgery esophageal atresia pyloric stenosis Hirschsprung disease anorectal malformations guidelines
~/
congenital diaphragmatic hernia infant chest radiograph bowel loops thorax
esophageal atresia tracheoesophageal fistula anatomical diagram
pyloric stenosis ultrasound target sign diagram
Hirschsprung disease contrast enema transition zone radiograph

This composite of abdominal radiographs and contrast enema images illustrates the radiographic signs of Hirschsprung disease in pediatric patients. Top row (A, B, C): Plain abdominal radiographs (supine) demonstrate gas-filled, dilated loops of proximal bowel with a sudden tapering or 'cutoff' of the colonic gas shadow (indicated by arrows). This finding represents the plain abdominal radiograph transition zone (PARTZ). Bottom row (D, E, F): Contrast enema images (lateral and AP views) show the corresponding contrast enema transition zone (CETZ). These images clearly depict the classic 'funnel-shaped' transition from a narrowed, aganglionic distal segment (rectum or distal sigmoid) to a dilated, normally innervated proximal colon. Panels A and D show the transition zone at the rectosigmoid level; B and E at the midsigmoid; and C and F at the descending colon. This comparison highlights the utility of both gas distribution patterns on plain films and mucosal/luminal detail on contrast studies for identifying the level of intestinal aganglionosis.

A series of four abdominal radiographs (A-D) demonstrating diagnostic imaging for anorectal malformation (ARM) and comorbid Hirschsprung's disease in a pediatric patient. Panel A is an inverted lateral radiograph (Wangensteen-Rice view) showing an intermediate-level anal atresia, with a blind rectal pouch located above the pubococcygeal (PC) and ischial (I) lines. Panel B is a lateral contrast enema showing a narrow distal colon and a rectourethral fistula (indicated by the blue arrow). Panel C is an anteroposterior (AP) standing radiograph showing signs of distal intestinal obstruction, including multiple dilated bowel loops and air-fluid levels. Panel D is a barium enema in AP view demonstrating a 'transition zone' at the splenic flexure; the rectum, sigmoid, and descending colon are narrow (aperistaltic aganglionic segment), while the proximal transverse colon is significantly dilated (megacolon). This sequence illustrates the typical diagnostic pathway for identifying a long-segment Hirschsprung's disease masking as postoperative complications following anal atresia repair.
anorectal malformation classification diagram pediatric
~/
mkdir -p "/tmp/workspace/pediatric_surgery_bilingual/src" "/tmp/workspace/pediatric_surgery_bilingual/assets" "/tmp/workspace/pediatric_surgery_bilingual/output" && python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_31245ecf4ed3e672de6802d1cadd3d59dee09359941603c6c7dcfe2f9c20cad4.jpg" > "/tmp/workspace/pediatric_surgery_bilingual/assets/image_fetch.json"
~/pediatric_surgery_bilingual/src/create_deck.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR
from pptx.enum.chart import XL_CHART_TYPE, XL_LEGEND_POSITION
from pptx.chart.data import CategoryChartData
from pptx.enum.dml import MSO_THEME_COLOR
from io import BytesIO
import json, base64, os
OUT='/tmp/workspace/pediatric_surgery_bilingual/output/Pediatric_Surgery_Congenital_GI_Malformations_Aditi_Malvankar.pptx'
ASSET='/tmp/workspace/pediatric_surgery_bilingual/assets/image_fetch.json'
prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5)
blank=prs.slide_layouts[6]
# palette
NAVY=RGBColor(13,40,72); BLUE=RGBColor(31,100,158); TEAL=RGBColor(0,150,152); MINT=RGBColor(220,246,243)
ORANGE=RGBColor(240,128,53); RED=RGBColor(205,70,75); GOLD=RGBColor(246,190,59); LIGHT=RGBColor(246,249,252); GRAY=RGBColor(79,91,108); WHITE=RGBColor(255,255,255); PALE=RGBColor(232,240,248)
FONT='Aptos'; RFONT='Aptos'
# helpers
def rect(s,x,y,w,h,fill, radius=False, line=None):
sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h))
sh.fill.solid(); sh.fill.fore_color.rgb=fill
sh.line.color.rgb = line if line else fill
if radius: sh.adjustments[0]=0.12
return sh
def txt(s,x,y,w,h,text,size=18,color=NAVY,bold=False,align=PP_ALIGN.LEFT, font=FONT, valign=MSO_ANCHOR.TOP):
box=s.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=box.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=tf.margin_right=Inches(.07); tf.margin_top=tf.margin_bottom=Inches(.03); tf.vertical_anchor=valign
for i,line in enumerate(text.split('\n')):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=line; p.alignment=align; p.space_after=Pt(2)
for r in p.runs:
r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color
return box
def title(s,en,ru,section=None):
rect(s,0,0,13.333,.18,TEAL); txt(s,.48,.30,8.3,.42,en,26,NAVY,True); txt(s,.50,.79,11.9,.36,ru,15,BLUE,False,font=RFONT)
if section: rect(s,11.65,.35,1.15,.4,PALE,True); txt(s,11.70,.40,1.05,.25,section,10,BLUE,True,PP_ALIGN.CENTER)
def foot(s,num):
txt(s,.50,7.14,9,.2,'Pediatric Surgery | Детская хирургия',9,GRAY)
txt(s,12.25,7.13,.55,.22,str(num),9,GRAY,False,PP_ALIGN.RIGHT)
def bullet(s,x,y,w,items,size=16):
h=.1
for a,b in items:
txt(s,x,y+h,w,.28,'• '+a,size,NAVY,False)
txt(s,x+.23,y+h+.30,w-.23,.29,b,size-2,GRAY,False,font=RFONT)
h+=.75
def card(s,x,y,w,h,heading,body,accent=TEAL):
rect(s,x,y,w,h,WHITE,True,line=RGBColor(214,225,235)); rect(s,x,y,.09,h,accent)
txt(s,x+.22,y+.15,w-.35,.3,heading,15,accent,True); txt(s,x+.22,y+.55,w-.38,h-.64,body,12,GRAY,False,font=RFONT)
def diagram_node(s,x,y,label,sub,c=TEAL):
sh=rect(s,x,y,2.3,.72,c,True); txt(s,x+.07,y+.1,2.16,.24,label,14,WHITE,True,PP_ALIGN.CENTER); txt(s,x+.07,y+.38,2.16,.18,sub,9,WHITE,False,PP_ALIGN.CENTER,font=RFONT)
def arrow(s,x1,y1,x2,y2,c=BLUE):
ln=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT, Inches(x1), Inches(y1), Inches(x2), Inches(y2)); ln.line.color.rgb=c; ln.line.width=Pt(2); ln.line.end_arrowhead=True
# 1 cover
s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,0,0,13.333,.18,TEAL)
# stylized esophagus/colon visual
for x,y,r,c in [(10.8,1.2,.85,TEAL),(11.7,2.4,.57,GOLD),(10.9,3.35,.78,ORANGE),(11.9,4.45,.52,TEAL),(10.6,5.35,.7,BLUE)]:
sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x),Inches(y),Inches(r),Inches(r)); sh.fill.solid();sh.fill.fore_color.rgb=c;sh.line.color.rgb=c
arrow(s,11.2,2.0,11.85,2.4,WHITE); arrow(s,11.85,3.0,11.25,3.35,WHITE); arrow(s,11.25,4.13,12.15,4.45,WHITE)
txt(s,.65,.72,8.8,.6,'CONGENITAL MALFORMATIONS\nOF THE DIAPHRAGM & DIGESTIVE TRACT',27,WHITE,True)
txt(s,.68,2.08,8.7,.42,'ВРОЖДЁННЫЕ ПОРОКИ ДИАФРАГМЫ И ПИЩЕВАРИТЕЛЬНОГО ТРАКТА',19,RGBColor(174,229,228),True,font=RFONT)
rect(s,.68,3.12,6.95,.05,TEAL)
txt(s,.68,3.48,7.7,.95,'Esophageal atresia • Chalasia/GER • Achalasia • Pyloric stenosis\nIntestinal obstruction • Hirschsprung disease • Megacolon • Dolichosigma • Anorectal malformations',15,WHITE)
txt(s,.68,4.7,7.7,.72,'Атрезия пищевода • Халазия/ГЭР • Ахалазия • Пилоростеноз\nКишечная непроходимость • Болезнь Гиршпрунга • Мегаколон • Долихосигма • Аноректальные пороки',14,RGBColor(213,225,240),False,font=RFONT)
txt(s,.68,6.25,5,.26,'Aditi Sanjay Malvankar | Group 653',14,WHITE,True); txt(s,.68,6.63,5,.24,'Subject: Pediatric Surgery',12,RGBColor(174,229,228))
#2 roadmap
s=prs.slides.add_slide(blank); title(s,'Learning map','Карта обучения','01'); foot(s,2)
items=[('Recognize emergency patterns','Распознавать экстренные клинические паттерны'),('Choose first-line investigations','Выбирать исследования первой линии'),('Link anatomy to surgery','Связывать анатомию с хирургической тактикой'),('Plan safe follow-up','Планировать безопасное наблюдение')]
for i,(a,b) in enumerate(items):
x=.7+(i%2)*6.05; y=1.45+(i//2)*2.2; rect(s,x,y,5.55,1.68,WHITE,True,line=RGBColor(215,227,238));
sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x+.28),Inches(y+.35),Inches(.65),Inches(.65)); sh.fill.solid(); sh.fill.fore_color.rgb=[TEAL,ORANGE,BLUE,GOLD][i]; sh.line.color.rgb=sh.fill.fore_color.rgb; txt(s,x+.28,y+.52,.65,.18,str(i+1),15,WHITE,True,PP_ALIGN.CENTER)
txt(s,x+1.18,y+.32,4.05,.31,a,17,NAVY,True); txt(s,x+1.18,y+.83,4.05,.42,b,13,GRAY,False,font=RFONT)
# 3 triage
s=prs.slides.add_slide(blank); title(s,'Neonatal surgical triage: act on the pattern','Неонатальная сортировка: действуйте по паттерну','02'); foot(s,3)
diagram_node(s,.6,1.35,'BILIOUS VOMITING','Желчная рвота',RED); diagram_node(s,3.25,1.35,'SALIVA + CHOKING','Слюна + поперхивание',ORANGE); diagram_node(s,5.9,1.35,'NO MECONIUM','Нет мекония',BLUE); diagram_node(s,8.55,1.35,'RESPIRATORY DISTRESS','Дыхательная недостаточность',TEAL)
for x,lab,sub,c in [(0.6,'Malrotation / atresia','Мальротация / атрезия',RED),(3.25,'EA/TEF','Атрезия пищевода / ТПС',ORANGE),(5.9,'HD / ARM','БГ / АРМ',BLUE),(8.55,'CDH','Диафрагмальная грыжа',TEAL)]: arrow(s,x+1.15,2.08,x+1.15,2.77,c); diagram_node(s,x,2.8,lab,sub,c)
rect(s,.6,4.25,12.1,1.46,MINT,True); txt(s,.9,4.51,11.5,.3,'Safety rule / Правило безопасности',18,TEAL,True); txt(s,.9,4.92,11.2,.55,'Bilious emesis, a scaphoid abdomen with respiratory distress, or progressive distension with failure to pass meconium needs urgent surgical assessment.\nЖелчная рвота, ладьевидный живот с дыхательной недостаточностью или нарастающее вздутие без отхождения мекония требуют срочной оценки хирургом.',14,NAVY,False,font=RFONT)
# 4 CDH
s=prs.slides.add_slide(blank); title(s,'Congenital diaphragmatic hernia (CDH)','Врождённая диафрагмальная грыжа (ВДГ)','03'); foot(s,4)
card(s,.55,1.3,3.8,2.15,'Definition / Определение','Abdominal viscera enter the chest through a diaphragmatic defect, causing pulmonary hypoplasia and pulmonary hypertension.\n\nОрганы брюшной полости попадают в грудную клетку через дефект диафрагмы, вызывая гипоплазию лёгких и лёгочную гипертензию.',TEAL)
card(s,.55,3.75,3.8,2.25,'Bedside clues / Признаки','Severe respiratory distress, scaphoid abdomen, reduced breath sounds on affected side, displaced heart sounds.\n\nТяжёлая дыхательная недостаточность, ладьевидный живот, ослабленное дыхание, смещение тонов сердца.',RED)
# simple anatomy
rect(s,4.85,1.35,3.35,4.5,PALE,True); txt(s,5.15,1.57,2.7,.3,'Anatomy / Анатомия',16,NAVY,True)
sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(5.35),Inches(2.05),Inches(2.35),Inches(1.45)); sh.fill.solid();sh.fill.fore_color.rgb=RGBColor(195,222,244);sh.line.color.rgb=BLUE
txt(s,5.62,2.53,1.8,.23,'Hypoplastic lung\nГипоплазия лёгкого',11,NAVY,True,PP_ALIGN.CENTER,font=RFONT)
# herniated loops
for x,y in [(6.9,3.22),(7.35,3.56),(6.75,3.93)]:
sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x),Inches(y),Inches(.62),Inches(.42));sh.fill.solid();sh.fill.fore_color.rgb=GOLD;sh.line.color.rgb=ORANGE
rect(s,5.25,4.62,2.65,.09,RED); txt(s,5.85,4.78,1.6,.25,'Diaphragm defect\nДефект диафрагмы',10,RED,True,PP_ALIGN.CENTER,font=RFONT)
card(s,8.65,1.3,4.05,2.15,'Initial management / Первые шаги','Intubate and gentle ventilation. Gastric decompression. Avoid bag-mask ventilation. Stabilize first, then repair.\n\nИнтубация и щадящая ИВЛ. Декомпрессия желудка. Не применять масочную вентиляцию. Сначала стабилизация, затем операция.',BLUE)
card(s,8.65,3.75,4.05,2.25,'Advanced points / Углубление','Severity relates to lung development, not only defect size. Consider ECMO in selected refractory cardiopulmonary failure.\n\nТяжесть зависит от развития лёгких, а не только от размера дефекта. При рефрактерной недостаточности возможна ЭКМО.',ORANGE)
#5 EA
s=prs.slides.add_slide(blank); title(s,'Esophageal atresia and tracheoesophageal fistula','Атрезия пищевода и трахеопищеводный свищ','04'); foot(s,5)
card(s,.55,1.3,3.35,2.2,'Typical presentation / Типично','Excessive oral secretions, coughing/cyanosis with feeds, inability to pass a tube.\n\nОбильная слюна, кашель/цианоз при кормлении, невозможно провести зонд.',ORANGE)
card(s,.55,3.85,3.35,1.9,'Work-up / Диагностика','Coiled tube on chest-abdominal radiograph. Gas in abdomen suggests distal fistula. Screen associated anomalies, especially VACTERL.\n\nЗонд свёрнут на рентгенограмме. Газ в животе предполагает дистальный свищ. Ищут ассоциации VACTERL.',BLUE)
# central schematic
rect(s,4.35,1.25,3.95,4.8,LIGHT,True,line=RGBColor(210,225,238)); txt(s,4.65,1.5,3.3,.28,'Simplified anatomy / Упрощённая схема',15,NAVY,True)
rect(s,5.02,2.0,.48,1.4,BLUE,True); txt(s,4.52,2.38,.42,.18,'Blind\npouch',9,BLUE,True,PP_ALIGN.RIGHT,font=RFONT)
rect(s,6.45,1.88,.52,3.3,TEAL,True); txt(s,7.1,2.2,.85,.25,'Trachea\nТрахея',11,TEAL,True,font=RFONT)
rect(s,5.02,4.25,.48,1.0,BLUE,True); arrow(s,5.5,4.65,6.43,4.35,RED); txt(s,4.52,5.38,1.3,.28,'Distal esophagus\nДистальный пищевод',10,BLUE,True,font=RFONT); txt(s,6.8,4.55,1.12,.25,'Fistula\nСвищ',10,RED,True,font=RFONT)
card(s,8.72,1.3,3.95,2.2,'Operative principle / Операция','Ligate fistula and restore esophageal continuity when feasible. Long-gap EA may need staged or traction-based strategies.\n\nПеревязка свища и восстановление непрерывности пищевода. При большом диастазе возможны этапные или тракционные методы.',TEAL)
card(s,8.72,3.85,3.95,1.9,'Long-term / Долгосрочно','Reflux, dysphagia, strictures, recurrent respiratory symptoms and feeding difficulties require follow-up.\n\nТребуют наблюдения: рефлюкс, дисфагия, стриктуры, респираторные и пищевые проблемы.',ORANGE)
#6 functional esophageal
s=prs.slides.add_slide(blank); title(s,'Chalasia/GER and achalasia: opposite sphincter failures','Халазия/ГЭР и ахалазия: противоположные нарушения сфинктера','05'); foot(s,6)
# comparison table
headers=['Feature\nПризнак','Chalasia / GER\nХалазия / ГЭР','Achalasia\nАхалазия']
rows=[['Mechanism\nМеханизм','Incompetent LES, reflux\nНедостаточность НПС, рефлюкс','Failure of LES relaxation + aperistalsis\nНет расслабления НПС + аперистальтика'],['Presentation\nПроявления','Regurgitation, poor feeding, aspiration symptoms\nСрыгивание, плохое кормление, аспирация','Dysphagia, regurgitation, weight loss\nДисфагия, регургитация, потеря веса'],['Tests\nИсследования','Clinical; pH-impedance if selected\nКлинически; pH-импеданс по показаниям','Barium swallow, manometry\nКонтраст, манометрия'],['Management\nЛечение','Feeds/positioning; treat complications\nКормление/позиционирование; лечить осложнения','Pneumatic dilation or myotomy in specialist care\nБаллонная дилатация или миотомия']]
x=.55;y=1.4; widths=[2.3,4.6,4.6]
for j,h in enumerate(headers): rect(s,x+sum(widths[:j]),y,widths[j],.7,[NAVY,TEAL,ORANGE][j],True); txt(s,x+sum(widths[:j])+.1,y+.12,widths[j]-.2,.45,h,13,WHITE,True,PP_ALIGN.CENTER,font=RFONT)
for i,row in enumerate(rows):
yy=y+.72+i*1.22
for j,cell in enumerate(row): rect(s,x+sum(widths[:j]),yy,widths[j],1.15,WHITE,False,line=RGBColor(210,222,235)); txt(s,x+sum(widths[:j])+.12,yy+.16,widths[j]-.24,.82,cell,12,NAVY if j==0 else GRAY,j==0,PP_ALIGN.CENTER,font=RFONT, valign=MSO_ANCHOR.MIDDLE)
rect(s,.8,6.45,11.5,.42,MINT,True); txt(s,1.0,6.55,11.1,.18,'Teaching pearl / Ключевой момент: In pediatrics, reflux is often developmental; alarm signs or poor growth require targeted evaluation. / У детей рефлюкс часто функциональный; тревожные признаки или плохой набор массы требуют обследования.',11,NAVY,False,font=RFONT)
#7 pyloric
s=prs.slides.add_slide(blank); title(s,'Hypertrophic pyloric stenosis (HPS)','Гипертрофический пилоростеноз','06'); foot(s,7)
card(s,.55,1.3,3.4,2.0,'Classic pattern / Классика','At 3-6 weeks: progressive non-bilious projectile vomiting, hunger after vomiting, dehydration.\n\nВ 3-6 недель: нарастающая не желчная рвота фонтаном, голод после рвоты, дегидратация.',ORANGE)
card(s,.55,3.65,3.4,2.15,'Diagnosis / Диагностика','Ultrasound shows elongated, thickened pylorus. Check electrolytes and acid-base status.\n\nУЗИ: удлинённый и утолщённый пилорус. Контроль электролитов и КОС.',BLUE)
# flow
for i,(a,b,c) in enumerate([('Vomiting','Рвота',RED),('Hypochloremic alkalosis','Гипохлоремический алкалоз',ORANGE),('IV fluids + correct K⁺','Инфузии + коррекция K⁺',TEAL),('Pyloromyotomy','Пилоромиотомия',BLUE)]):
diagram_node(s,4.55+i*2.05,2.4,a,b,c)
if i<3: arrow(s,6.85+i*2.05,2.76,6.55+i*2.05,2.76,NAVY)
rect(s,4.55,4.22,7.8,1.35,PALE,True); txt(s,4.84,4.43,7.2,.28,'Sequence matters / Последовательность важна',16,BLUE,True); txt(s,4.84,4.86,7.1,.42,'Resuscitation before operation: correct dehydration and metabolic alkalosis, then pyloromyotomy.\nСначала коррекция дегидратации и метаболического алкалоза, затем пилоромиотомия.',13,GRAY,False,font=RFONT)
# basic graph
chart_data=CategoryChartData(); chart_data.categories=['Typical age / Возраст']; chart_data.add_series('HPS peak / Пик HPS',[5]); chart_data.add_series('Neonatal atresia / Неонатальная атрезия',[0.2])
chart=s.shapes.add_chart(XL_CHART_TYPE.COLUMN_CLUSTERED,Inches(8.4),Inches(5.85),Inches(3.6),Inches(.9),chart_data).chart; chart.has_legend=True; chart.legend.position=XL_LEGEND_POSITION.BOTTOM; chart.value_axis.maximum_scale=6; chart.value_axis.minimum_scale=0; chart.category_axis.has_major_gridlines=False
#8 obstruction
s=prs.slides.add_slide(blank); title(s,'Congenital intestinal obstruction: localize before you operate','Врождённая кишечная непроходимость: локализация перед операцией','07'); foot(s,8)
headers=['Level / Уровень','Clue / Признак','Key imaging / Визуализация','Typical action / Тактика']
rows=[['Duodenum\nДПК','Early bilious emesis\nРанняя желчная рвота','Double-bubble\n«Двойной пузырь»','Decompression + repair\nДекомпрессия + операция'],['Jejunoileal atresia\nАтрезия тощей/подвздошной','Distension, delayed meconium\nВздутие, задержка мекония','Multiple air-fluid levels\nМного уровней жидкости','Resection/anastomosis\nРезекция/анастомоз'],['Malrotation/volvulus\nМальротация/заворот','Bilious emesis, shock risk\nЖелчная рвота, риск шока','Urgent upper GI series\nСрочная верхняя серия','Urgent Ladd procedure\nСрочная операция Ледда'],['Meconium ileus\nМекониевый илеус','CF association\nАссоциация с муковисцидозом','Microcolon on enema\nМикроколон','Contrast enema ± surgery\nКлизма с контрастом ± операция']]
x=.42;y=1.35;ws=[2.1,3.05,3.1,4.1]
for j,h in enumerate(headers): rect(s,x+sum(ws[:j]),y,ws[j],.56,NAVY,True);txt(s,x+sum(ws[:j])+.07,y+.1,ws[j]-.14,.34,h,11,WHITE,True,PP_ALIGN.CENTER,font=RFONT)
for i,r in enumerate(rows):
yy=y+.58+i*1.18
for j,c in enumerate(r): rect(s,x+sum(ws[:j]),yy,ws[j],1.1,WHITE,False,line=RGBColor(211,224,236));txt(s,x+sum(ws[:j])+.1,yy+.12,ws[j]-.2,.82,c,11,NAVY if j==0 else GRAY,j==0,PP_ALIGN.CENTER,font=RFONT,valign=MSO_ANCHOR.MIDDLE)
#9 HD
s=prs.slides.add_slide(blank); title(s,"Hirschsprung's disease: absent ganglion cells","Болезнь Гиршпрунга: отсутствие ганглиозных клеток",'08'); foot(s,9)
card(s,.5,1.28,3.1,2.18,'Pathophysiology / Патофизиология','Failure of neural crest cell migration leaves a distal aganglionic segment in tonic contraction; bowel above it dilates.\n\nНарушение миграции клеток нервного гребня оставляет дистальный аганглионарный сегмент в постоянном спазме; проксимальная кишка расширяется.',BLUE)
card(s,.5,3.85,3.1,1.92,'Presentation / Проявления','Delayed meconium, distension, vomiting, explosive stool after rectal examination.\n\nЗадержка мекония, вздутие, рвота, взрывное отхождение стула после ректального осмотра.',ORANGE)
# add real image
try:
data=json.load(open(ASSET)); raw=base64.b64decode(data[0]['base64'].split(',',1)[1]); s.shapes.add_picture(BytesIO(raw),Inches(3.95),Inches(1.35),width=Inches(4.12),height=Inches(3.22))
txt(s,4.05,4.63,3.95,.55,'Contrast-enema transition zone\nПереходная зона при контрастной клизме',11,GRAY,False,PP_ALIGN.CENTER,font=RFONT)
except Exception: pass
card(s,8.48,1.28,4.28,2.18,'Diagnostic hierarchy / Иерархия','1. Plain film and contrast enema suggest level\n2. Anorectal manometry: absent RAIR\n3. Rectal suction biopsy confirms absent ganglion cells\n\nБиопсия слизистой прямой кишки подтверждает диагноз.',TEAL)
card(s,8.48,3.85,4.28,1.92,'Treatment / Лечение','Rectal irrigations if obstructed, treat enterocolitis urgently, then pull-through of ganglionated bowel (Soave, Swenson, Duhamel variants).\n\nПромывания при обструкции, срочно лечить энтероколит, затем операция низведения иннервированной кишки.',RED)
#10 megacolon/dolichosigma
s=prs.slides.add_slide(blank); title(s,'Megacolon and dolichosigma: describe the anatomy, find the cause','Мегаколон и долихосигма: описать анатомию, найти причину','09'); foot(s,10)
headers=['Term / Термин','Meaning / Значение','Common context / Контекст','Priority / Приоритет']
rows=[['Megacolon\nМегаколон','Dilated colon\nРасширенная ободочная кишка','Congenital aganglionosis, functional or acquired causes\nАганглионоз, функциональные или приобретённые причины','Exclude obstruction, inflammation and toxicity\nИсключить обструкцию, воспаление, токсичность'],['Dolichosigma\nДолихосигма','Elongated sigmoid colon\nУдлинённая сигмовидная кишка','May be incidental or associated with constipation/volvulus\nМожет быть вариантом или связано с запором/заворотом','Assess symptoms and transit; do not treat imaging alone\nОценить симптомы и транзит; не лечить только снимок']]
x=.55;y=1.45;ws=[2.05,2.6,3.75,3.9]
for j,h in enumerate(headers): rect(s,x+sum(ws[:j]),y,ws[j],.65,TEAL,True); txt(s,x+sum(ws[:j])+.08,y+.12,ws[j]-.16,.38,h,12,WHITE,True,PP_ALIGN.CENTER,font=RFONT)
for i,r in enumerate(rows):
yy=y+.67+i*1.72
for j,c in enumerate(r): rect(s,x+sum(ws[:j]),yy,ws[j],1.62,WHITE,False,line=RGBColor(209,222,235));txt(s,x+sum(ws[:j])+.12,yy+.18,ws[j]-.24,1.22,c,12,NAVY if j==0 else GRAY,j==0,PP_ALIGN.CENTER,font=RFONT,valign=MSO_ANCHOR.MIDDLE)
rect(s,.75,5.55,11.8,.85,PALE,True);txt(s,1.0,5.78,11.25,.4,'Clinical distinction / Клиническое различие: “Megacolon” is a radiologic/anatomic description. Hirschsprung disease is a histologic diagnosis. / «Мегаколон» - рентгено-анатомическое описание. Болезнь Гиршпрунга - гистологический диагноз.',13,NAVY,False,font=RFONT)
#11 ARM
s=prs.slides.add_slide(blank); title(s,'Anorectal malformations (ARM)','Аноректальные мальформации (АРМ)','10'); foot(s,11)
card(s,.55,1.35,3.3,2.15,'At birth / При рождении','Absent, stenotic or ectopic anus; look for fistula and assess whether meconium appears in urine or vagina.\n\nОтсутствие, стеноз или эктопия ануса; искать свищ и меконий в моче или влагалище.',RED)
card(s,.55,3.9,3.3,1.85,'Associated anomalies / Ассоциации','Screen systematically for VACTERL: vertebral, cardiac, TE, renal and limb anomalies.\n\nСистемный поиск VACTERL: позвонки, сердце, ТПС, почки и конечности.',ORANGE)
# classification ladder
for i,(h,b,c) in enumerate([('Perineal fistula','Промежностный свищ',TEAL),('Rectourethral / rectovaginal fistula','Ректоуретральный / ректовагинальный свищ',BLUE),('Cloaca','Клоака',RED)]):
rect(s,4.55,1.4+i*1.3,5.1,.95,WHITE,True,line=RGBColor(210,224,236)); rect(s,4.55,1.4+i*1.3,.11,.95,c);txt(s,4.86,1.58+i*1.3,4.55,.24,h,15,NAVY,True);txt(s,4.86,1.92+i*1.3,4.55,.19,b,12,GRAY,False,font=RFONT)
arrow(s,7.1,2.36,7.1,2.62,GRAY);arrow(s,7.1,3.66,7.1,3.92,GRAY)
card(s,10.02,1.35,2.7,2.15,'Imaging / Визуализация','Cross-table lateral radiograph guides level; ultrasound evaluates urinary tract/spine.\n\nБоковая рентгенограмма определяет уровень; УЗИ оценивает мочевые пути и позвоночник.',BLUE)
card(s,10.02,3.9,2.7,1.85,'Repair / Лечение','Low defects: primary repair. Higher/complex defects: diversion then definitive reconstruction, often PSARP.\n\nНизкие формы: первичная коррекция. Высокие/сложные: стома, затем реконструкция, часто PSARP.',TEAL)
#12 comparison matrix
s=prs.slides.add_slide(blank); title(s,'One-slide comparison matrix','Сравнительная матрица','11'); foot(s,12)
headers=['Condition\nСостояние','Age / Возраст','Hallmark / Маркер','Confirm / Подтвердить','Definitive care / Лечение']
rows=[['CDH\nВДГ','Birth\nС рождения','Respiratory distress + scaphoid abdomen\nДН + ладьевидный живот','CXR\nРентген','Stabilize, then repair\nСтабилизировать, затем операция'],['EA/TEF\nАП/ТПС','Birth\nС рождения','Drooling + tube cannot pass\nСлюна + зонд не проходит','Tube X-ray\nРентген с зондом','Fistula ligation/anastomosis\nПеревязка свища/анастомоз'],['HPS\nПС','3-6 weeks\n3-6 нед','Non-bilious projectile emesis\nНе желчная рвота фонтаном','US\nУЗИ','Correct fluids, pyloromyotomy\nКоррекция, пилоромиотомия'],['Hirschsprung\nБГ','Newborn\nНоворождённый','Delayed meconium\nЗадержка мекония','Rectal biopsy\nБиопсия','Pull-through\nОперация низведения'],['ARM\nАРМ','Birth\nС рождения','Absent/ectopic anus\nНет/эктопия ануса','Exam + imaging\nОсмотр + снимки','Repair matched to anatomy\nРеконструкция по анатомии']]
x=.32;y=1.3;ws=[1.8,1.5,3.2,2.15,3.7]
for j,h in enumerate(headers):rect(s,x+sum(ws[:j]),y,ws[j],.55,NAVY,True);txt(s,x+sum(ws[:j])+.04,y+.08,ws[j]-.08,.35,h,10,WHITE,True,PP_ALIGN.CENTER,font=RFONT)
for i,r in enumerate(rows):
yy=y+.57+i*.93
for j,c in enumerate(r):rect(s,x+sum(ws[:j]),yy,ws[j],.86,WHITE,False,line=RGBColor(212,224,235));txt(s,x+sum(ws[:j])+.06,yy+.1,ws[j]-.12,.62,c,10,NAVY if j==0 else GRAY,j==0,PP_ALIGN.CENTER,font=RFONT,valign=MSO_ANCHOR.MIDDLE)
# 13 diagnostic path
s=prs.slides.add_slide(blank); title(s,'Diagnostic pathway: from symptom to action','Диагностический путь: от симптома к действию','12'); foot(s,13)
steps=[('1','Pattern\nПаттерн','Bile? saliva? meconium? breathing?\nЖёлчь? слюна? меконий? дыхание?',NAVY),('2','Stabilize\nСтабилизация','Airway, IV access, decompression, fluids\nДыхательные пути, венозный доступ, декомпрессия, жидкости',TEAL),('3','Image wisely\nВизуализация','X-ray, ultrasound, contrast as indicated\nРентген, УЗИ, контраст по показаниям',BLUE),('4','Confirm\nПодтверждение','Biopsy/manometry where physiology matters\nБиопсия/манометрия при необходимости',ORANGE),('5','Definitive plan\nПлан лечения','Anatomy-specific surgery + follow-up\nОперация по анатомии + наблюдение',RED)]
for i,(n,h,b,c) in enumerate(steps):
x=.45+i*2.52; rect(s,x,1.5,2.25,3.9,WHITE,True,line=RGBColor(210,224,235));sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x+.75),Inches(1.78),Inches(.7),Inches(.7));sh.fill.solid();sh.fill.fore_color.rgb=c;sh.line.color.rgb=c;txt(s,x+.75,1.98,.7,.19,n,16,WHITE,True,PP_ALIGN.CENTER);txt(s,x+.18,2.7,1.9,.55,h,16,NAVY,True,PP_ALIGN.CENTER,font=RFONT);txt(s,x+.2,3.55,1.85,1.1,b,11,GRAY,False,PP_ALIGN.CENTER,font=RFONT)
if i<4:arrow(s,x+2.25,3.42,x+2.49,3.42,TEAL)
rect(s,.65,6.0,12,.62,MINT,True);txt(s,.9,6.18,11.45,.22,'Do not delay treatment of an unstable child for a perfect diagnostic image. / Не откладывайте лечение нестабильного ребёнка ради «идеального» диагностического изображения.',13,NAVY,True,PP_ALIGN.CENTER,font=RFONT)
#14 complications/followup
s=prs.slides.add_slide(blank); title(s,'Beyond the operation: outcomes and surveillance','После операции: исходы и наблюдение','13'); foot(s,14)
items=[('EA/TEF','Reflux, stricture, dysphagia, respiratory symptoms\nРефлюкс, стриктура, дисфагия, респираторные симптомы',ORANGE),('Hirschsprung','Enterocolitis, obstruction, constipation/incontinence\nЭнтероколит, обструкция, запор/недержание',RED),('ARM','Bowel management, continence, urinary/sexual function\nУправление кишечником, континенция, мочевая/сексуальная функция',BLUE),('CDH','Chronic lung disease, nutrition, neurodevelopment\nХроническая болезнь лёгких, питание, нейроразвитие',TEAL)]
for i,(h,b,c) in enumerate(items):
x=.6+(i%2)*6.1;y=1.38+(i//2)*2.25;rect(s,x,y,5.7,1.75,WHITE,True,line=RGBColor(210,224,235));rect(s,x,y,5.7,.13,c);txt(s,x+.28,y+.35,5.1,.26,h,18,c,True);txt(s,x+.28,y+.82,5.1,.6,b,14,GRAY,False,font=RFONT)
rect(s,.85,6.24,11.6,.4,PALE,True);txt(s,1.05,6.33,11.2,.18,'Family-centred, multidisciplinary follow-up is part of definitive care. / Семейно-ориентированное мультидисциплинарное наблюдение - часть окончательного лечения.',12,NAVY,False,PP_ALIGN.CENTER,font=RFONT)
#15 recap
s=prs.slides.add_slide(blank); title(s,'Take-home messages','Главные выводы','14'); foot(s,15)
recs=[('Pattern recognition saves time','Распознавание паттерна экономит время','Bilious vomiting, inability to pass a tube, no meconium, or respiratory distress are high-signal findings.\nЖелчная рвота, невозможность провести зонд, отсутствие мекония или дыхательная недостаточность - важные признаки.'),( 'Anatomy drives the operation','Анатомия определяет операцию','Use appropriate imaging and pathology to map the defect before reconstruction.\nИспользуйте адекватную визуализацию и гистологию для определения порока до реконструкции.'),('Stabilize before definitive repair','Стабилизация до операции','Correct airway, ventilation, decompression, fluid and electrolyte problems first.\nСначала корректируйте дыхательные пути, вентиляцию, декомпрессию, жидкость и электролиты.'),('Follow-up is active treatment','Наблюдение - это лечение','Growth, feeding, bowel, urinary and respiratory function need long-term review.\nРост, питание, кишечная, мочевая и дыхательная функции требуют длительного наблюдения.')]
for i,(a,b,c) in enumerate(recs):
y=1.28+i*1.27;sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(.7),Inches(y+.14),Inches(.62),Inches(.62));sh.fill.solid();sh.fill.fore_color.rgb=[TEAL,BLUE,ORANGE,RED][i];sh.line.color.rgb=sh.fill.fore_color.rgb;txt(s,.7,y+.34,.62,.17,str(i+1),14,WHITE,True,PP_ALIGN.CENTER);txt(s,1.58,y,4.9,.26,a,16,NAVY,True);txt(s,1.58,y+.31,4.9,.2,b,12,BLUE,False,font=RFONT);txt(s,6.65,y+.03,5.8,.6,c,12,GRAY,False,font=RFONT)
#16 refs
s=prs.slides.add_slide(blank); title(s,'Selected references','Выбранные источники','15'); foot(s,16)
refs=['Schwartz’s Principles of Surgery, 11th ed. Sections: Esophageal atresia/TEF; congenital GI anomalies; pyloric stenosis; Hirschsprung disease.','Sabiston Textbook of Surgery. Pediatric alimentary tract conditions: EA/TEF, HPS, intestinal atresia, malrotation, Hirschsprung disease and ARM.','Sleisenger and Fordtran’s Gastrointestinal and Liver Disease. Anorectal malformations; megacolon differential.','Robbins, Cotran & Kumar Pathologic Basis of Disease. Congenital GI malformations, pyloric stenosis and Hirschsprung disease.','Image: contrast-enema transition zone in Hirschsprung disease, PMC-indexed clinical image via Orris medical image library.','Educational deck. Terminology and management pathways should be adapted to local institutional protocols and specialist supervision.']
for i,r in enumerate(refs): txt(s,.75,1.38+i*.72,11.8,.46,str(i+1)+'. '+r,14,NAVY if i<5 else RED,i==5,font=RFONT)
rect(s,.75,6.1,11.8,.64,MINT,True);txt(s,.98,6.3,11.3,.25,'Prepared by Aditi Sanjay Malvankar | Group 653 | Pediatric Surgery',15,TEAL,True,PP_ALIGN.CENTER)
prs.save(OUT)
print(OUT)
python "/tmp/workspace/pediatric_surgery_bilingual/src/create_deck.py" && ls -lh "/tmp/workspace/pediatric_surgery_bilingual/output/Pediatric_Surgery_Congenital_GI_Malformations_Aditi_Malvankar.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/pediatric_surgery_bilingual/output/Pediatric_Surgery_Congenital_GI_Malformations_Aditi_Malvankar.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[sh.text.replace('\n',' / ')[:90] for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()] print(i, len(s.shapes), ' | '.join(texts[:3])) PY
Pediatric Surgery Congenital GI Malformations Aditi Malvankar
Presentation · PPTX
Add more clinical diagrams and labeled anatomy. Make each subtopics into 3-4 slides each . Make a long presentation. And write name group number in both languages like the content
~/
pediatric congenital gastrointestinal surgery
pediatric surgery congenital diaphragmatic hernia esophageal atresia Hirschsprung disease anorectal malformations clinical practice guidelines
pediatric congenital diaphragmatic hernia labeled diagram chest abdominal organs
esophageal atresia tracheoesophageal fistula diagram types
hypertrophic pyloric stenosis ultrasound target sign infant
intestinal malrotation volvulus upper gastrointestinal contrast radiograph pediatric

This abdominal radiograph presents an upper gastrointestinal (UGI) contrast study highlighting diagnostic features of intestinal malrotation. The image shows a distended, contrast-filled stomach situated in the upper right quadrant. A critical diagnostic finding is the abnormal positioning of the duodenum and proximal small bowel; instead of the standard C-loop configuration crossing the midline to the left of the vertebral column, the duodenal-jejunal junction and subsequent small bowel loops are clustered primarily within the mid-abdomen and left side. The typical right lower quadrant positioning of the cecum and ascending colon is not evident. These radiographic findings, specifically the failure of the duodenum to cross the midline at the level of the gastric antrum and the concentration of small bowel loops on the left, are characteristic indicators of intestinal malrotation. Clinically, such malpositioning predisposes patients to midgut volvulus, a surgical emergency represented in this case's medical history. This visual resource is intended for medical education regarding pediatric surgery and radiology of congenital gastrointestinal anomalies.

A multi-panel clinical imaging figure demonstrating diagnostic findings of intestinal malrotation with midgut volvulus across different modalities. Panel A shows a plain abdominal radiograph with a nonspecific finding of scant intestinal gas distribution. Panel B presents an upper gastrointestinal (UGI) contrast series revealing a clear duodenal obstruction in the second part of the duodenum (indicated by a black arrow), often seen as a 'corkscrew' or tapered appearance. Panel C is a color Doppler ultrasound displaying the pathognomonic 'whirlpool' sign, characterized by the clockwise wrapping of the superior mesenteric vein (SMV) and mesentery around the superior mesenteric artery (SMA). Panel D is an axial computed tomography (CT) scan confirming the 'whirlpool' sign (indicated by an asterisk) at the root of the mesentery. Collectively, these images illustrate the radiographic progression and diagnostic hallmarks used to identify pediatric intestinal volvulus, highlighting the critical role of Doppler ultrasound and contrast studies in confirming mesenteric twisting and proximal intestinal obstruction.

This diagnostic image is an upper gastrointestinal contrast study (fluoroscopy) of a pediatric patient. The radiograph shows a dilated, centrally located stomach with evidence of an incomplete gastric volvulus. A radiopaque orogastric tube is visible, notably displaced to the right side of the gastric bubble, indicating abnormal gastric positioning. The contrast agent highlights a malrotated C-loop of the duodenum, where the duodenal-jejunal junction fails to cross the midline to the left of the vertebral column, staying instead on the right side. There is a general lack of a normal distal gas pattern throughout the rest of the abdomen. These findings are clinically significant for diagnosing congenital intestinal malrotation and associated midgut anomalies such as gastric volvulus, frequently seen in the context of heterotaxy or polysplenia syndromes.
anorectal malformation fistula pediatric diagram
python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_31245ecf4ed3e672de6802d1cadd3d59dee09359941603c6c7dcfe2f9c20cad4.jpg" "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_56445c351c60d72e215da03843b1f0bbfdcbab4836d3fb1c3448a3386b302b11.jpg" "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_519017bc019079b53fe69866146d3e7a9a03eadb000f57c1c3d141d30a54a212.jpg" > "/tmp/workspace/pediatric_surgery_bilingual/assets/expanded_images.json"
~/pediatric_surgery_bilingual/src/create_expanded_deck.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
from io import BytesIO
import json,base64,os
OUT='/tmp/workspace/pediatric_surgery_bilingual/output/Expanded_Pediatric_Surgery_Bilingual_Aditi_Malvankar.pptx'
IMG='/tmp/workspace/pediatric_surgery_bilingual/assets/expanded_images.json'
prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5); blank=prs.slide_layouts[6]
NAVY=RGBColor(12,38,69); BLUE=RGBColor(39,105,165); TEAL=RGBColor(0,151,153); MINT=RGBColor(220,246,243); PALE=RGBColor(235,242,250); ORANGE=RGBColor(241,132,54); RED=RGBColor(201,70,75); GOLD=RGBColor(246,190,59); GREEN=RGBColor(40,160,115); GRAY=RGBColor(79,91,108); WHITE=RGBColor(255,255,255); LIGHT=RGBColor(249,251,253)
FONT='Aptos'; RFONT='Aptos'
def sh(s,k,x,y,w,h,fill,line=None):
a=s.shapes.add_shape(k,Inches(x),Inches(y),Inches(w),Inches(h)); a.fill.solid();a.fill.fore_color.rgb=fill;a.line.color.rgb=line or fill;return a
def box(s,x,y,w,h,fill=WHITE,line=PALE,r=True):return sh(s,MSO_SHAPE.ROUNDED_RECTANGLE if r else MSO_SHAPE.RECTANGLE,x,y,w,h,fill,line)
def text(s,x,y,w,h,t,size=16,col=NAVY,bold=False,align=PP_ALIGN.LEFT):
a=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); f=a.text_frame;f.clear();f.word_wrap=True;f.margin_left=f.margin_right=Inches(.06);f.margin_top=f.margin_bottom=Inches(.02);f.vertical_anchor=MSO_ANCHOR.MIDDLE
for i,line in enumerate(t.split('\n')):
p=f.paragraphs[0] if i==0 else f.add_paragraph();p.text=line;p.alignment=align;p.space_after=Pt(1)
for r in p.runs:r.font.name=RFONT if any('А'<=c<='я' for c in line) else FONT;r.font.size=Pt(size);r.font.bold=bold;r.font.color.rgb=col
return a
def line(s,x1,y1,x2,y2,col=BLUE,width=2):
c=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(x1),Inches(y1),Inches(x2),Inches(y2));c.line.color.rgb=col;c.line.width=Pt(width);return c
def arrow(s,x1,y1,x2,y2,col=BLUE):
c=line(s,x1,y1,x2,y2,col,2);c.line.end_arrowhead=True;return c
def base(en,ru,sec):
s=prs.slides.add_slide(blank);sh(s,MSO_SHAPE.RECTANGLE,0,0,13.333,7.5,LIGHT);sh(s,MSO_SHAPE.RECTANGLE,0,0,13.333,.16,TEAL);text(s,.45,.29,9.8,.37,en,25,NAVY,True);text(s,.47,.74,11.7,.30,ru,14,BLUE);box(s,11.72,.31,1.02,.35,PALE,PALE);text(s,11.73,.34,1,.2,sec,9,BLUE,True,PP_ALIGN.CENTER);return s
def foot(s,n):text(s,.43,7.17,10,.16,'Pediatric Surgery | Детская хирургия | Aditi Sanjay Malvankar / Адити Санджай Мальванкар | Group 653 / Группа 653',7,GRAY);text(s,12.4,7.15,.35,.18,str(n),8,GRAY,False,PP_ALIGN.RIGHT)
def bullets(s,x,y,w,items,fs=13):
for i,(e,r) in enumerate(items):
yy=y+i*.72;sh(s,MSO_SHAPE.OVAL,x,yy+.09,.12,.12,TEAL);text(s,x+.2,yy,w-.2,.27,e,fs,NAVY,True);text(s,x+.2,yy+.29,w-.2,.25,r,fs-2,GRAY)
def anatomy_esophagus(s,x,y,scale=1):
# trachea, esophagus, stomach
sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,x+1.75,y,.38,1.45,PALE,BLUE);text(s,x+1.45,y-.25,1,.2,'Trachea\nТрахея',9,BLUE,True,PP_ALIGN.CENTER)
sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,x+.72,y,.42,2.45,MINT,TEAL);text(s,x+.22,y+.92,.45,.5,'Esophagus\nПищевод',9,TEAL,True,PP_ALIGN.CENTER)
sh(s,MSO_SHAPE.OVAL,x+.3,y+2.2,1.28,.72,ORANGE,ORANGE);text(s,x+.18,y+2.41,1.52,.2,'Stomach / Желудок',9,WHITE,True,PP_ALIGN.CENTER)
line(s,x+.93,y+2.08,x+.93,y+2.24,TEAL);text(s,x+1.28,y+1.73,1.45,.2,'LES / НПС',9,BLUE,True)
def anatomy_colon(s,x,y,w=4,h=3):
# simplified colon with labels
pts=[(x+.55,y+.55),(x+.55,y+2.25),(x+3.2,y+2.25),(x+3.2,y+.55),(x+1.05,y+.55)]
for a,b in zip(pts,pts[1:]):line(s,*a,*b,ORANGE,12)
line(s,x+1.05,y+.55,x+1.35,y+1.45,ORANGE,12);line(s,x+1.35,y+1.45,x+1.7,y+1.85,ORANGE,12);line(s,x+1.7,y+1.85,x+1.75,y+2.25,ORANGE,12)
text(s,x-.05,y+.15,1,.3,'Cecum\nСлепая',8,GRAY);text(s,x+3.25,y+.15,.9,.3,'Ascending\nВосходящая',8,GRAY);text(s,x+1.45,y+2.45,1.3,.3,'Sigmoid + rectum\nСигма + прямая',8,GRAY)
def diaphragm(s,x,y):
# thorax and diaphragm
sh(s,MSO_SHAPE.ARC,x+.45,y+.1,3.3,3.3,PALE,BLUE);sh(s,MSO_SHAPE.ARC,x+.7,y+.5,1.15,2.1,MINT,TEAL);sh(s,MSO_SHAPE.ARC,x+2.35,y+.5,1.15,2.1,MINT,TEAL);line(s,x+.55,y+2.6,x+3.55,y+2.6,RED,4);text(s,x+1.25,y+2.68,1.7,.22,'Diaphragm / Диафрагма',9,RED,True,PP_ALIGN.CENTER);sh(s,MSO_SHAPE.OVAL,x+2.5,y+1.25,.65,.45,ORANGE,ORANGE);text(s,x+2.2,y+1.0,1.2,.2,'Herniated bowel\nГрыжевой кишечник',8,ORANGE,True,PP_ALIGN.CENTER);text(s,x+.8,y+.95,.65,.35,'Lung\nЛёгкое',8,TEAL,True,PP_ALIGN.CENTER)
def pylorus(s,x,y):
sh(s,MSO_SHAPE.OVAL,x,y+.35,1.85,1.12,ORANGE,ORANGE);sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,x+1.62,y+.67,.75,.47,GOLD,GOLD);sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,x+2.2,y+.8,1.65,.22,MINT,TEAL);text(s,x+.15,y+1.6,1.5,.2,'Stomach / Желудок',9,ORANGE,True);text(s,x+1.48,y+.05,1.1,.35,'Hypertrophied pylorus\nГипертрофированный привратник',8,RED,True,PP_ALIGN.CENTER);arrow(s,x+1.9,y+.42,x+1.95,y+.72,RED);text(s,x+2.4,y+1.15,1.6,.2,'Duodenum / ДПК',9,TEAL,True)
def table(s,x,y,headers,rows,widths):
xx=x
for h,w in zip(headers,widths):box(s,xx,y,w,.44,NAVY,NAVY);text(s,xx+.03,y+.05,w-.06,.33,h,10,WHITE,True,PP_ALIGN.CENTER);xx+=w
for i,row in enumerate(rows):
xx=x;yy=y+.45+i*.52
for val,w in zip(row,widths):box(s,xx,yy,w,.5,WHITE,PALE,False);text(s,xx+.04,yy+.04,w-.08,.42,val,9,NAVY if i%2==0 else GRAY,False);xx+=w
def note(s,t):box(s,.65,6.42,12.0,.43,MINT,MINT);text(s,.82,6.51,11.65,.22,t,10,NAVY,True,PP_ALIGN.CENTER)
def picture(s,path,x,y,w,h):
if path and os.path.exists(path):s.shapes.add_picture(path,Inches(x),Inches(y),Inches(w),Inches(h))
# images
imgs=[]
try:
for d in json.load(open(IMG)):
if d.get('base64'):
p=f'/tmp/workspace/pediatric_surgery_bilingual/assets/img{len(imgs)}.jpg';open(p,'wb').write(base64.b64decode(d['base64'].split(',')[-1]));imgs.append(p)
except:pass
n=0
def finish(s):
global n;n+=1;foot(s,n)
# 1 title
s=prs.slides.add_slide(blank);sh(s,MSO_SHAPE.RECTANGLE,0,0,13.333,7.5,NAVY);sh(s,MSO_SHAPE.ARC,8.3,.15,5.5,5.5,TEAL,TEAL);text(s,.65,.7,7.4,.85,'CONGENITAL MALFORMATIONS\nOF THE DIAPHRAGM & DIGESTIVE TRACT',31,WHITE,True);text(s,.68,1.85,7.5,.62,'ВРОЖДЁННЫЕ ПОРОКИ ДИАФРАГМЫ И ПИЩЕВАРИТЕЛЬНОГО ТРАКТА',20,MINT,True);text(s,.7,3.05,6.6,.72,'Pediatric Surgery\nДетская хирургия',19,GOLD,True);box(s,.7,4.22,5.7,1.25,WHITE,WHITE);text(s,.95,4.45,5.2,.82,'Prepared by: Aditi Sanjay Malvankar\nПодготовила: Адити Санджай Мальванкар\nGroup 653 / Группа 653',17,NAVY,True,PP_ALIGN.CENTER);text(s,.7,6.5,8,.3,'English + Русский | Basic to advanced clinical teaching deck',11,MINT);finish(s)
# 2 roadmap
s=base('Learning roadmap','Карта обучения','01'); items=[('Diaphragm: CDH','Диафрагма: ВДГ'),('Esophagus: EA/TEF, GER/chalasia, achalasia','Пищевод: АП/ТПС, ГЭР/халазия, ахалазия'),('Pylorus and congenital obstruction','Привратник и врождённая непроходимость'),('Colon and anorectum','Толстая кишка и аноректальная область')]
for i,(a,b) in enumerate(items):box(s,.8+i*3.08,1.7,2.65,2.5,PALE,PALE);text(s,1.05+i*3.08,2.05,2.15,.35,f'{i+1:02}',25,TEAL,True);text(s,1.05+i*3.08,2.65,2.15,.42,a,14,NAVY,True,PP_ALIGN.CENTER);text(s,1.05+i*3.08,3.28,2.15,.38,b,12,BLUE,False,PP_ALIGN.CENTER)
note(s,'Every condition is presented in 3-4 slides: anatomy → recognition → diagnosis → treatment.');finish(s)
# CDH 3 slides
s=base('Congenital diaphragmatic hernia: labelled anatomy','Врождённая диафрагмальная грыжа: анатомия','02');diaphragm(s,.8,1.45);bullets(s,5.1,1.55,7,[('Defect in diaphragm permits abdominal viscera to enter thorax.','Дефект диафрагмы позволяет органам брюшной полости попасть в грудную клетку.'),('Compression causes pulmonary hypoplasia and pulmonary hypertension.','Сдавление вызывает гипоплазию лёгких и лёгочную гипертензию.'),('Most are posterolateral (Bochdalek), usually left-sided.','Чаще заднебоковой дефект Бохдалека, обычно слева.')],15);note(s,'Anatomy label: thorax above diaphragm; abdomen below diaphragm. The key pathophysiology is lung underdevelopment, not simply bowel position.');finish(s)
s=base('CDH: physiology and delivery-room priorities','ВДГ: физиология и приоритеты в родзале','02');
for i,(a,b,c) in enumerate([('1. Bag-mask ventilation avoided','1. Масочная вентиляция не применяется',RED),('2. Intubate + gastric decompression','2. Интубация + декомпрессия желудка',ORANGE),('3. Gentle ventilation / stabilize','3. Щадящая вентиляция / стабилизация',TEAL),('4. Delayed repair after stabilization','4. Операция после стабилизации',GREEN)]):box(s,.7+i*3.08,2.0,2.55,1.55,WHITE,c);text(s,.88+i*3.08,2.28,2.2,.35,a,13,NAVY,True,PP_ALIGN.CENTER);text(s,.88+i*3.08,2.78,2.2,.35,b,11,BLUE,False,PP_ALIGN.CENTER);
text(s,.75,4.55,11.8,.7,'Clinical pearl: repair is not the first resuscitation step.\nКлинический принцип: операция не является первым шагом реанимации.',18,RED,True,PP_ALIGN.CENTER);note(s,'Assess oxygenation, blood pressure and echocardiographic evidence of pulmonary hypertension before repair.');finish(s)
s=base('CDH: diagnosis, management and follow-up','ВДГ: диагностика, лечение и наблюдение','02');table(s,.65,1.4,['Stage / Этап','Core action / Основное действие','Why / Зачем'],[('Prenatal','US: stomach/bowel in chest; assess lung size','Counselling and delivery planning'),('Postnatal','CXR; echo; pre/postductal saturation','Define anatomy and cardiopulmonary severity'),('NICU','Intubation, OG tube, gentle ventilation','Avoid gastric insufflation; protect lungs'),('Definitive','Surgical reduction + diaphragmatic repair','After physiological stabilization'),('Long-term','Pulmonary, GI, growth, hearing, neurodevelopment review','Morbidity can persist after repair')],[2.0,5.65,4.45]);note(s,'Red flag: severe respiratory distress and scaphoid abdomen in a newborn.');finish(s)
# Esophagus 4
s=base('Esophageal atresia and TEF: normal versus abnormal','Атрезия пищевода и ТПС: норма и патология','03');anatomy_esophagus(s,.8,1.45);text(s,5.15,1.45,3,.25,'Normal / Норма',16,GREEN,True);anatomy_esophagus(s,5.1,1.85);line(s,5.82,2.42,5.82,2.72,RED,5);line(s,6.98,2.28,6.15,3.2,RED,4);text(s,8.65,1.45,3.4,.5,'EA + distal TEF\nАП + дистальный ТПС',16,RED,True);bullets(s,8.65,2.2,3.6,[('Blind upper pouch','Слепой верхний сегмент'),('Fistula connects distal esophagus to trachea','Свищ соединяет дистальный пищевод с трахеей'),('Distal TEF is the commonest configuration','Дистальный ТПС - самый частый вариант')],12);note(s,'Textbook pattern: the commonest form is esophageal atresia with a distal tracheoesophageal fistula.');finish(s)
s=base('EA/TEF: recognition and urgent bedside steps','АП/ТПС: распознавание и неотложные действия','03');bullets(s,.8,1.4,5.8,[('Excessive frothy salivation, coughing/cyanosis with feeds.','Обильная пенистая слюна, кашель/цианоз при кормлении.'),('Unable to pass an orogastric tube into stomach.','Невозможно провести орогастральный зонд в желудок.'),('Coiled tube in upper pouch on radiograph supports diagnosis.','Скрученный зонд в верхнем сегменте на рентгенограмме подтверждает диагноз.'),('Gas in abdomen suggests a distal TEF.','Газ в животе предполагает дистальный ТПС.')],14);box(s,7.15,1.4,4.9,3.7,PALE,BLUE);text(s,7.5,1.72,4.2,.35,'Immediate actions / Немедленные действия',16,RED,True,PP_ALIGN.CENTER);text(s,7.65,2.35,3.9,1.9,'• NPO / Ничего через рот\n• Upright position / Полусидя\n• Continuous pouch suction / Постоянная аспирация\n• Evaluate associated anomalies\n Исключить сочетанные пороки',15,NAVY,True);note(s,'Screen for VACTERL-associated anomalies: vertebral, cardiac, renal, limb and anorectal findings.');finish(s)
s=base('EA/TEF: repair and complications','АП/ТПС: операция и осложнения','03');
for i,(a,b) in enumerate([('Pre-op','До операции'),('Operation','Операция'),('Post-op','После операции'),('Lifetime','Долгосрочно')]):box(s,.7+i*3.1,1.45,2.6,.48,[BLUE,ORANGE,TEAL,GREEN][i],[BLUE,ORANGE,TEAL,GREEN][i]);text(s,.75+i*3.1,1.55,2.5,.2,a+'\n'+b,11,WHITE,True,PP_ALIGN.CENTER)
texts=['Stabilize; echo; assess gap','Fistula ligation + esophageal anastomosis','Leak, stricture, recurrent fistula, feeding difficulty','GERD, dysmotility, respiratory symptoms, dysphagia']
rus=['Стабилизация; ЭхоКГ; оценка диастаза','Пересечение свища + анастомоз пищевода','Несостоятельность, стриктура, рецидив свища, проблемы кормления','ГЭРБ, дисмоторика, респираторные симптомы, дисфагия']
for i in range(4):text(s,.8+i*3.1,2.2,2.4,1.25,texts[i]+'\n'+rus[i],13,NAVY,True,PP_ALIGN.CENTER)
note(s,'Surgery restores continuity, but esophageal function may remain abnormal for years.');finish(s)
s=base('Chalasia/GER and achalasia: an anatomical contrast','Халазия/ГЭР и ахалазия: анатомическое сравнение','03');anatomy_esophagus(s,.65,1.35);text(s,.65,4.45,3.8,.55,'Chalasia / GER: LES barrier is insufficient.\nХалазия / ГЭР: недостаточность барьера НПС.',14,TEAL,True,PP_ALIGN.CENTER);anatomy_esophagus(s,5.0,1.35);sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,5.72,3.23,.42,.18,RED,RED);text(s,4.95,4.45,3.8,.55,'Achalasia: LES fails to relax; esophagus dilates above.\nАхалазия: НПС не расслабляется; пищевод расширен выше.',14,RED,True,PP_ALIGN.CENTER);table(s,9.05,1.55,['Feature / Признак','GER / ГЭР','Achalasia / Ахалазия'],[('Mechanism','Transient/incompetent LES','Impaired LES relaxation + absent peristalsis'),('Presentation','Regurgitation, feeding symptoms','Dysphagia, regurgitation, weight loss'),('Tests','Clinical +/- pH-impedance','Barium, manometry, endoscopy'),('Treatment','Feeding measures; selected acid suppression','Pneumatic dilation, Heller myotomy or POEM')],[1.35,1.6,1.6]);note(s,'Do not confuse physiologic infant regurgitation with pathologic reflux disease or true achalasia.');finish(s)
# pyloric 3
s=base('Hypertrophic pyloric stenosis: labelled anatomy','Гипертрофический пилоростеноз: анатомия','04');pylorus(s,.8,1.55);bullets(s,5.2,1.45,6.8,[('Circular muscle hypertrophy narrows the pyloric channel.','Гипертрофия циркулярной мышцы сужает канал привратника.'),('Classically presents at 2-8 weeks with progressive non-bilious projectile vomiting.','Классически в 2-8 недель: нарастающая небилиарная рвота фонтаном.'),('Infant often remains hungry after vomiting.','После рвоты младенец часто снова голоден.')],15);note(s,'Bilious vomiting is not typical of pyloric stenosis and should trigger an urgent obstruction workup.');finish(s)
s=base('HPS: clinical pattern, ultrasound and blood chemistry','ГПС: клиника, УЗИ и биохимия крови','04');
# target sign
sh(s,MSO_SHAPE.OVAL,.85,1.55,2.7,2.7,NAVY,NAVY);sh(s,MSO_SHAPE.OVAL,1.23,1.93,1.94,1.94,GOLD,GOLD);sh(s,MSO_SHAPE.OVAL,1.59,2.29,1.22,1.22,NAVY,NAVY);text(s,.92,4.45,2.55,.35,'Ultrasound “target” / УЗИ «мишень»',12,BLUE,True,PP_ALIGN.CENTER);bullets(s,4.2,1.45,4.1,[('Olive-like epigastric mass may be palpable.','Может пальпироваться «оливка» в эпигастрии.'),('Ultrasound shows an elongated thick pyloric muscle.','УЗИ: удлинённая и утолщённая мышца привратника.'),('Prolonged vomiting can cause hypochloremic, hypokalemic metabolic alkalosis.','Длительная рвота может вызвать гипохлоремический, гипокалиемический метаболический алкалоз.')],13);box(s,8.75,1.55,3.45,2.9,PALE,BLUE);text(s,9.0,1.85,2.95,.3,'Sequence / Последовательность',15,NAVY,True,PP_ALIGN.CENTER);text(s,9.08,2.4,2.8,1.5,'Vomiting → dehydration → chloride loss → alkalosis\n\nРвота → обезвоживание → потеря хлорида → алкалоз',14,RED,True,PP_ALIGN.CENTER);note(s,'Correct dehydration and electrolyte abnormalities before anesthesia and pyloromyotomy.');finish(s)
s=base('HPS: management pathway','ГПС: путь лечения','04');
for i,(a,b,c) in enumerate([('Resuscitate','Регидратация',BLUE),('Confirm ultrasound','Подтвердить УЗИ',TEAL),('Correct electrolytes','Корректировать электролиты',ORANGE),('Ramstedt pyloromyotomy','Пилоромиотомия Рамштедта',GREEN)]):box(s,.7+i*3.05,1.7,2.55,1.1,WHITE,c);text(s,.84+i*3.05,1.93,2.25,.3,a+'\n'+b,14,NAVY,True,PP_ALIGN.CENTER);
for i in range(3):arrow(s,3.28+i*3.05,2.25,3.65+i*3.05,2.25,BLUE)
text(s,.85,4.15,11.5,.65,'Operation divides hypertrophied muscle without entering mucosa.\nОперация рассекает гипертрофированную мышцу без вскрытия слизистой.',19,TEAL,True,PP_ALIGN.CENTER);note(s,'Expected postoperative issue: small transient feeds-related vomiting can occur, but persistent or bilious vomiting requires reassessment.');finish(s)
# obstruction 4
s=base('Congenital intestinal obstruction: anatomic level matters','Врождённая кишечная непроходимость: важен уровень','05');
for i,(a,b,c) in enumerate([('Duodenum','ДПК',GOLD),('Jejunum/ileum','Тощая/подвздошная',ORANGE),('Colon','Толстая кишка',TEAL),('Anorectum','Аноректум',RED)]):box(s,.7+i*3.05,1.45,2.55,.55,c,c);text(s,.75+i*3.05,1.59,2.45,.22,a+' / '+b,12,WHITE,True,PP_ALIGN.CENTER);text(s,.8+i*3.05,2.3,2.35,1.4,[('Double bubble\n«Двойной пузырь»'),('Multiple dilated loops\nМножественные расширенные петли'),('Distal obstruction / microcolon possible\nДистальная обструкция / возможен микроколон'),('Absent/abnormal anus\nОтсутствующий/аномальный анус')][i],14,NAVY,True,PP_ALIGN.CENTER)
note(s,'Bilious vomiting in a neonate is intestinal obstruction until proven otherwise. Urgent evaluation is required.');finish(s)
s=base('Duodenal obstruction: double-bubble concept','Дуоденальная непроходимость: симптом «двойного пузыря»','05');
sh(s,MSO_SHAPE.OVAL,.8,1.7,1.45,1.15,GOLD,GOLD);sh(s,MSO_SHAPE.OVAL,2.6,1.8,1.35,.95,ORANGE,ORANGE);line(s,2.25,2.25,2.65,2.25,RED,7);text(s,.8,3.15,3.2,.35,'Stomach + proximal duodenum\nЖелудок + проксимальная ДПК',13,NAVY,True,PP_ALIGN.CENTER);bullets(s,5.1,1.4,6.5,[('Atresia/stenosis or annular pancreas can obstruct the duodenum.','Атрезия/стеноз или кольцевидная поджелудочная железа могут обтурировать ДПК.'),('Antenatal polyhydramnios and early bilious emesis are common clues.','Многоводие антенатально и ранняя билиарная рвота - важные признаки.'),('Consider association with trisomy 21 and cardiac anomalies.','Учитывайте связь с трисомией 21 и пороками сердца.')],15);note(s,'The “double bubble” is a radiographic pattern, not a complete diagnostic label.');finish(s)
s=base('Malrotation and midgut volvulus: labelled mechanism','Мальротация и заворот средней кишки: механизм','05');
# SMA/SMV whirl
sh(s,MSO_SHAPE.OVAL,1.1,1.55,2.9,2.9,PALE,BLUE);sh(s,MSO_SHAPE.OVAL,2.18,2.62,.55,.55,RED,RED);text(s,2.07,2.75,.75,.18,'SMA\nВБА',8,WHITE,True,PP_ALIGN.CENTER)
for r in [1.0,1.45,1.9]:
a=s.shapes.add_shape(MSO_SHAPE.ARC,Inches(2.45-r/2),Inches(2.9-r/2),Inches(r),Inches(r));a.line.color.rgb=ORANGE;a.line.width=Pt(4);a.fill.background()
text(s,1.15,4.7,2.8,.35,'Whirlpool / «Водоворот»\nmesentery twists around SMA',12,RED,True,PP_ALIGN.CENTER);bullets(s,5.05,1.45,6.7,[('Narrow mesenteric base predisposes to twisting of the midgut.','Узкое основание брыжейки предрасполагает к завороту средней кишки.'),('Bilious vomiting, pain, shock or hematochezia can signal ischemia.','Билиарная рвота, боль, шок или кровь в стуле могут указывать на ишемию.'),('Upper GI contrast study assesses duodenojejunal junction; Doppler may show whirlpool sign.','Контрастное исследование верхних отделов ЖКТ оценивает дуоденоеюнальный переход; допплер может выявить «водоворот».')],13);note(s,'Volvulus is a time-critical surgical emergency: resuscitation and prompt operative Ladd procedure are needed.');finish(s)
s=base('Congenital obstruction: diagnostic and operative map','Врождённая непроходимость: диагностика и операция','05');table(s,.55,1.3,['Pattern / Паттерн','Likely level / Уровень','Key test / Исследование','Typical operation / Операция'],[('Early bilious emesis','Duodenum or malrotation','AXR + upper GI contrast','Duodenoduodenostomy or Ladd procedure'),('Distension + delayed meconium','Distal bowel / colon','AXR + contrast enema','Cause-specific: atresia repair, pull-through etc.'),('No anal opening','Anorectum','Perineal exam + cross-table lateral film','Primary repair or staged diversion'),('Microcolon','Unused distal colon','Contrast enema','Suggests distal small-bowel atresia/meconium ileus')],[2.25,2.4,3.1,4.3]);note(s,'Always resuscitate: NPO, nasogastric decompression, IV fluids, antibiotics when ischemia/perforation suspected.');finish(s)
# HD 4
s=base("Hirschsprung's disease: labelled pathophysiology","Болезнь Гиршпрунга: патофизиология",'06');anatomy_colon(s,.8,1.45);sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,2.05,3.35,1.1,.3,RED,RED);text(s,1.55,3.75,2.1,.35,'Aganglionic distal segment\nАганглионарный дистальный сегмент',10,RED,True,PP_ALIGN.CENTER);text(s,3.75,2.4,3.5,.52,'No enteric ganglion cells → tonic obstruction → proximal dilation.\nНет ганглиозных клеток → тоническая обструкция → расширение проксимальной кишки.',15,NAVY,True);note(s,'Aganglionosis is caused by failure of neural crest-derived cells to populate the distal bowel.');finish(s)
s=base("Hirschsprung's disease: clinical recognition","Болезнь Гиршпрунга: клиническое распознавание",'06');bullets(s,.7,1.35,5.8,[('Failure to pass meconium within 24-48 hours.','Отсутствие отхождения мекония в первые 24-48 часов.'),('Abdominal distension and bilious vomiting.','Вздутие живота и билиарная рвота.'),('Explosive stool/gas after rectal examination may occur.','После ректального исследования может отойти взрывной стул/газ.'),('Older child: refractory constipation and poor growth.','У старших детей: рефрактерный запор и плохая прибавка массы.')],14);box(s,7.3,1.4,4.7,3.75,PALE,RED);text(s,7.65,1.75,4.0,.32,'Enterocolitis alert / Признаки энтероколита',16,RED,True,PP_ALIGN.CENTER);text(s,7.85,2.35,3.75,1.8,'Fever • lethargy • explosive diarrhea • distension\n\nЛихорадка • вялость • профузная диарея • вздутие\n\nTreat as urgent: resuscitate, rectal irrigations, antibiotics and surgical assessment.\n\nНеотложно: регидратация, ректальные промывания, антибиотики, осмотр хирургом.',13,NAVY,True,PP_ALIGN.CENTER);note(s,'Hirschsprung-associated enterocolitis can be life-threatening before or after pull-through.');finish(s)
s=base("Hirschsprung's disease: diagnostic ladder","Болезнь Гиршпрунга: диагностическая лестница",'06');
for i,(a,b) in enumerate([('Contrast enema','Контрастная клизма'),('Anorectal manometry','Аноректальная манометрия'),('Rectal suction biopsy','Ректальная аспирационная биопсия')]):box(s,.75+i*4.08,1.55,3.4,1.1,WHITE,[BLUE,ORANGE,TEAL][i]);text(s,.95+i*4.08,1.82,3,.38,a+'\n'+b,14,NAVY,True,PP_ALIGN.CENTER)
for i in range(2):arrow(s,4.15+i*4.08,2.1,4.72+i*4.08,2.1,BLUE)
text(s,.88,3.65,11.6,.55,'Diagnostic anchor: histology showing absent ganglion cells.\nДиагностическая основа: гистология с отсутствием ганглиозных клеток.',20,RED,True,PP_ALIGN.CENTER);note(s,'Contrast enema can show a transition zone; absence of the rectoanal inhibitory reflex supports the diagnosis, but biopsy confirms it.');finish(s)
s=base("Hirschsprung's disease: treatment and postoperative review","Болезнь Гиршпрунга: лечение и послеоперационное наблюдение",'06');table(s,.6,1.3,['Phase / Этап','Action / Действие','Purpose / Цель'],[('Initial','Rectal irrigations; fluids; treat enterocolitis','Decompress and stabilize'),('Planning','Leveling biopsies when needed; define transition','Ensure ganglionated bowel for anastomosis'),('Definitive','Pull-through: Soave, Swenson or Duhamel variants','Remove/bypass aganglionic segment'),('Follow-up','Assess obstruction, constipation, incontinence, enterocolitis','Bowel function and safety')],[2.0,5.7,4.7]);note(s,'Persistent obstruction after pull-through needs structured evaluation: mechanical, histopathologic, motility and behavioral causes.');finish(s)
# megacolon/dolicho 3
s=base('Megacolon and dolichosigma: terminology and anatomy','Мегаколон и долихосигма: термины и анатомия','07');anatomy_colon(s,.9,1.3);text(s,5.0,1.45,6.6,.5,'Megacolon = dilated colon. Dolichosigma = elongated sigmoid colon.\nМегаколон = расширенная ободочная кишка. Долихосигма = удлинённая сигмовидная кишка.',17,NAVY,True);bullets(s,5.0,2.55,6.5,[('They are descriptive findings, not a final etiologic diagnosis.','Это описательные находки, а не окончательный этиологический диагноз.'),('In children, distinguish congenital/functional causes from Hirschsprung disease or secondary dilation.','У детей отличайте врождённые/функциональные причины от болезни Гиршпрунга и вторичного расширения.')],14);note(s,'An elongated sigmoid can predispose to constipation and, rarely, sigmoid volvulus.');finish(s)
s=base('Megacolon/dolichosigma: cause-based assessment','Мегаколон/долихосигма: обследование по причине','07');table(s,.65,1.35,['Question / Вопрос','Reason / Причина','Useful next step / Следующий шаг'],[('Since birth?','Congenital obstruction or HD possible','Meconium history; contrast study; biopsy if indicated'),('Functional constipation?','Stool withholding / fecal loading','Clinical evaluation; bowel regimen'),('Systemic illness?','Metabolic, neurologic, inflammatory or toxic causes','Targeted laboratory and clinical assessment'),('Acute severe distension?','Volvulus, obstruction, toxic megacolon','Urgent imaging and surgical review')],[3.0,4.0,4.8]);note(s,'Do not label a child “dolichosigma” without excluding red flags for an organic cause of constipation.');finish(s)
s=base('Megacolon/dolichosigma: management principles','Мегаколон/долихосигма: принципы лечения','07');
for i,(a,b,c) in enumerate([('Stabilize acute obstruction','Стабилизировать острую обструкцию',RED),('Treat the underlying cause','Лечить основную причину',ORANGE),('Establish bowel routine','Сформировать режим дефекации',TEAL),('Escalate surgery selectively','Избирательно рассмотреть операцию',GREEN)]):box(s,.7+i*3.07,1.45,2.55,1.2,WHITE,c);text(s,.82+i*3.07,1.72,2.3,.55,a+'\n'+b,13,NAVY,True,PP_ALIGN.CENTER)
text(s,1.0,4.1,11.3,.7,'Surgery is cause-specific, not based only on colon diameter or length.\nОперация зависит от причины, а не только от диаметра или длины кишки.',20,BLUE,True,PP_ALIGN.CENTER);note(s,'Chronic constipation care includes education, adequate disimpaction when needed, maintenance therapy and follow-up.');finish(s)
# ARM 4
s=base('Anorectal malformations: labelled pelvic anatomy','Аноректальные мальформации: анатомия таза','08');
# diagram male/female neutral
sh(s,MSO_SHAPE.OVAL,1.1,1.35,3.3,4.2,PALE,BLUE);sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,2.35,1.75,.75,1.55,MINT,TEAL);sh(s,MSO_SHAPE.ROUNDED_RECTANGLE,2.35,3.38,.75,1.25,ORANGE,ORANGE);sh(s,MSO_SHAPE.OVAL,2.45,4.76,.55,.35,RED,RED);text(s,1.5,1.55,.85,.3,'Bladder\nМочевой пузырь',9,BLUE,True);text(s,3.25,2.25,1,.3,'Rectum\nПрямая кишка',9,TEAL,True);text(s,3.2,4.0,1.0,.3,'Anal canal\nАнальный канал',9,ORANGE,True);text(s,1.4,5.35,2.8,.35,'Sphincter complex / Сфинктерный комплекс',10,RED,True,PP_ALIGN.CENTER);bullets(s,5.5,1.45,6.2,[('Spectrum ranges from anal stenosis to complex fistulas and cloaca.','Спектр: от анального стеноза до сложных свищей и клоаки.'),('The relation of rectal pouch/fistula to urinary or genital tract guides reconstruction.','Отношение прямокишечного мешка/свища к мочеполовому тракту определяет реконструкцию.'),('Continence potential depends on sacrum, spine and sphincter complex, not on the anal opening alone.','Потенциал удержания зависит от крестца, позвоночника и сфинктеров, а не только от анального отверстия.')],14);note(s,'Never force a rectal examination or instrument into an uncertain perineal opening in a newborn.');finish(s)
s=base('ARM: newborn assessment and associated anomalies','АРМ: оценка новорождённого и сочетанные пороки','08');bullets(s,.7,1.35,5.9,[('Inspect perineum: anal opening, fistula, meconium from urethra/vagina.','Осмотреть промежность: анальное отверстие, свищ, меконий из уретры/влагалища.'),('Assess abdomen, urine output and sepsis/obstruction signs.','Оценить живот, диурез и признаки сепсиса/непроходимости.'),('Screen VACTERL-related systems: spine, heart, tracheoesophagus, kidneys, limbs.','Скрининг VACTERL: позвоночник, сердце, трахея-пищевод, почки, конечности.')],14);box(s,7.1,1.35,4.9,3.95,PALE,BLUE);text(s,7.4,1.65,4.25,.35,'Investigations / Исследования',16,NAVY,True,PP_ALIGN.CENTER);text(s,7.6,2.25,3.9,2.35,'• Cross-table lateral radiograph after 18-24 h\n Латеральная рентгенограмма через 18-24 ч\n\n• Renal/pelvic ultrasound\n УЗИ почек/таза\n\n• Echocardiography and spine evaluation\n ЭхоКГ и оценка позвоночника\n\n• Distal colostogram when diverted\n Дистальная колостограмма при стоме',13,NAVY,True);note(s,'Associated abnormalities are common, so ARM evaluation is multidisciplinary from day one.');finish(s)
s=base('ARM: decision framework and surgery','АРМ: тактика и операция','08');
for i,(a,b,c) in enumerate([('Low lesion\nНизкая форма','Perineal fistula / stenosis\nПромежностный свищ / стеноз',GREEN),('Intermediate/high\nСредняя/высокая','Often staged diversion + imaging\nЧасто этапная стома + визуализация',ORANGE),('Complex cloaca\nСложная клоака','Specialized multidisciplinary reconstruction\nРеконструкция в специализированном центре',RED)]):box(s,.75+i*4.1,1.45,3.45,1.55,WHITE,c);text(s,.92+i*4.1,1.72,3.12,.85,a+'\n'+b,14,NAVY,True,PP_ALIGN.CENTER)
text(s,.75,4.15,11.8,.55,'Posterior sagittal anorectoplasty (PSARP) aims to position rectum within the sphincter complex.\nЗаднесагиттальная аноректопластика (PSARP) направлена на размещение прямой кишки в комплексе сфинктеров.',18,TEAL,True,PP_ALIGN.CENTER);note(s,'Choice of primary repair versus staged diversion depends on anatomy, physiology, associated anomalies and local expertise.');finish(s)
s=base('ARM: long-term function and bowel management','АРМ: долгосрочная функция и кишечная программа','08');table(s,.55,1.3,['Domain / Область','What to monitor / Что контролировать','Support / Поддержка'],[('Bowel','Constipation, soiling, continence','Individual bowel program; diet/medicines/irrigation'),('Urinary','Recurrent UTI, voiding dysfunction, reflux','Urology follow-up, renal protection'),('Spine/neurology','Tethered cord or sacral anomalies','Neurosurgical/rehabilitation assessment'),('Psychosocial','School participation, body image, transition care','Family-centred long-term support')],[2.0,5.4,5.2]);note(s,'Anatomical repair is only one milestone. Functional follow-up through childhood and adolescence is part of care.');finish(s)
# final synthesis slides
s=base('Cross-condition comparison','Сравнение состояний','09');table(s,.45,1.15,['Condition / Состояние','Signature clue / Главный признак','Confirm / Подтвердить','Priority / Приоритет'],[('CDH','Respiratory distress + scaphoid abdomen','CXR, echo','Gentle ventilation, stabilize'),('EA/TEF','Drooling + tube will not pass','Tube radiograph','Pouch suction, NPO'),('HPS','Non-bilious projectile vomiting','Ultrasound','Fluids/electrolytes then pyloromyotomy'),('Malrotation/volvulus','Bilious vomiting','Upper GI contrast','Urgent surgical action'),('Hirschsprung','Delayed meconium + distension','Rectal biopsy','Decompression; pull-through plan'),('ARM','Absent/abnormal anus','Perineal exam + imaging','Anatomic definition and staged care')],[2.05,3.4,2.5,4.25]);note(s,'Clinical pattern recognition changes urgency: bilious emesis, severe distension, respiratory failure and enterocolitis are emergency patterns.');finish(s)
s=base('Final take-home messages','Главные выводы','10');bullets(s,1.0,1.45,11.0,[('Start with anatomy. The lesion’s level and relation to adjacent structures determine symptoms and operation.','Начинайте с анатомии. Уровень порока и отношение к соседним структурам определяют симптомы и операцию.'),('Stabilization precedes definitive surgery in CDH, HPS and most neonatal obstruction.','При ВДГ, ГПС и большинстве неонатальных непроходимостей стабилизация предшествует операции.'),('Biopsy confirms Hirschsprung disease; imaging guides but does not replace histology.','Биопсия подтверждает болезнь Гиршпрунга; визуализация направляет, но не заменяет гистологию.'),('Long-term bowel, feeding, respiratory, urinary and developmental follow-up is part of pediatric surgical care.','Долгосрочное наблюдение за функцией кишечника, кормлением, дыханием, мочеиспусканием и развитием является частью детской хирургии.')],17);note(s,'For teaching use. Clinical care must follow local protocols and pediatric surgical specialist guidance.');finish(s)
s=base('Selected sources','Выбранные источники','11');text(s,.8,1.25,11.6,4.95,'• Schwartz’s Principles of Surgery, 11th ed. Pediatric Surgery chapter.\n• Sabiston Textbook of Surgery. Alimentary tract conditions in children.\n• Sleisenger and Fordtran’s Gastrointestinal and Liver Disease. Pediatric GI malformations.\n• Canadian Congenital Diaphragmatic Hernia Collaborative clinical practice guideline, CMAJ 2018 (PMID 29378870).\n• American Pediatric Surgical Association evidence-based resources: congenital diaphragmatic hernia and anorectal malformations.\n• Hirschsprung disease practice guidance: diagnosis requires rectal biopsy; standard pull-through variants include Soave, Swenson and Duhamel.\n\nImage: Hirschsprung contrast-enema image and malrotation images from the supplied medical image index, reproduced for educational context.\n\nУчебная презентация: источники включают руководства и учебники по детской хирургии.',14,NAVY);note(s,'Prepared by: Aditi Sanjay Malvankar / Подготовила: Адити Санджай Мальванкар | Group 653 / Группа 653');finish(s)
prs.save(OUT)
print(OUT, len(prs.slides))
python "/tmp/workspace/pediatric_surgery_bilingual/src/create_expanded_deck.py" && ls -lh "/tmp/workspace/pediatric_surgery_bilingual/output/Expanded_Pediatric_Surgery_Bilingual_Aditi_Malvankar.pptx"
~/pediatric_surgery_bilingual/src/create_expanded_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/pediatric_surgery_bilingual/src/create_expanded_deck.py'
python "/tmp/workspace/pediatric_surgery_bilingual/src/create_expanded_deck.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/pediatric_surgery_bilingual/output/Expanded_Pediatric_Surgery_Bilingual_Aditi_Malvankar.pptx' prs=Presentation(p) print('slides=',len(prs.slides)) for i,s in enumerate(prs.slides,1): txt=' '.join(sh.text for sh in s.shapes if getattr(sh,'has_text_frame',False)) print(i, 'Aditi=',('Aditi' in txt or 'Адити' in txt), 'shapes=',len(s.shapes), txt[:74].replace('\n',' / ')) PY ls -lh "/tmp/workspace/pediatric_surgery_bilingual/output/Expanded_Pediatric_Surgery_Bilingual_Aditi_Malvankar.pptx"
Expanded Pediatric Surgery Bilingual Aditi Malvankar
Presentation · PPTX