Hey Ares, which kind of textbooks do you have? And also tell me like if there's a patient with lung cirrhosis, then what can be the differential diagnosis for it? And what are the 11 books that you will be referring to? And give me a very good answer from very good reference books. And also try to give me some images from that book so that it is easier for me to prepare for my exams.
liver cirrhosis histology pathology
cirrhosis causes etiology diagram alcoholic hepatitis viral
| Speciality | Notable Books |
|---|---|
| Anatomy | Gray's Anatomy for Students, Netter's Atlas, Color Atlas of Human Anatomy (Vol 1β3), THIEME Atlas |
| Anesthesiology | Miller's Anesthesia 10e, Barash's Clinical Anesthesia 9e, Morgan & Mikhail 7e |
| Biochemistry | Harper's Illustrated Biochemistry 32e, Lippincott Biochemistry 8e, Basic Medical Biochemistry 6e |
| Cardiology | Braunwald's Heart Disease, Fuster & Hurst's The Heart 15e, Clinical Echocardiography |
| Dermatology | Andrews' Diseases of the Skin, Dermatology 2-Vol Set 5e, Fitzpatrick's Dermatology |
| Emergency Medicine | Rosen's Emergency Medicine, Tintinalli's Emergency Medicine, Roberts & Hedges' Clinical Procedures |
| ENT | Cummings Otolaryngology, K.J. Lee's Essential Otolaryngology |
| Family Medicine | Textbook of Family Medicine 9e, Swanson's Family Medicine Review |
| Gastroenterology | Sleisenger & Fordtran's GI & Liver Disease, Yamada's Textbook of Gastroenterology 7e, Clinical GI Endoscopy |
| General Surgery | Schwartz's Principles of Surgery 11e, Sabiston Textbook of Surgery, Mulholland & Greenfield's Surgery |
| Genetics | Thompson & Thompson Genetics 9e, Emery's Medical Genetics |
| Histology | Junqueira's Basic Histology 17e, Ross Histology: Text and Atlas |
| Immunology | Cellular & Molecular Immunology, Janeway's Immunobiology 10e, Roitt's Essential Immunology |
| Internal Medicine | Harrison's Principles of Internal Medicine 22e, Goldman-Cecil Medicine, Washington Manual |
| Laboratory Medicine | Henry's Clinical Diagnosis, Tietz Textbook of Laboratory Medicine 7e |
| Microbiology | Jawetz Medical Microbiology 28e, Medical Microbiology 9e, Sherris & Ryan's |
| Nephrology | Brenner & Rector's The Kidney, Comprehensive Clinical Nephrology 7e |
| Neurology | Adams & Victor's Principles of Neurology 12e, Bradley & Daroff's Neurology |
| Oncology | DeVita, Hellman & Rosenberg's Cancer |
| Pathology | Robbins & Cotran Pathologic Basis of Disease, Rosai & Ackerman's Surgical Pathology |
| Pharmacology | Katzung's Basic & Clinical Pharmacology 16e, Goodman & Gilman's |
| Pulmonology | Murray & Nadel's Textbook of Respiratory Medicine |
| Radiology | Grainger & Allison's Diagnostic Radiology |
| Urology | Smith & Tanagho's General Urology |
| + many more | Obstetrics, Ophthalmology, Orthopedics, Pediatrics, Psychiatry, Rheumatology, etc. |
Note: Technically, "lung cirrhosis" is not a standard medical term β you likely mean hepatic (liver) cirrhosis, which is the classic form. There is a pulmonary condition called "pulmonary fibrosis" that is sometimes colloquially compared to cirrhosis. I'll cover the differential for liver cirrhosis comprehensively, which is what exam questions focus on.



| Condition | SAAG | Ascitic Protein |
|---|---|---|
| Cirrhosis | High (β₯1.1 g/dL) | Low |
| Cardiac ascites | High (β₯1.1 g/dL) | High (β₯2.5 g/dL) |
| Malignant ascites | Low (<1.1 g/dL) | High |
| Tuberculous peritonitis | Low (<1.1 g/dL) | High |
| Nephrotic syndrome | Low (<1.1 g/dL) | Low |
| Pancreatic ascites | Low | High + elevated amylase |

