High risk consent for dj stenting
high risk consent DJ stenting double J ureteral stent informed consent complications
ureteral stent complications informed consent
| Risk | Approximate Frequency |
|---|---|
| Dysuria / burning micturition | Very common |
| Urinary frequency / urgency | Very common (18-40%) |
| Hematuria (blood in urine) | Common (18%) |
| Flank/loin pain (especially on voiding) | Common (~19-25%) |
| Urinary tract infection (UTI) | Common (12%) |
| Stent-related discomfort ("stent syndrome") | Common (70-79% have some complaint) |
| Bladder spasms | Common |
| High-Risk Group | Additional Points to Discuss |
|---|---|
| Solitary kidney / CKD | Risk of acute-on-chronic renal failure if stent fails; may need nephrostomy as backup |
| Active urosepsis | Stent alone without antibiotics is dangerous; discuss drain + antibiotics first |
| Malignant obstruction | Stent may not work; failure rate higher; metallic stent/nephrostomy alternatives |
| Immunocompromised | Higher infection risk; atypical organisms; longer antibiotic course |
| Pregnant patients | Radiation exposure must be minimized; USS-guided placement; increased stent encrustation risk; need for frequent exchange |
| Pediatric patients | Size-appropriate stent; GA always required |
| Recurrent stone formers | Encrustation risk; metabolic workup before long-term stenting |
| Prior pelvic/ureteric surgery | Ureteric avulsion risk; may not be feasible; antegrade approach may be needed |
Create a patient-friendly DJ stenting consent form template (DOCX)
ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "Created workspace"
mkdir -p /tmp/workspace/dj-stent-consent && cat > /tmp/workspace/dj-stent-consent/create_consent.py << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL from docx.oxml.ns import qn from docx.oxml import OxmlElement import copy doc = Document() # ── Page margins ────────────────────────────────────────────────────────────── section = doc.sections[0] section.top_margin = Inches(0.8) section.bottom_margin = Inches(0.8) section.left_margin = Inches(1.0) section.right_margin = Inches(1.0) # ── Default Normal style ────────────────────────────────────────────────────── normal = doc.styles["Normal"] normal.font.name = "Arial" normal.font.size = Pt(11) # ── Helper: set paragraph border (bottom) ───────────────────────────────────── def add_bottom_border(paragraph, color="4472C4", size="6"): pPr = paragraph._p.get_or_add_pPr() pBdr = OxmlElement("w:pBdr") bottom = OxmlElement("w:bottom") bottom.set(qn("w:val"), "single") bottom.set(qn("w:sz"), size) bottom.set(qn("w:space"), "1") bottom.set(qn("w:color"), color) pBdr.append(bottom) pPr.append(pBdr) # ── Helper: shaded paragraph ────────────────────────────────────────────────── def shade_paragraph(paragraph, fill="EBF3FB"): pPr = paragraph._p.get_or_add_pPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), fill) pPr.append(shd) # ── Helper: shade table cell ────────────────────────────────────────────────── def shade_cell(cell, fill): 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) # ── Helper: set cell borders ────────────────────────────────────────────────── 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", "4")) el.set(qn("w:color"), val.get("color", "4472C4")) tcBorders.append(el) tcPr.append(tcBorders) # ── Helper: section heading ─────────────────────────────────────────────────── def section_heading(doc, text, bg="2E74B5", fg="FFFFFF"): p = doc.add_paragraph() p.paragraph_format.space_before = Pt(8) p.paragraph_format.space_after = Pt(4) pPr = p._p.get_or_add_pPr() shd = OxmlElement("w:shd") shd.set(qn("w:val"), "clear") shd.set(qn("w:color"), "auto") shd.set(qn("w:fill"), bg) pPr.append(shd) # Indent pInd = OxmlElement("w:ind") pInd.set(qn("w:left"), "100") pInd.set(qn("w:right"), "100") pPr.append(pInd) run = p.add_run(text) run.bold = True run.font.size = Pt(12) run.font.color.rgb = RGBColor.from_string(fg) run.font.name = "Arial" return p # ── Helper: body paragraph ──────────────────────────────────────────────────── def body_para(doc, text, bold=False, italic=False, size=11, indent=0, space_after=4): p = doc.add_paragraph() p.paragraph_format.space_after = Pt(space_after) p.paragraph_format.space_before = Pt(2) if indent: p.paragraph_format.left_indent = Inches(indent) run = p.add_run(text) run.bold = bold run.italic = italic run.font.size = Pt(size) run.font.name = "Arial" return p # ── Helper: bullet ──────────────────────────────────────────────────────────── def add_bullet(doc, text, indent=0.3, bold_prefix=None): p = doc.add_paragraph(style="List Bullet") p.paragraph_format.left_indent = Inches(indent) p.paragraph_format.space_after = Pt(2) p.paragraph_format.space_before = Pt(1) if bold_prefix: r = p.add_run(bold_prefix) r.bold = True r.font.name = "Arial" r.font.size = Pt(11) r2 = p.add_run(text) r2.font.name = "Arial" r2.font.size = Pt(11) return p # ── Helper: signature line ──────────────────────────────────────────────────── def sig_line(doc, label, width=3.0): p = doc.add_paragraph() p.paragraph_format.space_before = Pt(14) p.paragraph_format.space_after = Pt(2) run = p.add_run(f"{label}: ") run.font.name = "Arial" run.font.size = Pt(11) run2 = p.add_run("_" * 45) run2.font.name = "Arial" run2.font.size = Pt(11) return p # ═══════════════════════════════════════════════════════════════════════════════ # DOCUMENT BEGINS # ═══════════════════════════════════════════════════════════════════════════════ # ── HEADER BANNER ───────────────────────────────────────────────────────────── hosp_p = doc.add_paragraph() hosp_p.alignment = WD_ALIGN_PARAGRAPH.CENTER hosp_p.paragraph_format.space_after = Pt(2) hosp_run = hosp_p.add_run("[ HOSPITAL / CLINIC NAME ]") hosp_run.bold = True hosp_run.font.size = Pt(13) hosp_run.font.color.rgb = RGBColor(0x2E, 0x74, 0xB5) hosp_run.font.name = "Arial" dept_p = doc.add_paragraph() dept_p.alignment = WD_ALIGN_PARAGRAPH.CENTER dept_p.paragraph_format.space_after = Pt(8) dept_run = dept_p.add_run("Department of Urology") dept_run.font.size = Pt(11) dept_run.font.color.rgb = RGBColor(0x5A, 0x5A, 0x5A) dept_run.font.name = "Arial" # Main title title_p = doc.add_paragraph() title_p.alignment = WD_ALIGN_PARAGRAPH.CENTER title_p.paragraph_format.space_after = Pt(4) add_bottom_border(title_p, color="2E74B5", size="12") t_run = title_p.add_run("PATIENT INFORMED CONSENT FORM") t_run.bold = True t_run.font.size = Pt(16) t_run.font.color.rgb = RGBColor(0x1F, 0x49, 0x7D) t_run.font.name = "Arial" sub_p = doc.add_paragraph() sub_p.alignment = WD_ALIGN_PARAGRAPH.CENTER sub_p.paragraph_format.space_after = Pt(10) s_run = sub_p.add_run("Double-J (DJ) Ureteral Stent Insertion") s_run.bold = True s_run.font.size = Pt(13) s_run.font.color.rgb = RGBColor(0x2E, 0x74, 0xB5) s_run.font.name = "Arial" # ── PATIENT DETAILS BOX ─────────────────────────────────────────────────────── section_heading(doc, " PATIENT DETAILS", bg="1F497D") tbl = doc.add_table(rows=3, cols=4) tbl.style = "Table Grid" tbl.alignment = WD_TABLE_ALIGNMENT.CENTER details = [ ["Patient Name:", "", "Date of Birth:", ""], ["MRN / Hospital ID:", "", "Date:", ""], ["Consultant / Surgeon:", "", "Ward / Unit:", ""], ] for r_idx, row_data in enumerate(details): row = tbl.rows[r_idx] for c_idx, text in enumerate(row_data): cell = row.cells[c_idx] p = cell.paragraphs[0] p.paragraph_format.space_before = Pt(4) p.paragraph_format.space_after = Pt(4) run = p.add_run(text) run.font.name = "Arial" run.font.size = Pt(10) if c_idx % 2 == 0: # Label cells run.bold = True shade_cell(cell, "D6E4F7") else: shade_cell(cell, "FFFFFF") doc.add_paragraph().paragraph_format.space_after = Pt(4) # ── SECTION 1: WHAT IS DJ STENTING ─────────────────────────────────────────── section_heading(doc, " 1. WHAT IS A DJ STENT?") body_para(doc, "A Double-J (DJ) ureteral stent is a soft, flexible hollow tube that is placed inside the ureter — the tube connecting your kidney to your bladder. It has a small curl at each end (shaped like the letter 'J') to hold it in place: one curl sits in the kidney and the other in the bladder.") body_para(doc, "The stent allows urine to drain freely from your kidney to your bladder when this passage is blocked or narrowed.") p_why = doc.add_paragraph() p_why.paragraph_format.space_before = Pt(4) p_why.paragraph_format.space_after = Pt(2) r = p_why.add_run("Your stent is being placed because of:") r.bold = True; r.font.name = "Arial"; r.font.size = Pt(11) add_bullet(doc, "Kidney / ureteric stone causing blockage") add_bullet(doc, "Narrowing (stricture) of the ureter") add_bullet(doc, "Compression by a tumour or external mass") add_bullet(doc, "Following kidney or ureteric surgery (to protect the repair)") add_bullet(doc, "Other: ____________________________________________") # ── SECTION 2: HOW IS IT DONE ───────────────────────────────────────────────── section_heading(doc, " 2. HOW IS THE PROCEDURE DONE?") body_para(doc, "The procedure is usually performed under general anaesthesia (you will be asleep) or spinal anaesthesia (you will be awake but numb from the waist down). Your anaesthesiologist will discuss this with you separately.") add_bullet(doc, "You will lie on your back with legs raised (lithotomy position).") add_bullet(doc, "A thin camera (cystoscope) is passed through your urethra (urinary opening) into the bladder — no cuts on your skin are needed.") add_bullet(doc, "Using X-ray or camera guidance, the stent is gently threaded up through the ureter into the kidney.") add_bullet(doc, "The whole procedure typically takes 15–30 minutes.") body_para(doc, "Your urine will appear pink or red for the first 24–48 hours — this is normal.", italic=True) # ── SECTION 3: EXPECTED SYMPTOMS ───────────────────────────────────────────── section_heading(doc, " 3. WHAT TO EXPECT WHILE THE STENT IS IN PLACE") p_note = doc.add_paragraph() p_note.paragraph_format.space_after = Pt(4) shade_paragraph(p_note, fill="FFF3CD") r_note = p_note.add_run(" Important: Most patients experience some discomfort from the stent. These symptoms are common and expected, not a sign that something has gone wrong.") r_note.italic = True; r_note.font.name = "Arial"; r_note.font.size = Pt(11) add_bullet(doc, "Needing to pass urine more often than usual", bold_prefix="Urinary frequency: ") add_bullet(doc, "Strong sudden urge to urinate", bold_prefix="Urgency: ") add_bullet(doc, "Discomfort or burning when passing urine", bold_prefix="Dysuria: ") add_bullet(doc, "Pink or blood-tinged urine", bold_prefix="Hematuria: ") add_bullet(doc, "Pain in the flank (side of back) when urinating", bold_prefix="Flank pain: ") add_bullet(doc, "Discomfort in the lower abdomen", bold_prefix="Bladder spasms / cramps: ") body_para(doc, "Up to 70–80% of patients report at least one of these symptoms. Your doctor may prescribe medicines (e.g. alpha-blockers, anti-spasmodics, pain relief) to help manage them.", size=10, italic=True) # ── SECTION 4: RISKS ───────────────────────────────────────────────────────── section_heading(doc, " 4. RISKS AND POSSIBLE COMPLICATIONS") body_para(doc, "All medical procedures carry risks. Please read these carefully and ask your doctor if anything is unclear.") # Sub-heading helper for risk categories def risk_subhead(doc, text, color="2E74B5"): p = doc.add_paragraph() p.paragraph_format.space_before = Pt(6) p.paragraph_format.space_after = Pt(2) r = p.add_run(f" {text}") r.bold = True; r.font.name = "Arial"; r.font.size = Pt(11) r.font.color.rgb = RGBColor.from_string(color) return p risk_subhead(doc, "COMMON Risks (affecting many patients)") add_bullet(doc, "Burning or pain on urination (dysuria)") add_bullet(doc, "Blood in urine (hematuria) — usually settles within 48 hours") add_bullet(doc, "Increased urinary frequency and urgency") add_bullet(doc, "Flank / loin pain (especially when urinating)") add_bullet(doc, "Urinary tract infection (UTI) — antibiotics will be given if needed") add_bullet(doc, "Bladder spasms and lower abdominal discomfort") risk_subhead(doc, "LESS COMMON Risks (affecting some patients)") add_bullet(doc, "Stent migration — the stent moves out of position and may need repositioning") add_bullet(doc, "Blocked stent — stent becomes clogged; may need replacement") add_bullet(doc, "Worsening flank pain if the stent is not draining effectively") add_bullet(doc, "Failure of the procedure — stent cannot be placed; alternative drainage may be needed") risk_subhead(doc, "SERIOUS Risks (rare but important)") add_bullet(doc, "Urosepsis (serious bloodstream infection) — especially if the kidney was infected before the procedure. This may require intensive care treatment.") add_bullet(doc, "Stent encrustation — mineral deposits build up on the stent, making it harder to remove. Risk increases the longer the stent is left in.") add_bullet(doc, "Stent fragmentation — the stent breaks, requiring additional procedures (ureteroscopy, PCNL, or ESWL) to remove all pieces.") add_bullet(doc, "Ureteral perforation — a small tear in the ureter during the procedure. Usually heals with the stent in place.") add_bullet(doc, "Ureteral stricture — scar tissue narrowing the ureter after repeated procedures (<1% risk).") add_bullet(doc, "Ureteral avulsion — extremely rare injury (the ureter is torn away); would require emergency open surgery.") add_bullet(doc, "Temporary worsening of kidney function — particularly in patients with pre-existing kidney disease or a solitary kidney.") # ── SECTION 5: HIGH-RISK PATIENTS ──────────────────────────────────────────── section_heading(doc, " 5. ADDITIONAL RISKS FOR HIGHER-RISK PATIENTS", bg="C0392B") p_hr = doc.add_paragraph() shade_paragraph(p_hr, fill="FDECEA") p_hr.paragraph_format.space_after = Pt(4) r_hr = p_hr.add_run(" Your doctor has identified that you are in one or more higher-risk groups. Please tick which applies and discuss any concerns with your surgeon:") r_hr.font.name = "Arial"; r_hr.font.size = Pt(11) high_risk_items = [ ("Solitary kidney or significantly reduced kidney function", "If the stent fails, kidney failure may develop rapidly. A backup drain (nephrostomy) may be needed urgently."), ("Active urinary tract infection / infected kidney (urosepsis)", "Instrumentation of an infected kidney can trigger life-threatening sepsis. You must complete a course of antibiotics first OR have the stent placed as an emergency drain alongside IV antibiotics."), ("Malignant (cancer-related) ureteral blockage", "The stent may not fully relieve the blockage due to tumour compression. A metallic stent or nephrostomy may give better results. The stent will likely need to stay in permanently and be changed every 3–6 months."), ("Immunocompromised (e.g. on steroids, chemotherapy, HIV, diabetes)", "Higher risk of serious infection with atypical organisms. A longer course of antibiotics may be needed."), ("Pregnancy", "Radiation will be minimised (ultrasound guidance where possible). Stent encrustation happens faster in pregnancy — the stent will need more frequent exchanges."), ("Recurrent kidney stone former / metabolic stone disease", "Stent encrustation is more likely. A metabolic workup is recommended before long-term stenting."), ("Previous ureteric or pelvic surgery / radiation", "The ureter may be scarred or distorted. There is a higher risk of injury and the procedure may not be possible via the usual route — a nephrostomy or open approach may be needed."), ] for title_text, detail_text in high_risk_items: tbl_hr = doc.add_table(rows=1, cols=2) tbl_hr.style = "Table Grid" tbl_hr.columns[0].width = Inches(0.4) tbl_hr.columns[1].width = Inches(5.8) cell_chk = tbl_hr.rows[0].cells[0] cell_txt = tbl_hr.rows[0].cells[1] shade_cell(cell_chk, "FDECEA") p_chk = cell_chk.paragraphs[0] p_chk.alignment = WD_ALIGN_PARAGRAPH.CENTER r_chk = p_chk.add_run("☐") r_chk.font.size = Pt(14); r_chk.font.name = "Arial" p_txt = cell_txt.paragraphs[0] p_txt.paragraph_format.space_before = Pt(3) p_txt.paragraph_format.space_after = Pt(3) r_title = p_txt.add_run(title_text + "\n") r_title.bold = True; r_title.font.name = "Arial"; r_title.font.size = Pt(10) r_detail = p_txt.add_run(detail_text) r_detail.font.name = "Arial"; r_detail.font.size = Pt(10) doc.add_paragraph().paragraph_format.space_after = Pt(2) # ── SECTION 6: ALTERNATIVES ─────────────────────────────────────────────────── section_heading(doc, " 6. ALTERNATIVES TO DJ STENTING") tbl_alt = doc.add_table(rows=4, cols=2) tbl_alt.style = "Table Grid" hdr_row = tbl_alt.rows[0] shade_cell(hdr_row.cells[0], "2E74B5") shade_cell(hdr_row.cells[1], "2E74B5") for idx, txt in enumerate(["Alternative", "When it may be preferred"]): p = hdr_row.cells[idx].paragraphs[0] r = p.add_run(txt) r.bold = True; r.font.color.rgb = RGBColor(0xFF,0xFF,0xFF) r.font.name = "Arial"; r.font.size = Pt(10) alt_data = [ ("Percutaneous Nephrostomy (PCN)", "When the stent cannot be placed via the bladder, or in severe infection where faster drainage is needed"), ("Conservative management / watchful waiting", "For mild obstruction with normal kidney function and no infection"), ("Definitive surgery (stone removal, ureteric repair)", "When the underlying cause can be treated directly and a temporary stent is not necessary"), ] for r_i, (a, b) in enumerate(alt_data): row = tbl_alt.rows[r_i+1] shade_cell(row.cells[0], "EBF3FB") for c_i, txt in enumerate([a, b]): p = row.cells[c_i].paragraphs[0] p.paragraph_format.space_before = Pt(3) p.paragraph_format.space_after = Pt(3) r = p.add_run(txt) r.font.name = "Arial"; r.font.size = Pt(10) doc.add_paragraph().paragraph_format.space_after = Pt(4) # ── SECTION 7: STENT REMOVAL / FOLLOW-UP ───────────────────────────────────── section_heading(doc, " 7. STENT REMOVAL AND FOLLOW-UP", bg="1E7E34") p_warn = doc.add_paragraph() shade_paragraph(p_warn, fill="D4EDDA") p_warn.paragraph_format.space_after = Pt(4) r_warn = p_warn.add_run(" ⚠ IMPORTANT: A forgotten or retained stent is a serious complication. Stents left in too long can become encrusted, fragmented, or cause infection. Your stent MUST be removed or exchanged on the date below.") r_warn.bold = True; r_warn.font.name = "Arial"; r_warn.font.size = Pt(11) add_bullet(doc, "Stents are NOT permanent. They must be removed or exchanged regularly.") add_bullet(doc, "Most stents are removed after 2–6 weeks (or as directed by your surgeon).") add_bullet(doc, "Removal is usually a quick clinic/day-case procedure — a thin camera is passed into the bladder and the stent is gently pulled out. No anaesthesia is usually required.") add_bullet(doc, "Long-term or permanent stents (e.g. for malignant obstruction) must be exchanged every 3–6 months.") p_date = doc.add_paragraph() p_date.paragraph_format.space_before = Pt(8) r_d = p_date.add_run("Planned stent removal / exchange date: ") r_d.bold = True; r_d.font.name = "Arial"; r_d.font.size = Pt(11) r_d2 = p_date.add_run("____________________________") r_d2.font.name = "Arial"; r_d2.font.size = Pt(11) body_para(doc, "If you miss your removal appointment or cannot be contacted, please call the Urology department immediately.", bold=True, size=11) # ── SECTION 8: WHEN TO SEEK URGENT HELP ────────────────────────────────────── section_heading(doc, " 8. WHEN TO SEEK URGENT MEDICAL ATTENTION", bg="C0392B") p_urg = doc.add_paragraph() shade_paragraph(p_urg, fill="FDECEA") p_urg.paragraph_format.space_after = Pt(4) r_urg = p_urg.add_run(" Go to your nearest Emergency Department or call your surgical team IMMEDIATELY if you experience:") r_urg.font.name = "Arial"; r_urg.font.size = Pt(11) urgent_items = [ "High fever (above 38.5°C / 101.3°F), shaking chills, or rigors", "Severe loin or abdominal pain not controlled with painkillers", "Inability to pass urine (complete urinary retention)", "Bright red heavy bleeding in urine (large clots)", "Nausea, vomiting, and general feeling of collapse", "Signs of the stent coming out (string visible, stent in urine)", ] for item in urgent_items: p_u = doc.add_paragraph(style="List Bullet") p_u.paragraph_format.left_indent = Inches(0.3) p_u.paragraph_format.space_after = Pt(2) r_u = p_u.add_run(item) r_u.font.name = "Arial"; r_u.font.size = Pt(11); r_u.bold = True r_u.font.color.rgb = RGBColor(0xC0, 0x39, 0x2B) p_emergency = doc.add_paragraph() p_emergency.paragraph_format.space_before = Pt(6) r_em = p_emergency.add_run("Emergency contact number: ") r_em.bold = True; r_em.font.name = "Arial"; r_em.font.size = Pt(11) r_em2 = p_emergency.add_run("________________________________________") r_em2.font.name = "Arial"; r_em2.font.size = Pt(11) # ── SECTION 9: PATIENT QUESTIONS ───────────────────────────────────────────── section_heading(doc, " 9. YOUR QUESTIONS AND NOTES") body_para(doc, "Please use this space to write down any questions you have for your doctor before signing:") for _ in range(4): q_p = doc.add_paragraph() q_p.paragraph_format.space_before = Pt(2) q_p.paragraph_format.space_after = Pt(2) q_r = q_p.add_run("Q: _________________________________________________________________________________") q_r.font.name = "Arial"; q_r.font.size = Pt(11) doc.add_paragraph().paragraph_format.space_after = Pt(6) # ── SECTION 10: DECLARATION & SIGNATURES ───────────────────────────────────── section_heading(doc, " 10. PATIENT DECLARATION AND CONSENT") p_decl = doc.add_paragraph() shade_paragraph(p_decl, fill="EBF3FB") p_decl.paragraph_format.space_after = Pt(6) r_decl = p_decl.add_run( " I confirm that:\n" " • I have read and understood the information in this form (or it has been read/explained to me).\n" " • I have had the opportunity to ask questions and my questions have been answered to my satisfaction.\n" " • I understand the benefits, risks, and alternatives of DJ stent insertion.\n" " • I understand that I must attend my follow-up appointment to have the stent removed or exchanged.\n" " • I give my voluntary consent to proceed with this procedure.\n" " • I understand I may withdraw consent at any time before the procedure begins without affecting my future care." ) r_decl.font.name = "Arial"; r_decl.font.size = Pt(11) sig_line(doc, "Patient Signature") sig_line(doc, "Patient Name (print)") sig_line(doc, "Date") doc.add_paragraph().paragraph_format.space_after = Pt(8) # Interpreter section p_interp = doc.add_paragraph() r_i = p_interp.add_run("If an interpreter was used: ") r_i.bold = True; r_i.font.name = "Arial"; r_i.font.size = Pt(11) sig_line(doc, "Interpreter Name & Language") sig_line(doc, "Interpreter Signature") doc.add_paragraph().paragraph_format.space_after = Pt(8) # Legal representative p_lr = doc.add_paragraph() r_lr = p_lr.add_run("If signed by a Legal Representative / Next of Kin (if patient lacks capacity):") r_lr.bold = True; r_lr.font.name = "Arial"; r_lr.font.size = Pt(11) sig_line(doc, "Representative Name") sig_line(doc, "Relationship to Patient") sig_line(doc, "Representative Signature") sig_line(doc, "Date") doc.add_paragraph().paragraph_format.space_after = Pt(10) # ── SECTION 11: CLINICIAN DECLARATION ──────────────────────────────────────── section_heading(doc, " 11. CLINICIAN DECLARATION") p_clin = doc.add_paragraph() shade_paragraph(p_clin, fill="EBF3FB") p_clin.paragraph_format.space_after = Pt(6) r_clin = p_clin.add_run( " I confirm that I have explained the procedure, its purpose, likely outcomes, and the risks/benefits to the patient. " "I believe the patient has understood the information given and has consented voluntarily." ) r_clin.font.name = "Arial"; r_clin.font.size = Pt(11) sig_line(doc, "Clinician Name (print)") sig_line(doc, "Designation / Grade") sig_line(doc, "GMC / Professional Number") sig_line(doc, "Clinician Signature") sig_line(doc, "Date") doc.add_paragraph().paragraph_format.space_after = Pt(10) # ── FOOTER NOTE ─────────────────────────────────────────────────────────────── p_footer = doc.add_paragraph() add_bottom_border(p_footer, color="2E74B5", size="6") p_footer.alignment = WD_ALIGN_PARAGRAPH.CENTER r_f = p_footer.add_run( "This consent form is for patient information purposes. It does not replace a verbal discussion with your clinical team.\n" "A copy of this signed form should be given to the patient and retained in the medical record." ) r_f.italic = True; r_f.font.name = "Arial"; r_f.font.size = Pt(9) r_f.font.color.rgb = RGBColor(0x5A, 0x5A, 0x5A) # ── SAVE ────────────────────────────────────────────────────────────────────── out_path = "/tmp/workspace/dj-stent-consent/DJ_Stent_Consent_Form.docx" doc.save(out_path) print(f"Saved: {out_path}") PYEOF echo "Script written"
cd /tmp/workspace/dj-stent-consent && python3 create_consent.py
python3 -c " from docx import Document doc = Document('/tmp/workspace/dj-stent-consent/DJ_Stent_Consent_Form.docx') for p in doc.paragraphs: if p.text.strip(): print(f'[{p.style.name}] {p.text[:100]}') " 2>&1 | head -80
DJ Stent Consent Form
Word Document · DOCX
| Section | Content |
|---|---|
| Patient Details | Name, MRN, DOB, Date, Consultant, Ward - fill-in table |
| 1. What is a DJ Stent? | Plain-English explanation with indication tick-boxes |
| 2. How is it Done? | Step-by-step procedure description |
| 3. Expected Symptoms | Highlighted note box explaining common stent symptoms (70-80% of patients) |
| 4. Risks & Complications | Three tiers: Common / Less Common / Serious |
| 5. High-Risk Patients | Tick-box table for 7 high-risk categories (solitary kidney, urosepsis, malignancy, immunocompromised, pregnancy, stone formers, prior surgery) with specific risk explanation for each |
| 6. Alternatives | Formatted table: PCN, conservative management, definitive surgery |
| 7. Stent Removal / Follow-up | Prominent warning box + mandatory removal date field |
| 8. Urgent Symptoms | Red-highlighted emergency warning with contact number field |
| 9. Patient Questions | Blank lines for the patient to write their own questions |
| 10. Patient Declaration | Full consent statement + signature / date / interpreter / legal representative fields |
| 11. Clinician Declaration | Clinician signature, GMC number, designation |
[ HOSPITAL / CLINIC NAME ] at the top with your institution's name and logo.