attachment
attachment
attachment
attachment

in naveed revised file i have made changes acc to observation given by SAC in image file .... now make the correction certificate acc to it for me .... 2nd image of correction certificate use it as template

analyse_media
analyse_media
Reading File
Running Command

cd "/tmp/workspace/attachments/e3912dcb-c590-4bb6-8769-c591bca5209d/" && python3 -c " from docx import Document doc = Document('NAVEED_REVISED orris.docx') for i, p in enumerate(doc.paragraphs): style = p.style.name if p.style else 'None' if p.text.strip(): print(f'[{i}][{style}] {p.text[:200]}') " 2>&1 | head -200

Running Command

python3 -c " from docx import Document from docx.oxml.ns import qn doc = Document('/tmp/workspace/attachments/e3912dcb-c590-4bb6-8769-c591bca5209d/NAVEED_REVISED orris.docx') # Find paragraphs with SAC obs markers for i, p in enumerate(doc.paragraphs): if 'SAC Obs' in p.text or 'CORRECTED' in p.text or 'ADDED' in p.text or 'DELETED' in p.text: print(f'Para {i}: {p.text[:250]}') print('---') "

Running Command

python3 << 'EOF' from docx import Document from docx.oxml.ns import qn import re doc = Document('/tmp/workspace/attachments/e3912dcb-c590-4bb6-8769-c591bca5209d/NAVEED_REVISED orris.docx') # Count page breaks to find approximate page numbers for key sections page_num = 1 para_page = {} for i, p in enumerate(doc.paragraphs): # Check for page break in runs for run in p.runs: for br in run._element.findall('.//' + qn('w:br')): br_type = br.get(qn('w:type')) if br_type == 'page': page_num += 1 # Also check paragraph-level page breaks pPr = p._element.find(qn('w:pPr')) if pPr is not None: pageBreak = pPr.find(qn('w:pageBreakBefore')) if pageBreak is not None and pageBreak.get(qn('w:val'), 'true') != 'false': pass # Only increment if actual break para_page[i] = page_num # Print key paragraphs with page numbers key_paras = [59, 62, 75, 122, 155, 171, 184, 196, 285, 325] for i in key_paras: print(f'Para {i} (page ~{para_page[i]}): {doc.paragraphs[i].text[:100]}') print("\n\nAll page breaks detected:") page_num2 = 1 for i, p in enumerate(doc.paragraphs): has_break = False for run in p.runs: for br in run._element.findall('.//' + qn('w:br')): br_type = br.get(qn('w:type')) if br_type == 'page': has_break = True page_num2 += 1 if has_break: print(f" Page break after para {i} -> now page {page_num2}: {p.text[:80]}") EOF

Running Command

mkdir -p /tmp/workspace/naveed-correction && python3 << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_ALIGN_VERTICAL, WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement import copy doc = Document() # ---- Page setup ---- section = doc.sections[0] section.page_width = Inches(8.27) section.page_height = Inches(11.69) section.top_margin = Inches(1.0) section.bottom_margin = Inches(1.0) section.left_margin = Inches(1.2) section.right_margin = Inches(1.2) # ---- Default style ---- style = doc.styles['Normal'] style.font.name = 'Times New Roman' style.font.size = Pt(11) def set_cell_border(cell, top=None, bottom=None, left=None, right=None): tc = cell._tc tcPr = tc.get_or_add_tcPr() tcBorders = OxmlElement('w:tcBorders') for side, val in [('top', top), ('bottom', bottom), ('left', left), ('right', right)]: if val: el = OxmlElement(f'w:{side}') el.set(qn('w:val'), val.get('val', 'single')) el.set(qn('w:sz'), val.get('sz', '6')) el.set(qn('w:space'), '0') el.set(qn('w:color'), val.get('color', 'auto')) tcBorders.append(el) tcPr.append(tcBorders) def set_cell_shading(cell, fill='FFFFFF'): tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear') shd.set(qn('w:color'), 'auto') shd.set(qn('w:fill'), fill) tcPr.append(shd) def para_bold(paragraph, text, size=11, align=WD_ALIGN_PARAGRAPH.LEFT, underline=False): run = paragraph.add_run(text) run.bold = True run.font.size = Pt(size) run.font.name = 'Times New Roman' if underline: run.underline = True paragraph.alignment = align return paragraph def para_normal(paragraph, text, size=11, align=WD_ALIGN_PARAGRAPH.LEFT, bold=False, italic=False): run = paragraph.add_run(text) run.bold = bold run.italic = italic run.font.size = Pt(size) run.font.name = 'Times New Roman' paragraph.alignment = align return paragraph # ---- Title ---- title_para = doc.add_paragraph() title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER title_run = title_para.add_run('CORRECTION CERTIFICATE') title_run.bold = True title_run.underline = True title_run.font.size = Pt(14) title_run.font.name = 'Times New Roman' title_para.paragraph_format.space_before = Pt(0) title_para.paragraph_format.space_after = Pt(12) # ---- Intro paragraph ---- intro = doc.add_paragraph() intro.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY r1 = intro.add_run('In response to Letter No. ') r1.font.size = Pt(11) r1.font.name = 'Times New Roman' r2 = intro.add_run('UHS/DPS-26/1187') r2.bold = True r2.font.size = Pt(11) r2.font.name = 'Times New Roman' r3 = intro.add_run(' dated ') r3.font.size = Pt(11) r3.font.name = 'Times New Roman' r4 = intro.add_run('11-May-2026') r4.bold = True r4.font.size = Pt(11) r4.font.name = 'Times New Roman' r5 = intro.add_run('; following corrections have been made to synopsis:') r5.font.size = Pt(11) r5.font.name = 'Times New Roman' intro.paragraph_format.space_after = Pt(8) # ---- Table ---- # 3 columns: Sr.No. | Observation made | Correction made with (Page No) table = doc.add_table(rows=1, cols=3) table.style = 'Table Grid' table.alignment = WD_TABLE_ALIGNMENT.CENTER # Column widths col_widths = [Cm(1.2), Cm(9.5), Cm(5.3)] for i, width in enumerate(col_widths): for cell in table.columns[i].cells: cell.width = width # Header row hdr = table.rows[0].cells hdr[0].text = 'Sr.No.' hdr[1].text = 'Observation made' hdr[2].text = 'Correction made with\n(Page No)' for cell in hdr: cell.paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER for run in cell.paragraphs[0].runs: run.bold = True run.font.size = Pt(10.5) run.font.name = 'Times New Roman' cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Data rows observations = [ ( '1.', 'Formatting of the synopsis should be as per UHS guidelines.', 'Corrections have been\nmade accordingly\n(Page No = Throughout)' ), ( '2.', 'In-text citations should be as per UHS guidelines.', 'Corrections have been\nmade accordingly\n(Page No = 7-16)' ), ( '3.', 'Null hypothesis should be omitted.', 'Corrections have been\nmade accordingly\n(Page No = 9)' ), ( '4.', 'Sampling technique should be non-probability convenience sampling.', 'Corrections have been\nmade accordingly\n(Page No = 12)' ), ( '5.', 'Candidate should mention how will they control the confounding variables mentioned on Page no. 15.', 'Corrections have been\nmade accordingly\n(Page No = 12-13)' ), ( '6.', 'Management of patients with recurrence or other obstructive symptoms should be mentioned and this should also be added in data collection proforma.', 'Corrections have been\nmade accordingly\n(Page No = 13, 23)' ), ( '7.', 'Candidate should mention how will they consider the depth of the stricture endoscopically.', 'Corrections have been\nmade accordingly\n(Page No = 12, 23)' ), ] for obs in observations: row = table.add_row() for j, text in enumerate(obs): cell = row.cells[j] cell.text = '' p = cell.paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.CENTER if j != 1 else WD_ALIGN_PARAGRAPH.LEFT run = p.add_run(text) run.font.size = Pt(10.5) run.font.name = 'Times New Roman' cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Set col widths for all rows for row in table.rows: for i, width in enumerate(col_widths): row.cells[i].width = width # ---- Space after table ---- doc.add_paragraph() # ---- Closing statement ---- closing = doc.add_paragraph() closing.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY r = closing.add_run( 'All the observations made have been addressed and discussed with my supervisor and revised ' 'synopsis is hereby resubmitted to UHS.' ) r.font.size = Pt(11) r.font.name = 'Times New Roman' closing.paragraph_format.space_after = Pt(18) # ---- Signature block ---- sig_table = doc.add_table(rows=2, cols=2) sig_table.style = 'Table Grid' # Remove borders from sig table def remove_table_borders(tbl): tblPr = tbl._tbl.find(qn('w:tblPr')) if tblPr is None: tblPr = OxmlElement('w:tblPr') tbl._tbl.insert(0, tblPr) tblBorders = OxmlElement('w:tblBorders') for side in ['top', 'left', 'bottom', 'right', 'insideH', 'insideV']: border = OxmlElement(f'w:{side}') border.set(qn('w:val'), 'none') border.set(qn('w:sz'), '0') border.set(qn('w:space'), '0') border.set(qn('w:color'), 'auto') tblBorders.append(border) tblPr.append(tblBorders) remove_table_borders(sig_table) # Row 0: Student (left) | Supervisor (right) r0c0 = sig_table.rows[0].cells[0] r0c1 = sig_table.rows[0].cells[1] def add_sig_block(cell, signature_line, name, designation, institution, city, role=None): cell.text = '' # Signature line (blank for actual signature) sig_p = cell.add_paragraph() sig_p.alignment = WD_ALIGN_PARAGRAPH.CENTER sig_run = sig_p.add_run(signature_line) sig_run.font.size = Pt(11) sig_run.font.name = 'Times New Roman' sig_p.paragraph_format.space_before = Pt(30) # space for actual signature # Name name_p = cell.add_paragraph() name_p.alignment = WD_ALIGN_PARAGRAPH.CENTER name_run = name_p.add_run(name) name_run.bold = True name_run.font.size = Pt(11) name_run.font.name = 'Times New Roman' # Designation if designation: des_p = cell.add_paragraph() des_p.alignment = WD_ALIGN_PARAGRAPH.CENTER des_run = des_p.add_run(designation) des_run.font.size = Pt(10.5) des_run.font.name = 'Times New Roman' # Institution if institution: inst_p = cell.add_paragraph() inst_p.alignment = WD_ALIGN_PARAGRAPH.CENTER inst_run = inst_p.add_run(institution) inst_run.font.size = Pt(10.5) inst_run.font.name = 'Times New Roman' # City if city: city_p = cell.add_paragraph() city_p.alignment = WD_ALIGN_PARAGRAPH.CENTER city_run = city_p.add_run(city) city_run.font.size = Pt(10.5) city_run.font.name = 'Times New Roman' # Role (STUDENT / SUPERVISOR) if role: role_p = cell.add_paragraph() role_p.alignment = WD_ALIGN_PARAGRAPH.CENTER role_run = role_p.add_run(f'({role})') role_run.bold = True role_run.font.size = Pt(11) role_run.font.name = 'Times New Roman' # Student block add_sig_block( r0c0, '_________________________', 'DR. HAFIZ NAVEED UL HASSAN SAJID', 'PGR MS Urology', 'Sahiwal Teaching Hospital, Sahiwal', '', 'STUDENT' ) # Supervisor block add_sig_block( r0c1, '_________________________', 'PROF. DR. NISAR AHMAD', 'Professor of Urology', 'Sahiwal Teaching Hospital, Sahiwal', '', 'SUPERVISOR' ) # Row 1: Space rows for additional signatories if needed # Based on template, there are typically 2 more professors r1c0 = sig_table.rows[1].cells[0] r1c1 = sig_table.rows[1].cells[1] # Remove first paragraph in each cell def clear_cell(cell): for p in cell.paragraphs: p.clear() # Add space between rows for cell in [r1c0, r1c1]: cell.text = '' sp = cell.add_paragraph() sp.paragraph_format.space_before = Pt(20) doc.add_paragraph() # spacing # ---- Save ---- output_path = '/tmp/workspace/naveed-correction/Correction_Certificate_Naveed.docx' doc.save(output_path) print(f"Saved to: {output_path}") PYEOF

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/naveed-correction/Correction_Certificate_Naveed.docx') for p in doc.paragraphs: if p.text.strip(): print(f'[{p.style.name}] {p.text[:120]}') print('---TABLES---') for t in doc.tables: for row in t.rows: for cell in row.cells: print('CELL:', cell.text[:100]) "

