Create a compilation on topic nutritional disorders for bams 2nd Prof student

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Here is the comprehensive compilation on Nutritional Disorders for BAMS 2nd Prof students, compiled from Robbins & Cotran Pathologic Basis of Disease, Harrison's Principles of Internal Medicine (22e, 2025), and Park's Textbook of Preventive and Social Medicine.

NUTRITIONAL DISORDERS

Compilation for BAMS 2nd Professional Students


UNIT 1: INTRODUCTION TO MALNUTRITION

Definition and Concept

Nutrition is the process by which living organisms obtain and use food substances for energy, growth, and maintenance. An appropriate diet must provide:
  1. Sufficient energy (carbohydrates, fats, proteins) for daily metabolic needs
  2. Amino acids and fatty acids as building blocks for protein and lipid synthesis
  3. Vitamins and minerals acting as coenzymes, hormones, or structural components
Malnutrition arises when one or more of these components is deficient, excessive, or imbalanced.
  • Primary malnutrition: Missing components in diet itself
  • Secondary malnutrition: Results from malabsorption, impaired utilization/storage, excess loss, or increased need for nutrients
  • Robbins & Cotran Pathologic Basis of Disease, p. 411

Causes of Malnutrition

CauseExplanation
PovertyHomeless persons, elderly, and poor children are most affected. Crop failures, drought, war worsen the problem in low-resource countries
Acute/Chronic IllnessBasal metabolic rate rises in illness, increasing nutritional needs. Wasting diseases (cancers, AIDS) cause cachexia
Chronic AlcoholismCauses deficiency of thiamine, pyridoxine, folate, and vitamin A due to poor diet, defective absorption, and increased metabolic needs. Risk of Wernicke encephalopathy and Korsakoff psychosis
IgnoranceFailure to recognize increased needs in infants, adolescents, and pregnant women. Examples: iron deficiency in formula-fed infants, thiamine deficiency from polished rice diet
Self-imposed restrictionAnorexia nervosa, bulimia, eating disorders
OtherGI diseases, malabsorption syndromes, genetic diseases, certain drug therapies, inadequate parenteral nutrition
  • Robbins & Cotran Pathologic Basis of Disease, p. 411-412

UNIT 2: PROTEIN-ENERGY MALNUTRITION (PEM)

Definition

PEM is a spectrum of conditions caused by deficiency of protein and/or calories. UNICEF/WHO/World Bank defines severe acute malnutrition (SAM) as a life-threatening wasting disorder of children due to poor nutrient intake and/or recurrent illness.
Diagnostic criteria for SAM:
  • Mid-upper arm circumference (MUAC) < 115 mm
  • Weight-for-height Z-score < -3 SD below normal
  • Presence of bilateral pitting oedema of the lower limbs
Global burden (2022): ~45 million children under 5 years (6.8%) affected by wasting; 13.6 million (2.1%) suffer from SAM. Over 20% (~148 million children under 5) suffer from stunting.
  • Robbins & Cotran Pathologic Basis of Disease, p. 412

WHO Nutritional Indices

IndexCondition Identified
Weight-for-ageUnderweight
Height/Length-for-ageStunting
Weight-for-Height/LengthWasting
  • Underweight: Weight-for-age Z-score < -2 SD (moderate) or < -3 SD (severe)
  • Stunting: Height-for-age Z-score < -2 SD; indicates past/chronic malnutrition
  • Wasting: Weight-for-height Z-score < -2 SD; indicates current/acute malnutrition

MUAC (Mid-Upper Arm Circumference) Classification

MUACNutritional Status
> 13.5 cmSatisfactory
12.5 - 13.5 cmMild to moderate malnutrition
< 12.5 cmSevere malnutrition
Note: MUAC cannot be used before age 1; between ages 1-5, it hardly varies.

2.1 KWASHIORKOR

Definition: A severe form of PEM that develops in individuals on diets with a low protein/energy ratio - i.e., caloric intake may be adequate but protein is severely deficient.
Pathogenesis: Marked protein deprivation causes severe loss of the visceral protein compartment. The resulting hypoalbuminaemia leads to generalised or dependent oedema.
Clinical Features:
  • Oedema (generalised/dependent) - cardinal feature that distinguishes from marasmus
  • Growth failure (growth retardation)
  • Muscle weakness and wasting (but may be masked by oedema)
  • Enlarged, fatty liver (due to reduced synthesis of apolipoprotein, the carrier protein component of lipoproteins) - can progress to cirrhosis rarely
  • Skin changes: "Flaky-paint" dermatosis - areas of hyperpigmentation and desquamation
  • Hair changes: Depigmentation, reddish-yellow discolouration (flag sign), easy pluckability
  • Apathy, listlessness, loss of appetite
  • Diarrhoea (due to decrease in intestinal villi and microvilli - the "empty belly" sign)
  • Anemia, immune suppression (increased susceptibility to infections)
  • Decreased small bowel villous height
Biochemistry: Low serum albumin, low serum transferrin, low retinol-binding protein
  • Robbins & Cotran Pathologic Basis of Disease, p. 412-413; Park's Textbook of Preventive and Social Medicine, p. 736

2.2 MARASMUS

