I want to start an opd in yashwantnagar sangli so tell me for which diseases which all medical to give with relastic cases and also which injections to give at opd level for which cases with doses n all everything in detail cover all the point needed for opd and also add for injections which syringes are required and also give me cases in prescriptions form and explain in simple terms for better understanding
India MBBS general OPD common diseases medicines injections doses rural semi-urban practice
MBBS general OPD prescription India common diseases fever diarrhea hypertension diabetes injections doses 2024
https://aiimsrishikesh.edu.in/documents/standard-treatment-g…
Generate a Word document of this OPD guide you can print and keep at your clinic desk
/home/daytona/workspace
mkdir -p /home/daytona/workspace/opd-guide && ls /home/daytona/skills/docx/scripts/office/
~/opd-guide/generate_opd_guide.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
Header, Footer, AlignmentType, HeadingLevel, BorderStyle, WidthType,
ShadingType, VerticalAlign, PageNumber, PageBreak, TabStopType,
TabStopPosition, UnderlineType
} = require('docx');
const fs = require('fs');
// ─── Color Palette ───────────────────────────────────────────────────────────
const COLORS = {
headerBg: "1B4F72", // dark blue
secBg: "2E86C1", // medium blue
subBg: "D6EAF8", // light blue
rxBg: "EAF9E7", // light green
tableBg: "F0F3F4", // light grey
emergency: "C0392B", // red
emBg: "FADBD8", // light red
yellowBg: "FEF9E7", // light yellow
white: "FFFFFF",
black: "000000",
darkText: "1A1A1A",
greyText: "555555",
};
// ─── Helper: Simple paragraph ────────────────────────────────────────────────
function para(text, opts = {}) {
return new Paragraph({
children: [new TextRun({
text,
bold: opts.bold || false,
italics: opts.italic || false,
size: opts.size || 20,
color: opts.color || COLORS.darkText,
font: opts.font || "Calibri",
underline: opts.underline ? { type: UnderlineType.SINGLE } : undefined,
})],
alignment: opts.align || AlignmentType.LEFT,
spacing: { before: opts.spaceBefore || 60, after: opts.spaceAfter || 60 },
indent: opts.indent ? { left: opts.indent } : undefined,
});
}
// ─── Helper: Heading ─────────────────────────────────────────────────────────
function heading1(text) {
return new Paragraph({
children: [new TextRun({
text,
bold: true,
size: 28,
color: COLORS.white,
font: "Calibri",
})],
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 200 },
shading: { fill: COLORS.headerBg, type: ShadingType.SOLID },
});
}
function heading2(text) {
return new Paragraph({
children: [new TextRun({
text,
bold: true,
size: 24,
color: COLORS.white,
font: "Calibri",
})],
alignment: AlignmentType.LEFT,
spacing: { before: 180, after: 100 },
shading: { fill: COLORS.secBg, type: ShadingType.SOLID },
indent: { left: 100 },
});
}
function heading3(text) {
return new Paragraph({
children: [new TextRun({
text,
bold: true,
size: 22,
color: COLORS.secBg,
font: "Calibri",
})],
spacing: { before: 160, after: 80 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: COLORS.secBg } },
});
}
function heading4(text) {
return new Paragraph({
children: [new TextRun({
text,
bold: true,
size: 20,
color: COLORS.darkText,
font: "Calibri",
})],
spacing: { before: 120, after: 60 },
shading: { fill: COLORS.subBg, type: ShadingType.SOLID },
indent: { left: 100 },
});
}
// ─── Helper: Bullet point ────────────────────────────────────────────────────
function bullet(text, level = 0) {
return new Paragraph({
children: [new TextRun({ text, size: 20, font: "Calibri", color: COLORS.darkText })],
bullet: { level },
spacing: { before: 40, after: 40 },
indent: { left: 360 + level * 360 },
});
}
// ─── Helper: Prescription box ────────────────────────────────────────────────
function rxBox(lines) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 8, color: "27AE60" },
bottom: { style: BorderStyle.SINGLE, size: 8, color: "27AE60" },
left: { style: BorderStyle.SINGLE, size: 8, color: "27AE60" },
right: { style: BorderStyle.SINGLE, size: 8, color: "27AE60" },
},
rows: [new TableRow({
children: [new TableCell({
shading: { fill: COLORS.rxBg, type: ShadingType.SOLID },
margins: { top: 100, bottom: 100, left: 150, right: 150 },
children: lines.map(l => new Paragraph({
children: [new TextRun({
text: l,
size: 18,
font: "Courier New",
color: COLORS.darkText,
bold: l.startsWith("Dx:") || l.startsWith("Patient:") || l.startsWith("==="),
})],
spacing: { before: 30, after: 30 },
})),
})],
})],
});
}
// ─── Helper: Standard table ──────────────────────────────────────────────────
function makeTable(headers, rows, headerBg = COLORS.secBg) {
const headerRow = new TableRow({
tableHeader: true,
children: headers.map(h => new TableCell({
shading: { fill: headerBg, type: ShadingType.SOLID },
verticalAlign: VerticalAlign.CENTER,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph({
children: [new TextRun({ text: h, bold: true, size: 19, color: COLORS.white, font: "Calibri" })],
alignment: AlignmentType.CENTER,
})],
})),
});
const dataRows = rows.map((row, ri) => new TableRow({
children: row.map(cell => new TableCell({
shading: { fill: ri % 2 === 0 ? COLORS.white : COLORS.tableBg, type: ShadingType.SOLID },
margins: { top: 60, bottom: 60, left: 120, right: 120 },
verticalAlign: VerticalAlign.CENTER,
children: [new Paragraph({
children: [new TextRun({ text: cell, size: 19, font: "Calibri", color: COLORS.darkText })],
})],
})),
}));
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
bottom: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
left: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
right: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
insideH: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
insideV: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
},
rows: [headerRow, ...dataRows],
});
}
// ─── Helper: Warning / info box ──────────────────────────────────────────────
function infoBox(text, bgColor = COLORS.yellowBg, borderColor = "F39C12") {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 10, color: borderColor },
bottom: { style: BorderStyle.SINGLE, size: 10, color: borderColor },
left: { style: BorderStyle.THICK, size: 20, color: borderColor },
right: { style: BorderStyle.SINGLE, size: 10, color: borderColor },
},
rows: [new TableRow({
children: [new TableCell({
shading: { fill: bgColor, type: ShadingType.SOLID },
margins: { top: 80, bottom: 80, left: 150, right: 150 },
children: [new Paragraph({
children: [new TextRun({ text, size: 19, font: "Calibri", color: COLORS.darkText, bold: false })],
spacing: { before: 30, after: 30 },
})],
})],
})],
});
}
function space(n = 1) {
return Array.from({ length: n }, () => para(""));
}
function pageBreak() {
return new Paragraph({ children: [new TextRun({ break: 1 })] });
}
// ═════════════════════════════════════════════════════════════════════════════
// DOCUMENT CONTENT
// ═════════════════════════════════════════════════════════════════════════════
const children = [];
// ── TITLE PAGE ───────────────────────────────────────────────────────────────
children.push(
para(""),
new Paragraph({
children: [new TextRun({ text: "🏥 OPD CLINIC DESK GUIDE", bold: true, size: 52, color: COLORS.headerBg, font: "Calibri" })],
alignment: AlignmentType.CENTER, spacing: { before: 400, after: 120 },
}),
new Paragraph({
children: [new TextRun({ text: "General Physician • MBBS", bold: true, size: 28, color: COLORS.secBg, font: "Calibri" })],
alignment: AlignmentType.CENTER, spacing: { before: 0, after: 100 },
}),
new Paragraph({
children: [new TextRun({ text: "Yashwantnagar, Sangli, Maharashtra", size: 24, color: COLORS.greyText, font: "Calibri" })],
alignment: AlignmentType.CENTER, spacing: { before: 0, after: 100 },
}),
new Paragraph({
children: [new TextRun({ text: "Mixed Rural / Semi-Urban Population", size: 22, color: COLORS.greyText, font: "Calibri", italics: true })],
alignment: AlignmentType.CENTER, spacing: { before: 0, after: 400 },
}),
makeTable(
["Section", "Topic"],
[
["PART 1", "15 Most Common OPD Diseases"],
["PART 2", "Disease-Wise Prescriptions (12 Cases)"],
["PART 3", "Injection Guide (13 Injections) + Syringe Chart"],
["PART 4", "Emergency Medicines Tray"],
["PART 5", "Dog Bite / Wound Protocol"],
["PART 6", "Antibiotic Quick Reference"],
["PART 7", "OPD Stock Checklist"],
["PART 8", "Prescription Writing Format"],
]
),
...space(2),
pageBreak(),
);
// ── PART 1: COMMON DISEASES ───────────────────────────────────────────────────
children.push(
heading1("PART 1 — 15 MOST COMMON OPD DISEASES"),
para("Based on rural/semi-urban Maharashtra population and seasonal patterns.", { italic: true, color: COLORS.greyText }),
...space(1),
makeTable(
["#", "Disease", "How Common", "Peak Season"],
[
["1", "Fever (Viral / Typhoid / Malaria)", "Very Common", "Monsoon"],
["2", "URTI / Cold / Cough / Sore Throat", "Very Common", "All Year"],
["3", "Acute Gastroenteritis / Diarrhea / Vomiting", "Very Common", "Summer / Monsoon"],
["4", "Hypertension", "Very Common", "All Year"],
["5", "Type 2 Diabetes", "Very Common", "All Year"],
["6", "Urinary Tract Infection (UTI)", "Common", "All Year"],
["7", "Skin Infections (Cellulitis, Boil, Scabies, Fungal)", "Common", "Monsoon"],
["8", "Worm Infestation", "Common", "All Year"],
["9", "Iron Deficiency Anaemia", "Common", "All Year"],
["10", "Asthma / COPD / Wheezing", "Common", "Winter / Dust"],
["11", "Musculoskeletal Pain (Back, Knee, Sprain)", "Common", "All Year"],
["12", "Allergic Rhinitis / Sinusitis", "Common", "Seasonal"],
["13", "Eye Infections (Conjunctivitis)", "Common", "Monsoon"],
["14", "Peptic Ulcer / Acidity / Gastritis", "Common", "All Year"],
["15", "Wound / Abscess / Dog Bite", "Common", "All Year"],
]
),
...space(1),
pageBreak(),
);
// ── PART 2: PRESCRIPTIONS ─────────────────────────────────────────────────────
children.push(heading1("PART 2 — DISEASE-WISE PRESCRIPTIONS"));
// 2.1 Viral Fever
children.push(
...space(1),
heading2("1. FEVER"),
para("Fever > 37.7°C. Check if viral, bacterial, malaria, or typhoid. If fever >3 days or patient looks sick — do CBC, MP smear, Widal.", { italic: true }),
...space(1),
heading4("Rx 1A — Viral Fever (Simple, No Focus Found)"),
rxBox([
"Patient: Ramesh Patil, 32 yrs, Male, Yashwantnagar",
"Dx: Viral Fever",
"-------------------------------------------",
"Rx:",
"1. Tab. Paracetamol 650 mg — 1 tab TDS x 5 days (after food)",
"2. Tab. Cetirizine 10 mg — 1 tab OD at night x 5 days",
"3. Tab. Vitamin C 500 mg — 1 tab BD x 5 days",
"4. ORS Sachet — 1 sachet in 1 litre water, drink frequently",
"",
"Advice: Plenty of fluids, rest, sponging if temp >102°F",
" Return if fever >3 days or rash/rigors appear",
"Follow up: After 3 days",
]),
...space(1),
heading4("Rx 1B — Typhoid Fever (Continuous fever, Widal +ve)"),
rxBox([
"Patient: Sunita Jadhav, 22 yrs, Female",
"Dx: Typhoid Fever (Widal TO 1:160, TH 1:80)",
"-------------------------------------------",
"Rx:",
"1. Tab. Azithromycin 500 mg — 1 tab OD x 7 days (empty stomach)",
" OR Tab. Ciprofloxacin 500 mg — 1 tab BD x 7-10 days (after food)",
"2. Tab. Paracetamol 650 mg — 1 tab TDS x 5 days",
"3. Tab. Ranitidine 150 mg — 1 tab BD x 7 days",
"4. ORS — drink frequently",
"",
"Advice: Soft/liquid diet, boiled water, no raw food, rest",
]),
...space(1),
heading4("Rx 1C — Malaria (Fever + rigors, MP smear +ve)"),
para("P. vivax (most common in Maharashtra):", { bold: true }),
rxBox([
"Tab. Chloroquine 500 mg (base) — Day 1 & 2: 2 tabs | Day 3: 1 tab",
"Tab. Primaquine 15 mg — 1 tab OD x 14 days (prevent relapse)",
"Tab. Paracetamol 650 mg TDS — for fever",
]),
para("P. falciparum:", { bold: true }),
rxBox([
"Tab. Artemether+Lumefantrine (Coartem) — 4 tabs BD x 3 days",
"Tab. Primaquine 45 mg — SINGLE dose on Day 1",
]),
infoBox("⚠️ CAUTION: Never give Primaquine without G6PD screen. Refer complicated malaria (altered sensorium, high parasitemia) to hospital immediately."),
...space(1),
pageBreak(),
);
// 2.2 URTI
children.push(
heading2("2. URTI / COLD / COUGH / SORE THROAT"),
para("Most colds are viral — antibiotics NOT needed. Give symptomatic treatment. Give antibiotic only if bacterial signs (green sputum, fever, pus on tonsils).", { italic: true }),
...space(1),
heading4("Rx 2A — Simple Viral URTI / Common Cold"),
rxBox([
"Patient: Meera Kulkarni, 28 yrs, Female",
"Dx: Viral URTI / Common Cold",
"-------------------------------------------",
"1. Tab. Paracetamol 500 mg — 1 tab TDS x 3 days",
"2. Tab. Cetirizine 10 mg — 1 tab OD at night x 5 days",
"3. Tab. Ambroxol 30 mg — 1 tab TDS x 5 days (loosen mucus)",
"4. Xylometazoline 0.1% nasal drops — 2 drops each nostril TDS x 3 days only",
"",
"Advice: Steam inhalation BD, warm fluids, rest",
]),
...space(1),
heading4("Rx 2B — Bacterial Tonsillitis (Pus on tonsils, high fever)"),
rxBox([
"Patient: Ajay More, 10 yrs, Male",
"Dx: Acute Tonsillitis",
"-------------------------------------------",
"1. Tab. Amoxicillin 250 mg (child) / 500 mg (adult) — TDS x 7 days",
"2. Tab. Paracetamol 250 mg (child) — 1 tab TDS x 5 days",
"3. Tab. Cetirizine 5 mg (child) — 1 tab OD at night x 5 days",
"4. Warm salt water gargle / Betadine gargle — TDS",
"",
"Advice: Complete full antibiotic course to prevent rheumatic fever",
]),
...space(1),
pageBreak(),
);
// 2.3 Gastroenteritis
children.push(
heading2("3. ACUTE GASTROENTERITIS / DIARRHEA / VOMITING"),
para("Diarrhea + vomiting = dehydration. Replace fluids first — ORS is the most important medicine. Antibiotics only if blood in stool or suspected bacterial/amoebic infection.", { italic: true }),
...space(1),
heading4("Rx 3A — Simple Gastroenteritis (No blood in stool, mild dehydration)"),
rxBox([
"Patient: Laxmi Gaikwad, 35 yrs, Female",
"Dx: Acute Gastroenteritis (loose motions x6, vomiting x3)",
"-------------------------------------------",
"1. ORS Sachet (WHO formula) — 1 sachet in 1 litre water",
" Drink 200-400 ml after each loose stool",
"2. Tab. Domperidone 10 mg — 1 tab TDS before food x 3 days",
"3. Tab. Metronidazole 400 mg — 1 tab TDS x 5 days",
"4. Tab. Ondansetron 4 mg — 1 tab SOS if severe vomiting",
"5. Tab. Racecadotril 100 mg — 1 tab TDS x 3 days",
"",
"Advice: Soft diet (khichdi, curd rice), avoid oily/spicy food",
" If unable to take oral — give IV fluids + Inj. Ondansetron (see Part 3)",
]),
...space(1),
pageBreak(),
);
// 2.4 Hypertension
children.push(
heading2("4. HYPERTENSION"),
para("Normal BP < 120/80. HTN Stage 1 = 130-139/80-89. Start medicine if >140/90 persistently, or immediately if >160/100 or with organ damage.", { italic: true }),
...space(1),
heading4("Rx 4A — Newly Diagnosed HTN (No diabetes, age <60 yrs)"),
rxBox([
"Patient: Dashrath Shinde, 48 yrs, Male",
"Dx: Essential Hypertension (BP 158/96 on 3 readings)",
"-------------------------------------------",
"1. Tab. Amlodipine 5 mg — 1 tab OD morning x 30 days",
" (increase to 10 mg if BP still high after 4 weeks)",
"2. Tab. Telmisartan 40 mg — add if Amlodipine alone insufficient",
"3. Tab. Aspirin 75 mg — 1 tab OD after breakfast (if CV risk high)",
"",
"Investigations: RFT, LFT, CBC, ECG, Lipid profile, Urine routine",
"Advice: Low salt diet, no smoking, walk 30 min daily",
"Follow up: 2 weeks with BP diary",
]),
...space(1),
heading4("Rx 4B — HTN + Type 2 Diabetes (Very common combination)"),
rxBox([
"Patient: Kamalbai Patil, 55 yrs, Female",
"Dx: HTN + T2DM",
"BP: 155/92 | FBS: 210 mg/dL | HbA1c: 8.2%",
"-------------------------------------------",
"1. Tab. Telmisartan 40 mg — 1 tab OD morning (protects kidneys)",
"2. Tab. Amlodipine 5 mg — 1 tab OD morning (if BP not controlled)",
"3. Tab. Metformin 500 mg — 1 tab BD after food x 30 days",
" (increase to 1000 mg BD after 2 weeks if tolerated)",
"4. Tab. Glimepiride 1 mg — 1 tab OD 30 min before breakfast",
"5. Tab. Atorvastatin 10 mg — 1 tab at night x 30 days",
"6. Tab. Aspirin 75 mg — 1 tab OD after breakfast",
"",
"Follow up: 4 weeks with FBS, PPBS, BP reading",
]),
...space(1),
pageBreak(),
);
// 2.5 UTI
children.push(
heading2("5. URINARY TRACT INFECTION (UTI)"),
para("Very common in women. Burning micturition, frequency, lower abdominal pain. Do urine routine + culture if recurrent.", { italic: true }),
...space(1),
heading4("Rx 5A — Uncomplicated UTI (Women, no fever)"),
rxBox([
"Patient: Rekha Naik, 30 yrs, Female",
"Dx: Acute Uncomplicated UTI (Urine R/M: pus cells ++)",
"-------------------------------------------",
"1. Tab. Nitrofurantoin 100 mg (MR) — 1 tab BD x 5 days (after food)",
" OR Tab. Norfloxacin 400 mg — 1 tab BD x 5 days",
"2. Tab. Phenazopyridine 100 mg — 1 tab TDS x 2 days (burning relief)",
"3. Tab. Cranberry extract 500 mg — 1 tab OD x 7 days (supportive)",
"",
"Advice: Drink 2-3 litres water daily, do not hold urine",
"Note: If UTI with fever (pyelonephritis) — use Inj. Ceftriaxone 1g OD",
]),
...space(1),
pageBreak(),
);
// 2.6 Skin
children.push(
heading2("6. SKIN INFECTIONS"),
heading4("Rx 6A — Tinea (Ringworm / Fungal)"),
rxBox([
"Patient: Bapu Jadhav, 25 yrs, Male",
"Dx: Tinea Corporis",
"-------------------------------------------",
"1. Cream Clotrimazole 1% — Apply BD x 4 weeks",
" OR Cream Luliconazole 1% — Apply OD x 2 weeks",
"2. Tab. Fluconazole 150 mg — 1 tab once a week x 4 weeks",
" OR Tab. Terbinafine 250 mg — 1 tab OD x 4 weeks",
"",
"Advice: Keep area dry, change clothes daily",
]),
infoBox("⚠️ WARNING: NEVER prescribe steroid-antifungal combination creams (Quadriderm, Panderm) — they worsen fungal infections and cause skin thinning (a very common mistake in rural practice)."),
...space(1),
heading4("Rx 6B — Scabies (Whole family must be treated together)"),
rxBox([
"Patient: Santosh Pawar + Family, Yashwantnagar",
"Dx: Scabies (intense itching at night, webspaces involved)",
"-------------------------------------------",
"TREAT ALL FAMILY MEMBERS ON SAME DAY:",
"1. Lotion Permethrin 5% — Apply neck to toe, leave 8 hrs, wash off",
" Repeat after 1 week (2 applications total)",
" OR Tab. Ivermectin 200 mcg/kg — single dose, repeat after 1 week",
" (Adult 60 kg = 12 mg = 2 tabs of 6 mg)",
"2. Tab. Cetirizine 10 mg — 1 tab OD at night x 7-10 days (itching)",
"",
"Advice: Wash ALL clothes & bedsheets in hot water on treatment day",
]),
...space(1),
heading4("Rx 6C — Cellulitis / Boil (Bacterial skin infection)"),
rxBox([
"Patient: Pramod Kale, 40 yrs, Male",
"Dx: Cellulitis Left Leg (redness, warmth, swelling, fever)",
"-------------------------------------------",
"1. Tab. Amoxicillin-Clavulanate 625 mg — 1 tab TDS x 7 days (after food)",
"2. Tab. Diclofenac 50 mg — 1 tab BD x 5 days (after food)",
"3. Tab. Paracetamol 650 mg — 1 tab TDS x 3-5 days",
"",
"Note: If abscess formed — need Incision & Drainage (I&D)",
" Refer if large or not improving in 48 hours",
]),
...space(1),
pageBreak(),
);
// 2.7 Worms
children.push(
heading2("7. WORM INFESTATION"),
heading4("Rx 7A — Worm Infestation (Children, common in rural areas)"),
rxBox([
"Patient: Priya Deshmukh, 8 yrs, Female",
"Dx: Worm Infestation (perianal itching, poor weight gain)",
"-------------------------------------------",
"1. Tab. Albendazole 400 mg — SINGLE DOSE (children >2 yrs & adults)",
" OR Tab. Mebendazole 500 mg — SINGLE DOSE",
"2. Syrup Iron + Folic Acid — 1 tsp BD x 30 days (for anaemia)",
"3. Tab. Zinc 20 mg — 1 tab OD x 14 days",
"",
"Advice: Wash hands before eating/after toilet, cut nails short,",
" wear footwear, deworm family every 6 months",
]),
...space(1),
pageBreak(),
);
// 2.8 Anaemia
children.push(
heading2("8. IRON DEFICIENCY ANAEMIA"),
heading4("Rx 8A — IDA (Pregnant Woman, Hb 8.2 g/dL)"),
rxBox([
"Patient: Asha Shinde, 25 yrs, Female (Pregnant 16 weeks)",
"Dx: Iron Deficiency Anaemia (Hb 8.2 g/dL, MCV low)",
"-------------------------------------------",
"1. Tab. Ferrous Sulphate 200 mg — 1 tab BD on empty stomach x 90 days",
" OR Tab. Ferrous Ascorbate 100 mg — BD (better tolerated)",
"2. Tab. Folic Acid 5 mg — 1 tab OD x 90 days",
"3. Tab. Vitamin C 500 mg — 1 tab OD with iron (improves absorption)",
"",
"Advice: Eat spinach, jaggery, drumstick, dates",
" Avoid tea/coffee within 1 hour of iron tablet",
" Stool will turn black — this is NORMAL",
"Follow up: CBC after 4 weeks",
]),
...space(1),
pageBreak(),
);
// 2.9 Asthma
children.push(
heading2("9. ASTHMA / WHEEZING"),
para("Asthma = reversible bronchospasm (wheeze, SOB, nocturnal cough). COPD = irreversible (smokers/elderly). Both need bronchodilators. Check SpO2.", { italic: true }),
...space(1),
heading4("Rx 9A — Mild-Moderate Asthma (OPD manageable, SpO2 ≥94%)"),
rxBox([
"Patient: Namdev Patil, 35 yrs, Male",
"Dx: Acute Mild Asthma Exacerbation (SpO2 96%)",
"-------------------------------------------",
"1. Inhaler Salbutamol MDI (Asthalin 100 mcg) — 2 puffs every 4-6 hrs",
"2. Inhaler Budesonide 200 mcg (Budecort) — 2 puffs BD (controller)",
"3. Tab. Montelukast 10 mg — 1 tab OD at night x 30 days",
"4. Tab. Levocetrizine 5 mg — 1 tab OD at night x 10 days",
"",
"If not improving — nebulize with Salbutamol 2.5 mg in 3 ml NS",
"Refer if SpO2 <90% or not responding to nebulization",
]),
...space(1),
pageBreak(),
);
// 2.10 MSK Pain
children.push(
heading2("10. MUSCULOSKELETAL PAIN"),
heading4("Rx 10A — Acute Low Back Pain / Lumbar Spondylosis"),
rxBox([
"Patient: Vishnu More, 52 yrs, Male",
"Dx: Acute Mechanical Low Back Pain",
"-------------------------------------------",
"1. Tab. Diclofenac 50 mg + Paracetamol 325 mg — 1 tab BD-TDS x 5-7 days",
" (ALWAYS after food — never give NSAID on empty stomach)",
"2. Tab. Thiocolchicoside 4 mg — 1 tab BD x 5 days (muscle relaxant)",
"3. Tab. Pantoprazole 40 mg — 1 tab OD before breakfast x 7 days",
" (to protect stomach from NSAID)",
"4. Diclofenac gel 1% — Apply TDS on painful area",
"",
"Advice: Hot fomentation, avoid bending. Physiotherapy after acute phase.",
]),
...space(1),
pageBreak(),
);
// 2.11 Acidity
children.push(
heading2("11. ACIDITY / PEPTIC ULCER DISEASE"),
heading4("Rx 11A — Dyspepsia / Acid Peptic Disease"),
rxBox([
"Patient: Kiran Bhosale, 45 yrs, Male (tea/coffee, smoker)",
"Dx: Peptic Ulcer Disease",
"-------------------------------------------",
"1. Tab. Pantoprazole 40 mg — 1 tab OD 30 min before breakfast x 4-8 wks",
"2. Tab. Domperidone 10 mg — 1 tab TDS before food x 2 weeks",
"3. Antacid syrup (Gelusil) — 2 tsp TDS after food + at bedtime",
"",
"If H. pylori suspected (recurrent ulcer) — Triple Therapy x 14 days:",
" Tab. Amoxicillin 1000 mg BD",
" Tab. Clarithromycin 500 mg BD",
" Tab. Omeprazole 20 mg BD",
"",
"Advice: Avoid tea/coffee/spicy food, eat on time, stop NSAIDs",
]),
...space(1),
pageBreak(),
);
// 2.12 Conjunctivitis
children.push(
heading2("12. CONJUNCTIVITIS (Monsoon season, very contagious)"),
heading4("Rx 12A — Acute Bacterial Conjunctivitis"),
rxBox([
"Patient: Ram Patil, 14 yrs, Male",
"Dx: Acute Bacterial Conjunctivitis (mucopurulent discharge, red eye)",
"-------------------------------------------",
"1. Eye drops Moxifloxacin 0.5% (Moxicip) — 1 drop each eye QID x 5 days",
" OR Chloramphenicol 0.5% eye drops — 1-2 drops QID x 5 days",
"2. Chloramphenicol eye ointment — apply at bedtime x 5 days",
"3. Tab. Cetirizine 5 mg — OD at night x 5 days",
"",
"Advice: Do NOT share towels. Wash hands frequently.",
" Very contagious — avoid school for 2-3 days.",
]),
...space(1),
pageBreak(),
);
// ── PART 3: INJECTIONS ────────────────────────────────────────────────────────
children.push(heading1("PART 3 — INJECTION GUIDE + SYRINGE CHART"));
children.push(
...space(1),
heading2("INJECTION QUICK REFERENCE TABLE"),
makeTable(
["Injection", "Dose", "Route", "Syringe", "Use"],
[
["Diclofenac (Voveran) 75 mg", "75 mg (1 ampoule)", "Deep IM", "5 ml + 21G", "Severe pain, renal colic"],
["Ondansetron (Emset) 4 mg", "4-8 mg", "IV slow / IM","5 ml + 22G", "Severe vomiting"],
["Metoclopramide (Perinorm) 10mg","10 mg", "IV slow / IM","5 ml + 22G", "Nausea / vomiting"],
["Dexamethasone 4 mg", "4-8 mg", "IV / IM", "5 ml", "Allergy, asthma, severe vomiting"],
["Hydrocortisone 100 mg", "100-200 mg", "IV slow", "10 ml", "Anaphylaxis, severe asthma (EMERGENCY)"],
["Adrenaline 1 mg/ml", "0.3-0.5 mg", "IM outer thigh","1 ml + 23G", "ANAPHYLAXIS — GIVE FIRST"],
["Ceftriaxone 1 gm", "1 gm OD-BD", "IM (with Ligno) / IV drip","5 ml IM / IV line","Severe UTI, typhoid, cellulitis, pneumonia"],
["Ranitidine / Pantoprazole IV","Pan 40 mg", "IV over 15 min","10 ml", "Acute gastritis, GI bleed"],
["Tetanus Toxoid (TT) 0.5 ml", "0.5 ml", "IM deltoid", "2 ml + 23G", "Any wound / dog bite (prevention)"],
["Avil (Chlorpheniramine) 25 mg","25 mg", "IM / slow IV","2 ml + 23G", "Allergic reaction, urticaria"],
["Diazepam 10 mg", "10 mg", "IV very slow","5 ml", "Active seizure"],
["Lignocaine 2%", "1-3 ml infiltrate", "Local infiltration","5 ml + 25G","Wound suturing, abscess I&D"],
["Promethazine (Phenergan) 25 mg","25 mg", "IM", "2 ml + 23G", "Dystonic reaction antidote, vomiting"],
]
),
...space(1),
);
// Injection details
children.push(
heading3("Detailed Notes on Key Injections"),
...space(1),
heading4("Inj. Adrenaline — MOST IMPORTANT EMERGENCY INJECTION"),
para("Signs of Anaphylaxis: Severe rash + breathlessness + BP drop within minutes of injection/drug/food."),
bullet("STEP 1: Stop the offending agent immediately"),
bullet("STEP 2: Inj. Adrenaline 0.5 mg IM outer thigh — GIVE FIRST, do not delay"),
bullet("STEP 3: Inj. Hydrocortisone 200 mg IV"),
bullet("STEP 4: Inj. Avil (Chlorpheniramine) 25 mg IM"),
bullet("STEP 5: IV fluids if BP low. Call ambulance for hospital transfer."),
infoBox("⚠️ ADRENALINE + HYDROCORTISONE must be accessible in every OPD at all times — not locked in a cabinet.", COLORS.emBg, COLORS.emergency),
...space(1),
heading4("Inj. Ceftriaxone — How to Give"),
para("For IM injection:", { bold: true }),
bullet("Dissolve 1 gm powder in 2-3 ml of Lignocaine 1% solution (reduces pain)"),
bullet("Use 5 ml syringe + 21G needle, inject deep IM in upper outer gluteus"),
para("For IV drip:", { bold: true }),
bullet("Dissolve 1 gm in 10 ml NS first, then add to 100 ml NS bag"),
bullet("Give over 30 minutes. Always ask about penicillin allergy before giving."),
...space(1),
heading4("Inj. Diclofenac — Important Rules"),
bullet("NEVER give IV — can cause cardiac arrest"),
bullet("NEVER give in renal failure or peptic ulcer patients"),
bullet("Always give deep IM, not SC"),
bullet("Do not give more than 2 times per day (150 mg/day maximum)"),
...space(1),
heading4("Inj. Diazepam (Seizure protocol)"),
bullet("Give 10 mg IV SLOWLY over 2-3 minutes — fast IV can stop breathing"),
bullet("Keep bag-mask ventilation ready"),
bullet("If IV not available — give 10-20 mg per rectum (PR) using a small syringe without needle"),
bullet("After seizure — call ambulance for hospital transfer"),
...space(1),
heading3("IV Fluids Guide"),
makeTable(
["Fluid", "Use", "Rate"],
[
["Ringer Lactate (RL) 500 ml", "Dehydration, diarrhea, vomiting, trauma", "500 ml over 2-4 hours"],
["Normal Saline (NS) 0.9%", "Dehydration, drug dilution", "500 ml over 2-4 hours"],
["DNS (Dextrose Normal Saline)","Dehydration + hypoglycemia", "500 ml over 2-4 hours"],
["D5 (5% Dextrose)", "Hypoglycemia (low blood sugar)", "100-200 ml over 30 min"],
]
),
infoBox("Simple Rule: Give 1-2 bottles (500-1000 ml) over 2-4 hours to any clinically dehydrated patient (dry tongue, sunken eyes, reduced urine) before sending to hospital."),
...space(1),
pageBreak(),
);
// Syringe chart
children.push(
heading2("SYRINGE & NEEDLE GUIDE"),
makeTable(
["Syringe Size", "Needle Gauge", "Hub Color", "Best Use"],
[
["1 ml (insulin)", "26-28G", "Orange", "Insulin, Adrenaline (emergency), Intradermal (ATS test)"],
["2 ml", "23-25G", "Blue / Orange","Vaccines (TT, Hep B), Avil, small IM injections"],
["5 ml", "21-23G", "Green / Black","Diclofenac IM, Ondansetron, Ceftriaxone IM, Lignocaine"],
["10 ml", "21G", "Green", "Hydrocortisone IV reconstitution, Pantoprazole IV"],
["20 ml", "18-20G", "Pink / White", "Blood withdrawal, large volume mixing"],
["IV Cannula 18G", "—", "Green", "IV fluids for adults, fast infusion"],
["IV Cannula 20G", "—", "Pink", "IV fluids, IV drugs (most common use)"],
["IV Cannula 22G", "—", "Blue", "IV access in children, elderly, thin veins"],
["IV Cannula 24G", "—", "Yellow", "Infants, very fragile veins"],
]
),
...space(1),
infoBox("Quick Rule — IM: 5 ml + 21G (green) | IV: cannula or 10 ml + 21G | Intradermal: 1 ml + 26G | Vaccine: 2 ml + 23G | Local anaesthesia: 5 ml + 25G (fine orange — less pain)"),
...space(1),
pageBreak(),
);
// ── PART 4: EMERGENCY TRAY ────────────────────────────────────────────────────
children.push(
heading1("PART 4 — EMERGENCY MEDICINES TRAY"),
para("Keep these READY and ACCESSIBLE at all times. These are for life-saving emergencies.", { bold: true, color: COLORS.emergency }),
...space(1),
makeTable(
["Medicine / Item", "Why You Need It", "Location"],
[
["Inj. Adrenaline 1 mg/ml (x3)", "Anaphylaxis — give FIRST", "Accessible drawer"],
["Inj. Hydrocortisone 100 mg (x3)", "Anaphylaxis / severe asthma", "Accessible drawer"],
["Inj. Avil (Chlorpheniramine) 25 mg", "Allergic reaction", "Accessible drawer"],
["Inj. Diazepam 10 mg (x2)", "Active seizure", "Accessible drawer"],
["IV fluid RL 500 ml (x2)", "Shock, dehydration", "Drip stand area"],
["IV fluid NS 500 ml (x2)", "Drug dilution, dehydration", "Drip stand area"],
["IV Cannula 18G, 20G, 22G (x3 each)", "IV access for emergencies", "Procedure tray"],
["Inj. Atropine 0.6 mg (x2)", "Bradycardia, organophosphate poisoning", "Accessible drawer"],
["Nebulizer + Salbutamol 2.5 mg/2.5 ml","Severe asthma attack", "OPD corner"],
["Glucometer + glucose strips", "Hypoglycemia / diabetic emergency", "Accessible"],
["Oxygen cylinder with mask", "Hypoxia in any emergency", "OPD corner"],
["Bag-Valve Mask (Ambu bag)", "Respiratory arrest backup", "Accessible"],
["Inj. Dexamethasone 4 mg (x2)", "Anaphylaxis, severe inflammation", "Accessible drawer"],
]
),
...space(1),
pageBreak(),
);
// ── PART 5: DOG BITE ──────────────────────────────────────────────────────────
children.push(
heading1("PART 5 — DOG BITE / WOUND PROTOCOL"),
...space(1),
heading2("Dog Bite Categories"),
makeTable(
["Category", "Type of Exposure", "Action Required"],
[
["Category I", "Touching/feeding animal, licks on intact skin", "Wash hands. No vaccine needed."],
["Category II", "Nibbling uncovered skin, minor scratches without blood", "Wound care + Rabies vaccine (5 doses)"],
["Category III", "Transdermal bites, scratches, licks on broken skin, mucosa, eye contact", "Wound care + Rabies vaccine + RIG (Rabies Immunoglobulin)"],
]
),
...space(1),
heading4("Rx — Category III Dog Bite (Most common presenting case)"),
rxBox([
"Patient: Santosh, 28 yrs, Male",
"Bite: Stray dog, lower leg, 2 puncture wounds",
"-------------------------------------------",
"IMMEDIATE STEPS:",
"Step 1: Wash wound — running water + soap x 15 minutes IMMEDIATELY",
"Step 2: Apply Betadine (Povidone Iodine) solution",
"Step 3: DO NOT stitch a dog bite wound (traps rabies virus inside)",
"",
"Rx:",
"1. Rabies Vaccine (HDCV/PCECV) 1 ml IM in DELTOID",
" Give on: Day 0, Day 3, Day 7, Day 14, Day 28 (5 doses total)",
" Syringe: 2 ml + 23G needle",
"",
"2. Rabies Immunoglobulin (RIG) — Category III only, Day 0 only",
" Dose: 20 IU/kg body weight",
" Infiltrate maximum amount around wound, remainder IM elsewhere",
"",
"3. Inj. TT 0.5 ml IM deltoid (tetanus prophylaxis)",
"",
"4. Tab. Amoxicillin-Clavulanate 625 mg — 1 tab TDS x 5 days",
"5. Tab. Metronidazole 400 mg — 1 tab TDS x 5 days",
"6. Tab. Ibuprofen 400 mg — 1 tab TDS x 3 days",
"",
"CRITICAL: Do NOT miss any rabies vaccine dose once started.",
" No second chance after rabies symptoms appear.",
]),
...space(1),
pageBreak(),
);
// ── PART 6: ANTIBIOTIC QUICK REF ─────────────────────────────────────────────
children.push(
heading1("PART 6 — ANTIBIOTIC QUICK REFERENCE"),
...space(1),
makeTable(
["Infection", "First Choice", "Alternative", "Duration"],
[
["Throat / Tonsillitis", "Amoxicillin 500 mg TDS", "Azithromycin 500 mg OD", "7 days"],
["Chest (LRTI / Pneumonia)", "Amoxicillin-Clavulanate 625 mg TDS", "Azithromycin 500 mg OD", "7-10 days"],
["UTI (uncomplicated)", "Nitrofurantoin 100 mg BD", "Norfloxacin 400 mg BD", "5 days"],
["UTI with fever (Pyelonephritis)","Ceftriaxone 1 gm IM/IV OD", "Ciprofloxacin 500 mg BD", "7-14 days"],
["Typhoid", "Azithromycin 500 mg OD", "Ciprofloxacin 500 mg BD", "7-10 days"],
["Cellulitis / Boil", "Amoxicillin-Clavulanate 625 mg TDS", "Clindamycin 300 mg TDS", "7 days"],
["Wound infection", "Amoxicillin-Clavulanate 625 mg TDS", "Cefalexin 500 mg QID", "5-7 days"],
["Gastroenteritis (bacterial)", "Metronidazole 400 mg TDS", "Tinidazole 500 mg BD", "5 days"],
["Dog bite (wound)", "Amoxicillin-Clavulanate 625 mg TDS", "Ciprofloxacin + Metronidazole","5-7 days"],
]
),
...space(1),
infoBox("RATIONAL ANTIBIOTIC USE: Do NOT give antibiotics for simple viral URTI/common cold. Most upper respiratory infections are viral. Overuse of antibiotics causes drug resistance. Always ask about drug allergy before prescribing."),
...space(1),
pageBreak(),
);
// ── PART 7: STOCK CHECKLIST ───────────────────────────────────────────────────
children.push(
heading1("PART 7 — OPD STOCK CHECKLIST"),
...space(1),
heading2("TABLETS / CAPSULES — Must Always Have"),
makeTable(
["Drug", "Strength", "Category"],
[
["Paracetamol", "500 mg, 650 mg", "Antipyretic / Analgesic"],
["Ibuprofen", "400 mg", "NSAID"],
["Diclofenac", "50 mg", "NSAID"],
["Diclofenac + Paracetamol", "50+325 mg", "Combination analgesic"],
["Thiocolchicoside", "4 mg", "Muscle relaxant"],
["Cetirizine", "10 mg", "Antihistamine"],
["Levocetirizine", "5 mg", "Antihistamine"],
["Amoxicillin", "500 mg", "Antibiotic"],
["Amoxicillin-Clavulanate", "625 mg", "Antibiotic"],
["Azithromycin", "500 mg", "Antibiotic"],
["Ciprofloxacin", "500 mg", "Antibiotic"],
["Norfloxacin", "400 mg", "Antibiotic (UTI)"],
["Nitrofurantoin (MR)", "100 mg", "Antibiotic (UTI)"],
["Metronidazole", "400 mg", "Antiprotozoal"],
["Fluconazole", "150 mg", "Antifungal"],
["Terbinafine", "250 mg", "Antifungal"],
["Albendazole", "400 mg", "Antihelminthic"],
["Chloroquine", "250 mg", "Antimalarial"],
["Primaquine", "7.5 mg, 15 mg", "Antimalarial"],
["Omeprazole", "20 mg", "PPI"],
["Pantoprazole", "40 mg", "PPI"],
["Domperidone", "10 mg", "Prokinetic / Antiemetic"],
["Ondansetron", "4 mg, 8 mg", "Antiemetic"],
["Amlodipine", "5 mg, 10 mg", "Antihypertensive"],
["Telmisartan", "40 mg, 80 mg", "Antihypertensive"],
["Atenolol", "50 mg", "Antihypertensive (beta-blocker)"],
["Metformin", "500 mg, 1000 mg", "Antidiabetic"],
["Glimepiride", "1 mg, 2 mg", "Antidiabetic"],
["Atorvastatin", "10 mg, 20 mg", "Statin"],
["Aspirin", "75 mg", "Antiplatelet"],
["Ferrous Sulphate", "200 mg", "Iron supplement"],
["Folic Acid", "5 mg", "Vitamin"],
["Vitamin C", "500 mg", "Vitamin"],
["Ivermectin", "6 mg", "Antiparasitic (scabies)"],
["Montelukast", "10 mg", "Antiasthma"],
]
),
...space(1),
heading2("INJECTIONS — Must Always Have"),
makeTable(
["Injection", "Strength", "Purpose"],
[
["Adrenaline", "1 mg/ml ampoule", "EMERGENCY — Anaphylaxis"],
["Hydrocortisone", "100 mg vial", "EMERGENCY — Anaphylaxis/Asthma"],
["Avil (Chlorphen.)", "25 mg ampoule", "Allergic reaction"],
["Diazepam", "10 mg/2 ml", "Seizure"],
["Diclofenac", "75 mg/3 ml ampoule", "Pain"],
["Ondansetron", "4 mg/2 ml", "Vomiting"],
["Metoclopramide", "10 mg/2 ml", "Vomiting"],
["Dexamethasone", "4 mg/ml", "Allergy, asthma"],
["Ceftriaxone", "1 gm dry powder vial","Severe infections"],
["Pantoprazole", "40 mg vial", "IV Gastritis/GI bleed"],
["TT (Tetanus Toxoid)","0.5 ml/dose", "Wound prophylaxis"],
["Lignocaine", "2% injection", "Local anaesthesia"],
["Atropine", "0.6 mg ampoule", "Bradycardia, OP poisoning"],
["IV NS 500 ml", "Bottle", "Dehydration, drug dilution"],
["IV RL 500 ml", "Bottle", "Dehydration"],
["IV DNS 500 ml", "Bottle", "Dehydration + hypoglycemia"],
]
),
...space(1),
heading2("TOPICALS / OTHERS"),
makeTable(
["Item", "Use"],
[
["ORS sachets (WHO formula)", "Diarrhea / dehydration"],
["Betadine (Povidone Iodine) solution","Wound cleaning"],
["Clotrimazole cream 1%", "Fungal infection"],
["Permethrin 5% lotion", "Scabies"],
["Xylometazoline 0.1% nasal drops", "Nasal congestion"],
["Moxifloxacin 0.5% eye drops", "Conjunctivitis"],
["Salbutamol nebulization solution", "Asthma / wheeze"],
["Antacid syrup (Gelusil / Digene)", "Acidity"],
]
),
...space(1),
pageBreak(),
);
// ── PART 8: PRESCRIPTION FORMAT ───────────────────────────────────────────────
children.push(
heading1("PART 8 — LEGAL PRESCRIPTION FORMAT"),
...space(1),
heading3("Every Prescription Must Have:"),
bullet("Doctor's name, MBBS degree, NMC/MCI registration number"),
bullet("Clinic name, full address, phone number"),
bullet("Patient name, age, sex, date"),
bullet("Diagnosis or presenting complaint"),
bullet("Drug name (generic preferred), dose, frequency, route, duration"),
bullet("Doctor's signature"),
...space(1),
heading4("Sample Prescription Header Template"),
rxBox([
"Dr. _________________________, MBBS",
"NMC Reg No: _________________",
"Clinic: _____________________, Yashwantnagar, Sangli",
"Ph: _________________________",
"======================================",
"Date: ___________",
"Patient: _________________ Age: ___ Sex: ___",
"Wt: ___ BP: ___ Temp: ___",
"",
"Dx: ___________________________",
"",
"Rx",
"1.",
"2.",
"3.",
"",
"Advice: ________________________",
"Follow up: ___________________",
"",
"Signature: _____________________",
]),
...space(1),
heading3("Prescription Abbreviations"),
makeTable(
["Abbreviation", "Meaning", "Abbreviation", "Meaning"],
[
["OD", "Once daily", "AC", "Before food"],
["BD", "Twice daily", "PC", "After food"],
["TDS", "Three times daily", "HS", "At bedtime"],
["QID", "Four times daily", "SOS", "As needed"],
["IM", "Intramuscular", "IV", "Intravenous"],
["SC", "Subcutaneous", "ID", "Intradermal"],
["MDI", "Metered dose inhaler","PR", "Per rectum"],
["MR", "Modified release", "SR", "Sustained release"],
]
),
...space(2),
);
// ── FOOTER DISCLAIMER ─────────────────────────────────────────────────────────
children.push(
new Paragraph({
children: [new TextRun({
text: "DISCLAIMER: This guide is based on AIIMS Standard Treatment Guidelines, WHO Essential Medicines List, and established Indian clinical practice for MBBS-level general OPD. Always apply clinical judgment for individual patients. Verify all drug doses before administration, especially in pediatric, elderly, pregnant, and renally impaired patients. Refer cases beyond OPD level to a higher centre promptly.",
size: 16, italics: true, color: COLORS.greyText, font: "Calibri",
})],
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 100 },
border: { top: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" } },
}),
);
// ═════════════════════════════════════════════════════════════════════════════
// BUILD DOCUMENT
// ═════════════════════════════════════════════════════════════════════════════
const doc = new Document({
creator: "OPD Clinic Guide Generator",
title: "OPD Clinic Desk Guide — Yashwantnagar, Sangli",
description: "Complete MBBS General Physician OPD Guide",
styles: {
default: {
document: {
run: { font: "Calibri", size: 20, color: COLORS.darkText },
},
},
},
sections: [{
properties: {
page: {
margin: { top: 720, bottom: 720, left: 900, right: 900 },
},
},
headers: {
default: new Header({
children: [new Paragraph({
children: [
new TextRun({ text: "OPD Clinic Desk Guide | Dr. _________________, MBBS | Yashwantnagar, Sangli", size: 16, color: COLORS.greyText, font: "Calibri" }),
],
alignment: AlignmentType.CENTER,
border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" } },
})],
}),
},
footers: {
default: new Footer({
children: [new Paragraph({
children: [
new TextRun({ text: "Page ", size: 16, color: COLORS.greyText }),
new TextRun({ children: [PageNumber.CURRENT], size: 16, color: COLORS.greyText }),
new TextRun({ text: " of ", size: 16, color: COLORS.greyText }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, color: COLORS.greyText }),
new TextRun({ text: " | For clinical reference only — verify doses before prescribing", size: 16, color: COLORS.greyText }),
],
alignment: AlignmentType.CENTER,
})],
}),
},
children,
}],
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/opd-guide/OPD_Clinic_Desk_Guide_Sangli.docx", buffer);
console.log("SUCCESS: Document created at /home/daytona/workspace/opd-guide/OPD_Clinic_Desk_Guide_Sangli.docx");
}).catch(err => {
console.error("ERROR:", err);
process.exit(1);
});
cd /home/daytona/workspace/opd-guide && node generate_opd_guide.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/opd-guide/OPD_Clinic_Desk_Guide_Sangli.docx 2>&1
ls -lh /home/daytona/workspace/opd-guide/OPD_Clinic_Desk_Guide_Sangli.docx && python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/opd-guide/OPD_Clinic_Desk_Guide_Sangli.docx'); print('Valid ZIP/DOCX, files:', z.namelist()[:8])"
OPD Clinic Desk Guide Sangli
Word Document · DOCX
Great now give me same in prescription format for type 2 diabetes for different scenarios with real cases
India RSSDI ADA 2024 type 2 diabetes treatment guidelines oral hypoglycemic agents insulin doses scenarios
Great now give me same in prescription format for type 2 diabetes for different scenarios with real cases
~/opd-guide/generate_diabetes_guide.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
Header, Footer, AlignmentType, BorderStyle, WidthType,
ShadingType, VerticalAlign, PageNumber, UnderlineType
} = require('docx');
const fs = require('fs');
// ─── Color Palette ────────────────────────────────────────────────────────────
const C = {
navyBg: "1A3A5C", // deep navy - title / part headers
blueBg: "2471A3", // medium blue - section headers
tealBg: "117A65", // teal - scenario headers
lightBlue: "D6EAF8", // light blue - info boxes
lightGreen:"E9F7EF", // light green - Rx boxes
lightYellow:"FEF9E7", // light yellow - advice / tip boxes
redBg: "FADBD8", // light red - warnings
darkRed: "C0392B", // red text
tableAlt: "F2F3F4", // alternating table row
white: "FFFFFF",
nearBlack: "1C1C1C",
grey: "5D6D7E",
tealText: "0E6655",
blueText: "1A5276",
};
// ─── Helpers ──────────────────────────────────────────────────────────────────
const sp = (n = 1) => Array.from({ length: n }, () => new Paragraph({ children: [new TextRun("")], spacing: { before: 0, after: 0 } }));
function txt(text, opts = {}) {
return new TextRun({
text,
bold: opts.bold || false,
italics: opts.italic || false,
size: opts.size || 20,
color: opts.color || C.nearBlack,
font: opts.font || "Calibri",
underline: opts.ul ? { type: UnderlineType.SINGLE } : undefined,
});
}
function para(text, opts = {}) {
return new Paragraph({
children: Array.isArray(text)
? text
: [txt(text, opts)],
alignment: opts.align || AlignmentType.LEFT,
spacing: { before: opts.before || 60, after: opts.after || 60 },
indent: opts.indent ? { left: opts.indent } : undefined,
shading: opts.bg ? { fill: opts.bg, type: ShadingType.SOLID } : undefined,
border: opts.borderBottom ? { bottom: { style: BorderStyle.SINGLE, size: 6, color: opts.borderBottom } } : undefined,
});
}
function bullet(text, level = 0, opts = {}) {
return new Paragraph({
children: [txt(text, { size: 19, ...opts })],
bullet: { level },
spacing: { before: 30, after: 30 },
indent: { left: 360 + level * 360, hanging: 260 },
});
}
// Section title (full-width colored band)
function h1(text) {
return new Paragraph({
children: [txt(text, { bold: true, size: 30, color: C.white })],
alignment: AlignmentType.CENTER,
spacing: { before: 240, after: 200 },
shading: { fill: C.navyBg, type: ShadingType.SOLID },
});
}
function h2(text) {
return new Paragraph({
children: [txt(" " + text, { bold: true, size: 24, color: C.white })],
alignment: AlignmentType.LEFT,
spacing: { before: 200, after: 120 },
shading: { fill: C.blueBg, type: ShadingType.SOLID },
});
}
function h3(text) {
return new Paragraph({
children: [txt(" " + text, { bold: true, size: 22, color: C.white })],
alignment: AlignmentType.LEFT,
spacing: { before: 160, after: 100 },
shading: { fill: C.tealBg, type: ShadingType.SOLID },
});
}
function h4(text) {
return new Paragraph({
children: [txt(text, { bold: true, size: 20, color: C.blueText })],
spacing: { before: 140, after: 60 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: C.blueBg } },
});
}
// Prescription box (green border, monospace feel)
function rxBox(lines) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 12, color: "1E8449" },
bottom: { style: BorderStyle.SINGLE, size: 12, color: "1E8449" },
left: { style: BorderStyle.THICK, size: 20, color: "1E8449" },
right: { style: BorderStyle.SINGLE, size: 6, color: "1E8449" },
insideH:{ style: BorderStyle.NONE, size: 0, color: C.white },
insideV:{ style: BorderStyle.NONE, size: 0, color: C.white },
},
rows: [new TableRow({
children: [new TableCell({
shading: { fill: C.lightGreen, type: ShadingType.SOLID },
margins: { top: 120, bottom: 120, left: 200, right: 200 },
children: lines.map(l => new Paragraph({
children: [new TextRun({
text: l,
size: l.startsWith("===") || l.startsWith("---") ? 18 : 19,
font: "Courier New",
color: l.startsWith("Dx:") ? C.tealText
: l.startsWith("Patient:") ? C.blueText
: l.startsWith("Rx") ? "1A5276"
: l.startsWith("===") || l.startsWith("---") ? C.grey
: C.nearBlack,
bold: l.startsWith("Dx:") || l.startsWith("Rx") || l.startsWith("Patient:"),
})],
spacing: { before: 28, after: 28 },
})),
})],
})],
});
}
// Info / advice box
function infoBox(label, text, bg = C.lightYellow, borderColor = "F39C12") {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 6, color: borderColor },
bottom: { style: BorderStyle.SINGLE, size: 6, color: borderColor },
left: { style: BorderStyle.THICK, size: 24, color: borderColor },
right: { style: BorderStyle.SINGLE, size: 6, color: borderColor },
insideH:{ style: BorderStyle.NONE, size: 0, color: C.white },
insideV:{ style: BorderStyle.NONE, size: 0, color: C.white },
},
rows: [new TableRow({
children: [new TableCell({
shading: { fill: bg, type: ShadingType.SOLID },
margins: { top: 100, bottom: 100, left: 180, right: 180 },
children: [
...(label ? [new Paragraph({ children: [txt(label, { bold: true, size: 19, color: borderColor })], spacing: { before: 20, after: 20 } })] : []),
new Paragraph({ children: [txt(text, { size: 19 })], spacing: { before: 20, after: 20 } }),
],
})],
})],
});
}
function warningBox(text) {
return infoBox("⚠ WARNING", text, C.redBg, C.darkRed);
}
function tipBox(text) {
return infoBox("💡 CLINICAL TIP", text, C.lightBlue, C.blueBg);
}
function makeTable(headers, rows) {
const hRow = new TableRow({
tableHeader: true,
children: headers.map(h => new TableCell({
shading: { fill: C.blueBg, type: ShadingType.SOLID },
verticalAlign: VerticalAlign.CENTER,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [para(h, { bold: true, size: 19, color: C.white, align: AlignmentType.CENTER })],
})),
});
const dRows = rows.map((row, ri) => new TableRow({
children: row.map(cell => new TableCell({
shading: { fill: ri % 2 === 0 ? C.white : C.tableAlt, type: ShadingType.SOLID },
margins: { top: 60, bottom: 60, left: 120, right: 120 },
verticalAlign: VerticalAlign.CENTER,
children: [new Paragraph({ children: [txt(cell, { size: 18 })], spacing: { before: 20, after: 20 } })],
})),
}));
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
bottom: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
left: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
right: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" },
insideH:{ style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
insideV:{ style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
},
rows: [hRow, ...dRows],
});
}
function pageBreak() {
return new Paragraph({ children: [new TextRun({ break: 1 })] });
}
// ═════════════════════════════════════════════════════════════════════════════
// DOCUMENT CONTENT
// ═════════════════════════════════════════════════════════════════════════════
const children = [];
// ── COVER ─────────────────────────────────────────────────────────────────────
children.push(
...sp(2),
new Paragraph({
children: [txt("TYPE 2 DIABETES MELLITUS", { bold: true, size: 56, color: C.navyBg })],
alignment: AlignmentType.CENTER, spacing: { before: 300, after: 100 },
}),
new Paragraph({
children: [txt("Complete Prescription Guide — Real Clinical Scenarios", { bold: true, size: 28, color: C.blueBg })],
alignment: AlignmentType.CENTER, spacing: { before: 0, after: 100 },
}),
new Paragraph({
children: [txt("OPD Desk Reference | Yashwantnagar, Sangli, Maharashtra", { size: 22, color: C.grey, italics: true })],
alignment: AlignmentType.CENTER, spacing: { before: 0, after: 60 },
}),
new Paragraph({
children: [txt("MBBS General Physician | Based on RSSDI 2022 + ADA 2024 Guidelines", { size: 20, color: C.grey })],
alignment: AlignmentType.CENTER, spacing: { before: 0, after: 300 },
}),
makeTable(
["#", "Scenario / Case"],
[
["1", "Newly Diagnosed T2DM — Mild (Diet + Metformin only)"],
["2", "Moderate T2DM — Dual Oral Therapy (Metformin + Glimepiride)"],
["3", "T2DM + Hypertension — Triple Oral Therapy"],
["4", "T2DM + Obesity — SGLT2 Inhibitor / GLP-1 Based Therapy"],
["5", "Elderly Patient — Cautious Therapy (Low Hypoglycemia Risk)"],
["6", "T2DM + CKD (Kidney Disease) — Dose-Adjusted Therapy"],
["7", "T2DM + Cardiac Disease (Heart Failure / IHD)"],
["8", "Poorly Controlled T2DM — Starting Insulin (Basal Insulin)"],
["9", "T2DM on Insulin — Full Basal-Bolus Regimen"],
["10", "Hypoglycemia in T2DM — Emergency Management"],
]
),
...sp(2),
pageBreak(),
);
// ── DRUG REFERENCE TABLE ──────────────────────────────────────────────────────
children.push(
h1("QUICK DRUG REFERENCE — T2DM ORAL AGENTS"),
...sp(1),
makeTable(
["Drug Class", "Example Drug", "Dose Range", "HbA1c Reduction", "Main Caution"],
[
["Biguanide", "Metformin 500/1000 mg", "500–2000 mg/day in 2 doses", "1.0–2.0%", "Avoid if eGFR <30, hold before contrast"],
["Sulfonylurea (SU)", "Glimepiride 1/2/4 mg", "1–8 mg OD before breakfast", "1.0–2.5%", "Hypoglycemia, weight gain"],
["SU", "Glipizide 5/10 mg", "2.5–20 mg/day", "1.0–2.0%", "Hypoglycemia, weight gain"],
["DPP-4 Inhibitor", "Sitagliptin 100 mg", "100 mg OD", "0.5–0.8%", "Pancreatitis (rare); safe in elderly"],
["DPP-4 Inhibitor", "Vildagliptin 50 mg", "50 mg BD", "0.5–0.8%", "Safe in CKD (dose adjust)"],
["SGLT2 Inhibitor", "Dapagliflozin 10 mg", "10 mg OD", "0.8–1.2%", "UTI/genital infection, DKA (rare)"],
["SGLT2 Inhibitor", "Empagliflozin 10/25 mg", "10–25 mg OD", "0.8–1.2%", "Heart & kidney protective"],
["TZD", "Pioglitazone 15/30/45 mg", "15–45 mg OD", "0.5–1.0%", "Fluid retention, avoid in heart failure"],
["Alpha-glucosidase", "Voglibose 0.2/0.3 mg", "0.2–0.3 mg TDS with meals", "0.5–0.8%", "Flatulence, GI discomfort"],
["Basal Insulin", "Insulin Glargine (Lantus)", "0.1–0.2 U/kg at bedtime", "1.5–3.5%", "Hypoglycemia — titrate slowly"],
["Basal Insulin", "Insulin Degludec (Tresiba)", "0.1–0.2 U/kg OD", "1.5–3.5%", "Less nocturnal hypoglycemia vs Glargine"],
["Premix Insulin", "Insulin 30/70 (Humulin 30/70)","0.3–0.5 U/kg/day in 2 doses", "1.5–3.5%", "Give 30 min before meal, hypoglycemia risk"],
["Rapid Insulin", "Insulin Aspart / Lispro", "4–10 U before meals", "Prandial control", "Give immediately before eating"],
]
),
...sp(1),
tipBox("HbA1c TARGET: Aim <7% for most adults. Aim <7.5–8% for elderly (>70 yrs), long-standing diabetes, or frequent hypoglycemia. Check HbA1c every 3 months until controlled, then every 6 months."),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 1
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 1 — Newly Diagnosed T2DM (Mild, Young Patient)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Ramesh Patil, 42 yrs, Male. Routine check-up. No symptoms. FBS 162 mg/dL, PPBS 238 mg/dL, HbA1c 7.4%. BMI 27. BP normal. No complications. No other illness.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 1"),
...sp(1),
rxBox([
"Patient: Ramesh Patil, 42 yrs, Male, Yashwantnagar",
"Dx: Type 2 Diabetes Mellitus (newly diagnosed)",
"FBS: 162 mg/dL | PPBS: 238 mg/dL | HbA1c: 7.4%",
"BP: 122/78 | Wt: 72 kg | BMI: 27",
"=======================================================",
"Rx:",
"",
"1. Tab. Metformin 500 mg — 1 tab BD after food x 30 days",
" (increase to 1000 mg BD after 2 weeks if no GI side effects)",
"",
"2. Tab. Vitamin D3 60,000 IU — 1 tab once a week x 8 weeks",
" (very common deficiency in diabetics — aids insulin sensitivity)",
"",
"3. Tab. Vitamin B12 500 mcg — 1 tab OD x 90 days",
" (Metformin depletes B12 over time — give from the start)",
"",
"Investigations ordered today:",
" - CBC, RFT, LFT, Lipid profile, Urine routine + micro,",
" Urine ACR (albumin:creatinine ratio), ECG",
"",
"Advice:",
" - Lifestyle FIRST: walk 30 min daily, avoid sugar/maida/rice",
" - Diet: more vegetables, dal, salad — small frequent meals",
" - Self-monitoring: check FBS weekly (fasting) at home",
" - Target FBS < 130, PPBS < 180, HbA1c < 7%",
"",
"Follow up: 4 weeks with FBS, PPBS",
]),
...sp(1),
tipBox("Why Metformin first? It is the safest, cheapest, most effective first drug for T2DM. It does NOT cause hypoglycemia on its own. It also has mild weight-neutral effect and protects the heart. RSSDI 2022 recommends Metformin + lifestyle as first-line for ALL newly diagnosed T2DM patients (unless contraindicated)."),
...sp(1),
infoBox("LIFESTYLE ADVICE TO GIVE EVERY VISIT", "✓ Reduce white rice — replace with millets (jowar, bajra), brown rice\n✓ No sugar in tea/coffee — use less or switch to stevia\n✓ Avoid bakery items, fried food, sweets, fruit juices\n✓ Eat 3 meals at regular times — do NOT skip meals\n✓ Walk 30 min after dinner — single most effective sugar-lowering activity\n✓ Quit smoking — doubles cardiovascular risk in diabetics", C.lightBlue, C.blueBg),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 2
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 2 — Moderate T2DM, Dual Oral Therapy"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Suresh Jadhav, 52 yrs, Male. Known T2DM x 3 yrs on Metformin 500 mg BD — but sugar not controlled. FBS 198 mg/dL, PPBS 298 mg/dL, HbA1c 9.1%. BMI 26. No CKD. BP borderline 138/86.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 2"),
...sp(1),
rxBox([
"Patient: Suresh Jadhav, 52 yrs, Male, Yashwantnagar",
"Dx: Type 2 Diabetes Mellitus — Inadequately controlled on Metformin",
"FBS: 198 mg/dL | PPBS: 298 mg/dL | HbA1c: 9.1%",
"BP: 138/86 | Wt: 70 kg | eGFR: 72 (normal)",
"=======================================================",
"Rx:",
"",
"1. Tab. Metformin 1000 mg — 1 tab BD after food x 30 days",
" (continuing + increasing previous dose)",
"",
"2. Tab. Glimepiride 1 mg — 1 tab OD 30 min BEFORE breakfast x 30 days",
" (IMPORTANT: give before breakfast, not after — stimulates insulin release)",
" (may increase to 2 mg after 2 weeks if FBS still >160)",
"",
"3. Tab. Pantoprazole 40 mg — 1 tab OD before breakfast x 30 days",
" (stomach protection)",
"",
"4. Tab. Atorvastatin 10 mg — 1 tab at night x 30 days",
" (all diabetics should be on a statin — heart protection)",
"",
"5. Tab. Aspirin 75 mg — 1 tab OD after breakfast",
" (if age >50 + 1 other CV risk factor)",
"",
"Investigations: HbA1c in 3 months, Lipid profile, RFT, Urine ACR",
"",
"Advice: Same diet + exercise + self-monitoring as before",
" If sugar goes too low (dizzy, sweating) — eat 2-3 glucose tablets",
" or drink 1 glass of glucose water immediately",
"",
"Follow up: 4 weeks with FBS + PPBS diary",
]),
...sp(1),
warningBox("Glimepiride (Sulfonylurea) CAN cause hypoglycemia — especially if meal is skipped. Always counsel patient: 'Take Glimepiride 30 minutes BEFORE breakfast. If you skip breakfast, skip the tablet too.' Never give Glimepiride to patients with CKD (eGFR <30)."),
...sp(1),
tipBox("Why add Glimepiride? When Metformin alone is not enough, adding a Sulfonylurea (Glimepiride) is the most affordable and effective next step in Indian OPD settings. HbA1c reduction with the combination is 1.5–2.5%. Target: Bring HbA1c to <7% within 3–6 months."),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 3
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 3 — T2DM + Hypertension (Most Common OPD Combo)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Kamalbai Patil, 55 yrs, Female. Known T2DM x 5 yrs + HTN x 2 yrs. FBS 210 mg/dL, PPBS 310 mg/dL, HbA1c 9.8%. BP 158/96 mmHg. Lipid profile: LDL 138. BMI 29. Urine ACR 45 mg/g (microalbuminuria — early kidney involvement).", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 3"),
...sp(1),
rxBox([
"Patient: Kamalbai Patil, 55 yrs, Female, Yashwantnagar",
"Dx: T2DM + Essential Hypertension + Early Diabetic Nephropathy",
"FBS: 210 | PPBS: 310 | HbA1c: 9.8% | BP: 158/96",
"LDL: 138 | Urine ACR: 45 mg/g | eGFR: 58 | BMI: 29",
"=======================================================",
"Rx:",
"",
"-- DIABETES MEDICINES --",
"1. Tab. Metformin 1000 mg — 1 tab BD after food x 30 days",
"",
"2. Tab. Glimepiride 2 mg — 1 tab OD 30 min before breakfast x 30 days",
"",
"3. Tab. Voglibose 0.3 mg — 1 tab TDS just before meals x 30 days",
" (reduces post-meal sugar spike — especially high PPBS)",
"",
"-- BLOOD PRESSURE MEDICINES --",
"4. Tab. Telmisartan 40 mg — 1 tab OD morning x 30 days",
" (ARB — best choice in T2DM+HTN: protects kidneys, reduces ACR)",
" (increase to 80 mg if BP not controlled after 4 weeks)",
"",
"5. Tab. Amlodipine 5 mg — 1 tab OD morning x 30 days",
" (add if BP still >140/90 on Telmisartan alone)",
"",
"-- LIPID / HEART PROTECTION --",
"6. Tab. Atorvastatin 20 mg — 1 tab at night x 30 days",
" (LDL target < 100 mg/dL in T2DM; <70 if CKD or heart disease)",
"",
"7. Tab. Aspirin 75 mg — 1 tab OD after breakfast x 30 days",
"",
"Investigations: RFT in 1 week (after starting Telmisartan — check creatinine),",
" then RFT 3-monthly, Urine ACR, ECG, Echo if chest symptoms",
"",
"BP Target: <130/80 mmHg in diabetics",
"Sugar Target: FBS <130, PPBS <180, HbA1c <7.5%",
"",
"Follow up: 2 weeks (BP + sugar check), then monthly",
]),
...sp(1),
tipBox("Telmisartan (ARB) is the BEST antihypertensive for T2DM with microalbuminuria. It reduces urine protein leakage (ACR), slows CKD progression. Check potassium and creatinine 1 week after starting — Telmisartan can raise both slightly. If creatinine rises >30% — reduce dose or switch."),
...sp(1),
infoBox("MONITORING TARGETS FOR T2DM+HTN", "• BP: < 130/80 mmHg (stricter than non-diabetics)\n• FBS: 80–130 mg/dL\n• PPBS: < 180 mg/dL (2 hrs after meal)\n• HbA1c: < 7% (< 7.5% if elderly or long-standing)\n• LDL: < 100 mg/dL (< 70 if CKD/CVD)\n• Urine ACR: < 30 mg/g (check every 6 months)", C.lightBlue, C.blueBg),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 4
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 4 — T2DM + Obesity (SGLT2 Inhibitor Therapy)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Vijay Shinde, 48 yrs, Male. T2DM x 2 yrs. FBS 188 mg/dL, HbA1c 8.5%. BMI 32 (obese). BP 145/90. On Metformin 1g BD already. Complains of weight gain on Glimepiride which was tried earlier. No CKD. No heart disease.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 4"),
...sp(1),
rxBox([
"Patient: Vijay Shinde, 48 yrs, Male, Yashwantnagar",
"Dx: T2DM + Obesity (BMI 32, HbA1c 8.5%)",
"FBS: 188 | HbA1c: 8.5% | BP: 145/90 | BMI: 32",
"eGFR: 78 (normal) | No heart disease",
"=======================================================",
"Rx:",
"",
"1. Tab. Metformin 1000 mg — 1 tab BD after food x 30 days",
" (continue existing)",
"",
"2. Tab. Dapagliflozin 10 mg — 1 tab OD in the MORNING x 30 days",
" (SGLT2 inhibitor — causes glucose excretion in urine,",
" lowers weight by ~2-3 kg, also lowers BP slightly)",
" OR Tab. Empagliflozin 10 mg OD (similar benefit)",
"",
"3. Tab. Telmisartan 40 mg — 1 tab OD morning x 30 days (for BP)",
"",
"4. Tab. Atorvastatin 20 mg — 1 tab at night x 30 days",
"",
"5. Tab. Aspirin 75 mg — 1 tab OD after breakfast",
"",
"Advice:",
" - Dapagliflozin causes glucose to come out in urine (glycosuria)",
" - Keep genital area clean and dry — wipe after urination",
" - Drink plenty of water (2-3 litres daily)",
" - Do NOT take Dapagliflozin if eGFR <45 (not effective)",
" - Weight loss goal: lose 5-7% of body weight in 6 months",
"",
"Follow up: 4 weeks — check weight + BP + FBS",
]),
...sp(1),
warningBox("SGLT2 inhibitors can cause genital fungal infections (due to glycosuria) — more common in women. Counsel hygiene. Can rarely cause DKA (especially if dose of insulin reduced too quickly in T1DM or sick day). STOP Dapagliflozin 3 days before any surgery."),
...sp(1),
tipBox("SGLT2 inhibitors (Dapagliflozin, Empagliflozin) are preferred in T2DM with obesity, heart failure, or CKD. Empagliflozin reduced cardiovascular death by 38% in the EMPA-REG OUTCOME trial. Dapagliflozin reduced CKD progression in DAPA-CKD trial. These are now guideline-recommended first-line drugs alongside Metformin in high-risk patients."),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 5
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 5 — Elderly Patient T2DM (Age >70, Avoid Hypoglycemia)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Janabai Patil, 72 yrs, Female. T2DM x 10 yrs. Lives alone. Had one episode of fainting (likely hypoglycemia) last month when she missed lunch. FBS 175 mg/dL, HbA1c 8.2%. eGFR 48 (mild CKD). On Glimepiride 2 mg — wants to continue.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 5"),
...sp(1),
rxBox([
"Patient: Janabai Patil, 72 yrs, Female, Yashwantnagar",
"Dx: T2DM (elderly) + Mild CKD Stage 3 (eGFR 48)",
"FBS: 175 | HbA1c: 8.2% | eGFR: 48 | BP: 130/82",
"Previous episode of probable hypoglycemia (fainting)",
"=======================================================",
"Rx:",
"",
"CHANGE FROM GLIMEPIRIDE — HIGH HYPOGLYCEMIA RISK IN ELDERLY!",
"",
"1. Tab. Metformin 500 mg — 1 tab BD after food x 30 days",
" (reduce dose because eGFR 48 — do NOT give >500 mg BD)",
" (STOP Metformin if eGFR falls below 30 — recheck RFT in 3 months)",
"",
"2. Tab. Sitagliptin 50 mg — 1 tab OD x 30 days",
" (DPP-4 inhibitor — NO hypoglycemia risk, safe in elderly)",
" (dose 50 mg because eGFR 48 — dose adjusted for CKD)",
" [Normal dose = 100 mg; reduce to 50 mg if eGFR 30-50]",
"",
"3. Tab. Voglibose 0.2 mg — 1 tab TDS just before meals x 30 days",
" (reduces post-meal sugar without causing hypoglycemia)",
"",
"4. Tab. Amlodipine 5 mg — 1 tab OD morning (if BP >140/90)",
"",
"5. Tab. Atorvastatin 10 mg — 1 tab at night (low dose in elderly)",
"",
"HbA1c TARGET for this patient: <8% (less strict — elderly, alone, CKD)",
"Reason: Strict control = more hypoglycemia risk = falls = fractures",
"",
"Advice to family member / patient:",
" - Always eat meals on time — never skip meals",
" - Keep glucose biscuits / sugar sachets in pocket always",
" - If dizzy/sweating — eat 2-3 glucose tablets immediately",
" - Check FBS 2-3 times per week",
"",
"Follow up: 2 weeks initially, then monthly",
]),
...sp(1),
warningBox("NEVER give Glimepiride or other Sulfonylureas as first choice in elderly patients (>70 yrs), patients who live alone, skip meals, or have CKD. Hypoglycemia in elderly causes falls, fractures, hospital admission, and sometimes death. Use DPP-4 inhibitors (Sitagliptin, Vildagliptin) — they are safe, effective, and cause NO hypoglycemia."),
...sp(1),
tipBox("DPP-4 INHIBITOR DOSE ADJUSTMENT IN CKD:\neGFR >50: Sitagliptin 100 mg OD (full dose)\neGFR 30-50: Sitagliptin 50 mg OD (half dose)\neGFR <30: Sitagliptin 25 mg OD (quarter dose)\nVildagliptin 50 mg OD — safe in all stages of CKD including dialysis"),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 6
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 6 — T2DM + CKD (Chronic Kidney Disease)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Pandurang More, 60 yrs, Male. T2DM x 12 yrs. Serum creatinine 2.4 mg/dL (eGFR 28 — Stage 4 CKD). Urine ACR 480 mg/g (heavy proteinuria). FBS 190 mg/dL, HbA1c 8.6%. BP 162/98. Pedal edema present. On Metformin 1g BD (must be STOPPED now).", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 6"),
...sp(1),
rxBox([
"Patient: Pandurang More, 60 yrs, Male, Yashwantnagar",
"Dx: T2DM + CKD Stage 4 (eGFR 28) + Diabetic Nephropathy",
"FBS: 190 | HbA1c: 8.6% | Creatinine: 2.4 | eGFR: 28",
"BP: 162/98 | ACR: 480 mg/g | Pedal edema (+)",
"=======================================================",
"Rx:",
"",
"STOP METFORMIN IMMEDIATELY (eGFR <30 — risk of lactic acidosis)",
"STOP SGLT2 INHIBITORS (not effective if eGFR <45)",
"STOP GLIMEPIRIDE (accumulates in CKD — severe hypoglycemia risk)",
"",
"SAFE DRUGS IN CKD STAGE 4:",
"",
"1. Tab. Vildagliptin 50 mg — 1 tab OD x 30 days",
" (safe in all CKD stages including dialysis — no dose change needed)",
"",
"2. Tab. Glipizide 5 mg — 1 tab OD before breakfast x 30 days",
" (safer SU in CKD compared to Glimepiride — shorter acting)",
" (use ONLY if Vildagliptin alone not controlling sugar)",
"",
"-- BP CONTROL (very important to slow CKD progression) --",
"3. Tab. Telmisartan 40 mg — 1 tab OD morning x 30 days",
" (reduces proteinuria — key nephroprotective drug)",
"",
"4. Tab. Amlodipine 5 mg — 1 tab OD morning x 30 days",
"",
"5. Tab. Furosemide 40 mg — 1 tab OD morning x 30 days",
" (for pedal edema — loop diuretic)",
"",
"-- OTHER --",
"6. Tab. Calcium carbonate 500 mg — 1 tab TDS after food x 30 days",
" (phosphate binder — prevents renal bone disease)",
"",
"7. Cap. Calcitriol 0.25 mcg — 1 cap OD x 30 days",
" (active Vitamin D — kidneys can't make it in CKD)",
"",
"Investigations: RFT + electrolytes every month, Urine ACR,",
" Serum phosphorus, PTH, Haemoglobin (for anaemia of CKD)",
"",
"REFER: Nephrology for CKD management and dialysis planning",
"BP Target: < 130/80 mmHg",
"",
"Follow up: 2 weeks",
]),
...sp(1),
warningBox("DRUGS TO STRICTLY AVOID IN CKD eGFR <30:\n• Metformin — risk of fatal lactic acidosis\n• Glimepiride — severe prolonged hypoglycemia\n• SGLT2 inhibitors — not effective AND risky\n• NSAIDs (Diclofenac, Ibuprofen) — worsen kidney function acutely\n• Contrast dye for CT scan — causes contrast nephropathy (hold RFT 48 hrs before + 48 hrs after)"),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 7
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 7 — T2DM + Heart Disease (IHD / Heart Failure)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Baban Kulkarni, 58 yrs, Male. T2DM x 8 yrs. Had a heart attack (MI) 1 year ago — on Aspirin, Atorvastatin, Metoprolol. Now FBS 202 mg/dL, HbA1c 9.2%. BP 136/82. eGFR 55. Mild breathlessness on exertion (EF 40% — mild heart failure).", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 7"),
...sp(1),
rxBox([
"Patient: Baban Kulkarni, 58 yrs, Male, Yashwantnagar",
"Dx: T2DM + Post-MI + Heart Failure (EF 40%)",
"FBS: 202 | HbA1c: 9.2% | BP: 136/82 | eGFR: 55",
"=======================================================",
"Rx:",
"",
"-- DIABETES MEDICINES (heart-safe) --",
"",
"1. Tab. Metformin 500 mg — 1 tab BD after food x 30 days",
" (safe post-MI — NOT in active heart failure with low BP/EF <25%)",
"",
"2. Tab. Empagliflozin 10 mg — 1 tab OD morning x 30 days",
" *** FIRST CHOICE in T2DM + Heart Failure ***",
" (proven to reduce HF hospitalizations by 35% — EMPA-REG trial)",
" (also reduces cardiovascular death, improves breathlessness)",
" (also lowers weight by 2-3 kg and BP by 3-4 mmHg)",
"",
"3. Tab. Sitagliptin 100 mg — 1 tab OD x 30 days (if more control needed)",
" (DPP-4 — cardiac safe, no hypoglycemia)",
"",
"-- HEART MEDICINES (continuing) --",
"4. Tab. Aspirin 75 mg — 1 tab OD after breakfast",
"5. Tab. Atorvastatin 40 mg — 1 tab at night (high dose post-MI)",
"6. Tab. Metoprolol 25 mg — 1 tab BD (continue as before)",
"7. Tab. Ramipril 2.5 mg — 1 tab OD morning",
" (ACE inhibitor — reduces heart failure progression post-MI)",
" (check creatinine + potassium after 1 week)",
"",
"DO NOT USE:",
" - Pioglitazone — causes fluid retention, worsens heart failure",
" - Glimepiride alone — hypoglycemia stresses the heart",
"",
"Investigations: Echo repeat at 6 months, RFT + electrolytes monthly,",
" HbA1c 3-monthly, ECG",
"",
"REFER: Cardiologist for heart failure management",
"",
"Follow up: 2 weeks",
]),
...sp(1),
tipBox("EMPAGLIFLOZIN is now a Class I recommendation (highest evidence) for T2DM + Heart Failure. It is the first diabetes drug proven to reduce death from heart causes. It works by reducing preload/afterload on heart, reducing fluid retention, and improving cardiac energy metabolism — independent of blood sugar lowering."),
...sp(1),
warningBox("PIOGLITAZONE is CONTRAINDICATED in heart failure. It causes sodium and water retention, worsening breathlessness and edema. Also avoid in bladder cancer history. Do not prescribe to any patient with pedal edema or reduced EF."),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 8
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 8 — Poorly Controlled T2DM, Starting Basal Insulin"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Nanda Jadhav, 50 yrs, Female. T2DM x 7 yrs. On Metformin 1g BD + Glimepiride 4 mg + Voglibose 0.3 mg. Still FBS 240 mg/dL, PPBS 360 mg/dL, HbA1c 11.2%. Weight loss. Fatigue. Now needs insulin.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 8"),
...sp(1),
rxBox([
"Patient: Nanda Jadhav, 50 yrs, Female, Yashwantnagar",
"Dx: T2DM — Poorly controlled, Insulin initiation",
"FBS: 240 | PPBS: 360 | HbA1c: 11.2% | Wt: 58 kg",
"Currently: Metformin 1g BD + Glimepiride 4mg + Voglibose 0.3 mg",
"=======================================================",
"Rx:",
"",
"-- ADDING BASAL INSULIN (continue oral meds) --",
"",
"1. Inj. Insulin Glargine 100 U/mL (Lantus / Basalog)",
" Starting dose: 10 Units subcutaneous at BEDTIME",
" (= 0.1-0.2 U/kg for a 58 kg patient = 6-12 Units)",
" Titration: Increase by 2 Units every 3 days",
" Target: FBS < 130 mg/dL",
" Maximum titration: up to 0.3-0.5 U/kg (15-29 Units for this patient)",
"",
" HOW TO INJECT: Subcutaneous (SC) in abdomen / outer thigh",
" Rotate injection site every time",
" Needle: 4 mm pen needle (BD Ultra-Fine 4mm)",
" Syringe (if no pen): 1 ml insulin syringe (U-100) + 27G needle",
"",
"2. Tab. Metformin 1000 mg — 1 tab BD after food (CONTINUE)",
"",
"3. Tab. Glimepiride — REDUCE to 2 mg OD (reduce dose when adding insulin",
" to prevent hypoglycemia)",
"",
"4. Tab. Voglibose 0.3 mg — 1 tab TDS (continue for PPBS control)",
"",
"5. Tab. Atorvastatin 20 mg — 1 tab at night",
"",
"HYPOGLYCEMIA PROTOCOL (teach patient):",
" If FBS < 70 mg/dL: Eat 15g carbs (2-3 glucose tablets or 150 ml juice)",
" Recheck after 15 min. If still low — eat again. Call doctor.",
" If unconscious: Inj. Glucagon 1 mg SC/IM OR",
" IV 25 ml of 50% Dextrose (in OPD/hospital)",
"",
"Patient education required BEFORE starting insulin:",
" - Show how to draw dose, inject, rotate sites",
" - Storage: Vial in use at room temp (28 days), unopened in fridge",
" - Never inject into lipohypertrophy (hard lump) areas",
"",
"Follow up: 1 week with FBS diary x 7 days",
]),
...sp(1),
tipBox("TITRATION RULE for Basal Insulin (3-3-3 Rule): Increase dose by 2 units every 3 days until FBS is consistently < 130 mg/dL. This slow titration minimizes hypoglycemia. Once FBS is controlled but HbA1c still high (>8%) — check PPBS — may need to add rapid insulin before meals."),
...sp(1),
infoBox("INSULIN STORAGE", "• Unopened vials/pens: Store in refrigerator (2-8°C) — do NOT freeze\n• In-use vial: Room temperature is fine for up to 28 days\n• Never leave insulin in direct sunlight or in a vehicle\n• Check expiry date before every use\n• Insulin pen needles: use once only — do NOT reuse (blunts tip, painful, causes lipohypertrophy)", C.lightBlue, C.blueBg),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 9
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 9 — T2DM on Full Basal-Bolus Insulin Regimen"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Shankar Deshmukh, 55 yrs, Male. T2DM x 15 yrs. On Basal Insulin Glargine 28 Units at night — FBS now 118 mg/dL (good). But PPBS still 320 mg/dL (very high after meals). HbA1c 10.1% — fasting good but post-meal sugar causing the high HbA1c. Now needs meal-time (bolus) insulin.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 9"),
...sp(1),
rxBox([
"Patient: Shankar Deshmukh, 55 yrs, Male, Yashwantnagar",
"Dx: T2DM — On Basal Insulin, adding Bolus (Prandial) Insulin",
"FBS: 118 (controlled) | PPBS: 320 (high) | HbA1c: 10.1%",
"Current: Inj. Glargine 28 U at bedtime | Wt: 75 kg",
"=======================================================",
"Rx:",
"",
"-- FULL BASAL-BOLUS REGIMEN --",
"",
"1. Inj. Insulin Glargine (Lantus/Basalog) 28 Units SC at BEDTIME",
" (continue existing dose — FBS is controlled)",
"",
"2. Inj. Insulin Aspart (NovoRapid) OR Insulin Lispro (Humalog)",
" — ADD 4 Units SC immediately BEFORE each main meal (TDS)",
" (breakfast, lunch, dinner — 4 Units before each)",
" Titration: Increase by 1-2 Units if PPBS still >180 after that meal",
" Target: PPBS < 180 mg/dL at 2 hours after meal",
"",
" HOW TO GIVE:",
" - Draw rapid insulin in 1 ml insulin syringe (U-100)",
" - Inject SC in abdomen (fastest absorption site)",
" - Inject IMMEDIATELY BEFORE eating — do NOT give and then delay meal",
" - If meal is delayed or patient not hungry — SKIP that dose",
"",
"3. Tab. Metformin 1000 mg — 1 tab BD after food (continue)",
" (keep metformin — reduces total insulin requirement)",
"",
"4. STOP Glimepiride (sulfonylurea not needed with bolus insulin — risk",
" of double hypoglycemia)",
"",
"5. Tab. Atorvastatin 20 mg — 1 tab at night",
"6. Tab. Aspirin 75 mg — 1 tab OD after breakfast",
"",
"TOTAL DAILY INSULIN DOSE GUIDE (0.5-0.7 U/kg for 75 kg patient):",
" Total = 37-52 Units/day",
" 50% as Basal (Glargine 28 U) + 50% as Bolus (4+4+4 = 12 U prandial)",
" Adjust every 3-5 days based on glucose diary",
"",
"Investigations: FBS + PPBS daily diary, HbA1c every 3 months",
"",
"Follow up: 1 week with glucose diary",
]),
...sp(1),
warningBox("When starting BOLUS insulin, always STOP the Sulfonylurea (Glimepiride). Using both together = double insulin stimulation = severe hypoglycemia. Also counsel patient: 'Rapid insulin MUST be followed immediately by a meal — if you inject and don't eat, your sugar will crash.'"),
...sp(1),
tipBox("ALTERNATIVE — PREMIX INSULIN (Cheaper, Simpler for OPD patients):\nIf Basal-Bolus is too complex, use Insulin 70/30 (NPH 70% + Regular 30%)\nor Mixtard 30/70 — 0.3-0.5 U/kg/day in 2 doses (before breakfast + before dinner)\nEasy for patients who cannot manage 4 injections/day.\nDisadvantage: Less flexible, higher hypoglycemia risk at midday."),
...sp(1),
pageBreak(),
);
// ─────────────────────────────────────────────────────────────────────────────
// SCENARIO 10
// ─────────────────────────────────────────────────────────────────────────────
children.push(
h1("SCENARIO 10 — Hypoglycemia in T2DM (Emergency at OPD)"),
...sp(1),
para([
txt("Case Presentation: ", { bold: true, size: 20, color: C.tealText }),
txt("Meena Kale, 60 yrs, Female. Known T2DM on Glimepiride 4 mg + Metformin. Brought to OPD by family — dizzy, sweating, hands shaking, confused. Glucometer reading: 42 mg/dL. Last meal 6 hours ago.", { size: 20 }),
]),
...sp(1),
h3("PRESCRIPTION — Scenario 10 (Acute Hypoglycemia Management)"),
...sp(1),
rxBox([
"Patient: Meena Kale, 60 yrs, Female, Yashwantnagar",
"Dx: Severe Hypoglycemia (BSL 42 mg/dL) — Symptomatic",
"Symptoms: Dizziness, sweating, trembling, confusion",
"Cause: Glimepiride + missed meal",
"=======================================================",
"IMMEDIATE MANAGEMENT:",
"",
"IF CONSCIOUS AND CAN SWALLOW:",
" Step 1: Give 15g fast-acting carbs IMMEDIATELY",
" - 3-4 glucose tablets (Glucon-D tablets)",
" - OR 150 ml fruit juice / cold drink",
" - OR 1 tbsp sugar dissolved in water",
" - OR 3-4 glucose biscuits",
" Step 2: Recheck BSL after 15 minutes",
" Step 3: If still <70 — repeat Step 1",
" Step 4: Once BSL >100 — give proper meal",
"",
"IF UNCONSCIOUS OR CANNOT SWALLOW:",
" Step 1: Inj. 25 ml of 50% Dextrose IV IMMEDIATELY",
" - Syringe: 20 ml syringe + IV cannula",
" - Push slowly IV over 1-2 minutes",
" - Recheck BSL after 5 min — repeat if still <70",
" Step 2: After patient conscious — give oral glucose/food",
" Step 3: Start IV DNS 500 ml at 30 drops/min to maintain sugar",
" Step 4: Do NOT give Glimepiride today",
"",
"AFTER STABILIZATION:",
"",
"1. Tab. Metformin 500 mg — 1 tab BD after food (continue)",
"",
"2. REDUCE Glimepiride to 1 mg OD OR SWITCH to:",
" Tab. Sitagliptin 100 mg OD (no hypoglycemia risk)",
" (especially as she is elderly and skips meals)",
"",
"3. ORS 1 sachet in 1 litre water — drink slowly for hydration",
"",
"Advice to patient and family:",
" - NEVER skip a meal if on Glimepiride or Insulin",
" - Keep 4 glucose tablets in purse/pocket ALWAYS",
" - Eat a small snack at bedtime if on insulin",
" - Teach family member: if unconscious, put honey/jam under tongue",
" and immediately call ambulance / take to hospital",
"",
"Follow up: TOMORROW for BSL check + medication review",
]),
...sp(1),
warningBox("After treating hypoglycemia with IV Dextrose — MONITOR BSL every 30 minutes for at least 2 hours. Glimepiride and Insulin have long duration of action — sugar can DROP AGAIN even after giving glucose. Do not discharge immediately. Observe for at least 2-3 hours."),
...sp(1),
infoBox("HYPOGLYCEMIA WARNING SIGNS (teach every diabetic patient)", "Mild: Sweating, trembling, hunger, palpitations, dizziness\nModerate: Confusion, difficulty speaking, blurred vision\nSevere: Loss of consciousness, seizures\n\nRULE OF 15: Give 15g carbs, wait 15 min, recheck sugar, repeat if needed.\nCausesin T2DM: Sulfonylurea overdose, missed meal, excess exercise, alcohol", C.lightBlue, C.blueBg),
...sp(1),
pageBreak(),
);
// ── MONITORING MASTER TABLE ───────────────────────────────────────────────────
children.push(
h1("T2DM — MONITORING & INVESTIGATION SCHEDULE"),
...sp(1),
makeTable(
["Test", "Frequency", "Target / Action"],
[
["FBS (Fasting Blood Sugar)", "Daily (self), monthly (lab)", "80–130 mg/dL"],
["PPBS (Post Prandial, 2 hr)", "Daily (self), monthly (lab)", "< 180 mg/dL"],
["HbA1c", "Every 3 months (till controlled), then 6 monthly", "< 7.0% (< 7.5–8% in elderly)"],
["Blood Pressure", "Every OPD visit", "< 130/80 mmHg"],
["Lipid Profile (LDL, HDL, TG)", "At diagnosis, then annually", "LDL < 100 (< 70 if CVD/CKD)"],
["Serum Creatinine + eGFR", "Every 6 months (annually if normal)", "eGFR > 60"],
["Urine ACR (albumin:creatinine)", "Every 6 months", "< 30 mg/g (normal)"],
["Urine Routine + Microscopy", "Every 6 months", "No sugar, no pus cells"],
["ECG", "At diagnosis, then annually", "Detect silent IHD"],
["Eye Examination (Fundus)", "Annually", "Detect diabetic retinopathy"],
["Foot Examination", "Every OPD visit", "Pulses, sensation, wounds"],
["Weight / BMI", "Every OPD visit", "Target BMI < 25"],
["Vitamin B12", "Annually (if on Metformin)", "> 200 pg/mL"],
["Vitamin D (25-OH)", "At start, then annually", "30–100 ng/mL"],
]
),
...sp(1),
pageBreak(),
);
// ── DRUG SAFETY TABLE ─────────────────────────────────────────────────────────
children.push(
h1("DRUG SAFETY IN SPECIAL SITUATIONS — QUICK REFERENCE"),
...sp(1),
makeTable(
["Drug", "CKD eGFR<30", "Heart Failure", "Elderly", "Pregnancy"],
[
["Metformin", "STOP", "Use caution (not if low EF)", "Safe (reduce dose)", "AVOID"],
["Glimepiride", "AVOID", "Use with caution", "AVOID", "AVOID"],
["Glipizide", "Use with care", "Use with caution", "Prefer DPP4 instead","AVOID"],
["Sitagliptin", "Dose adjust", "Safe", "SAFE — preferred", "Limited data"],
["Vildagliptin", "50 mg OD", "Safe", "SAFE — preferred", "Limited data"],
["Dapagliflozin", "AVOID (<45)", "Preferred", "Use with care", "AVOID"],
["Empagliflozin", "AVOID (<45)", "PREFERRED (Class I)", "Use with care", "AVOID"],
["Pioglitazone", "Safe", "AVOID", "Avoid (fracture risk)","AVOID"],
["Voglibose", "Safe", "Safe", "Safe", "Safe"],
["Insulin Glargine", "SAFE (reduce)", "SAFE", "SAFE (start low)", "SAFE (preferred)"],
["Insulin Aspart", "SAFE (reduce)", "SAFE", "SAFE", "SAFE (preferred)"],
]
),
...sp(1),
pageBreak(),
);
// ── INSULIN GUIDE ─────────────────────────────────────────────────────────────
children.push(
h1("INSULIN TYPES — QUICK REFERENCE"),
...sp(1),
makeTable(
["Insulin Type", "Brand Name", "Onset", "Peak", "Duration", "When to Give"],
[
["Rapid-acting (Aspart)", "NovoRapid", "10-20 min", "1-3 hr", "3-5 hr", "Immediately before meal"],
["Rapid-acting (Lispro)", "Humalog", "15-30 min", "0.5-2 hr", "3-4 hr", "Immediately before meal"],
["Short-acting (Regular)", "Actrapid/Humulin R","30-60 min","2-4 hr", "5-8 hr", "30 min before meal"],
["Intermediate (NPH)", "Insulatard", "1-2 hr", "4-8 hr", "12-18 hr", "BD (morning + bedtime)"],
["Long-acting (Glargine)", "Lantus/Basalog", "1-2 hr", "No peak", "24 hr", "At bedtime (OD)"],
["Long-acting (Degludec)", "Tresiba", "1 hr", "No peak", ">42 hr", "Any time OD (flexible)"],
["Premix 30/70", "Mixtard/Humulin","30-60 min", "2-8 hr", "12-16 hr", "BD before breakfast+dinner"],
["Premix Analog 25/75", "NovoMix 30", "10-20 min", "1-4 hr", "14-24 hr", "BD with meals"],
]
),
...sp(1),
infoBox("SYRINGE FOR INSULIN INJECTIONS", "• U-100 Insulin Syringe (1 ml) with 27G or 29G needle — for drawing and injecting from vials\n• Insulin Pen + 4 mm pen needle (BD Ultra-Fine / Novo Needle) — most comfortable, least painful\n• Never use a regular 5 ml syringe for insulin — the graduation markings are WRONG and cause dosing errors\n• Always check: 1 ml insulin syringe is marked in Units (0–100 U). Each small mark = 1 Unit or 2 Units depending on brand.", C.lightBlue, C.blueBg),
...sp(2),
);
// ── FOOTER DISCLAIMER ─────────────────────────────────────────────────────────
children.push(
new Paragraph({
children: [txt(
"DISCLAIMER: This guide is based on RSSDI Clinical Practice Recommendations 2022, ADA Standards of Care 2024, and standard Indian pharmacology practice. All drug doses must be verified for individual patients. Doses may need adjustment based on body weight, renal function, hepatic function, age, and comorbidities. Insulin therapy should be initiated and titrated under close clinical supervision. Refer to a diabetologist or physician for complex or uncontrolled cases.",
{ size: 15, italics: true, color: C.grey }
)],
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 100 },
border: { top: { style: BorderStyle.SINGLE, size: 4, color: "AAAAAA" } },
}),
);
// ═════════════════════════════════════════════════════════════════════════════
// BUILD DOCUMENT
// ═════════════════════════════════════════════════════════════════════════════
const doc = new Document({
creator: "OPD Clinic Guide",
title: "Type 2 Diabetes Prescription Guide — Yashwantnagar Sangli",
description: "10 Real Clinical Scenarios with Full Prescriptions",
sections: [{
properties: {
page: { margin: { top: 720, bottom: 720, left: 900, right: 900 } },
},
headers: {
default: new Header({
children: [new Paragraph({
children: [txt(
"TYPE 2 DIABETES PRESCRIPTION GUIDE | Dr. _____________, MBBS | Yashwantnagar, Sangli",
{ size: 16, color: C.grey }
)],
alignment: AlignmentType.CENTER,
border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" } },
})],
}),
},
footers: {
default: new Footer({
children: [new Paragraph({
children: [
txt("Page ", { size: 16, color: C.grey }),
new TextRun({ children: [PageNumber.CURRENT], size: 16, color: C.grey }),
txt(" of ", { size: 16, color: C.grey }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, color: C.grey }),
txt(" | Based on RSSDI 2022 + ADA 2024 Guidelines | Verify doses before prescribing",
{ size: 16, color: C.grey }),
],
alignment: AlignmentType.CENTER,
})],
}),
},
children,
}],
});
Packer.toBuffer(doc).then(buf => {
const outPath = "/home/daytona/workspace/opd-guide/T2DM_Prescription_Guide_Sangli.docx";
fs.writeFileSync(outPath, buf);
console.log("SUCCESS:", outPath);
}).catch(err => {
console.error("ERROR:", err.message);
process.exit(1);
});
cd /home/daytona/workspace/opd-guide && node generate_diabetes_guide.js 2>&1
ls -lh /home/daytona/workspace/opd-guide/T2DM_Prescription_Guide_Sangli.docx && python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/opd-guide/T2DM_Prescription_Guide_Sangli.docx'); print('Valid DOCX. Internal files:', z.namelist()[:6])"
T2DM Prescription Guide Sangli
Word Document · DOCX
| # | Scenario | Patient | Key Learning |
|---|---|---|---|
| 1 | Newly diagnosed, mild T2DM | Ramesh Patil, 42 M | Metformin + lifestyle first |
| 2 | Moderate T2DM, dual oral therapy | Suresh Jadhav, 52 M | Adding Glimepiride to Metformin |
| 3 | T2DM + Hypertension | Kamalbai Patil, 55 F | Telmisartan + triple therapy + statin |
| 4 | T2DM + Obesity | Vijay Shinde, 48 M | Dapagliflozin/Empagliflozin (weight loss + sugar) |
| 5 | Elderly patient, fragile | Janabai Patil, 72 F | DPP-4 (Sitagliptin) — zero hypoglycemia risk |
| 6 | T2DM + CKD (eGFR 28) | Pandurang More, 60 M | Stop Metformin + Glimepiride, use Vildagliptin |
| 7 | T2DM + Heart Failure post-MI | Baban Kulkarni, 58 M | Empagliflozin — reduces cardiac death |
| 8 | Poorly controlled, starting insulin | Nanda Jadhav, 50 F | Basal Glargine 10U at bedtime + titration rule |
| 9 | On basal insulin, adding bolus | Shankar Deshmukh, 55 M | Rapid Aspart before meals, full BBR |
| 10 | Hypoglycemia emergency OPD | Meena Kale, 60 F | IV Dextrose + stop Glimepiride protocol |