Make notes for muhs exam mbbs 2nd year
cd /home/daytona/workspace/attachments/88edd6c5-047c-44ae-9ad1-d2a1e280e566/ && python3 -c " import pdfplumber with pdfplumber.open('Liver patho.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages[:5]): print(f'\\n=== PAGE {i+1} ===') print(page.extract_text()) "
cd /home/daytona/workspace/attachments/88edd6c5-047c-44ae-9ad1-d2a1e280e566/ && python3 -c " import subprocess # Try OCR with pytesseract try: import pytesseract from pdf2image import convert_from_path images = convert_from_path('Liver patho.pdf', dpi=200, first_page=1, last_page=3) for i, img in enumerate(images): text = pytesseract.image_to_string(img) print(f'\\n=== PAGE {i+1} ===') print(text[:2000]) except Exception as e: print(f'Error: {e}') "
cd /home/daytona/workspace/attachments/88edd6c5-047c-44ae-9ad1-d2a1e280e566/ && python3 -c " import pytesseract from pdf2image import convert_from_path images = convert_from_path('Liver patho.pdf', dpi=200) print(f'Total pages: {len(images)}') full_text = [] for i, img in enumerate(images): text = pytesseract.image_to_string(img) full_text.append(f'=== PAGE {i+1} ===\n{text}') print(f'Page {i+1} done, chars: {len(text)}') with open('/home/daytona/workspace/liver_patho_text.txt', 'w') as f: f.write('\n\n'.join(full_text)) print('Done! Saved to liver_patho_text.txt') " 2>&1
ls /home/daytona/workspace/ && ls /home/daytona/skills/docx/
~/patho-notes/liver_notes.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, TabStopType, TabStopPosition,
UnderlineType
} = require('docx');
const fs = require('fs');
// Color palette
const NAVY = "1F3864";
const BLUE = "2E74B5";
const LIGHT_BLUE = "D6E4F0";
const YELLOW_HL = "FFF2CC";
const RED = "C00000";
const GREEN = "375623";
const WHITE = "FFFFFF";
const LIGHT_GRAY = "F2F2F2";
const ORANGE = "C55A11";
function heading1(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_1,
spacing: { before: 360, after: 120 },
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
children: [new TextRun({ text, color: WHITE, bold: true, size: 28, font: "Calibri" })],
});
}
function heading2(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_2,
spacing: { before: 240, after: 80 },
shading: { type: ShadingType.SOLID, color: BLUE, fill: BLUE },
children: [new TextRun({ text, color: WHITE, bold: true, size: 24, font: "Calibri" })],
});
}
function heading3(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_3,
spacing: { before: 180, after: 60 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: BLUE } },
children: [new TextRun({ text, color: NAVY, bold: true, size: 22, font: "Calibri" })],
});
}
function heading4(text) {
return new Paragraph({
spacing: { before: 120, after: 40 },
children: [new TextRun({ text, color: ORANGE, bold: true, size: 20, font: "Calibri", underline: { type: UnderlineType.SINGLE } })],
});
}
function body(text) {
return new Paragraph({
spacing: { before: 60, after: 40 },
children: [new TextRun({ text, size: 20, font: "Calibri" })],
});
}
function bullet(text, level = 0) {
return new Paragraph({
bullet: { level },
spacing: { before: 40, after: 40 },
children: [new TextRun({ text, size: 20, font: "Calibri" })],
});
}
function boldBullet(label, text, level = 0) {
return new Paragraph({
bullet: { level },
spacing: { before: 40, after: 40 },
children: [
new TextRun({ text: label + ": ", bold: true, size: 20, font: "Calibri", color: NAVY }),
new TextRun({ text, size: 20, font: "Calibri" }),
],
});
}
function keyFact(text) {
return new Paragraph({
spacing: { before: 60, after: 60 },
shading: { type: ShadingType.SOLID, color: YELLOW_HL, fill: YELLOW_HL },
children: [
new TextRun({ text: "⭐ ", size: 20 }),
new TextRun({ text, size: 20, font: "Calibri", bold: true, color: "7B3F00" }),
],
});
}
function examTip(text) {
return new Paragraph({
spacing: { before: 60, after: 60 },
shading: { type: ShadingType.SOLID, color: "E2EFDA", fill: "E2EFDA" },
children: [
new TextRun({ text: "📝 EXAM TIP: ", bold: true, size: 20, font: "Calibri", color: RED }),
new TextRun({ text, size: 20, font: "Calibri", color: "375623" }),
],
});
}
function spacer() {
return new Paragraph({ spacing: { before: 80, after: 80 }, children: [new TextRun("")] });
}
function makeTable(headers, rows, shadeHeader = true) {
const headerRow = new TableRow({
tableHeader: true,
children: headers.map(h => new TableCell({
shading: { type: ShadingType.SOLID, color: BLUE, fill: BLUE },
verticalAlign: VerticalAlign.CENTER,
width: { size: Math.floor(9000 / headers.length), type: WidthType.DXA },
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: WHITE, size: 18, font: "Calibri" })],
})],
})),
});
const dataRows = rows.map((row, ri) => new TableRow({
children: row.map(cell => new TableCell({
shading: { type: ShadingType.SOLID, color: ri % 2 === 0 ? LIGHT_GRAY : WHITE, fill: ri % 2 === 0 ? LIGHT_GRAY : WHITE },
verticalAlign: VerticalAlign.TOP,
width: { size: Math.floor(9000 / row.length), type: WidthType.DXA },
children: [new Paragraph({
children: [new TextRun({ text: cell, size: 18, font: "Calibri" })],
})],
})),
}));
return new Table({
width: { size: 9000, type: WidthType.DXA },
rows: [headerRow, ...dataRows],
});
}
// ============================================================
// DOCUMENT CONTENT
// ============================================================
const children = [
// TITLE PAGE
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 480, after: 120 },
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
children: [new TextRun({ text: "LIVER PATHOLOGY", color: WHITE, bold: true, size: 52, font: "Calibri" })],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 80 },
shading: { type: ShadingType.SOLID, color: BLUE, fill: BLUE },
children: [new TextRun({ text: "MUHS Examination Notes — MBBS 2nd Year", color: WHITE, bold: true, size: 26, font: "Calibri" })],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 480 },
children: [new TextRun({ text: "Based on Johari Pathology | Pathology (General & Systemic)", size: 20, font: "Calibri", italics: true, color: "666666" })],
}),
spacer(),
// ===================== SECTION 1: VIRAL HEPATITIS =====================
heading1("1. VIRAL HEPATITIS"),
body("Viral hepatitis = viral infection of hepatocytes → necrosis + inflammation of liver."),
boldBullet("Causative agents", "Hepatotropic viruses: A, B, C, D, E"),
boldBullet("RNA viruses", "HAV, HCV, HDV, HEV (ALL except HBV)"),
boldBullet("DNA virus", "HBV (Hepadnaviridae) — only hepatotropic DNA virus"),
spacer(),
heading2("1.1 Hepatitis A Virus (HAV)"),
keyFact("HAV = Most common viral cause of jaundice"),
heading3("Virology"),
bullet("Non-enveloped, 27 nm, ssRNA virus"),
bullet("Has outer capsid protein (HAVAg)"),
bullet("Replicates mainly in liver"),
heading3("Transmission & Epidemiology"),
bullet("Route: Fecal-oral (contaminated food/water)"),
bullet("Incubation period: 3–6 weeks"),
bullet("Most infectious just BEFORE onset of jaundice"),
bullet("Virus excreted in stool ~2 weeks before symptoms"),
heading3("Outcome"),
bullet("Mild, benign, SELF-LIMITED acute hepatitis"),
bullet("NO chronic hepatitis, NO carrier state"),
bullet("Fulminant hepatitis — rare"),
heading3("Lab & Serological Markers"),
boldBullet("IgM anti-HAV", "Appears at onset of symptoms; reliable marker of ACUTE infection; peaks 2–3 weeks, disappears after 3–4 months"),
boldBullet("IgG anti-HAV", "Follows IgM; persists for years → lifelong immunity"),
boldBullet("Serum AST/ALT", "Raised; peaks within 1–2 days of jaundice, may rise >500 IU/L"),
boldBullet("Serum ALP", "Usually <300 IU/L"),
examTip("IgM anti-HAV = diagnosis of ACUTE HAV. IgG anti-HAV = past infection / immunity."),
spacer(),
heading2("1.2 Hepatitis B Virus (HBV)"),
keyFact("HBV = Only hepatotropic DNA virus; belongs to family Hepadnaviridae"),
heading3("Structure of HBV"),
bullet("Spherical, double-layered virion"),
bullet("Genome: partially double-stranded circular DNA"),
bullet("4 genes: S (surface), C (core), P (polymerase), X"),
spacer(),
makeTable(
["Gene", "Antigen", "Details"],
[
["S gene", "HBsAg (Surface Ag)", "Secreted into blood in large amounts; immunogenic"],
["C gene", "HBcAg (Core Ag)", "Remains intracellular — NOT detectable in serum"],
["C gene", "HBeAg (e Antigen)", "Secreted into serum; surrogate marker for HIGH viral replication"],
["P gene", "HBV Polymerase", "DNA polymerase enzyme; needed for replication"],
["X gene", "HBxAg", "Needed for virus infectivity; implicated in liver cancer pathogenesis"],
]
),
spacer(),
heading3("Mode of Transmission"),
bullet("Vertical/congenital: Mother → child (in utero, during delivery, after birth)"),
bullet("Horizontal: Dominant mode — percutaneous / mucous membrane exposure"),
bullet("Parenteral: IV drug use, blood transfusion"),
bullet("Sexual: Unprotected hetero/homosexual intercourse; virus in semen & saliva"),
heading3("Serological Markers — Sequence"),
boldBullet("HBsAg", "FIRST virologic marker; appears BEFORE symptoms; peaks during disease; undetectable in 3–6 months"),
boldBullet("HBeAg + HBV-DNA", "Appear soon after HBsAg; persistence >6 weeks = high infectivity → likely chronic hepatitis B"),
boldBullet("Anti-HBc (IgM)", "Marker during WINDOW PERIOD (HBsAg gone, anti-HBs not yet appeared); HBcAg NOT found in serum"),
boldBullet("Anti-HBs", "Appears after clearance of HBsAg; confers immunity"),
examTip("Window period = HBsAg negative + Anti-HBs negative. ONLY IgM anti-HBc is detectable → diagnoses acute HBV."),
spacer(),
heading2("1.3 Hepatitis C Virus (HCV)"),
keyFact("HCV = Most common cause of CHRONIC hepatitis worldwide; highest risk of cirrhosis"),
bullet("ssRNA virus, parenteral transmission"),
bullet("Incubation: 7–8 weeks"),
bullet("~80% develop CHRONIC hepatitis (highest among all hepatitis viruses)"),
bullet("Marker: Anti-HCV antibody, HCV RNA"),
examTip("HCV: No vaccine available. 80% chronicity. Common cause of post-transfusion hepatitis."),
spacer(),
heading2("1.4 Hepatitis D Virus (HDV)"),
keyFact("HDV is a DEFECTIVE RNA virus — requires HBV for replication"),
bullet("Circular defective ssRNA; parenteral transmission"),
bullet("HDV infection only in HBsAg-positive patients (needs HBV coat)"),
heading3("Co-infection vs Superinfection"),
makeTable(
["Feature", "Co-infection", "Superinfection"],
[
["Definition", "HDV + HBV acquire simultaneously", "HDV infects existing chronic HBsAg carrier"],
["Common outcome", "80% recovery + immunity", "Chronic HBV-HDV hepatitis (majority)"],
["Fulminant hepatitis", "Rare", "More common"],
["Chronicity", "Rarely develops", "Common (>70%)"],
["Markers", "IgM anti-HBc + IgM anti-HD", "IgG anti-HBc + IgG anti-HD"],
]
),
examTip("Superinfection = worse outcome. Chronicity in >70%. Accelerates cirrhosis."),
spacer(),
heading2("1.5 Hepatitis E Virus (HEV)"),
keyFact("HEV: Fecal-oral. MOST DANGEROUS in PREGNANCY (mortality up to 20%)"),
bullet("ssRNA virus; fecal-oral transmission"),
bullet("Incubation: 4–5 weeks"),
bullet("NEVER causes chronic hepatitis"),
bullet("Marker: IgM/IgG anti-HEV"),
examTip("HEV in pregnancy → high mortality (20%). No carrier state."),
spacer(),
heading2("1.6 Summary Table — Hepatitis Viruses"),
makeTable(
["Feature", "HAV", "HBV", "HCV", "HDV", "HEV"],
[
["Genome", "ssRNA", "Partially dsDNA", "ssRNA", "Circular defective ssRNA", "ssRNA"],
["Transmission", "Fecal-oral", "Parenteral, sexual, perinatal", "Parenteral", "Parenteral (needs HBV)", "Fecal-oral"],
["Incubation", "2–4 weeks", "1–4 months", "7–8 weeks", "Same as HBV", "4–5 weeks"],
["Chronic liver disease", "Never", "10%", "~80%", "5% (coinfection); ~70% (superinfection)", "Never"],
["Key marker", "IgM anti-HAV", "HBsAg", "Anti-HCV, HCV RNA", "Anti-HDV, HDV RNA", "IgM/IgG anti-HEV"],
["Carrier state", "No", "Yes", "Yes", "Yes (if HBV chronic)", "No"],
]
),
spacer(),
// ===================== SECTION 2: ALCOHOLIC LIVER DISEASE =====================
heading1("2. ALCOHOLIC LIVER DISEASE (ALD)"),
body("ALD = spectrum of disorders from chronic/excessive ethanol consumption. Three overlapping lesions:"),
bullet("(1) Hepatic steatosis (fatty liver)"),
bullet("(2) Alcoholic hepatitis"),
bullet("(3) Alcoholic cirrhosis"),
heading2("2.1 Risk Factors"),
boldBullet("Gender", "Females MORE susceptible — lower doses cause advanced disease. Estrogen ↑ gut permeability → ↑ endotoxins → ↑ pro-inflammatory cytokines from Kupffer cells"),
boldBullet("Dose", "≥60–80 g ethanol/day for ≥10 years → alcoholic cirrhosis"),
heading2("2.2 Metabolism of Ethanol"),
body("Liver is the main organ for ethanol metabolism. Ethanol → Acetaldehyde by 3 enzyme systems:"),
makeTable(
["Enzyme System", "Location", "Notes"],
[
["Alcohol dehydrogenase (ADH)", "Cytoplasm of liver", "Main system at LOW alcohol concentrations"],
["Cytochrome P450 2E1 (CYP2E1)", "Smooth ER (microsomes)", "Activated at HIGH blood alcohol; generates ROS (free radicals)"],
["Catalase", "Peroxisomes", "Least important"],
]
),
heading2("2.3 Hepatic Steatosis (Fatty Liver)"),
keyFact("Steatosis = REVERSIBLE on alcohol cessation. Earliest and most common lesion."),
heading3("Morphology"),
boldBullet("Gross", "Enlarged, yellow (fat), greasy liver"),
boldBullet("Micro", "Lipid vacuoles in hepatocyte cytoplasm"),
bullet("Initially microvesicular steatosis → macrovesicular (large, single vacuole displacing nucleus to periphery)"),
bullet("Primarily affects CENTRILOBULAR region (where ADH is located)"),
bullet("No inflammation or fibrosis"),
examTip("Fatty liver = COMPLETELY REVERSIBLE with abstinence."),
heading2("2.4 Alcoholic Hepatitis (Alcoholic Steatohepatitis)"),
keyFact("Alcoholic hepatitis may be PRECURSOR to cirrhosis"),
heading3("Gross"),
bullet("Liver enlarged, YELLOW (steatosis), FIRM (fibrosis)"),
heading3("Microscopy — 4 Characteristic Features (Predominantly CENTRILOBULAR)"),
makeTable(
["Feature", "Description"],
[
["1. Ballooning degeneration", "Swollen hepatocytes with pale-stained, finely granular cytoplasm (due to accumulation of fat, water, proteins). Predominantly centrilobular."],
["2. Mallory bodies (Mallory-Denk bodies)", "Tangled skeins of cytokeratin intermediate filaments (CK 8 & 18) in cytoplasm of ballooned hepatocytes. HALLMARK of alcoholic hepatitis."],
["3. Neutrophilic infiltration", "Neutrophils commonly surround ballooned hepatocytes (esp. those with Mallory bodies)."],
["4. Alcoholic steatofibrosis", "Fibrosis starts as sclerosis of central veins → perisinusoidal fibrosis. Stellate cells and portal fibroblasts activated."],
]
),
examTip("Mallory-Denk bodies = cytokeratin tangles. NOT specific to alcoholic hepatitis — also in PBC, Wilson's, NASH."),
heading2("2.5 Alcoholic Cirrhosis"),
keyFact("MOST COMMON (60–70%) and final irreversible stage of ALD"),
bullet("Micronodular cirrhosis initially (nodules <3 mm)"),
bullet("Later may become macronodular"),
bullet("Bands of fibrosis surround nodules of regenerating hepatocytes"),
spacer(),
// ===================== SECTION 3: LIVER CIRRHOSIS =====================
heading1("3. LIVER CIRRHOSIS"),
keyFact("Cirrhosis = one of the TEN leading causes of death in Western world. IRREVERSIBLE end-stage."),
heading3("Definition — 3 Key Features"),
bullet("1. Involves the ENTIRE liver"),
bullet("2. Normal lobular architecture is DISORGANIZED"),
bullet("3. Formation of NODULES separated by irregular bands of FIBROSIS"),
heading2("3.1 Classification"),
makeTable(
["Morphologic", "Etiologic"],
[
["Micronodular (nodules <3 mm)", "Alcoholic cirrhosis — MOST COMMON (60–70%)"],
["Macronodular (nodules >3 mm)", "Post-necrotic cirrhosis (10%)"],
["Mixed", "Biliary cirrhosis (5–10%)"],
["", "Pigment cirrhosis (haemochromatosis, 5%)"],
["", "Wilson's disease cirrhosis"],
["", "α-1 antitrypsin deficiency"],
["", "Cardiac cirrhosis"],
["", "Indian childhood cirrhosis (ICC)"],
["", "Autoimmune hepatitis"],
["", "Non-alcoholic steatohepatitis (NASH)"],
["", "Cryptogenic cirrhosis"],
]
),
spacer(),
// ===================== SECTION 4: PORTAL HYPERTENSION =====================
heading1("4. PORTAL HYPERTENSION"),
keyFact("Portal hypertension = hepatic venous pressure >7 mmHg"),
body("MOST COMMON CAUSE: Cirrhosis (intrahepatic)"),
heading2("4.1 Classification of Causes"),
makeTable(
["Category", "Examples"],
[
["PREHEPATIC (pre-sinusoidal)", "Obstructive thrombosis of portal vein before liver"],
["INTRAHEPATIC (sinusoidal)", "Cirrhosis (MAIN cause), schistosomiasis, massive fatty change, diffuse fibrosing conditions"],
["POSTHEPATIC (post-sinusoidal)", "Severe right-sided heart failure, constrictive pericarditis, Budd-Chiari syndrome"],
]
),
heading2("4.2 Consequences / Clinical Features"),
heading3("1. Varices (Esophageal/Gastric)"),
bullet("Portal HTN → reversal of portal blood flow → collateral vessel dilation"),
bullet("ESOPHAGEAL VARICES most important → risk of life-threatening hemorrhage"),
bullet("Also: Hemorrhoidal varices, caput medusae"),
examTip("Esophageal varices = most lethal complication of portal hypertension."),
heading3("2. Ascites"),
bullet("Accumulation of fluid in peritoneal cavity"),
bullet("Due to: ↓ albumin (↓ oncotic pressure), ↑ aldosterone (Na/water retention), ↑ portal pressure"),
heading3("3. Splenomegaly / Hypersplenism"),
bullet("Long-standing congestion → congestive splenomegaly"),
bullet("Massive splenomegaly → hypersplenism (pancytopenia)"),
heading3("4. Hepatic Encephalopathy"),
bullet("Due to failure to metabolize nitrogenous waste (NH3)"),
bullet("Features: asterixis (flapping tremor), confusion, coma"),
heading3("5. Hepatorenal Syndrome"),
bullet("Functional renal failure in severe liver disease"),
heading3("6. Spider Angiomata, Palmar Erythema"),
bullet("Due to ↑ circulating estrogens (liver fails to metabolize)"),
examTip("Complications mnemonic: VAHE-SH = Varices, Ascites, Hepatic encephalopathy, Esophageal varices, Splenomegaly, HRS"),
spacer(),
// ===================== SECTION 5: HEPATOCELLULAR CARCINOMA =====================
heading1("5. HEPATOCELLULAR CARCINOMA (HCC)"),
keyFact("HCC = Primary malignant tumor of hepatocytes. Alpha-fetoprotein (AFP) is the tumor marker."),
heading2("5.1 Risk Factors"),
bullet("Chronic viral hepatitis B and C (most important)"),
bullet("Alcoholic cirrhosis"),
bullet("Aflatoxin B1 (from Aspergillus flavus — contaminates peanuts/grains)"),
bullet("Haemochromatosis"),
bullet("Non-alcoholic steatohepatitis (NASH)"),
examTip("HBV + Aflatoxin B1 = synergistic effect on HCC risk."),
heading2("5.2 Gross Morphology"),
bullet("Can be: solitary massive tumor, multinodular, or diffuse infiltrating"),
bullet("Bile-stained (greenish) — bile production is hallmark"),
bullet("Vascular invasion common → portal vein thrombosis"),
heading2("5.3 Microscopic Grading"),
makeTable(
["Grade", "Features"],
[
["Well-differentiated HCC", "Recognizable hepatocytic origin; bile production (HALLMARK); trabecular and acinar pattern; large hyperchromatic nuclei with prominent nucleoli"],
["Moderately differentiated", "Solid, scirrhous, clear-cell patterns. Scirrhous: malignant cells in narrow bundles with fibrous stroma"],
["Poorly / Undifferentiated", "Pleomorphic cells; marked variation in cell size; bizarre anaplastic giant cells; bile production rare"],
]
),
examTip("Bile production by tumor cells = HALLMARK of HCC (confirms hepatocytic origin)."),
heading2("5.4 Clinical Features"),
bullet("Ill-defined upper abdominal pain, malaise, fatigue, weight loss"),
bullet("Enlarged, irregular, nodular liver"),
heading2("5.5 Serum Marker"),
keyFact("Alpha-fetoprotein (AFP) elevated in ~50% of HCC"),
bullet("AFP >400 ng/mL is diagnostic when combined with imaging"),
bullet("Also elevated in: hepatoblastoma, germ cell tumors, normal pregnancy"),
examTip("AFP = serum tumor marker for HCC. Not 100% sensitive — only 50% HCC cases."),
spacer(),
// ===================== IMPORTANT EXAM POINTS SUMMARY =====================
heading1("6. HIGH-YIELD EXAM SUMMARY"),
heading2("Must-Know One-Liners"),
bullet("HAV: fecal-oral, NEVER chronic, IgM anti-HAV = acute"),
bullet("HBV: DNA virus, 10% chronic, window period → IgM anti-HBc"),
bullet("HCV: 80% chronic, NO vaccine, parenteral"),
bullet("HDV: defective RNA, needs HBV, superinfection = worse"),
bullet("HEV: fecal-oral, high mortality in pregnancy, NEVER chronic"),
bullet("Fatty liver: reversible, macrovesicular, centrilobular"),
bullet("Mallory bodies: CK 8 & 18 tangles, hallmark of alcoholic hepatitis"),
bullet("Cirrhosis: irreversible, entire liver, nodules + fibrosis bands"),
bullet("Portal HTN: >7 mmHg, varices → hemorrhage is major killer"),
bullet("HCC: AFP marker, bile production hallmark, HBV+HCV risk factors"),
heading2("Common Long Questions (MUHS Pattern)"),
makeTable(
["Topic", "Key Points to Cover"],
[
["Viral hepatitis — HAV", "Definition, virus type, transmission, incubation, outcome, lab markers, serology"],
["Viral hepatitis — HBV", "Structure, genes/antigens, transmission, serological sequence, window period, outcome"],
["Alcoholic liver disease", "Three stages, risk factors, pathogenesis, morphology (steatosis, hepatitis — Mallory bodies, cirrhosis)"],
["Liver cirrhosis", "Definition, 3 features, morphologic + etiologic classification, complications"],
["Portal hypertension", "Definition, causes (pre/intra/post), pathogenesis of complications, clinical features"],
["Hepatocellular carcinoma", "Risk factors, gross + micro morphology, grading, tumor marker (AFP), clinical features"],
["Comparison of hepatitis viruses", "Table format: virus type, transmission, incubation, chronicity, markers"],
]
),
spacer(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 240, after: 120 },
children: [new TextRun({ text: "— END OF NOTES —", bold: true, size: 22, font: "Calibri", color: NAVY, italics: true })],
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "Source: Johari Pathology (Liver Pathology, Chapter 19) | MUHS MBBS 2nd Year", size: 18, font: "Calibri", color: "888888", italics: true })],
}),
];
const doc = new Document({
styles: {
default: {
document: {
run: { font: "Calibri", size: 20, color: "222222" },
paragraph: { spacing: { line: 320 } },
},
},
},
sections: [{
headers: {
default: new Header({
children: [new Paragraph({
shading: { type: ShadingType.SOLID, color: NAVY, fill: NAVY },
children: [
new TextRun({ text: "LIVER PATHOLOGY NOTES | MUHS MBBS 2nd Year | Johari Pathology", color: WHITE, size: 16, font: "Calibri", bold: true }),
],
})],
}),
},
footers: {
default: new Footer({
children: [new Paragraph({
alignment: AlignmentType.RIGHT,
children: [
new TextRun({ text: "Page ", size: 16, font: "Calibri", color: "888888" }),
new TextRun({ children: [PageNumber.CURRENT], size: 16, font: "Calibri" }),
],
})],
}),
},
children,
}],
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/patho-notes/Liver_Pathology_MUHS_Notes.docx", buffer);
console.log("SUCCESS: Liver_Pathology_MUHS_Notes.docx created");
}).catch(err => {
console.error("ERROR:", err);
});
cd /home/daytona/workspace/patho-notes && node liver_notes.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/patho-notes/Liver_Pathology_MUHS_Notes.docx 2>&1 && ls -lh /home/daytona/workspace/patho-notes/Liver_Pathology_MUHS_Notes.docx
Liver Pathology MUHS Notes
Word Document · DOCX
| Section | Topics |
|---|---|
| 1. Viral Hepatitis | HAV, HBV, HCV, HDV, HEV — full virology, transmission, incubation, serological markers, outcomes |
| 2. Alcoholic Liver Disease | Metabolism of ethanol, Hepatic steatosis, Alcoholic hepatitis (Mallory bodies + 4 features), Alcoholic cirrhosis |
| 3. Liver Cirrhosis | Definition (3 features), Morphologic + Etiologic classification (12 types) |
| 4. Portal Hypertension | Definition (>7 mmHg), Pre/intra/posthepatic causes, All complications (varices, ascites, splenomegaly, encephalopathy) |
| 5. Hepatocellular Carcinoma | Risk factors, Gross + Micro morphology, 3-grade system, AFP tumor marker |
| 6. High-Yield Summary | One-liners + MUHS common long question guide |
Notes overview all important points from the topic