Definition: Caused by inadequate intake of both protein and energy (calories). A form of severe cachexia resulting in wasting in infancy and childhood.
Pathogenesis: The body adapts by catabolising both fat stores and muscle protein to meet energy needs, resulting in severe wasting.
Clinical Features:
  • Severe wasting of muscle and subcutaneous fat
  • Little or no oedema (key distinguishing feature from kwashiorkor)
  • "Wizened old man" or "monkey face" appearance (loss of buccal fat pad - Bichat's fat pad)
  • Weight may be < 60% of expected weight-for-age
  • Skin: Thin, wrinkled, hanging in folds ("old man skin")
  • Hair: Sparse but not depigmented as severely as kwashiorkor
  • Serum albumin: Relatively preserved (may be near normal) vs. kwashiorkor
  • Irritability (as opposed to apathy in kwashiorkor)
  • Stunted growth, intellectual impairment

2.3 KWASHIORKOR vs MARASMUS - Comparison Table

FeatureKwashiorkorMarasmus
CauseLow protein/energy ratio; protein deficiencyDeficiency of both protein and energy
OedemaPresent (generalised/pitting)Absent
WeightLess affectedSeverely reduced (<60% expected)
Muscle wastingPresentSevere
Subcutaneous fatPreserved (may appear chubby)Severely reduced
Serum albuminVery lowNear normal
LiverEnlarged, fattyNormal
Skin changesFlaky-paint dermatosisThin, wrinkled, loose folds
Hair changesDepigmented, reddish, flag signSparse, not severely depigmented
Mental stateApathy, miserable, withdrawnIrritable, alert
AppetitePoorVoracious (hungry)

2.4 MARASMIC-KWASHIORKOR

A mixed form with features of both (severe wasting + oedema). Most severely ill children have overlapping features.

Malnutrition-Infection Cycle

Malnutrition impairs immunity, predisposing to infections. Infections increase nutrient loss and reduce intake, worsening malnutrition. This vicious cycle perpetuates morbidity and mortality.

UNIT 3: VITAMIN DEFICIENCY DISORDERS

3.1 VITAMIN A DEFICIENCY (Xerophthalmia)

Sources: Liver, fish, eggs, milk, butter (preformed vitamin A); yellow/green vegetables - carrots, spinach (carotenoids, provitamin A). β-carotene is the most important provitamin, contributing ~30% of dietary vitamin A.
Functions:
  1. Maintenance of normal vision (component of visual pigment rhodopsin)
  2. Regulation of cell growth and differentiation
  3. Maintenance of specialized epithelia
  4. Regulation of lipid metabolism
  5. Immune function - resistance to infection (particularly measles)
Absorption: Fat-soluble; requires bile, pancreatic enzymes, and antioxidants. Retinol is transported in chylomicrons to the liver for storage.
Clinical Features / Deficiency Syndromes:
StageFeature
EarlyNight blindness (nyctalopia) - first symptom
ProgressiveXerosis conjunctivae (dryness of conjunctiva)
ProgressiveBitot's spots - grey foamy triangular patches on bulbar conjunctiva
AdvancedXerosis corneae (corneal dryness)
SevereKeratomalacia (corneal ulceration/softening) - irreversible, leads to blindness
SystemicSquamous metaplasia of respiratory, urinary, GI epithelium
SystemicIncreased susceptibility to infections (especially measles, respiratory infections)
WHO Classification of Xerophthalmia:
  • XN - Night blindness
  • X1A - Conjunctival xerosis
  • X1B - Bitot's spots
  • X2 - Corneal xerosis
  • X3A - Corneal ulceration/keratomalacia (< 1/3 corneal surface)
  • X3B - Corneal ulceration/keratomalacia (≥ 1/3 corneal surface)
  • XS - Corneal scar
  • XF - Xerophthalmic fundus
Treatment: Vitamin A supplementation (WHO protocol: 200,000 IU orally for 2 days + 3rd dose at 2 weeks for children >1 year)
Toxicity (Hypervitaminosis A): Chronic ingestion of large amounts causes alopecia, bone/joint pain, desquamation, liver enlargement, raised intracranial pressure.
  • Robbins & Cotran Pathologic Basis of Disease, p. 414-415; Harrison's, 22e, p. 2646

3.2 VITAMIN D DEFICIENCY (Rickets / Osteomalacia)

Metabolism of Vitamin D:
  1. Skin: 7-dehydrocholesterol + UV light (290-315 nm) → Cholecalciferol (Vitamin D3)
  2. Liver: Vitamin D3 + 25-hydroxylase → 25-hydroxycholecalciferol (25-OH-D3) [storage form]
  3. Kidney: 25-OH-D3 + 1α-hydroxylase → 1,25-dihydroxyvitamin D3 (Calcitriol) [active form]
Regulation of renal 1α-hydroxylase:
  • Upregulated by: Hypocalcaemia (via PTH), hypophosphataemia
  • Downregulated by: 1,25-(OH)2D3 itself (negative feedback), FGF23 (from osteoblasts/osteocytes)
Functions:
  • Facilitates intestinal absorption of calcium and phosphorus
  • Mineralisation of bone
  • Immunomodulatory and antiproliferative effects
  • Acts via nuclear vitamin D receptor (VDR) on most cells
Deficiency Syndromes:
  • Rickets - children (failure of bone mineralisation during growth)
  • Osteomalacia - adults (demineralisation of formed bone)
Clinical Features of Rickets:
SystemFeature
SkullCraniotabes (ping-pong ball feeling), frontal bossing, delayed fontanelle closure
ChestRickety rosary (beading at costochondral junctions), Harrison's sulcus, pigeon chest
LimbsBow legs (genu varum) or knock knees (genu valgum), widened wrists and ankles
SpineKyphoscoliosis
TeethDelayed dentition, enamel hypoplasia
GeneralGrowth retardation, hypotonia, irritability, susceptibility to infections
Lab findings in Rickets:
  • Low serum calcium, low/normal phosphorus
  • Elevated serum alkaline phosphatase (ALP)
  • Low 25-OH-D3 levels
  • Elevated PTH
  • X-ray: Cupping, fraying, and splaying of metaphyses; Looser's zones (pseudofractures) in osteomalacia
  • Robbins & Cotran Pathologic Basis of Disease, p. 417-419

3.3 THIAMINE (VITAMIN B1) DEFICIENCY - BERIBERI

Function: Coenzyme in decarboxylation of α-ketoacids (pyruvate, α-ketoglutarate) and branched-chain amino acids; essential for energy generation. Also acts as coenzyme for transketolase (pentose phosphate pathway).
Dietary Threshold: Deficiency occurs at intake < 0.3 mg/1000 kcal
Risk factors:
  • Diets based on polished/milled rice
  • Chronic alcoholism (most common in developed countries)
  • Chronic diuretic use, bariatric surgery, hyperemesis
  • Foods with antithiamine factors (raw fish/shellfish contain thiaminases; tea, coffee, betel nuts contain heat-stable polyphenols)
Clinical Forms:
FormFeatures
Dry Beriberi (Neurological)Peripheral polyneuropathy: symmetrical weakness, paraesthesia, numbness (ascending)
Wet Beriberi (Cardiac)Cardiomegaly, high-output cardiac failure, oedema
Wernicke EncephalopathyConfusion, ophthalmoplegia (lateral gaze palsy), ataxia - classic triad; occurs in alcoholics
Korsakoff SyndromeAnterograde amnesia, confabulation - late/irreversible stage of thiamine deficiency in brain
Infantile BeriberiOccurs in breast-fed infants of thiamine-deficient mothers; cardiac failure, aphonia, oedema
Treatment: Thiamine 100 mg IV/IM immediately; always give thiamine BEFORE glucose in comatose patients (glucose infusion can precipitate/worsen Wernicke's).
  • Harrison's Principles of Internal Medicine, 22e, p. 2647

3.4 RIBOFLAVIN (VITAMIN B2) DEFICIENCY - ARIBOFLAVINOSIS

Dietary Threshold: < 0.4 mg/day
Risk factors: Alcoholism, low intake of milk products, poor diet
Clinical Features:
  • Magenta (beefy red) tongue (glossitis)
  • Angular stomatitis (cracking at corners of mouth)
  • Cheilosis (fissuring of lips)
  • Seborrhoeic dermatitis (around nose, genitalia)
  • Ocular symptoms: Corneal vascularisation, photophobia, lacrimation
  • Harrison's Principles of Internal Medicine, 22e

3.5 NIACIN (VITAMIN B3) DEFICIENCY - PELLAGRA

"4 Ds" of Pellagra:
  1. Dermatitis - Pigmented, scaly, "sunburnt" rash on sun-exposed areas (Casal's necklace around neck)
  2. Diarrhoea - Inflammation of GI mucosa
  3. Dementia - Memory loss, confusion, disorientation, apathy
  4. Death - if untreated
Dietary Threshold: < 3.0 niacin equivalents/day
Special note: Niacin can be synthesised from tryptophan (60 mg tryptophan = 1 mg niacin). Thus, pellagra occurs in maize-based diets (maize is low in tryptophan and niacin), in carcinoid syndrome (tryptophan diverted to serotonin), and with isoniazid use.
Contributing factors: Alcoholism, vitamin B6 deficiency, riboflavin deficiency, tryptophan deficiency
Signs: Bright red tongue, oropharyngeal ulcers
Treatment: Nicotinamide/niacinamide 100 mg TID; also treat B6 and riboflavin deficiencies.
  • Harrison's Principles of Internal Medicine, 22e, p. 2648

3.6 VITAMIN B6 (PYRIDOXINE) DEFICIENCY

Dietary Threshold: < 0.2 mg/day
Clinical Features:
  • Seborrhoeic dermatitis
  • Glossitis
  • Convulsions (especially in infants)
  • Peripheral neuropathy
  • Depression, confusion
  • Microcytic anaemia (pyridoxine is needed for haemoglobin synthesis)
Contributing factors: Isoniazid therapy (INH binds pyridoxine), oral contraceptives, alcoholism, penicillamine use

3.7 VITAMIN B12 (COBALAMIN) DEFICIENCY

Sources: Exclusively animal products (meat, fish, dairy, eggs). Strict vegans are at high risk.
Dietary Threshold: < 1 μg/day (RDA ~2.4 μg/day)
Absorption: Requires Intrinsic Factor (IF) produced by gastric parietal cells. Deficiency of IF causes Pernicious Anaemia.
Clinical Features:
  • Megaloblastic (macrocytic) anaemia - hypersegmented neutrophils
  • Subacute Combined Degeneration (SCD) of Spinal Cord: Demyelination of posterior and lateral columns; loss of vibration and position sense, spasticity, paraplegia
  • Glossitis (beefy red, smooth tongue)
  • Neuropsychiatric symptoms: Dementia, depression, psychosis
  • Elevated homocysteine and methylmalonic acid (diagnostic)
Contributing factors: Pernicious anaemia, total gastrectomy, ileal disease/resection, metformin use (reduces IF-B12 complex absorption), vegan diet, fish tapeworm

3.8 FOLIC ACID DEFICIENCY

Dietary Threshold: < 60 μg/day
Clinical Features:
  • Megaloblastic anaemia (identical to B12 deficiency haematologically)
  • No neurological manifestations (key distinction from B12)
  • Neural tube defects (NTDs) in foetus when mother is deficient - spina bifida, anencephaly
Contributing factors: Poor diet, alcoholism, pregnancy (increased demand), malabsorption (coeliac disease), methotrexate, trimethoprim use
Prevention of NTDs: Periconceptional folic acid supplementation (400 μg/day) for all women of childbearing age.

3.9 VITAMIN C (ASCORBIC ACID) DEFICIENCY - SCURVY

Function: Vitamin C is essential for the hydroxylation of proline and lysine in collagen synthesis. Without it, collagen is improperly cross-linked and unstable.
Dietary Threshold: < 10 mg/day (RDA: 65-90 mg/day)
Risk factors: Diets lacking fresh fruits and vegetables; alcoholism; elderly with poor diet
Clinical Features (mnemonic: BLEED)
  • Bleeding gums (spongy, swollen, bleeding gums) - due to defective collagen
  • Loose teeth
  • Easy bruising (perifollicular petechiae and purpura)
  • Emotion / Emotional changes (irritability, depression)
  • Dysfunction of wound healing (poor healing)
Other features:
  • Corkscrew (coiled) hairs
  • Subperiosteal haemorrhages (pain, particularly in lower limbs in children)
  • Woody oedema of legs
  • "Frog position" in infants (painful leg movement avoided)
  • Anaemia (multifactorial)
  • Pellagra-like skin rash
Diagnosis: Plasma vitamin C levels; gum signs + perifollicular haemorrhages are pathognomonic.
Treatment: Ascorbic acid 300-500 mg/day orally in divided doses.
  • Harrison's Principles of Internal Medicine, 22e, p. 2648

3.10 VITAMIN K DEFICIENCY

Function: Cofactor in hepatic γ-carboxylation of coagulation factors II (prothrombin), VII, IX, X, protein C, and protein S.
Sources: Green leafy vegetables; also synthesised by intestinal bacteria.
Clinical Features:
  • Abnormal bleeding - elevated PT and APTT
  • Haemorrhagic Disease of the Newborn (HDN) - occurs in neonates due to: lack of vitamin K in breast milk, sterile gut (no bacterial synthesis), inadequate placental transfer
Prevention of HDN: Vitamin K 1 mg IM at birth (universal neonatal prophylaxis)
Contributing factors: Biliary obstruction (fat malabsorption), broad-spectrum antibiotic therapy (kills intestinal bacteria), warfarin therapy (competitive inhibitor)

3.11 VITAMIN E DEFICIENCY

Function: Major antioxidant - scavenges free radicals, protects cell membranes from lipid peroxidation.
Clinical Features (mainly in premature infants or fat malabsorption states):
  • Spinocerebellar degeneration (ataxia, areflexia)
  • Haemolytic anaemia (in premature neonates)
  • Retinopathy

UNIT 4: MINERAL DEFICIENCY DISORDERS

4.1 IRON DEFICIENCY ANAEMIA

Causes:
  • Inadequate dietary intake (infants on milk diet, vegetarians)
  • Increased demands (pregnancy, growth spurts)
  • Chronic blood loss (hookworm, menorrhagia, peptic ulcer)
  • Malabsorption (coeliac disease, post-gastrectomy)
Clinical Features:
  • Tiredness, pallor, dyspnoea on exertion
  • Koilonychia (spoon-shaped nails)
  • Glossitis, angular stomatitis
  • Pica (craving for non-food items - ice, clay, chalk)
  • Plummer-Vinson syndrome: Iron deficiency + dysphagia + upper oesophageal web
  • Children: Poor concentration, impaired cognitive development
Lab Findings:
  • Low Hb, MCV < 80 fL (microcytic hypochromic anaemia)
  • Low serum ferritin (best indicator of iron stores)
  • Low serum iron, elevated TIBC
  • Elevated RDW (red cell distribution width)

4.2 IODINE DEFICIENCY DISORDERS (IDD)

Consequence: Iodine is essential for synthesis of thyroid hormones (T3, T4).
Spectrum of IDD:
Stage of LifeConsequence
FoetalAbortion, stillbirth, congenital anomalies, cretinism
NeonatalNeonatal goitre, neonatal hypothyroidism
Child/AdolescentGoitre, hypothyroidism, impaired mental/physical development
AdultGoitre, hypothyroidism, impaired mental function
All agesGoitre (most visible sign), increased susceptibility to radiation
Cretinism: Severe hypothyroidism from foetal/early neonatal iodine deficiency. Features:
  • Neurological cretinism: Mental retardation, deaf-mutism, squint (strabismus), spastic diplegia
  • Hypothyroid/Myxoedematous cretinism: Growth failure, delayed bone maturation, myxoedema, hypothyroidism
Prevention: Universal Salt Iodisation (USI) - iodisation of salt at 15-20 ppm. Iodised oil injections in severely deficient areas.

4.3 ZINC DEFICIENCY

Functions: Zinc is a cofactor for >300 enzymes; involved in protein synthesis, wound healing, immune function, and taste/smell.
Clinical Features:
  • Acrodermatitis enteropathica (genetic inability to absorb zinc): Perioral and acral dermatitis, alopecia, diarrhoea
  • Growth retardation, delayed puberty, hypogonadism
  • Impaired wound healing
  • Impaired immune function (T-cell dysfunction)
  • Ageusia (loss of taste), anosmia (loss of smell)

4.4 FLUORIDE

Fluoride Deficiency:
  • Dental caries (susceptibility increased)
Fluoride Excess (Fluorosis):
  • Dental fluorosis: Mottled enamel (chalky white patches, brown staining, pitting)
  • Skeletal fluorosis: Dense, rigid bones; calcification of ligaments; neurological compression

UNIT 5: OBESITY AND OVERNUTRITION

Definition: BMI ≥ 30 kg/m² (Grade I: 30-34.9; Grade II: 35-39.9; Grade III: ≥ 40) For Indians/Asians, cut-offs are adjusted: Overweight ≥ 23, Obese ≥ 25 kg/m²
Causes: Imbalance between energy intake and expenditure; genetic factors (leptin, MC4R mutations); environmental factors; endocrine causes (hypothyroidism, Cushing's syndrome).
Complications:
  • Metabolic: Type 2 diabetes, dyslipidaemia, NAFLD/NASH
  • Cardiovascular: Hypertension, coronary artery disease, stroke
  • Respiratory: Obstructive sleep apnoea, obesity hypoventilation syndrome
  • Musculoskeletal: Osteoarthritis, gout
  • Oncological: Endometrial, breast, colorectal carcinoma
  • Reproductive: PCOS, infertility

UNIT 6: SUMMARY TABLE - VITAMIN DEFICIENCY DISEASES

(From Robbins & Cotran Pathologic Basis of Disease + Harrison's 22e)
VitaminTypeKey FunctionDeficiency DiseaseKey Features
AFat-solubleVisual pigment, epithelial integrityXerophthalmiaNight blindness, Bitot's spots, keratomalacia
DFat-solubleCa/P absorption, bone mineralisationRickets/OsteomalaciaBow legs, craniotabes, rickety rosary
EFat-solubleAntioxidantSpinocerebellar degenerationAtaxia, haemolytic anaemia
KFat-solubleCoagulation (factors II, VII, IX, X)Bleeding disorder, HDNElevated PT, haemorrhage
B1 (Thiamine)Water-solubleEnergy metabolism (decarboxylation)BeriberiPeripheral neuropathy, cardiac failure, Wernicke's
B2 (Riboflavin)Water-solubleOxidation-reduction reactionsAriboflavinosisMagenta tongue, angular stomatitis, corneal vascularisation
B3 (Niacin)Water-solubleNAD/NADP coenzymePellagraDermatitis, diarrhoea, dementia (3 Ds)
B6 (Pyridoxine)Water-solubleAmino acid metabolism-Convulsions, microcytic anaemia, neuropathy
B9 (Folate)Water-solubleDNA synthesis, one-carbon transferMegaloblastic anaemiaNTDs in foetus, no neurological signs
B12 (Cobalamin)Water-solubleDNA synthesis, myelin maintenanceMegaloblastic anaemia, SCDSubacute combined degeneration, dementia
C (Ascorbic acid)Water-solubleCollagen synthesis (hydroxylation)ScurvyBleeding gums, corkscrew hairs, subperiosteal haemorrhage

UNIT 7: KEY MNEMONICS AND HIGH-YIELD POINTS

Mnemonics

  1. Fat-soluble vitamins: "ADEK" (A, D, E, K)
  2. Pellagra 4Ds: Dermatitis, Diarrhoea, Dementia, Death
  3. Scurvy BLEED: Bleeding gums, Loose teeth, Easy bruising, Emotional changes, Defective wound healing
  4. Wernicke's triad (CAO): Confusion, Ataxia, Ophthalmoplegia
  5. Rickets signs: "BRiCH" - Bow legs, Rickety rosary, Craniotabes, Harrison's sulcus

High-Yield Exam Points

PointDetail
Oedema differentiates Kwashiorkor from MarasmusKwashiorkor has oedema; marasmus does not
First symptom of Vitamin A deficiencyNight blindness
Vitamin D active formCalcitriol = 1,25-(OH)2 D3
Beriberi + Wernicke'sThiamine (B1) deficiency
NTDs in pregnancyFolic acid deficiency
SCD of spinal cordVitamin B12 deficiency
Pellagra + maize dietNiacin/tryptophan deficiency
Scurvy + collagen defectVitamin C deficiency
HDN prevented byVitamin K IM at birth
Pernicious anaemiaIntrinsic factor deficiency → B12 malabsorption
Bitot's spotsVitamin A deficiency (conjunctival xerosis)
Rickety rosary + craniotabesVitamin D deficiency
Corkscrew hairs + perifollicular purpuraScurvy (Vit C)
Give thiamine BEFORE glucoseIn alcoholic comatose patients - prevents precipitating Wernicke's
Arm circumference < 12.5 cmSevere malnutrition (SAM)

UNIT 8: PREVENTION OF NUTRITIONAL DISORDERS

Public Health Approaches

  1. Diet diversification - promote varied diet including animal proteins, vegetables, pulses
  2. Food fortification - universal salt iodisation; vitamin A fortification of oil/fat; iron/folic acid fortification of flour
  3. Supplementation programmes:
    • Vitamin A: 6-monthly mega-dose supplementation in children 6 months - 5 years
    • Iron and folic acid (IFA) supplementation in pregnant and lactating women, adolescent girls
    • Vitamin K prophylaxis for all neonates
  4. Nutrition education - promoting breastfeeding, correct weaning practices, balanced diet
  5. Sanitation and infection control - breaking the malnutrition-infection cycle
  6. Antenatal care - periconceptional folate supplementation; correction of anaemia
  7. Growth monitoring - regular weighing of children, maintenance of growth charts

Prevention of PEM (FAO/WHO recommendations):

  • Measures for pregnant and lactating women
  • Promotion of exclusive breastfeeding for 6 months
  • Development of low-cost weaning foods
  • Family planning and birth spacing
  • Nutrition education at community level
  • Park's Textbook of Preventive and Social Medicine, p. 737-738

Sources: Robbins, Cotran & Kumar - Pathologic Basis of Disease (10e); Robbins & Kumar - Basic Pathology (11e); Harrison's Principles of Internal Medicine (22e, 2025, McGraw-Hill); Park's Textbook of Preventive and Social Medicine (26e)

Convert the above compilation of about 12 to 14 pages

Asking for Preferences
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace/nutr…

Running Command

mkdir -p /home/daytona/workspace/nutritional-disorders && python3 -c "import rep…

Writing File

~/nutritional-disorders/generate_pdf.py

#!/usr/bin/env python3
"""
Nutritional Disorders Compilation - BAMS 2nd Prof
Generates a well-formatted 12-14 page PDF using ReportLab
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import BalancedColumns
from reportlab.pdfgen import canvas
from reportlab.lib.utils import ImageReader
import os

OUTPUT_PATH = "/home/daytona/workspace/nutritional-disorders/Nutritional_Disorders_BAMS_2ndProf.pdf"

# ── Colour palette ────────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3a5c")   # headings / banner
MED_BLUE    = colors.HexColor("#2e6da4")   # unit titles
LIGHT_BLUE  = colors.HexColor("#dce9f5")   # table header fill
TEAL        = colors.HexColor("#0e7c86")   # sub-section
GOLD        = colors.HexColor("#d4a017")   # accent rule
WHITE       = colors.white
LIGHT_GREY  = colors.HexColor("#f5f5f5")   # alternate table rows
DARK_GREY   = colors.HexColor("#333333")   # body text

# ── Page setup ────────────────────────────────────────────────────────────────
PAGE_W, PAGE_H = A4
L_MARGIN = R_MARGIN = 2.0 * cm
T_MARGIN = B_MARGIN = 2.0 * cm


class NumberedCanvas(canvas.Canvas):
    """Adds header/footer to every page."""

    def __init__(self, *args, **kwargs):
        super().__init__(*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, total_pages):
        page_num = self._saved_page_states.index(
            {k: v for k, v in self.__dict__.items() if k in self._saved_page_states[0]}
        ) + 1 if hasattr(self, '_pageNumber') else self._pageNumber

        # Header bar (skip cover page)
        if self._pageNumber > 1:
            self.setFillColor(DARK_BLUE)
            self.rect(L_MARGIN, PAGE_H - T_MARGIN + 3*mm, PAGE_W - L_MARGIN - R_MARGIN, 6*mm, fill=1, stroke=0)
            self.setFillColor(WHITE)
            self.setFont("Helvetica-Bold", 8)
            self.drawString(L_MARGIN + 3*mm, PAGE_H - T_MARGIN + 5*mm, "NUTRITIONAL DISORDERS")
            self.drawRightString(PAGE_W - R_MARGIN - 3*mm, PAGE_H - T_MARGIN + 5*mm, "BAMS 2nd Professional")

        # Footer
        self.setFillColor(DARK_GREY)
        self.setFont("Helvetica", 7.5)
        self.drawCentredString(PAGE_W / 2, B_MARGIN - 8*mm,
                               f"Page {self._pageNumber}  |  Sources: Robbins & Cotran Pathology · Harrison's IM 22e · Park's PSM")
        # Gold rule above footer
        self.setStrokeColor(GOLD)
        self.setLineWidth(0.8)
        self.line(L_MARGIN, B_MARGIN - 4*mm, PAGE_W - R_MARGIN, B_MARGIN - 4*mm)


def build_styles():
    base = getSampleStyleSheet()

    styles = {
        "cover_title": ParagraphStyle("cover_title",
            fontName="Helvetica-Bold", fontSize=28, textColor=WHITE,
            alignment=TA_CENTER, leading=34),

        "cover_sub": ParagraphStyle("cover_sub",
            fontName="Helvetica", fontSize=13, textColor=colors.HexColor("#d0e8ff"),
            alignment=TA_CENTER, leading=18),

        "cover_meta": ParagraphStyle("cover_meta",
            fontName="Helvetica-Oblique", fontSize=10, textColor=colors.HexColor("#aaccee"),
            alignment=TA_CENTER, leading=14),

        "unit_title": ParagraphStyle("unit_title",
            fontName="Helvetica-Bold", fontSize=13, textColor=WHITE,
            spaceBefore=10, spaceAfter=6, leading=16,
            leftIndent=0, backColor=MED_BLUE,
            borderPadding=(4, 6, 4, 6)),

        "section_h2": ParagraphStyle("section_h2",
            fontName="Helvetica-Bold", fontSize=11.5, textColor=DARK_BLUE,
            spaceBefore=9, spaceAfter=4, leading=14),

        "section_h3": ParagraphStyle("section_h3",
            fontName="Helvetica-Bold", fontSize=10.5, textColor=TEAL,
            spaceBefore=7, spaceAfter=3, leading=13),

        "body": ParagraphStyle("body",
            fontName="Helvetica", fontSize=9.5, textColor=DARK_GREY,
            alignment=TA_JUSTIFY, leading=14, spaceAfter=3),

        "bullet": ParagraphStyle("bullet",
            fontName="Helvetica", fontSize=9.5, textColor=DARK_GREY,
            leftIndent=12, firstLineIndent=0, leading=13,
            spaceAfter=2, bulletIndent=3),

        "bullet2": ParagraphStyle("bullet2",
            fontName="Helvetica", fontSize=9, textColor=DARK_GREY,
            leftIndent=22, firstLineIndent=0, leading=12,
            spaceAfter=1, bulletIndent=13),

        "table_hdr": ParagraphStyle("table_hdr",
            fontName="Helvetica-Bold", fontSize=8.5, textColor=WHITE,
            alignment=TA_CENTER, leading=11),

        "table_cell": ParagraphStyle("table_cell",
            fontName="Helvetica", fontSize=8.5, textColor=DARK_GREY,
            leading=11, spaceAfter=0),

        "table_cell_b": ParagraphStyle("table_cell_b",
            fontName="Helvetica-Bold", fontSize=8.5, textColor=DARK_GREY,
            leading=11, spaceAfter=0),

        "mnemonic": ParagraphStyle("mnemonic",
            fontName="Helvetica-BoldOblique", fontSize=9.5, textColor=TEAL,
            leftIndent=8, leading=13, spaceAfter=2),

        "note": ParagraphStyle("note",
            fontName="Helvetica-Oblique", fontSize=8.5, textColor=colors.HexColor("#555555"),
            leftIndent=8, leading=12, spaceAfter=2),

        "source": ParagraphStyle("source",
            fontName="Helvetica-Oblique", fontSize=7.5, textColor=colors.HexColor("#888888"),
            alignment=TA_CENTER, leading=10),
    }
    return styles


def hr(color=GOLD, thickness=0.8, space_before=4, space_after=4):
    return HRFlowable(width="100%", thickness=thickness, color=color,
                      spaceBefore=space_before, spaceAfter=space_after)


def unit_header(text, S):
    return Paragraph(f"&nbsp;&nbsp;{text}", S["unit_title"])


def h2(text, S):
    return Paragraph(text, S["section_h2"])


def h3(text, S):
    return Paragraph(text, S["section_h3"])


def body(text, S):
    return Paragraph(text, S["body"])


def bullet(text, S, level=1):
    key = "bullet" if level == 1 else "bullet2"
    return Paragraph(f"• &nbsp;{text}", S[key])


def note(text, S):
    return Paragraph(f"<i>{text}</i>", S["note"])


def spacer(h=4):
    return Spacer(1, h * mm)


def make_table(headers, rows, S, col_widths=None):
    th = S["table_hdr"]
    tc = S["table_cell"]
    tcb = S["table_cell_b"]

    hdr_row = [Paragraph(h, th) for h in headers]
    data = [hdr_row]
    for i, row in enumerate(rows):
        data.append([Paragraph(str(cell), tcb if j == 0 else tc)
                     for j, cell in enumerate(row)])

    available = PAGE_W - L_MARGIN - R_MARGIN
    if col_widths is None:
        cw = available / len(headers)
        col_widths = [cw] * len(headers)
    else:
        col_widths = [c * cm for c in col_widths]

    table = Table(data, colWidths=col_widths, repeatRows=1)

    row_bg = []
    for i in range(1, len(data)):
        bg = LIGHT_GREY if i % 2 == 0 else WHITE
        row_bg.append(("BACKGROUND", (0, i), (-1, i), bg))

    style = TableStyle([
        ("BACKGROUND", (0, 0), (-1, 0), DARK_BLUE),
        ("TEXTCOLOR", (0, 0), (-1, 0), WHITE),
        ("ALIGN", (0, 0), (-1, -1), "LEFT"),
        ("VALIGN", (0, 0), (-1, -1), "TOP"),
        ("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"),
        ("FONTSIZE", (0, 0), (-1, 0), 8.5),
        ("ROWBACKGROUND", (0, 1), (-1, -1), [WHITE, LIGHT_GREY]),
        ("GRID", (0, 0), (-1, -1), 0.4, colors.HexColor("#cccccc")),
        ("LINEBELOW", (0, 0), (-1, 0), 1.2, GOLD),
        ("TOPPADDING", (0, 0), (-1, -1), 4),
        ("BOTTOMPADDING", (0, 0), (-1, -1), 4),
        ("LEFTPADDING", (0, 0), (-1, -1), 5),
        ("RIGHTPADDING", (0, 0), (-1, -1), 5),
    ] + row_bg)
    table.setStyle(style)
    return table


# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# CONTENT BUILDER
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
def build_content(S):
    story = []
    AW = PAGE_W - L_MARGIN - R_MARGIN   # available width

    # ── COVER PAGE ────────────────────────────────────────────────────────────
    story.append(Spacer(1, 3.5 * cm))

    # Decorative banner
    banner_data = [[Paragraph("NUTRITIONAL DISORDERS", S["cover_title"])]]
    banner = Table(banner_data, colWidths=[AW])
    banner.setStyle(TableStyle([
        ("BACKGROUND", (0, 0), (-1, -1), DARK_BLUE),
        ("TOPPADDING", (0, 0), (-1, -1), 18),
        ("BOTTOMPADDING", (0, 0), (-1, -1), 18),
        ("LEFTPADDING", (0, 0), (-1, -1), 10),
        ("RIGHTPADDING", (0, 0), (-1, -1), 10),
    ]))
    story.append(banner)
    story.append(spacer(6))

    story.append(Paragraph("A Comprehensive Study Compilation", S["cover_sub"]))
    story.append(spacer(2))
    story.append(Paragraph("BAMS 2nd Professional — Physiology / Biochemistry / Community Medicine", S["cover_meta"]))
    story.append(spacer(10))

    # Gold separator
    story.append(hr(GOLD, 2.0))
    story.append(spacer(4))

    # Info box
    info_data = [
        [Paragraph("<b>Subject:</b>", S["table_cell"]),
         Paragraph("Nutritional Disorders", S["table_cell"])],
        [Paragraph("<b>Level:</b>", S["table_cell"]),
         Paragraph("BAMS 2nd Professional", S["table_cell"])],
        [Paragraph("<b>Topics Covered:</b>", S["table_cell"]),
         Paragraph("PEM · Vitamin Deficiencies · Mineral Disorders · Obesity · Prevention", S["table_cell"])],
        [Paragraph("<b>Sources:</b>", S["table_cell"]),
         Paragraph("Robbins &amp; Cotran Pathology · Harrison's IM 22e · Park's PSM 26e", S["table_cell"])],
        [Paragraph("<b>Date:</b>", S["table_cell"]),
         Paragraph("July 2026", S["table_cell"])],
    ]
    info_table = Table(info_data, colWidths=[4*cm, AW - 4*cm])
    info_table.setStyle(TableStyle([
        ("BACKGROUND", (0, 0), (-1, -1), LIGHT_BLUE),
        ("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), 8),
        ("RIGHTPADDING", (0, 0), (-1, -1), 8),
        ("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
    ]))
    story.append(info_table)
    story.append(spacer(12))

    # Table of Contents
    toc_items = [
        ("Unit 1", "Introduction to Malnutrition"),
        ("Unit 2", "Protein-Energy Malnutrition (PEM) — Kwashiorkor & Marasmus"),
        ("Unit 3", "Vitamin Deficiency Disorders (A, D, B1, B2, B3, B6, B9, B12, C, K, E)"),
        ("Unit 4", "Mineral Deficiency Disorders (Iron, Iodine, Zinc, Fluoride)"),
        ("Unit 5", "Obesity and Overnutrition"),
        ("Unit 6", "Master Summary Table — Vitamins"),
        ("Unit 7", "High-Yield Points & Mnemonics"),
        ("Unit 8", "Prevention of Nutritional Disorders"),
    ]
    story.append(h2("Contents", S))
    story.append(hr(MED_BLUE, 0.5))
    for num, title in toc_items:
        story.append(Paragraph(f"&nbsp;&nbsp;<b>{num}</b> &nbsp;—&nbsp; {title}",
                                ParagraphStyle("toc", fontName="Helvetica", fontSize=9.5,
                                               textColor=DARK_GREY, leading=16, leftIndent=5)))
    story.append(PageBreak())

    # ── UNIT 1 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 1 — INTRODUCTION TO MALNUTRITION", S))
    story.append(spacer(3))

    story.append(h2("Definition & Concepts", S))
    story.append(body(
        "An appropriate diet must provide: (1) sufficient <b>energy</b> (carbohydrates, fats, proteins) "
        "for daily metabolic needs; (2) <b>amino acids and fatty acids</b> as building blocks for protein "
        "and lipid synthesis; (3) <b>vitamins and minerals</b> acting as coenzymes, hormones, or structural "
        "components.", S))
    story.append(spacer(2))
    story.append(bullet("<b>Primary malnutrition</b> — missing components in the diet itself.", S))
    story.append(bullet("<b>Secondary malnutrition</b> — results from malabsorption, impaired utilisation/storage, excess loss, or increased nutrient needs.", S))
    story.append(note("Source: Robbins & Cotran Pathologic Basis of Disease, p. 411", S))
    story.append(spacer(4))

    story.append(h2("Causes of Malnutrition", S))
    causes_headers = ["Cause", "Explanation"]
    causes_rows = [
        ["Poverty", "Homeless persons, elderly, and children of the poor. In low-resource countries: crop failures, drought, war."],
        ["Acute / Chronic Illness", "Raised BMR increases nutrient needs. Wasting diseases (cancer, AIDS) cause cachexia."],
        ["Chronic Alcoholism", "Deficiency of thiamine, pyridoxine, folate, vitamin A; risk of Wernicke encephalopathy and Korsakoff psychosis."],
        ["Ignorance", "Failure to recognise increased needs in infants, adolescents, pregnant women. E.g., thiamine deficiency from polished-rice diet."],
        ["Self-imposed restriction", "Anorexia nervosa, bulimia, and other eating disorders."],
        ["Other causes", "GI diseases, malabsorption syndromes, genetic diseases, certain drug therapies, inadequate parenteral nutrition."],
    ]
    story.append(make_table(causes_headers, causes_rows, S, col_widths=[4.5, 11.5]))
    story.append(spacer(4))
    story.append(PageBreak())

    # ── UNIT 2 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 2 — PROTEIN-ENERGY MALNUTRITION (PEM)", S))
    story.append(spacer(3))

    story.append(h2("Definition & Epidemiology (WHO/UNICEF)", S))
    story.append(body(
        "SAM (Severe Acute Malnutrition) is a life-threatening wasting disorder of children caused by poor "
        "nutrient intake and/or recurrent illnesses. In 2022, ~45 million children under 5 (6.8%) were affected "
        "by wasting; 13.6 million (2.1%) suffered from SAM. Over 148 million children suffer from stunting.", S))
    story.append(spacer(2))

    story.append(h3("Diagnostic Criteria for SAM", S))
    story.append(bullet("MUAC (Mid-Upper Arm Circumference) < 115 mm", S))
    story.append(bullet("Weight-for-height Z-score < −3 SD below normal", S))
    story.append(bullet("Presence of bilateral pitting oedema of the lower limbs", S))
    story.append(spacer(4))

    story.append(h3("WHO Nutritional Indices", S))
    who_headers = ["Index", "Condition", "Cut-off for Moderate (−2 SD)", "Cut-off for Severe (−3 SD)"]
    who_rows = [
        ["Weight-for-age", "Underweight", "< −2 SD", "< −3 SD"],
        ["Height/Length-for-age", "Stunting (past malnutrition)", "< −2 SD", "< −3 SD"],
        ["Weight-for-Height/Length", "Wasting (current malnutrition)", "< −2 SD", "< −3 SD"],
    ]
    story.append(make_table(who_headers, who_rows, S, col_widths=[4, 4, 4, 4]))
    story.append(spacer(3))

    story.append(h3("MUAC Classification (Children 1–5 years)", S))
    muac_headers = ["MUAC", "Nutritional Status"]
    muac_rows = [
        ["> 13.5 cm", "Satisfactory / Normal"],
        ["12.5 – 13.5 cm", "Mild to Moderate Malnutrition"],
        ["< 12.5 cm", "Severe Malnutrition (SAM)"],
        ["< 11.5 cm (WHO SAM)", "Severe Acute Malnutrition"],
    ]
    story.append(make_table(muac_headers, muac_rows, S, col_widths=[5, 11]))
    story.append(spacer(5))

    story.append(h2("2.1  Kwashiorkor", S))
    story.append(body(
        "<b>Definition:</b> Severe PEM from diets with a <b>low protein/energy ratio</b> — caloric intake may "
        "be adequate but protein is severely deficient. <b>Pathogenesis:</b> Protein deprivation → "
        "loss of visceral protein compartment → <b>hypoalbuminaemia</b> → generalised/dependent oedema.", S))
    story.append(spacer(2))

    kw_headers = ["Feature", "Description"]
    kw_rows = [
        ["Oedema", "Generalised or dependent — cardinal feature; pitting; may mask muscle wasting"],
        ["Growth failure", "Stunted height; reduced weight (masked by oedema)"],
        ["Liver", "Enlarged, fatty (↓ apolipoprotein synthesis → ↓ lipoprotein export → fat accumulation)"],
        ["Skin", '"Flaky-paint" dermatosis — hyperpigmentation, desquamation, erosions'],
        ["Hair", "Depigmentation, reddish-yellow colour, flag sign (alternating bands), easy pluckability"],
        ["Mental state", "Apathy, listlessness, miserable expression, loss of appetite"],
        ["GI tract", "Villous atrophy of small bowel → malabsorption, diarrhoea"],
        ["Biochemistry", "Very low serum albumin, low transferrin, low retinol-binding protein, anaemia"],
    ]
    story.append(make_table(kw_headers, kw_rows, S, col_widths=[4.5, 11.5]))
    story.append(spacer(5))

    story.append(h2("2.2  Marasmus", S))
    story.append(body(
        "<b>Definition:</b> Caused by inadequate intake of <b>both protein and energy</b>. Severe cachexia "
        "with catabolism of fat stores and muscle protein. <b>No oedema</b> — key distinguishing feature.", S))
    story.append(spacer(2))

    ma_headers = ["Feature", "Description"]
    ma_rows = [
        ["Appearance", '"Wizened old man" / "monkey face"; loss of Bichat\'s buccal fat pad'],
        ["Weight", "< 60% expected weight-for-age; severe muscle and fat wasting"],
        ["Oedema", "Absent"],
        ["Skin", "Thin, wrinkled, hanging in loose folds; no flaky-paint dermatosis"],
        ["Hair", "Sparse but not severely depigmented"],
        ["Serum albumin", "Relatively preserved (near normal)"],
        ["Mental state", "Irritable, alert (contrast with apathetic kwashiorkor)"],
        ["Liver", "Normal size (no fatty change)"],
    ]
    story.append(make_table(ma_headers, ma_rows, S, col_widths=[4.5, 11.5]))
    story.append(spacer(5))

    story.append(h2("2.3  Comparison: Kwashiorkor vs Marasmus", S))
    comp_headers = ["Feature", "Kwashiorkor", "Marasmus"]
    comp_rows = [
        ["Cause", "Low protein/energy ratio", "Deficiency of both protein and energy"],
        ["Oedema", "Present (generalised/pitting)", "Absent"],
        ["Weight loss", "Less affected (oedema masks)", "Severe (<60% expected)"],
        ["Subcutaneous fat", "Preserved", "Severely depleted"],
        ["Serum albumin", "Very low", "Near normal"],
        ["Liver", "Enlarged, fatty", "Normal"],
        ["Skin changes", "Flaky-paint dermatosis", "Thin, wrinkled, loose folds"],
        ["Hair changes", "Depigmented, flag sign", "Sparse, less depigmented"],
        ["Mental state", "Apathy, withdrawn", "Irritable, alert"],
        ["Appetite", "Poor/anorexic", "Voracious (hungry)"],
    ]
    story.append(make_table(comp_headers, comp_rows, S, col_widths=[4.5, 5.75, 5.75]))
    story.append(note("Marasmic-Kwashiorkor: mixed form with severe wasting PLUS oedema — most severe presentation.", S))
    story.append(note("Sources: Robbins & Cotran Pathology p. 412–413; Park's PSM p. 736", S))
    story.append(PageBreak())

    # ── UNIT 3 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 3 — VITAMIN DEFICIENCY DISORDERS", S))
    story.append(spacer(3))

    # ── Vit A ──
    story.append(h2("3.1  Vitamin A Deficiency — Xerophthalmia", S))
    story.append(body("<b>Sources:</b> Liver, fish, eggs, milk (preformed); yellow/green vegetables — β-carotene "
                      "(provitamin A, ~30% of dietary Vit A). <b>Absorption:</b> Fat-soluble; requires bile + "
                      "pancreatic enzymes; stored in liver.", S))
    story.append(spacer(2))
    story.append(h3("Functions", S))
    for f in ["Maintenance of normal vision (component of rhodopsin — visual pigment)",
              "Regulation of cell growth and differentiation",
              "Maintenance of specialized epithelia (respiratory, urinary, GI tracts)",
              "Immune function — resistance to infection (especially measles)"]:
        story.append(bullet(f, S))
    story.append(spacer(3))

    story.append(h3("WHO Staging of Xerophthalmia", S))
    xero_headers = ["WHO Stage", "Feature"]
    xero_rows = [
        ["XN", "Night blindness (nyctalopia) — FIRST symptom"],
        ["X1A", "Conjunctival xerosis (dryness)"],
        ["X1B", "Bitot's spots — grey foamy triangular patches on bulbar conjunctiva"],
        ["X2", "Corneal xerosis (corneal dryness)"],
        ["X3A", "Corneal ulceration / keratomalacia — < 1/3 corneal surface"],
        ["X3B", "Corneal ulceration / keratomalacia — ≥ 1/3 corneal surface (→ blindness)"],
        ["XS", "Corneal scar"],
        ["XF", "Xerophthalmic fundus"],
    ]
    story.append(make_table(xero_headers, xero_rows, S, col_widths=[2.5, 13.5]))
    story.append(spacer(2))
    story.append(body("<b>Systemic effects:</b> Squamous metaplasia of epithelia; increased susceptibility to "
                      "infections. <b>Toxicity (Hypervitaminosis A):</b> Alopecia, bone/joint pain, "
                      "desquamation, hepatomegaly, raised intracranial pressure.", S))
    story.append(spacer(4))

    # ── Vit D ──
    story.append(h2("3.2  Vitamin D Deficiency — Rickets / Osteomalacia", S))
    story.append(h3("Metabolism Pathway", S))
    metab_data = [
        ["SKIN\n7-dehydrocholesterol + UV (290–315 nm)", "→", "Cholecalciferol (Vit D3)"],
        ["LIVER\nVit D3 + 25-hydroxylase", "→", "25-OH-D3 (storage form)"],
        ["KIDNEY\n25-OH-D3 + 1α-hydroxylase", "→", "1,25-(OH)2D3 = Calcitriol (ACTIVE)"],
    ]
    metab_table = Table(metab_data, colWidths=[8*cm, 1*cm, 7*cm])
    metab_table.setStyle(TableStyle([
        ("BACKGROUND", (0, 0), (-1, -1), LIGHT_BLUE),
        ("FONTNAME", (0, 0), (0, -1), "Helvetica-Bold"),
        ("FONTSIZE", (0, 0), (-1, -1), 8.5),
        ("GRID", (0, 0), (-1, -1), 0.4, colors.HexColor("#aaaaaa")),
        ("ALIGN", (1, 0), (1, -1), "CENTER"),
        ("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
        ("TOPPADDING", (0, 0), (-1, -1), 5),
        ("BOTTOMPADDING", (0, 0), (-1, -1), 5),
        ("LEFTPADDING", (0, 0), (-1, -1), 6),
    ]))
    story.append(metab_table)
    story.append(spacer(2))
    story.append(body(
        "<b>Regulation of renal 1α-hydroxylase:</b> Upregulated by hypocalcaemia (via PTH) and "
        "hypophosphataemia. Downregulated by 1,25-(OH)2D3 itself and FGF23 (from osteoblasts/osteocytes).", S))
    story.append(spacer(3))

    story.append(h3("Clinical Features of Rickets (Children)", S))
    rickets_headers = ["Anatomical Site", "Features"]
    rickets_rows = [
        ["Skull", "Craniotabes (ping-pong feeling), frontal bossing, delayed fontanelle closure"],
        ["Chest", "Rickety rosary (costochondral beading), Harrison's sulcus, pigeon chest"],
        ["Limbs", "Bow legs (genu varum) or knock knees (genu valgum); widened wrists and ankles"],
        ["Spine", "Kyphoscoliosis"],
        ["Teeth", "Delayed dentition, enamel hypoplasia"],
        ["General", "Growth retardation, hypotonia, irritability, increased susceptibility to infections"],
    ]
    story.append(make_table(rickets_headers, rickets_rows, S, col_widths=[4, 12]))
    story.append(spacer(2))
    story.append(body("<b>Lab findings:</b> Low serum Ca, low/normal PO4, elevated ALP, low 25-OH-D3, elevated PTH. "
                      "<b>X-ray:</b> Cupping, fraying, splaying of metaphyses. In osteomalacia: Looser's zones (pseudofractures).", S))
    story.append(spacer(5))

    # ── B vitamins ──
    story.append(h2("3.3  Thiamine (B1) Deficiency — Beriberi", S))
    story.append(body("<b>Function:</b> Coenzyme in decarboxylation of α-ketoacids (pyruvate, α-ketoglutarate); "
                      "essential for energy generation; coenzyme for transketolase (pentose phosphate pathway).", S))
    story.append(spacer(2))
    beri_headers = ["Form", "Key Features"]
    beri_rows = [
        ["Dry Beriberi (Neurological)", "Symmetric peripheral polyneuropathy: ascending weakness, paraesthesia, numbness"],
        ["Wet Beriberi (Cardiac)", "Cardiomegaly, high-output cardiac failure, generalised oedema"],
        ["Wernicke Encephalopathy", "Triad: Confusion + Ophthalmoplegia (lateral gaze palsy) + Ataxia — alcoholics"],
        ["Korsakoff Syndrome", "Anterograde amnesia + Confabulation — late/irreversible stage"],
        ["Infantile Beriberi", "In breast-fed infants of deficient mothers: cardiac failure, aphonia, oedema"],
    ]
    story.append(make_table(beri_headers, beri_rows, S, col_widths=[5.5, 10.5]))
    story.append(note("⚠ Always give Thiamine BEFORE glucose in comatose/alcoholic patients — glucose can precipitate Wernicke's encephalopathy!", S))
    story.append(spacer(4))

    story.append(h2("3.4  Riboflavin (B2) Deficiency — Ariboflavinosis", S))
    for f in ["Magenta (beefy red) tongue — glossitis",
              "Angular stomatitis and cheilosis (cracking/fissuring of lips and angles of mouth)",
              "Seborrhoeic dermatitis (around nose, genitalia)",
              "Ocular: corneal vascularisation, photophobia, lacrimation"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.5  Niacin (B3) Deficiency — Pellagra", S))
    story.append(body("<b>Classic '4 Ds':</b> Dermatitis · Diarrhoea · Dementia · Death", S))
    story.append(spacer(2))
    for f in ["<b>Dermatitis:</b> Pigmented scaly rash on sun-exposed areas; Casal's necklace around neck",
              "<b>Diarrhoea:</b> Inflammation of GI mucosa; bright red tongue, oral ulcers",
              "<b>Dementia:</b> Apathy, memory loss, confusion, disorientation",
              "<b>Special:</b> Pellagra occurs with maize-based diets (low tryptophan), carcinoid syndrome, isoniazid use (INH depletes B6 needed for niacin synthesis from tryptophan)"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.6  Pyridoxine (B6) Deficiency", S))
    for f in ["Seborrhoeic dermatitis, glossitis",
              "Convulsions (especially in infants — B6-dependent epilepsy)",
              "Peripheral neuropathy; depression, confusion",
              "Microcytic anaemia (pyridoxine needed for haem synthesis)",
              "Caused by isoniazid (INH), oral contraceptives, penicillamine"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.7  Vitamin B12 (Cobalamin) Deficiency", S))
    story.append(body("<b>Sources:</b> Exclusively animal products. Strict vegans at high risk. "
                      "<b>Absorption:</b> Requires Intrinsic Factor (IF) from gastric parietal cells. "
                      "Deficiency of IF → Pernicious Anaemia.", S))
    story.append(spacer(2))
    for f in ["<b>Megaloblastic (macrocytic) anaemia</b> — hypersegmented neutrophils",
              "<b>Subacute Combined Degeneration (SCD) of Spinal Cord</b> — demyelination of posterior and lateral columns: loss of vibration/position sense, spasticity, paraplegia",
              "<b>Glossitis</b> — beefy red smooth tongue",
              "<b>Neuropsychiatric:</b> dementia, depression, psychosis",
              "<b>Labs:</b> Elevated homocysteine AND methylmalonic acid (both elevated — distinguishes from folate deficiency)"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.8  Folic Acid (B9) Deficiency", S))
    for f in ["Megaloblastic anaemia (identical to B12 haematologically)",
              "NO neurological manifestations (key distinction from B12 deficiency)",
              "Neural tube defects (NTDs) in foetus — spina bifida, anencephaly, when mother is deficient",
              "Prevention: Periconceptional folic acid 400 μg/day for all women of childbearing age"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.9  Vitamin C (Ascorbic Acid) Deficiency — Scurvy", S))
    story.append(body("<b>Function:</b> Essential for hydroxylation of proline and lysine in collagen synthesis. "
                      "Without it, collagen is improperly cross-linked and structurally unstable.", S))
    story.append(spacer(2))
    story.append(Paragraph("<b>Mnemonic: BLEED</b>", S["mnemonic"]))
    bleed_data = [
        ["B", "Bleeding gums — spongy, swollen, haemorrhagic (due to defective collagen)"],
        ["L", "Loose teeth"],
        ["E", "Easy bruising — perifollicular petechiae and purpura"],
        ["E", "Emotional changes — irritability, depression"],
        ["D", "Defective wound healing — poor collagen deposition"],
    ]
    for letter, desc in bleed_data:
        story.append(Paragraph(
            f"&nbsp;&nbsp;&nbsp;<b><font color='#0e7c86'>{letter}</font></b> — {desc}",
            ParagraphStyle("bleed", fontName="Helvetica", fontSize=9.5, leading=13,
                           leftIndent=10, textColor=DARK_GREY, spaceAfter=2)))
    story.append(spacer(2))
    for f in ["Corkscrew (coiled) hairs — pathognomonic",
              "Subperiosteal haemorrhages (painful legs in children; 'frog position')",
              "Woody oedema of legs; anaemia"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.10  Vitamin K Deficiency", S))
    story.append(body("<b>Function:</b> Cofactor in hepatic γ-carboxylation of coagulation factors II (prothrombin), "
                      "VII, IX, X, protein C, and protein S. Synthesised by intestinal bacteria and found in "
                      "green leafy vegetables.", S))
    story.append(spacer(2))
    for f in ["Abnormal bleeding — elevated PT and APTT",
              "Haemorrhagic Disease of the Newborn (HDN): lack of Vit K in breast milk + sterile gut + poor placental transfer",
              "Prevention of HDN: Vitamin K 1 mg IM at birth (universal neonatal prophylaxis)",
              "Contributing factors: biliary obstruction (fat malabsorption), broad-spectrum antibiotics, warfarin therapy"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("3.11  Vitamin E Deficiency", S))
    story.append(body("<b>Function:</b> Major antioxidant — scavenges free radicals, protects cell membranes "
                      "from lipid peroxidation.", S))
    for f in ["Spinocerebellar degeneration (ataxia, areflexia)",
              "Haemolytic anaemia in premature neonates",
              "Retinopathy"]:
        story.append(bullet(f, S))
    story.append(note("Source: Harrison's Principles of Internal Medicine, 22e (2025); Robbins & Cotran p. 414–420", S))
    story.append(PageBreak())

    # ── UNIT 4 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 4 — MINERAL DEFICIENCY DISORDERS", S))
    story.append(spacer(3))

    story.append(h2("4.1  Iron Deficiency Anaemia", S))
    story.append(h3("Causes", S))
    for c in ["Inadequate dietary intake (infants on milk diet, strict vegetarians)",
              "Increased demands (pregnancy, adolescent growth spurts)",
              "Chronic blood loss (hookworm, menorrhagia, peptic ulcer)",
              "Malabsorption (coeliac disease, post-gastrectomy)"]:
        story.append(bullet(c, S))
    story.append(spacer(3))
    story.append(h3("Clinical Features", S))
    for f in ["Tiredness, pallor, dyspnoea on exertion",
              "<b>Koilonychia</b> — spoon-shaped nails",
              "Glossitis, angular stomatitis",
              "<b>Pica</b> — craving for non-food items (ice, clay, chalk)",
              "<b>Plummer-Vinson Syndrome:</b> Iron deficiency + dysphagia + upper oesophageal web",
              "Children: poor concentration, impaired cognitive development"]:
        story.append(bullet(f, S))
    story.append(spacer(3))
    story.append(h3("Laboratory Findings", S))
    lab_headers = ["Parameter", "Finding in IDA"]
    lab_rows = [
        ["Haemoglobin", "Low"],
        ["MCV", "< 80 fL (microcytic)"],
        ["MCH", "Low (hypochromic)"],
        ["Serum Ferritin", "Low (best indicator of iron stores)"],
        ["Serum Iron", "Low"],
        ["TIBC (Total Iron Binding Capacity)", "Elevated"],
        ["RDW (Red Cell Distribution Width)", "Elevated"],
    ]
    story.append(make_table(lab_headers, lab_rows, S, col_widths=[7, 9]))
    story.append(spacer(5))

    story.append(h2("4.2  Iodine Deficiency Disorders (IDD)", S))
    story.append(body("Iodine is essential for synthesis of thyroid hormones (T3 and T4). "
                      "Deficiency leads to a spectrum of conditions.", S))
    story.append(spacer(2))
    idd_headers = ["Stage of Life", "Consequences"]
    idd_rows = [
        ["Foetal", "Abortion, stillbirth, congenital anomalies, cretinism"],
        ["Neonatal", "Neonatal goitre, neonatal hypothyroidism"],
        ["Child / Adolescent", "Goitre, hypothyroidism, impaired mental and physical development"],
        ["Adult", "Goitre, hypothyroidism, impaired mental function"],
        ["All ages", "Goitre (most visible sign), increased susceptibility to nuclear radiation"],
    ]
    story.append(make_table(idd_headers, idd_rows, S, col_widths=[4.5, 11.5]))
    story.append(spacer(3))
    story.append(h3("Cretinism", S))
    story.append(body("Severe hypothyroidism from foetal or early neonatal iodine deficiency.", S))
    cret_headers = ["Type", "Features"]
    cret_rows = [
        ["Neurological Cretinism", "Mental retardation, deaf-mutism, squint (strabismus), spastic diplegia"],
        ["Hypothyroid / Myxoedematous Cretinism", "Growth failure, delayed bone maturation, myxoedema, hypothyroidism"],
    ]
    story.append(make_table(cret_headers, cret_rows, S, col_widths=[5.5, 10.5]))
    story.append(note("Prevention: Universal Salt Iodisation (USI) — iodisation at 15–20 ppm. Iodised oil injections in severely deficient areas.", S))
    story.append(spacer(5))

    story.append(h2("4.3  Zinc Deficiency", S))
    story.append(body("Zinc is a cofactor for >300 enzymes; involved in protein synthesis, wound healing, "
                      "immune function (T-cell), taste, and smell.", S))
    for f in ["<b>Acrodermatitis enteropathica</b> (genetic zinc malabsorption): perioral and acral dermatitis, alopecia, diarrhoea",
              "Growth retardation, delayed puberty, hypogonadism",
              "Impaired wound healing; impaired immune function",
              "Ageusia (loss of taste), anosmia (loss of smell)"]:
        story.append(bullet(f, S))
    story.append(spacer(4))

    story.append(h2("4.4  Fluoride — Deficiency and Excess", S))
    fluor_headers = ["Condition", "Features"]
    fluor_rows = [
        ["Fluoride Deficiency", "Increased susceptibility to dental caries"],
        ["Dental Fluorosis (excess)", "Mottled enamel — chalky white patches, brown staining, pitting"],
        ["Skeletal Fluorosis (excess)", "Dense rigid bones, calcification of ligaments, neurological compression symptoms"],
    ]
    story.append(make_table(fluor_headers, fluor_rows, S, col_widths=[5, 11]))
    story.append(PageBreak())

    # ── UNIT 5 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 5 — OBESITY AND OVERNUTRITION", S))
    story.append(spacer(3))

    story.append(h2("Definition (WHO BMI Classification)", S))
    bmi_headers = ["Category", "BMI (kg/m²)", "Asian Cut-off"]
    bmi_rows = [
        ["Normal", "18.5 – 24.9", "18.5 – 22.9"],
        ["Overweight", "25 – 29.9", "≥ 23"],
        ["Obese Grade I", "30 – 34.9", "≥ 25"],
        ["Obese Grade II", "35 – 39.9", "≥ 27.5"],
        ["Obese Grade III (Morbid)", "≥ 40", "≥ 32.5"],
    ]
    story.append(make_table(bmi_headers, bmi_rows, S, col_widths=[6, 5, 5]))
    story.append(spacer(4))

    story.append(h2("Complications of Obesity", S))
    compl_headers = ["System", "Complications"]
    compl_rows = [
        ["Metabolic", "Type 2 diabetes mellitus, dyslipidaemia, NAFLD/NASH, hyperuricaemia"],
        ["Cardiovascular", "Hypertension, coronary artery disease, stroke, cardiomyopathy"],
        ["Respiratory", "Obstructive sleep apnoea, obesity hypoventilation syndrome"],
        ["Musculoskeletal", "Osteoarthritis (especially knee), gout"],
        ["Oncological", "Endometrial, breast, colorectal, oesophageal, pancreatic carcinoma"],
        ["Reproductive", "PCOS, infertility, gestational diabetes"],
        ["Psychological", "Depression, anxiety, low self-esteem, social isolation"],
    ]
    story.append(make_table(compl_headers, compl_rows, S, col_widths=[4.5, 11.5]))
    story.append(PageBreak())

    # ── UNIT 6 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 6 — MASTER SUMMARY TABLE: VITAMINS", S))
    story.append(spacer(3))
    story.append(note("Source: Robbins & Cotran Pathologic Basis of Disease Table 9.9 + Harrison's IM 22e Table 344-1", S))
    story.append(spacer(3))

    vit_headers = ["Vitamin", "Type", "Key Function", "Deficiency Disease", "Hallmark Features"]
    vit_rows = [
        ["A (Retinol)", "Fat-soluble", "Visual pigment; epithelial integrity; immune function",
         "Xerophthalmia", "Night blindness, Bitot's spots, keratomalacia"],
        ["D (Calcitriol)", "Fat-soluble", "Ca/P absorption; bone mineralisation",
         "Rickets (child)\nOsteomalacia (adult)", "Bow legs, craniotabes, rickety rosary"],
        ["E (Tocopherol)", "Fat-soluble", "Antioxidant; scavenges free radicals",
         "Spinocerebellar degeneration", "Ataxia, haemolytic anaemia in neonates"],
        ["K (Phylloquinone)", "Fat-soluble", "Carboxylation of clotting factors II, VII, IX, X",
         "Bleeding disorder; HDN", "Elevated PT/APTT; neonatal haemorrhage"],
        ["B1 (Thiamine)", "Water-soluble", "Decarboxylation of α-ketoacids; energy metabolism",
         "Beriberi; Wernicke-Korsakoff", "Peripheral neuropathy, cardiomegaly, ophthalmoplegia, amnesia"],
        ["B2 (Riboflavin)", "Water-soluble", "Oxidation-reduction (FAD, FMN coenzymes)",
         "Ariboflavinosis", "Magenta tongue, angular stomatitis, corneal vascularisation"],
        ["B3 (Niacin)", "Water-soluble", "NAD/NADP coenzyme; energy metabolism",
         "Pellagra", "Dermatitis, diarrhoea, dementia (3 Ds)"],
        ["B6 (Pyridoxine)", "Water-soluble", "Amino acid metabolism; haem synthesis",
         "—", "Convulsions (infants), microcytic anaemia, neuropathy"],
        ["B9 (Folate)", "Water-soluble", "DNA synthesis; one-carbon transfer",
         "Megaloblastic anaemia; NTDs", "No neurological signs; NTDs in foetus"],
        ["B12 (Cobalamin)", "Water-soluble", "DNA synthesis; myelin maintenance",
         "Megaloblastic anaemia; SCD", "Subacute combined degeneration, dementia, ↑MMA"],
        ["C (Ascorbic acid)", "Water-soluble", "Collagen synthesis (proline/lysine hydroxylation)",
         "Scurvy", "Bleeding gums, corkscrew hairs, subperiosteal haemorrhage"],
    ]
    story.append(make_table(vit_headers, vit_rows, S, col_widths=[2.8, 2.5, 4.2, 3, 3.5]))
    story.append(PageBreak())

    # ── UNIT 7 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 7 — HIGH-YIELD POINTS & MNEMONICS", S))
    story.append(spacer(3))

    story.append(h2("Key Mnemonics", S))
    mnems = [
        ("Fat-soluble vitamins", "ADEK — Vitamins A, D, E, K"),
        ("Pellagra", "4 Ds — Dermatitis, Diarrhoea, Dementia, Death"),
        ("Scurvy", "BLEED — Bleeding gums, Loose teeth, Easy bruising, Emotional changes, Defective healing"),
        ("Wernicke's triad", "CAO — Confusion, Ataxia, Ophthalmoplegia"),
        ("Rickets signs", "BRiCH — Bow legs, Rickety rosary, Craniotabes, Harrison's sulcus"),
        ("Kwashiorkor vs Marasmus", "K has the K — Kwashiorkor = edeKa (Oedema present)"),
    ]
    mnem_headers = ["Topic", "Mnemonic / Rule"]
    story.append(make_table(mnem_headers, mnems, S, col_widths=[5, 11]))
    story.append(spacer(5))

    story.append(h2("High-Yield Exam Points", S))
    hy_headers = ["Question / Point", "Answer"]
    hy_rows = [
        ["Feature that differentiates Kwashiorkor from Marasmus", "Oedema (present in Kwashiorkor; absent in Marasmus)"],
        ["First symptom of Vitamin A deficiency", "Night blindness (nyctalopia)"],
        ["Active form of Vitamin D", "Calcitriol = 1,25-(OH)2D3 (produced in kidney)"],
        ["Storage form of Vitamin D", "25-OH-D3 (produced in liver)"],
        ["Vitamin deficiency causing Beriberi and Wernicke's", "Thiamine (Vitamin B1)"],
        ["Give this BEFORE glucose in comatose alcoholics", "Thiamine (to prevent precipitating Wernicke's)"],
        ["NTD prevention in pregnancy", "Folic acid 400 μg/day periconceptionally"],
        ["Spinal cord degeneration (SCD) caused by", "Vitamin B12 deficiency"],
        ["Maize diet → deficiency of", "Niacin / Tryptophan → Pellagra"],
        ["Defective collagen synthesis due to", "Vitamin C deficiency → Scurvy"],
        ["Haemorrhagic Disease of the Newborn prevented by", "Vitamin K 1 mg IM at birth"],
        ["Pernicious anaemia mechanism", "Intrinsic Factor deficiency → Vitamin B12 malabsorption"],
        ["Bitot's spots", "Vitamin A deficiency (stage X1B xerophthalmia)"],
        ["Corkscrew hairs + perifollicular purpura", "Scurvy (Vitamin C deficiency)"],
        ["MUAC < 12.5 cm", "Severe malnutrition in children 1–5 years"],
        ["Best indicator of iron stores", "Serum Ferritin (lowest in IDA)"],
        ["Lab value elevated in both B12 AND folate deficiency", "Homocysteine (but methylmalonic acid elevated only in B12)"],
        ["Universal Salt Iodisation level", "15–20 ppm iodine"],
        ["Children severely wasted are __× more likely to die", "9 times more likely than well-nourished children"],
    ]
    story.append(make_table(hy_headers, hy_rows, S, col_widths=[8.5, 7.5]))
    story.append(PageBreak())

    # ── UNIT 8 ─────────────────────────────────────────────────────────────────
    story.append(unit_header("UNIT 8 — PREVENTION OF NUTRITIONAL DISORDERS", S))
    story.append(spacer(3))

    story.append(h2("Public Health Strategies", S))
    prev_headers = ["Strategy", "Details"]
    prev_rows = [
        ["Diet Diversification", "Promote varied diet including animal proteins, vegetables, pulses, and fruits"],
        ["Food Fortification", "Universal Salt Iodisation (USI); Vit A fortification of oil; iron/folic acid in flour; Vit D in milk"],
        ["Supplementation Programmes",
         "Vit A: 6-monthly mega-dose in children 6 months–5 years\n"
         "IFA: Pregnant/lactating women and adolescent girls\n"
         "Vit K: 1 mg IM at birth for all neonates\n"
         "Zinc: Supplementation during acute diarrhoea in children"],
        ["Nutrition Education", "Promote exclusive breastfeeding for 6 months; correct complementary feeding from 6 months; balanced diet counselling"],
        ["Sanitation & Infection Control", "Breaking the malnutrition-infection cycle; ORS use, vaccination"],
        ["Antenatal Care", "Periconceptional folate; iron supplementation; correction of anaemia in pregnancy"],
        ["Growth Monitoring", "Regular weighing of children; maintenance of growth charts; Road-to-Health card"],
        ["Legislation", "Prevention of Food Adulteration Act; Food Safety and Standards Authority of India (FSSAI) regulations"],
    ]
    story.append(make_table(prev_headers, prev_rows, S, col_widths=[4.5, 11.5]))
    story.append(spacer(5))

    story.append(h2("Prevention of PEM — FAO/WHO Recommendations", S))
    story.append(h3("(a) Health Promotion", S))
    for item in ["Measures directed to pregnant and lactating women (education, supplement distribution)",
                 "Promotion of exclusive breastfeeding for the first 6 months",
                 "Development of low-cost weaning foods; frequent small feeds",
                 "Measures to improve overall family diet",
                 "Nutrition education — promotion of correct feeding practices",
                 "Family planning and spacing of births",
                 "Improvement of family environment and home economics"]:
        story.append(bullet(item, S))
    story.append(spacer(3))
    story.append(h3("(b) Specific Protection", S))
    for item in ["Timely diagnosis using growth charts, MUAC, Z-scores",
                 "Community-based management of SAM with ready-to-use therapeutic foods (RUTF)",
                 "Hospital-based management for SAM with complications",
                 "Government nutrition programmes: ICDS (Integrated Child Development Services), Mid-Day Meal Scheme"]:
        story.append(bullet(item, S))
    story.append(spacer(4))
    story.append(note("Sources: Park's Textbook of Preventive & Social Medicine 26e, p. 737–738; "
                      "Robbins & Cotran Pathology 10e; Harrison's Principles of Internal Medicine 22e (2025, McGraw-Hill)", S))

    return story


# ── MAIN ──────────────────────────────────────────────────────────────────────
def main():
    S = build_styles()

    doc = SimpleDocTemplate(
        OUTPUT_PATH,
        pagesize=A4,
        leftMargin=L_MARGIN,
        rightMargin=R_MARGIN,
        topMargin=T_MARGIN + 8*mm,
        bottomMargin=B_MARGIN + 8*mm,
        title="Nutritional Disorders — BAMS 2nd Prof",
        author="Orris Medical AI",
        subject="BAMS 2nd Professional Compilation",
    )

    story = build_content(S)
    doc.build(story, canvasmaker=NumberedCanvas)
    print(f"PDF generated: {OUTPUT_PATH}")


if __name__ == "__main__":
    main()
Running Command

cd /home/daytona/workspace/nutritional-disorders && python3 generate_pdf.py 2>&1

Editing File

~/nutritional-disorders/generate_pdf.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/nutritional-disorders/generate_pdf.py'
Running Command

cd /home/daytona/workspace/nutritional-disorders && python3 generate_pdf.py 2>&1

Running Command

python3 -c " from pypdf import PdfReader r = PdfReader('/home/daytona/workspace/…

Your PDF is ready - exactly 14 pages as requested.

Nutritional Disorders BAMS 2ndProf

PDF Document · PDF


What's inside the PDF:
PagesContent
1Cover page with topic info + Table of Contents
2Unit 1 - Introduction to Malnutrition (causes table)
3Unit 2 - PEM: SAM, WHO indices, MUAC, Kwashiorkor, Marasmus
4Unit 2 continued - Kwashiorkor vs Marasmus comparison table
5–6Unit 3 - Vitamin A, D (with metabolism pathway table), B1 Beriberi
7–8Unit 3 continued - B2, B3 Pellagra, B6, B12, Folate, Vitamin C Scurvy, K, E
9Unit 4 - Mineral Deficiencies (Iron, Iodine/Cretinism, Zinc, Fluoride)
10Unit 5 - Obesity (BMI classification + complications)
11Unit 6 - Master Vitamin Summary Table (all 11 vitamins)
12–13Unit 7 - Mnemonics + 19-point High-Yield Exam Table
14Unit 8 - Prevention strategies + FAO/WHO PEM prevention guidelines
Formatting features: Dark blue/gold colour scheme, numbered header/footer on every page, colour-coded tables, alternating row shading, and source citations throughout.
This is a shared conversation. Sign in to Orris to start your own chat.