Make pdf Minor blood group 10 marks for md pathology rguhs exam
mkdir -p /tmp/workspace/rguhs-pathology && ls /tmp/workspace/rguhs-pathology/
~/rguhs-pathology/minor_blood_groups.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.pdfgen import canvas
OUTPUT = "/tmp/workspace/rguhs-pathology/Minor_Blood_Groups_10marks_RGUHS.pdf"
# ── Custom canvas for header/footer ─────────────────────────────────────────
class HeaderFooterCanvas(canvas.Canvas):
def __init__(self, *args, **kwargs):
canvas.Canvas.__init__(self, *args, **kwargs)
self._saved_page_states = []
def showPage(self):
self._saved_page_states.append(dict(self.__dict__))
self._startPage()
def save(self):
num_pages = len(self._saved_page_states)
for state in self._saved_page_states:
self.__dict__.update(state)
self.draw_header_footer(num_pages)
canvas.Canvas.showPage(self)
canvas.Canvas.save(self)
def draw_header_footer(self, num_pages):
w, h = A4
# Header bar
self.setFillColor(colors.HexColor("#1a3a5c"))
self.rect(0, h - 28*mm, w, 28*mm, fill=1, stroke=0)
self.setFillColor(colors.white)
self.setFont("Helvetica-Bold", 13)
self.drawCentredString(w/2, h - 13*mm, "MD PATHOLOGY — RGUHS EXAMINATION ANSWER")
self.setFont("Helvetica", 9)
self.drawCentredString(w/2, h - 20*mm, "Topic: Minor Blood Group Systems | Max Marks: 10")
# Footer
self.setFillColor(colors.HexColor("#1a3a5c"))
self.rect(0, 0, w, 12*mm, fill=1, stroke=0)
self.setFillColor(colors.white)
self.setFont("Helvetica", 8)
self.drawString(15*mm, 4*mm, "Sources: Henry's Clinical Diagnosis & Laboratory Methods | Harrison's Principles of Internal Medicine 22E")
self.drawRightString(w - 15*mm, 4*mm, f"Page {self._pageNumber} of {num_pages}")
# ── Document setup ───────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=18*mm,
leftMargin=18*mm,
topMargin=35*mm,
bottomMargin=20*mm,
)
# ── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
title_style = ParagraphStyle("QTitle",
fontSize=15, fontName="Helvetica-Bold",
textColor=colors.HexColor("#1a3a5c"),
spaceAfter=4, spaceBefore=8,
alignment=TA_CENTER, leading=20)
section_heading = ParagraphStyle("SecH",
fontSize=12, fontName="Helvetica-Bold",
textColor=colors.white,
spaceAfter=2, spaceBefore=6,
backColor=colors.HexColor("#1a3a5c"),
leftIndent=0, rightIndent=0,
borderPad=4, leading=16)
subsection_heading = ParagraphStyle("SubH",
fontSize=11, fontName="Helvetica-Bold",
textColor=colors.HexColor("#1a3a5c"),
spaceAfter=2, spaceBefore=6,
leading=14)
body = ParagraphStyle("Body",
fontSize=10, fontName="Helvetica",
textColor=colors.black,
spaceAfter=4, spaceBefore=2,
alignment=TA_JUSTIFY, leading=14)
bullet = ParagraphStyle("Bullet",
fontSize=10, fontName="Helvetica",
textColor=colors.black,
leftIndent=14, spaceAfter=3,
leading=13, bulletIndent=4)
highlight = ParagraphStyle("Highlight",
fontSize=10, fontName="Helvetica-Oblique",
textColor=colors.HexColor("#8B0000"),
spaceAfter=3, spaceBefore=3,
leftIndent=10, leading=13)
mark_note = ParagraphStyle("MarkNote",
fontSize=9, fontName="Helvetica-Oblique",
textColor=colors.HexColor("#555555"),
alignment=TA_CENTER, spaceAfter=4)
# ── Helper functions ─────────────────────────────────────────────────────────
def sec(txt):
return Paragraph(f" {txt}", section_heading)
def sub(txt):
return Paragraph(txt, subsection_heading)
def p(txt):
return Paragraph(txt, body)
def b(txt):
return Paragraph(f"• {txt}", bullet)
def hl(txt):
return Paragraph(txt, highlight)
def sp(h=4):
return Spacer(1, h*mm)
def hr(color="#1a3a5c", thickness=1):
return HRFlowable(width="100%", thickness=thickness, color=colors.HexColor(color))
# ── Build content ────────────────────────────────────────────────────────────
story = []
# Question box
story.append(sp(2))
q_data = [["Q. Write short notes on Minor Blood Group Systems. [10 Marks]"]]
q_table = Table(q_data, colWidths=[174*mm])
q_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#e8f0fa")),
("TEXTCOLOR", (0,0), (-1,-1), colors.HexColor("#1a3a5c")),
("FONTNAME", (0,0), (-1,-1), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 11),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("BOX", (0,0), (-1,-1), 1.5, colors.HexColor("#1a3a5c")),
]))
story.append(q_table)
story.append(sp(4))
# ── SECTION 1: Introduction ──────────────────────────────────────────────────
story.append(sec("1. INTRODUCTION"))
story.append(sp(1))
story.append(p(
"Blood group systems are classified by the International Society of Blood Transfusion (ISBT). "
"Currently <b>45 blood group systems</b> are recognized. The term <b>minor blood group systems</b> "
"refers to all blood group antigen systems other than ABO and Rh — they are 'minor' only in "
"relative clinical prevalence, not in significance. These systems carry antigens on red cell surface "
"proteins or glycoproteins encoded by distinct genetic loci. Antibodies against minor antigens are "
"usually IgG (immune, stimulated by transfusion or pregnancy) and cause <b>delayed hemolytic "
"transfusion reactions (DHTR)</b> and <b>Hemolytic Disease of the Fetus and Newborn (HDFN)</b>."
))
story.append(p(
"Of the 45 RBC group systems described, five — <b>Rh, Kell, Duffy, Kidd, and MNS</b> — "
"are routinely investigated due to the clinical significance of antibodies and their frequency. "
"Testing for all five ensures routine transfusion compatibility of approximately 95%."
" (Harrison's, 22E)"
))
story.append(sp(2))
# ── SECTION 2: Table of Key Systems ─────────────────────────────────────────
story.append(sec("2. OVERVIEW TABLE — KEY MINOR BLOOD GROUP SYSTEMS"))
story.append(sp(2))
tbl_data = [
["System (ISBT No.)", "Gene / Chr.", "Key Antigens", "Antibody Class", "Clinical Significance"],
["MNS (002)", "GYPA, GYPB\nChr 4", "M, N, S, s, U", "IgM (M,N); IgG (S,s)", "HDFN (anti-S, anti-U); mild HTR"],
["P1PK (003)", "A4GALT\nChr 22", "P1, Pk", "IgM (natural)", "Rare severe HTR; habitual abortion (anti-P/anti-Tja)"],
["Lutheran (005)", "BCAM\nChr 19", "Lua, Lub", "IgG", "Rare mild HDFN; inhibited by In(Lu) gene"],
["Kell (006)", "KEL\nChr 7", "K(K1), k(K2), Kpa, Kpb", "IgG (immune)", "Severe HDFN; severe HTR; K most immunogenic after D"],
["Lewis (007)", "FUT3\nChr 19", "Lea, Leb", "IgM (naturally occurring)", "Not on fetal RBCs; no HDFN; mild HTR possible"],
["Duffy (008)", "DARC/ACKR1\nChr 1", "Fya, Fyb, Fy3", "IgG (immune)", "HDFN; HTR; Fy(a-b-): resistance to P. vivax malaria"],
["Kidd (009)", "SLC14A1\nChr 18", "Jka, Jkb, Jk3", "IgG (complement-binding)", "Classic DHTR (dosage effect); HDFN; Jk3 null — severe"],
["Diego (010)", "SLC4A1 (Band 3)\nChr 17", "Dia, Dib, Wra, Wrb", "IgG", "HDFN; Dia prevalent in Asian/S. American populations"],
["I System (027)", "GCNT2\nChr 6", "I, i", "IgM (cold autoAb)", "Cold agglutinin disease; hemolytic anemia in Mycoplasma infection"],
]
col_widths = [33*mm, 28*mm, 35*mm, 28*mm, 50*mm]
tbl = Table(tbl_data, colWidths=col_widths, repeatRows=1)
tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a3a5c")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 8),
("ALIGN", (0,0), (-1,0), "CENTER"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 8),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#f0f5ff")]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 4),
]))
story.append(tbl)
story.append(sp(4))
# ── SECTION 3: Individual descriptions ──────────────────────────────────────
story.append(sec("3. INDIVIDUAL BLOOD GROUP SYSTEMS — DETAILED"))
story.append(sp(2))
# 3.1 MNS
story.append(KeepTogether([
sub("3.1 MNS Blood Group System (ISBT 002)"),
p("<b>Gene:</b> Glycophorin A (GYPA) and B (GYPB) on chromosome 4."),
b("Antigens: M, N carried on GPA; S, s, U carried on GPB."),
b("Anti-M and anti-N are usually naturally occurring cold IgM; anti-S, anti-s, anti-U are IgG (immune)."),
b("<b>Clinical:</b> Anti-S and anti-U cause <b>HDFN and HTR</b>. Anti-U is clinically important in Blacks where GPB deletion is more frequent."),
b("GYPA/GYPB hybrid genes (Miltenberger subsystem) produce low-frequency antigens."),
b("Enzyme treatment (ficin/papain) <b>destroys</b> MNS antigens — important in antibody identification."),
]))
story.append(sp(3))
# 3.2 Lewis
story.append(KeepTogether([
sub("3.2 Lewis Blood Group System (ISBT 007)"),
p("<b>Gene:</b> FUT3 (Le gene) on chromosome 19; interacts with FUT2 (Se gene)."),
b("Lewis antigens are <b>not intrinsic RBC antigens</b> — they are synthesized in secretory tissues, released into plasma as glycolipids, and adsorbed onto RBCs."),
b("Lewis phenotypes: Le(a+b-), Le(a-b+), Le(a-b-)."),
b("Anti-Lea and anti-Leb are usually IgM, naturally occurring, saline agglutinins."),
b("<b>No HDFN</b> — Lewis antigens are not expressed on fetal/neonatal RBCs; IgM antibodies do not cross placenta."),
b("Weak lytic potential — anti-Lea can fix complement and cause mild intravascular HTR."),
b("<b>Clinical note:</b> Lewis system is closely linked to ABO secretor status. Le(a-b-) individuals are non-secretors of ABH."),
]))
story.append(sp(3))
# 3.3 Kell
story.append(KeepTogether([
sub("3.3 Kell Blood Group System (ISBT 006)"),
p("<b>Gene:</b> KEL on chromosome 7; encodes a 93-kDa glycoprotein (zinc endopeptidase) linked to KX protein via disulfide bond."),
b("Key antigens: K (K1) and k (K2) — antithetical pair. K frequency ~9% in Caucasians; k (Cellano) ~99.8%."),
b("Other antigens: Kpa/Kpb, Jsa/Jsb."),
b("<b>Anti-K</b> is the <b>most common clinically significant immune antibody</b> after anti-D; almost always IgG, stimulated by transfusion/pregnancy."),
b("<b>Severe HDFN:</b> Anti-K suppresses fetal erythropoiesis (acts on progenitor cells) — causes fetal anemia with low reticulocyte count and low bilirubin (different from Rh HDFN)."),
b("<b>Ko (Kell-null) phenotype</b> — lacks all Kell antigens; anti-Ku causes severe HTR."),
b("McLeod phenotype: absent KX protein → acanthocytosis + chronic granulomatous disease (CGD) association."),
]))
story.append(sp(3))
# 3.4 Duffy
story.append(KeepTogether([
sub("3.4 Duffy Blood Group System (ISBT 008)"),
p("<b>Gene:</b> DARC (Duffy Antigen Receptor for Chemokines) / ACKR1 on chromosome 1. "
"The protein is a multipass transmembrane receptor that binds chemokines (CXCL1, CXCL8, CCL2)."),
b("Key antigens: Fya, Fyb (antithetical), Fy3, Fy5, Fy6."),
b("<b>Fy(a-b-) phenotype:</b> Common in sub-Saharan Africans (~70%). FY*B<sup>ES</sup> allele — promoter mutation abolishes DARC expression on RBCs only (expression maintained on endothelial cells)."),
b("<b>CRITICAL:</b> Fy(a-b-) individuals are <b>resistant to Plasmodium vivax malaria</b> — DARC is the obligate receptor for P. vivax merozoite invasion."),
b("Anti-Fya is more common than anti-Fyb; both are IgG, cause DHTR and HDFN."),
b("Anti-Fy3 — rare; associated with severe DHTR in Fy(a-b-) individuals when exposed to Fy3 antigen."),
]))
story.append(sp(3))
# 3.5 Kidd
story.append(KeepTogether([
sub("3.5 Kidd Blood Group System (ISBT 009)"),
p("<b>Gene:</b> SLC14A1 on chromosome 18. Encodes HUT11 — a urea transporter in RBCs (important for renal urea recycling)."),
b("Key antigens: Jka, Jkb (antithetical), Jk3."),
b("Jk(a-b-) null phenotype: extremely rare; individuals resist urea lysis (used in the urea lysis test)."),
b("<b>Anti-Jka is the classic cause of severe DHTR</b> — antibody titer drops below detectable levels between exposures ('evanescent antibody'), resurges upon re-exposure and causes severe hemolysis."),
b("Kidd antibodies <b>bind complement</b> — can cause intravascular hemolysis, acute renal failure, DIC."),
b("<b>Dosage effect:</b> Kidd antibodies react more strongly with homozygous (Jk<sup>a</sup>Jk<sup>a</sup>) than heterozygous (Jk<sup>a</sup>Jk<sup>b</sup>) cells — important in crossmatch."),
b("Can cause HDFN (usually mild to moderate)."),
]))
story.append(sp(3))
# 3.6 I System
story.append(KeepTogether([
sub("3.6 I Blood Group System (ISBT 027)"),
p("<b>Gene:</b> GCNT2 on chromosome 6. Encodes β-1,6-N-acetylglucosaminyltransferase that converts i antigen (linear poly-lactosamines) to I antigen (branched)."),
b("Neonates express i antigen predominantly; conversion to I antigen is complete by 18 months."),
b("Anti-I: <b>cold IgM autoantibody</b>; found in nearly all adult sera as a benign cold agglutinin at low titer."),
b("Pathological anti-I (high titer, wide thermal amplitude) → <b>Cold Agglutinin Disease (CAD)</b> — causes chronic hemolytic anemia."),
b("Anti-I is characteristically elevated in <b>Mycoplasma pneumoniae</b> infections and infectious mononucleosis."),
b("Rare adult i phenotype: associated with congenital cataracts."),
]))
story.append(sp(3))
# 3.7 P1PK
story.append(KeepTogether([
sub("3.7 P1PK Blood Group System (ISBT 003) — P Antigen"),
b("Gene: A4GALT on chromosome 22; antigens: P1, Pk, NOR."),
b("Rare p phenotype (Tj(a-)) individuals produce <b>anti-P+P1+Pk (anti-Tja)</b> — a potent hemolytic IgG antibody."),
b("Anti-Tja is associated with <b>habitual (recurrent) spontaneous abortions</b> in first trimester."),
b("P antigen serves as the receptor for <b>parvovirus B19</b> on erythroid progenitors."),
b("P1 antigen: receptor for Escherichia coli uropathogenic strains (FimH pili) — role in UTI pathogenesis."),
]))
story.append(sp(4))
# ── SECTION 4: Clinical Importance Summary ───────────────────────────────────
story.append(sec("4. CLINICAL IMPORTANCE IN TRANSFUSION MEDICINE"))
story.append(sp(2))
story.append(p(
"Minor blood group antibodies are responsible for the majority of <b>delayed hemolytic transfusion "
"reactions (DHTR)</b> and several cases of <b>HDFN</b>. Key clinical scenarios:"
))
clin_data = [
["Clinical Problem", "Implicated Antigens / Antibodies"],
["Delayed HTR (DHTR)", "Kidd (anti-Jka — classic), Duffy, Kell, Kidd — onset 2–14 days post-transfusion"],
["Severe HDFN", "Kell (anti-K — suppresses erythropoiesis), Duffy (anti-Fya), Kidd (anti-Jka), MNS (anti-U)"],
["Habitual abortion", "P system — anti-Tja (anti-PP1Pk) in p-phenotype mothers"],
["Resistance to P. vivax malaria", "Duffy — Fy(a-b-) phenotype; absence of DARC prevents merozoite entry"],
["Cold agglutinin disease", "I system — pathological anti-I (IgM); Mycoplasma, EBV associations"],
["Parvovirus B19 aplastic crisis", "P antigen — receptor on erythroid progenitors"],
["McLeod syndrome", "Kell — Kx protein deficiency; acanthocytosis, CGD, cardiomyopathy, neurological features"],
["Sickle cell transfusion alloimmunization", "Kell, Duffy, Kidd — multiple alloantibodies due to repeated transfusion"],
]
clin_table = Table(clin_data, colWidths=[70*mm, 104*mm], repeatRows=1)
clin_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#8B0000")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 9),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 8.5),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#fff0f0")]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(clin_table)
story.append(sp(4))
# ── SECTION 5: Prevention & Blood Bank Practice ──────────────────────────────
story.append(sec("5. PRETRANSFUSION TESTING & PREVENTION"))
story.append(sp(2))
story.append(p(
"The ISBT and AABB recommend routine antigen typing and antibody screening to prevent sensitization. "
"Clinically significant minor group antibodies are detected by the <b>Indirect Antiglobulin Test (IAT)</b> "
"at 37°C followed by anti-human globulin (AHG) phase."
))
story.append(b("<b>Antibody screen (Indirect Coombs):</b> Detects unexpected alloantibodies in recipient plasma using reagent RBCs with known antigen profiles."))
story.append(b("<b>Antibody identification:</b> Panel RBC testing; special techniques — enzyme treatment (ficin/papain destroys MNS, Duffy antigens; enhances Rh, Kidd), elution, adsorption."))
story.append(b("<b>Antigen-matched blood</b> (phenotype matching) for: Sickle cell disease patients (Kell, Duffy, Kidd, C, E matching); patients with multiple alloantibodies; females of childbearing age."))
story.append(b("Direct Coombs (DAT): Positive in DHTR and HDFN — detects IgG/C3 on RBC surface."))
story.append(b("<b>Urea lysis test:</b> Kidd null (Jk null) cells resist 2M urea lysis — used to identify Jk(a-b-) donors."))
story.append(sp(4))
# ── SECTION 6: Memory Mnemonics ──────────────────────────────────────────────
story.append(sec("6. HIGH-YIELD EXAM POINTS (MNEMONICS)"))
story.append(sp(2))
mnem_data = [
["Mnemonic / Fact", "Details"],
['"K kills kids"', "Anti-K causes severe HDFN by suppressing fetal erythropoiesis (not just hemolysis)"],
['"Kidd hides — then strikes"', "Kidd antibody is evanescent; titer falls, re-exposure → severe DHTR"],
['"Duffy defends against Vivax"', "Fy(a-b-) = resistance to P. vivax malaria (DARC/ACKR1 receptor absent on RBCs)"],
['"Lewis loves Lewis — not babies"', "Lewis antibodies are IgM; Lewis antigens absent on fetal RBCs → no HDFN"],
['"P for Parvo & Pregnancy loss"', "P antigen = parvovirus B19 receptor; anti-Tja → habitual abortion"],
['"Cold I in Mycoplasma"', "Anti-I (IgM) elevated in Mycoplasma pneumoniae → cold agglutinin hemolysis"],
["5 systems routinely tested", "Rh, Kell, Duffy, Kidd, MNS — ensures 95% transfusion compatibility"],
]
mnem_table = Table(mnem_data, colWidths=[55*mm, 119*mm], repeatRows=1)
mnem_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a3a5c")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 9),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 9),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8f0fa")]),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("FONTNAME", (0,1), (0,-1), "Helvetica-BoldOblique"),
("TEXTCOLOR", (0,1), (0,-1), colors.HexColor("#8B0000")),
]))
story.append(mnem_table)
story.append(sp(4))
# ── SECTION 7: Conclusion ─────────────────────────────────────────────────────
story.append(sec("7. CONCLUSION"))
story.append(sp(1))
story.append(p(
"Minor blood group systems, though individually less frequent than ABO/Rh, collectively constitute "
"the major cause of alloimmunization in multiply-transfused patients and represent key determinants "
"of safe transfusion practice. Kell, Duffy, Kidd, MNS, and Lewis systems carry the highest clinical "
"weight. Understanding each system's antigen biochemistry, antibody class, and clinical associations "
"is fundamental to immunohematology and safe blood banking practice."
))
story.append(sp(2))
story.append(Paragraph("— End of Answer —", mark_note))
story.append(sp(2))
# ── Marks breakdown hint ──────────────────────────────────────────────────────
marks_data = [
["Section", "Content", "Approx. Marks"],
["Introduction", "Definition, classification, ISBT, general antibody types", "1"],
["Overview Table", "Systems, genes, antigens, antibody class", "2"],
["Individual Systems", "MNS, Lewis, Kell, Duffy, Kidd, I, P1PK — features, HDFN/HTR", "4"],
["Clinical Significance", "DHTR, HDFN, malaria resistance, habitual abortion, CAD", "2"],
["Prevention / Testing", "IAT, antigen matching, DAT, urea lysis", "1"],
["", "Total", "10"],
]
marks_table = Table(marks_data, colWidths=[40*mm, 100*mm, 34*mm], repeatRows=1)
marks_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#555555")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#f5f5f5")]),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("BACKGROUND", (0,-1), (-1,-1), colors.HexColor("#e8f0fa")),
("FONTNAME", (0,-1), (-1,-1), "Helvetica-Bold"),
("ALIGN", (2,0), (2,-1), "CENTER"),
]))
story.append(Paragraph("<b>Marks Allocation Guide</b>", ParagraphStyle("mg", fontSize=9, fontName="Helvetica-Bold",
textColor=colors.HexColor("#333333"), spaceAfter=3, spaceBefore=8)))
story.append(marks_table)
# ── Build PDF ─────────────────────────────────────────────────────────────────
doc.build(story, canvasmaker=HeaderFooterCanvas)
print(f"PDF generated: {OUTPUT}")
cd /tmp/workspace/rguhs-pathology && python minor_blood_groups.py
ls -lh /tmp/workspace/rguhs-pathology/
Minor Blood Groups 10marks RGUHS
PDF Document · PDF
| Section | Content |
|---|---|
| 1. Introduction | Definition, ISBT system, 45 blood group systems, why minor = clinically significant |
| 2. Overview Table | 9 systems - gene/chromosome, key antigens, antibody class, clinical significance |
| 3. Individual Systems (detailed) | MNS, Lewis, Kell, Duffy, Kidd, I system, P1PK - each with gene, antigens, antibody, key clinical points |
| 4. Clinical Importance Table | DHTR, HDFN, malaria resistance, habitual abortion, cold agglutinin disease, McLeod syndrome |
| 5. Pretransfusion Testing | IAT, antibody screen, antigen matching, DAT, urea lysis test |
| 6. High-Yield Mnemonics | 7 exam-ready memory aids ("K kills kids", "Kidd hides then strikes", "Duffy defends against Vivax", etc.) |
| 7. Conclusion | Summary statement |
| Marks Allocation Guide | Section-by-section breakup to 10 marks |