Make a ppt on breif introduction, approach to management , Treatment with dose , complication of viral hepatitis as per harrison
mkdir -p /home/daytona/workspace/viral-hepatitis-ppt && ls /home/daytona/workspace/
~/viral-hepatitis-ppt/viral_hepatitis.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = 'LAYOUT_WIDE';
pres.title = 'Viral Hepatitis';
pres.author = 'Harrison\'s Principles of Internal Medicine 22E';
// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
bg_dark: '0D1B2A', // deep navy
bg_mid: '1B2E44', // medium navy
accent: 'E8A020', // amber/gold
accent2: '3AAFA9', // teal
accent3: 'E05A3A', // coral/red
accent4: '4CAF79', // green
white: 'FFFFFF',
light_gray: 'D0D8E4',
text_dark: '1A1A2E',
subtitle: 'A8C0D6',
card_bg: '162236',
card_bg2: '0F2435',
};
// ─── HELPER FUNCTIONS ─────────────────────────────────────────────────────────
function addSlide(bg) {
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: '100%', h: '100%', fill: { color: bg || C.bg_dark } });
return s;
}
function slideHeader(slide, title, subtitle, accentColor) {
const ac = accentColor || C.accent;
// accent bar top
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: '100%', h: 0.08, fill: { color: ac } });
slide.addText(title, {
x: 0.5, y: 0.18, w: 12.3, h: 0.7,
fontSize: 28, bold: true, color: C.white, fontFace: 'Calibri', margin: 0
});
if (subtitle) {
slide.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.92, w: 1.2, h: 0.06, fill: { color: ac } });
slide.addText(subtitle, {
x: 0.5, y: 1.0, w: 12.3, h: 0.35,
fontSize: 13, color: C.subtitle, fontFace: 'Calibri', italic: true, margin: 0
});
}
}
function bullet(text, options) {
return { text, options: { bullet: { type: 'bullet', code: '25B6' }, fontSize: 14, color: C.white, fontFace: 'Calibri', breakLine: true, ...options } };
}
function bulletDot(text, options) {
return { text, options: { bullet: { type: 'bullet', code: '25CF' }, fontSize: 13, color: C.light_gray, fontFace: 'Calibri', breakLine: true, ...options } };
}
function card(slide, x, y, w, h, title, titleColor, bodyItems, bgColor) {
slide.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill: { color: bgColor || C.card_bg }, line: { color: titleColor || C.accent, width: 1.5 }, rectRadius: 0.08 });
slide.addText(title, { x: x + 0.15, y: y + 0.08, w: w - 0.3, h: 0.4, fontSize: 14, bold: true, color: titleColor || C.accent, fontFace: 'Calibri', margin: 0 });
slide.addText(bodyItems, { x: x + 0.15, y: y + 0.5, w: w - 0.3, h: h - 0.6, fontSize: 12, color: C.white, fontFace: 'Calibri', valign: 'top', margin: 0 });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
// large accent rect left
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.4, h: '100%', fill: { color: C.accent } });
// subtle mid panel
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.8, w: 12.9, h: 3.5, fill: { color: C.bg_mid } });
s.addText('VIRAL HEPATITIS', {
x: 0.7, y: 2.0, w: 12, h: 1.2,
fontSize: 52, bold: true, color: C.white, fontFace: 'Calibri', margin: 0, charSpacing: 3
});
s.addText('A Comprehensive Overview', {
x: 0.7, y: 3.2, w: 10, h: 0.5,
fontSize: 22, color: C.accent, fontFace: 'Calibri', italic: true, margin: 0
});
s.addShape(pres.ShapeType.rect, { x: 0.7, y: 3.85, w: 4, h: 0.05, fill: { color: C.accent2 } });
s.addText("Harrison's Principles of Internal Medicine, 22nd Edition (2025)", {
x: 0.7, y: 4.0, w: 10, h: 0.4,
fontSize: 14, color: C.subtitle, fontFace: 'Calibri', margin: 0
});
s.addText('Chapter 350 & 352 | Schaefer, Chung, Dienstag', {
x: 0.7, y: 4.5, w: 10, h: 0.35,
fontSize: 12, color: C.light_gray, fontFace: 'Calibri', margin: 0, italic: true
});
// decorative circles
s.addShape(pres.ShapeType.ellipse, { x: 11.0, y: 0.3, w: 2.5, h: 2.5, fill: { color: C.accent, alpha: 85 } });
s.addShape(pres.ShapeType.ellipse, { x: 11.8, y: 1.2, w: 1.4, h: 1.4, fill: { color: C.accent2, alpha: 80 } });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW OUTLINE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'PRESENTATION OUTLINE', 'Topics covered in this presentation', C.accent);
const topics = [
{ num: '01', title: 'Introduction & Virology', desc: 'HAV, HBV, HCV, HDV, HEV — structure, epidemiology, pathogenesis' },
{ num: '02', title: 'Clinical Features & Diagnosis', desc: 'Symptoms, signs, incubation, lab findings, serologic markers' },
{ num: '03', title: 'Approach to Management', desc: 'General measures, indications for hospitalization, monitoring' },
{ num: '04', title: 'Treatment with Doses', desc: 'Antivirals for HBV and HCV — regimens, doses, duration' },
{ num: '05', title: 'Complications', desc: 'Fulminant hepatitis, chronicity, cirrhosis, HCC, extrahepatic' },
];
const colors = [C.accent, C.accent2, C.accent3, C.accent4, 'B07FD4'];
topics.forEach((t, i) => {
const col = i < 3 ? 0 : (i === 3 ? 0 : 0);
const x = 0.5 + (i % 3) * 4.3;
const y = i < 3 ? 1.55 : 3.45;
const xOff = i === 3 ? 2.15 : (i === 4 ? 6.45 : x);
const yOff = i < 3 ? y : y;
s.addShape(pres.ShapeType.roundRect, { x: xOff, y: yOff, w: 3.9, h: 1.65, fill: { color: C.card_bg }, line: { color: colors[i], width: 1.5 }, rectRadius: 0.08 });
s.addText(t.num, { x: xOff + 0.15, y: yOff + 0.1, w: 0.6, h: 0.5, fontSize: 22, bold: true, color: colors[i], fontFace: 'Calibri', margin: 0 });
s.addText(t.title, { x: xOff + 0.15, y: yOff + 0.55, w: 3.6, h: 0.45, fontSize: 15, bold: true, color: C.white, fontFace: 'Calibri', margin: 0 });
s.addText(t.desc, { x: xOff + 0.15, y: yOff + 1.0, w: 3.6, h: 0.5, fontSize: 11, color: C.subtitle, fontFace: 'Calibri', margin: 0 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — INTRODUCTION (ETIOLOGY)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'INTRODUCTION — VIROLOGY & ETIOLOGY', 'Five primary hepatotropic viruses', C.accent);
const viruses = [
{ name: 'HAV', color: C.accent, type: 'RNA', family: 'Picornavirus / Hepatovirus', genome: 'ssRNA (+), 7500 nt', route: 'Fecal-oral', incub: '15–45 days (mean 4 wks)', chronic: 'No' },
{ name: 'HBV', color: C.accent2, type: 'DNA', family: 'Hepadnavirus', genome: 'Partially dsDNA', route: 'Parenteral / Sexual / Perinatal', incub: '30–180 days (mean 8–12 wks)', chronic: 'Yes (1–90%)' },
{ name: 'HCV', color: C.accent3, type: 'RNA', family: 'Flavivirus / Hepacivirus', genome: 'ssRNA (+), 6 genotypes', route: 'Parenteral (IDU)', incub: '15–160 days (mean 7 wks)', chronic: 'Yes (~80%)' },
{ name: 'HDV', color: 'B07FD4', type: 'RNA', family: 'Deltavirus (satellite)', genome: 'Circular ssRNA, HDV Ag', route: 'Co-/Super-infection with HBV', incub: '30–60 days', chronic: 'If superinfection: 70–80%' },
{ name: 'HEV', color: C.accent4, type: 'RNA', family: 'Hepeviridae', genome: 'ssRNA (+), 4 genotypes', route: 'Fecal-oral (waterborne)', incub: '14–60 days (mean 5–6 wks)', chronic: 'Rare (immunosuppressed)' },
];
viruses.forEach((v, i) => {
const x = 0.3 + i * 2.56;
const y = 1.55;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 2.45, h: 4.0, fill: { color: C.card_bg }, line: { color: v.color, width: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.roundRect, { x, y, w: 2.45, h: 0.65, fill: { color: v.color }, rectRadius: 0.1 });
s.addText(v.name, { x: x + 0.05, y: y + 0.08, w: 2.35, h: 0.5, fontSize: 22, bold: true, color: C.white, fontFace: 'Calibri', align: 'center', margin: 0 });
const rows = [
[v.type + ' virus', v.family],
['Incubation:', v.incub],
['Route:', v.route],
['Chronicity:', v.chronic],
];
rows.forEach((r, ri) => {
s.addText(r[0], { x: x + 0.1, y: y + 0.8 + ri * 0.78, w: 2.25, h: 0.32, fontSize: 10.5, bold: true, color: v.color, fontFace: 'Calibri', margin: 0 });
s.addText(r[1], { x: x + 0.1, y: y + 1.08 + ri * 0.78, w: 2.25, h: 0.38, fontSize: 10, color: C.light_gray, fontFace: 'Calibri', margin: 0, wrap: true });
});
});
s.addText('* HBV is the only DNA virus; replicates like a retrovirus. All others are RNA viruses. HAV/HEV = enteric; HBV/HCV/HDV = parenteral transmission.', {
x: 0.3, y: 5.65, w: 12.9, h: 0.3, fontSize: 10, color: C.subtitle, fontFace: 'Calibri', italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — CLINICAL FEATURES
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'CLINICAL FEATURES & DIAGNOSIS', 'Symptoms, signs, and serologic markers', C.accent2);
// Left column – Phases
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.55, w: 4.0, h: 4.1, fill: { color: C.card_bg }, line: { color: C.accent2, width: 1.5 }, rectRadius: 0.08 });
s.addText('CLINICAL PHASES', { x: 0.55, y: 1.65, w: 3.7, h: 0.4, fontSize: 14, bold: true, color: C.accent2, fontFace: 'Calibri', margin: 0 });
const phases = [
['Incubation', 'Asymptomatic; viremia present'],
['Prodrome\n(pre-icteric)', 'Anorexia, nausea, vomiting, fatigue, myalgia, fever 38–39°C, RUQ pain, aversion to cigarettes/alcohol'],
['Icteric Phase', 'Jaundice, dark urine, pale stools, hepatomegaly, splenomegaly (~20%), pruritus'],
['Recovery', 'Fatigue may persist weeks to months'],
];
const phaseColors = [C.accent, C.accent2, C.accent3, C.accent4];
phases.forEach((p, i) => {
s.addShape(pres.ShapeType.rect, { x: 0.55, y: 2.1 + i * 0.88, w: 0.1, h: 0.7, fill: { color: phaseColors[i] } });
s.addText(p[0], { x: 0.75, y: 2.1 + i * 0.88, w: 3.5, h: 0.28, fontSize: 12, bold: true, color: phaseColors[i], fontFace: 'Calibri', margin: 0 });
s.addText(p[1], { x: 0.75, y: 2.38 + i * 0.88, w: 3.5, h: 0.4, fontSize: 10.5, color: C.white, fontFace: 'Calibri', margin: 0, wrap: true });
});
// Middle column – Labs
s.addShape(pres.ShapeType.roundRect, { x: 4.7, y: 1.55, w: 4.0, h: 4.1, fill: { color: C.card_bg }, line: { color: C.accent, width: 1.5 }, rectRadius: 0.08 });
s.addText('LABORATORY FINDINGS', { x: 4.85, y: 1.65, w: 3.7, h: 0.4, fontSize: 14, bold: true, color: C.accent, fontFace: 'Calibri', margin: 0 });
const labs = [
['ALT / AST', 'Elevated 400–4000 IU/L; ALT > AST in viral hepatitis'],
['Bilirubin', 'Total Tbili >3 mg/dL with jaundice; both conjugated & unconjugated'],
['PT / INR', 'Prolonged in severe disease; best indicator of hepatic synthesis'],
['Alkaline\nPhosphatase', 'Modestly elevated; >3× normal suggests cholestasis'],
['CBC', 'Atypical lymphocytes; relative leukopenia'],
['Serology', 'Type-specific markers (see next column)'],
];
labs.forEach((l, i) => {
s.addText('▸ ' + l[0], { x: 4.85, y: 2.12 + i * 0.57, w: 3.7, h: 0.25, fontSize: 12, bold: true, color: C.accent, fontFace: 'Calibri', margin: 0 });
s.addText(l[1], { x: 4.85, y: 2.37 + i * 0.57, w: 3.7, h: 0.22, fontSize: 10.5, color: C.white, fontFace: 'Calibri', margin: 0, wrap: true });
});
// Right column – Serologic markers
s.addShape(pres.ShapeType.roundRect, { x: 9.0, y: 1.55, w: 4.2, h: 4.1, fill: { color: C.card_bg }, line: { color: C.accent3, width: 1.5 }, rectRadius: 0.08 });
s.addText('KEY SEROLOGIC MARKERS', { x: 9.15, y: 1.65, w: 3.9, h: 0.4, fontSize: 14, bold: true, color: C.accent3, fontFace: 'Calibri', margin: 0 });
const sero = [
['HAV', 'IgM anti-HAV = acute; IgG anti-HAV = past/immunity'],
['HBV acute', 'HBsAg (+), IgM anti-HBc (+), HBeAg reflects high replication'],
['HBV window', 'HBsAg(-), anti-HBs(-) → only IgM anti-HBc (+)'],
['HBV chronic', 'HBsAg >6 months; HBV DNA, HBeAg/anti-HBe, LFTs'],
['HCV', 'Anti-HCV ± HCV RNA (RNA confirms viremia)'],
['HDV', 'HDAg, anti-HDV; only in HBsAg(+) patients'],
['HEV', 'IgM/IgG anti-HEV; HEV RNA in stool/serum'],
];
sero.forEach((r, i) => {
s.addText('▸ ' + r[0], { x: 9.15, y: 2.12 + i * 0.49, w: 3.9, h: 0.22, fontSize: 12, bold: true, color: C.accent3, fontFace: 'Calibri', margin: 0 });
s.addText(r[1], { x: 9.15, y: 2.34 + i * 0.49, w: 3.9, h: 0.2, fontSize: 10, color: C.white, fontFace: 'Calibri', margin: 0, wrap: true });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — APPROACH TO MANAGEMENT (ACUTE)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'APPROACH TO MANAGEMENT', 'Acute viral hepatitis — general principles', C.accent4);
// Box: General measures
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.55, w: 6.1, h: 4.1, fill: { color: C.card_bg }, line: { color: C.accent4, width: 1.5 }, rectRadius: 0.08 });
s.addText('GENERAL MEASURES', { x: 0.55, y: 1.65, w: 5.8, h: 0.4, fontSize: 15, bold: true, color: C.accent4, fontFace: 'Calibri', margin: 0 });
const general = [
['Activity', 'Rest as needed; bed rest is not essential. Restrict strenuous physical activity. Resume activity as tolerated.'],
['Diet', 'High-calorie diet preferred. Nausea often worst in afternoon, so major caloric intake in morning. IV fluids if persistent vomiting.'],
['Drugs to Avoid', 'All drugs metabolized by liver; hepatotoxic agents; cholestatic drugs. Glucocorticoids have NO role — may worsen chronicity.'],
['Pruritus', 'Cholestyramine (bile salt resin) for severe pruritus.'],
['Alcohol', 'Abstain completely during acute illness.'],
['Isolation', 'No isolation needed for bloodborne types (HBV/HCV/HDV). Enteric precautions for HAV/HEV (hand hygiene, gloves for stool).'],
];
general.forEach((g, i) => {
s.addText('▸ ' + g[0], { x: 0.55, y: 2.12 + i * 0.57, w: 5.8, h: 0.24, fontSize: 12.5, bold: true, color: C.accent4, fontFace: 'Calibri', margin: 0 });
s.addText(g[1], { x: 0.55, y: 2.36 + i * 0.57, w: 5.8, h: 0.22, fontSize: 10.5, color: C.white, fontFace: 'Calibri', margin: 0, wrap: true });
});
// Box: Hospitalization indications
s.addShape(pres.ShapeType.roundRect, { x: 6.8, y: 1.55, w: 6.1, h: 2.0, fill: { color: C.card_bg }, line: { color: C.accent3, width: 1.5 }, rectRadius: 0.08 });
s.addText('INDICATIONS FOR HOSPITALIZATION', { x: 6.95, y: 1.65, w: 5.8, h: 0.4, fontSize: 13, bold: true, color: C.accent3, fontFace: 'Calibri', margin: 0 });
const hosp = ['Prolonged PT / coagulopathy', 'Encephalopathy / altered sensorium', 'Hypoglycemia', 'Persistent vomiting / inability to maintain hydration', 'Serum bilirubin >10 mg/dL or rapidly rising', 'Elderly or immunocompromised patient'];
s.addText(hosp.map(h => '• ' + h).join('\n'), { x: 6.95, y: 2.1, w: 5.8, h: 1.35, fontSize: 11.5, color: C.white, fontFace: 'Calibri', valign: 'top', margin: 0 });
// Box: Monitoring
s.addShape(pres.ShapeType.roundRect, { x: 6.8, y: 3.75, w: 6.1, h: 1.9, fill: { color: C.card_bg }, line: { color: C.accent, width: 1.5 }, rectRadius: 0.08 });
s.addText('MONITORING PARAMETERS', { x: 6.95, y: 3.85, w: 5.8, h: 0.4, fontSize: 13, bold: true, color: C.accent, fontFace: 'Calibri', margin: 0 });
const monitor = ['LFTs (ALT/AST) every 1–2 weeks until normalization', 'PT/INR — key marker of hepatic synthetic function', 'Serum bilirubin (total + direct)', 'Serology: HBsAg, HBeAg, anti-HBe, HBV DNA', 'Abdominal ultrasound if prolonged jaundice or fever'];
s.addText(monitor.map(m => '• ' + m).join('\n'), { x: 6.95, y: 4.28, w: 5.8, h: 1.3, fontSize: 11.5, color: C.white, fontFace: 'Calibri', valign: 'top', margin: 0 });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — MANAGEMENT: SPECIFIC ANTIVIRALS (HBV)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'TREATMENT — CHRONIC HEPATITIS B', 'Eight approved agents: goals and first-line recommendations', C.accent2);
// Header bar
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.55, w: 12.5, h: 0.45, fill: { color: C.bg_mid } });
['Drug', 'Route & Dose', 'Resistance', 'Key Points'].forEach((h, i) => {
const xs = [0.5, 3.0, 6.7, 9.3];
s.addText(h, { x: xs[i], y: 1.6, w: i === 0 ? 2.4 : (i === 1 ? 3.5 : (i === 2 ? 2.5 : 3.5)), h: 0.35, fontSize: 12.5, bold: true, color: C.accent2, fontFace: 'Calibri', margin: 0 });
});
const drugs = [
['PEG-IFN α-2a\n(First-line)', 'SC 100 µg/week × 48 wks', 'Not described', 'Finite duration; response better in Genotype A/B; avoid in decompensated cirrhosis & pregnancy'],
['Entecavir\n★ First-line', 'Oral 0.5 mg/day\n(1 mg/day if LAM-R)', '1–2% @ 5 yr (naïve)\n50% @ 5 yr (LAM-R)', 'High potency, high barrier to resistance; preferred oral agent'],
['Tenofovir DF\n★ First-line', 'Oral 300 mg/day', 'None reported', 'Potent; preferred in pregnancy (Category B); monitor renal function & bone density'],
['Tenofovir AF\n★ First-line', 'Oral 25 mg/day', 'None reported', 'Renal/bone-safer TAF formulation; not for CrCl <15 mL/min'],
['Lamivudine\n(Historical)', 'Oral 100 mg/day', '23% @ 1 yr; 70% @ 5 yr', 'High resistance; only for prophylaxis if short course needed'],
['Adefovir\n(Historical)', 'Oral 10 mg/day', '20–29% @ 5 yr', 'Renal toxicity at higher doses; active against LAM-R strains'],
['Telbivudine\n(Historical)', 'Oral 600 mg/day', '11–25% @ 2 yr', 'Cross-resistance with lamivudine; myopathy risk'],
];
const rowColors = [C.bg_mid, C.card_bg];
drugs.forEach((d, i) => {
const y = 2.1 + i * 0.5;
s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 12.5, h: 0.48, fill: { color: rowColors[i % 2] } });
s.addText(d[0], { x: 0.5, y: y + 0.05, w: 2.4, h: 0.38, fontSize: 11, bold: true, color: d[0].includes('★') ? C.accent4 : C.white, fontFace: 'Calibri', margin: 0, wrap: true });
s.addText(d[1], { x: 3.0, y: y + 0.05, w: 3.5, h: 0.38, fontSize: 11, color: C.accent, fontFace: 'Calibri', margin: 0, wrap: true });
s.addText(d[2], { x: 6.7, y: y + 0.05, w: 2.5, h: 0.38, fontSize: 10.5, color: C.white, fontFace: 'Calibri', margin: 0, wrap: true });
s.addText(d[3], { x: 9.3, y: y + 0.05, w: 3.5, h: 0.38, fontSize: 10, color: C.light_gray, fontFace: 'Calibri', margin: 0, wrap: true });
});
s.addText('Treatment endpoint: HBsAg seroconversion OR HBeAg seroconversion (continue 6 months after). In acute severe HBV: entecavir or TDF until 3 months after HBsAg loss.', {
x: 0.4, y: 5.6, w: 12.5, h: 0.35, fontSize: 10.5, color: C.subtitle, fontFace: 'Calibri', italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — TREATMENT: CHRONIC HEPATITIS C (DAA REGIMENS)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'TREATMENT — CHRONIC HEPATITIS C', 'Direct-acting antivirals (DAAs) — current first-line combinations', C.accent3);
// Mechanism bar
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.55, w: 12.5, h: 0.55, fill: { color: C.card_bg }, line: { color: C.accent3, width: 1 }, rectRadius: 0.06 });
s.addText('DAA Classes: NS3/4A Protease inhibitors ("-previr") | NS5A inhibitors ("-asvir") | NS5B Polymerase inhibitors ("-buvir") | Goal: SVR12 (undetectable HCV RNA 12 wks post-treatment) ≥ 95–99%', {
x: 0.55, y: 1.62, w: 12.2, h: 0.42, fontSize: 11.5, color: C.white, fontFace: 'Calibri', margin: 0
});
// Table header
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 2.2, w: 12.5, h: 0.4, fill: { color: C.bg_mid } });
['Regimen (Brand)', 'Dose', 'Duration', 'Genotype', 'SVR12 / Notes'].forEach((h, i) => {
const xs = [0.5, 4.3, 6.4, 7.9, 9.3];
const ws = [3.7, 2.0, 1.4, 1.3, 3.5];
s.addText(h, { x: xs[i], y: 2.25, w: ws[i], h: 0.3, fontSize: 12, bold: true, color: C.accent3, fontFace: 'Calibri', margin: 0 });
});
const regimens = [
['Sofosbuvir/Ledipasvir\n(Harvoni)', '90/400 mg once daily', '8–12 wks', '1, 4, 5, 6', '95–99% SVR12; 8 wks if treatment-naïve, no cirrhosis, VL <6M IU/mL'],
['Sofosbuvir/Velpatasvir\n(Epclusa)', '400/100 mg once daily', '12 wks', 'Pangenotypic\n1–6', '95–99%; ribavirin added for compensated cirrhosis GT3'],
['Glecaprevir/Pibrentasvir\n(Mavyret) ★', '300/120 mg once daily', '8 wks (naïve, no cirr.)\n12 wks (cirrhosis)', 'Pangenotypic', '97–99%; approved 8 wks for all genotypes; CONTRAINDICATED in decompensated cirrhosis'],
['Sofosbuvir/Velpatasvir/\nVoxilaprevir (Vosevi)', '400/100/100 mg once daily', '12 wks', 'Pangenotypic\n(salvage)', 'For DAA-experienced or NS5A-resistant patients; CONTRAINDICATED in decompensated cirrhosis'],
['Elbasvir/Grazoprevir\n(Zepatier)', '50/100 mg once daily', '12–16 wks', '1a, 1b, 4', '95–99%; add ribavirin for GT1a with NS5A RAVs; avoid in decompensated cirrhosis'],
];
const rowC = [C.bg_mid, C.card_bg];
regimens.forEach((r, i) => {
const y = 2.65 + i * 0.57;
s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 12.5, h: 0.55, fill: { color: rowC[i % 2] } });
const xs = [0.5, 4.3, 6.4, 7.9, 9.3];
const ws = [3.7, 2.0, 1.4, 1.3, 3.5];
const colors = [C.white, C.accent, C.white, C.white, C.light_gray];
[r[0], r[1], r[2], r[3], r[4]].forEach((cell, ci) => {
s.addText(cell, { x: xs[ci], y: y + 0.04, w: ws[ci], h: 0.48, fontSize: r[0].includes('★') ? 10.5 : 10, color: r[0].includes('★') && ci === 0 ? C.accent4 : colors[ci], fontFace: 'Calibri', margin: 0, wrap: true, bold: ci === 0 && r[0].includes('★') });
});
});
s.addText('Acute HCV: Early treatment with standard 8–12 wk DAA course recommended (no longer "watch and wait"). Ribavirin rarely needed in modern DAA era.', {
x: 0.4, y: 5.6, w: 12.5, h: 0.32, fontSize: 10, color: C.subtitle, fontFace: 'Calibri', italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — COMPLICATIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'COMPLICATIONS OF VIRAL HEPATITIS', 'Acute and chronic sequelae', C.accent3);
const comps = [
{
title: 'Fulminant Hepatic\nFailure (FHF)',
color: C.accent3,
icon: '⚡',
items: [
'Rare but life-threatening (<1% acute HBV; HEV in pregnancy up to 20–25%)',
'Massive hepatic necrosis → hepatic encephalopathy within 2 weeks of jaundice',
'Features: shrinking liver, coagulopathy, hypoglycemia, ascites, cerebral edema',
'HBV: treat with entecavir/TDF; refer for liver transplantation',
]
},
{
title: 'Chronic Hepatitis\n& Chronicity',
color: C.accent2,
icon: '🔄',
items: [
'HAV/HEV: no chronicity (self-limited)',
'HBV: 1% (adult); 90% (neonatal); 25–30% (age 1–5 yrs)',
'HCV: ~75–85% progress to chronic infection',
'HDV superinfection: 70–80% chronic; co-infection 1–3%',
]
},
{
title: 'Cirrhosis',
color: C.accent,
icon: '🫀',
items: [
'End-stage of chronic HBV and HCV',
'Characterized by fibrosis, regenerative nodules, portal hypertension',
'Complications: variceal bleeding, ascites, SBP, hepatic encephalopathy',
'HBV cirrhosis: antiviral therapy shown to cause fibrosis regression',
]
},
{
title: 'Hepatocellular\nCarcinoma (HCC)',
color: 'B07FD4',
icon: '🔴',
items: [
'HBV: independent risk even without cirrhosis; HBsAg(+) = 100× risk',
'HCV: HCC occurs almost exclusively in setting of cirrhosis',
'Surveillance: AFP + ultrasound every 6 months in high-risk groups',
'HBV treatment reduces but does not eliminate HCC risk',
]
},
{
title: 'Extrahepatic\nManifestations',
color: C.accent4,
icon: '🌐',
items: [
'HBV: serum-sickness–like illness, polyarteritis nodosa, membranous GN, essential mixed cryoglobulinemia',
'HCV: Mixed cryoglobulinemia, membranoproliferative GN, lichen planus, porphyria cutanea tarda, non-Hodgkin lymphoma',
'HAV: Relapsing hepatitis (rare), cholestatic hepatitis, autoimmune hepatitis trigger',
'HEV: Neurologic complications — Guillain-Barré, Bell palsy, encephalitis',
]
},
{
title: 'Cholestatic &\nOther Variants',
color: 'F0A500',
icon: '💛',
items: [
'Cholestatic hepatitis A: prolonged jaundice + pruritis, intense but self-limited',
'Relapsing hepatitis A: 2–3 relapses before final recovery; ~10–20%',
'HBV reactivation: in immunosuppressed — can be fulminant; prophylaxis required',
'HEV in immunocompromised (transplant recipients): chronic HEV infection with rapid fibrosis',
]
},
];
const cols = [0.3, 4.55, 8.8];
const rows = [1.55, 3.7];
comps.forEach((c, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = cols[col];
const y = rows[row];
const w = 4.1;
const h = 1.95;
s.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill: { color: C.card_bg }, line: { color: c.color, width: 1.5 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y, w, h: 0.42, fill: { color: c.color }, rectRadius: 0.08 });
s.addText(c.title, { x: x + 0.12, y: y + 0.05, w: w - 0.25, h: 0.34, fontSize: 12.5, bold: true, color: C.white, fontFace: 'Calibri', margin: 0 });
s.addText(c.items.map(it => '• ' + it).join('\n'), {
x: x + 0.12, y: y + 0.48, w: w - 0.25, h: h - 0.6,
fontSize: 9.5, color: C.white, fontFace: 'Calibri', valign: 'top', margin: 0, wrap: true
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — PREVENTION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'PREVENTION & PROPHYLAXIS', 'Vaccines, passive immunity, and public health measures', C.accent4);
const prevData = [
{
title: 'HAV Prevention',
color: C.accent,
lines: [
'Active: Inactivated HAV vaccine (Havrix, Vaqta) — 2 doses at 0 & 6–12 months → 95–100% protection',
'Passive: IG 0.02 mL/kg within 2 weeks of exposure (pre-exposure travel)',
'HAV immune globulin + vaccine for post-exposure prophylaxis',
'Environmental: hand hygiene, safe water & food handling',
]
},
{
title: 'HBV Prevention',
color: C.accent2,
lines: [
'Active: Recombinant HBsAg vaccine — 3 doses (0, 1, 6 months); >90% seroconversion',
'Perinatal: Newborns of HBsAg(+) mothers: vaccine + HBIG (0.5 mL) within 12 h of birth → 85–90% prevention',
'Post-exposure (needle-stick): HBIG (0.06 mL/kg) + vaccine series within 24 h',
'Universal precautions, safe injection practices',
]
},
{
title: 'HCV Prevention',
color: C.accent3,
lines: [
'No vaccine available',
'Reduce needle sharing; harm reduction programs for IDUs',
'Blood product screening (anti-HCV + HCV RNA)',
'No effective post-exposure prophylaxis — monitor HCV RNA at 4–6 weeks',
]
},
{
title: 'HEV Prevention',
color: C.accent4,
lines: [
'HEV 239 vaccine (Hecolin) — approved in China; 3 doses, 95.5% efficacy',
'Not widely available outside China',
'Safe water supply; sanitation infrastructure; avoid raw pork in endemic areas',
'High-risk group: pregnant women (mortality 15–25% in endemic areas)',
]
},
];
prevData.forEach((p, i) => {
const x = 0.4 + (i % 2) * 6.55;
const y = 1.55 + Math.floor(i / 2) * 2.2;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 6.2, h: 2.0, fill: { color: C.card_bg }, line: { color: p.color, width: 1.5 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y, w: 6.2, h: 0.42, fill: { color: p.color }, rectRadius: 0.08 });
s.addText(p.title, { x: x + 0.15, y: y + 0.06, w: 5.9, h: 0.32, fontSize: 14, bold: true, color: C.white, fontFace: 'Calibri', margin: 0 });
s.addText(p.lines.map(l => '• ' + l).join('\n'), {
x: x + 0.15, y: y + 0.5, w: 5.9, h: 1.4,
fontSize: 10.5, color: C.white, fontFace: 'Calibri', valign: 'top', margin: 0, wrap: true
});
});
s.addText('HDV: No specific HDV vaccine — HBV vaccination prevents HDV co-infection. For chronic HDV: Bulevirtide (approved in EU 2020) — 2 mg SC daily; PEG-IFN α as alternative.', {
x: 0.4, y: 5.62, w: 12.5, h: 0.3, fontSize: 10.5, color: C.subtitle, fontFace: 'Calibri', italic: true, margin: 0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — SPECIAL SITUATIONS / MANAGEMENT ALGORITHM
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
slideHeader(s, 'MANAGEMENT ALGORITHM — SPECIAL SITUATIONS', 'Pregnancy, immunosuppression, decompensated cirrhosis', C.accent);
const boxes = [
{
title: 'HBV in Pregnancy',
color: 'F9A8D4',
content: [
'Screen all pregnant women for HBsAg',
'TDF (Tenofovir DF) — safest antiviral in pregnancy (Cat. B)',
'High viral load (HBV DNA >200,000 IU/mL): start TDF at 28–32 wks to prevent MTCT',
'Newborn: HBV vaccine + HBIG within 12 hours',
'Avoid entecavir, PEG-IFN in pregnancy',
]
},
{
title: 'HBV Reactivation\n(Immunosuppression)',
color: 'FCA5A5',
content: [
'Risk: chemotherapy, biologics (anti-TNF, rituximab), steroids, transplant',
'Screen all patients for HBsAg and anti-HBc before immunosuppression',
'HBsAg(+): start prophylactic entecavir or TDF before chemotherapy',
'Anti-HBc(+)/HBsAg(-): monitor HBV DNA monthly; treat if DNA detectable',
'Prophylaxis duration: until 6–12 months post-immunosuppression',
]
},
{
title: 'Decompensated\nCirrhosis (HBV)',
color: C.accent3,
content: [
'Entecavir 1 mg/day or TDF — even in compensated cirrhosis',
'Avoid PEG-IFN (risk of decompensation)',
'Refer for liver transplantation evaluation',
'Continuous viral suppression indefinitely',
'Monitor MELD score, serum albumin, PT/INR',
]
},
{
title: 'Decompensated\nCirrhosis (HCV)',
color: 'FBBF24',
content: [
'CONTRAINDICATED: all protease inhibitors (glecaprevir, grazoprevir, voxilaprevir)',
'Use: Sofosbuvir/Velpatasvir ± ribavirin for 24 weeks',
'Ribavirin: weight-based (600–1200 mg/day); reduce dose per Hb',
'Sustained virologic response may allow downlisting from transplant waitlist',
'Monitor for HCV reinfection post-transplant',
]
},
];
boxes.forEach((b, i) => {
const x = 0.4 + (i % 2) * 6.55;
const y = 1.55 + Math.floor(i / 2) * 2.2;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 6.2, h: 2.0, fill: { color: C.card_bg }, line: { color: b.color, width: 1.5 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y, w: 6.2, h: 0.42, fill: { color: b.color, alpha: b.color.length === 6 ? 0 : 0 }, rectRadius: 0.08 });
s.addText(b.title, { x: x + 0.15, y: y + 0.06, w: 5.9, h: 0.34, fontSize: 13.5, bold: true, color: C.text_dark, fontFace: 'Calibri', margin: 0 });
s.addText(b.content.map(l => '• ' + l).join('\n'), {
x: x + 0.15, y: y + 0.5, w: 5.9, h: 1.4,
fontSize: 10.5, color: C.white, fontFace: 'Calibri', valign: 'top', margin: 0, wrap: true
});
});
s.addText("Source: Harrison's Principles of Internal Medicine 22E (2025) | Chapters 350 & 352", {
x: 0.4, y: 5.62, w: 12.5, h: 0.3, fontSize: 10, color: C.subtitle, fontFace: 'Calibri', italic: true, align: 'right', margin: 0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — SUMMARY / KEY TAKEAWAYS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = addSlide(C.bg_dark);
// accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: '100%', h: 0.08, fill: { color: C.accent } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.54, w: '100%', h: 0.08, fill: { color: C.accent } });
s.addText('KEY TAKEAWAYS', { x: 0.5, y: 0.18, w: 12.3, h: 0.65, fontSize: 30, bold: true, color: C.white, fontFace: 'Calibri', margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.88, w: 1.8, h: 0.06, fill: { color: C.accent } });
const takes = [
{ num: '1', color: C.accent, text: 'Five hepatotropic viruses: HAV & HEV (enteric, self-limited) vs HBV, HCV, HDV (parenteral, risk of chronicity).' },
{ num: '2', color: C.accent2, text: 'Most acute hepatitis is self-limited. General supportive care is the cornerstone; avoid hepatotoxic drugs & glucocorticoids.' },
{ num: '3', color: C.accent3, text: 'Severe acute HBV (fulminant or prolonged >4 wks): treat with entecavir or TDF until 3–6 months after seroconversion.' },
{ num: '4', color: C.accent4, text: 'Acute HCV: initiate full 8–12 week DAA therapy early (no longer wait for spontaneous resolution).' },
{ num: '5', color: 'B07FD4', text: 'Chronic HBV: first-line = Entecavir 0.5 mg/day, TDF 300 mg/day, or TAF 25 mg/day. Lifelong therapy often required. Goal: undetectable HBV DNA.' },
{ num: '6', color: C.accent, text: 'Chronic HCV: pangenotypic DAAs (glecaprevir/pibrentasvir or sofosbuvir/velpatasvir) achieve SVR12 >95–99% in 8–12 weeks.' },
{ num: '7', color: C.accent3, text: 'Complications: fulminant hepatic failure, chronicity, cirrhosis, HCC, and extrahepatic manifestations (cryoglobulinemia, GN, lymphoma).' },
{ num: '8', color: C.accent2, text: 'Prevention: HBV vaccine is highly effective. No HCV or HDV vaccine — harm reduction key. HAV/HEV: sanitation + HAV vaccine.' },
];
takes.forEach((t, i) => {
const x = i < 4 ? 0.4 : 6.8;
const y = 1.0 + (i % 4) * 1.1;
s.addShape(pres.ShapeType.ellipse, { x, y: y + 0.08, w: 0.45, h: 0.45, fill: { color: t.color } });
s.addText(t.num, { x, y: y + 0.08, w: 0.45, h: 0.45, fontSize: 16, bold: true, color: C.white, fontFace: 'Calibri', align: 'center', valign: 'middle', margin: 0 });
s.addText(t.text, { x: x + 0.6, y, w: 5.7, h: 0.68, fontSize: 11.5, color: C.white, fontFace: 'Calibri', valign: 'middle', margin: 0, wrap: true });
});
}
// ═══════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════
pres.writeFile({ fileName: '/home/daytona/workspace/viral-hepatitis-ppt/Viral_Hepatitis_Harrisons.pptx' })
.then(() => console.log('PPT created successfully!'))
.catch(e => console.error('Error:', e));
cd /home/daytona/workspace/viral-hepatitis-ppt && node viral_hepatitis.js 2>&1
ls -lh /home/daytona/workspace/viral-hepatitis-ppt/
Viral Hepatitis Harrisons
Presentation · PPTX
| # | Slide | Highlights |
|---|---|---|
| 1 | Title | Visual cover with authorship |
| 2 | Outline | 5 numbered topic cards |
| 3 | Introduction & Virology | 5-column virus comparison (HAV/HBV/HCV/HDV/HEV) — type, family, route, incubation, chronicity |
| 4 | Clinical Features & Diagnosis | Phases of illness, lab findings, serologic markers per virus |
| 5 | Approach to Management | General measures, hospitalization indications, monitoring parameters |
| 6 | Treatment — Chronic HBV | Full drug table: 7 agents with dose, route, resistance, key points (first-line marked) |
| 7 | Treatment — Chronic HCV | DAA regimens table: Harvoni, Epclusa, Mavyret, Vosevi, Zepatier — dose, duration, genotype, SVR12 |
| 8 | Complications | 6 cards: FHF, chronicity, cirrhosis, HCC, extrahepatic manifestations, cholestatic variants |
| 9 | Prevention & Prophylaxis | Vaccines and post-exposure measures for HAV, HBV, HCV, HEV |
| 10 | Special Situations | HBV in pregnancy, HBV reactivation, decompensated cirrhosis (HBV & HCV) |
| 11 | Key Takeaways | 8 summary bullets covering all major points |
Pathophysiology of viral hepatitis
| Age of Infection | Immune Response | Outcome |
|---|---|---|
| Neonatal (perinatal) | Tolerogenic - HBeAg crosses placenta, induces T-cell tolerance in utero | 90% chronic infection; later cirrhosis/HCC |
| Childhood (1–5 yrs) | Partial tolerance | 25–30% chronicity |
| Adulthood | Robust CTL response | ~1% chronicity; acute hepatitis typical |
| Virus | Distinctive Feature |
|---|---|
| HBV (chronic) | Ground-glass hepatocytes (HBsAg in cytoplasm); stain with orcein or aldehyde fuchsin |
| HCV | Paucity of inflammation; sinusoidal lining cell activation; lymphoid aggregates; fat (steatosis especially genotype 3); bile duct lesions |
| HDV | Microvesicular steatosis |
| HEV | Marked cholestasis |
| HAV (cholestatic variant) | Cholestatic picture with slow resolution |
| Antigen | Location |
|---|---|
| HBsAg | Cytoplasm and plasma membrane |
| HBcAg | Predominantly nucleus; traces in cytoplasm and membrane |
| HDV antigen | Hepatocyte nucleus |
| HAV antigen | Cytoplasm |
| HCV antigen | Cytoplasm |
| HEV ORF-2 protein | Both cytoplasmic and nuclear |
| Mechanism | Clinical/Lab Consequence |
|---|---|
| Hepatocyte necrosis and inflammation | Elevated ALT/AST (released from damaged cells); ALT > AST in viral hepatitis |
| Impaired bilirubin conjugation (UGT1A1 dysfunction) + hepatocyte uptake failure + cholestasis | Hyperbilirubinemia (both conjugated + unconjugated) → jaundice, dark urine, pale stools |
| Impaired hepatic synthesis (albumin, clotting factors II, V, VII, X) | Hypoalbuminemia, prolonged PT/INR, coagulopathy |
| Kupffer cell activation + cytokine release (TNF-α, IL-1, IL-6) | Constitutional symptoms: fever, malaise, myalgia, anorexia |
| Portal inflammation + bile duct involvement | Cholestasis, pruritus (bile salt accumulation) |
| Loss of hepatic metabolic mass | Hypoglycemia (failure of gluconeogenesis) in fulminant disease |

| Virus | Why Chronicity Occurs |
|---|---|
| HBV | T-cell exhaustion; HBeAg-induced neonatal tolerance; viral escape mutations evading CTL; NK cell dysfunction; failure to eliminate cccDNA |
| HCV | Rapid quasispecies mutation; potent innate IFN pathway blockade; NK cell dysfunction; weak polyclonal CTL response; unfavorable IL28B genotype |
| HDV | Requires HBV for envelope proteins; chronicity linked to degree of HBV chronicity; direct cytopathic contribution |
| HAV/HEV | Almost never chronic — robust innate + adaptive clearance (exception: HEV in immunosuppressed transplant recipients) |
Management of viral hepatitis as per harrison for presentation at MD level