| Mnemonic | Cause |
|---|---|
| Alcohol | Alcoholic liver disease |
| Budd-Chiari | Venous outflow obstruction |
| Cardiac | Congestive hepatopathy |
| Drugs/DILI | Methotrexate, amiodarone, INH |
| Hepatitis B & C | Viral hepatitis |
| Hemochromatosis | Iron overload |
| NASH | Metabolic/fatty liver |
| Autoimmune | AIH, PBC, PSC |
| Wilson's | Copper overload |
| AAT deficiency | Alpha-1 antitrypsin |
make a ppt for this
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.β¦
~/medical-ppt/cirrhosis_ppt.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images
const imageUrls = [
"https://cdn.orris.care/cdss_images/Pathology_1760053736467_f33c1e31-8c6d-47e9-b308-032f8c1e0d0f.jpg",
"https://cdn.orris.care/cdss_images/Pathology_1760053733111_ffb7b4fd-f718-4ae2-beb7-4d10ed28e069.jpg",
"https://cdn.orris.care/cdss_images/GLGCA_13297_1762981063916_fcbe4bac-d7b8-4bab-a22b-48f2a29125fd.png",
"https://cdn.orris.care/cdss_images/medpix_vqa_b08b9301-6164-46ac-9474-a396c5410ace_1766169877521.png"
];
let images = [];
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
images = JSON.parse(result);
} catch(e) {
console.error("Image fetch failed:", e.message);
images = imageUrls.map(u => ({ url: u, base64: null, error: "fetch failed" }));
}
const imgGross = images[0]?.base64 || null; // macronodular gross pathology
const imgHisto = images[1]?.base64 || null; // H&E histology cirrhosis
const imgAlcohol = images[2]?.base64 || null; // alcoholic liver disease spectrum
const imgCT = images[3]?.base64 || null; // CT cirrhosis
// βββ Colour Palette βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// Deep teal dominates, warm amber accent, light fog bg
const DARK_BG = "0D2B3E"; // deep navy-teal
const TEAL = "0E7C7B"; // medium teal
const AMBER = "F4A020"; // warm amber
const CREAM = "FFF8EE"; // off-white
const LIGHT_BG = "EDF4F4"; // very light teal
const WHITE = "FFFFFF";
const DARK_TEXT = "132B3A";
const GRAY = "5F7A8A";
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 Γ 7.5 inches
pres.title = "Liver Cirrhosis β Differential Diagnosis";
pres.author = "Orris Medical AI";
// βββ Helper: header bar βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
function addHeaderBar(slide, title, subtitle) {
// Full-width dark header
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 1.1, fill: { color: DARK_BG } });
// Amber accent stripe
slide.addShape(pres.ShapeType.rect, { x: 0, y: 1.1, w: "100%", h: 0.07, fill: { color: AMBER } });
slide.addText(title, {
x: 0.35, y: 0.05, w: 12.6, h: 0.65,
fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri", align: "left",
margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.35, y: 0.68, w: 12.6, h: 0.38,
fontSize: 14, color: AMBER, fontFace: "Calibri", align: "left",
italic: true, margin: 0
});
}
}
// βββ Helper: content card ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
function addCard(slide, x, y, w, h, title, items, opts = {}) {
const bg = opts.bg || WHITE;
const accent = opts.accent || TEAL;
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: bg }, line: { color: accent, pt: 2 } });
// title bar inside card
slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.38, fill: { color: accent } });
slide.addText(title, {
x: x + 0.1, y: y + 0.04, w: w - 0.2, h: 0.32,
fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
// bullet items
const bulletY = y + 0.44;
const itemHeight = (h - 0.5) / items.length;
items.forEach((item, i) => {
slide.addText([
{ text: "βΈ ", options: { color: accent, bold: true } },
{ text: item.text || item, options: { color: DARK_TEXT } }
], {
x: x + 0.15, y: bulletY + i * itemHeight, w: w - 0.25, h: itemHeight,
fontSize: 10.5, fontFace: "Calibri", valign: "middle", margin: 0,
breakLine: false
});
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 1 β TITLE SLIDE
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Decorative amber strip
s.addShape(pres.ShapeType.rect, { x: 0, y: 2.8, w: "100%", h: 0.1, fill: { color: AMBER } });
// Large central title
s.addText("LIVER CIRRHOSIS", {
x: 0.5, y: 0.8, w: 12.3, h: 1.4,
fontSize: 56, bold: true, color: WHITE, fontFace: "Calibri", align: "center",
charSpacing: 5, margin: 0
});
s.addText("Differential Diagnosis & Pathophysiology", {
x: 0.5, y: 2.2, w: 12.3, h: 0.55,
fontSize: 22, color: AMBER, fontFace: "Calibri", align: "center",
italic: true, margin: 0
});
// Bottom info
s.addText("Based on: Sleisenger & Fordtran's GI & Liver Disease | Goldman-Cecil Medicine | Harrison's Principles (22e) | +8 more references", {
x: 0.5, y: 3.2, w: 12.3, h: 0.4,
fontSize: 11, color: "A8C4C2", fontFace: "Calibri", align: "center", italic: true, margin: 0
});
// 3 stat boxes
const stats = [
{ label: "Causes", val: "10+" },
{ label: "SAAG Accuracy", val: "97%" },
{ label: "Cirrhosis β Ascites", val: "80%" }
];
stats.forEach((st, i) => {
const bx = 1.8 + i * 3.4;
s.addShape(pres.ShapeType.rect, { x: bx, y: 4.0, w: 2.8, h: 1.6, fill: { color: TEAL }, line: { color: AMBER, pt: 2 } });
s.addText(st.val, {
x: bx, y: 4.1, w: 2.8, h: 0.8, fontSize: 38, bold: true, color: AMBER,
fontFace: "Calibri", align: "center", margin: 0
});
s.addText(st.label, {
x: bx, y: 4.85, w: 2.8, h: 0.55, fontSize: 13, color: WHITE,
fontFace: "Calibri", align: "center", margin: 0
});
});
s.addText("Orris Medical AI β’ For Exam Preparation", {
x: 0.5, y: 6.9, w: 12.3, h: 0.4,
fontSize: 11, color: GRAY, fontFace: "Calibri", align: "center", margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 2 β WHAT IS CIRRHOSIS?
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "What Is Liver Cirrhosis?", "End-stage chronic liver disease with irreversible fibrosis");
// Definition box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.35, w: 8.0, h: 1.35, fill: { color: DARK_BG }, line: { color: AMBER, pt: 2 } });
s.addText("DEFINITION", {
x: 0.4, y: 1.38, w: 7.8, h: 0.3, fontSize: 11, bold: true, color: AMBER,
fontFace: "Calibri", margin: 0
});
s.addText("Cirrhosis is the end-stage of chronic liver disease characterized by diffuse hepatic fibrosis, loss of normal lobular architecture, and formation of regenerative nodules β leading to portal hypertension and hepatic dysfunction.", {
x: 0.4, y: 1.68, w: 7.8, h: 0.95,
fontSize: 11.5, color: WHITE, fontFace: "Calibri", margin: 0
});
// Key features
const features = [
"Diffuse hepatic fibrosis (bridging fibrous septa)",
"Regenerative nodules (micro- or macronodular)",
"Disrupted lobular architecture",
"Portal hypertension β varices, ascites, splenomegaly",
"Reduced synthetic function (low albumin, coagulopathy)"
];
features.forEach((f, i) => {
s.addText([
{ text: "β¦ ", options: { color: AMBER, bold: true } },
{ text: f, options: { color: DARK_TEXT } }
], {
x: 0.4, y: 2.85 + i * 0.44, w: 7.8, h: 0.42,
fontSize: 12, fontFace: "Calibri", margin: 0
});
});
// Gross pathology image
if (imgGross) {
s.addImage({ data: imgGross, x: 8.7, y: 1.35, w: 4.2, h: 3.5 });
s.addShape(pres.ShapeType.rect, { x: 8.7, y: 4.85, w: 4.2, h: 0.45, fill: { color: DARK_BG } });
s.addText("Gross pathology β macronodular cirrhosis (WebPathology)", {
x: 8.7, y: 4.87, w: 4.2, h: 0.38,
fontSize: 9, color: AMBER, fontFace: "Calibri", align: "center", italic: true, margin: 0
});
}
s.addText("Source: Sleisenger & Fordtran's GI & Liver Disease | Goldman-Cecil Medicine | Harrison's 22e", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 3 β HISTOLOGY + SPECTRUM
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Histology & Disease Spectrum", "From steatosis to cirrhosis to HCC");
// Histology image
if (imgHisto) {
s.addImage({ data: imgHisto, x: 0.3, y: 1.35, w: 5.4, h: 3.8 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.15, w: 5.4, h: 0.45, fill: { color: DARK_BG } });
s.addText("H&E β Fibrous septa, regenerative nodules, inflammatory infiltrate (WebPathology)", {
x: 0.3, y: 5.17, w: 5.4, h: 0.38,
fontSize: 8.5, color: AMBER, fontFace: "Calibri", align: "center", italic: true, margin: 0
});
}
// Alcoholic disease spectrum image
if (imgAlcohol) {
s.addImage({ data: imgAlcohol, x: 6.0, y: 1.35, w: 6.9, h: 3.8 });
s.addShape(pres.ShapeType.rect, { x: 6.0, y: 5.15, w: 6.9, h: 0.45, fill: { color: DARK_BG } });
s.addText("Spectrum: Normal β Steatosis β Fibrosis β Cirrhosis β HCC (with histological images)", {
x: 6.0, y: 5.17, w: 6.9, h: 0.38,
fontSize: 8.5, color: AMBER, fontFace: "Calibri", align: "center", italic: true, margin: 0
});
}
// Micro vs Macro info
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.72, w: 5.4, h: 1.15, fill: { color: DARK_BG } });
s.addText("MICRO vs MACRONODULAR", {
x: 0.4, y: 5.75, w: 5.2, h: 0.28,
fontSize: 10, bold: true, color: AMBER, fontFace: "Calibri", margin: 0
});
s.addText("β’ Micronodular (<3mm): alcohol, NAFLD β uniform nodules\nβ’ Macronodular (>3mm): viral hepatitis, Wilson's β variable nodules", {
x: 0.4, y: 6.02, w: 5.2, h: 0.8,
fontSize: 10, color: WHITE, fontFace: "Calibri", margin: 0
});
s.addText("Source: WebPathology | Alcoholic Liver Disease Review", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 4 β CAUSES (Part 1)
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Differential Diagnosis β Causes of Cirrhosis", "Part 1: Most Common Etiologies");
const causes = [
{
title: "1. Alcoholic Liver Disease",
items: [
"Most common in Western countries (8β20% of chronic abusers)",
"Steatosis β Steatohepatitis β Fibrosis β Cirrhosis",
"Micronodular pattern; Mallory-Denk bodies on H&E",
"AST:ALT ratio >2:1 (AST rarely >300 IU/L)"
], accent: "C04E3A"
},
{
title: "2. Non-Alcoholic Fatty Liver (NAFLD/NASH)",
items: [
"Rapidly increasing β obesity, T2DM, metabolic syndrome",
"Histologically identical to alcoholic hepatitis",
"PNPLA3 gene variant increases risk",
"AST/ALT pattern: ALT > AST (opposite of ALD)"
], accent: "D4851A"
},
{
title: "3. Chronic Hepatitis B (HBV)",
items: [
"Ground-glass hepatocytes (HBsAg accumulation)",
"Macronodular cirrhosis; high HCC risk",
"HBsAg, HBeAg, HBV DNA positive",
"HBV DNA levels guide antiviral treatment"
], accent: "1A6E5A"
},
{
title: "4. Chronic Hepatitis C (HCV)",
items: [
"Lymphoid aggregates in portal tracts (characteristic)",
"Steatosis common, especially genotype 3",
"Anti-HCV and HCV RNA for diagnosis",
"Progresses over 20β40 years to cirrhosis"
], accent: "2E4A8E"
}
];
causes.forEach((c, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.3 + col * 6.5;
const y = 1.35 + row * 2.8;
addCard(s, x, y, 6.2, 2.55, c.title, c.items, { accent: c.accent, bg: WHITE });
});
s.addText("Source: Sleisenger & Fordtran's GI & Liver Disease | Harrison's Principles 22e | Goldman-Cecil Medicine", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 5 β CAUSES (Part 2)
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Differential Diagnosis β Causes of Cirrhosis", "Part 2: Metabolic, Autoimmune & Vascular");
const causes = [
{
title: "5. Wilson's Disease (AR β ATP7B mutation)",
items: [
"Copper accumulation in liver, brain, cornea",
"Kayser-Fleischer rings (pathognomonic)",
"Low ceruloplasmin, elevated urinary copper",
"Presents <40 years; can mimic acute hepatitis"
], accent: "7A3B8E"
},
{
title: "6. Hereditary Hemochromatosis (HFE gene)",
items: [
"Iron deposition in liver, pancreas, heart, skin",
"'Bronze diabetes': cirrhosis + T2DM + hyperpigmentation",
"β Ferritin, transferrin saturation >45%",
"C282Y homozygosity most common mutation"
], accent: "A04020"
},
{
title: "7. Autoimmune Hepatitis (AIH)",
items: [
"Young females predominantly; ANA/ASMA/anti-LKM1 +ve",
"Elevated IgG; interface hepatitis on biopsy",
"Responds dramatically to steroids",
"Untreated β cirrhosis in 40% within 10 years"
], accent: "D4851A"
},
{
title: "8. Primary Biliary Cholangitis (PBC)",
items: [
"Autoimmune destruction of intrahepatic bile ducts",
"Anti-mitochondrial antibody (AMA) in >90%",
"Pruritus, fatigue; β ALP & GGT disproportionate",
"Female predominance; UDCA is standard treatment"
], accent: "1A6E5A"
}
];
causes.forEach((c, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.3 + col * 6.5;
const y = 1.35 + row * 2.8;
addCard(s, x, y, 6.2, 2.55, c.title, c.items, { accent: c.accent, bg: WHITE });
});
s.addText("Source: Harrison's 22e | Goldman-Cecil Medicine | Sleisenger & Fordtran's GI & Liver Disease", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 6 β CAUSES (Part 3)
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Differential Diagnosis β Causes of Cirrhosis", "Part 3: Additional Etiologies");
const causes = [
{
title: "9. Primary Sclerosing Cholangitis (PSC)",
items: [
"Fibro-obliterative disease of intra- and extrahepatic ducts",
"Associated with IBD (especially ulcerative colitis) in 70%",
"ERCP/MRCP: 'Beading' of bile ducts",
"p-ANCA +ve; high risk of cholangiocarcinoma"
], accent: "2E4A8E"
},
{
title: "10. Alpha-1 Antitrypsin Deficiency",
items: [
"PAS-positive, diastase-resistant globules in hepatocytes",
"Also causes emphysema (lung disease)",
"ZZ phenotype carries highest risk of cirrhosis",
"Diagnosis: serum AAT level + phenotyping/genotyping"
], accent: "C04E3A"
},
{
title: "11. Budd-Chiari Syndrome",
items: [
"Hepatic venous outflow obstruction (hepatic vein/IVC thrombosis)",
"Triad: RUQ pain, ascites, hepatomegaly",
"Associated with hypercoagulable states (PCV, Factor V Leiden)",
"Venous pattern on imaging (Doppler US/CT)"
], accent: "7A3B8E"
},
{
title: "12. Cardiac Cirrhosis (Congestive Hepatopathy)",
items: [
"Chronic right heart failure β hepatic venous congestion",
"'Nutmeg liver' on gross pathology",
"High SAAG + HIGH ascitic protein (β₯2.5 g/dL) β KEY differentiator",
"Dyspnea persists after large-volume paracentesis"
], accent: "1A6E5A"
}
];
causes.forEach((c, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.3 + col * 6.5;
const y = 1.35 + row * 2.8;
addCard(s, x, y, 6.2, 2.55, c.title, c.items, { accent: c.accent, bg: WHITE });
});
s.addText("Source: Harrison's 22e | Goldman-Cecil Medicine | Sleisenger & Fordtran's GI & Liver Disease", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 7 β SAAG TABLE (KEY TOOL)
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Serum-Ascites Albumin Gradient (SAAG)", "Most important initial test for differentiating ascites");
// SAAG formula box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.35, w: 12.7, h: 0.72, fill: { color: DARK_BG }, line: { color: AMBER, pt: 2 } });
s.addText("SAAG = Serum Albumin β Ascitic Fluid Albumin", {
x: 0.5, y: 1.38, w: 9.0, h: 0.38,
fontSize: 18, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
s.addText("If SAAG β₯ 1.1 g/dL β Portal Hypertension present (97% accuracy)", {
x: 0.5, y: 1.73, w: 12.0, h: 0.28,
fontSize: 12, color: AMBER, fontFace: "Calibri", italic: true, margin: 0
});
// Table
const tableData = [
[
{ text: "CONDITION", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } },
{ text: "SAAG", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } },
{ text: "ASCITIC PROTEIN", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } },
{ text: "KEY FEATURES", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } }
],
[
{ text: "Cirrhosis", options: { bold: true } },
{ text: "HIGH (β₯1.1)", options: { color: "C04E3A", bold: true } },
{ text: "LOW (<2.5 g/dL)", options: { color: TEAL } },
{ text: "Low albumin, low platelets, spider nevi" }
],
[
{ text: "Cardiac Ascites", options: { bold: true } },
{ text: "HIGH (β₯1.1)", options: { color: "C04E3A", bold: true } },
{ text: "HIGH (β₯2.5 g/dL)", options: { color: TEAL, bold: true } },
{ text: "JVP raised, dyspnea persists after LVP" }
],
[
{ text: "Malignant Ascites", options: { bold: true } },
{ text: "LOW (<1.1)", options: { color: "2E4A8E", bold: true } },
{ text: "HIGH (>2.5 g/dL)", options: { color: TEAL } },
{ text: "Cytology +ve in 40β70%, elevated CEA" }
],
[
{ text: "TB Peritonitis", options: { bold: true } },
{ text: "LOW (<1.1)", options: { color: "2E4A8E", bold: true } },
{ text: "HIGH (>2.5 g/dL)", options: { color: TEAL } },
{ text: "Lymphocytic fluid, high ADA, fever, weight loss" }
],
[
{ text: "Nephrotic Syndrome", options: { bold: true } },
{ text: "LOW (<1.1)", options: { color: "2E4A8E", bold: true } },
{ text: "LOW (<2.5 g/dL)", options: { color: TEAL } },
{ text: "Massive proteinuria >3.5 g/day, edema" }
],
[
{ text: "Pancreatic Ascites", options: { bold: true } },
{ text: "LOW (<1.1)", options: { color: "2E4A8E", bold: true } },
{ text: "HIGH (>2.5 g/dL)", options: { color: TEAL } },
{ text: "Very high amylase/lipase in ascitic fluid" }
]
];
s.addTable(tableData, {
x: 0.3, y: 2.22, w: 12.7, h: 4.4,
border: { pt: 1, color: "CCCCCC" },
fill: { color: WHITE },
rowH: 0.58,
fontFace: "Calibri",
fontSize: 11,
align: "left",
valign: "middle",
autoPage: false
});
s.addText("Source: Goldman-Cecil Medicine, Table 139-3 | Sleisenger & Fordtran's GI & Liver Disease", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 8 β CT IMAGING + CLINICAL FEATURES
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Imaging & Clinical Features of Cirrhosis", "Radiological findings and clinical presentation");
// CT image
if (imgCT) {
s.addImage({ data: imgCT, x: 0.3, y: 1.35, w: 5.6, h: 4.8 });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 6.15, w: 5.6, h: 0.55, fill: { color: DARK_BG } });
s.addText("CT Abdomen: nodular hepatic contour, heterogeneous parenchyma, splenomegaly, portal hypertension (MedPix)", {
x: 0.3, y: 6.18, w: 5.6, h: 0.45,
fontSize: 8.5, color: AMBER, fontFace: "Calibri", align: "center", italic: true, margin: 0
});
}
// CT Features
s.addShape(pres.ShapeType.rect, { x: 6.3, y: 1.35, w: 6.7, h: 2.1, fill: { color: DARK_BG }, line: { color: TEAL, pt: 2 } });
s.addText("CT/ULTRASOUND FINDINGS", {
x: 6.4, y: 1.38, w: 6.5, h: 0.32,
fontSize: 12, bold: true, color: AMBER, fontFace: "Calibri", margin: 0
});
const ctFindings = [
"Nodular hepatic surface (most specific sign)",
"Heterogeneous parenchymal echotexture",
"Right lobe atrophy + caudate/left lobe hypertrophy",
"Splenomegaly (>13 cm) β portal hypertension",
"Varices: esophageal, gastric, portal hypertension",
"Ascites: perihepatic fluid"
];
ctFindings.forEach((f, i) => {
s.addText([
{ text: "βΈ ", options: { color: TEAL, bold: true } },
{ text: f, options: { color: WHITE } }
], {
x: 6.4, y: 1.7 + i * 0.27, w: 6.5, h: 0.26,
fontSize: 10.5, fontFace: "Calibri", margin: 0
});
});
// Clinical features
s.addShape(pres.ShapeType.rect, { x: 6.3, y: 3.55, w: 6.7, h: 3.1, fill: { color: WHITE }, line: { color: AMBER, pt: 2 } });
s.addShape(pres.ShapeType.rect, { x: 6.3, y: 3.55, w: 6.7, h: 0.38, fill: { color: AMBER } });
s.addText("CLINICAL FEATURES", {
x: 6.4, y: 3.58, w: 6.5, h: 0.3,
fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
const clinFeatures = [
"Spider nevi (>5 on upper body)",
"Palmer erythema, leukonychia",
"Gynaecomastia, parotid enlargement (in ALD)",
"Jaundice, ascites, splenomegaly",
"Caput medusae (dilated periumbilical veins)",
"Asterixis ('flapping tremor') β hepatic encephalopathy",
"Dupuytren's contracture (especially alcoholic)",
"Bruising, petechiae (thrombocytopenia)"
];
clinFeatures.forEach((f, i) => {
s.addText([
{ text: "β’ ", options: { color: AMBER, bold: true } },
{ text: f, options: { color: DARK_TEXT } }
], {
x: 6.4, y: 3.97 + i * 0.33, w: 6.4, h: 0.31,
fontSize: 10, fontFace: "Calibri", margin: 0
});
});
s.addText("Source: Harrison's 22e | MedPix Imaging Database | Goldman-Cecil Medicine", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 9 β LAB INVESTIGATIONS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Laboratory Investigations in Cirrhosis", "Diagnostic workup and interpretation");
const labGroups = [
{
title: "Liver Function Tests",
items: [
"ALT / AST elevated (inflammation)",
"ALP, GGT β in cholestatic liver disease",
"Bilirubin β (jaundice when >3 mg/dL)",
"Albumin β (synthetic function marker)"
], x: 0.3, y: 1.35, accent: TEAL
},
{
title: "Haematology & Coagulation",
items: [
"Thrombocytopenia (splenomegaly/sequestration)",
"Prolonged PT/INR (β clotting factors)",
"Anaemia (GI bleeding / bone marrow suppression)",
"Leucopenia (hypersplenism)"
], x: 6.5, y: 1.35, accent: "C04E3A"
},
{
title: "Specific Diagnostic Tests",
items: [
"HBsAg, Anti-HCV β viral hepatitis",
"ANA, ASMA β AIH; AMA β PBC",
"Ceruloplasmin + 24h urine copper β Wilson's",
"Serum iron, ferritin, TIBC β hemochromatosis"
], x: 0.3, y: 3.65, accent: "7A3B8E"
},
{
title: "Ascitic Fluid Analysis",
items: [
"Cell count: PMN >250/mmΒ³ β SBP",
"Glucose, LDH β secondary bacterial peritonitis",
"Amylase/lipase β pancreatic ascites",
"Cytology β malignant ascites (40β70% sensitivity)"
], x: 6.5, y: 3.65, accent: "D4851A"
}
];
labGroups.forEach(g => {
addCard(s, g.x, g.y, 6.0, 2.1, g.title, g.items, { accent: g.accent, bg: WHITE });
});
// Child-Pugh scoring note
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.85, w: 12.7, h: 1.02, fill: { color: DARK_BG }, line: { color: AMBER, pt: 2 } });
s.addText("CHILD-PUGH SCORE (Severity Assessment):", {
x: 0.5, y: 5.88, w: 12.0, h: 0.3,
fontSize: 11, bold: true, color: AMBER, fontFace: "Calibri", margin: 0
});
s.addText("Class A (5-6 pts): Compensated β Class B (7-9 pts): Significant dysfunction β Class C (10-15 pts): Decompensated, high mortality\nVariables: Bilirubin, Albumin, PT/INR, Ascites, Encephalopathy", {
x: 0.5, y: 6.18, w: 12.3, h: 0.6,
fontSize: 10.5, color: WHITE, fontFace: "Calibri", margin: 0
});
s.addText("Source: Harrison's 22e | Tietz Textbook of Laboratory Medicine | Goldman-Cecil Medicine", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 10 β EXAM MEMORY AID
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeaderBar(s, "Exam Memory Aid β ABCDEFGHIN Mnemonic", "Quick recall for causes of cirrhosis");
// Override header to work on dark bg
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 1.1, fill: { color: "091F2E" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 1.1, w: "100%", h: 0.07, fill: { color: AMBER } });
s.addText("Exam Memory Aid β Causes of Cirrhosis", {
x: 0.35, y: 0.05, w: 12.6, h: 0.65,
fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri", align: "left", margin: 0
});
s.addText("MNEMONIC: A-B-C-D-H-H-N-A-W-A", {
x: 0.35, y: 0.68, w: 12.6, h: 0.38,
fontSize: 14, color: AMBER, fontFace: "Calibri", italic: true, margin: 0
});
const mnemonics = [
{ letter: "A", word: "Alcohol", detail: "Most common in West, micronodular, Mallory-Denk bodies" },
{ letter: "B", word: "Budd-Chiari", detail: "Hepatic venous outflow obstruction, hypercoagulable states" },
{ letter: "C", word: "Cardiac Cirrhosis", detail: "High SAAG + HIGH protein β key differentiator" },
{ letter: "D", word: "Drugs (DILI)", detail: "Methotrexate, amiodarone, INH, methyldopa β chronic use" },
{ letter: "H", word: "Hepatitis B & C", detail: "HBV: ground-glass hepatocytes; HCV: lymphoid aggregates" },
{ letter: "H", word: "Hemochromatosis", detail: "Bronze diabetes; β ferritin + transferrin saturation >45%" },
{ letter: "N", word: "NASH/NAFLD", detail: "Metabolic syndrome; histology identical to ALD" },
{ letter: "A", word: "Autoimmune (AIH, PBC, PSC)", detail: "AIH: steroids; PBC: AMA+; PSC: beading ducts" },
{ letter: "W", word: "Wilson's Disease", detail: "KF rings, low ceruloplasmin, age <40" },
{ letter: "A", word: "Alpha-1 Antitrypsin", detail: "PAS+ globules, ZZ genotype, also emphysema" }
];
const colW = 6.3;
mnemonics.forEach((m, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.3 + col * 6.55;
const y = 1.32 + row * 1.12;
s.addShape(pres.ShapeType.rect, { x, y, w: colW, h: 1.0, fill: { color: "142A3A" }, line: { color: TEAL, pt: 1 } });
// Letter badge
s.addShape(pres.ShapeType.rect, { x, y, w: 0.65, h: 1.0, fill: { color: AMBER } });
s.addText(m.letter, {
x, y: y + 0.22, w: 0.65, h: 0.6, fontSize: 26, bold: true, color: DARK_BG,
fontFace: "Calibri", align: "center", margin: 0
});
s.addText(m.word, {
x: x + 0.7, y: y + 0.08, w: colW - 0.75, h: 0.35,
fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
s.addText(m.detail, {
x: x + 0.7, y: y + 0.44, w: colW - 0.8, h: 0.48,
fontSize: 10, color: "A8C4C2", fontFace: "Calibri", margin: 0
});
});
s.addText("Source: Harrison's 22e | Goldman-Cecil Medicine | Sleisenger & Fordtran | Katzung's Pharmacology 16e | Morgan & Mikhail Anesthesiology 7e", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
// SLIDE 11 β REFERENCE BOOKS
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addHeaderBar(s, "Reference Books Used", "11 authoritative medical textbooks consulted");
const books = [
{ n: "1", title: "Sleisenger & Fordtran's GI & Liver Disease", spec: "Gastroenterology", highlight: true },
{ n: "2", title: "Goldman-Cecil Medicine International Edition, 2-Vol Set", spec: "Internal Medicine", highlight: true },
{ n: "3", title: "Harrison's Principles of Internal Medicine 22e (2025)", spec: "Internal Medicine", highlight: true },
{ n: "4", title: "Murray & Nadel's Textbook of Respiratory Medicine", spec: "Pulmonology", highlight: false },
{ n: "5", title: "Basic Medical Biochemistry β A Clinical Approach 6e", spec: "Biochemistry", highlight: false },
{ n: "6", title: "Katzung's Basic & Clinical Pharmacology 16e", spec: "Pharmacology", highlight: false },
{ n: "7", title: "Brenner & Rector's The Kidney, 2-Vol Set", spec: "Nephrology", highlight: false },
{ n: "8", title: "Comprehensive Clinical Nephrology 7e", spec: "Nephrology", highlight: false },
{ n: "9", title: "Morgan & Mikhail's Clinical Anesthesiology 7e", spec: "Anesthesiology", highlight: false },
{ n: "10", title: "Tietz Textbook of Laboratory Medicine 7e", spec: "Laboratory Medicine", highlight: false },
{ n: "11", title: "Gray's Anatomy for Students", spec: "Anatomy", highlight: false }
];
books.forEach((b, i) => {
const col = i < 6 ? 0 : 1;
const row = i < 6 ? i : i - 6;
const x = 0.3 + col * 6.5;
const y = 1.35 + row * 0.9;
const bgColor = b.highlight ? "EDF8F5" : WHITE;
const borderColor = b.highlight ? TEAL : "CCCCCC";
s.addShape(pres.ShapeType.rect, { x, y, w: 6.0, h: 0.78, fill: { color: bgColor }, line: { color: borderColor, pt: 1.5 } });
// Number badge
s.addShape(pres.ShapeType.rect, { x, y, w: 0.45, h: 0.78, fill: { color: b.highlight ? TEAL : GRAY } });
s.addText(b.n, {
x, y: y + 0.2, w: 0.45, h: 0.38, fontSize: 14, bold: true, color: WHITE,
fontFace: "Calibri", align: "center", margin: 0
});
s.addText(b.title, {
x: x + 0.5, y: y + 0.06, w: 5.4, h: 0.42,
fontSize: 10.5, bold: b.highlight, color: DARK_TEXT, fontFace: "Calibri", margin: 0
});
s.addText(b.spec, {
x: x + 0.5, y: y + 0.5, w: 5.4, h: 0.25,
fontSize: 9.5, color: b.highlight ? TEAL : GRAY, fontFace: "Calibri", italic: true, margin: 0
});
});
s.addText("All 11 books available in the Orris Medical Library β’ Query: query_library_db()", {
x: 0.3, y: 7.0, w: 12.7, h: 0.35,
fontSize: 9, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
// βββ Save βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const outPath = "/home/daytona/workspace/medical-ppt/Liver_Cirrhosis_Differential_Diagnosis.pptx";
pres.writeFile({ fileName: outPath })
.then(() => console.log("β
Saved:", outPath))
.catch(e => { console.error("Save error:", e); process.exit(1); });
cd /home/daytona/workspace/medical-ppt && node cirrhosis_ppt.js 2>&1
ls -lh /home/daytona/workspace/medical-ppt/Liver_Cirrhosis_Differential_Diagnosiβ¦
Liver Cirrhosis Differential Diagnosis
Presentation Β· PPTX
| Slide | Content |
|---|---|
| 1 | Title slide with key stats (10+ causes, 97% SAAG accuracy, 80% ascites from cirrhosis) |
| 2 | What is cirrhosis? β Definition, key features, gross pathology image |
| 3 | Histology + disease spectrum β H&E image + alcoholic disease progression diagram |
| 4 | Causes Part 1 β Alcohol, NAFLD, HBV, HCV |
| 5 | Causes Part 2 β Wilson's, Hemochromatosis, AIH, PBC |
| 6 | Causes Part 3 β PSC, AAT deficiency, Budd-Chiari, Cardiac cirrhosis |
| 7 | SAAG table β the KEY diagnostic tool with all conditions compared |
| 8 | Imaging + Clinical Features β CT image + full clinical signs list |
| 9 | Lab investigations + Child-Pugh scoring |
| 10 | Memory aid β A-B-C-D-H-H-N-A-W-A mnemonic for all 10 causes |
| 11 | All 11 reference books used |
I don't want PPT, I want a poster. So can you generate me a poster for all this information?
ls /home/daytona/workspace/medical-ppt/ && python3 -c "import reportlab; print('β¦
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.β¦
generate as an image
A detailed medical education poster titled "Liver Cirrhosis β Differential Diagnosis" with a dark navy-teal background and amber accents. The poster contains the following sections organized in a grid layout: TOP SECTION (header): Large title "LIVER CIRRHOSIS β DIFFERENTIAL DIAGNOSIS" with subtitle "A Complete Guide for Exam Preparation" on a deep navy background with an amber stripe. SECTION 1 β What is Cirrhosis (top left): Definition box explaining cirrhosis as end-stage chronic liver disease with diffuse fibrosis, regenerative nodules, portal hypertension. Key features listed as bullet points. SECTION 2 β Gross Pathology (top center): Label "MACRONODULAR CIRRHOSIS" with description of coarse nodular surface, >3mm nodules, firm reddish-brown liver. SECTION 3 β SAAG Table (prominent center): Large table titled "SERUM-ASCITES ALBUMIN GRADIENT (SAAG)" with formula "SAAG = Serum Albumin β Ascitic Albumin". Table columns: Condition, SAAG, Ascitic Protein, Key Features. Rows: Cirrhosis (HIGH SAAG, LOW protein), Cardiac Ascites (HIGH SAAG, HIGH protein), Malignant Ascites (LOW SAAG, HIGH protein), TB Peritonitis (LOW SAAG, HIGH protein), Nephrotic Syndrome (LOW SAAG, LOW protein), Pancreatic Ascites (LOW SAAG, HIGH protein). SECTION 4 β Causes Grid (middle): 12 color-coded boxes for each cause: 1. Alcoholic Liver Disease (red) β micronodular, Mallory-Denk bodies, AST:ALT >2 2. NAFLD/NASH (orange) β metabolic syndrome, ALT > AST 3. Chronic HBV (green) β ground-glass hepatocytes, macronodular 4. Chronic HCV (blue) β lymphoid aggregates, steatosis 5. Wilson's Disease (purple) β KF rings, low ceruloplasmin, <40 years 6. Hemochromatosis (dark red) β bronze diabetes, ferritinβ, TIBCβ 7. Autoimmune Hepatitis (gold) β ANA/ASMA +ve, responds to steroids 8. Primary Biliary Cholangitis (teal) β AMA +ve, female, pruritus 9. Primary Sclerosing Cholangitis (navy) β IBD association, beading ducts 10. Alpha-1 Antitrypsin Deficiency (olive) β PAS+ globules, ZZ genotype 11. Budd-Chiari Syndrome (violet) β hepatic vein thrombosis, triad 12. Cardiac Cirrhosis (slate) β nutmeg liver, HIGH SAAG + HIGH protein SECTION 5 β Memory Aid (bottom left): Large mnemonic "A-B-C-D-H-H-N-A-W-A" with colored letter badges: A=Alcohol, B=Budd-Chiari, C=Cardiac, D=Drugs, H=Hepatitis, H=Hemochromatosis, N=NASH, A=Autoimmune, W=Wilson's, A=AAT Deficiency. SECTION 6 β Lab Investigations (bottom center): Grid showing Liver Function Tests, Haematology, Specific Tests (HBsAg, ANA, AMA, ceruloplasmin, ferritin), Child-Pugh Score A/B/C classification. SECTION 7 β References (bottom right): "Based on 11 textbooks including: Sleisenger & Fordtran's GI & Liver Disease, Harrison's 22e, Goldman-Cecil Medicine, Katzung's Pharmacology 16e, Brenner & Rector's Kidney" The overall design is a professional medical academic poster with deep navy (#0D2B3E) background, teal (#0E7C7B) section borders, amber (#F4A020) accents and highlights, white text, clean sans-serif typography. Dense information, organized grid, suitable for medical exam preparation.
