Explain about it
| Drug | Dose |
|---|---|
| Inj. Taxonab (nab-Paclitaxel) | 180 mg IV |
| Inj. Gemcitabine | 1400 mg IV |
Note: If you are a family member or caregiver seeking to understand this report, it is strongly recommended to discuss all findings and the treatment plan in detail with the treating oncologist (Dr. Janarthan Babu S) for guidance on prognosis, next steps, and support options.
Create a summary document explaining this case for family
ls -la /tmp/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /tmp/workspace/ravinder-case && python3 << 'EOF' from docx import Document from docx.shared import Pt, Inches, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() # --- Page margins --- from docx.shared import Cm section = doc.sections[0] section.top_margin = Cm(2) section.bottom_margin = Cm(2) section.left_margin = Cm(2.5) section.right_margin = Cm(2.5) # --- Default font --- style = doc.styles["Normal"] style.font.name = "Arial" style.font.size = Pt(11) # Helper: colored heading def add_colored_heading(doc, text, level=1, r=0, g=70, b=127): p = doc.add_heading(text, level=level) p.alignment = WD_ALIGN_PARAGRAPH.LEFT for run in p.runs: run.font.color.rgb = RGBColor(r, g, b) run.font.name = "Arial" return p # Helper: add a shaded box paragraph def add_info_box(doc, text, bg_color="E8F4FD"): p = doc.add_paragraph() 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_color) pPr.append(shd) run = p.add_run(text) run.font.name = "Arial" run.font.size = Pt(11) return p # Helper: add table row def add_table_row(table, label, value, label_color=None): row = table.add_row() row.cells[0].text = label row.cells[1].text = value for cell in row.cells: for para in cell.paragraphs: for run in para.runs: run.font.name = "Arial" run.font.size = Pt(11) if label_color: for run in row.cells[0].paragraphs[0].runs: run.font.bold = True # ===================== # HEADER # ===================== title = doc.add_paragraph() title.alignment = WD_ALIGN_PARAGRAPH.CENTER r = title.add_run("PATIENT MEDICAL SUMMARY") r.font.name = "Arial" r.font.size = Pt(20) r.font.bold = True r.font.color.rgb = RGBColor(0, 70, 127) sub = doc.add_paragraph() sub.alignment = WD_ALIGN_PARAGRAPH.CENTER r2 = sub.add_run("Prepared for: Family of Mr. Darla Ravinder") r2.font.name = "Arial" r2.font.size = Pt(12) r2.font.color.rgb = RGBColor(80, 80, 80) r2.font.italic = True date_p = doc.add_paragraph() date_p.alignment = WD_ALIGN_PARAGRAPH.CENTER r3 = date_p.add_run("AIG Hospitals, Hyderabad | July 2026") r3.font.name = "Arial" r3.font.size = Pt(11) r3.font.color.rgb = RGBColor(100, 100, 100) doc.add_paragraph() # Divider p_div = doc.add_paragraph() p_div.paragraph_format.space_before = Pt(0) p_div.paragraph_format.space_after = Pt(6) run_div = p_div.add_run("─" * 80) run_div.font.color.rgb = RGBColor(0, 70, 127) run_div.font.size = Pt(8) # ===================== # SECTION 1: Patient Info # ===================== add_colored_heading(doc, "1. Patient Information", level=2) table = doc.add_table(rows=0, cols=2) table.style = "Table Grid" table.columns[0].width = Inches(2.2) table.columns[1].width = Inches(4.0) rows_data = [ ("Patient Name", "Mr. Darla Ravinder"), ("Age / Gender", "53 Years / Male"), ("Hospital", "AIG Hospitals, Banjara Hills, Hyderabad"), ("Department", "Medical Oncology"), ("Treating Doctor", "Dr. Janarthan Babu S"), ("Admission Date", "16 July 2026"), ("Discharge Date", "16 July 2026 (Day admission)"), ("Unique ID (UHID)", "AIGs.10805689"), ] for label, value in rows_data: row = table.add_row() row.cells[0].text = label row.cells[1].text = value for i, cell in enumerate(row.cells): for para in cell.paragraphs: for run in para.runs: run.font.name = "Arial" run.font.size = Pt(11) if i == 0: run.font.bold = True doc.add_paragraph() # ===================== # SECTION 2: Diagnoses # ===================== add_colored_heading(doc, "2. Current Medical Conditions (Diagnoses)", level=2) p_intro = doc.add_paragraph("Mr. Ravinder has the following confirmed medical conditions:") p_intro.runs[0].font.name = "Arial" diagnoses = [ ("Pancreatic Cancer – Stage IV (Main Diagnosis)", "Cancer of the pancreas that has spread to other parts of the body. " "Stage IV is the most advanced stage, meaning the cancer is no longer confined to the pancreas. " "The biopsy confirmed the type as 'ductal adenocarcinoma' – the most common form of pancreatic cancer."), ("Chronic Calcific Pancreatitis with Pancreatic Duct Stricture", "Long-standing inflammation of the pancreas with calcium deposits and a narrowing of the main pancreatic duct. " "This is a separate, pre-existing condition that likely existed before the cancer."), ("Chronic Liver Disease (CLD) with Portal Hypertension", "The liver shows long-term damage, causing increased blood pressure in the portal vein system. " "This has led to an enlarged spleen, areas of dead tissue in the spleen (splenic infarcts), " "and a blood clot in the portal vein."), ("Hypertension", "Elevated blood pressure (pre-existing condition)."), ("Type II Diabetes Mellitus", "Pre-existing diabetes, controlled with medication."), ] for title_text, detail_text in diagnoses: p = doc.add_paragraph(style="List Bullet") run_t = p.add_run(title_text + ": ") run_t.font.bold = True run_t.font.name = "Arial" run_t.font.size = Pt(11) run_d = p.add_run(detail_text) run_d.font.name = "Arial" run_d.font.size = Pt(11) doc.add_paragraph() # ===================== # SECTION 3: Where has cancer spread? # ===================== add_colored_heading(doc, "3. Where Has the Cancer Spread?", level=2) p_note = doc.add_paragraph( "The recent whole-body PET-CT scan (15 July 2026) showed that the cancer has spread beyond the pancreas to the following areas:" ) p_note.runs[0].font.name = "Arial" spread = [ ("Spleen", "The tumor has grown into the spleen and its blood vessels (splenic artery and vein)."), ("Left Adrenal Gland", "A new cancer deposit has appeared on the left adrenal gland (a small gland above the kidney)."), ("Retroperitoneal Lymph Nodes", "Enlarged lymph nodes around the major blood vessels in the abdomen showing cancer activity."), ("Peritoneum (Abdominal Lining)", "Small cancer deposits (~9 mm) have appeared on the inner lining of the abdomen."), ] for organ, detail in spread: p = doc.add_paragraph(style="List Bullet") r1 = p.add_run(organ + ": ") r1.font.bold = True r1.font.name = "Arial" r1.font.size = Pt(11) r2 = p.add_run(detail) r2.font.name = "Arial" r2.font.size = Pt(11) good_note = doc.add_paragraph() r_good = good_note.add_run("Reassuring finding: ") r_good.font.bold = True r_good.font.color.rgb = RGBColor(0, 128, 0) r_good.font.name = "Arial" r_rest = good_note.add_run( "No spread was found in the brain, lungs, heart, or bones. " "The primary tumor in the pancreas has slightly reduced in size compared to the previous scan." ) r_rest.font.name = "Arial" doc.add_paragraph() # ===================== # SECTION 4: Key Test Results # ===================== add_colored_heading(doc, "4. Key Test Results (In Simple Terms)", level=2) tests = [ ("CA 19-9 Tumor Marker\n(04 June 2026)", "2110 U/mL\n(Normal: below 37 U/mL)", "This is a blood test that measures a protein released by pancreatic cancer cells. " "The level is about 57 times the normal upper limit, indicating a significant amount of cancer activity. " "This number is used to track response to treatment over time."), ("Biopsy + IHC\n(11 July 2026)", "Ductal Adenocarcinoma", "A tissue sample was examined under a microscope. " "It confirmed the cancer is 'ductal adenocarcinoma' – the most common and aggressive type of pancreatic cancer."), ("Whole Body PET-CT Scan\n(15 July 2026)", "Multiple sites of cancer activity", "A specialised full-body scan that lights up areas of cancer activity. " "It showed the main pancreatic tumor has slightly reduced in size, " "but new spread has occurred to the adrenal gland, lymph nodes, and abdominal lining."), ("Previous ERCP + Stenting\n(04 May 2026)", "Procedure completed", "A camera procedure was done to place a small tube (stent) in the pancreatic duct to keep it open and prevent blockage."), ] for test_name, result, explanation in tests: p = doc.add_paragraph(style="List Bullet") r1 = p.add_run(test_name + ":\n") r1.font.bold = True r1.font.name = "Arial" r1.font.size = Pt(11) r2 = p.add_run("Result: " + result + "\n") r2.font.name = "Arial" r2.font.color.rgb = RGBColor(0, 70, 127) r2.font.size = Pt(11) r3 = p.add_run("What it means: " + explanation) r3.font.name = "Arial" r3.font.size = Pt(11) r3.font.italic = True doc.add_paragraph() # ===================== # SECTION 5: Treatment # ===================== add_colored_heading(doc, "5. Current Treatment Plan", level=2) p_tx = doc.add_paragraph( "On 16 July 2026, Mr. Ravinder received his first cycle of palliative chemotherapy (Cycle 1, Day 1). " "The treatment was given as an intravenous (IV) infusion." ) p_tx.runs[0].font.name = "Arial" doc.add_paragraph() tx_table = doc.add_table(rows=1, cols=3) tx_table.style = "Table Grid" hdr = tx_table.rows[0].cells hdr[0].text = "Drug Name" hdr[1].text = "Dose Given" hdr[2].text = "What It Does" for cell in hdr: for para in cell.paragraphs: for run in para.runs: run.font.bold = True run.font.name = "Arial" run.font.size = Pt(11) drugs = [ ("Taxonab (nab-Paclitaxel)", "180 mg IV", "Stops cancer cells from dividing by disrupting their internal structure"), ("Gemcitabine", "1400 mg IV", "Blocks the DNA building process inside cancer cells, preventing them from multiplying"), ] for drug, dose, desc in drugs: row = tx_table.add_row() row.cells[0].text = drug row.cells[1].text = dose row.cells[2].text = desc for cell in row.cells: for para in cell.paragraphs: for run in para.runs: run.font.name = "Arial" run.font.size = Pt(11) doc.add_paragraph() p_pal = doc.add_paragraph() r_pal_h = p_pal.add_run("Important note about 'Palliative' chemotherapy: ") r_pal_h.font.bold = True r_pal_h.font.name = "Arial" r_pal_rest = p_pal.add_run( "The word 'palliative' means this treatment is aimed at controlling the cancer, " "relieving symptoms, and improving quality of life – not at curing the disease. " "This is standard practice for Stage IV pancreatic cancer. " "Further cycles will be given periodically, and the response will be monitored through repeat scans and blood tests." ) r_pal_rest.font.name = "Arial" doc.add_paragraph() # ===================== # SECTION 6: Questions for the Doctor # ===================== add_colored_heading(doc, "6. Suggested Questions to Ask the Doctor", level=2) questions = [ "How many chemotherapy cycles are planned, and how often will they be given?", "What side effects should we watch for at home after chemotherapy?", "When will the next scan or blood test be done to check progress?", "Are there any dietary restrictions or special foods that are recommended?", "Is palliative care or a pain specialist involved in the treatment team?", "What symptoms should prompt us to bring Mr. Ravinder to emergency care immediately?", "Are there clinical trials or other treatment options available?", "What support services are available for the family (counselling, social worker)?", ] for q in questions: p = doc.add_paragraph(q, style="List Bullet") p.runs[0].font.name = "Arial" p.runs[0].font.size = Pt(11) doc.add_paragraph() # ===================== # SECTION 7: Important Notes # ===================== add_colored_heading(doc, "7. Important Notes", level=2) notes = [ "This summary was prepared based on the discharge summary and PET-CT report from AIG Hospitals.", "Always carry the original medical reports and the PET-CT CD to every follow-up visit.", "This document is meant to help the family understand the medical situation. " "All medical decisions must be made in consultation with the treating doctors.", "Treating doctor: Dr. Janarthan Babu S, Department of Medical Oncology, AIG Hospitals, Banjara Hills.", "Hospital contact: +91 40 4244 4222 | www.aighospitals.com", ] for note in notes: p = doc.add_paragraph(note, style="List Bullet") p.runs[0].font.name = "Arial" p.runs[0].font.size = Pt(11) # Footer divider doc.add_paragraph() p_div2 = doc.add_paragraph() run_div2 = p_div2.add_run("─" * 80) run_div2.font.color.rgb = RGBColor(0, 70, 127) run_div2.font.size = Pt(8) p_footer = doc.add_paragraph() p_footer.alignment = WD_ALIGN_PARAGRAPH.CENTER r_foot = p_footer.add_run( "This summary document was prepared with care to help the family understand the medical situation.\n" "It is not a substitute for professional medical advice." ) r_foot.font.name = "Arial" r_foot.font.size = Pt(9) r_foot.font.italic = True r_foot.font.color.rgb = RGBColor(120, 120, 120) # Save doc.save("/tmp/workspace/ravinder-case/Darla_Ravinder_Family_Summary.docx") print("Document created successfully.") EOF
ls -lh /tmp/workspace/ravinder-case/
Darla Ravinder Family Summary
Word Document · DOCX