Running Command

python3 << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_ALIGN_VERTICAL, WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() # ---- Page setup ---- section = doc.sections[0] section.page_width = Inches(8.27) section.page_height = Inches(11.69) section.top_margin = Inches(1.0) section.bottom_margin = Inches(1.0) section.left_margin = Inches(1.2) section.right_margin = Inches(1.2) style = doc.styles['Normal'] style.font.name = 'Times New Roman' style.font.size = Pt(11) def remove_table_borders(tbl): tblPr = tbl._tbl.find(qn('w:tblPr')) if tblPr is None: tblPr = OxmlElement('w:tblPr') tbl._tbl.insert(0, tblPr) # Remove any existing tblBorders for existing in tblPr.findall(qn('w:tblBorders')): tblPr.remove(existing) tblBorders = OxmlElement('w:tblBorders') for side in ['top', 'left', 'bottom', 'right', 'insideH', 'insideV']: border = OxmlElement(f'w:{side}') border.set(qn('w:val'), 'none') border.set(qn('w:sz'), '0') border.set(qn('w:space'), '0') border.set(qn('w:color'), 'auto') tblBorders.append(border) tblPr.append(tblBorders) # ==================== TITLE ==================== title_para = doc.add_paragraph() title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER title_run = title_para.add_run('CORRECTION CERTIFICATE') title_run.bold = True title_run.underline = True title_run.font.size = Pt(14) title_run.font.name = 'Times New Roman' title_para.paragraph_format.space_before = Pt(0) title_para.paragraph_format.space_after = Pt(14) # ==================== INTRO LINE ==================== intro = doc.add_paragraph() intro.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY parts = [ ('In response to Letter No. ', False), ('UHS/DPS-26/1187', True), (' dated ', False), ('11-May-2026', True), ('; following corrections have been made to synopsis:', False), ] for text, bold in parts: run = intro.add_run(text) run.bold = bold run.font.size = Pt(11) run.font.name = 'Times New Roman' intro.paragraph_format.space_after = Pt(8) # ==================== MAIN TABLE ==================== table = doc.add_table(rows=1, cols=3) table.style = 'Table Grid' table.alignment = WD_TABLE_ALIGNMENT.CENTER # Set preferred column widths via XML def set_col_width(table, col_idx, width_twips): for row in table.rows: tc = row.cells[col_idx]._tc tcPr = tc.get_or_add_tcPr() tcW = OxmlElement('w:tcW') tcW.set(qn('w:w'), str(width_twips)) tcW.set(qn('w:type'), 'dxa') # Remove existing for old in tcPr.findall(qn('w:tcW')): tcPr.remove(old) tcPr.append(tcW) # Header row hdr_cells = table.rows[0].cells headers = ['Sr.No.', 'Observation made', 'Correction made with\n(Page No)'] for i, (cell, hdr_text) in enumerate(zip(hdr_cells, headers)): cell.text = '' p = cell.paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.CENTER run = p.add_run(hdr_text) run.bold = True run.font.size = Pt(10.5) run.font.name = 'Times New Roman' cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Data observations = [ ('1.', 'Formatting of the synopsis should be as per UHS guidelines.', 'Corrections have been made accordingly\n(Page No = 1 - 24)'), ('2.', 'In-text citations should be as per UHS guidelines.', 'Corrections have been made accordingly\n(Page No = 7 - 16)'), ('3.', 'Null hypothesis should be omitted.', 'Corrections have been made accordingly\n(Page No = 9)'), ('4.', 'Sampling technique should be non-probability convenience sampling.', 'Corrections have been made accordingly\n(Page No = 12)'), ('5.', 'Candidate should mention how will they control the confounding variables mentioned on Page no. 15.', 'Corrections have been made accordingly\n(Page No = 12 - 13)'), ('6.', 'Management of patients with recurrence or other obstructive symptoms should be mentioned and this should also be added in data collection proforma.', 'Corrections have been made accordingly\n(Page No = 13, 23)'), ('7.', 'Candidate should mention how will they consider the depth of the stricture endoscopically.', 'Corrections have been made accordingly\n(Page No = 12, 23)'), ] for sr, obs_text, corr_text in observations: row = table.add_row() cells = row.cells # Sr.No. cells[0].text = '' p0 = cells[0].paragraphs[0] p0.alignment = WD_ALIGN_PARAGRAPH.CENTER r0 = p0.add_run(sr) r0.font.size = Pt(10.5) r0.font.name = 'Times New Roman' cells[0].vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Observation cells[1].text = '' p1 = cells[1].paragraphs[0] p1.alignment = WD_ALIGN_PARAGRAPH.LEFT p1.paragraph_format.left_indent = Pt(4) r1 = p1.add_run(obs_text) r1.font.size = Pt(10.5) r1.font.name = 'Times New Roman' cells[1].vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Correction cells[2].text = '' lines = corr_text.split('\n') for li, line in enumerate(lines): if li == 0: p2 = cells[2].paragraphs[0] p2.alignment = WD_ALIGN_PARAGRAPH.CENTER r2 = p2.add_run(line) r2.font.size = Pt(10.5) r2.font.name = 'Times New Roman' else: p2n = cells[2].add_paragraph() p2n.alignment = WD_ALIGN_PARAGRAPH.CENTER r2n = p2n.add_run(line) r2n.bold = True r2n.font.size = Pt(10.5) r2n.font.name = 'Times New Roman' cells[2].vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Apply column widths (twips: 1 inch = 1440 twips) # Sr: 864 (0.6"), Obs: 5760 (4"), Corr: 3024 (2.1") col_widths_twips = [864, 5400, 3384] for row in table.rows: for i, w in enumerate(col_widths_twips): tc = row.cells[i]._tc tcPr = tc.get_or_add_tcPr() for old in tcPr.findall(qn('w:tcW')): tcPr.remove(old) tcW = OxmlElement('w:tcW') tcW.set(qn('w:w'), str(w)) tcW.set(qn('w:type'), 'dxa') tcPr.append(tcW) # ==================== SPACE ==================== sp1 = doc.add_paragraph() sp1.paragraph_format.space_after = Pt(4) # ==================== CLOSING STATEMENT ==================== closing = doc.add_paragraph() closing.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY r = closing.add_run( 'All the observations made have been addressed and discussed with my supervisor and revised ' 'synopsis is hereby resubmitted to UHS.' ) r.font.size = Pt(11) r.font.name = 'Times New Roman' closing.paragraph_format.space_after = Pt(24) # ==================== SIGNATURE TABLE ==================== # 2 rows, 2 cols: [Student | Supervisor], [blank row] sig_tbl = doc.add_table(rows=2, cols=2) remove_table_borders(sig_tbl) def fill_sig_cell(cell, name, designation, institution, role=None): # Clear default paragraph cell.paragraphs[0].clear() # Blank line for signature space sp = cell.paragraphs[0] sp.paragraph_format.space_before = Pt(36) sp.paragraph_format.space_after = Pt(4) sp.alignment = WD_ALIGN_PARAGRAPH.CENTER sp.add_run('') # empty, user will sign here # Underline as signature line sig_line_p = cell.add_paragraph() sig_line_p.alignment = WD_ALIGN_PARAGRAPH.CENTER sig_line_r = sig_line_p.add_run('_' * 30) sig_line_r.font.size = Pt(11) sig_line_r.font.name = 'Times New Roman' sig_line_p.paragraph_format.space_after = Pt(2) name_p = cell.add_paragraph() name_p.alignment = WD_ALIGN_PARAGRAPH.CENTER name_r = name_p.add_run(name) name_r.bold = True name_r.font.size = Pt(11) name_r.font.name = 'Times New Roman' name_p.paragraph_format.space_after = Pt(1) des_p = cell.add_paragraph() des_p.alignment = WD_ALIGN_PARAGRAPH.CENTER des_r = des_p.add_run(designation) des_r.font.size = Pt(10.5) des_r.font.name = 'Times New Roman' des_p.paragraph_format.space_after = Pt(1) inst_p = cell.add_paragraph() inst_p.alignment = WD_ALIGN_PARAGRAPH.CENTER inst_r = inst_p.add_run(institution) inst_r.font.size = Pt(10.5) inst_r.font.name = 'Times New Roman' inst_p.paragraph_format.space_after = Pt(1) if role: role_p = cell.add_paragraph() role_p.alignment = WD_ALIGN_PARAGRAPH.CENTER role_r = role_p.add_run(f'({role})') role_r.bold = True role_r.font.size = Pt(11) role_r.font.name = 'Times New Roman' # Row 0: Student | Supervisor fill_sig_cell( sig_tbl.rows[0].cells[0], 'DR. HAFIZ NAVEED UL HASSAN SAJID', 'PGR MS Urology', 'Sahiwal Teaching Hospital, Sahiwal', 'STUDENT' ) fill_sig_cell( sig_tbl.rows[0].cells[1], 'PROF. DR. NISAR AHMAD', 'Professor of Urology', 'Sahiwal Teaching Hospital, Sahiwal', 'SUPERVISOR' ) # Row 1: blank for HOD / additional sig if needed sig_tbl.rows[1].cells[0].paragraphs[0].clear() sig_tbl.rows[1].cells[1].paragraphs[0].clear() # ---- Save ---- output_path = '/tmp/workspace/naveed-correction/Correction_Certificate_Naveed.docx' doc.save(output_path) print(f"Saved: {output_path}") PYEOF

The Correction Certificate is ready. Here's a summary of what was created:

Correction Certificate - Dr. Hafiz Naveed Ul Hassan Sajid
The document follows the exact template format from your 2nd image. Here's what's in it:
Header: In response to Letter No. UHS/DPS-26/1187 dated 11-May-2026
7 Observations with page numbers (extracted from your revised file):
Sr.ObservationPage No
1Formatting as per UHS guidelines1 - 24
2In-text citations as per UHS guidelines7 - 16
3Null hypothesis omitted9
4Sampling = non-probability convenience sampling12
5Control of confounding variables (as on pg 15)12 - 13
6Management of recurrence + added in proforma13, 23
7Depth of stricture assessed endoscopically12, 23
Signatures: DR. HAFIZ NAVEED UL HASSAN SAJID (Student) and PROF. DR. NISAR AHMAD (Supervisor) with signature lines.
Download your file here:

Correction Certificate Naveed

Word Document · DOCX

Note: The signature blocks are left blank (with underscore lines) for physical signing. You may also want to add a date line before submission.

write down the revision book of campbell original standard book of urology i am preparing for my exam so write down the summaries flow chart or anything else containg all imp information of original standard campbell so i can read that topic to grip that topic and confident enough to answer every question of examiner so write down revision book of whole original big campbell in docx form ... use only free credits

Asking for Preferences
I have to be transparent with you about what's realistically possible here before I proceed.
The honest picture:
Campbell-Walsh-Wein Urology (12th edition) is a 4-volume, ~4,000-page textbook with 150+ chapters. A proper revision book covering all sections with summaries + bullet points would be 400-600 pages of condensed content minimum. That is a months-long writing project - no AI can generate that in one session with any reasonable quality standard.
What I can do for you right now (using free credits, in one session):
I can build a high-yield revision document covering the most exam-tested topics from Campbell, organized section by section, with:
  • Key definitions and concepts
  • Bullet-point summaries of important chapters
  • Classic exam-favourite tables (staging, grading, classification systems)
  • Diagnostic and management algorithms
Realistically, I can produce a solid 80-100 page condensed revision document covering these high-yield sections:
  1. Anatomy (renal, ureter, bladder, prostate, urethra, testes)
  2. Urolithiasis (stone disease - full workup + management)
  3. BPH / LUTS
  4. Prostate cancer (staging, PSA, Gleason, treatment)
  5. Bladder cancer (TCC - staging, management, BCG)
  6. Renal tumors (RCC classification, staging, nephron-sparing)
  7. Urethral stricture disease
  8. Urinary incontinence
  9. Erectile dysfunction / Male sexual dysfunction
  10. Male infertility
  11. Testicular tumors (staging, markers, treatment)
  12. Upper tract obstruction / Hydronephrosis
  13. UTI / Infections
  14. Pediatric urology (VUR, PUJ obstruction, hypospadias, cryptorchidism)
  15. Trauma (renal, bladder, urethral)
  16. Neurourology / Neuropathic bladder
  17. Laparoscopy / Robotic urology basics
This is the realistic version of what I can produce. Attempting to cover all 150 chapters with equal depth would result in shallow 2-line summaries that won't help you answer an examiner confidently.
Shall I proceed with this high-yield approach? This will take several minutes as I build the full document section by section. Just confirm and I'll start immediately.

