Improve this also do any changes if needed for my content to go through before viva Output as pdf
~/
surgical radiology x-ray spotters viva examination common findings teaching resource
~/attachments
mkdir -p "/tmp/workspace/surgical-xray-viva/src" "/tmp/workspace/surgical-xray-viva/output" && python -c "from pypdf import PdfReader; p='/tmp/workspace/attachments/cc33852c-88bf-4731-b5e6-35e2ae96f186/Surgical XRay Spotters with Viva.pdf'; r=PdfReader(p); open('/tmp/workspace/surgical-xray-viva/src/extracted.txt','w',encoding='utf-8').write('\\n\\n'.join('--- PAGE %d ---\\n%s'%(i+1,(pg.extract_text() or '')) for i,pg in enumerate(r.pages))); print('pages',len(r.pages))"
python -c "import re; s=open('/tmp/workspace/surgical-xray-viva/src/extracted.txt',encoding='utf-8').read(); [print(x) for x in re.findall(r'(?m)^\d+\.\s+.*',s)]"
abdominal radiography bowel obstruction pneumoperitoneum
python -c "import fitz; p='/tmp/workspace/attachments/cc33852c-88bf-4731-b5e6-35e2ae96f186/Surgical XRay Spotters with Viva.pdf'; d=fitz.open(p); print([(i+1,len(pg.get_images(full=True)),len(pg.get_text().strip())) for i,pg in enumerate(d)])"
python -c "from pypdf import PdfReader; r=PdfReader('/tmp/workspace/attachments/cc33852c-88bf-4731-b5e6-35e2ae96f186/Surgical XRay Spotters with Viva.pdf'); print([(i+1,len(p.images)) for i,p in enumerate(r.pages)])"
cat > "/tmp/workspace/surgical-xray-viva/src/build.py" <<'PY' from pypdf import PdfReader from reportlab.lib.pagesizes import A4 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image, PageBreak, KeepTogether from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.lib.units import cm from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.utils import ImageReader from PIL import Image as PILImage from io import BytesIO from pathlib import Path base=Path('/tmp/workspace/surgical-xray-viva'); assets=base/'assets'; assets.mkdir(exist_ok=True) inp=Path('/tmp/workspace/attachments/cc33852c-88bf-4731-b5e6-35e2ae96f186/Surgical XRay Spotters with Viva.pdf') r=PdfReader(str(inp)) # Each original image is on image page: topic 1 at page 2, topic 2 at page 4 etc; topic 17 starts page 34, topic 18 pg 35. imgpages=[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,34,36,38,40,42] for n,pn in enumerate(imgpages,1): imgs=list(r.pages[pn].images) if imgs: data=imgs[0].data ext=imgs[0].name.split('.')[-1].lower() if ext not in ('png','jpg','jpeg','webp'): ext='png' (assets/f'{n}.{ext}').write_bytes(data) data=[ ('Gas under diaphragm','Pneumoperitoneum', 'Erect chest radiograph: crescentic subdiaphragmatic free gas, usually easiest to see beneath the right hemidiaphragm. On a supine film, look for Rigler sign or other indirect signs.', ['Free intraperitoneal air implies perforated hollow viscus until proved otherwise, but may be postoperative or iatrogenic.','Rigler sign: both sides of bowel wall are visible because gas is inside and outside the lumen. It supports, but is not specific for, pneumoperitoneum.'], [('What is the next step?','Resuscitate, keep nil by mouth, give IV fluids and antibiotics when perforation is suspected, obtain urgent surgical review. CT is more sensitive if the patient is stable and diagnosis is uncertain.'),('Why is air better seen on an erect film?','It rises to the nondependent subdiaphragmatic space.')]), ('Sigmoid volvulus','Large-bowel obstruction', 'Supine abdominal radiograph shows a markedly dilated, ahaustral sigmoid loop forming an inverted U or coffee-bean configuration, often arising from the pelvis. Rectal gas is often reduced or absent.', ['Exclude ischemia and perforation: pain, peritonism, fever, shock, rising lactate, free air.','Contrast-enhanced CT defines the twist and complications when diagnosis is uncertain.'], [('Initial treatment if uncomplicated?','Flexible sigmoidoscopic decompression with rectal tube, followed by definitive sigmoid resection during the same admission where appropriate.'),('When is immediate operation needed?','Peritonitis, perforation, gangrene, hemodynamic instability, or failed endoscopic decompression.')]), ('Small-bowel obstruction','Mechanical SBO', 'Abdominal radiograph shows central dilated small-bowel loops, usually more than 3 cm, with valvulae conniventes crossing the full lumen. There may be multiple air-fluid levels and reduced distal colonic gas.', ['Plain radiographs neither reliably locate the transition point nor exclude strangulation. CT with IV contrast is preferred in most suspected SBO.','Do not call obstruction “complete” from a single radiograph alone.'], [('Common causes in adults?','Postoperative adhesions, incarcerated hernia, malignancy, Crohn disease and volvulus. Consider tuberculosis according to local prevalence.'),('Indications for urgent surgery?','Peritonitis, strangulation or ischemia, perforation, closed-loop obstruction, or clinical deterioration.')]), ('Pneumothorax','Pleural air', 'Erect chest radiograph shows a sharp visceral pleural line with no pulmonary vascular markings peripheral to it. The lung is seen collapsed toward the hilum.', ['Do not mistake a skin fold for a pleural line: lung markings may extend beyond a skin fold.','Tension pneumothorax is a clinical diagnosis: treat instability immediately, without waiting for imaging.'], [('Radiographic tension signs?','Mediastinal shift away, depressed ipsilateral hemidiaphragm and hyperexpansion of the affected hemithorax may occur.'),('Emergency treatment of tension pneumothorax?','Immediate needle or finger thoracostomy followed by an intercostal drain, according to local protocol.')]), ('Flail chest with hemothorax','Thoracic trauma', 'Multiple rib fractures may be visible. A basal homogeneous pleural opacity with blunting of the costophrenic angle suggests hemothorax. A flail segment itself is diagnosed clinically by paradoxical movement.', ['Look actively for pulmonary contusion, pneumothorax and associated injuries.','A normal early radiograph does not exclude pulmonary contusion.'], [('Define flail chest.','At least three adjacent ribs fractured in at least two places, creating a free chest-wall segment.'),('Priorities?','Oxygenation, multimodal analgesia, pulmonary hygiene, drainage of significant pleural collection and treatment of associated injuries.')]), ('Bladder calculus','Vesical stone', 'KUB or pelvic radiograph may show a mobile radiopaque pelvic calculus projected over the bladder. Many urinary stones are radiopaque, but uric acid stones are usually radiolucent.', ['Confirm with ultrasonography, CT when required, and cystoscopy as appropriate.','Always seek the cause: outlet obstruction, neurogenic bladder, infection, foreign body or stasis.'], [('Management principle?','Remove the stone endoscopically or surgically and correct the predisposing condition.'),('Important differential?','Phleboliths, calcified fibroids, vascular calcification and distal ureteric stones.')]), ('Staghorn calculus','Complex renal stone', 'A branching radiopaque calculus occupies the renal pelvis and extends into calyces, producing a staghorn configuration.', ['Often associated with infection stones, commonly struvite, but composition cannot be proven from radiograph alone.','Send urine culture and assess renal function; untreated stones can cause recurrent infection and renal damage.'], [('Usual treatment?','Percutaneous nephrolithotomy is the mainstay for most complete staghorn calculi, sometimes staged.'),('What organisms are typical in struvite stones?','Urease-producing organisms, classically Proteus species; culture guides antibiotics.')]), ('Ureteric calculus','Urolithiasis', 'A calcific density along the expected ureteric course may represent a ureteric stone. Correlate with symptoms and look for obstruction; plain KUB has limited sensitivity.', ['Non-contrast CT KUB is the preferred test for many adults with suspected acute ureteric colic.','A pelvic phlebolith can mimic a distal ureteric stone.'], [('Three anatomical narrowing sites?','Pelviureteric junction, pelvic brim where the ureter crosses iliac vessels, and vesicoureteric junction.'),('When is urgent decompression needed?','Obstruction with sepsis, anuria, renal impairment, solitary kidney, or uncontrolled symptoms.')]), ('Intravenous urography','Excretory urography', 'Serial radiographs after IV iodinated contrast demonstrate renal excretion, calyces, renal pelvis, ureters and bladder. It has largely been replaced by CT urography in many settings.', ['Check renal function, contrast reaction history and pregnancy status before iodinated contrast.','Describe nephrogram, calyceal pattern, ureteric course, bladder and post-void residual when shown.'], [('What can delayed excretion indicate?','Obstruction, impaired renal function or reduced renal perfusion.'),('Current role?','Selected anatomical or functional assessment where CT is unavailable or unsuitable, guided by local practice.')]), ('Retrograde urography','Retrograde pyelography', 'Contrast is injected through a cystoscopically placed ureteric catheter, outlining the ureter and collecting system retrogradely.', ['It can define ureteric obstruction or injury and permits stenting in the same sitting.','Use aseptic technique and avoid high-pressure injection; infection and perforation are complications.'], [('Advantage over IVU?','It does not rely on renal excretion of contrast.'),('Common indication?','Defining a ureteric stricture, filling defect or suspected ureteric injury.')]), ('MCU','Micturating cystourethrogram', 'Fluoroscopic contrast study of the bladder during voiding. Assess bladder contour, urethra, residual urine and vesicoureteric reflux.', ['In boys, posterior urethral valves are an important indication.','Grade reflux using the accepted grading system and report laterality.'], [('What does reflux mean?','Retrograde passage of urine/contrast from bladder into ureter and possibly renal pelvis.'),('Complication?','Urinary tract infection; postpone in untreated active UTI when feasible.')]), ('Achalasia cardia','Barium swallow', 'Smooth tapering narrowing at the gastroesophageal junction with proximal esophageal dilatation gives the bird-beak appearance. Peristalsis is reduced or absent.', ['Endoscopy is required to exclude pseudoachalasia from malignancy, especially with older age or rapid weight loss.','Manometry confirms the motility disorder.'], [('Definitive diagnostic test?','High-resolution esophageal manometry.'),('Treatment options?','Pneumatic dilatation, laparoscopic Heller myotomy with fundoplication, or peroral endoscopic myotomy depending on patient factors and expertise.')]), ('Carcinoma esophagus','Barium swallow', 'An irregular, shouldered stricture or mucosal destruction suggests esophageal malignancy. This is unlike the smooth tapered narrowing of achalasia.', ['Diagnosis requires endoscopic biopsy.','Staging generally includes CT and, where appropriate, endoscopic ultrasound and PET-CT.'], [('Key differential?','Benign peptic stricture, caustic stricture, achalasia and extrinsic compression.'),('Main symptoms?','Progressive dysphagia, weight loss and odynophagia.')]), ('Carcinoma colon','Contrast enema appearance', 'An annular constricting lesion may produce an apple-core or shouldered narrowing. A contrast enema is not diagnostic on its own.', ['Colonoscopy with biopsy is the diagnostic test.','CT of chest, abdomen and pelvis is used for staging after diagnosis.'], [('What is the danger of obstructing left-sided cancer?','Large-bowel obstruction, perforation and sepsis.'),('What else should be assessed?','Synchronous colonic lesions and metastatic disease.')]), ('Ulcerative colitis','Chronic colitis imaging', 'Chronic disease can show a shortened, featureless colon with loss of haustration, described as a lead-pipe colon. Acute severe colitis requires assessment for toxic megacolon.', ['Plain radiography is useful in acute severe colitis to measure colonic dilatation and detect perforation.','Avoid full colonoscopy in suspected toxic megacolon.'], [('What is toxic megacolon?','Acute colonic dilatation with systemic toxicity in severe colitis; it is a surgical emergency.'),('Cancer surveillance?','Long-standing colitis needs colonoscopic surveillance according to guideline-based risk stratification.')]), ('Ileocecal tuberculosis','Ileocecal disease', 'Barium studies may show terminal ileal narrowing, a pulled-up contracted cecum, and deformity of the ileocecal region. Findings are not specific.', ['Differentials include Crohn disease, malignancy and amoeboma.','Use microbiology, histology and cross-sectional imaging where needed.'], [('Why is the ileocecal region common?','Stasis, abundant lymphoid tissue and absorptive characteristics are proposed contributors.'),('When is surgery required?','Obstruction, perforation, uncontrolled bleeding, fistula, abscess or diagnostic uncertainty.')]), ('Barium enema','Technique and safety', 'A contrast enema outlines the colon under fluoroscopy. Double-contrast technique can show mucosal detail. It has been superseded by colonoscopy and CT colonography for many indications.', ['Do not use barium when perforation is suspected; use water-soluble contrast if contrast examination is necessary.','Avoid in acute severe colitis or toxic megacolon unless specialist-directed.'], [('What preparation is needed?','Appropriate bowel preparation, consent and exclusion of contraindications.'),('What does double contrast mean?','A thin barium coating plus insufflated air to show mucosa.')]), ('Abdominal foreign body','Radiopaque object', 'Describe the object systematically: number, shape, size, location and whether it lies within the GI tract or soft tissues. Compare with prior images if available.', ['A button battery in the esophagus requires emergency endoscopic removal.','Sharp objects, magnets, suspected packets, obstruction or perforation need urgent specialist assessment.'], [('First question in viva?','What is the object and where is it? Then assess symptoms and complications.'),('Why are multiple magnets dangerous?','They can attract across bowel loops, causing pressure necrosis, fistula or perforation.')]), ('Worm infestation','Ascaris on contrast study', 'Barium studies may show elongated smooth tubular filling defects, sometimes with a central line of contrast. Plain radiographs are often non-diagnostic.', ['Ultrasound can demonstrate biliary ascariasis.','Interpret imaging with stool examination and clinical context.'], [('Surgical complication?','A bolus can cause small-bowel obstruction; migration can cause biliary or pancreatic complications.'),('Treatment?','Anthelmintic therapy for uncomplicated infection; manage obstruction or biliary complications urgently as indicated.')]), ('Organo-axial gastric volvulus','Gastric volvulus', 'The stomach rotates around its long axis from gastroesophageal junction to pylorus. Radiographs may show a distended intrathoracic or abdominal stomach with abnormal orientation and air-fluid level.', ['Acute volvulus may cause closed-loop obstruction, ischemia and perforation.','CT is helpful to establish anatomy and complications.'], [('Borchardt triad?','Severe epigastric pain/distension, unproductive retching and inability to pass a nasogastric tube.'),('Management?','Resuscitate and urgently decompress/operate or endoscopically reduce according to viability and stability.')]), ('Malpositioned intercostal drain','Tube thoracostomy', 'Trace the drain from skin entry to the side holes. The side holes should lie within the thoracic cavity; identify intrafissural, subcutaneous, mediastinal or abdominal placement.', ['An intercostal drain should be placed within the safe triangle, with technique and subsequent imaging confirmed by local protocol.','Do not advance a drain blindly when side holes are outside the chest: obtain senior review and reposition/replace as appropriate.'], [('What should you check on the film?','Course, tip, all side holes, lung re-expansion and complications such as residual pneumothorax or new opacity.'),('Common consequence of subcutaneous placement?','Failure to drain pleural air or fluid, with possible surgical emphysema.')]), ('Skull fracture','Head trauma radiograph', 'Linear fractures may appear as lucent lines with sharp non-sclerotic margins. Modern head-injury assessment relies on CT, not skull radiographs, when imaging is indicated.', ['A skull fracture does not determine intracranial injury severity; CT identifies hemorrhage and fractures needing management.','Treat the patient, not the radiograph: assess airway, GCS, pupils and neurological signs.'], [('When is CT urgent?','Use validated head-injury criteria, for example reduced GCS, focal deficit, signs of skull fracture, seizure, repeated vomiting or dangerous mechanism.'),('Why are skull X-rays limited?','They poorly detect intracranial injury and do not replace CT.')])] styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='Title2', parent=styles['Title'], fontName='Helvetica-Bold',fontSize=25,leading=30,textColor=colors.HexColor('#123A5A'),alignment=TA_CENTER,spaceAfter=14)) styles.add(ParagraphStyle(name='Sub', parent=styles['Normal'], fontName='Helvetica',fontSize=11,leading=15,textColor=colors.HexColor('#455A64'),alignment=TA_CENTER)) styles.add(ParagraphStyle(name='H', parent=styles['Heading2'],fontName='Helvetica-Bold',fontSize=15,leading=18,textColor=colors.HexColor('#123A5A'),spaceBefore=6,spaceAfter=5)) styles.add(ParagraphStyle(name='Body2',parent=styles['BodyText'],fontName='Helvetica',fontSize=9.2,leading=12,spaceAfter=4)) styles.add(ParagraphStyle(name='Small',parent=styles['BodyText'],fontName='Helvetica',fontSize=8.2,leading=10.5,textColor=colors.HexColor('#455A64'))) styles.add(ParagraphStyle(name='Viva',parent=styles['BodyText'],fontName='Helvetica',fontSize=9,leading=12,backColor=colors.HexColor('#EAF3F7'),borderColor=colors.HexColor('#B4D2DF'),borderWidth=.5,borderPadding=6,spaceBefore=3,spaceAfter=5)) def P(x, sty='Body2'): return Paragraph(x,styles[sty]) def bullets(items): return [P('• '+x) for x in items] def footer(canvas,doc): canvas.saveState(); canvas.setStrokeColor(colors.HexColor('#B4D2DF')); canvas.line(1.5*cm,1.1*cm,A4[0]-1.5*cm,1.1*cm); canvas.setFont('Helvetica',7.5); canvas.setFillColor(colors.HexColor('#546E7A')); canvas.drawString(1.5*cm,.72*cm,'Surgical X-ray Spotters | Viva Revision'); canvas.drawRightString(A4[0]-1.5*cm,.72*cm,f'Page {doc.page}'); canvas.restoreState() out=base/'output'/'Surgical_XRay_Spotters_Viva_Refined.pdf' doc=SimpleDocTemplate(str(out),pagesize=A4,rightMargin=1.45*cm,leftMargin=1.45*cm,topMargin=1.35*cm,bottomMargin=1.5*cm) story=[] story += [Spacer(1,3*cm),P('SURGICAL X-RAY SPOTTERS','Title2'),P('Viva-ready, corrected rapid-revision guide','Sub'),Spacer(1,1*cm),P('<b>How to answer every spotter in 20 seconds</b>','H'),P('1. Identify the view and adequacy. 2. State the key abnormality and its location. 3. Give the most likely diagnosis. 4. Name one immediate complication or next investigation. 5. State the initial management priority.', 'Body2'),Spacer(1,.5*cm),P('<b>Safe viva wording:</b> “This is an erect chest radiograph showing…” Avoid absolute claims when the film alone cannot confirm the diagnosis. State when CT, endoscopy, contrast study or clinical examination is required.', 'Viva'),Spacer(1,.5*cm),P('This guide is for examination revision. Management must follow the clinical condition, local protocols and senior surgical/radiology advice.','Small'),PageBreak()] for i,(title,dx,desc,findings,qas) in enumerate(data,1): story += [P(f'{i:02d}. {title.upper()}','H'),P(f'<b>Spot diagnosis:</b> {dx}','Body2')] # asset image candidates=list(assets.glob(f'{i}.*')) if candidates: try: im=PILImage.open(candidates[0]); w,h=im.size maxw=16.5*cm; maxh=8.2*cm; scale=min(maxw/w,maxh/h) story += [Image(str(candidates[0]),width=w*scale,height=h*scale),Spacer(1,4)] except: pass story += [P('<b>Describe the film</b>','Body2'),P(desc),P('<b>Key points / pitfalls</b>','Body2')]+bullets(findings)+[P('<b>High-yield viva</b>','Body2')] for q,a in qas: story.append(P(f'<b>Q. {q}</b><br/><b>A.</b> {a}','Viva')) story.append(PageBreak()) # Closing checklist story += [P('FINAL 60-SECOND CHECKLIST','H'),P('Before you finish your answer, say whether there is evidence of perforation, ischemia, sepsis, obstruction, respiratory compromise or a misplaced device. If present, state the immediate resuscitation and senior surgical/radiology escalation needed.','Body2'),Spacer(1,10),P('<b>Key corrections incorporated:</b> Rigler sign is supportive rather than pathognomonic; tension pneumothorax is a clinical emergency; flail chest is clinical; plain films have important limits in SBO and urinary stones; and suspected head injury is evaluated with CT according to validated criteria, not skull radiography alone.','Viva')] doc.build(story,onFirstPage=footer,onLaterPages=footer) print(out) PY python "/tmp/workspace/surgical-xray-viva/src/build.py" python -c "from pypdf import PdfReader; p='/tmp/workspace/surgical-xray-viva/output/Surgical_XRay_Spotters_Viva_Refined.pdf'; r=PdfReader(p); print('pages=',len(r.pages),'textchars=',sum(len(x.extract_text() or '') for x in r.pages))"
Surgical XRay Spotters Viva Refined
PDF Document · PDF
Add model viva answers and examiner follow-up questions
NICE guidance pneumothorax chest drain head injury CT renal colic bowel obstruction current
~/
python - <<'PY' p='/tmp/workspace/surgical-xray-viva/src/build.py' s=open(p,encoding='utf-8').read() insert=''' # Examiner follow-ups and concise answers to speak aloud after identifying the image. probes = { 'Gas under diaphragm': [('What is your differential?', 'Recent laparotomy, laparoscopy, endoscopy, peritoneal dialysis and positive-pressure ventilation can also produce free intraperitoneal gas. I would correlate with history and peritonitis.'), ('Which investigation is most sensitive in a stable patient?', 'Contrast-enhanced CT abdomen and pelvis is more sensitive and may identify the perforation site.')], 'Sigmoid volvulus': [('What feature suggests ischemia?', 'Clinical toxicity or peritonitis is more important than the radiograph. CT may show poor enhancement, pneumatosis, portal venous gas or free air.'), ('How will you prevent recurrence?', 'After successful decompression, definitive sigmoid colectomy should be considered in the same admission if the patient is fit.')], 'Small-bowel obstruction': [('What is a closed-loop obstruction?', 'A segment is obstructed at two points, creating a high risk of strangulation and ischemia.'), ('What are CT signs of ischemia?', 'Reduced bowel-wall enhancement, mesenteric edema or fluid, pneumatosis, portal venous gas, free fluid and a closed-loop configuration.')], 'Pneumothorax': [('What is the main mimic?', 'A skin fold. Unlike a true pleural line, lung markings may be visible beyond a skin fold.'), ('What do you do if the patient is unstable?', 'Treat as tension pneumothorax immediately with decompression, then insert an intercostal drain. Do not wait for imaging.')], 'Flail chest with hemothorax': [('What is the commonest serious associated injury?', 'Pulmonary contusion, which may worsen over the first 24 to 48 hours.'), ('When would you consider rib fixation?', 'In selected patients with an unstable flail segment, failure to wean ventilation, severe displacement or uncontrolled pain, after multidisciplinary assessment.')], 'Bladder calculus': [('How will you distinguish it from a ureteric stone?', 'Correlation with ultrasound, CT or cystoscopy establishes whether the calcification lies in the bladder or ureter.'), ('What must be treated after stone removal?', 'The cause of urinary stasis or infection, such as bladder outlet obstruction or neurogenic dysfunction.')], 'Staghorn calculus': [('What is the danger of operating with untreated infection?', 'Sepsis. I would obtain culture, give culture-directed antibiotics and plan drainage if there is infected obstruction.'), ('How do you assess residual renal function?', 'Serum creatinine, differential renal function when indicated, and cross-sectional imaging of renal anatomy.')], 'Ureteric calculus': [('What is the red-flag combination?', 'Obstructed infected kidney: renal colic with fever or sepsis, obstruction and impaired drainage. It needs urgent drainage.'), ('What is the first-line analgesic in uncomplicated renal colic?', 'An NSAID if not contraindicated, with antiemetic and additional analgesia as required.')], 'Intravenous urography': [('What do you check before contrast?', 'Renal function, prior contrast reaction, pregnancy status, hydration and concurrent risk factors.'), ('What has replaced IVU in many centres?', 'CT urography or CT KUB, depending on the clinical question.')], 'Retrograde urography': [('What is its main complication?', 'UTI, urothelial injury or perforation, and contrast extravasation.'), ('Why might it be preferred in obstruction?', 'It outlines the collecting system without requiring renal excretion of IV contrast.')], 'MCU': [('What is the major paediatric indication?', 'Assessment of vesicoureteric reflux and investigation of suspected posterior urethral valves.'), ('What would reflux look like?', 'Contrast ascends from the bladder into the ureter and may reach the renal pelvis and calyces.')], 'Achalasia cardia': [('How do you exclude pseudoachalasia?', 'Upper GI endoscopy with biopsy where indicated, supported by imaging and clinical features.'), ('What is the definitive test?', 'High-resolution esophageal manometry.')], 'Carcinoma esophagus': [('How is diagnosis confirmed?', 'Endoscopic biopsy.'), ('How is it staged?', 'Cross-sectional staging with CT, with endoscopic ultrasound and PET-CT in selected cases.')], 'Carcinoma colon': [('How is diagnosis confirmed?', 'Colonoscopy and histological biopsy.'), ('What baseline staging do you request?', 'CT chest, abdomen and pelvis, CEA, and assessment for synchronous lesions.')], 'Ulcerative colitis': [('When does it become a surgical emergency?', 'Toxic megacolon, perforation, uncontrolled bleeding, or failure of intensive medical treatment.'), ('What plain-film measurement worries you?', 'Colonic dilatation, particularly transverse colon dilatation in the setting of systemic toxicity.')], 'Ileocecal tuberculosis': [('What is the key differential?', 'Crohn disease and ileocecal malignancy.'), ('How will you establish the diagnosis?', 'Histology and microbiological testing where possible, interpreted with clinical and cross-sectional imaging findings.')], 'Barium enema': [('When is barium contraindicated?', 'Suspected perforation. Water-soluble contrast is safer if a contrast examination is necessary.'), ('Why is it used less often now?', 'Colonoscopy provides biopsy and CT colonography offers cross-sectional assessment.')], 'Abdominal foreign body': [('Which object needs emergency removal from the esophagus?', 'A button battery.'), ('What is the concern with magnets?', 'Multiple magnets can trap bowel walls between them, causing necrosis, fistula and perforation.')], 'Worm infestation': [('What complication gives acute surgical obstruction?', 'A mass of Ascaris worms causing small-bowel obstruction.'), ('How may worms affect the biliary system?', 'Migration can cause biliary colic, cholangitis, cholecystitis or pancreatitis.')], 'Organo-axial gastric volvulus': [('State Borchardt triad.', 'Severe epigastric pain and distension, unproductive retching, and inability to pass a nasogastric tube.'), ('Why is this urgent?', 'It may cause closed-loop obstruction, gastric ischemia and perforation.')], 'Malpositioned intercostal drain': [('What constitutes adequate positioning?', 'The intrathoracic side holes and drain tip should be within the pleural space, with no side hole in subcutaneous tissue.'), ('What would make you reposition it?', 'Failure to drain, a side hole outside the chest, intrafissural placement with poor function, or suspected injury, with senior review.')], 'Skull fracture': [('What imaging is used for acute head injury?', 'CT head when indicated by validated head-injury criteria.'), ('Why is a normal skull X-ray not reassuring?', 'It cannot exclude intracranial hemorrhage or other traumatic brain injury.')] } def model_answer(title, dx, desc, findings): return (f'“This is a surgical radiograph showing <b>{dx.lower()}</b>. {desc} ' f'The key finding is {findings[0].lower()} I would assess the patient for immediate complications and escalate for definitive imaging and management according to clinical stability.”') ''' s=s.replace("out=base/'output'/'Surgical_XRay_Spotters_Viva_Refined.pdf'",insert+"\nout=base/'output'/'Surgical_XRay_Spotters_Viva_Model_Answers.pdf'") old="""story += [P('<b>Describe the film</b>','Body2'),P(desc),P('<b>Key points / pitfalls</b>','Body2')]+bullets(findings)+[P('<b>High-yield viva</b>','Body2')] for q,a in qas: story.append(P(f'<b>Q. {q}</b><br/><b>A.</b> {a}','Viva'))""" new="""story += [P('<b>Describe the film</b>','Body2'),P(desc),P('<b>Key points / pitfalls</b>','Body2')]+bullets(findings) story += [P('<b>Model viva answer - say this aloud</b>','Body2'), P(model_answer(title, dx, desc, findings),'Viva'), P('<b>Examiner follow-up questions</b>','Body2')] for q,a in probes.get(title,[]): story.append(P(f'<b>Examiner:</b> {q}<br/><b>Model answer:</b> {a}','Viva')) story += [P('<b>High-yield viva</b>','Body2')] for q,a in qas: story.append(P(f'<b>Q. {q}</b><br/><b>A.</b> {a}','Viva'))""" if old not in s: raise SystemExit('target not found') s=s.replace(old,new) open(p,'w',encoding='utf-8').write(s) PY python "/tmp/workspace/surgical-xray-viva/src/build.py" python -c "from pypdf import PdfReader; p='/tmp/workspace/surgical-xray-viva/output/Surgical_XRay_Spotters_Viva_Model_Answers.pdf'; r=PdfReader(p); t=''.join(x.extract_text() or '' for x in r.pages); print('pages=',len(r.pages),'chars=',len(t),'models=',t.count('Model viva answer'),'examiner=',t.count('Examiner follow-up'))"
Surgical XRay Spotters Viva Model Answers
PDF Document · PDF
Also add operative management
sigmoid volvulus small bowel obstruction operative management
WSES guidelines small bowel obstruction sigmoid volvulus operative management gastric volvulus
~/
python - <<'PY' p='/tmp/workspace/surgical-xray-viva/src/build.py' s=open(p,encoding='utf-8').read() needle="\ndef model_answer(title, dx, desc, findings):\n" operative=r''' operative = { 'Gas under diaphragm': ('Operative management', 'After resuscitation and broad-spectrum antibiotics, perform urgent source control when there is generalized peritonitis, sepsis or proven perforation. At laparotomy or laparoscopy, identify the site, control contamination, repair or resect as dictated by pathology and tissue viability, and wash out the peritoneal cavity. The procedure is diagnosis-specific: for example, primary closure with omental patch may be used for an appropriate perforated peptic ulcer; colonic perforation may require resection with or without stoma.'), 'Sigmoid volvulus': ('Operative management', 'If there is peritonitis, ischemia, perforation, shock or failed endoscopic detorsion, proceed to emergency laparotomy. Resect the sigmoid colon. In a stable patient with viable bowel and acceptable risk, primary colorectal anastomosis may be appropriate. With gangrene, perforation, fecal contamination or physiological instability, resection with end colostomy and rectal stump closure, such as Hartmann procedure, is usually safer. After successful endoscopic decompression, offer definitive sigmoid colectomy during the index admission when feasible.'), 'Small-bowel obstruction': ('Operative management', 'Operate urgently for peritonitis, strangulation or ischemia, perforation, closed-loop obstruction, irreducible incarcerated hernia, or deterioration/failure of non-operative treatment. Laparoscopy is selective; laparotomy is appropriate with marked distension, suspected ischemia or complex adhesions. Divide the causative band/adhesion, reduce hernia or volvulus, assess viability after warming and oxygenation, and resect non-viable bowel with anastomosis or stoma according to contamination and physiological stability.'), 'Pneumothorax': ('Procedural management', 'Most cases do not need an operation. Unstable tension pneumothorax requires immediate decompression followed by intercostal drainage. Persistent air leak, failure of re-expansion, recurrent pneumothorax, bilateral disease or high-risk occupation are indications for thoracic surgical opinion. Video-assisted thoracoscopic surgery with bleb/bulla treatment and pleurodesis is a common definitive approach.'), 'Flail chest with hemothorax': ('Operative management', 'Drain a significant hemothorax with an appropriately placed intercostal drain while providing resuscitation and analgesia. Urgent thoracotomy is considered for ongoing major intrathoracic hemorrhage, hemodynamic instability, cardiac/great-vessel injury, or retained hemothorax needing operative clearance according to local thresholds. Surgical stabilization of rib fractures is selective, for an unstable flail segment or severe displacement with failure of respiratory support or pain control.'), 'Bladder calculus': ('Operative management', 'Treat the underlying cause as well as the calculus. Options are transurethral cystolitholapaxy for suitable stones, percutaneous cystolitholapaxy, or open suprapubic cystolithotomy for very large stones or when concomitant open outlet surgery is needed. Correct bladder outlet obstruction, foreign body or neurogenic dysfunction to reduce recurrence.'), 'Staghorn calculus': ('Operative management', 'Control infection before definitive intervention and urgently drain an infected obstructed system with ureteric stent or nephrostomy. Percutaneous nephrolithotomy is the principal treatment for most staghorn stones and may be staged; flexible ureteroscopy or shockwave lithotripsy may be adjuncts for residual fragments. Consider nephrectomy only for a non-functioning kidney with persistent sepsis or symptoms after functional assessment.'), 'Ureteric calculus': ('Operative management', 'An obstructed infected kidney requires urgent drainage by ureteric stent or percutaneous nephrostomy, with antibiotics. Definitive stone treatment is deferred until sepsis resolves. For persistent symptomatic or obstructing stones, options include ureteroscopy with laser lithotripsy and stent, shockwave lithotripsy in selected cases, or percutaneous/rare open approaches for large or complex stones.'), 'Intravenous urography': ('Operative relevance', 'IVU is a diagnostic study rather than an operation. Use the findings to plan drainage or definitive treatment, for example ureteric stenting or nephrostomy for obstruction, followed by stone, stricture or tumor-specific treatment. Do not delay emergency decompression for an infected obstructed system to complete IVU.'), 'Retrograde urography': ('Operative relevance', 'This is commonly performed in the operating theatre or endoscopy suite. After cystoscopy, cannulate the ureteric orifice, inject contrast gently under fluoroscopy, identify the level of obstruction or injury, and place a ureteric stent if feasible. If retrograde stenting fails in infected obstruction or injury, arrange percutaneous nephrostomy or definitive reconstruction as appropriate.'), 'MCU': ('Operative relevance', 'MCU guides treatment rather than being operative. Posterior urethral valves require endoscopic valve ablation after stabilization and bladder drainage. High-grade reflux is usually managed initially with infection prevention and surveillance; selected persistent reflux, breakthrough infections or renal damage may need endoscopic injection or ureteric reimplantation.'), 'Achalasia cardia': ('Operative management', 'Definitive interventions include laparoscopic Heller cardiomyotomy, usually with partial fundoplication to reduce reflux, and peroral endoscopic myotomy. The myotomy divides the lower esophageal sphincter muscle while preserving mucosa. Choose the procedure based on subtype, esophageal anatomy, patient fitness, local expertise and prior treatment.'), 'Carcinoma esophagus': ('Operative management', 'Resectable disease is managed by a multidisciplinary team. Following staging and, when indicated, neoadjuvant therapy, esophagectomy with regional lymphadenectomy and gastric conduit reconstruction is considered for fit patients. The approach may be transthoracic, transhiatal or minimally invasive depending on tumor location and expertise. Unresectable disease needs palliation of dysphagia, nutrition support and oncological treatment.'), 'Carcinoma colon': ('Operative management', 'Perform oncological segmental colectomy with adequate vascular ligation, mesocolic resection and regional lymphadenectomy, followed by primary anastomosis when safe. In obstruction or perforation, the operation is tailored to site, contamination and physiology: options include resection with primary anastomosis, diversion or Hartmann procedure. Seek synchronous lesions and stage disease before elective surgery where possible.'), 'Ulcerative colitis': ('Operative management', 'Emergency subtotal colectomy with end ileostomy and rectal stump preservation is used for toxic megacolon, perforation, uncontrolled hemorrhage or medically refractory acute severe colitis. In elective definitive treatment, restorative proctocolectomy with ileal pouch-anal anastomosis is common in suitable patients; total proctocolectomy with permanent end ileostomy is an alternative.'), 'Ileocecal tuberculosis': ('Operative management', 'Antitubercular therapy is primary treatment. Surgery is reserved for complications such as complete obstruction, perforation, abscess, fistula, uncontrolled bleeding or unresolved diagnostic concern. Procedures are bowel-sparing when possible, such as stricturoplasty for short fibrotic strictures, limited ileocecal resection or right hemicolectomy when disease, perforation or malignancy cannot be excluded.'), 'Barium enema': ('Operative relevance', 'This study is not therapeutic. If it identifies obstructing malignancy, volvulus, perforation or toxic megacolon, management is directed by the pathology and clinical status. Do not use barium if perforation is suspected, because extravasated barium can cause severe peritoneal inflammation and complicate surgery.'), 'Abdominal foreign body': ('Operative management', 'Endoscopic retrieval is preferred for esophageal objects and many accessible gastric objects. Urgent surgery is needed for perforation, obstruction, peritonitis, failure of progression of a sharp object or magnets, or complications from ingested packets. The operative approach may be laparoscopy or laparotomy with enterotomy and removal, treating any bowel injury.'), 'Worm infestation': ('Operative management', 'Most patients receive anthelmintics. Operate for complete obstruction, perforation, volvulus, ischemia, or failure of conservative management. At laparotomy, gently milk worms into the colon when bowel is viable; enterotomy for extraction is reserved for an impacted bolus when milking fails. Resect non-viable or perforated bowel and manage biliary complications by endoscopy or surgery as indicated.'), 'Organo-axial gastric volvulus': ('Operative management', 'Acute volvulus with ischemia, perforation, failed endoscopic decompression or instability requires urgent operation. Reduce the volvulus, assess gastric viability, resect necrotic stomach if necessary, repair the predisposing diaphragmatic or paraesophageal defect, and perform gastropexy. In stable chronic cases, laparoscopic reduction with repair of hiatal defect and gastropexy is commonly used.'), 'Malpositioned intercostal drain': ('Procedural management', 'Do not blindly advance a malpositioned drain. If it is non-functional or side holes lie outside the pleura, remove or replace it under senior supervision using sterile technique at a correct site, and obtain follow-up imaging. Suspected organ injury, bleeding, mediastinal placement or intraperitoneal placement requires urgent surgical or interventional radiology review.'), 'Skull fracture': ('Operative management', 'A skull fracture alone is not an indication for surgery. Neurosurgical intervention is driven by intracranial injury: evacuate an epidural, subdural or intraparenchymal hematoma when clinical and CT criteria are met; elevate/debride selected open or depressed fractures, particularly with contamination, dural breach or significant depression. Follow trauma and neurosurgical protocols.'), } ''' if needle not in s: raise SystemExit('needle missing') s=s.replace(needle,'\n'+operative+needle) old="""story += [P('<b>Model viva answer - say this aloud</b>','Body2'), P(model_answer(title, dx, desc, findings),'Viva'), P('<b>Examiner follow-up questions</b>','Body2')]""" new="""story += [P('<b>Model viva answer - say this aloud</b>','Body2'), P(model_answer(title, dx, desc, findings),'Viva')] op_heading, op_text = operative.get(title, ('Operative relevance', 'No procedure is directly indicated by this image alone; management depends on the clinical diagnosis and patient stability.')) story += [P(f'<b>{op_heading}</b>','Body2'), P(op_text,'Viva'), P('<b>Examiner follow-up questions</b>','Body2')]""" if old not in s: raise SystemExit('target missing') s=s.replace(old,new) s=s.replace("out=base/'output'/'Surgical_XRay_Spotters_Viva_Model_Answers.pdf'","out=base/'output'/'Surgical_XRay_Spotters_Viva_Operative_Management.pdf'") open(p,'w',encoding='utf-8').write(s) PY python "/tmp/workspace/surgical-xray-viva/src/build.py" python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/surgical-xray-viva/output/Surgical_XRay_Spotters_Viva_Operative_Management.pdf' r=PdfReader(p) t=''.join(x.extract_text() or '' for x in r.pages) print('pages=',len(r.pages),'chars=',len(t),'operative mentions=',t.count('Operative management')+t.count('Procedural management')+t.count('Operative relevance')) print('exists',__import__('os').path.getsize(p)) PY
Surgical XRay Spotters Viva Operative Management
PDF Document · PDF