Create a comprehensive, visually engaging, exam-oriented Pdf for an MS General Surgery postgraduate seminar on: “PORT PLACEMENT IN LAPAROSCOPIC SURGERY” Subtitle: Operative Orientation, Practical Principles, Ergonomics & Troubleshooting TARGET AUDIENCE: MS General Surgery postgraduate residents, surgical faculty and trainees. OBJECTIVE: The presentation should teach the surgeon how to PLAN, PLACE and USE laparoscopic ports safely and effectively in real operative situations. Focus on practical operating-room decision making, 3D orientation, ergonomics, triangulation, instrument movement, avoidance of injury, and modifications in difficult patients. PRIMARY REFERENCES: • Bailey & Love’s Short Practice of Surgery – latest available edition • Schwartz’s Principles of Surgery – latest available edition • Sabiston Textbook of Surgery – latest available edition • S. Das Manual of Clinical Surgery • Standard laparoscopic surgery/ minimally invasive surgery textbooks • Recent guidelines, consensus statements and high-quality surgical literature where relevant IMPORTANT: Do NOT make this a generic introduction to laparoscopy. Keep the presentation focused on OPERATIVE ORIENTATION and PRACTICAL PORT PLACEMENT. PRESENTATION STRUCTURE: 1. TITLE SLIDE • Port Placement in Laparoscopic Surgery • Operative Orientation, Practical Principles & Ergonomics • Name / Department / Institution 2. LEARNING OBJECTIVES By the end, the learner should be able to: • Understand principles governing port placement • Select appropriate port sites for different operations • Achieve optimal triangulation • Understand camera and working-port orientation • Modify port placement according to patient anatomy and pathology • Avoid vascular, visceral and abdominal wall injuries • Troubleshoot poor visualization and instrument collision 3. WHY PORT PLACEMENT MATTERS Explain how port position affects: • Exposure • Visualization • Instrument reach • Angle of dissection • Traction-countertraction • Ergonomics • Surgeon fatigue • Complications • Operative time Include a simple diagram showing how poor vs optimal port placement changes the angle of dissection. 4. FUNDAMENTAL PRINCIPLES OF PORT PLACEMENT Explain: • Target-oriented port placement • Triangulation • Principle of alignment • Working angle • Distance from target • Camera positioning • Dominant-hand port • Assistant port • Retraction port • Avoiding instrument fencing/collision 5. SURGICAL TARGET & PORT PLANNING Teach a practical method: TARGET → CAMERA → WORKING PORTS → ASSISTANT PORT → RETRACTION Explain how to mentally plan ports BEFORE incision. Include a reusable planning diagram. 6. OPERATIVE GEOMETRY Explain with diagrams: • Triangulation • Working angle • Azimuth • Elevation • Instrument fulcrum • External vs internal movement • Loss of depth perception with 2D imaging • Effect of excessive/insufficient distance from target Include clear labeled operative diagrams rather than dense text. 7. CAMERA PORT Discuss: • Open vs closed entry • Optical port • Camera orientation • Camera distance from target • 0° vs 30° telescope • When to use 30° scope • Maintaining horizon • Camera navigation and orientation 8. WORKING PORTS Explain: • Ideal port distance • Angle between instruments • Right- and left-hand working ports • Dominant hand considerations • Target-centered placement • Avoiding external clashing 9. PORT DISTANCE AND WORKING ANGLE Include practical rules and explain that exact distances vary with: • Patient size • Target organ • Operation • Surgeon preference • Instrument length Use a simple diagram showing optimal and suboptimal working angles. 10. ERGONOMICS OF LAPAROSCOPIC PORT PLACEMENT Explain: • Surgeon position • Monitor position • Instrument alignment • Elbow and wrist position • Neutral posture • External instrument collision • “Sword fighting” • Excessive shoulder abduction • Surgeon fatigue Include an ergonomic OR diagram. 11. ABDOMINAL WALL ANATOMY RELEVANT TO PORT PLACEMENT Cover: • Skin • Subcutaneous tissue • Anterior rectus sheath • Rectus muscle • Posterior sheath • Transversalis fascia • Preperitoneal tissue • Peritoneum Also discuss important vascular anatomy: • Inferior epigastric vessels • Deep circumflex iliac vessels • Superficial epigastric vessels 12. SAFE PORT ENTRY Compare: • Veress needle technique • Open/Hasson technique • Optical trocar • Direct trocar entry For each: • Principle • Advantages • Limitations • Complications • When it may be preferred 13. PRIMARY PORT ENTRY Explain: • Umbilical entry • Supraumbilical entry • Infraumbilical entry • Palmer’s point • Alternative entry sites • Situations requiring modification Include a decision algorithm for selecting entry site. 14. SECONDARY PORTS Discuss: • Placement under direct vision • Avoiding inferior epigastric vessels • Appropriate distance from target • Maintaining triangulation • Avoiding previous scars • Avoiding adhesions 15. COMMON PORT POSITIONS Create a visual overview of: • Umbilical • Epigastric • Right/left hypochondrial • Right/left lumbar • Iliac fossa • Suprapubic • Lateral abdominal ports 16. PORT PLACEMENT ACCORDING TO SURGERY Create separate slides with realistic diagrams for: A. Laparoscopic Cholecystectomy • Standard 4-port placement • Camera port • Epigastric working port • Right hypochondrial port • Fundal retraction port • Variations B. Laparoscopic Appendectomy • Standard 3-port placement • Camera • Working ports • Suprapubic/iliac fossa variations C. TAPP Inguinal Hernia Repair • Camera port • Working ports • Medial/lateral orientation • Relationship to Hesselbach’s triangle and myopectineal orifice D. Laparoscopic Ventral/Incisional Hernia Repair • Port placement away from defect • Lateral access • Mesh deployment considerations • Avoiding adhesions and previous scars E. Laparoscopic Colectomy • Target-specific port placement • Medial-to-lateral approach • Surgeon and assistant positioning F. Laparoscopic Gastric Surgery • Upper abdominal port configuration • Retraction and working ports G. Laparoscopic Adrenalectomy • Lateral positioning • Port configuration • Subcostal considerations H. Laparoscopic Splenectomy • Left upper quadrant orientation • Access and retraction I. Laparoscopic Nephrectomy • Flank/lateral port placement • Surgeon and assistant positions J. Laparoscopic Gynecologic/Pelvic Surgery • Camera port • Lateral ports • Suprapubic port • Deep pelvic ergonomics 17. PORT PLACEMENT IN SPECIAL PATIENTS Explain modifications in: • Obesity • Very thin patients • Previous abdominal surgery • Midline laparotomy scar • Multiple scars • Large abdominal masses • Pregnancy • Distorted anatomy • Severe adhesions 18. PORT PLACEMENT IN OBESITY Discuss: • Increased abdominal wall thickness • Altered landmarks • Longer instruments • Higher camera position • Wider port spacing • Ergonomic challenges 19. PREVIOUS ABDOMINAL SURGERY Explain: • Adhesion risk • Avoiding scarred areas • Alternative entry sites • Palmer’s point • Open entry considerations • Role of prior operative records 20. TROCAR-RELATED COMPLICATIONS Cover: • Vascular injury • Inferior epigastric vessel injury • Bowel injury • Solid-organ injury • Bladder injury • Retroperitoneal injury • Port-site bleeding • Port-site hernia • Wound infection • Tumor seeding where relevant 21. INFERIOR EPIGASTRIC VESSEL INJURY Create a dedicated practical slide: • Anatomical location • How to avoid injury • Safe lateral port placement • Recognition • Immediate management • Hemostasis options 22. PORT-SITE HERNIA Explain: • Risk factors • Common sites • Port size-related risk • Fascial closure • Prevention • Management 23. PORT REMOVAL Discuss: • Removal under vision • Desufflation • Inspection for bleeding • Fascial closure • Which port sites require closure • Skin closure 24. TROUBLESHOOTING: “MY INSTRUMENTS ARE CLASHING” Give a practical algorithm: • Is the port too close? • Is the angle wrong? • Is the camera too close? • Is the target incorrectly approached? • Should the assistant port be repositioned? • Should an additional port be added? 25. TROUBLESHOOTING: “I CANNOT REACH THE TARGET” Discuss: • Port too far • Wrong angle • Wrong patient positioning • Insufficient pneumoperitoneum • Inadequate exposure • Need for additional port 26. TROUBLESHOOTING: “POOR VISUALIZATION” Cover: • Camera orientation • Lens cleaning • Fogging • Incorrect camera distance • Retraction problem • Patient positioning • Additional port requirement 27. WHEN TO ADD AN EXTRA PORT Explain indications: • Inadequate exposure • Difficult anatomy • Bleeding • Adhesions • Obesity • Unexpected pathology • Need for additional retraction 28. PORT PLACEMENT CHECKLIST BEFORE INCISION Create a practical checklist: TARGET ↓ PATIENT POSITION ↓ CAMERA POSITION ↓ WORKING PORTS ↓ TRIANGULATION ↓ ERGONOMICS ↓ VASCULAR SAFETY ↓ CONTINGENCY PORT 29. OPERATIVE CASE SCENARIO Present a case: “Obese patient with previous midline laparotomy undergoing laparoscopic cholecystectomy.” Ask: • Where will you place the first port? • Why? • Where will you place working ports? • What changes because of obesity? • What if adhesions are encountered? • When will you add another port? Then provide the answer step-by-step. 30. VIVA / PRACTICAL QUESTIONS Include high-yield questions such as: • What are the principles of port placement? • What is triangulation? • What is the ideal working angle? • Why is a 30° telescope useful? • Where is the inferior epigastric artery? • How do you avoid inferior epigastric injury? • What are alternative sites for primary entry? • When do you use Palmer’s point? • What factors alter port placement? • Which ports require fascial closure? • What causes port-site hernia? • How do you manage trocar injury? • When should an additional port be inserted? 31. RAPID REVISION SLIDE Create a one-slide summary: “PORT PLACEMENT = TARGET + TRIANGULATION + ANGLE + DISTANCE + SAFETY + ERGONOMICS” 32. TAKE-HOME MESSAGES 5–7 concise operative principles. DESIGN REQUIREMENTS: • 30–35 slides • Professional postgraduate surgical seminar style • Clean white/light background • Minimal text per slide • Large readable fonts • Use diagrams extensively • Use anatomical illustrations • Use operative photographs where appropriate • Use labeled port-placement schematics • Use arrows to show instrument direction • Use color coding consistently for camera, working ports, assistant ports and target organ • Avoid overcrowded slides • One major concept per slide • Use tables only when comparison is genuinely useful • Include speaker notes with additional explanation for every important slide IMAGE REQUIREMENTS: Use high-quality medical/anatomical illustrations and real laparoscopic/operative images where appropriate. For every major operation, include a clear topographic abdominal diagram showing: • Patient orientation • Surgeon position • Assistant position • Camera port • Working ports • Retraction port • Target organ • Instrument direction Do not use decorative stock images. EXAM-ORIENTED CONTENT: Clearly mark important points as: ⭐ “VIVA POINT” ⚠️ “SAFETY POINT” 💡 “OPERATIVE PEARL” 🚨 “COMMON ERROR” FINAL SLIDES: • 1-page port placement master algorithm • 1-page complications and prevention table • 1-page viva rapid-fire questions • References REFERENCE STYLE: Add a final reference slide with standard textbooks and selected recent peer-reviewed literature/guidelines. Do not fabricate references. Use only verifiable references. QUALITY CONTROL: Before finalizing, check: 1. Are port-placement diagrams anatomically correct? 2. Are right/left orientations clearly labeled? 3. Is patient position specified? 4. Are surgeon and assistant positions shown? 5. Are practical modifications explained? 6. Are complications and prevention covered? 7. Is the presentation suitable for MS General Surgery seminar + practical/viva examination? 8. Avoid unsupported “fixed rules”; explain that port position varies according to target, patient anatomy and procedure.
Create the port-placement master algorithm first
laparoscopy AND trocar placement
SAGES guidelines laparoscopic access trocar placement safe entry port site hernia
/tmp/workspace
mkdir -p "/tmp/workspace/port-placement-algorithm/src" "/tmp/workspace/port-placement-algorithm/output" && python - <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape, A4 from reportlab.lib.colors import HexColor, white from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.utils import simpleSplit from reportlab.pdfbase.pdfmetrics import registerFontFamily import os out='/tmp/workspace/port-placement-algorithm/output/Port_Placement_Master_Algorithm.pdf' W,H=landscape(A4) # palette NAVY=HexColor('#12324A'); BLUE=HexColor('#167AA8'); TEAL=HexColor('#0B9B8E'); GREEN=HexColor('#4C9A66'); ORANGE=HexColor('#E58A2B'); RED=HexColor('#C7463E'); LIGHT=HexColor('#F5F8FA'); GREY=HexColor('#5B6870'); PALE=HexColor('#EAF3F7'); DARK=HexColor('#202C33') c=canvas.Canvas(out,pagesize=(W,H)); c.setTitle('Port Placement Master Algorithm') # fonts native Helvetica def txt(x,y,s,size=9,font='Helvetica',color=DARK,align='left'): c.setFont(font,size); c.setFillColor(color) if align=='center': c.drawCentredString(x,y,s) elif align=='right': c.drawRightString(x,y,s) else: c.drawString(x,y,s) def wrap(x,y,text,width,size=8.3,leading=10,color=DARK,font='Helvetica'): c.setFont(font,size); c.setFillColor(color) for i,line in enumerate(simpleSplit(text,font,size,width)): c.drawString(x,y-i*leading,line) return y-len(simpleSplit(text,font,size,width))*leading def rounded(x,y,w,h,fill,stroke=None,r=8): c.setFillColor(fill); c.setStrokeColor(stroke or fill); c.roundRect(x,y,w,h,r,fill=1,stroke=1 if stroke else 0) def arrow(x1,y1,x2,y2,color=BLUE): c.setStrokeColor(color); c.setFillColor(color); c.setLineWidth(2); c.line(x1,y1,x2,y2) import math a=math.atan2(y2-y1,x2-x1); L=7 pts=[(x2,y2),(x2-L*math.cos(a-0.48),y2-L*math.sin(a-0.48)),(x2-L*math.cos(a+0.48),y2-L*math.sin(a+0.48))] p=c.beginPath(); p.moveTo(*pts[0]); p.lineTo(*pts[1]); p.lineTo(*pts[2]); p.close(); c.drawPath(p,fill=1,stroke=0) def badge(x,y,label,col): rounded(x,y,74,15,col,r=7); txt(x+37,y+4,label,7,'Helvetica-Bold',white,'center') # bg c.setFillColor(LIGHT); c.rect(0,0,W,H,fill=1,stroke=0) # header c.setFillColor(NAVY); c.rect(0,H-58,W,58,fill=1,stroke=0) txt(28,H-27,'PORT PLACEMENT MASTER ALGORITHM',22,'Helvetica-Bold',white) txt(30,H-45,'A target-centred, safety-first workflow for multiport laparoscopic surgery',9.5,'Helvetica',HexColor('#D9ECF5')) # side legend rounded(W-220,H-46,195,26,HexColor('#1D4B68'),r=6) txt(W-210,H-34,'COLOUR KEY:',7.2,'Helvetica-Bold',white) for xx,col,lab in [(W-146,BLUE,'CAMERA'),(W-92,GREEN,'WORK'),(W-49,ORANGE,'RETRACT')]: c.setFillColor(col); c.circle(xx,H-33,4,fill=1,stroke=0); txt(xx+7,H-36,lab,6.5,'Helvetica-Bold',white) # left chain columns x=28; boxw=180; boxh=46; ys=[460,395,330,265,200,135] steps=[('1 DEFINE THE TARGET','Operation, pathology, dissection plane and specimen-extraction plan.'),('2 SET THE OPERATING FIELD','Patient position, tilt, surgeon/assistant sides, monitor in line of view.'),('3 CHOOSE SAFE PRIMARY ENTRY','Assess scars, mass, fundal height and adhesions. Select site + entry method.'),('4 PLACE THE CAMERA PORT','Obtain a stable overview. Select 0°/30° scope and preserve the horizon.'),('5 BUILD THE WORKING TRIANGLE','Place dominant and nondominant ports around the target, not around the umbilicus.'),('6 ADD RETRACTION + CONTINGENCY','Plan assistant/retraction vector, specimen route and one safe rescue-port option.')] cols=[NAVY,TEAL,ORANGE,BLUE,GREEN,NAVY] for (title,body),y,col in zip(steps,ys,cols): rounded(x,y,boxw,boxh,white,HexColor('#DDE6EB'),8); c.setFillColor(col); c.roundRect(x,y,7,boxh,4,fill=1,stroke=0) txt(x+15,y+30,title,9.3,'Helvetica-Bold',NAVY); wrap(x+15,y+16,body,boxw-25,7.4,9,GREY) if y!=ys[-1]: arrow(x+boxw/2,y-3,x+boxw/2,y-17,BLUE) # center geometry panel px=228; py=265; pw=315; ph=241 rounded(px,py,pw,ph,white,HexColor('#D6E4EA'),10) txt(px+16,py+218,'THE GEOMETRY CHECK',14,'Helvetica-Bold',NAVY) txt(px+16,py+200,'Before cutting: make the target the centre of the port plan.',8.5,'Helvetica',GREY) # abdominal operating geometry circle target cx=px+160; cy=py+112 # patient outline c.setStrokeColor(HexColor('#B9CED8')); c.setLineWidth(1.3); c.ellipse(cx-105,cy-70,cx+105,cy+70,fill=0,stroke=1) # target c.setFillColor(RED); c.circle(cx,cy,11,fill=1,stroke=0); txt(cx,cy-3,'TARGET',6.3,'Helvetica-Bold',white,'center') # camera point cam=(cx,cy+55); c.setFillColor(BLUE);c.circle(*cam,7,fill=1,stroke=0);txt(cam[0]+12,cam[1]-2,'CAMERA',7.2,'Helvetica-Bold',BLUE) # working L=(cx-75,cy-34); R=(cx+75,cy-34) for pos,lab in [(L,'NON-DOMINANT'),(R,'DOMINANT')]: c.setFillColor(GREEN); c.circle(*pos,7,fill=1,stroke=0); txt(pos[0],pos[1]-18,lab,6.3,'Helvetica-Bold',GREEN,'center'); arrow(pos[0]+(4 if pos[0]<cx else -4),pos[1]+3,cx+(-8 if pos[0]<cx else 8),cy-2,GREEN) arrow(cam[0],cam[1]-7,cx,cy+11,BLUE) # retraction re=(cx+83,cy+42);c.setFillColor(ORANGE);c.circle(*re,6,fill=1,stroke=0);txt(re[0]+12,re[1]-2,'RETRACTION',6.5,'Helvetica-Bold',ORANGE);arrow(re[0]-4,re[1]-2,cx+8,cy+7,ORANGE) # labels rounded(px+14,py+18,pw-28,55,PALE,r=7) txt(px+25,py+56,'Aim for usable, not “fixed,” geometry:',8.2,'Helvetica-Bold',NAVY) txt(px+25,py+42,'• Separate ports sufficiently to prevent external handle collision.',7.7,'Helvetica',DARK) txt(px+25,py+30,'• Give both instruments a direct, opposing vector to the target.',7.7,'Helvetica',DARK) txt(px+25,py+18,'• Reassess after pneumoperitoneum and patient positioning.',7.7,'Helvetica',DARK) # right safeguards and response rx=563; rw=W-rx-28 rounded(rx,300,rw,206,white,HexColor('#D6E4EA'),10) txt(rx+16,484,'SAFETY GATE: DO NOT PROCEED UNTIL ANSWERED',12.5,'Helvetica-Bold',NAVY) checks=[('ENTRY','Is the first site away from scars, suspected adhesions, enlarged uterus/mass and the operative field?'),('WALL VESSELS','Will secondary ports be inserted under vision, avoiding inferior epigastric vessels?'),('REACH','Can both hands reach the target with elbows near neutral and handles separated?'),('EXPOSURE','Are camera, retraction and patient position sufficient to reveal the intended plane?')] for i,(h,b) in enumerate(checks): yy=448-i*38 c.setFillColor(TEAL);c.circle(rx+24,yy+2,8,fill=1,stroke=0); txt(rx+24,yy-1,'✓',9,'Helvetica-Bold',white,'center') txt(rx+39,yy+4,h,8.2,'Helvetica-Bold',NAVY);wrap(rx+98,yy+4,b,rw-112,7.3,9,GREY) # branch resolve panel rounded(rx,135,rw,145,HexColor('#FFF7EC'),HexColor('#F2CC93'),10) txt(rx+16,254,'IF THE VIEW OR MOVEMENT IS POOR',12.5,'Helvetica-Bold',HexColor('#9A5A15')) branch=[('Clashing / “sword fighting”','Separate ports, alter approach vector or camera distance. Do not persist with crossed handles.'),('Cannot reach target','Reposition patient, improve pneumoperitoneum/exposure, then add a better-placed port if needed.'),('Unsafe anatomy / adhesions / bleeding','Stop, expose, use an alternate site or add a port early. Convert when safe progress is not possible.')] for i,(h,b) in enumerate(branch): yy=224-i*32; c.setFillColor(ORANGE);c.circle(rx+24,yy+2,5,fill=1,stroke=0);txt(rx+37,yy+4,h,8,'Helvetica-Bold',DARK);wrap(rx+37,yy-7,b,rw-52,7.1,8,GREY) # bottom strip rounded(28,52,W-56,61,NAVY,r=9) txt(45,92,'FINAL PAUSE BEFORE INCISION',10,'Helvetica-Bold',white) items=[('TARGET','identified'),('CAMERA','overview + horizon'),('WORKING PORTS','two effective vectors'),('RETRACTION','planned'),('SAFETY','wall vessels + adhesions'),('CONTINGENCY','extra port / convert')] start=215 for i,(a,b) in enumerate(items): xx=start+i*120 c.setFillColor(white);c.circle(xx,83,5,fill=1,stroke=0);txt(xx+10,87,a,7.3,'Helvetica-Bold',white);txt(xx+10,76,b,6.8,'Helvetica',HexColor('#CDE5F0')) # footer badge(28,22,'VIVA POINT',TEAL);txt(111,26,'Triangulation is a target-centred arrangement that permits safe bimanual dissection and effective traction-countertraction.',7.4,'Helvetica',GREY) badge(W-195,22,'SAFETY POINT',RED);txt(W-28,26,'A planned extra port is safer than forced dissection.',7.4,'Helvetica-Bold',RED,'right') txt(28,7,'Educational aid for MS General Surgery seminar. Port sites and distances must be individualised to the patient, target and procedure.',6.4,'Helvetica',GREY) txt(W-28,7,'Sources: Schwartz’s Principles of Surgery, 11e; Sabiston Textbook of Surgery; SAGES guidance on access/port placement.',6.1,'Helvetica',GREY,'right') c.showPage();c.save();print(out) PY
python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/port-placement-algorithm/output/Port_Placement_Master_Algorithm.pdf' r=PdfReader(p) print('pages=',len(r.pages)) text=r.pages[0].extract_text() print('chars=',len(text)) print(text[:2000]) PY
Port Placement Master Algorithm
PDF Document · PDF
Next
laparoscopy AND trocar complications
SAGES guideline trocar injury port site hernia prevention laparoscopic surgery
~/port-placement-algorithm
mkdir -p "/tmp/workspace/port-placement-algorithm/src" "/tmp/workspace/port-placement-algorithm/output" && python - <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape,A4 from reportlab.lib.colors import HexColor,white from reportlab.lib.utils import simpleSplit from reportlab.pdfbase.pdfmetrics import stringWidth out='/tmp/workspace/port-placement-algorithm/output/Trocar_Complications_and_Prevention.pdf' W,H=landscape(A4) NAVY=HexColor('#12324A'); BLUE=HexColor('#167AA8'); TEAL=HexColor('#0B9B8E'); GREEN=HexColor('#4C9A66'); ORANGE=HexColor('#E58A2B'); RED=HexColor('#C7463E'); BG=HexColor('#F5F8FA'); DARK=HexColor('#202C33'); GRAY=HexColor('#586871'); LINE=HexColor('#D7E3E9'); PALE=HexColor('#EAF3F7') c=canvas.Canvas(out,pagesize=(W,H)); c.setTitle('Trocar Complications and Prevention') def txt(x,y,s,size=9,font='Helvetica',color=DARK,align='left'): c.setFont(font,size);c.setFillColor(color) {'left':c.drawString,'center':c.drawCentredString,'right':c.drawRightString}[align](x,y,s) def wrap(x,y,text,w,size=7.1,leading=8.4,color=DARK,font='Helvetica'): lines=simpleSplit(text,font,size,w);c.setFont(font,size);c.setFillColor(color) for i,l in enumerate(lines): c.drawString(x,y-i*leading,l) return y-len(lines)*leading def rr(x,y,w,h,fill,stroke=None,r=7): c.setFillColor(fill);c.setStrokeColor(stroke or fill);c.roundRect(x,y,w,h,r,fill=1,stroke=1 if stroke else 0) def badge(x,y,s,col,w=86): rr(x,y,w,15,col,r=7);txt(x+w/2,y+4,s,7,'Helvetica-Bold',white,'center') c.setFillColor(BG);c.rect(0,0,W,H,fill=1,stroke=0) c.setFillColor(NAVY);c.rect(0,H-58,W,58,fill=1,stroke=0) txt(28,H-27,'TROCAR COMPLICATIONS & PREVENTION',21,'Helvetica-Bold',white) txt(30,H-45,'One-page operating-room checklist: recognise early, control safely, and prevent recurrence',9.3,'Helvetica',HexColor('#D7EDF6')) # header row x=28; widths=[140,172,196,150,127]; headers=['COMPLICATION','WHEN / CLUE','PREVENTION','IMMEDIATE RESPONSE','EXAM PEARL'] y=H-88 for xx,w,h in zip([x,x+140,x+312,x+508,x+658],widths,headers): rr(xx,y,w,23,BLUE,r=4);txt(xx+8,y+7,h,8,'Helvetica-Bold',white) rows=[ ('Major vascular injury','Entry phase. Unexpected brisk bleeding, hypotension, expanding retroperitoneal haematoma.','Choose entry site based on scars/anatomy. Controlled access technique familiar to the surgeon. Do not insert blindly against resistance.','Leave trocar in situ if it may tamponade. Stop, resuscitate, expose. Obtain senior/vascular help and convert early when required.','⚠ Never withdraw the instrument that may be tamponading a major vessel.'), ('Inferior epigastric vessel injury','Secondary lateral port. Bleeding may be hidden by trocar tamponade and appear on port removal.','Insert secondary trocars under vision. Identify/transilluminate wall vessels where feasible; avoid the lateral rectus region.','Direct pressure or balloon/trocar tamponade; laparoscopic or percutaneous suture ligation if ongoing bleeding. Inspect during removal.','⭐ Commonest abdominal-wall vessel injured by lateral trocar placement.'), ('Bowel injury','At entry or adhesiolysis. Gas/feculent contamination, visible defect, unexplained postoperative pain, sepsis.','Modify primary access for scars/adhesion risk. Enter away from prior laparotomy or defect. Maintain direct vision during adhesiolysis.','Recognise immediately, assess injury and contamination. Repair laparoscopically only if exposure and expertise are adequate; otherwise convert.','🚨 Delayed recognition is more dangerous than the access method chosen.'), ('Solid-organ injury','Upper abdominal/left upper quadrant access, distorted anatomy, deep insertion.','Use site appropriate to organ position, patient habitus and previous surgery. Avoid force; visualise trajectory.','Control bleeding, inspect fully, obtain haemostasis. Escalate or convert if instability or poor control.','💡 Port path must be planned in three dimensions, not only on the skin.'), ('Bladder injury','Low midline/suprapubic entry, pelvic surgery. Hematuria, gas in catheter bag, visible defect.','Empty bladder before low ports. Alter port height in pregnancy/mass; use direct vision for secondary ports.','Recognise, define injury, repair and drain according to injury and operative context.','⭐ A full bladder converts a “safe” suprapubic port into a hazard.'), ('Port-site bleeding / haematoma','Wall bleeding after insertion or at removal. Pain, swelling, falling Hb.','Direct-vision secondary ports; avoid visible vessels; inspect wall internally while each port is withdrawn.','Pressure, suture/ligation or port-site exploration if persistent, expanding, or haemodynamically significant.','⚠ End-of-case port removal under vision is a safety step.'), ('Port-site hernia','Early obstruction or late bulge. Risk increases with larger/extended extraction sites, age and high BMI.','Close fascia at larger or enlarged extraction sites using a reliable full-thickness technique; avoid undue fascial stretching.','Assess for obstruction/strangulation. Urgent operative management when incarcerated or obstructed.','⭐ Risk is not determined by diameter alone: extraction-site extension matters.'), ('Wound infection / tumour seeding','Contamination, infected specimen, extraction-site handling, oncologic procedure.','Use protective specimen retrieval; minimise spillage and contamination; maintain standard sterile technique.','Drain/antibiotics/source control as clinically indicated; manage oncologic concern in MDT context.','💡 Prevention begins with specimen handling, not skin closure.')] start=H-119; rowh=50 for i,row in enumerate(rows): yy=start-i*rowh bg=white if i%2==0 else HexColor('#FAFCFD') c.setFillColor(bg);c.setStrokeColor(LINE);c.rect(28,yy-rowh+3,W-56,rowh,fill=1,stroke=1) xx=28 colors=[RED,ORANGE,TEAL,BLUE,NAVY] for j,(cell,w) in enumerate(zip(row,widths)): if j==0: c.setFillColor(colors[0]);c.rect(xx,yy-rowh+3,5,rowh,fill=1,stroke=0) wrap(xx+10,yy-9,cell,w-18,7.8,9.2,NAVY,'Helvetica-Bold') elif j==4: wrap(xx+8,yy-9,cell,w-14,7.0,8.2,GRAY,'Helvetica') else: wrap(xx+8,yy-9,cell,w-14,7.0,8.2,DARK,'Helvetica') xx+=w # bottom rr(28,27,W-56,48,NAVY,r=8) txt(42,58,'CLOSING SEQUENCE',9,'Helvetica-Bold',white) txt(42,43,'Remove ports under vision → release pneumoperitoneum → inspect each tract for bleeding → close indicated fascial defects → document any access concern.',8.2,'Helvetica',HexColor('#D9ECF5')) badge(W-205,43,'SAFETY POINT',RED,82);txt(W-111,47,'Do not force an unsafe port plan.',8.1,'Helvetica-Bold',white) txt(28,10,'Educational summary. Management must be tailored to injury severity, operative visibility, available expertise and patient physiology.',6.2,'Helvetica',GRAY) txt(W-28,10,'Sources: Schwartz’s Principles of Surgery, 11e; Bailey & Love’s Short Practice of Surgery, 28e; SAGES access guidance.',6.1,'Helvetica',GRAY,'right') c.showPage();c.save(); print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/port-placement-algorithm/output/Trocar_Complications_and_Prevention.pdf';r=PdfReader(p) print('pages',len(r.pages),'chars',len(r.pages[0].extract_text())) PY
python - <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape,A4 from reportlab.lib.colors import HexColor,white from reportlab.lib.utils import simpleSplit out='/tmp/workspace/port-placement-algorithm/output/Trocar_Complications_and_Prevention.pdf' W,H=landscape(A4) NAVY=HexColor('#12324A'); BLUE=HexColor('#167AA8'); TEAL=HexColor('#0B9B8E'); ORANGE=HexColor('#E58A2B'); RED=HexColor('#C7463E'); BG=HexColor('#F5F8FA'); DARK=HexColor('#202C33'); GRAY=HexColor('#586871'); LINE=HexColor('#D7E3E9') c=canvas.Canvas(out,pagesize=(W,H)); c.setTitle('Trocar Complications and Prevention') def txt(x,y,s,size=9,font='Helvetica',color=DARK,align='left'): c.setFont(font,size); c.setFillColor(color) {'left':c.drawString,'center':c.drawCentredString,'right':c.drawRightString}[align](x,y,s) def wrap(x,y,text,w,size=7.1,leading=8.4,color=DARK,font='Helvetica'): lines=simpleSplit(text,font,size,w); c.setFont(font,size); c.setFillColor(color) for i,l in enumerate(lines): c.drawString(x,y-i*leading,l) return y-len(lines)*leading def rr(x,y,w,h,fill,stroke=None,r=7): c.setFillColor(fill); c.setStrokeColor(stroke or fill); c.roundRect(x,y,w,h,r,fill=1,stroke=1 if stroke else 0) def badge(x,y,s,col,w=86): rr(x,y,w,15,col,r=7); txt(x+w/2,y+4,s,7,'Helvetica-Bold',white,'center') c.setFillColor(BG); c.rect(0,0,W,H,fill=1,stroke=0) c.setFillColor(NAVY); c.rect(0,H-58,W,58,fill=1,stroke=0) txt(28,H-27,'TROCAR COMPLICATIONS & PREVENTION',21,'Helvetica-Bold',white) txt(30,H-45,'One-page operating-room checklist: recognise early, control safely, and prevent recurrence',9.3,'Helvetica',HexColor('#D7EDF6')) x=28; widths=[140,172,196,150,127]; xpos=[x,x+140,x+312,x+508,x+658] y=H-88; headers=['COMPLICATION','WHEN / CLUE','PREVENTION','IMMEDIATE RESPONSE','EXAM PEARL'] for xx,w,h in zip(xpos,widths,headers): rr(xx,y,w,23,BLUE,r=4); txt(xx+8,y+7,h,8,'Helvetica-Bold',white) rows=[ ('Major vascular injury','Entry phase. Unexpected brisk bleeding, hypotension, expanding retroperitoneal haematoma.','Choose entry site based on scars/anatomy. Controlled access technique familiar to the surgeon. Do not insert blindly against resistance.','Leave trocar in situ if it may tamponade. Stop, resuscitate, expose. Obtain senior/vascular help and convert early when required.','Never withdraw an instrument that may be tamponading a major vessel.'), ('Inferior epigastric vessel injury','Secondary lateral port. Bleeding may be hidden by trocar tamponade and appear on port removal.','Insert secondary trocars under vision. Identify/transilluminate wall vessels where feasible; avoid the lateral rectus region.','Direct pressure or balloon/trocar tamponade; laparoscopic or percutaneous suture ligation if ongoing bleeding. Inspect during removal.','Commonest abdominal-wall vessel injured by lateral trocar placement.'), ('Bowel injury','At entry or adhesiolysis. Gas/feculent contamination, visible defect, unexplained postoperative pain or sepsis.','Modify primary access for scars/adhesion risk. Enter away from prior laparotomy or defect. Maintain direct vision during adhesiolysis.','Recognise immediately, assess injury and contamination. Repair laparoscopically only if exposure and expertise are adequate; otherwise convert.','Delayed recognition is more dangerous than the access method chosen.'), ('Solid-organ injury','Upper abdominal/left upper quadrant access, distorted anatomy or deep insertion.','Use site appropriate to organ position, habitus and previous surgery. Avoid force; visualise trajectory.','Control bleeding, inspect fully, obtain haemostasis. Escalate or convert if instability or poor control.','Port path must be planned in three dimensions, not only on the skin.'), ('Bladder injury','Low midline/suprapubic entry, pelvic surgery. Haematuria, gas in catheter bag, visible defect.','Empty bladder before low ports. Alter port height in pregnancy/mass; use direct vision for secondary ports.','Recognise, define injury, repair and drain according to injury and operative context.','A full bladder converts a “safe” suprapubic port into a hazard.'), ('Port-site bleeding / haematoma','Wall bleeding after insertion or at removal. Pain, swelling or falling Hb.','Direct-vision secondary ports; avoid visible vessels; inspect wall internally while each port is withdrawn.','Pressure, suture/ligation or port-site exploration if persistent, expanding, or haemodynamically significant.','End-of-case port removal under vision is a safety step.'), ('Port-site hernia','Early obstruction or late bulge. Risk rises with larger/extended extraction sites, age and high BMI.','Close fascia at larger or enlarged extraction sites using a reliable full-thickness technique; avoid undue fascial stretching.','Assess for obstruction/strangulation. Urgent operative management when incarcerated or obstructed.','Risk is not determined by diameter alone: extraction-site extension matters.'), ('Wound infection / tumour seeding','Contamination, infected specimen, extraction-site handling, oncologic procedure.','Use protective specimen retrieval; minimise spillage and contamination; maintain standard sterile technique.','Drain/antibiotics/source control as clinically indicated; manage oncologic concern in MDT context.','Prevention begins with specimen handling, not skin closure.')] start=H-119; rowh=50 for i,row in enumerate(rows): yy=start-i*rowh; bg=white if i%2==0 else HexColor('#FAFCFD') c.setFillColor(bg); c.setStrokeColor(LINE); c.rect(28,yy-rowh+3,W-56,rowh,fill=1,stroke=1) xx=28 for j,(cell,w) in enumerate(zip(row,widths)): if j==0: c.setFillColor(RED); c.rect(xx,yy-rowh+3,5,rowh,fill=1,stroke=0) wrap(xx+10,yy-9,cell,w-18,7.8,9.2,NAVY,'Helvetica-Bold') elif j==4: wrap(xx+8,yy-9,cell,w-14,7.0,8.2,GRAY,'Helvetica') else: wrap(xx+8,yy-9,cell,w-14,7.0,8.2,DARK,'Helvetica') xx+=w rr(28,27,W-56,48,NAVY,r=8) txt(42,58,'CLOSING SEQUENCE',9,'Helvetica-Bold',white) txt(42,43,'Remove ports under vision → release pneumoperitoneum → inspect each tract for bleeding → close indicated fascial defects → document any access concern.',8.2,'Helvetica',HexColor('#D9ECF5')) badge(W-205,43,'SAFETY POINT',RED,82); txt(W-111,47,'Do not force an unsafe port plan.',8.1,'Helvetica-Bold',white) txt(28,10,'Educational summary. Management must be tailored to injury severity, operative visibility, available expertise and patient physiology.',6.2,'Helvetica',GRAY) txt(W-28,10,'Sources: Schwartz’s Principles of Surgery, 11e; Bailey & Love’s Short Practice of Surgery, 28e; SAGES access guidance.',6.1,'Helvetica',GRAY,'right') c.showPage(); c.save(); print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/port-placement-algorithm/output/Trocar_Complications_and_Prevention.pdf'; r=PdfReader(p); t=r.pages[0].extract_text(); print('pages',len(r.pages),'chars',len(t)); print(t[:350]) PY
Trocar Complications and Prevention
PDF Document · PDF
Next
laparoscopy AND trocar placement
SAGES laparoscopic access port placement Palmer's point inferior epigastric vessels guidelines
python - <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape,A4 from reportlab.lib.colors import HexColor,white from reportlab.lib.utils import simpleSplit out='/tmp/workspace/port-placement-algorithm/output/Viva_Rapid_Fire_Port_Placement.pdf' W,H=landscape(A4) NAVY=HexColor('#12324A'); BLUE=HexColor('#167AA8'); TEAL=HexColor('#0B9B8E'); ORANGE=HexColor('#E58A2B'); RED=HexColor('#C7463E'); BG=HexColor('#F5F8FA'); DARK=HexColor('#202C33'); GRAY=HexColor('#586871'); LINE=HexColor('#D7E3E9'); PALE=HexColor('#EAF3F7') c=canvas.Canvas(out,pagesize=(W,H));c.setTitle('Viva Rapid-Fire: Port Placement in Laparoscopic Surgery') def txt(x,y,s,size=9,font='Helvetica',color=DARK,align='left'): c.setFont(font,size);c.setFillColor(color);{'left':c.drawString,'center':c.drawCentredString,'right':c.drawRightString}[align](x,y,s) def lines(text,font,size,w):return simpleSplit(text,font,size,w) def wrap(x,y,text,w,size=7.3,leading=8.6,color=DARK,font='Helvetica'): c.setFont(font,size);c.setFillColor(color) for i,l in enumerate(lines(text,font,size,w)):c.drawString(x,y-i*leading,l) def rr(x,y,w,h,fill,stroke=None,r=7): c.setFillColor(fill);c.setStrokeColor(stroke or fill);c.roundRect(x,y,w,h,r,fill=1,stroke=1 if stroke else 0) def qcard(x,y,w,h,n,q,a,tag,tagcol): rr(x,y,w,h,white,LINE,7); rr(x,y+h-20,28,20,tagcol,r=7);txt(x+14,y+h-14,str(n),8,'Helvetica-Bold',white,'center') txt(x+37,y+h-14,q,8.2,'Helvetica-Bold',NAVY) wrap(x+12,y+h-33,a,w-24,7.05,8.0,GRAY) rr(x+w-72,y+7,62,13,tagcol,r=6);txt(x+w-41,y+10,tag,6.1,'Helvetica-Bold',white,'center') # base c.setFillColor(BG);c.rect(0,0,W,H,fill=1,stroke=0);c.setFillColor(NAVY);c.rect(0,H-58,W,58,fill=1,stroke=0) txt(28,H-27,'VIVA RAPID-FIRE: PORT PLACEMENT',21,'Helvetica-Bold',white) txt(30,H-45,'Short answers for MS General Surgery practical and seminar examination',9.2,'Helvetica',HexColor('#D7EDF6')) # cards 3 col x4 questions=[ ('State the core principle of port placement.','Plan from the operative target outward: target → camera view → bimanual working vectors → retraction → contingency port. Sites are individualised to anatomy and procedure.','CORE',TEAL), ('What is triangulation?','A target-centred configuration in which the camera and two working instruments approach the operative field through separate, useful vectors for bimanual dissection and traction-countertraction.','CORE',TEAL), ('What causes instrument “sword fighting”?','Ports that are too close, parallel or wrongly angled; camera too near; crossed external handles; or an approach not centred on the target. Reposition or add a port rather than persist.','ERROR',ORANGE), ('How do you choose the camera port?','Choose an entry site that is safe and gives an overview of the target, permits scope navigation and maintains the horizon. Camera location may differ from the umbilicus in scars, obesity or upper/lower target surgery.','CAMERA',BLUE), ('When is a 30° scope useful?','When looking over or around structures, working in upper abdomen or pelvis, or changing viewing direction without moving the camera port. Maintain orientation by deliberately preserving the horizon.','CAMERA',BLUE), ('What determines working-port distance?','Target depth, patient size, wall thickness, instrument length, need for reach and avoidance of external handle collision. Avoid quoting a fixed distance as universally correct.','PEARL',TEAL), ('How are secondary ports inserted safely?','After pneumoperitoneum, under direct intraperitoneal vision, with assessment of scars/adhesions and abdominal-wall vessels. Check the port trajectory and future instrument vector before insertion.','SAFETY',RED), ('Where is the inferior epigastric vessel at risk?','During lateral lower-abdominal trocar placement, particularly near the lateral rectus region. It is a common abdominal-wall vessel injury with secondary cannula insertion.','ANATOMY',BLUE), ('How do you avoid inferior epigastric injury?','Place secondary ports under vision, inspect/transilluminate the abdominal wall where feasible, know rectus anatomy, and avoid visible vessel pathways. Inspect during trocar withdrawal.','SAFETY',RED), ('Name alternative primary access options.','Open Hasson, Veress, optical and direct trocar approaches are options. Choice depends on surgeon experience, patient anatomy, prior surgery and intended operation.','ACCESS',ORANGE), ('When might Palmer’s point be considered?','When umbilical access is undesirable because of midline scars, anticipated periumbilical adhesions or some ventral hernias. Exclude contraindications such as relevant LUQ pathology or splenomegaly.','ACCESS',ORANGE), ('What changes in obesity?','Landmarks may be obscured and wall thickness increased. Plan a higher camera viewpoint if needed, wider spacing, longer instruments and an ergonomic monitor/surgeon position.','SPECIAL',TEAL), ('What changes after prior laparotomy?','Review scars and operative records, anticipate adhesions, avoid scarred entry where feasible, choose an alternative site and consider open access. Insert later ports only under direct vision.','SPECIAL',TEAL), ('Which ports require fascial closure?','Close larger and enlarged extraction-site fascial defects reliably. Decisions for smaller sites should account for enlargement, patient risk factors and local technique.','HERNIA',ORANGE), ('When should an extra port be added?','For inadequate exposure, bleeding control, adhesions, obesity, difficult anatomy or an unsafe working angle. A planned additional port is safer than forced dissection.','SAFETY',RED), ('What is the safe port-removal sequence?','Remove ports under vision, inspect for bleeding, release pneumoperitoneum, close indicated fascial defects and skin, and document access concerns or injuries.','CLOSURE',BLUE), ] xs=[28,294,560]; cw=247; ch=89; y0=H-86 for i,(q,a,t,co) in enumerate(questions): col=i%3;row=i//3; qcard(xs[col],y0-row*(ch+8)-ch,cw,ch,i+1,q,a,t,co) # footer rr(28,16,W-56,20,NAVY,r=7);txt(41,23,'VIVA CLOSER:',7.5,'Helvetica-Bold',white);txt(117,23,'“Port placement is not a fixed recipe. It is target-centred geometry, safe access and surgeon ergonomics adapted to the patient.”',7.5,'Helvetica',HexColor('#D8ECF6')) txt(W-28,4,'Sources: Schwartz’s Principles of Surgery, 11e; Bailey & Love’s Short Practice of Surgery, 28e; Sabiston Textbook of Surgery; SAGES guidance.',5.8,'Helvetica',GRAY,'right') c.showPage();c.save();print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/port-placement-algorithm/output/Viva_Rapid_Fire_Port_Placement.pdf';r=PdfReader(p);t=r.pages[0].extract_text();print('pages=',len(r.pages),' chars=',len(t));print(t[:600]) PY
Viva Rapid Fire Port Placement
PDF Document · PDF
Next make all content in one pdf
~/port-placement-algorithm/output
python - <<'PY' from pypdf import PdfReader, PdfWriter from pathlib import Path base=Path('/tmp/workspace/port-placement-algorithm/output') inputs=[ base/'Port_Placement_Master_Algorithm.pdf', base/'Trocar_Complications_and_Prevention.pdf', base/'Viva_Rapid_Fire_Port_Placement.pdf', ] out=base/'Port_Placement_Seminar_Quick_Reference_Complete.pdf' writer=PdfWriter() for path in inputs: reader=PdfReader(str(path)) for page in reader.pages: writer.add_page(page) writer.add_metadata({ '/Title':'Port Placement in Laparoscopic Surgery: Seminar Quick Reference', '/Subject':'Master algorithm, trocar complications and prevention, and viva rapid-fire questions', '/Author':'Orris', }) with open(out,'wb') as f: writer.write(f) print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/port-placement-algorithm/output/Port_Placement_Seminar_Quick_Reference_Complete.pdf' r=PdfReader(p) print('pages=',len(r.pages)) for i,page in enumerate(r.pages,1): text=page.extract_text() or '' print(i, len(text), text.splitlines()[0] if text else '[no text]') print('metadata=',r.metadata.title) PY
Port Placement Seminar Quick Reference Complete
PDF Document · PDF
I mean to say make complete content whichever is remaining for port placement and than combine all and give me one pdf
laparoscopy AND trocar placement
SAGES guideline laparoscopic access trocar port placement pregnancy ventral hernia
~/port-placement-algorithm
mkdir -p "/tmp/workspace/port-placement-algorithm/src" "/tmp/workspace/port-placement-algorithm/output" && cat > "/tmp/workspace/port-placement-algorithm/src/create_complete_seminar.py" <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape, A4 from reportlab.lib.colors import HexColor, white from reportlab.lib.utils import simpleSplit from math import atan2, cos, sin from pathlib import Path OUT=Path('/tmp/workspace/port-placement-algorithm/output/Complete_Port_Placement_in_Laparoscopic_Surgery_Seminar.pdf') W,H=landscape(A4) NAVY=HexColor('#10324A'); BLUE=HexColor('#177BA8'); TEAL=HexColor('#078F86'); GREEN=HexColor('#4D9965'); ORANGE=HexColor('#E48A2D'); RED=HexColor('#C84843'); PURPLE=HexColor('#7857A7'); BG=HexColor('#F6F9FB'); DARK=HexColor('#1D2B33'); GRAY=HexColor('#5D6C74'); LINE=HexColor('#D6E2E8'); PALE=HexColor('#EAF3F7'); YELLOW=HexColor('#FFF3D8') c=canvas.Canvas(str(OUT),pagesize=(W,H)); c.setTitle('Port Placement in Laparoscopic Surgery - MS General Surgery Seminar') # helpers def txt(x,y,s,size=10,font='Helvetica',col=DARK,align='left'): c.setFont(font,size); c.setFillColor(col) if align=='center': c.drawCentredString(x,y,s) elif align=='right': c.drawRightString(x,y,s) else: c.drawString(x,y,s) def wrap(x,y,s,w,size=9,lead=11,col=DARK,font='Helvetica'): ls=simpleSplit(s,font,size,w); c.setFont(font,size); c.setFillColor(col) for i,line in enumerate(ls): c.drawString(x,y-i*lead,line) return y-len(ls)*lead def rr(x,y,w,h,fill,stroke=None,r=8): c.setFillColor(fill); c.setStrokeColor(stroke or fill); c.roundRect(x,y,w,h,r,fill=1,stroke=1 if stroke else 0) def bullet(x,y,s,w=330,col=DARK): c.setFillColor(BLUE); c.circle(x+3,y+3,3,fill=1,stroke=0); return wrap(x+13,y,s,w-13,10,12,col) def arrow(x1,y1,x2,y2,col=BLUE,lw=1.8): c.setStrokeColor(col);c.setFillColor(col);c.setLineWidth(lw);c.line(x1,y1,x2,y2) a=atan2(y2-y1,x2-x1); L=8 p=c.beginPath();p.moveTo(x2,y2);p.lineTo(x2-L*cos(a-.5),y2-L*sin(a-.5));p.lineTo(x2-L*cos(a+.5),y2-L*sin(a+.5));p.close();c.drawPath(p,fill=1,stroke=0) def pill(x,y,label,col,w=None): w=w or (len(label)*5.2+16);rr(x,y,w,16,col,r=8);txt(x+w/2,y+4,label,7,'Helvetica-Bold',white,'center');return w def page(title,kicker='',note=''): c.setFillColor(BG);c.rect(0,0,W,H,fill=1,stroke=0) c.setFillColor(NAVY);c.rect(0,H-55,W,55,fill=1,stroke=0) txt(28,H-26,title,19,'Helvetica-Bold',white) txt(30,H-43,kicker,8.7,'Helvetica',HexColor('#D6EAF3')) c.setStrokeColor(LINE);c.setLineWidth(.7);c.line(28,39,W-28,39) txt(28,20,'SPEAKER NOTE:',6.8,'Helvetica-Bold',TEAL) wrap(98,20,note,W-130,6.8,8,GRAY) def endpage(n): txt(W-30,20,f'{n} / 35',7.5,'Helvetica-Bold',GRAY,'right'); c.showPage() def card(x,y,w,h,title,body,col=BLUE,tag=None): rr(x,y,w,h,white,LINE,9);c.setFillColor(col);c.roundRect(x,y,w,8,5,fill=1,stroke=0) txt(x+13,y+h-20,title,10,'Helvetica-Bold',NAVY) wrap(x+13,y+h-37,body,w-25,8.4,10,GRAY) if tag: pill(x+w-84,y+12,tag,col,72) def abdomen(cx,cy,scale=1, target=None, ports=None, labels=True, surgeon=None): # topographic body, head at top, patient right = left of viewer c.setStrokeColor(HexColor('#B9CDD7'));c.setLineWidth(1.3) c.ellipse(cx-105*scale,cy-135*scale,cx+105*scale,cy+135*scale,fill=0,stroke=1) c.setStrokeColor(HexColor('#D7E4E9'));c.line(cx,cy-120*scale,cx,cy+120*scale) txt(cx,cy+146*scale,'HEAD',6.5,'Helvetica-Bold',GRAY,'center') if target: tx,ty,name=target;c.setFillColor(RED);c.circle(cx+tx*scale,cy+ty*scale,9*scale,fill=1,stroke=0);txt(cx+tx*scale,cy+ty*scale-2.5*scale,'T',6*scale,'Helvetica-Bold',white,'center'); if labels: txt(cx+tx*scale+12*scale,cy+ty*scale-2*scale,name,7*scale,'Helvetica-Bold',RED) if ports: cmap={'camera':BLUE,'work':GREEN,'retract':ORANGE,'assist':PURPLE} lmap={'camera':'C','work':'W','retract':'R','assist':'A'} for px,py,typ,lab in ports: X,Y=cx+px*scale,cy+py*scale;c.setFillColor(cmap[typ]);c.circle(X,Y,7*scale,fill=1,stroke=0);txt(X,Y-2.5*scale,lmap[typ],6*scale,'Helvetica-Bold',white,'center') if labels and lab: txt(X+9*scale,Y-2*scale,lab,6.4*scale,'Helvetica-Bold',cmap[typ]) if target and typ in ['work','retract','camera']: tx,ty,_=target;arrow(X,Y,cx+tx*scale,cy+ty*scale,cmap[typ],1) if surgeon: pos,label=surgeon; txt(cx+pos[0]*scale,cy+pos[1]*scale,label,7*scale,'Helvetica-Bold',NAVY,'center') def tagbox(x,y,label,text,col): pill(x,y+39,label,col,90);rr(x,y,260,35,HexColor('#FFFFFF'),LINE,7);wrap(x+8,y+19,text,244,7.3,8.5,GRAY) # 1 page('PORT PLACEMENT IN LAPAROSCOPIC SURGERY','Operative Orientation, Practical Principles, Ergonomics & Troubleshooting','Set the expectation: this seminar is about planning and executing safe access, not memorising a fixed port recipe.') txt(42,395,'MS GENERAL SURGERY POSTGRADUATE SEMINAR',13,'Helvetica-Bold',TEAL) txt(42,362,'Target-centred geometry. Safe access. Effective bimanual surgery.',18,'Helvetica-Bold',NAVY) rr(42,175,410,145,white,LINE,12) wrap(65,285,'Use this deck to plan, place and use ports in real operating-room situations, including obesity, scars, adhesions and unexpected difficulty.',360,13,17,DARK,'Helvetica') pill(65,205,'CAMERA',BLUE);pill(150,205,'WORKING PORTS',GREEN,110);pill(275,205,'RETRACTION',ORANGE,94) abdomen(650,290,1.15,(0,20,'OPERATIVE TARGET'),[(-10,80,'camera','camera'),(-70,-35,'work','left hand'),(70,-35,'work','dominant hand'),(85,42,'retract','retraction')]) txt(42,94,'Name: ____________________ Department: ____________________ Institution: ____________________',10,'Helvetica',GRAY) endpage(1) # 2 page('LEARNING OBJECTIVES','What the postgraduate surgeon should be able to do','Ask the group to map each procedure they know to the same target-camera-working-port-retraction sequence.') objs=['Apply target-oriented principles to choose camera, working, assistant and retraction ports.','Create practical triangulation, reach, traction-countertraction and a safe angle of dissection.','Select and modify entry and port sites for obesity, scars, adhesions, pregnancy and distorted anatomy.','Avoid abdominal-wall vessels, visceral injury, instrument collision and poor ergonomics.','Troubleshoot poor visualization, inadequate reach and clashing without unsafe persistence.'] y=420 for i,o in enumerate(objs): card(50,y-i*65,690,50,f'{i+1:02d}',o,[BLUE,TEAL,GREEN,ORANGE,PURPLE][i]) endpage(2) # 3 page('WHY PORT PLACEMENT MATTERS','Port position determines the quality and safety of every laparoscopic movement','Use the two diagrams to show why “able to reach” is not the same as “able to operate”.') card(40,330,270,105,'OPTIMAL','Target is centred; camera sees the plane; both instruments reach with separated handles and opposing vectors.',GREEN,'EFFICIENT') card(40,195,270,105,'POOR CONFIGURATION','Camera too close or off-axis, ports too close or parallel: loss of exposure, fencing and awkward traction.',RED,'RISK') # geometry diagrams abdomen(540,337,.72,(0,15,'TARGET'),[(0,85,'camera',''),(-70,-35,'work',''),(70,-35,'work','')],False) abdomen(740,237,.72,(0,15,'TARGET'),[(0,55,'camera',''),(-25,-28,'work',''),(25,-28,'work','')],False) arrow(605,315,690,270,RED,2);txt(650,325,'wide, useful vectors',8,'Helvetica-Bold',GREEN,'center') txt(740,141,'crowding • poor angle • fatigue • longer operating time',9,'Helvetica-Bold',RED,'center') endpage(3) # 4 page('FUNDAMENTAL PRINCIPLES','The seven questions to answer before the first incision','Avoid quoting any single number as a universal rule. Geometry is constrained by target depth, patient size and instrument length.') principles=[('TARGET-ORIENTED','Begin with organ and intended dissection plane, not the umbilicus.'),('TRIANGULATION','Camera plus two useful working vectors around the target.'),('ALIGNMENT','Camera, target and monitor should support an intuitive line of action.'),('WORKING ANGLE','Make traction and dissection possible without crossed or forced wrists.'),('CAMERA VIEW','Stable horizon; appropriate scope angle; enough distance to see the next move.'),('PORT ROLES','Dominant hand, nondominant hand, assistant and retraction each need a purpose.'),('SPACE','Prevent handle collision externally and instrument collision internally.')] for i,(a,b) in enumerate(principles): x=45+(i%2)*365;y=420-(i//2)*78 card(x,y,340,61,a,b,[BLUE,TEAL,GREEN,ORANGE,PURPLE,BLUE,TEAL][i]) endpage(4) #5 page('SURGICAL TARGET & PORT PLANNING','Reusable pre-incision sequence: TARGET → CAMERA → WORKING PORTS → ASSISTANT → RETRACTION','Demonstrate planning on the skin before draping, then reassess after insufflation and positioning.') steps=[('1. TARGET','Define target, dissection plane, specimen route and expected difficult step.'),('2. CAMERA','Choose the viewpoint that provides overview and preserves orientation.'),('3. WORKING PORTS','Place bimanual vectors centred on the target; assign dominant hand.'),('4. ASSISTANT','Plan suction, exposure or tissue handling without blocking the surgeon.'),('5. RETRACTION','Create the vector that exposes the operative plane.'),('6. CONTINGENCY','Mark a safe extra-port option before difficulty develops.')] for i,(a,b) in enumerate(steps): x=38+i%3*252;y=390-(i//3)*160;card(x,y,225,120,a,b,[TEAL,BLUE,GREEN,PURPLE,ORANGE,RED][i]) if i<5: arrow(x+225,y+60,x+245,y+60,BLUE) endpage(5) #6 page('OPERATIVE GEOMETRY','Triangulation, azimuth, elevation and the fulcrum effect','The wall is a fulcrum: external hand movement is amplified and reversed internally. Keep the monitor and camera horizon stable.') abdomen(265,300,.92,(0,12,'TARGET'),[(0,82,'camera','camera'),(-80,-35,'work','nondominant'),(80,-35,'work','dominant')]) card(485,400,280,60,'AZIMUTH','Horizontal separation of the instruments around the target.',BLUE) card(485,322,280,60,'ELEVATION','Vertical relationship of ports to target and dissection plane.',TEAL) card(485,244,280,60,'FULCRUM','At the abdominal wall, external handle motion produces opposite internal tip motion.',ORANGE) card(485,166,280,60,'2D VIEW','Depth is inferred from movement, shadow, tissue planes and instrument convergence.',PURPLE) endpage(6) #7 page('CAMERA PORT','Entry site, scope angle and orientation establish the operation’s “eye”','A 30° telescope can look over or around structures, but only if the operator maintains horizon and anticipates the next view.') card(40,350,330,100,'CHOOSING THE VIEWPOINT','Place the camera to show the target and the next operative step, not merely the first structure encountered.',BLUE,'VIEW') card(40,225,330,100,'0° vs 30°','0°: intuitive straight-ahead view. 30°: look up/down or around a target without moving the port; rotate deliberately and maintain horizon.',TEAL,'SCOPE') card(40,100,330,100,'NAVIGATION','Advance for precision, withdraw for orientation, clean/fog-proof lens, and avoid operating with camera too close to the target.',ORANGE,'CONTROL') # camera ray c.setStrokeColor(LINE);c.setLineWidth(1);c.ellipse(510,140,790,455,fill=0,stroke=1) c.setFillColor(RED);c.circle(650,270,13,fill=1,stroke=0);txt(650,265,'TARGET',6.5,'Helvetica-Bold',white,'center') c.setFillColor(BLUE);c.circle(650,420,10,fill=1,stroke=0);arrow(650,410,650,284,BLUE,2);txt(665,417,'camera port',9,'Helvetica-Bold',BLUE) arrow(560,350,640,278,TEAL,2);txt(530,355,'30° look-around',8,'Helvetica-Bold',TEAL) endpage(7) #8 page('WORKING PORTS','Bimanual dissection begins with purposeful port roles','The dominant-hand port often benefits from the more direct line for precise dissection or energy. Adapt to the planned critical step.') card(40,365,330,95,'DOMINANT-HAND PORT','Prioritise reach, precision and safe angle for dissection, clipping, suturing or stapling.',GREEN,'RIGHT/LEFT') card(40,245,330,95,'NONDOMINANT PORT','Plan for traction-countertraction. It should expose the plane, not merely hold tissue.',TEAL,'TRACTION') card(40,125,330,95,'ASSISTANT PORT','For suction, retraction or additional exposure. Avoid a port that blocks the surgeon’s external handles.',PURPLE,'ASSIST') abdomen(635,290,.98,(0,18,'TARGET'),[(0,95,'camera','overview'),(-80,-36,'work','traction'),(78,-36,'work','dominant'),(94,50,'assist','suction')]) endpage(8) #9 page('PORT DISTANCE & WORKING ANGLE','Use practical ranges, but individualise the geometry','Textbooks describe port separation to limit collision, but exact spacing must change with habitus, target and device length.') card(45,370,340,105,'TOO CLOSE','External handles collide; internal tips lack separation; manipulation becomes crossed or parallel.',RED,'SUBOPTIMAL') card(45,235,340,105,'TOO FAR','Loss of reach and precision; excessive shoulder abduction; difficult energy application or suturing.',ORANGE,'SUBOPTIMAL') card(45,100,340,105,'USEFUL ZONE','Separated handles, comfortable elbows, direct instrument vectors and enough camera distance to see the planned step.',GREEN,'OPTIMAL') # angles for x,col,lab,ang in [(520,RED,'TOO NARROW',24),(650,GREEN,'USEFUL',55),(780,ORANGE,'TOO WIDE',95)]: c.setFillColor(RED);c.circle(x,220,8,fill=1,stroke=0) arrow(x-70,130,x,212,col,2);arrow(x+70,130,x,212,col,2);txt(x,103,lab,8,'Helvetica-Bold',col,'center') endpage(9) #10 page('ERGONOMICS OF LAPAROSCOPIC PORT PLACEMENT','The port map must fit the surgeon, monitor and patient position','Poor ergonomics causes loss of precision before it causes pain. Make an ergonomic correction early.') # OR diagram rr(70,160,350,250,white,LINE,12);txt(245,387,'ERGONOMIC OR SET-UP',12,'Helvetica-Bold',NAVY,'center') rr(185,220,120,110,PALE,BLUE,10);txt(245,271,'PATIENT',11,'Helvetica-Bold',NAVY,'center') rr(470,290,130,62,HexColor('#233B4A'),None,6);txt(535,315,'MONITOR',10,'Helvetica-Bold',white,'center') rr(75,260,85,55,HexColor('#E8F2F4'),TEAL,7);txt(117,282,'SURGEON',9,'Helvetica-Bold',NAVY,'center') rr(330,260,85,55,HexColor('#F8F0E8'),ORANGE,7);txt(372,282,'ASSIST.',9,'Helvetica-Bold',NAVY,'center') arrow(160,288,185,280,TEAL);arrow(415,288,305,280,ORANGE);arrow(305,300,470,320,BLUE) card(470,210,290,62,'NEUTRAL POSTURE','Monitor in line with visual axis; elbows near the torso; wrists neutral; avoid sustained shoulder abduction.',TEAL) card(470,130,290,62,'PREVENT CLASHING','Wider external separation, patient repositioning or an extra port is preferable to crossed handles.',ORANGE) endpage(10) #11 page('ABDOMINAL-WALL ANATOMY FOR PORTS','Know the layers and the vessels before inserting a secondary trocar','Emphasise that lateral ports should be placed under direct vision with awareness of the rectus and inferior epigastric course.') # layers diagram layers=['Skin','Subcutaneous tissue','Anterior rectus sheath','Rectus muscle','Posterior sheath*','Transversalis fascia','Preperitoneal tissue','Peritoneum'] for i,l in enumerate(layers): y=425-i*37;c.setFillColor([HexColor('#F7D9C9'),HexColor('#F5E9B9'),HexColor('#E9E7E0'),HexColor('#D98C88'),HexColor('#E9E7E0'),HexColor('#D9E7EF'),HexColor('#F1E6D2'),HexColor('#BEDAE1')][i]);c.rect(55,y,280,30,fill=1,stroke=0);txt(68,y+10,l,9,'Helvetica-Bold',NAVY) txt(55,115,'*Posterior rectus sheath is absent below the arcuate line.',7.3,'Helvetica',GRAY) # vessels rr(410,150,340,290,white,LINE,10);txt(580,417,'VASCULAR MAP: ANTERIOR WALL',12,'Helvetica-Bold',NAVY,'center') c.setFillColor(HexColor('#F9EFEA'));c.ellipse(485,185,675,390,fill=1,stroke=0) c.setStrokeColor(RED);c.setLineWidth(4);c.line(560,200,540,365);c.line(600,200,620,365);txt(470,330,'inferior epigastric',8,'Helvetica-Bold',RED) c.setStrokeColor(ORANGE);c.setLineWidth(2);c.line(500,205,540,220);c.line(660,205,620,220);txt(494,190,'deep circumflex iliac',7,'Helvetica-Bold',ORANGE) pill(425,165,'SAFETY POINT',RED,90);txt(525,169,'Avoid blind lateral insertion near the rectus border.',8,'Helvetica-Bold',RED) endpage(11) #12 page('SAFE PORT ENTRY','No technique is universally superior: choose the method and site for the patient and the surgeon','The safe method is the one used with appropriate patient selection, correct technique, vigilance and readiness to manage injury.') items=[('VERESS NEEDLE','Closed insufflation. Familiar and fast; confirmation is indirect; risk in adhesions or distorted anatomy.'),('OPEN / HASSON','Layered direct entry. Useful when access risk is higher; may be slower and can leak gas.'),('OPTICAL TROCAR','Visualised tissue-layer entry. Requires controlled technique and a suitable visual field.'),('DIRECT TROCAR','Rapid entry in selected hands; relies on correct site, controlled force and recognition of risk.')] for i,(a,b) in enumerate(items): card(45+(i%2)*365,390-(i//2)*150,335,120,a,b,[BLUE,TEAL,GREEN,ORANGE][i],['CLOSED','OPEN','VISUAL','SELECTED'][i]) pill(45,108,'VIVA POINT',TEAL,82);txt(136,112,'Technique selection should be based on surgeon experience, prior surgery, anatomy and the operation, not dogma.',8.3,'Helvetica-Bold',NAVY) endpage(12) #13 page('PRIMARY PORT ENTRY','Umbilical, supraumbilical, infraumbilical and alternative sites','Site selection changes with target, scar pattern, adhesions, obesity, large mass and fundal height.') abdomen(270,292,.95,None,[(0,35,'camera','umbilical'),(0,75,'camera','supraumbilical'),(0,-5,'camera','infraumbilical'),(-70,95,'camera','Palmer’s point')]) card(490,370,275,74,'DEFAULT MIDLINE','Umbilical or modified supra/infraumbilical access if safe and it gives useful overview.',BLUE) card(490,278,275,74,'PALMER’S POINT','Left upper quadrant alternative in selected patients with suspected periumbilical adhesions or midline scars. Consider LUQ contraindications.',TEAL) card(490,186,275,74,'MODIFY FOR PREGNANCY / MASS','Move entry according to fundal height or mass; do not use a routine site blindly.',ORANGE) endpage(13) #14 page('SECONDARY PORTS','Direct vision, vascular awareness and target-centred vectors','After primary access, the laparoscope should guide every secondary trocar. Do not let a pre-marked site override what you see internally.') card(45,385,320,70,'1. LOOK INTERNALLY','Check adhesions, bowel position and safe trajectory.',BLUE) card(45,295,320,70,'2. CHECK THE WALL','Avoid scars and visible/transilluminated vessels; remember inferior epigastrics.',TEAL) card(45,205,320,70,'3. TEST THE VECTOR','Position against the skin and simulate reach to the target before entry.',GREEN) card(45,115,320,70,'4. INSERT UNDER VISION','Controlled entry, then confirm the port does not compromise the next step.',ORANGE) abdomen(600,280,1.0,(10,10,'TARGET'),[(0,90,'camera',''),(-80,-25,'work','direct view'),(75,-25,'work','direct view')]) pill(440,125,'SAFETY POINT',RED,90);wrap(540,129,'Secondary ports are not “minor” ports. Most wall-vessel injury occurs during their placement.',210,8,9,RED,'Helvetica-Bold') endpage(14) #15 page('COMMON PORT POSITIONS','Use landmarks as a vocabulary, not as a recipe','Position names describe the surface. The actual site must still satisfy safety, reach and triangulation.') abdomen(310,292,1.08,None,[(0,34,'camera','umbilical'),(0,80,'work','epigastric'),(-62,93,'work','L hypochondrium'),(62,93,'work','R hypochondrium'),(-85,0,'work','L lumbar'),(85,0,'work','R lumbar'),(-58,-66,'work','L iliac fossa'),(58,-66,'work','R iliac fossa'),(0,-82,'assist','suprapubic')]) card(530,354,230,88,'UPPER ABDOMEN','Epigastric and hypochondrial ports for hepatobiliary, gastric and splenic work.',ORANGE) card(530,246,230,88,'MID-ABDOMEN','Lumbar/lateral ports create reach for colon, ventral hernia and renal targets.',TEAL) card(530,138,230,88,'PELVIS','Iliac fossa and suprapubic ports give deep pelvic reach and lower camera working angles.',BLUE) endpage(15) # operation helper def op_slide(n,title,subtitle,target,ports,position,setup,pearls): page(title,subtitle,f'For {title.lower()}, explain why each port is placed for a specific vector. These diagrams are representative and require patient-specific modification.') abdomen(285,285,1.03,target,ports,True) rr(490,330,270,95,white,LINE,9);txt(505,402,'TEAM & PATIENT',10,'Helvetica-Bold',NAVY);wrap(505,385,position,240,8.3,10,GRAY) rr(490,208,270,100,white,LINE,9);txt(505,285,'PORT LOGIC',10,'Helvetica-Bold',NAVY);wrap(505,268,setup,240,8.3,10,GRAY) rr(490,86,270,98,HexColor('#FFF7EC'),HexColor('#F1CC92'),9);pill(503,157,'OPERATIVE PEARL',ORANGE,102);wrap(505,138,pearls,240,8.2,10,DARK) endpage(n) # 16-25 op_slide(16,'LAPAROSCOPIC CHOLECYSTECTOMY','Standard four-port upper-abdominal configuration', (35,55,'gallbladder'),[(0,32,'camera','umbilical'),(0,92,'work','epigastric'),(78,60,'work','R subcostal'),(92,95,'retract','fundal')], 'Supine, reverse Trendelenburg with left tilt. Surgeon usually on patient’s left; assistant/camera operator positioned to maintain stable RUQ view.', 'Umbilical camera overview; epigastric port for precise Calot’s dissection; right subcostal working port; lateral port retracts fundus cranially.', 'Move ports cephalad/widen spacing in obesity. The retraction vector must expose the hepatocystic triangle, not just pull the fundus.') op_slide(17,'LAPAROSCOPIC APPENDECTOMY','Three ports, targeted to the right lower quadrant', (55,-35,'appendix / caecum'),[(0,32,'camera','umbilical'),(0,-82,'work','suprapubic'),(-62,-60,'work','LLQ')], 'Supine, then Trendelenburg with left tilt. Surgeon commonly on patient’s left; assistant/camera to the left or cephalad according to local set-up.', 'Camera at umbilicus; suprapubic and left lower-quadrant ports form vectors to the RLQ and keep instruments away from the appendix target.', 'Port configuration may change for retrocaecal appendix, pregnancy, obesity or abscess. Preserve a view of base, mesoappendix and pelvis.') op_slide(18,'TAPP INGUINAL HERNIA REPAIR','Deep pelvic orientation and preperitoneal working space', (0,-78,'myopectineal orifice'),[(0,34,'camera','umbilical'),(-48,-2,'work','left working'),(48,-2,'work','right working')], 'Supine, Trendelenburg. Surgeon on the side opposite the hernia or between legs depending on system; monitor toward foot end.', 'Midline/low abdominal camera and two working ports provide access to both groins. Identify inferior epigastrics, pubis, Cooper ligament and peritoneal flap.', 'Use a 30° scope where useful. Port height must permit a shallow approach to the deep pelvis without fighting the pubis.') op_slide(19,'LAPAROSCOPIC VENTRAL / INCISIONAL HERNIA REPAIR','Access away from defect and prior scars', (0,8,'defect'),[(-82,72,'camera','LUQ alternative'),(-92,-15,'work','lateral'),(-65,-75,'work','lateral'),(90,-20,'assist','optional')], 'Supine with arms positioned to avoid external handle interference. Surgeon works from the side opposite primary ports; team position changes with defect location.', 'Initial access is typically remote from defect/scars. Lateral ports must allow adhesiolysis, mesh deployment and fixation without crossing instruments.', 'SAGES guidance supports individualised access away from defect/prior incisions and direct-vision lateral secondary ports. Plan a rescue port before adhesiolysis.') op_slide(20,'LAPAROSCOPIC COLECTOMY','Target-specific map for medial-to-lateral dissection', (50,-5,'right colon / mesentery'),[(0,42,'camera','supraumbilical'),(-65,-58,'work','LLQ'),(65,-58,'work','RLQ'),(0,-88,'assist','suprapubic')], 'Supine, modified lithotomy when required. Surgeon and assistant shift to obtain a medial-to-lateral view; monitor on side of target.', 'Camera and ports must reach vascular pedicle, mesenteric plane and mobilisation field. Extraction site and stapler-port requirements must be planned early.', '“Colectomy port placement” is not one map. Right, left and pelvic resections have different targets, mobilisation vectors and extraction strategies.') op_slide(21,'LAPAROSCOPIC GASTRIC SURGERY','Upper-abdominal ports with reliable liver retraction', (0,72,'stomach / hiatus'),[(0,30,'camera','supraumbilical'),(-62,70,'work','left subcostal'),(62,70,'work','right subcostal'),(0,112,'retract','liver')], 'Supine, reverse Trendelenburg. Surgeon between legs or on patient’s right according to operation; assistant maintains liver retraction and camera view.', 'Upper ports create reach to hiatus and stomach. The liver retractor must expose the hiatus without obstructing the camera or instruments.', 'Check the line of stapler introduction and specimen extraction before committing to port placement.') op_slide(22,'LAPAROSCOPIC ADRENALECTOMY','Lateral position and subcostal working geometry', (65,58,'right adrenal'),[(-45,70,'camera','lateral camera'),(10,98,'work','subcostal'),(80,20,'work','lateral'),(100,85,'retract','retraction')], 'Full lateral decubitus, table flexion where appropriate. Surgeon faces abdomen; assistant/camera operator arranged along the flank.', 'Ports follow the costal margin and flank to approach retroperitoneal upper-pole target with gravity-assisted exposure.', 'Re-check surface landmarks after lateral positioning: gravity and table flexion change skin coordinates and instrument reach.') op_slide(23,'LAPAROSCOPIC SPLENECTOMY','Left upper quadrant orientation and retraction', (-55,75,'spleen / hilum'),[(0,30,'camera','umbilical/lateral'),(-90,75,'work','LUQ'),(-35,110,'work','subcostal'),(70,75,'retract','retraction')], 'Right lateral or modified lateral position. Surgeon generally on patient’s right; assistant supports retraction and camera placement.', 'Target is high and left lateral. Working ports must allow hilar control, short-gastric division and mobilisation while preserving a safe view.', 'Avoid crowding against costal margin. Plan a retrieval strategy for splenic specimen early.') op_slide(24,'LAPAROSCOPIC NEPHRECTOMY','Flank port configuration for lateral renal access', (70,18,'kidney / hilum'),[(-45,65,'camera','lateral camera'),(15,95,'work','subcostal'),(75,35,'work','flank'),(100,-28,'assist','caudal')], 'Full lateral decubitus with table flexion as needed. Surgeon faces flank; assistant positioned for camera/suction without blocking hand ports.', 'Camera and working ports create a flank-based triangle toward renal hilum. Cephalad and caudal reach must permit upper/lower pole mobilisation.', 'Lateral set-up changes anatomy relative to the skin. Identify the target and reconstruct the triangle after final patient positioning.') op_slide(25,'LAPAROSCOPIC GYNAECOLOGIC / PELVIC SURGERY','Deep pelvic ergonomics and uterine manipulation', (0,-75,'pelvic target'),[(0,32,'camera','umbilical'),(-62,-35,'work','left lateral'),(62,-35,'work','right lateral'),(0,-88,'assist','suprapubic')], 'Lithotomy and Trendelenburg as appropriate. Surgeon and assistant position to maintain a central pelvic view; uterine manipulator may provide dynamic exposure.', 'Umbilical camera plus bilateral lateral working ports gives pelvic reach. Suprapubic assistant port can aid suction, retraction or suturing.', 'Empty bladder before low port placement. Adjust port height for large uterus, mass, pregnancy and deep pelvic work.') #26 page('PORT PLACEMENT IN SPECIAL PATIENTS','Change the plan before the incision, not after repeated failed attempts','For every special situation, define a safer primary site, modified camera viewpoint, wider/narrower working geometry and a contingency port.') special=[('OBESITY','Thick wall, hidden landmarks, reduced instrument excursion: higher viewpoint, wider spacing, longer instruments.'),('VERY THIN PATIENT','Shorter target distance and less protective wall thickness: controlled entry and avoid excessive insertion depth.'),('SCARS / PREVIOUS SURGERY','Adhesion risk: review records, map scars, consider alternative access and use direct vision for later ports.'),('MASS / DISTORTED ANATOMY','Move entry and ports away from the mass; plan around displaced organs rather than surface landmarks.'),('PREGNANCY','Alter site according to fundal height; left tilt after first trimester; avoid routine umbilical assumptions.'),('SEVERE ADHESIONS','Choose remote access, expose safely, add ports early for controlled adhesiolysis, convert if unsafe.')] for i,(a,b) in enumerate(special):card(45+(i%2)*365,400-(i//2)*105,335,86,a,b,[ORANGE,BLUE,TEAL,PURPLE,RED,GREEN][i]) endpage(26) #27 page('PORT PLACEMENT IN OBESITY','The target is often deeper and the working envelope is reduced','The correct response is a redesigned map, not simply longer instruments through routine sites.') card(45,365,340,95,'LANDMARKS','Umbilicus may be displaced and surface landmarks obscured. Mark expected target and access site with patient positioned.',BLUE) card(45,245,340,95,'CAMERA','A higher camera position and adequate distance may restore overview. Ensure the scope can see the upper/lower limits of the operation.',TEAL) card(45,125,340,95,'WORKING PORTS','Increase separation where needed, use bariatric-length instruments and avoid handle collision with body/arms.',ORANGE) # thick wall illustration for i,(x,col,lab) in enumerate([(545,HexColor('#F4D9B8'),'skin + fat'),(575,HexColor('#D98C88'),'muscle'),(605,HexColor('#BEDAE1'),'peritoneum')]): c.setFillColor(col);c.rect(x,150,28 if i!=0 else 80,260,fill=1,stroke=0) c.setStrokeColor(BLUE);c.setLineWidth(3);c.line(515,430,620,225);txt(630,265,'longer access path',9,'Helvetica-Bold',BLUE) pill(470,100,'OPERATIVE PEARL',ORANGE,104);wrap(583,105,'Adjust site, spacing, instrument length and team position together.',175,8,9,DARK) endpage(27) #28 page('PREVIOUS ABDOMINAL SURGERY & SCARS','Scar is a risk marker for adhesions, not a reason to abandon planning','Review old incisions and previous operative notes. A remote safe view is often more useful than entry through familiar anatomy.') abdomen(265,292,1.02,None,[(0,30,'camera','midline scar zone'),(-70,95,'camera','Palmer’s point'),(80,85,'camera','alternative'),(-82,-30,'work','after view')]) c.setStrokeColor(RED);c.setLineWidth(3);c.line(265,185,265,340);txt(278,260,'midline scar',8,'Helvetica-Bold',RED) card(470,370,280,75,'BEFORE SURGERY','Review prior records, scar map and imaging where relevant. Anticipate fixed bowel or mesh.',TEAL) card(470,275,280,75,'FIRST ACCESS','Choose a remote, safe site tailored to the likely adhesion field; consider open access where appropriate.',BLUE) card(470,180,280,75,'AFTER ACCESS','Inspect before placing secondaries. Do not insert through a pre-marked scar-zone site without direct confirmation.',ORANGE) pill(470,110,'SAFETY POINT',RED,90);wrap(570,114,'Access technique, location and escalation plan should all be decided before incision.',180,8,9,RED,'Helvetica-Bold') endpage(28) #29 page('TROCAR-RELATED COMPLICATIONS','Recognise early, control safely and prevent recurrence','A structured response begins with stopping unsafe movement, maintaining visual control, resuscitating when needed and seeking help early.') comp=[('VASCULAR','Major vessel or inferior epigastric injury: brisk bleeding, concealed haematoma or delayed port-tract bleeding.'),('VISCERAL','Bowel, bladder or solid-organ injury: may be visible at entry or present later with pain, sepsis or leak.'),('WALL','Bleeding, haematoma, port-site hernia, wound infection and extraction-site complications.'),('OTHER','Retroperitoneal injury, gas-related complications and tumour seeding where relevant.')] for i,(a,b) in enumerate(comp):card(45+(i%2)*365,385-(i//2)*135,335,110,a,b,[RED,ORANGE,TEAL,PURPLE][i]) rr(45,100,700,58,HexColor('#FFF7EC'),HexColor('#F1CC92'),8);pill(58,132,'RESPONSE',RED,70);wrap(140,135,'Stop → maintain exposure/tamponade when appropriate → assess physiology → control haemorrhage/repair injury → add port or convert early if safe progress is not possible.',570,9.2,11,DARK,'Helvetica-Bold') endpage(29) #30 page('INFERIOR EPIGASTRIC VESSEL INJURY','Dedicated practical management slide','Bleeding may appear only after trocar removal because the cannula has tamponaded the vessel.') # anatomy line rr(45,165,310,260,white,LINE,10);txt(200,400,'WHERE IS THE RISK?',12,'Helvetica-Bold',NAVY,'center') c.setFillColor(HexColor('#F8EEE8'));c.ellipse(95,190,305,365,fill=1,stroke=0) c.setStrokeColor(RED);c.setLineWidth(5);c.line(175,205,150,340);c.line(225,205,250,340);txt(105,285,'inferior epigastric',8,'Helvetica-Bold',RED) c.setFillColor(ORANGE);c.circle(120,285,7,fill=1,stroke=0);txt(120,282,'X',6,'Helvetica-Bold',white,'center') card(410,355,340,62,'AVOID','Place secondary ports under direct vision. Check wall vessels and avoid risky lateral-rectus trajectories.',TEAL) card(410,275,340,62,'RECOGNISE','Port-site bleeding, expanding wall haematoma or bleeding exposed after port removal.',ORANGE) card(410,195,340,62,'CONTROL','Pressure/tamponade, laparoscopic or percutaneous suture ligation, and port-site exploration when required.',RED) pill(410,125,'VIVA POINT',TEAL,82);wrap(505,129,'The inferior epigastric vessels are the commonest abdominal-wall vessels injured during lateral trocar insertion.',240,8,9,NAVY,'Helvetica-Bold') endpage(30) #31 page('PORT-SITE HERNIA & PORT REMOVAL','Closure is part of access safety, not an afterthought','Risk rises with larger and enlarged extraction sites, older age and increased body mass. Match closure technique to fascial defect and patient risk.') card(45,365,335,95,'PORT-SITE HERNIA','Consider early obstruction or late bulge. Close larger or enlarged extraction-site fascial defects reliably; avoid unnecessary stretching.',ORANGE) card(45,245,335,95,'PORT REMOVAL','Remove under vision; inspect port tracts for bleeding; release pneumoperitoneum in a controlled fashion; close indicated fascia and skin.',TEAL) card(45,125,335,95,'DO NOT MISS','A port may mask bleeding until removed. Inspection is mandatory before leaving the abdomen.',RED) # removal schematic rr(470,150,290,260,white,LINE,10);txt(615,384,'END-OF-CASE SEQUENCE',12,'Helvetica-Bold',NAVY,'center') seq=['1. Look at port tract internally','2. Withdraw port under vision','3. Identify/control bleeding','4. Deflate and remove remaining ports','5. Close indicated fascia + skin'] for i,s in enumerate(seq): c.setFillColor([BLUE,TEAL,RED,ORANGE,GREEN][i]);c.circle(500,340-i*40,10,fill=1,stroke=0);txt(500,337-i*40,str(i+1),7,'Helvetica-Bold',white,'center');txt(518,337-i*40,s,8.5,'Helvetica',DARK) endpage(31) #32 page('TROUBLESHOOTING DURING THE OPERATION','A poor port map is corrected by changing geometry, exposure or strategy','The solution may be patient repositioning, scope change, retraction, port repositioning/addition, or conversion. Do not force the current setup.') issues=[('“MY INSTRUMENTS ARE CLASHING”','Are ports too close or parallel? Is the camera too close? Are handles crossing? Widen geometry, alter vector or add a port.'),('“I CANNOT REACH THE TARGET”','Is the port too far/wrong height? Is patient positioning adequate? Is pneumoperitoneum or retraction insufficient? Reposition first, then add a better port.'),('“POOR VISUALIZATION”','Check orientation/horizon, lens fog/cleanliness, camera distance, retraction and patient position. Add retraction port if the plane remains hidden.'),('“SHOULD I ADD A PORT?”','Yes, for inadequate exposure, difficult anatomy, bleeding, adhesions, obesity or unsafe working angle. An extra port can prevent complications.')] for i,(a,b) in enumerate(issues):card(45+(i%2)*365,385-(i//2)*135,335,110,a,b,[ORANGE,BLUE,TEAL,RED][i]) endpage(32) #33 page('PRE-INCISION CHECKLIST & OPERATIVE CASE','Apply the algorithm: obese patient, previous midline laparotomy, laparoscopic cholecystectomy','Walk the audience through the plan verbally. Acknowledge that final locations depend on scar location, current anatomy and intra-abdominal findings.') # checklist left checks=['TARGET: RUQ / gallbladder and Calot’s triangle','PATIENT: reverse Trendelenburg + left tilt; arms/team planned','ENTRY: scar/adhesion risk assessed; alternate site and technique chosen','CAMERA: high enough overview; 30° available; horizon maintained','WORKING PORTS: epigastric precision + right subcostal traction/dissection','SAFETY: secondary ports under vision, avoid epigastrics','CONTINGENCY: lateral extra port or convert if exposure/adhesiolysis unsafe'] rr(38,112,380,325,white,LINE,10);txt(55,412,'CHECKLIST',12,'Helvetica-Bold',NAVY) for i,s in enumerate(checks): c.setFillColor(TEAL);c.circle(58,378-i*38,7,fill=1,stroke=0);txt(58,375-i*38,'✓',8,'Helvetica-Bold',white,'center');wrap(75,381-i*38,s,320,8.3,10,DARK) # case right rr(450,112,320,325,HexColor('#FFF7EC'),HexColor('#F1CC92'),10);txt(468,412,'STEP-BY-STEP ANSWER',12,'Helvetica-Bold',NAVY) answers=['1. Avoid routine periumbilical blind access if scar pattern/adhesion risk makes it unsafe.','2. Choose a remote alternative access site appropriate to local anatomy and surgeon experience; establish view first.','3. Place cholecystectomy ports under direct vision, often higher/wider in obesity for RUQ reach.','4. If adhesions obstruct safe placement, add a port for controlled adhesiolysis or change strategy.','5. Add a retraction/assistant port early if it improves safe exposure; convert if safe progress is not possible.'] for i,a in enumerate(answers):wrap(468,379-i*51,a,285,8.2,10,DARK) endpage(33) #34 master + viva takehomes page('MASTER ALGORITHM & RAPID REVISION','PORT PLACEMENT = TARGET + TRIANGULATION + ANGLE + DISTANCE + SAFETY + ERGONOMICS','This is the final mental rehearsal before starting a procedure. Adapt every component after patient positioning and diagnostic laparoscopy.') # algorithm alg=[('TARGET','define anatomy + plane'),('CAMERA','choose viewpoint'),('WORKING PORTS','bimanual vectors'),('RETRACTION','expose plane'),('SAFETY','entry + wall vessels'),('CONTINGENCY','extra port / convert')] for i,(a,b) in enumerate(alg): x=40+i*125;rr(x,360,108,80,[TEAL,BLUE,GREEN,ORANGE,RED,PURPLE][i],r=9);txt(x+54,404,a,9,'Helvetica-Bold',white,'center');wrap(x+12,385,b,84,7.4,9,white,'Helvetica-Bold') if i<5:arrow(x+110,400,x+124,400,BLUE) # viva Qs qs=['What is triangulation?','Why use a 30° scope?','Where are inferior epigastrics at risk?','When use Palmer’s point?','When add an extra port?','Which defects merit fascial closure?'] rr(40,135,700,180,white,LINE,10);txt(58,290,'RAPID VIVA QUESTIONS',12,'Helvetica-Bold',NAVY) for i,q in enumerate(qs): x=60+(i%2)*335;y=255-(i//2)*48;txt(x,y,'• '+q,9,'Helvetica-Bold',[TEAL,BLUE,ORANGE,RED,PURPLE,GREEN][i]) pill(40,85,'TAKE-HOME',TEAL,88);wrap(140,89,'Plan from the target. Gain a stable view. Protect the wall and viscera. Build useful bimanual vectors. Use retraction deliberately. Correct unsafe geometry early.',580,8.8,10,NAVY,'Helvetica-Bold') endpage(34) #35 ref page('REFERENCES','Standard texts and selected guidance','Use these as the basis for local departmental protocols. Procedure-specific local policies and equipment instructions must also be followed.') refs=[ 'Bailey & Love’s Short Practice of Surgery. 28th ed. CRC Press/Taylor & Francis, 2023.', 'Brunicardi FC, et al. Schwartz’s Principles of Surgery. 11th ed. McGraw-Hill, 2019.', 'Townsend CM, et al. Sabiston Textbook of Surgery: The Biological Basis of Modern Surgical Practice. 22nd ed. Elsevier, 2022.', 'Maingot’s Abdominal Operations. 13th ed. McGraw-Hill, 2019.', 'Fischer JE, et al. Mastery of Surgery. 8th ed. Wolters Kluwer, 2023.', 'Society of American Gastrointestinal and Endoscopic Surgeons. Guidelines for Laparoscopic Ventral Hernia Repair. Access and secondary-port recommendations.', 'Society of American Gastrointestinal and Endoscopic Surgeons. Guidelines for the Use of Laparoscopy During Pregnancy. Initial port placement adjusted to fundal height.', 'Prontera PP, et al. Strategies for preventing port-site hernia following robot-assisted radical prostatectomy: a systematic review. Arch Ital Urol Androl. 2025; PMID: 40824056.'] rr(45,145,700,290,white,LINE,12);txt(65,408,'CORE REFERENCES',13,'Helvetica-Bold',NAVY) y=375 for i,r in enumerate(refs): c.setFillColor([BLUE,TEAL,GREEN,ORANGE,PURPLE,BLUE,TEAL,ORANGE][i]);c.circle(70,y+3,4,fill=1,stroke=0);y=wrap(82,y,r,630,9,12,DARK) y-=7 rr(45,80,700,40,HexColor('#EAF3F7'),None,8);wrap(60,102,'Evidence update: recent literature has not produced a single universal port geometry. Safe access and port placement remain patient-, target- and surgeon-specific.',660,8.3,10,NAVY,'Helvetica-Bold') txt(45,55,'End of seminar. Questions / discussion.',10,'Helvetica-Bold',TEAL) endpage(35) c.save();print(OUT) PY python "/tmp/workspace/port-placement-algorithm/src/create_complete_seminar.py" python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/port-placement-algorithm/output/Complete_Port_Placement_in_Laparoscopic_Surgery_Seminar.pdf' r=PdfReader(p) print('pages',len(r.pages),'size',__import__('os').path.getsize(p)) for i in [0,14,15,24,33,34]: t=r.pages[i].extract_text() or '' print(i+1,len(t),t.splitlines()[0] if t else 'EMPTY') PY
python - <<'PY' from pypdf import PdfReader, PdfWriter from pathlib import Path base=Path('/tmp/workspace/port-placement-algorithm/output') main=base/'Complete_Port_Placement_in_Laparoscopic_Surgery_Seminar.pdf' append=[base/'Port_Placement_Master_Algorithm.pdf',base/'Trocar_Complications_and_Prevention.pdf',base/'Viva_Rapid_Fire_Port_Placement.pdf'] out=base/'Port_Placement_in_Laparoscopic_Surgery_COMPLETE_Seminar.pdf' w=PdfWriter() main_r=PdfReader(str(main)) for p in main_r.pages:w.add_page(p) w.add_outline_item('Main Seminar',0) for name,idx in [('Port Placement Master Algorithm',33),('References',34)]:w.add_outline_item(name,idx) start=len(main_r.pages) for i,path in enumerate(append): r=PdfReader(str(path)) w.add_outline_item(['Appendix A: Master Algorithm','Appendix B: Complications & Prevention','Appendix C: Viva Rapid-Fire'][i],start) for p in r.pages:w.add_page(p) start+=len(r.pages) w.add_metadata({'/Title':'Port Placement in Laparoscopic Surgery: Complete MS General Surgery Seminar','/Subject':'Operative Orientation, Practical Principles, Ergonomics and Troubleshooting','/Author':'Orris'}) with open(out,'wb') as f:w.write(f) print(out) PY python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/port-placement-algorithm/output/Port_Placement_in_Laparoscopic_Surgery_COMPLETE_Seminar.pdf') r=PdfReader(str(p)) assert len(r.pages)==38, len(r.pages) for i in (0,15,28,34,35,36,37): t=r.pages[i].extract_text() or '' assert len(t)>100,(i+1,len(t)) print(f'page {i+1}: {t.splitlines()[0]}') print('verified bytes',p.stat().st_size, 'title=',r.metadata.title) PY
Port Placement in Laparoscopic Surgery COMPLETE Seminar
PDF Document · PDF