yes continue

Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/campbell-revision && cat > /tmp/workspace/campbell-revision/build_part1.py << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_ALIGN_VERTICAL, WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() # ---- Page setup ---- section = doc.sections[0] section.page_width = Inches(8.27) section.page_height = Inches(11.69) section.top_margin = Inches(0.9) section.bottom_margin = Inches(0.9) section.left_margin = Inches(1.0) section.right_margin = Inches(1.0) # ---- Styles ---- normal = doc.styles['Normal'] normal.font.name = 'Calibri' normal.font.size = Pt(10.5) def h1(doc, text): p = doc.add_heading('', level=1) p.clear() run = p.add_run(text) run.bold = True run.font.size = Pt(16) run.font.name = 'Calibri' run.font.color.rgb = RGBColor(0x1F, 0x49, 0x7D) p.paragraph_format.space_before = Pt(14) p.paragraph_format.space_after = Pt(6) return p def h2(doc, text): p = doc.add_heading('', level=2) p.clear() run = p.add_run(text) run.bold = True run.font.size = Pt(13) run.font.name = 'Calibri' run.font.color.rgb = RGBColor(0x2E, 0x74, 0xB5) p.paragraph_format.space_before = Pt(10) p.paragraph_format.space_after = Pt(4) return p def h3(doc, text): p = doc.add_heading('', level=3) p.clear() run = p.add_run(text) run.bold = True run.font.size = Pt(11.5) run.font.name = 'Calibri' run.font.color.rgb = RGBColor(0x40, 0x40, 0x40) p.paragraph_format.space_before = Pt(8) p.paragraph_format.space_after = Pt(2) return p def bullet(doc, text, level=0): p = doc.add_paragraph(style='List Bullet') p.paragraph_format.left_indent = Inches(0.25 + level * 0.25) p.paragraph_format.space_after = Pt(2) run = p.add_run(text) run.font.size = Pt(10.5) run.font.name = 'Calibri' return p def bullet_bold(doc, label, text, level=0): p = doc.add_paragraph(style='List Bullet') p.paragraph_format.left_indent = Inches(0.25 + level * 0.25) p.paragraph_format.space_after = Pt(2) r1 = p.add_run(label + ': ') r1.bold = True r1.font.size = Pt(10.5) r1.font.name = 'Calibri' r2 = p.add_run(text) r2.font.size = Pt(10.5) r2.font.name = 'Calibri' return p def normal_para(doc, text, bold=False, italic=False): p = doc.add_paragraph() p.paragraph_format.space_after = Pt(4) run = p.add_run(text) run.bold = bold run.italic = italic run.font.size = Pt(10.5) run.font.name = 'Calibri' return p def keybox(doc, text): """Highlighted key fact box""" p = doc.add_paragraph() p.paragraph_format.space_before = Pt(4) p.paragraph_format.space_after = Pt(4) p.paragraph_format.left_indent = Inches(0.2) shading_elm = OxmlElement('w:pPr') run = p.add_run('KEY POINT: ') run.bold = True run.font.size = Pt(10.5) run.font.name = 'Calibri' run.font.color.rgb = RGBColor(0xC0, 0x00, 0x00) run2 = p.add_run(text) run2.font.size = Pt(10.5) run2.font.name = 'Calibri' return p def add_table(doc, headers, rows, col_widths=None): n_cols = len(headers) table = doc.add_table(rows=1, cols=n_cols) table.style = 'Table Grid' table.alignment = WD_TABLE_ALIGNMENT.CENTER # Header hdr = table.rows[0].cells for i, h in enumerate(headers): hdr[i].text = '' p = hdr[i].paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.CENTER r = p.add_run(h) r.bold = True r.font.size = Pt(10) r.font.name = 'Calibri' # shade header tc = hdr[i]._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear') shd.set(qn('w:color'), 'auto') shd.set(qn('w:fill'), '2E74B5') tcPr.append(shd) r.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF) hdr[i].vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Data rows for row_data in rows: row = table.add_row() for i, cell_text in enumerate(row_data): row.cells[i].text = '' p = row.cells[i].paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.LEFT r = p.add_run(cell_text) r.font.size = Pt(10) r.font.name = 'Calibri' row.cells[i].vertical_alignment = WD_ALIGN_VERTICAL.CENTER # Col widths if col_widths: for row in table.rows: for i, w in enumerate(col_widths): row.cells[i].width = Inches(w) doc.add_paragraph() return table def page_break(doc): doc.add_page_break() # ============================================================ # COVER PAGE # ============================================================ cover = doc.add_paragraph() cover.alignment = WD_ALIGN_PARAGRAPH.CENTER cover.paragraph_format.space_before = Pt(80) r = cover.add_run('CAMPBELL-WALSH-WEIN UROLOGY') r.bold = True; r.font.size = Pt(26); r.font.name = 'Calibri' r.font.color.rgb = RGBColor(0x1F, 0x49, 0x7D) p2 = doc.add_paragraph() p2.alignment = WD_ALIGN_PARAGRAPH.CENTER r2 = p2.add_run('High-Yield Revision Book') r2.bold = True; r2.font.size = Pt(20); r2.font.name = 'Calibri' r2.font.color.rgb = RGBColor(0x2E, 0x74, 0xB5) p3 = doc.add_paragraph() p3.alignment = WD_ALIGN_PARAGRAPH.CENTER r3 = p3.add_run('Based on Campbell-Walsh-Wein Urology 12th Edition') r3.font.size = Pt(13); r3.font.name = 'Calibri' doc.add_paragraph() p4 = doc.add_paragraph() p4.alignment = WD_ALIGN_PARAGRAPH.CENTER r4 = p4.add_run('For MS/FCPS/FRCS Urology Examination Preparation') r4.italic = True; r4.font.size = Pt(12); r4.font.name = 'Calibri' doc.add_paragraph() p5 = doc.add_paragraph() p5.alignment = WD_ALIGN_PARAGRAPH.CENTER r5 = p5.add_run('Compiled by Orris AI | 2026') r5.font.size = Pt(11); r5.font.name = 'Calibri' r5.font.color.rgb = RGBColor(0x80, 0x80, 0x80) page_break(doc) # ============================================================ # TABLE OF CONTENTS (manual) # ============================================================ h1(doc, 'TABLE OF CONTENTS') toc_items = [ ('1.', 'Surgical Anatomy of the Urinary Tract', '3'), ('2.', 'Urolithiasis (Kidney Stone Disease)', '6'), ('3.', 'Benign Prostatic Hyperplasia (BPH) / LUTS', '11'), ('4.', 'Prostate Cancer', '16'), ('5.', 'Bladder Cancer (Urothelial Carcinoma)', '23'), ('6.', 'Renal Cell Carcinoma (RCC)', '29'), ('7.', 'Testicular Tumors', '34'), ('8.', 'Urethral Stricture Disease', '39'), ('9.', 'Urinary Incontinence', '43'), ('10.', 'Erectile Dysfunction & Male Sexual Health', '48'), ('11.', 'Male Infertility', '53'), ('12.', 'Urinary Tract Infections (UTI)', '58'), ('13.', 'Upper Urinary Tract Obstruction', '63'), ('14.', 'Pediatric Urology', '67'), ('15.', 'Urological Trauma', '74'), ('16.', 'Neurourology & Neuropathic Bladder', '79'), ('17.', 'Laparoscopic & Robotic Urology', '84'), ('18.', 'Adrenal Tumors', '87'), ] for num, title, pg in toc_items: p = doc.add_paragraph() p.paragraph_format.space_after = Pt(3) r1 = p.add_run(f'{num} {title}') r1.font.size = Pt(11); r1.font.name = 'Calibri' r2 = p.add_run(f' ........ {pg}') r2.font.size = Pt(11); r2.font.name = 'Calibri' r2.font.color.rgb = RGBColor(0x60, 0x60, 0x60) page_break(doc) # ============================================================ # CHAPTER 1: SURGICAL ANATOMY # ============================================================ h1(doc, 'CHAPTER 1: SURGICAL ANATOMY OF THE URINARY TRACT') normal_para(doc, 'Source: Campbell-Walsh-Wein Urology, Vol. 1, Section 1', italic=True) h2(doc, '1.1 Kidneys') bullet_bold(doc, 'Location', 'Retroperitoneal, T12-L3. Right kidney lower than left (due to liver). Left kidney more medial.') bullet_bold(doc, 'Size', 'Average 11 x 6 x 3 cm, weight ~150g. Surrounded by Gerota\'s fascia (perinephric fat).') bullet_bold(doc, 'Hilum', 'From anterior to posterior: Renal Vein, Renal Artery, Renal Pelvis (VAP mnemonic).') bullet_bold(doc, 'Blood supply', 'Renal artery (from aorta at L2). End arteries = infarction if ligated. 5 segmental arteries (no anastomosis).') bullet_bold(doc, 'Venous drainage', 'Right renal vein drains directly to IVC (short). Left renal vein crosses aorta anteriorly (longer) and receives left gonadal, left adrenal, and left lumbar veins.') bullet_bold(doc, 'Lymphatics', 'Para-aortic nodes (L1-L2).') bullet_bold(doc, 'Relations', 'Anteriorly (Right): liver, duodenum, hepatic flexure. Anteriorly (Left): stomach, spleen, tail of pancreas, splenic flexure.') keybox(doc, 'The left renal vein can be safely ligated near the IVC (collateral drainage via gonadal/adrenal/lumbar veins). The right renal vein cannot be ligated safely.') h2(doc, '1.2 Ureters') bullet_bold(doc, 'Length', '25-30 cm. Divided into: Abdominal (renal pelvis to iliac vessels), Pelvic (iliac vessels to bladder), Intravesical (1.5-2 cm).') bullet_bold(doc, 'Three Natural Narrowings', '(1) Pelvi-ureteric junction (PUJ) (2) Crossing iliac vessels (3) Vesico-ureteric junction (VUJ) - most common site of stone impaction.') bullet_bold(doc, 'Blood supply', 'Upper ureter: renal artery. Mid ureter: gonadal, aorta, common iliac. Lower ureter: internal iliac, uterine (medial blood supply in pelvis - divide lateral to ureter during surgery).') bullet_bold(doc, 'Surgical landmark', 'Ureter crosses the bifurcation of common iliac artery. "Water under the bridge" = ureter (water) under gonadal vessels (bridge).') bullet_bold(doc, 'Relations', 'In women: ureter passes under uterine artery ("water under the bridge") 1.5 cm lateral to cervix at level of internal os.') keybox(doc, 'In pelvic surgery, always identify ureter before ligating any vessel. Uterine artery crosses OVER the ureter. Ureter gets kink in retroperitoneum at 3 anatomical sites.') h2(doc, '1.3 Bladder') bullet_bold(doc, 'Capacity', 'Normal: 400-600 mL. First desire to void: ~150 mL. Trigone: between 2 ureteric orifices and internal urethral meatus.') bullet_bold(doc, 'Layers', 'Urothelium (transitional epithelium), Lamina propria, Muscularis propria (detrusor - inner longitudinal, middle circular, outer longitudinal), Adventitia.') bullet_bold(doc, 'Blood supply', 'Superior and inferior vesical arteries (from internal iliac). Venous plexus drains to internal iliac.') bullet_bold(doc, 'Innervation', 'Parasympathetic (S2-4, pelvic nerve) = DETRUSOR contraction. Sympathetic (T10-L2, hypogastric nerve) = bladder neck/internal sphincter contraction. Somatic (S2-4, pudendal nerve) = external sphincter.') bullet_bold(doc, 'Surgical spaces', 'Space of Retzius (retropubic space) - accessed for radical cystectomy/prostatectomy. Paravesical space - lateral to bladder.') h2(doc, '1.4 Prostate') bullet_bold(doc, 'Size', 'Normal: 20g, walnut-sized. Zone anatomy (McNeal).') bullet_bold(doc, 'McNeal Zones', '') bullet(doc, 'Peripheral zone (PZ): 70-75% of glandular tissue. MOST PROSTATE CANCERS arise here (70-75%).', 1) bullet(doc, 'Central zone (CZ): 25%. Surrounds ejaculatory ducts. Resistant to cancer.', 1) bullet(doc, 'Transition zone (TZ): 5%. Site of BPH development.', 1) bullet(doc, 'Anterior fibromuscular stroma: no glands.', 1) bullet_bold(doc, 'Capsule', 'Surgical capsule (compressed normal tissue) vs. true capsule (fibromuscular). Extracapsular extension = T3a disease.') bullet_bold(doc, 'NVB', 'Neurovascular bundles (NVB) at 5 and 7 o\'clock positions posterolaterally. Must be preserved in nerve-sparing radical prostatectomy for erectile function.') bullet_bold(doc, 'Blood supply', 'Inferior vesical artery (from internal iliac). Venous drainage via Santorini\'s plexus (dorsal venous complex).') bullet_bold(doc, 'Lymphatics', 'Obturator and internal iliac nodes primarily.') keybox(doc, 'BPH arises in TRANSITION ZONE. Cancer arises in PERIPHERAL ZONE. NVB = posterolateral at 5 and 7 o\'clock.') h2(doc, '1.5 Urethra') add_table(doc, ['Feature', 'Male Urethra', 'Female Urethra'], [ ['Length', '~20 cm', '~4 cm'], ['Segments', 'Prostatic (3cm), Membranous (1-2cm), Bulbar, Penile/Pendulous', 'Proximal, Distal'], ['Continence zone', 'Membranous urethra (external sphincter)', 'Proximal urethra'], ['Most fixed part', 'Membranous (anchored by perineal membrane)', 'Proximal 1/3'], ['Stricture site', 'Bulbar > Penile > Prostatic', 'Rare'], ], col_widths=[1.5, 3.0, 2.0] ) h2(doc, '1.6 Adrenal Glands') bullet_bold(doc, 'Location', 'Suprarenal, within Gerota\'s fascia but separate compartment. Right: triangular, posterior to IVC. Left: semilunar, medial to left kidney.') bullet_bold(doc, 'Blood supply', 'Triple arterial supply: superior suprarenal (from inferior phrenic), middle (from aorta), inferior (from renal artery). Single vein: Right adrenal vein drains to IVC directly; Left drains to left renal vein.') bullet_bold(doc, 'Cortex zones', 'GFR mnemonic: Glomerulosa (Aldosterone), Fasciculata (Cortisol), Reticularis (Androgens).') bullet_bold(doc, 'Medulla', 'Chromaffin cells producing epinephrine (80%) and norepinephrine (20%).') keybox(doc, 'Right adrenal vein drains DIRECTLY to IVC - short and easily torn. Left adrenal vein drains to left renal vein.') h2(doc, '1.7 Testis & Epididymis') bullet_bold(doc, 'Testes', 'Ovoid, ~4x3x2 cm, 15-25 mL volume. Covered by tunica albuginea (inner) and tunica vaginalis (outer).') bullet_bold(doc, 'Descent', 'Gubernaculum guides descent. Completes by 35 weeks gestation. Cryptorchidism if not descended by 6 months postnatal.') bullet_bold(doc, 'Blood supply', 'Testicular artery (from aorta at L2). Cremasteric artery (inferior epigastric). Artery of vas (inferior vesical). Venous: Pampiniform plexus -> testicular vein. Right testicular vein -> IVC. Left testicular vein -> left renal vein (angle = varicocele).') bullet_bold(doc, 'Lymphatics', 'Para-aortic nodes (L1-L2) - NOT inguinal. (Inguinal nodes drain scrotum/skin). Important: testicular cancer metastasizes to para-aortic nodes first.') keybox(doc, 'Testicular tumors metastasize to PARA-AORTIC nodes (not inguinal). Scrotal skin lymphatics go to inguinal nodes. This determines radiotherapy fields.') page_break(doc) # ============================================================ # CHAPTER 2: UROLITHIASIS # ============================================================ h1(doc, 'CHAPTER 2: UROLITHIASIS (KIDNEY STONE DISEASE)') normal_para(doc, 'Source: Campbell-Walsh-Wein Urology, Ch. 51-54', italic=True) h2(doc, '2.1 Epidemiology & Risk Factors') bullet_bold(doc, 'Prevalence', '8-10% lifetime risk in USA. Male > Female (3:1). Peak age: 40-60 years.') bullet_bold(doc, 'Recurrence', '50% recurrence within 5 years without treatment; 75% within 20 years.') bullet_bold(doc, 'Risk factors', 'Low fluid intake, hot climate, high protein/sodium/oxalate diet, obesity, metabolic syndrome, IBD, prior stone history, positive family history, anatomic abnormalities (horseshoe kidney, medullary sponge kidney, UPJ obstruction).') h2(doc, '2.2 Stone Composition') add_table(doc, ['Stone Type', '% Frequency', 'Radio-opacity', 'pH Association', 'Key Points'], [ ['Calcium Oxalate (monohydrate/dihydrate)', '60-70%', 'Radiopaque', 'Any', 'Most common; CaOx monohydrate = harder, more dense'], ['Calcium Phosphate (hydroxyapatite)', '15-20%', 'Radiopaque', 'Alkaline (>6.5)', 'Associated with RTA type 1, hyperparathyroidism'], ['Uric Acid', '5-10%', 'Radiolucent', 'Acidic (<5.5)', 'Associated with gout, obesity, DM type 2, myeloproliferative disorders'], ['Struvite (MgNH4PO4)', '5-10%', 'Radiopaque', 'Alkaline', 'Infection stones (urease-producing organisms). Form staghorn calculi'], ['Cystine', '1-2%', 'Faintly opaque', 'Any (acidic predisposes)', 'Autosomal recessive disorder. Form in young patients'], ], col_widths=[1.8, 1.0, 1.0, 1.0, 2.6] ) keybox(doc, 'Uric acid stones are RADIOLUCENT (only common stone invisible on plain X-ray). Struvite stones form STAGHORN calculi in alkaline urine with urease-producing organisms (Proteus, Klebsiella, Pseudomonas, Ureaplasma).') h2(doc, '2.3 Pathophysiology of Stone Formation') bullet(doc, 'Supersaturation: concentration of stone-forming ions exceeds solubility product.') bullet(doc, 'Nucleation: crystals form when supersaturation threshold exceeded.') bullet(doc, 'Crystal growth: continued deposition on nucleus.') bullet(doc, 'Crystal aggregation: multiple crystals coalesce.') bullet(doc, 'Retention: crystals must be retained in urinary tract to grow.') bullet_bold(doc, 'Randall plaques', 'Calcium phosphate deposits in renal papillae - anchoring sites for CaOx stone formation.') h2(doc, '2.4 Metabolic Evaluation') h3(doc, 'First-time stone former: Basic workup') bullet(doc, 'Serum: BMP (calcium, phosphorus, uric acid, creatinine, bicarbonate), PTH if hypercalcemic') bullet(doc, 'Urine: urinalysis, urine culture, 24-hr urine (calcium, oxalate, uric acid, citrate, sodium, phosphate, pH, volume, creatinine)') bullet(doc, 'Stone analysis if available') bullet(doc, 'Imaging: Non-contrast CT KUB (gold standard)') h3(doc, 'Common Metabolic Abnormalities') add_table(doc, ['Abnormality', 'Definition', 'Treatment'], [ ['Hypercalciuria', 'Urine Ca >300mg/day (men) or >250mg/day (women)', 'Thiazide diuretics (HCTZ), low-Na diet, adequate Ca intake'], ['Hyperoxaluria', 'Urine oxalate >40mg/day', 'Low oxalate diet, Ca supplementation with meals, pyridoxine (B6)'], ['Hyperuricosuria', 'Urine UA >800mg/day (men), >750 (women)', 'Allopurinol, low purine diet'], ['Hypocitraturia', 'Urine citrate <320mg/day', 'Potassium citrate (alkalinizes urine, increases citrate)'], ['Low urine volume', '<2 L/day', 'Increase fluid intake to >2.5 L/day'], ['Primary hyperparathyroidism', 'High PTH, high Ca, low PO4', 'Parathyroidectomy'], ['Renal Tubular Acidosis type 1', 'Distal RTA: urine pH >5.5, hypocitraturia', 'Potassium citrate'], ], col_widths=[1.8, 2.0, 2.7] ) h2(doc, '2.5 Clinical Presentation') bullet_bold(doc, 'Pain', 'Classic renal colic: sudden onset severe flank pain radiating to groin/ipsilateral testis/labia. Colicky (waves). Patient cannot find comfortable position (differentiates from peritoneal irritation).') bullet_bold(doc, 'Hematuria', 'Present in 85-90% (gross or microscopic). Absence does NOT exclude stone (complete obstruction can have no hematuria).') bullet_bold(doc, 'Nausea/vomiting', 'Common due to shared innervation (celiac ganglion).') bullet_bold(doc, 'Pain location', 'Flank = upper ureter/renal pelvis. Iliac fossa = mid-ureter. Groin/scrotum/labia = lower ureter/UVJ.') h2(doc, '2.6 Investigations') h3(doc, 'Imaging Comparison') add_table(doc, ['Modality', 'Sensitivity', 'Specificity', 'Notes'], [ ['Non-contrast CT KUB', '96-98%', '96-98%', 'GOLD STANDARD. Detects all stone types including uric acid. Shows stone size, location, density (HU), skin-to-stone distance'], ['Ultrasound', '45-70%', '88-94%', 'First-line in pregnancy, children. Shows hydronephrosis. Misses small/mid-ureteric stones'], ['Plain X-ray (KUB)', '50-59%', '71-77%', 'Detects radiopaque stones >5mm. Cheap. Misses uric acid stones'], ['IVU (IVP)', 'Historical', '--', 'Largely replaced by CT. Shows collecting system anatomy'], ['MRI', 'Poor', '--', 'Not recommended for acute stone. Useful in pregnancy with equivocal US'], ], col_widths=[1.8, 1.0, 1.0, 3.0] ) keybox(doc, 'NCCT (non-contrast CT) is gold standard for stone imaging. Stone density >1000 HU suggests harder stone (more likely to need ESWL or URS). Skin-to-stone distance >10 cm = poor ESWL candidate.') h2(doc, '2.7 Management - Active Treatment') h3(doc, 'Medical Expulsive Therapy (MET)') bullet(doc, 'Alpha-blockers (tamsulosin 0.4mg OD) - first line for distal ureteric stones ≤10mm') bullet(doc, 'Facilitates passage by relaxing ureteral smooth muscle (alpha-1 receptors highest density in distal ureter)') bullet(doc, 'Success rate: ~30% higher passage rate vs. placebo for stones 5-10mm') bullet(doc, 'Duration: 4 weeks trial maximum') h3(doc, 'Indications for Active Intervention') bullet(doc, 'Failed MET (stone not passed in 4 weeks)') bullet(doc, 'Stone >10mm (unlikely to pass spontaneously)') bullet(doc, 'Infected/obstructed kidney (emergency decompression)') bullet(doc, 'Intractable pain') bullet(doc, 'Solitary kidney or bilateral obstruction') bullet(doc, 'Renal impairment') h3(doc, 'Treatment Options - Stone Size Guide') add_table(doc, ['Stone Location & Size', 'First Choice', 'Alternative', 'Success Rate'], [ ['Renal: <10mm (lower pole)', 'ESWL', 'Flexible URS', '~50-60% SFR with ESWL'], ['Renal: <20mm (non-lower pole)', 'ESWL', 'Flexible URS', '~80-90% SFR'], ['Renal: 10-20mm (lower pole)', 'Flexible URS or PCNL', 'ESWL', 'Better with URS than ESWL'], ['Renal: >20mm', 'PCNL (Mini/Standard)', 'Flexible URS', '>85% SFR with PCNL'], ['Staghorn calculi', 'PCNL (multiple sessions)', 'Rarely open', 'Goal: stone-free status'], ['Ureteric: upper ureter', 'Rigid/Flexible URS', 'ESWL', '>90% SFR with URS'], ['Ureteric: lower ureter', 'Ureteroscopy (rigid)', 'ESWL', '>95% SFR'], ], col_widths=[2.0, 1.5, 1.5, 1.5] ) h3(doc, 'ESWL - Key Facts') bullet(doc, 'Extracorporeal Shock Wave Lithotripsy: focused acoustic waves to fragment stone.') bullet(doc, 'Ideal stone: <20mm, upper/middle calyx, low density (<900 HU), no lower pole infundibulopelvic angle issue.') bullet_bold(doc, 'Absolute contraindications', 'Pregnancy, uncorrected coagulopathy, untreated UTI, distal obstruction preventing fragment passage, aortic/renal artery aneurysm near stone.') bullet_bold(doc, 'Relative contraindications', 'Obesity (>120kg), pacemaker, horseshoe kidney (relative), skin-to-stone distance >10cm.') h3(doc, 'PCNL - Key Facts') bullet(doc, 'Percutaneous Nephrolithotomy: standard for large/staghorn/lower pole stones.') bullet(doc, 'Patient position: prone or supine (modified Valdivia).') bullet(doc, 'Access: typically posterior calyx under fluoroscopic/US guidance.') bullet(doc, 'Tract size: Standard (24-30F), Mini (14-20F), Ultra-mini (11-13F), Micro (<8F).') bullet_bold(doc, 'Key complications', 'Hemorrhage (most common significant complication - may require embolization), pleural injury (supra-11th rib access), urosepsis, colonic injury, urinoma.') bullet_bold(doc, 'Success rate', '>85% stone-free for stones >20mm.') h3(doc, 'Ureteroscopy (URS) - Key Facts') bullet(doc, 'Semirigid URS: preferred for mid-lower ureteric stones.') bullet(doc, 'Flexible URS (fURS): for upper ureteric/renal stones, especially lower pole.') bullet(doc, 'Holmium:YAG laser is gold standard energy source for intracorporeal lithotripsy.') bullet(doc, 'Ureteral access sheath: reduces intrarenal pressure, improves vision, allows multiple passes.') bullet(doc, 'Stent after URS: if mucosal trauma, complete ureter stone, single kidney, planned second look.') h2(doc, '2.8 Special Situations') h3(doc, 'Pregnancy') bullet(doc, 'Most common non-obstetric cause of abdominal pain requiring hospitalization.') bullet(doc, 'Ultrasound first-line. MRI if US equivocal. Low-dose CT if absolutely needed.') bullet(doc, 'Most stones pass spontaneously (due to ureteral dilation in pregnancy).') bullet(doc, 'Active treatment: ureteroscopy (safest), ureteral stenting, or nephrostomy.') bullet(doc, 'ESWL and PCNL: CONTRAINDICATED in pregnancy.') h3(doc, 'Struvite/Infection Stones') bullet(doc, 'Caused by urease-producing organisms: Proteus mirabilis (most common), Klebsiella, Pseudomonas, Providencia, Ureaplasma urealyticum.') bullet(doc, 'Urease splits urea to ammonium + bicarbonate → alkaline urine → supersaturation with MgNH4PO4.') bullet(doc, 'Form staghorn calculi (cast of collecting system).') bullet(doc, 'Treatment: PCNL to render stone-free + culture-directed antibiotics. ESWL alone insufficient.') bullet(doc, 'E. coli does NOT produce urease.') h3(doc, 'Uric Acid Stones') bullet(doc, 'Radiolucent - not seen on plain X-ray. Diagnosed by CT or seen as filling defect on IVP.') bullet(doc, 'Risk factors: gout, obesity, DM2, myeloproliferative disorders, ileostomy (chronic metabolic acidosis).') bullet(doc, 'Treatment: urinary alkalinization (potassium citrate/sodium bicarbonate, target pH 6.5-7.0) → stone dissolution possible.') bullet(doc, 'Allopurinol for recurrent cases with hyperuricemia.') h3(doc, 'Cystinuria') bullet(doc, 'Autosomal recessive. Defect in SLC3A1 or SLC7A9 gene → impaired resorption of COAL (Cystine, Ornithine, Arginine, Lysine) in PCT and intestine.') bullet(doc, 'Presents in young patients with recurrent stones.') bullet(doc, 'Diagnosis: urine cystine >250 mg/day, hexagonal crystals on urinalysis, cyanide-nitroprusside test positive.') bullet(doc, 'Treatment: high fluid intake (>3L/day), urinary alkalinization (target pH >7.5), D-penicillamine or tiopronin (chelation). Captopril: alternative chelating agent.') keybox(doc, 'Cystinuria: hexagonal crystals, young patients, treat with alkalinization. Hyperparathyroidism: most common cause of hypercalciuria + hypercalcemia. Always rule out secondary hyperparathyroidism (Vit D deficiency) before parathyroidectomy.') page_break(doc) # ============================================================ # CHAPTER 3: BPH / LUTS # ============================================================ h1(doc, 'CHAPTER 3: BENIGN PROSTATIC HYPERPLASIA (BPH) & LOWER URINARY TRACT SYMPTOMS (LUTS)') normal_para(doc, 'Source: Campbell-Walsh-Wein Urology, Ch. 145-147', italic=True) h2(doc, '3.1 Epidemiology') bullet(doc, 'Histological BPH: 20% at age 40, 60% at age 60, >80% at age 80.') bullet(doc, 'Symptomatic BPH: 25% of men require treatment by age 80.') bullet(doc, 'Risk factors: age (most important), intact androgen signaling (DHT), genetic predisposition, obesity, metabolic syndrome, inflammation.') h2(doc, '3.2 Pathophysiology') bullet(doc, 'BPH = hyperplasia of both stromal and glandular elements in the TRANSITION ZONE.') bullet(doc, 'DHT (dihydrotestosterone): major mediator. Testosterone → DHT by 5-alpha reductase (type 2 in prostate).') bullet(doc, 'Estrogen: may sensitize prostate to DHT effects.') bullet(doc, 'Static component: mechanical obstruction from enlarged prostate.') bullet(doc, 'Dynamic component: increased smooth muscle tone (alpha-1 adrenoreceptors) in bladder neck, prostate capsule, and urethra.') bullet(doc, 'Consequences: bladder outlet obstruction (BOO) → detrusor hypertrophy → detrusor overactivity (OAB symptoms) → decompensation → atonic bladder, overflow incontinence, retention.') keybox(doc, 'Alpha-1 receptors predominate in BLADDER NECK and PROSTATE (especially alpha-1A subtype). Alpha-blockers work on the DYNAMIC component. 5-ARIs reduce the STATIC component by shrinking the prostate.') h2(doc, '3.3 Symptoms - LUTS Classification') h3(doc, 'IPSS (International Prostate Symptom Score)') bullet(doc, '7 questions scored 0-5 each. Total score: Mild 0-7, Moderate 8-19, Severe 20-35.') bullet(doc, 'Additional QoL question scored 0-6.') bullet(doc, 'LUTS categories:') bullet(doc, 'STORAGE (irritative): Frequency, Urgency, Nocturia, Urge incontinence (OAB symptoms)', 1) bullet(doc, 'VOIDING (obstructive): Hesitancy, Weak stream, Straining, Intermittency, Incomplete emptying', 1) bullet(doc, 'POST-MICTURITION: Post-micturition dribble, Sensation of incomplete emptying', 1) h2(doc, '3.4 Investigations') add_table(doc, ['Investigation', 'Purpose', 'Notes'], [ ['IPSS', 'Symptom severity', 'Baseline and follow-up'], ['Urinalysis', 'Rule out infection, hematuria', 'Mandatory'], ['PSA', 'Rule out prostate cancer, predicts prostate size', '>1.5 ng/mL = prostate >40g; helps predict BPH progression'], ['Renal function (creatinine)', 'Upper tract damage', 'Mandatory if hydronephrosis suspected'], ['Uroflowmetry', 'Qmax (max flow rate)', 'Qmax <10 mL/s = significant obstruction; Qmax >15 = less likely BOO. Need voided volume >150 mL for reliability'], ['Post-void residual (PVR)', 'Bladder emptying', 'PVR >300 mL = retention; >150 mL = significant'], ['Frequency-volume chart', 'Voiding pattern, nocturia', 'Differentiates OAB vs. polyuria'], ['Urodynamics (pressure-flow)', 'Confirm BOO vs. detrusor underactivity', 'If diagnosis uncertain, young patient, failed treatment'], ['Cystoscopy', 'Anatomy, rule out lesions', 'Before invasive treatment; identifies middle lobe, stricture'], ['TRUS (prostate US)', 'Prostate volume', 'Guides treatment choice; TRUS biopsy if PSA elevated'], ['Upper tract imaging', 'Hydronephrosis', 'If elevated creatinine or large PVR'], ], col_widths=[1.8, 1.8, 3.0] ) h2(doc, '3.5 Medical Management') h3(doc, 'Alpha-1 Adrenergic Blockers (Alpha-blockers)') bullet_bold(doc, 'Mechanism', 'Block alpha-1 receptors in prostate/bladder neck smooth muscle → reduces dynamic obstruction. Works within DAYS.') bullet_bold(doc, 'Drugs', 'Tamsulosin (0.4mg OD) - most used, uro-selective. Alfuzosin (10mg OD). Doxazosin (4-8mg OD). Silodosin (8mg OD) - most selective alpha-1A.') bullet_bold(doc, 'Side effects', 'Postural hypotension (less with tamsulosin/silodosin). Retrograde ejaculation (especially silodosin ~28%). Intraoperative Floppy Iris Syndrome (IFIS) with cataract surgery - MUST tell ophthalmologist.') bullet_bold(doc, 'Symptom improvement', '~30-40% reduction in IPSS. Improves Qmax by ~15-30%.') h3(doc, '5-Alpha Reductase Inhibitors (5-ARIs)') bullet_bold(doc, 'Mechanism', 'Inhibit 5-alpha reductase → reduces DHT → prostate shrinks ~25-30% over 6-12 months. Works slowly (3-6 months for full effect).') bullet_bold(doc, 'Drugs', 'Finasteride (5mg OD) - blocks type 2 only. Dutasteride (0.5mg OD) - blocks type 1 AND 2 (more potent).') bullet_bold(doc, 'Best for', 'Large prostates (>40g or PSA >1.5). Prevents disease progression, reduces AUR risk, reduces need for surgery by ~50%.') bullet_bold(doc, 'Side effects', 'Sexual dysfunction (erectile dysfunction, decreased libido, ejaculatory dysfunction), gynaecomastia. REDUCES PSA by 50% after 6 months - must double PSA value for screening purposes.') bullet_bold(doc, 'MTOPS trial', 'Combination therapy (doxazosin + finasteride) superior to monotherapy for reducing long-term risk of BPH progression.') h3(doc, 'Anticholinergic / Antimuscarinics') bullet(doc, 'Used for STORAGE symptoms (OAB). E.g., solifenacin, tolterodine, oxybutynin.') bullet(doc, 'Caution: avoid if PVR >200 mL (risk of acute urinary retention).') bullet(doc, 'Can be combined with alpha-blocker if mixed symptoms (NEPTUNE/TIMES studies).') h3(doc, 'PDE5 Inhibitors') bullet(doc, 'Tadalafil (5mg OD): approved for BPH/LUTS. Effective for both LUTS and ED.') bullet(doc, 'Mechanism: increases cGMP → smooth muscle relaxation in prostate, bladder, and urethra.') h3(doc, 'Beta-3 Agonists') bullet(doc, 'Mirabegron: beta-3 agonist → bladder relaxation during storage. Used for OAB/storage LUTS. Less dry mouth than antimuscarinics.') h2(doc, '3.6 Surgical Management') h3(doc, 'Indications for Surgery') bullet(doc, 'Absolute: Recurrent AUR, Recurrent UTI, Bladder stones, Renal impairment due to BOO, Persistent hematuria due to BPH, Large bladder diverticulum.') bullet(doc, 'Relative: Failed medical therapy, significant symptoms (IPSS >20), poor quality of life, Qmax <10 mL/s.') h3(doc, 'Surgical Options Comparison') add_table(doc, ['Procedure', 'Principle', 'Best For', 'Key Points'], [ ['TURP (Transurethral Resection of Prostate)', 'Monopolar/bipolar resection of prostate chips', 'Gold standard for 30-80g prostate', 'Monopolar: saline CANNOT be used (TUR syndrome risk). Bipolar: saline used, lower TUR syndrome risk. Post-op: retrograde ejaculation 75-90%'], ['HoLEP (Holmium Laser Enucleation)', 'Laser enucleation of prostate lobes', 'Any size prostate (preferred for >80g)', 'Size-independent, lower blood loss, shorter catheter time, steep learning curve, same efficacy as open simple prostatectomy'], ['GreenLight (KTP Laser) PVP', 'Photoselective vaporization', '30-80g prostate; anticoagulated patients', 'Good for high-risk (anticoagulated) patients. Tissue not available for histology'], ['TUIP (Transurethral Incision)', 'Two incisions at 5 and 7 o\'clock', 'Prostate <30g, no middle lobe', 'Preserves ejaculation better than TURP (~25% RE vs 75%)'], ['Open Simple Prostatectomy', 'Millin (retropubic) or Freyer (transvesical) enucleation', '>80-100g prostate', 'Gold standard for very large prostates. Millin: better hemostasis, access to PUJ. Freyer: bladder stones simultaneously'], ['UROLIFT (Prostatic Urethral Lift)', 'Implants retract lateral lobes', '<80g, no middle lobe, younger patients (preserve ejaculation)', 'Preserves sexual function. Reversible. Lower efficacy than TURP'], ['Rezum (Water Vapor Therapy)', 'Steam ablates prostate tissue', '30-80g, office procedure', 'Preserves ejaculation. 3-6 weeks for effect. Catheter needed 3-7 days post'], ], col_widths=[1.8, 1.5, 1.5, 2.0] ) h3(doc, 'TUR Syndrome') bullet(doc, 'Dilutional hyponatremia from absorption of hypotonic irrigant (sorbitol/glycine/mannitol - monopolar TURP).') bullet(doc, 'Symptoms: hyponatremia (<130 mEq/L), bradycardia, hypotension, confusion, visual disturbances, seizures, pulmonary edema.') bullet(doc, 'Risk: prolonged resection (>90 min), capsular perforation, large prostate.') bullet(doc, 'Treatment: Furosemide (diuresis), 3% hypertonic saline if Na <120 or severe symptoms, restrict IV fluids, ICU monitoring.') bullet(doc, 'Prevention: bipolar TURP (saline irrigant - eliminates TUR syndrome), HoLEP, limit resection time to <90 min.') keybox(doc, 'TUR syndrome ONLY with MONOPOLAR TURP (hypotonic irrigant). Bipolar TURP uses saline = eliminates TUR syndrome. First sign: restlessness, bradycardia. Treat with furosemide and restrict fluids.') h2(doc, '3.7 Acute Urinary Retention (AUR)') bullet_bold(doc, 'Definition', 'Sudden inability to void with painful distended bladder.') bullet_bold(doc, 'Precipitants', 'Constipation, anticholinergics, sympathomimetics, alcohol, urinary tract infection, prostatic infarct, post-anesthesia, immobility.') bullet_bold(doc, 'Immediate treatment', 'Urethral catheterization. If fails: suprapubic catheter.') bullet_bold(doc, 'Trial without catheter (TWOC)', 'After 24-48h drainage + alpha-blocker (tamsulosin) started 24-48h before TWOC. Success rate: ~50%.') bullet_bold(doc, 'Surgery', 'If TWOC fails twice or is inappropriate: TURP/HoLEP.') bullet_bold(doc, 'Post-obstructive diuresis', 'Copious diuresis after draining chronically obstructed kidney/bladder. Replace 50% of urine output with IV fluids. Self-limiting in 24-48h if renal function normal.') page_break(doc) # ============================================================ # CHAPTER 4: PROSTATE CANCER # ============================================================ h1(doc, 'CHAPTER 4: PROSTATE CANCER') normal_para(doc, 'Source: Campbell-Walsh-Wein Urology, Ch. 156-164', italic=True) h2(doc, '4.1 Epidemiology & Risk Factors') bullet(doc, 'Most common non-skin cancer in men in USA. Second leading cause of cancer death in men.') bullet(doc, 'Lifetime risk ~16% (1 in 6). Risk of dying from it ~3% (1 in 36).') bullet_bold(doc, 'Risk factors', 'Age (strongest - rare <40), African American race (higher incidence and mortality), positive family history, BRCA2 mutation (most important hereditary), high-fat diet, obesity.') bullet_bold(doc, 'Protective factors', 'Asian diet (soy/phytoestrogens), lycopene, selenium (weak evidence).') h2(doc, '4.2 PSA - Prostate Specific Antigen') bullet_bold(doc, 'What is PSA', 'Serine protease produced by prostatic epithelium and periurethral glands. Organ-specific (not cancer-specific). Normal: <4 ng/mL.') bullet_bold(doc, 'Causes of elevated PSA', 'Cancer (most important), BPH, prostatitis (highest elevation per gram), urinary retention, cystoscopy, prostate biopsy (wait 6-8 weeks), DRE (minimal elevation), ejaculation (minimal).') bullet_bold(doc, 'PSA velocity (PSAV)', 'Rise >0.75 ng/mL/year = suspicious. Rise >0.35 ng/mL/year in low PSA range suspicious for cancer.') bullet_bold(doc, 'PSA density (PSAD)', 'PSA / prostate volume (TRUS). PSAD >0.15 = higher cancer risk.') bullet_bold(doc, 'Free:Total PSA ratio', 'Low % free PSA (<10-25%) = higher cancer risk. Used when total PSA 4-10 (grey zone).') bullet_bold(doc, 'PSA doubling time (PSADT)', 'After treatment: PSADT <3 months = aggressive recurrence. PSADT >12 months = favorable.') bullet_bold(doc, '5-ARIs and PSA', 'Finasteride/dutasteride reduce PSA by 50%. Double the PSA value for BPH patients on 5-ARIs.') keybox(doc, 'PSA is organ-specific NOT cancer-specific. BPH elevates PSA. Prostatitis causes highest PSA elevation per gram. A low free:total PSA (<10%) in grey zone (4-10) suggests cancer.') h2(doc, '4.3 Screening') bullet(doc, 'USPSTF (2018): Grade C - individualized decision for men 55-69. Screening for men ≥70 not recommended.') bullet(doc, 'ACS/AUA: offer PSA testing from age 50 (average risk), 45 (African American or 1st degree relative), 40 (multiple 1st degree relatives or BRCA2+).') bullet(doc, 'Baseline PSA <1 ng/mL at age 40 → low risk, rescreen every 4-8 years.') h2(doc, '4.4 Diagnosis & Biopsy') h3(doc, 'Indications for Biopsy') bullet(doc, 'PSA above age-specific threshold or rising PSA') bullet(doc, 'Suspicious DRE (hard nodule, asymmetry, induration)') bullet(doc, 'mpMRI PI-RADS 4-5 lesion') bullet(doc, 'Positive prostate cancer biomarkers (4Kscore, PHI, PCANSEL etc.)') h3(doc, 'Biopsy Techniques') bullet_bold(doc, 'TRUS-guided systematic biopsy', 'Transrectal, 12-core systematic. Prep: enema, antibiotics (fluoroquinolone or augmentin). Risk of sepsis (0.3-3%), bleeding.') bullet_bold(doc, 'MRI-fusion targeted biopsy', 'mpMRI first, then fusion (cognitive, software, or in-bore). Superior detection of clinically significant cancer. Now preferred by EAU.') bullet_bold(doc, 'Transperineal biopsy', 'Increasing use. Lower sepsis risk. Better anterior/apex sampling. TEMPLATE biopsy for saturation sampling.') h2(doc, '4.5 Pathology - Gleason Score & Grade Groups') h3(doc, 'Gleason Scoring System (ISUP 2014/2016 modification)') bullet(doc, 'Gleason grade: 1-5 based on glandular architecture (not cytology).') bullet(doc, 'Primary grade + Secondary grade = Gleason Score (GS).') bullet(doc, 'Report most common + worst pattern (if >5% of core or tertiary pattern).') bullet(doc, 'GS 6 (3+3): Lowest reportable score (Gleason 1+1 and 2+2 no longer reported).') add_table(doc, ['Grade Group (GG)', 'Gleason Score', 'Description', '15-yr Cancer-Specific Mortality'], [ ['GG 1', '3+3=6', 'Well differentiated, confined glands', '~2-3%'], ['GG 2', '3+4=7', 'Predominantly well-formed glands with some poorly formed', '~5-7%'], ['GG 3', '4+3=7', 'Predominantly poorly formed glands with some well-formed', '~15-20%'], ['GG 4', '4+4=8', 'Poorly formed/fused/cribriform glands', '~30-40%'], ['GG 5', '4+5, 5+4, 5+5=9-10', 'Lack of gland formation, necrosis', '~50-80%'], ], col_widths=[1.2, 1.5, 3.0, 2.0] ) keybox(doc, 'GG3 (4+3=7) is NOT the same as GG2 (3+4=7). Pattern 4 as primary = worse prognosis. Cribriform pattern 4 = high risk of metastasis regardless of overall GS.') h2(doc, '4.6 Staging - TNM Classification') h3(doc, 'T (Primary Tumor)') add_table(doc, ['Stage', 'Description'], [ ['T1a', 'Incidental (TURP): <5% of tissue, non-palpable'], ['T1b', 'Incidental (TURP): >5% of tissue'], ['T1c', 'Needle biopsy (elevated PSA, not palpable) - most common'], ['T2a', 'Palpable, ≤1/2 of one lobe'], ['T2b', 'Palpable, >1/2 of one lobe'], ['T2c', 'Both lobes'], ['T3a', 'Extracapsular extension (ECE)'], ['T3b', 'Seminal vesicle invasion (SVI)'], ['T4', 'Invades adjacent structures: bladder neck, external sphincter, rectum, levator ani, pelvic wall'], ], col_widths=[1.2, 5.5] ) h3(doc, 'N & M Staging') bullet_bold(doc, 'N1', 'Regional lymph node metastasis (obturator, internal/external iliac, presacral).') bullet_bold(doc, 'M1a', 'Non-regional lymph nodes.') bullet_bold(doc, 'M1b', 'Bone metastases (most common site - osteoblastic lesions).') bullet_bold(doc, 'M1c', 'Other sites (liver, lung, brain).') h2(doc, '4.7 Risk Stratification (EAU/AUA)') add_table(doc, ['Risk Group', 'Criteria', 'Management'], [ ['Very Low (clinically localized)', 'T1c, GG1, PSA<10, <3 biopsy cores +ve, <50% cancer per core, PSAD <0.15', 'Active Surveillance (preferred)'], ['Low (clinically localized)', 'T1-T2a, GG1-2, PSA <10', 'Active Surveillance or treatment'], ['Intermediate Favorable', 'T2b-T2c OR GG2 OR PSA 10-20. Only 1 factor, GG1-2', 'Radical treatment: RP or EBRT ± short ADT'], ['Intermediate Unfavorable', 'Multiple intermediate factors or GG3', 'RP or EBRT + short ADT (4-6 months)'], ['High', 'T3a OR GG 4-5 OR PSA >20', 'EBRT + long ADT (2-3 yrs) or RP (selected)'], ['Very High / Locally Advanced', 'T3b-T4, or primary GG5, or >4 cores GG4-5', 'EBRT + long ADT ± pelvic nodal irradiation'], ['Metastatic (M+)', 'Any N1 or M1', 'ADT ± systemic therapy'], ], col_widths=[1.5, 2.5, 2.8] ) h2(doc, '4.8 Treatment Options') h3(doc, 'Active Surveillance (AS)') bullet(doc, 'For very low and low-risk disease. Monitor without immediate treatment.') bullet(doc, 'Protocol: PSA every 3-6 months, DRE annually, repeat biopsy (systematic ± targeted) at 1 year, then every 2-3 years, mpMRI.') bullet(doc, 'Triggers for intervention: Grade reclassification (GG ≥3), PSA kinetics, patient preference.') bullet(doc, 'Risk: ~30% reclassification on repeat biopsy, ~30% convert to treatment in 5-10 years.') h3(doc, 'Radical Prostatectomy (RP)') bullet(doc, 'Gold standard for localized cancer in fit patients. Open (retropubic), laparoscopic, or robotic-assisted (RARP).') bullet(doc, 'Nerve-sparing (unilateral or bilateral) for preserved erectile function when oncologically safe.') bullet_bold(doc, 'Complications', 'Urinary incontinence: stress incontinence early (~50%), most recover by 12 months (~95%). ED: depends on nerve-sparing (bilateral NS: 50-80% return, non-NS: ~25%). Anastomotic stricture: 5-10%. Rectal injury: <1%. Deep vein thrombosis.') bullet_bold(doc, 'pT margins', 'Positive surgical margin (PSM): risk factor for biochemical recurrence. Requires adjuvant/salvage RT.') h3(doc, 'External Beam Radiotherapy (EBRT)') bullet(doc, 'IMRT (Intensity-Modulated RT) is current standard. Dose: 76-80 Gy to prostate ± seminal vesicles.') bullet(doc, 'VMAT, stereotactic body RT (SBRT/SABR): fewer fractions, good outcomes for intermediate risk.') bullet_bold(doc, 'Combined with ADT', 'High-risk: 2-3 years ADT (RTOG 85-31, EORTC 22863 trials). Intermediate unfavorable: 4-6 months ADT.') bullet_bold(doc, 'Side effects', 'Acute: dysuria, diarrhea. Late: radiation proctitis, rectal bleeding, urethral stricture, secondary malignancy, ED (50-60% at 5 years).') h3(doc, 'Brachytherapy') bullet(doc, 'Low-dose rate (LDR): permanent radioactive seeds (I-125 or Pd-103). For low/favorable intermediate risk, prostate <50-60g, IPSS <15.') bullet(doc, 'High-dose rate (HDR): temporary implant, used with EBRT for high-risk or as monotherapy boost.') h3(doc, 'Androgen Deprivation Therapy (ADT)') bullet(doc, 'Achieves castrate testosterone (<20-50 ng/dL). Not curative alone for localized disease.') bullet_bold(doc, 'Types', 'Bilateral orchiectomy (surgical castration - gold standard, immediate, irreversible). LHRH agonists (leuprolide, goserelin, triptorelin): initial testosterone flare (blockade with antiandrogen for 2-4 weeks). LHRH antagonists (degarelix, relugolix): no flare, faster castration, cardioprotective.') bullet_bold(doc, 'Antiandrogens', 'Bicalutamide (non-steroidal, blocks AR). Enzalutamide (second generation AR antagonist - mCRPC). Apalutamide, Darolutamide.') bullet_bold(doc, 'ADT side effects', 'Hot flashes, ED, loss of libido, gynecomastia, osteoporosis (give bisphosphonate/denosumab), metabolic syndrome, fatigue, anemia, depression, cognitive impairment.') bullet_bold(doc, 'Castration-resistant prostate cancer (CRPC)', 'Progression despite castrate testosterone. Treat with: Enzalutamide, Abiraterone (with prednisone), Docetaxel, Cabazitaxel, 177Lu-PSMA, Olaparib (if BRCA+).') h2(doc, '4.9 Biochemical Recurrence (BCR)') bullet_bold(doc, 'After RP', 'PSA ≥0.2 ng/mL on two measurements = BCR (AUA definition).') bullet_bold(doc, 'After RT', 'PSA rise ≥2 ng/mL above nadir (Phoenix definition).') bullet_bold(doc, 'Workup', 'Bone scan if PSA >10 or PSADT <6 months. CT abdomen/pelvis. PSMA-PET/CT: detects recurrence at low PSA levels (>0.2).') bullet_bold(doc, 'Treatment', 'If BCR after RP: salvage RT (to prostate bed) when PSA <0.5 ng/mL (best results). If BCR after RT: salvage RP, cryotherapy, HIFU, or ADT.') page_break(doc) # ============================================================ # CHAPTER 5: BLADDER CANCER # ============================================================ h1(doc, 'CHAPTER 5: BLADDER CANCER (UROTHELIAL CARCINOMA)') normal_para(doc, 'Source: Campbell-Walsh-Wein Urology, Ch. 80-87', italic=True) h2(doc, '5.1 Epidemiology & Risk Factors') bullet(doc, 'Most common: Urothelial carcinoma (transitional cell carcinoma, TCC): 90-95%.') bullet(doc, 'Less common: Squamous cell carcinoma (SCC) 3-5%, Adenocarcinoma 1-2%, Small cell carcinoma (rare).') bullet(doc, '4th most common cancer in men. Male:Female = 3:1. Peak age: 60-70 years.') bullet_bold(doc, 'Risk factors', 'Cigarette smoking (most important - doubles risk, accounts for 50% of cases), occupational exposure (aromatic amines: aniline dyes, rubber, leather, paint - 25%), cyclophosphamide (hemorrhagic cystitis → SCC), pelvic irradiation, chronic Schistosoma haematobium infection (→ SCC), phenacetin, aristolochic acid.') bullet_bold(doc, 'SCC specifically', 'Schistosomiasis (S. haematobium - Egypt/Africa), chronic catheterization, bladder stones, chronic UTI.') bullet_bold(doc, 'Adenocarcinoma', 'Bladder exstrophy (most common malignancy in exstrophy), urachal remnant (anterior wall/dome).') keybox(doc, 'SMOKING = #1 risk factor for TCC. S. haematobium = risk for SCC bladder. Cyclophosphamide: mesna given for prophylaxis against hemorrhagic cystitis but NOT protective against bladder cancer.') h2(doc, '5.2 Pathology') h3(doc, 'Non-Muscle-Invasive Bladder Cancer (NMIBC) - 75% at presentation') bullet_bold(doc, 'Ta', 'Papillary tumor confined to urothelium (above basement membrane). Non-invasive. 70-75% of all bladder cancers.') bullet_bold(doc, 'T1', 'Invades lamina propria (below basement membrane but above muscularis propria).') bullet_bold(doc, 'CIS (Tis)', 'Carcinoma in situ: flat, high-grade, urothelium only. HIGH-RISK despite being in situ. Aggressive biological behavior.') h3(doc, 'Muscle-Invasive Bladder Cancer (MIBC) - 25% at presentation') add_table(doc, ['Stage', 'Description'], [ ['T2a', 'Invades superficial muscularis propria (inner half)'], ['T2b', 'Invades deep muscularis propria (outer half)'], ['T3a', 'Microscopic perivesical tissue invasion'], ['T3b', 'Macroscopic perivesical tissue invasion (extravesical mass)'], ['T4a', 'Invades prostate stroma, seminal vesicles, uterus, or vagina'], ['T4b', 'Invades pelvic wall or abdominal wall'], ], col_widths=[1.0, 5.5] ) h2(doc, '5.3 Presentation & Investigation') bullet_bold(doc, 'Classic presentation', 'Painless gross hematuria (most common, 80-90%). Any hematuria in patient >40 = bladder cancer until proven otherwise.') bullet_bold(doc, 'Irritative symptoms', 'Urgency, frequency, dysuria (especially CIS). CIS can mimic UTI.') bullet_bold(doc, 'Advanced disease', 'Pelvic pain, hydronephrosis, lower limb edema.') h3(doc, 'Investigations') add_table(doc, ['Test', 'Notes'], [ ['Cystoscopy + Biopsy', 'Gold standard for diagnosis. Describes lesion (location, number, size, morphology: papillary vs. sessile vs. flat).'], ['Urine cytology', 'High sensitivity for high-grade TCC/CIS (87-95%). Low sensitivity for low-grade (20-40%). Atypical = repeat.'], ['CT urogram (CTU)', 'Upper tract imaging (ureter, renal pelvis). Mandatory for hematuria workup. Identifies upper tract TCC, lymphadenopathy.'], ['Urine markers', 'NMP22, UroVysion FISH, BTA stat: higher sensitivity than cytology for low-grade, but lower specificity. Not standard practice.'], ['MRI (VI-RADS)', 'VI-RADS staging. Differentiates NMIBC from MIBC (T-staging). Useful if CT equivocal.'], ['Bone scan / CT chest', 'Staging for MIBC (M staging)'], ], col_widths=[2.0, 4.7] ) h2(doc, '5.4 Management of NMIBC') h3(doc, 'TURBT (Trans-Urethral Resection of Bladder Tumor)') bullet(doc, 'Diagnostic AND therapeutic for NMIBC.') bullet(doc, 'Technique: complete resection of all visible tumor including detrusor muscle (for adequate T staging).') bullet(doc, 'Re-TURBT: Mandatory if: (1) no muscle in specimen, (2) T1 tumors, (3) Grade 3/high-grade tumors. Performed at 2-6 weeks.') bullet(doc, 'Immediate single dose post-op intravesical chemotherapy (mitomycin C, epirubicin, gemcitabine): given within 6 hours of TURBT. Reduces recurrence by ~40%.') bullet(doc, 'Contraindicated if: bladder perforation suspected, gross hematuria.') h3(doc, 'Risk Stratification (EORTC/EAU)') add_table(doc, ['Risk Group', 'Criteria', 'Recurrence Risk', 'Management'], [ ['Low Risk', 'Primary, solitary, Ta, LG/G1, <3cm, no CIS', '~15% at 1yr', 'Single immediate MMC instillation. No further treatment.'], ['Intermediate Risk', 'Between low and high risk', '~40-60%', 'Single MMC + adjuvant intravesical chemotherapy (MMC or epirubicin) for 1 year'], ['High Risk', 'Any: T1 tumor, HG/G3, CIS, multiple+recurrent+large Ta-T1G2-G3', '>60-70%', 'BCG induction + maintenance (preferred). If BCG fails: cystectomy.'], ], col_widths=[1.2, 2.5, 1.3, 2.8] ) h3(doc, 'Intravesical BCG (Bacillus Calmette-Guerin)') bullet(doc, 'IMMUNOTHERAPY - live attenuated Mycobacterium bovis strain.') bullet(doc, 'Gold standard for high-risk NMIBC (T1HG, CIS).') bullet_bold(doc, 'Protocol', 'Induction: 6 weekly instillations. Maintenance (Lamm/SWOG schedule): 3 weekly at 3, 6, 12, 18, 24, 30, 36 months. Full 3-year course reduces recurrence and progression.') bullet_bold(doc, 'Contraindications', 'Gross hematuria, active UTI, recent TURBT (<2 weeks), immunosuppressed patients, TB history.') bullet_bold(doc, 'Side effects', 'Dysuria, frequency (most common, manage with NSAIDs/pyridoxine), BCG sepsis (rare but life-threatening - treat with anti-TB drugs: isoniazid + rifampicin), granulomatous prostatitis, contracted bladder.') bullet_bold(doc, 'BCG failure', 'High-grade recurrence at 3-month check = BCG-unresponsive. Options: cystectomy, pembrolizumab (FDA approved), nadofaragene firadenovec, BCG + N-acetylcysteine.') keybox(doc, 'BCG > intravesical chemotherapy for HIGH-RISK NMIBC. CIS must be treated with BCG. BCG sepsis: systemic symptoms 24-72h after instillation. Treat with anti-TB triple therapy (INH + rifampicin + ethambutol).') h2(doc, '5.5 Management of MIBC') h3(doc, 'Radical Cystectomy (RC)') bullet(doc, 'Gold standard for MIBC. Should be performed within 3 months of diagnosis.') bullet(doc, 'Male: en-bloc removal of bladder, prostate, seminal vesicles, pelvic lymph nodes.') bullet(doc, 'Female: anterior exenteration (bladder, urethra, anterior vaginal wall, uterus, ovaries) + pelvic lymph nodes.') bullet(doc, 'Pelvic lymph node dissection (PLND): extended PLND (up to common iliac/lower aortic) improves staging and potentially survival.') bullet_bold(doc, 'Complications', 'Urinary diversion complications (see below), ED, retrograde ejaculation, vaginal stenosis, lymphocele, bowel complications.') h3(doc, 'Urinary Diversion After Cystectomy') add_table(doc, ['Type', 'Description', 'Pros', 'Cons'], [ ['Ileal conduit (Bricker)', 'Ureters to 15-20cm ileal segment, stoma (incontinent)', 'Simplest, safest. Gold standard.', 'External bag (stoma). Stomal complications'], ['Orthotopic neobladder (Studer, Hautmann)', 'Ileum/sigmoid fashioned into pouch, anastomosed to urethra', 'Continent, voids per urethra', 'Complex surgery. Nocturnal enuresis 20-30%. CIC needed by some. Hypercholermic metabolic acidosis'], ['Indiana pouch (continent cutaneous)', 'Reservoir + continent stoma (CIC through stoma)', 'No external bag, CIC through skin', 'Requires CIC. Stomal stenosis'], ['Ureterosigmoidostomy (historic)', 'Ureters into sigmoid colon', 'No stoma', 'Electrolyte disturbances, hyperchloremic acidosis, cancer risk at anastomosis'], ], col_widths=[1.8, 1.8, 1.6, 1.6] ) h3(doc, 'Neoadjuvant Chemotherapy (NAC)') bullet(doc, 'MVAC (Methotrexate, Vinblastine, Doxorubicin, Cisplatin) or GC (Gemcitabine + Cisplatin): same efficacy, GC better tolerated.') bullet(doc, 'NAC before RC: improves 5-year survival by 5-8% (absolute), pCR ~25-38%.') bullet(doc, 'Recommended for all eligible MIBC patients (cT2-T4a, N0, M0).') bullet(doc, 'Contraindication to cisplatin: GFR <60, ECOG PS ≥2, hearing loss, peripheral neuropathy, heart failure.') h3(doc, 'Bladder-Sparing Approaches (Trimodality Therapy - TMT)') bullet(doc, 'TURBT (maximal) + concurrent chemotherapy + EBRT.') bullet(doc, 'For patients refusing/unsuitable for RC or unifocal T2 without hydronephrosis.') bullet(doc, 'Overall survival similar to RC in selected patients (RTOG trials). Salvage RC needed in ~25%.') h2(doc, '5.6 Metastatic Bladder Cancer') bullet_bold(doc, 'First-line', 'Cisplatin-eligible: GC or dose-dense MVAC. Cisplatin-ineligible: Carboplatin + gemcitabine or atezolizumab/pembrolizumab (PD-L1+).') bullet_bold(doc, 'Maintenance', 'Avelumab (checkpoint inhibitor) maintenance after platinum-based chemo (JAVELIN Bladder 100 trial).') bullet_bold(doc, 'Second-line', 'Pembrolizumab (KEYNOTE-045), atezolizumab. Erdafitinib (FGFR3 mutation+). Enfortumab vedotin (ADC targeting Nectin-4). Sacituzumab govitecan.') page_break(doc) print("Part 1 written successfully - saving...") doc.save('/tmp/workspace/campbell-revision/Campbell_Urology_Revision_PART1.docx') print("Saved Part 1.") PYEOF python3 /tmp/workspace/campbell-revision/build_part1.py

complete the answer

complete the answer and give me docx file

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.