Make all the questions easy mind mapping
cd /home/daytona/workspace/attachments/bfb079f7-d425-4952-8e5c-e4f797c08dcc && python3 -c " import pdfplumber with pdfplumber.open('prop chatgpt.pdf') as pdf: for i, page in enumerate(pdf.pages): print(f'--- PAGE {i+1} ---') print(page.extract_text()) "
mkdir -p /home/daytona/workspace/mindmaps && ls /home/daytona/workspace/mindmaps
~/mindmaps/mindmap.js
const pptxgen = require("pptxgenjs");
let pres = new pptxgen();
pres.layout = 'LAYOUT_WIDE'; // 13.3" x 7.5"
pres.title = 'Clinical Medicine Mind Maps Q1-Q90';
// Color palette
const BG_DARK = "0D1B2A";
const BG_MID = "1B2A3B";
const CENTER_FILL = "1A6B8A";
const CENTER_TEXT = "FFFFFF";
const BRANCH_COLORS = ["E8534A","F0A500","3DBE8A","6A7FDB","E07BC4","4DBDC4","E8C14A","A07BD8"];
const LINE_COLOR = "4A90B8";
const SUB_TEXT = "CCDDEE";
const TITLE_COLOR = "7ED4F5";
// Helper: draw a mind map slide
// branches = [{label, items:[]}]
function addMindMap(pres, qNum, title, branches) {
let slide = pres.addSlide();
// Background gradient simulation with rectangle
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:7.5, fill:{color: BG_DARK} });
// Subtle grid decoration lines
for(let i=0;i<8;i++){
slide.addShape(pres.ShapeType.line, {
x: i*1.9, y:0, w:0, h:7.5,
line:{color:"1E2E3F", width:1, dashType:"dash"}
});
}
// Center circle
const cx = 6.65, cy = 3.6;
const cr = 1.1; // radius approx
slide.addShape(pres.ShapeType.ellipse, {
x: cx-cr, y: cy-cr, w: cr*2, h: cr*2,
fill:{color: CENTER_FILL},
line:{color:"7ED4F5", width:3}
});
// Q number badge
slide.addText(`Q${qNum}`, {
x: cx-cr, y: cy-cr+0.05, w: cr*2, h: 0.4,
fontSize: 13, bold: true, color:"7ED4F5", align:"center", valign:"top",
margin:0
});
// Center title (wrap if long)
slide.addText(title, {
x: cx-cr, y: cy-cr+0.45, w: cr*2, h: cr*1.2,
fontSize: 12, bold: true, color: CENTER_TEXT, align:"center", valign:"middle",
margin:0, wrap:true
});
// Position branches radially
const numBranches = branches.length;
// Place branches evenly around the circle
// We'll distribute them in a smart way: top, right, bottom, left, diagonals
const positions = getPositions(numBranches, cx, cy);
branches.forEach((branch, i) => {
const pos = positions[i];
const color = BRANCH_COLORS[i % BRANCH_COLORS.length];
// Line from center edge to branch box
slide.addShape(pres.ShapeType.line, {
x: cx + pos.lineX1, y: cy + pos.lineY1,
w: pos.lineX2 - pos.lineX1,
h: pos.lineY2 - pos.lineY1,
line:{color: color, width:2.5}
});
// Branch box background
slide.addShape(pres.ShapeType.roundRect, {
x: pos.bx, y: pos.by, w: pos.bw, h: pos.bh,
fill:{color: BG_MID},
line:{color: color, width:2},
rectRadius: 0.1
});
// Branch label
slide.addText(branch.label, {
x: pos.bx, y: pos.by, w: pos.bw, h: 0.35,
fontSize: 10.5, bold: true, color: color, align:"center", valign:"middle",
margin:2
});
// Branch items as small bullets
if(branch.items && branch.items.length > 0) {
const itemsText = branch.items.map(it => ({
text: it,
options: { bullet:{code:"25CF"}, breakLine: true, fontSize:8.5, color: SUB_TEXT }
}));
// Remove breakLine from last
if(itemsText.length > 0) itemsText[itemsText.length-1].options.breakLine = false;
slide.addText(itemsText, {
x: pos.bx+0.05, y: pos.by+0.35, w: pos.bw-0.1, h: pos.bh-0.38,
fontSize:8.5, color: SUB_TEXT, valign:"top", margin:2, wrap:true
});
}
});
// Q number + title header strip
slide.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:0.42, fill:{color:"0A1520"}});
slide.addText(`Q${qNum} — ${title}`, {
x:0.2, y:0.02, w:12.9, h:0.38,
fontSize:11, bold:true, color:TITLE_COLOR, valign:"middle", margin:0
});
}
// Returns branch box positions and connector line coords
function getPositions(n, cx, cy) {
// Assign quadrant positions based on count
const configs = {
2: [
{angle: 180}, {angle: 0}
],
3: [
{angle: 270}, {angle: 30}, {angle: 150}
],
4: [
{angle: 270}, {angle: 0}, {angle: 90}, {angle: 180}
],
5: [
{angle: 270}, {angle: 330}, {angle: 30}, {angle: 120}, {angle: 210}
],
6: [
{angle: 270}, {angle: 330}, {angle: 30}, {angle: 90}, {angle: 150}, {angle: 210}
],
7: [
{angle: 270}, {angle: 321}, {angle: 13}, {angle: 65}, {angle: 117}, {angle: 168}, {angle: 220}
],
8: [
{angle: 270}, {angle: 315}, {angle: 0}, {angle: 45}, {angle: 90}, {angle: 135}, {angle: 180}, {angle: 225}
]
};
let angles;
if(configs[n]) {
angles = configs[n].map(c => c.angle);
} else {
angles = Array.from({length:n}, (_,i) => Math.round(i*(360/n)));
}
// Branch box size
const bw = 2.5, bh = 1.5;
// Distance from center to branch box center
const dist = 3.0;
const r = 1.1; // center ellipse radius
return angles.map(deg => {
const rad = (deg - 90) * Math.PI / 180; // 0 deg = top
const bCx = cx + dist * Math.cos(rad);
const bCy = cy + dist * Math.sin(rad);
// Line start at edge of center ellipse
const lx1 = r * Math.cos(rad);
const ly1 = r * Math.sin(rad);
// Line end near branch box
const edgeDist = dist - bw*0.5 - 0.15;
const lx2 = edgeDist * Math.cos(rad);
const ly2 = edgeDist * Math.sin(rad);
return {
bx: bCx - bw/2,
by: bCy - bh/2,
bw, bh,
lineX1: lx1, lineY1: ly1,
lineX2: lx2, lineY2: ly2
};
});
}
// ======================= QUESTIONS DATA =======================
const questions = [
{
n:1, title:"Classification of Complaints",
branches:[
{label:"Main Complaints", items:["Chief reason for seeking help","Chest pain","Dyspnea","Cough"]},
{label:"Additional Complaints", items:["Associated symptoms","Weakness","Fever","Sweating"]},
{label:"Clinical Example", items:["Pneumonia:","Chief: fever + cough","Additional: fatigue, chest pain"]}
]
},
{
n:2, title:"Anamnesis Morbi",
branches:[
{label:"Definition", items:["Detailed history of current disease","From onset to examination"]},
{label:"Structure", items:["Time of onset","Mode (acute/gradual)","Course & progression","Triggering factors","Prior investigations","Treatment & response"]},
{label:"Clinical Significance", items:["Establishes diagnosis","Determines severity"]}
]
},
{
n:3, title:"Types of Diagnosis",
branches:[
{label:"Preliminary", items:["Initial after history + exam"]},
{label:"Clinical", items:["Based on clinical + lab findings"]},
{label:"Differential", items:["Compare with similar diseases"]},
{label:"Final", items:["Confirmed diagnosis"]},
{label:"Stages", items:["History → Exam → Investigations","Differential → Final diagnosis"]}
]
},
{
n:4, title:"Scheme of Medical History",
branches:[
{label:"Key Sections", items:["ID data","Chief complaints","Anamnesis morbi","Anamnesis vitae","Physical exam","Lab investigations","Instrumental studies","Diagnosis","Treatment","Follow-up"]},
{label:"Importance", items:["Clinical continuity","Academic documentation","Legal evidence"]}
]
},
{
n:5, title:"Anamnesis Vitae",
branches:[
{label:"Definition", items:["Patient's life & previous health history"]},
{label:"Sections", items:["Birth/development","Occupation","Living conditions","Smoking/alcohol","Allergies","Past diseases","Family history"]},
{label:"Most Important", items:["Smoking history","Occupational exposure","Allergies","Chronic diseases","Family history"]}
]
},
{
n:6, title:"Physical Examination Methods",
branches:[
{label:"Inspection", items:["Visual observation"]},
{label:"Palpation", items:["Examination by touch"]},
{label:"Percussion", items:["Tapping – evaluate structures"]},
{label:"Auscultation", items:["Listening to body sounds"]},
{label:"Respiratory Sequence", items:["Inspection → Palpation","Percussion → Auscultation"]}
]
},
{
n:7, title:"Medical Ethics & Deontology",
branches:[
{label:"Deontology", items:["Science of physician duties & conduct"]},
{label:"Main Principles", items:["Beneficence","Non-maleficence","Autonomy","Confidentiality","Justice","Competence"]},
{label:"Obligations", items:["Respect patient dignity","Obtain consent","Maintain privacy","Provide competent care"]}
]
},
{
n:8, title:"Symptom, Syndrome, Diagnosis",
branches:[
{label:"Symptom", items:["Subjective/objective sign of disease"]},
{label:"Syndrome", items:["Group of related symptoms/signs"]},
{label:"Diagnosis", items:["Identification of disease"]},
{label:"Relationship", items:["Symptoms → Syndrome → Diagnosis","Example: Cough+fever+crepitations","→ Consolidation syndrome → Pneumonia"]}
]
},
{
n:9, title:"Rules of Chest Percussion",
branches:[
{label:"Principles", items:["Compare symmetrical areas","Percuss healthy → suspected area"]},
{label:"Types", items:["Comparative – compare lung fields","Topographic – determine organ borders"]},
{label:"Sounds", items:["Resonant – normal lung","Dull – consolidation/effusion","Hyperresonant – emphysema/pneumothorax","Tympanic – air-filled cavity"]}
]
},
{
n:10, title:"Inspection of Heart Area",
branches:[
{label:"Assess", items:["Precordial bulging","Apical impulse","Cardiac pulsations","Epigastric pulsation"]},
{label:"Normal", items:["No visible deformity","Apical impulse at L5th ICS MCL"]},
{label:"Pathological", items:["Visible apex → LV hypertrophy","Epigastric pulsation → RV hypertrophy","Precordial bulging → cardiomegaly"]}
]
},
{
n:11, title:"Heart Sounds S1 & S2",
branches:[
{label:"S1 (1st Sound)", items:["Closure of mitral + tricuspid","Ventricular systole onset","Best at apex"]},
{label:"S1 Changes", items:["Increased: tachycardia, mitral stenosis","Decreased: mitral regurgitation, HF"]},
{label:"S2 (2nd Sound)", items:["Closure of aortic + pulmonary","Diastole onset","Best at base"]},
{label:"S2 Changes", items:["Increased: hypertension","Decreased: aortic stenosis"]}
]
},
{
n:12, title:"Scheme of Questioning",
branches:[
{label:"Steps", items:["Introduce yourself","Establish rapport","Obtain chief complaint","Clarify details","Anamnesis morbi","Anamnesis vitae"]},
{label:"Question Types", items:["Open: 'What brought you here?'","Closed: 'Do you have fever?'"]},
{label:"Purpose", items:["Obtain complete & accurate clinical info"]}
]
},
{
n:13, title:"Chest Palpation",
branches:[
{label:"Steps", items:["Compare both sides","Chest symmetry","Respiratory movement","Vocal fremitus","Tenderness","Chest elasticity"]},
{label:"Pathological", items:["↑ fremitus → consolidation","↓ fremitus → pleural effusion/pneumothorax","Reduced elasticity → emphysema"]}
]
},
{
n:14, title:"Auscultation of Heart",
branches:[
{label:"Patient Position", items:["Sitting","Supine","Left lateral"]},
{label:"Sequence", items:["1. Mitral area","2. Aortic area","3. Pulmonary area","4. Tricuspid area","5. Erb's point"]},
{label:"Assess", items:["Rhythm","Heart sounds","Murmurs"]}
]
},
{
n:15, title:"Respiratory Exam Sequence",
branches:[
{label:"Inspection", items:["Chest shape","Respiratory rate","Symmetry"]},
{label:"Palpation", items:["Fremitus","Elasticity"]},
{label:"Percussion", items:["Lung borders","Percussion sound"]},
{label:"Auscultation", items:["Breath sounds","Added sounds"]}
]
},
{
n:16, title:"Auscultation of Lungs",
branches:[
{label:"Technique", items:["Compare symmetrical areas","Patient breathes deeply (mouth)"]},
{label:"Vesicular Breathing", items:["Soft inspiration","Short expiration","Over lung fields"]},
{label:"Bronchial Breathing", items:["Loud, tubular","Normal over trachea","Pathological over lungs → consolidation"]}
]
},
{
n:17, title:"Pulse Characteristics",
branches:[
{label:"Assess", items:["Rate","Rhythm","Tension","Filling","Form","Symmetry"]},
{label:"Normal", items:["60–100 beats/min","Regular rhythm"]},
{label:"Abnormal", items:["Tachycardia >100","Bradycardia <60"]}
]
},
{
n:18, title:"Extra Heart Sounds S3 & S4",
branches:[
{label:"S3", items:["Early diastolic sound","Rapid ventricular filling","Heart failure","Dilated cardiomyopathy"]},
{label:"S4", items:["Late diastolic sound","Atrial contraction against stiff ventricle","Hypertension","LV hypertrophy"]}
]
},
{
n:19, title:"Cardiovascular Physical Exam",
branches:[
{label:"Inspection", items:["Chest deformity","Pulsations"]},
{label:"Palpation", items:["Apical impulse","Cardiac impulse"]},
{label:"Percussion", items:["Heart borders","Cardiac dullness"]},
{label:"Auscultation", items:["Heart sounds","Murmurs"]}
]
},
{
n:20, title:"ECG Electrode Placement",
branches:[
{label:"Limb Leads", items:["Lead I → RA–LA","Lead II → RA–LL","Lead III → LA–LL"]},
{label:"Augmented Leads", items:["aVR","aVL","aVF"]},
{label:"Precordial V1-V3", items:["V1 → 4th ICS R sternal","V2 → 4th ICS L sternal","V3 → between V2–V4"]},
{label:"Precordial V4-V6", items:["V4 → 5th ICS MCL","V5 → anterior axillary","V6 → midaxillary"]}
]
},
{
n:21, title:"Palpation: Apical Impulse",
branches:[
{label:"Definition", items:["Palpable pulsation from LV contraction"]},
{label:"Normal", items:["L 5th ICS, midclavicular line","Area: 1–2 cm","Moderate strength"]},
{label:"Pathological", items:["L displacement → LV hypertrophy/dilatation","↑ force → hyperdynamic circulation","Weak/absent → obesity, emphysema"]},
{label:"Steps", items:["Patient supine","Palm over precordium","Localize with fingertips","Assess: location, area, force, height"]}
]
},
{
n:22, title:"ECG Normal Values",
branches:[
{label:"Leads", items:["Limb: I, II, III","Augmented: aVR, aVL, aVF","Chest: V1–V6"]},
{label:"Normal Values", items:["HR: 60–100/min","Sinus rhythm","Axis: –30° to +90°"]},
{label:"Sinus Rhythm Criteria", items:["Every P wave → QRS","Regular RR interval"]}
]
},
{
n:23, title:"Auscultation: 4 Standard Points",
branches:[
{label:"Mitral Valve", items:["Apex (L 5th ICS MCL)"]},
{label:"Aortic Valve", items:["R 2nd ICS parasternal"]},
{label:"Pulmonary Valve", items:["L 2nd ICS parasternal"]},
{label:"Tricuspid Valve", items:["Lower L sternal border"]},
{label:"Erb's Point", items:["Additional evaluation"]}
]
},
{
n:24, title:"Peripheral Arteries & Veins",
branches:[
{label:"Inspection Findings", items:["Varicose veins → venous insufficiency","Spider veins → superficial dilation","Visible pulsation → ↑ pulse pressure","Edema → venous/cardiac disease"]},
{label:"Significance", items:["Evaluate peripheral circulation","Cardiovascular disease assessment"]}
]
},
{
n:25, title:"Cardiac Dullness",
branches:[
{label:"Relative Dullness", items:["Partly covered by lungs"]},
{label:"Absolute Dullness", items:["Directly contacts chest wall"]},
{label:"Technique", items:["Quiet percussion from lung → heart"]},
{label:"Normal Borders", items:["Right: R sternal border","Left: 1–2 cm medial MCL","Upper: 3rd rib"]},
{label:"Significance", items:["Enlargement → cardiomegaly","Shift → pleural/mediastinal disease"]}
]
},
{
n:26, title:"ECG Waves & Intervals",
branches:[
{label:"P Wave", items:["Atrial depolarization","Duration ≤0.12 s"]},
{label:"PR Interval", items:["AV conduction","Normal: 0.12–0.20 s"]},
{label:"QRS Complex", items:["Ventricular depolarization","Normal: <0.12 s"]},
{label:"QT Interval", items:["Ventricular electrical systole","QTc <440–460 ms"]},
{label:"T Wave", items:["Ventricular repolarization"]}
]
},
{
n:27, title:"Blood Pressure Measurement",
branches:[
{label:"Technique", items:["Rest 5 min","Correct cuff size","Arm at heart level","Inflate → deflate slowly","Korotkoff sounds"]},
{label:"Korotkoff", items:["1st sound → systolic BP","Disappearance → diastolic BP"]},
{label:"Normal", items:["~120/80 mmHg"]},
{label:"Errors", items:["Wrong cuff","Talking","Arm unsupported","Rapid deflation"]}
]
},
{
n:28, title:"Principles of Physical Exam",
branches:[
{label:"Requirements", items:["Good lighting","Comfortable temperature","Privacy maintained"]},
{label:"Position", items:["Physician on patient's right","Patient relaxed"]},
{label:"Sequence", items:["History → Inspection","Palpation → Percussion → Auscultation"]},
{label:"Maintain", items:["Comfort","Respect","Dignity"]}
]
},
{
n:29, title:"Pulse Assessment",
branches:[
{label:"Technique", items:["Palpate radial artery","Index + middle fingers"]},
{label:"Assess", items:["Rate","Rhythm","Tension","Filling","Form","Symmetry"]},
{label:"Normal", items:["60–100/min","Regular"]},
{label:"Pathological", items:["Tachycardia","Bradycardia","Irregular","Weak/thready"]}
]
},
{
n:30, title:"ECG: Definition & Indications",
branches:[
{label:"Definition", items:["Recording of heart's electrical activity"]},
{label:"Indications", items:["Chest pain","Arrhythmia","Syncope","Hypertension","Myocardial infarction"]},
{label:"12 Leads", items:["Limb: I, II, III","Augmented: aVR, aVL, aVF","Precordial: V1–V6"]},
{label:"Lead Regions", items:["Inferior: II, III, aVF","Lateral: I, aVL, V5–V6","Septal/Anterior: V1–V4"]}
]
},
{
n:31, title:"BP: Physiological Determinants",
branches:[
{label:"Formula", items:["BP = CO × PVR","CO = cardiac output","PVR = peripheral vascular resistance"]},
{label:"Normal", items:["~120/80 mmHg"]},
{label:"Abnormal", items:["Hypertension: ≥140/90","Hypotension: <90/60"]},
{label:"Accuracy Factors", items:["Cuff size","Stress/anxiety","Exercise","Caffeine","Arm position"]}
]
},
{
n:32, title:"Heart Murmurs",
branches:[
{label:"Definition", items:["Turbulent blood flow sounds"]},
{label:"Systolic Murmurs", items:["Mitral regurgitation","Aortic stenosis"]},
{label:"Diastolic Murmurs", items:["Mitral stenosis","Aortic regurgitation"]},
{label:"Mechanism", items:["Valve stenosis","Valve regurgitation","Increased blood flow"]},
{label:"Characteristics", items:["Timing","Intensity","Pitch","Radiation"]}
]
},
{
n:33, title:"Bronchial Obstruction Syndrome",
branches:[
{label:"Definition", items:["Reduced expiratory airflow"]},
{label:"Pathophysiology", items:["Bronchospasm","Mucosal edema","Increased mucus","Airway narrowing"]},
{label:"Clinical", items:["Expiratory dyspnea","Cough + viscid sputum","Wheezing"]},
{label:"Exam Findings", items:["Percussion: box sound","Auscultation: harsh vesicular","Prolonged expiration + dry rales"]}
]
},
{
n:34, title:"Emphysema Syndrome",
branches:[
{label:"Definition", items:["Permanent alveolar space enlargement","Destruction of alveoli"]},
{label:"Etiology", items:["Chronic bronchitis","Asthma","Smoking","Occupational exposure"]},
{label:"Clinical", items:["Expiratory dyspnea","Barrel chest","Accessory muscle use"]},
{label:"Exam Findings", items:["Percussion: hyperresonant","Auscultation: ↓ vesicular","Spirometry: ↓FEV1, ↓FVC"]}
]
},
{
n:35, title:"Pulmonary Compaction Syndrome",
branches:[
{label:"Causes", items:["Pneumonia","Atelectasis","Pulmonary fibrosis"]},
{label:"Findings", items:["Reduced chest expansion","↑ vocal fremitus","Dull percussion","Bronchial breathing","Crepitations"]},
{label:"Meaning", items:["Consolidation of lung tissue"]}
]
},
{
n:36, title:"Fluid in Pleural Cavity",
branches:[
{label:"Causes", items:["Hydrothorax","Pleural effusion"]},
{label:"Clinical Signs", items:["Dyspnea","Chest asymmetry","Lagging of affected side"]},
{label:"Palpation", items:["Decreased fremitus"]},
{label:"Percussion", items:["Absolute dullness"]},
{label:"Auscultation", items:["Reduced/absent breath sounds"]}
]
},
{
n:37, title:"Pneumothorax Syndrome",
branches:[
{label:"Types", items:["Spontaneous","Traumatic","Tension"]},
{label:"Clinical", items:["Sudden chest pain","Dyspnea"]},
{label:"Findings", items:["↓ chest movement","Absent fremitus","Tympanic percussion","Absent breath sounds"]}
]
},
{
n:38, title:"Lung Cavity Syndrome",
branches:[
{label:"Detection Conditions", items:["Large cavity","Connected to bronchus","Near chest wall"]},
{label:"Examples", items:["Lung abscess","TB cavity"]},
{label:"Findings", items:["Tympanic percussion","Amphoric/bronchial breathing","Copious sputum"]},
{label:"Sputum", items:["May show layering","Foul odor"]}
]
},
{
n:39, title:"Bronchiectasis Syndrome",
branches:[
{label:"Definition", items:["Permanent abnormal bronchial dilation"]},
{label:"Clinical Features", items:["Chronic productive cough","Purulent sputum","Hemoptysis"]},
{label:"Examination", items:["Coarse crackles","Wheezing"]},
{label:"Diagnosis", items:["HRCT = gold standard"]}
]
},
{
n:40, title:"Respiratory Failure Syndrome",
branches:[
{label:"Definition", items:["Impaired blood gas composition"]},
{label:"By Mechanism", items:["Obstructive","Restrictive","Mixed"]},
{label:"By Degree", items:["I – compensated","II – subcompensated","III – decompensated"]},
{label:"Spirometry", items:["Obstructive: ↓FEV1, FEV1/FVC <70%","Restrictive: ↓VC, normal/↑ ratio"]}
]
},
{
n:41, title:"Respiratory Failure (Clinical)",
branches:[
{label:"Definition", items:["Cannot maintain normal O2/CO2"]},
{label:"Clinical Features", items:["Dyspnea","Tachypnea","Cyanosis","Accessory muscles","Fatigue"]},
{label:"Physical Findings", items:["↑ respiratory effort","Tachycardia","Possible cyanosis"]},
{label:"Tests", items:["ABG – gold standard","Pulse oximetry","Spirometry","Chest X-ray"]}
]
},
{
n:42, title:"Cor Pulmonale Syndrome",
branches:[
{label:"Definition", items:["RV hypertrophy from pulmonary disease"]},
{label:"Pathophysiology", items:["Lung disease → pulmonary HTN","→ RV overload → RV hypertrophy/failure"]},
{label:"Clinical", items:["Dyspnea, fatigue, cyanosis","Peripheral edema","Jugular venous distension"]},
{label:"Exam", items:["Epigastric pulsation","Accentuated P2","Tricuspid murmur"]}
]
},
{
n:43, title:"Spirometry",
branches:[
{label:"Indications", items:["Dyspnea","COPD","Asthma","Respiratory failure"]},
{label:"Parameters", items:["VC","FVC","FEV1","FEV1/FVC (Tiffeneau index)"]},
{label:"Technique", items:["Deep inspiration","Forceful expiration into spirometer"]},
{label:"Interpretation", items:["Obstructive: ↓FEV1, FEV1/FVC <70%","Restrictive: ↓VC, normal/↑ ratio"]}
]
},
{
n:44, title:"Spirometry: Bronchodilator Test",
branches:[
{label:"Indications", items:["Suspected asthma","Reversible airway obstruction"]},
{label:"Procedure", items:["Baseline spirometry","Administer bronchodilator","Repeat after 10–15 min"]},
{label:"Positive Test", items:["FEV1 ↑ ≥12% AND ≥200 mL"]},
{label:"Significance", items:["Indicates reversible obstruction"]}
]
},
{
n:45, title:"Thoracentesis",
branches:[
{label:"Indications", items:["Pleural effusion","Diagnostic fluid analysis","Therapeutic drainage"]},
{label:"Contraindications", items:["Severe coagulopathy","Infection at site"]},
{label:"Technique", items:["Patient sitting","7th–9th ICS","Needle above upper rib border"]},
{label:"Complications", items:["Pneumothorax","Bleeding","Infection"]},
{label:"Fluid Analysis", items:["Macroscopic: color, clarity","Microscopic: cells, bacteria"]}
]
},
{
n:46, title:"Sputum Analysis",
branches:[
{label:"Collection", items:["Morning sample","Sterile container","Deep cough specimen"]},
{label:"Macroscopic", items:["Color","Odor","Consistency","Layering"]},
{label:"Microscopy", items:["Leukocytes","RBCs","Bacteria","AFB"]},
{label:"Significance", items:["Pneumonia → purulent","Abscess → foul smell","Bronchiectasis → layered","TB → AFB positive"]}
]
},
{
n:47, title:"Chest X-ray",
branches:[
{label:"Projections", items:["PA (posteroanterior)","Lateral"]},
{label:"Normal Anatomy", items:["Clear lung fields","Cardiac silhouette","Diaphragm"]},
{label:"Radiological Signs", items:["Pneumonia → consolidation","Effusion → homogeneous opacity","Pneumothorax → hyperlucency","Emphysema → translucency, low diaphragm"]}
]
},
{
n:48, title:"Adventitious Breath Sounds",
branches:[
{label:"Dry Wheezes", items:["Rhonchi","Sibilant","Cause: narrowed bronchi"]},
{label:"Moist Rales", items:["Fine / Medium / Coarse","Cause: air through fluid"]},
{label:"Pleural Friction Rub", items:["Rough rubbing sound","Does NOT disappear after cough"]}
]
},
{
n:49, title:"Myocarditis Syndrome",
branches:[
{label:"Clinical Features", items:["Chest pain","Fatigue","Dyspnea","Palpitations"]},
{label:"Physical Findings", items:["Tachycardia","Weak heart sounds"]},
{label:"ECG", items:["ST–T changes","Arrhythmias"]},
{label:"Laboratory", items:["Troponin ↑","CK-MB ↑","CRP ↑","ESR ↑"]}
]
},
{
n:50, title:"Endocarditis Syndrome",
branches:[
{label:"Definition", items:["Inflammation of endocardium (usually valves)"]},
{label:"Clinical Signs", items:["Fever","Fatigue","Weight loss"]},
{label:"Physical Findings", items:["New/changing murmur","Splenomegaly","Petechiae"]},
{label:"Investigations", items:["Blood cultures","Echocardiography"]}
]
},
{
n:51, title:"Pericarditis: Dry vs Effusive",
branches:[
{label:"Dry Pericarditis", items:["Sharp chest pain","Worse on inspiration","Relieved sitting forward","Friction rub (scratchy)"]},
{label:"Dry ECG", items:["Diffuse ST elevation","PR depression"]},
{label:"Effusive", items:["Dyspnea","Chest heaviness","Muffled heart sounds","Enlarged cardiac dullness"]}
]
},
{
n:52, title:"Arterial Hypertension: Classification",
branches:[
{label:"WHO/ESH Grade", items:["Grade 1: 140–159/90–99","Grade 2: 160–179/100–109","Grade 3: ≥180/≥110"]},
{label:"Stages", items:["Stage I: no organ damage","Stage II: organ damage","Stage III: associated disease"]},
{label:"Target Organ Damage", items:["Heart → LV hypertrophy","Brain → stroke","Kidney → nephropathy","Retina → retinopathy"]}
]
},
{
n:53, title:"Arterial Hypertension: Clinical Picture",
branches:[
{label:"Etiology", items:["Essential (primary)","Secondary"]},
{label:"Risk Factors", items:["Family history","Obesity","Smoking","Stress","High salt intake"]},
{label:"Clinical", items:["Headache","Dizziness","Palpitations","Visual disturbance"]},
{label:"Investigations", items:["CBC, lipid profile, creatinine","ECG, Echocardiography, Fundoscopy"]}
]
},
{
n:54, title:"Acute Coronary Insufficiency",
branches:[
{label:"Classification", items:["Unstable angina","NSTEMI","STEMI"]},
{label:"ECG: Unstable Angina", items:["ST depression/T inversion (possible)"]},
{label:"ECG: NSTEMI", items:["ST depression ± T inversion"]},
{label:"ECG: STEMI", items:["ST elevation"]}
]
},
{
n:55, title:"ACS: Clinical Findings",
branches:[
{label:"Clinical Picture", items:["Severe chest pain >20 min","Radiation to L arm/jaw","Sweating","Dyspnea"]},
{label:"Laboratory", items:["Troponin ↑","CK-MB ↑"]},
{label:"Instrumental", items:["ECG","Echocardiography","Coronary angiography"]}
]
},
{
n:56, title:"Chronic Coronary Insufficiency",
branches:[
{label:"Definition", items:["Long-term myocardial ischemia","Reduced coronary blood supply"]},
{label:"Clinical", items:["Stable exertional angina","Exercise intolerance"]},
{label:"Laboratory", items:["Lipid abnormalities"]},
{label:"Instrumental", items:["ECG","Stress testing","Echo","Coronary angiography"]}
]
},
{
n:57, title:"Acute LV Failure (Pulmonary Edema)",
branches:[
{label:"Pathophysiology", items:["LV dysfunction → pulmonary venous congestion → alveolar edema"]},
{label:"Clinical Signs", items:["Severe dyspnea","Orthopnea","Pink frothy sputum","Cyanosis"]},
{label:"Examination", items:["Tachycardia","Bilateral crackles"]}
]
},
{
n:58, title:"Acute RV Failure",
branches:[
{label:"Pathophysiology", items:["RV pump failure → systemic venous congestion"]},
{label:"Clinical Signs", items:["Peripheral edema","Raised JVP","Hepatomegaly","Ascites"]},
{label:"Findings", items:["Cyanosis","Weakness"]}
]
},
{
n:59, title:"Chronic Heart Failure",
branches:[
{label:"NYHA I-II", items:["I: no limitation","II: slight limitation with exertion"]},
{label:"NYHA III-IV", items:["III: marked limitation","IV: symptoms at rest"]},
{label:"Clinical Signs", items:["Dyspnea","Fatigue","Edema","Orthopnea"]},
{label:"Investigations", items:["BNP/NT-proBNP","ECG","Echocardiography","Chest X-ray"]}
]
},
{
n:60, title:"Supraventricular Extrasystole",
branches:[
{label:"ECG Criteria", items:["Premature P wave","Normal/narrow QRS","Incomplete compensatory pause","Abnormal P morphology"]},
{label:"Clinical Significance", items:["Often benign","May cause palpitations"]}
]
},
{
n:61, title:"Ventricular Extrasystole",
branches:[
{label:"ECG Criteria", items:["Premature ventricular complex (PVC)","Wide/deformed QRS >0.12 s","No preceding P wave","Full compensatory pause","T wave opposite QRS"]},
{label:"Types", items:["Monomorphic","Polymorphic","Bigeminy, trigeminy"]},
{label:"Clinical", items:["Palpitations","May occur in ischemia/myocarditis"]}
]
},
{
n:62, title:"Ventricular Fibrillation & Flutter",
branches:[
{label:"Ventricular Flutter ECG", items:["Rapid regular ventricular activity","Rate 150–300/min","Large sine-wave pattern"]},
{label:"Ventricular Fibrillation ECG", items:["Chaotic irregular waves","No identifiable P, QRS, T"]},
{label:"Significance", items:["No effective cardiac output","Medical emergency - requires defibrillation"]}
]
},
{
n:63, title:"Atrial Fibrillation",
branches:[
{label:"Classification", items:["Paroxysmal","Persistent","Long-standing persistent","Permanent"]},
{label:"ECG Signs", items:["No visible P waves","Irregular RR intervals","Fibrillatory (f) waves","Usually narrow QRS"]},
{label:"Clinical", items:["Palpitations","Fatigue","Irregular pulse"]}
]
},
{
n:64, title:"SVT & Atrial Flutter",
branches:[
{label:"SVT ECG", items:["HR 150–250/min","Narrow QRS","P waves absent/abnormal"]},
{label:"Atrial Flutter ECG", items:["Saw-tooth F waves","Atrial rate 250–350/min","Regular ventricular response"]},
{label:"Clinical", items:["Sudden palpitations","Dizziness"]}
]
},
{
n:65, title:"AV Block Syndrome",
branches:[
{label:"1st Degree", items:["PR >0.20 s","All P waves conducted"]},
{label:"2nd Degree: Mobitz I", items:["Progressive PR prolongation","→ Dropped QRS (Wenckebach)"]},
{label:"2nd Degree: Mobitz II", items:["Constant PR","Sudden dropped QRS"]},
{label:"3rd Degree (Complete)", items:["Complete AV dissociation","Independent atrial + ventricular rhythm"]}
]
},
{
n:66, title:"Bundle Branch Block",
branches:[
{label:"RBBB ECG", items:["QRS ≥0.12 s","rSR' pattern in V1","Wide S in V5–V6"]},
{label:"LBBB ECG", items:["Wide QRS ≥0.12 s","Broad/notched R in V5–V6","Deep S in V1"]},
{label:"Significance", items:["Indicates conduction abnormality"]}
]
},
{
n:67, title:"LV Hypertrophy Syndrome",
branches:[
{label:"Clinical Signs", items:["Displaced apical impulse","Loud A2","Signs of hypertension"]},
{label:"ECG: Sokolov-Lyon", items:["SV1 + RV5/V6 ≥35 mm"]},
{label:"ECG: Cornell", items:["RaVL + SV3 >28 mm (men)",">20 mm (women)"]},
{label:"Confirmation", items:["Echocardiography"]}
]
},
{
n:68, title:"RV Hypertrophy Syndrome",
branches:[
{label:"Causes", items:["Pulmonary hypertension","COPD","Cor pulmonale","Congenital heart disease"]},
{label:"ECG Criteria", items:["Right axis deviation","Tall R in V1","Deep S in V5–V6"]},
{label:"Clinical Signs", items:["RV heave","Accentuated P2"]}
]
},
{
n:69, title:"Mitral Stenosis Syndrome",
branches:[
{label:"Mechanism", items:["Mitral narrowing → impaired LV filling","↑ left atrial pressure"]},
{label:"Clinical Signs", items:["Dyspnea","Hemoptysis","Fatigue"]},
{label:"Physical Exam", items:["Malar flush","Loud S1","Opening snap","Mid-diastolic murmur at apex"]}
]
},
{
n:70, title:"Mitral Regurgitation Syndrome",
branches:[
{label:"Mechanism", items:["Backflow LV → LA during systole"]},
{label:"Clinical Signs", items:["Dyspnea","Fatigue","Palpitations"]},
{label:"Physical Findings", items:["Displaced hyperdynamic apex","Soft S1","Holosystolic murmur → axilla"]}
]
},
{
n:71, title:"Aortic Stenosis Syndrome",
branches:[
{label:"Mechanism", items:["Narrowing of aortic valve","LV outflow obstruction → pressure overload → LVH"]},
{label:"Classic Triad", items:["Exertional dyspnea","Angina","Syncope"]},
{label:"Physical Exam", items:["Pulsus parvus et tardus","Heaving apex","Systolic ejection murmur","Murmur radiates to carotids","Soft/absent A2"]}
]
},
{
n:72, title:"Aortic Regurgitation Syndrome",
branches:[
{label:"Mechanism", items:["Backflow aorta → LV during diastole","Volume overload → LV dilatation"]},
{label:"Clinical Signs", items:["Palpitations","Dyspnea","Fatigue"]},
{label:"Physical Findings", items:["Wide pulse pressure","Water-hammer pulse","Displaced apex","Early diastolic decrescendo murmur"]}
]
},
{
n:73, title:"Echocardiography",
branches:[
{label:"Indications", items:["Murmurs","Heart failure","Valve disease","Cardiomyopathy","Pericardial disease"]},
{label:"Parameters", items:["EF (ejection fraction)","EDV & ESV","Wall thickness","Valve morphology","Diastolic function"]},
{label:"Diagnostic Role", items:["Detects hypertrophy","Measures ventricular function","Evaluates valve lesions","Confirms cardiac syndromes"]}
]
},
{
n:74, title:"Palpation: Aortic Arch",
branches:[
{label:"Technique", items:["Patient relaxed","Palpate suprasternal notch gently"]},
{label:"Normal", items:["Usually not palpable"]},
{label:"Pathological", items:["Strong pulsation → aortic aneurysm or hypertension"]}
]
},
{
n:75, title:"Inspection: Chest Type",
branches:[
{label:"Normal Types", items:["Normal","Asthenic","Hypersthenic"]},
{label:"Pathological Types", items:["Barrel chest","Paralytic","Rachitic"]},
{label:"Significance", items:["Barrel → emphysema","Paralytic → chronic wasting disease"]}
]
},
{
n:76, title:"Inspection: Breathing Parameters",
branches:[
{label:"Assess", items:["Respiratory rate","Rhythm","Depth","Type","Symmetry"]},
{label:"Normal", items:["RR: 12–20/min","Thoracic/abdominal/mixed"]},
{label:"Abnormal", items:["Tachypnea / Bradypnea","Cheyne-Stokes","Kussmaul breathing"]}
]
},
{
n:77, title:"Inspection of Heart Area (Practical)",
branches:[
{label:"Assess", items:["Visible pulsations","Apex beat","Cardiac hump","Epigastric pulsation"]},
{label:"Normal", items:["Mild apical impulse only"]},
{label:"Pathological", items:["Strong apex → LV hypertrophy","Epigastric pulsation → RV enlargement"]}
]
},
{
n:78, title:"Lower Borders of Right Lung",
branches:[
{label:"Technique", items:["Topographic percussion","Percuss downward until resonance → dullness"]},
{label:"Normal Borders", items:["Midclavicular → 6th rib","Midaxillary → 8th rib","Scapular → 10th rib"]},
{label:"Significance", items:["Lower border ↓ → emphysema","Higher border ↑ → pleural effusion"]}
]
},
{
n:79, title:"Lung Apex Percussion",
branches:[
{label:"Technique", items:["Percuss upward from supraclavicular area"]},
{label:"Normal", items:["3–4 cm above clavicle","Posterior: ~C7 level"]},
{label:"Significance", items:["Elevated apex → fibrosis","Lowered apex → emphysema"]}
]
},
{
n:80, title:"Palpation: Epigastric Pulsation",
branches:[
{label:"Technique", items:["Patient supine","Fingers below xiphoid","Assess pulsation"]},
{label:"Normal", items:["Minimal pulsation"]},
{label:"Pathological", items:["Strong pulsation → RV hypertrophy","Aortic pulsation → abdominal aortic enlargement"]}
]
},
{
n:81, title:"Palpation: Cardiac Impulse",
branches:[
{label:"Definition", items:["Palpable movement of chest wall from cardiac contraction"]},
{label:"Technique", items:["Supine position","Palm over precordium","Localize with fingertips"]},
{label:"Assess", items:["Location","Area","Strength","Duration"]},
{label:"Pathological", items:["Strong impulse → ventricular hypertrophy"]}
]
},
{
n:82, title:"Palpation: Vascular Bundle",
branches:[
{label:"Technique", items:["Patient relaxed","Palpate along upper sternum","Assess width + pulsation"]},
{label:"Normal", items:["Width ~5–6 cm"]},
{label:"Pathological", items:["Widening → aortic dilatation","Mediastinal enlargement"]}
]
},
{
n:83, title:"Palpation: Apical Impulse (Practical)",
branches:[
{label:"Technique", items:["Supine (left lateral if difficult)","Use fingertips","Locate apex"]},
{label:"Assess", items:["Position","Area","Strength","Height","Resistance"]},
{label:"Normal", items:["L 5th ICS near MCL","Diameter 1–2 cm"]},
{label:"Significance", items:["L displacement → LV enlargement","Strong → hypertrophy","Weak → emphysema"]}
]
},
{
n:84, title:"Superficial Abdominal Palpation",
branches:[
{label:"Purpose", items:["Assess tenderness","Muscle guarding","Superficial masses"]},
{label:"Technique", items:["Patient supine","Warm hands","Start away from pain","Palpate lightly"]},
{label:"Evaluate", items:["Tenderness","Muscle tone","Resistance"]},
{label:"Abnormal", items:["Guarding","Rigidity","Local pain"]}
]
},
{
n:85, title:"Auscultation: Bronchial Breathing",
branches:[
{label:"Technique", items:["Compare symmetrical lung areas"]},
{label:"Characteristics", items:["Loud, high-pitched","Expiration ≥ inspiration"]},
{label:"Normal Location", items:["Trachea"]},
{label:"Pathological Causes", items:["Pneumonia","Pulmonary consolidation","Lung cavity"]}
]
},
{
n:86, title:"Auscultation: Vesicular Breathing",
branches:[
{label:"Technique", items:["Patient breathes through mouth","Compare both sides"]},
{label:"Characteristics", items:["Soft inspiration","Short quiet expiration"]},
{label:"Normal", items:["Over most lung fields"]},
{label:"Reduced In", items:["Emphysema","Pleural effusion","Pneumothorax"]}
]
},
{
n:87, title:"Palpation of Chest (Practical)",
branches:[
{label:"Technique", items:["Compare both sides","Assess expansion, elasticity,","tenderness, vocal fremitus"]},
{label:"Normal", items:["Symmetrical movement"]},
{label:"Pathological", items:["↑ fremitus → consolidation","↓ fremitus → effusion/pneumothorax"]}
]
},
{
n:88, title:"Comparative Percussion of Lungs",
branches:[
{label:"Technique", items:["Percuss symmetrical points","Compare side to side","Patient sits upright"]},
{label:"Normal", items:["Clear pulmonary sound"]},
{label:"Abnormal", items:["Dull → consolidation","Hyperresonant → emphysema","Tympanic → cavity/pneumothorax"]}
]
},
{
n:89, title:"Auscultation of Heart (Practical)",
branches:[
{label:"Sequence", items:["1. Mitral area (apex)","2. Aortic area","3. Pulmonary area","4. Tricuspid area","5. Erb's point"]},
{label:"Assess", items:["Rhythm & Rate","S1 and S2","Extra sounds","Murmurs"]},
{label:"Positions", items:["Sitting","Supine","Left lateral"]}
]
},
{
n:90, title:"Percussion: Relative Cardiac Dullness",
branches:[
{label:"Technique", items:["Quiet percussion","Move from lung → heart","Determine borders"]},
{label:"Normal Borders", items:["Right: R sternal border","Upper: 3rd rib","Left: 1–2 cm medial MCL"]},
{label:"Clinical Significance", items:["Enlargement → cardiomegaly","L shift → LV enlargement","R shift → RV enlargement"]}
]
}
];
// ========== Cover slide ==========
{
let slide = pres.addSlide();
slide.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:7.5, fill:{color:BG_DARK}});
// Decorative accent
slide.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:1.2, fill:{color:"0A3D55"}});
slide.addShape(pres.ShapeType.rect, {x:0,y:6.3,w:13.3,h:1.2, fill:{color:"0A3D55"}});
// Main title
slide.addText("Clinical Medicine", {
x:1, y:1.5, w:11.3, h:1.2,
fontSize:44, bold:true, color:"7ED4F5", align:"center"
});
slide.addText("Mind Map Study Guide", {
x:1, y:2.8, w:11.3, h:0.8,
fontSize:28, color:"AADDEE", align:"center"
});
slide.addText("Questions 1 – 90", {
x:1, y:3.65, w:11.3, h:0.6,
fontSize:20, color:"E8534A", align:"center", bold:true
});
slide.addText("Internal Medicine • Physical Examination • ECG • Syndromes", {
x:1, y:4.4, w:11.3, h:0.5,
fontSize:14, color:"88AACC", align:"center"
});
// Bottom bar
slide.addText("Easy Mind Mapping Edition", {
x:1, y:6.4, w:11.3, h:0.55,
fontSize:13, color:"5588AA", align:"center"
});
}
// ========== Generate all question slides ==========
questions.forEach(q => {
addMindMap(pres, q.n, q.title, q.branches);
});
// ========== Write file ==========
pres.writeFile({ fileName: "/home/daytona/workspace/mindmaps/Clinical_Medicine_MindMaps_Q1-Q90.pptx" })
.then(() => console.log("Done! File saved."))
.catch(err => console.error("Error:", err));
cd /home/daytona/workspace/mindmaps && node mindmap.js 2>&1
ls -lh /home/daytona/workspace/mindmaps/Clinical_Medicine_MindMaps_Q1-Q90.pptx
Clinical Medicine MindMaps Q1 Q90
Presentation · PPTX
Create a summary PDF with key definitions for quick review
~/mindmaps/build_summary_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.pdfgen import canvas as pdfcanvas
OUTPUT = "/home/daytona/workspace/mindmaps/Clinical_Medicine_Summary_Q1-Q90.pdf"
# ─── Colours ────────────────────────────────────────────────────────────────
C_BG = colors.HexColor("#0D1B2A")
C_HEADER = colors.HexColor("#1A6B8A")
C_ACCENT = colors.HexColor("#7ED4F5")
C_SECTION = colors.HexColor("#E8534A")
C_GOLD = colors.HexColor("#F0A500")
C_GREEN = colors.HexColor("#3DBE8A")
C_WHITE = colors.white
C_LIGHT = colors.HexColor("#CCDDEE")
C_MIDBLUE = colors.HexColor("#1B2A3B")
C_TEXT = colors.HexColor("#DDE8F0")
C_SUBTLE = colors.HexColor("#88AACC")
C_STRIPE1 = colors.HexColor("#0F2030")
C_STRIPE2 = colors.HexColor("#162535")
# ─── Page callbacks ──────────────────────────────────────────────────────────
def on_page(canvas, doc):
W, H = A4
# Dark background
canvas.saveState()
canvas.setFillColor(C_BG)
canvas.rect(0, 0, W, H, fill=1, stroke=0)
# Top header bar
canvas.setFillColor(C_MIDBLUE)
canvas.rect(0, H - 1.1*cm, W, 1.1*cm, fill=1, stroke=0)
canvas.setFillColor(C_ACCENT)
canvas.setFont("Helvetica-Bold", 9)
canvas.drawString(1.2*cm, H - 0.75*cm, "Clinical Medicine | Key Definitions Quick Review")
canvas.setFillColor(C_GOLD)
canvas.setFont("Helvetica", 9)
canvas.drawRightString(W - 1.2*cm, H - 0.75*cm, f"Page {doc.page}")
# Bottom bar
canvas.setFillColor(C_MIDBLUE)
canvas.rect(0, 0, W, 0.85*cm, fill=1, stroke=0)
canvas.setFillColor(C_SUBTLE)
canvas.setFont("Helvetica", 7.5)
canvas.drawCentredString(W/2, 0.28*cm, "Q1 – Q90 | Internal Medicine • Physical Examination • ECG • Clinical Syndromes")
canvas.restoreState()
# ─── Styles ──────────────────────────────────────────────────────────────────
def make_styles():
s = {}
base = ParagraphStyle
s['cover_title'] = base('cover_title',
fontName='Helvetica-Bold', fontSize=30, textColor=C_ACCENT,
alignment=TA_CENTER, spaceAfter=6, leading=36)
s['cover_sub'] = base('cover_sub',
fontName='Helvetica', fontSize=14, textColor=C_LIGHT,
alignment=TA_CENTER, spaceAfter=4)
s['cover_tag'] = base('cover_tag',
fontName='Helvetica-Bold', fontSize=11, textColor=C_GOLD,
alignment=TA_CENTER, spaceAfter=3)
s['section_heading'] = base('section_heading',
fontName='Helvetica-Bold', fontSize=13, textColor=C_ACCENT,
spaceBefore=14, spaceAfter=4, leading=16,
leftIndent=0, borderPad=0)
s['q_number'] = base('q_number',
fontName='Helvetica-Bold', fontSize=9, textColor=C_GOLD,
spaceBefore=2, spaceAfter=0, leading=11)
s['q_title'] = base('q_title',
fontName='Helvetica-Bold', fontSize=11, textColor=C_ACCENT,
spaceBefore=0, spaceAfter=2, leading=13)
s['def_label'] = base('def_label',
fontName='Helvetica-Bold', fontSize=9, textColor=C_GREEN,
spaceBefore=1, spaceAfter=0, leading=11)
s['def_text'] = base('def_text',
fontName='Helvetica', fontSize=9, textColor=C_TEXT,
spaceBefore=0, spaceAfter=2, leading=12, leftIndent=10)
s['bullet'] = base('bullet',
fontName='Helvetica', fontSize=8.5, textColor=C_TEXT,
spaceBefore=0, spaceAfter=1, leading=11, leftIndent=14,
bulletIndent=4)
s['toc_title'] = base('toc_title',
fontName='Helvetica-Bold', fontSize=16, textColor=C_ACCENT,
alignment=TA_CENTER, spaceBefore=0, spaceAfter=12)
s['toc_entry'] = base('toc_entry',
fontName='Helvetica', fontSize=8.5, textColor=C_TEXT,
spaceBefore=1, spaceAfter=1, leftIndent=0, leading=11)
s['normal'] = base('normal_dark',
fontName='Helvetica', fontSize=9, textColor=C_TEXT,
spaceBefore=2, spaceAfter=2, leading=12)
s['note'] = base('note',
fontName='Helvetica-Oblique', fontSize=8, textColor=C_SUBTLE,
spaceBefore=1, spaceAfter=2, leading=10, leftIndent=10)
return s
# ─── Data ────────────────────────────────────────────────────────────────────
# Each entry: (q_num, section, title, definition, key_points_list)
QUESTIONS = [
# SECTION 1: Clinical Interview & History
("SECTION 1", "CLINICAL INTERVIEW & HISTORY TAKING", None, None, None),
(1, None, "Classification of Complaints",
"Patient complaints are divided into main (chief) complaints — the primary reason for seeking help — and additional complaints, which are associated symptoms.",
["Chief complaints: chest pain, dyspnea, cough",
"Additional complaints: weakness, fever, sweating",
"Clinical example — Pneumonia: Chief = fever + cough; Additional = fatigue, chest pain"]),
(2, None, "Anamnesis Morbi (History of Present Illness)",
"A detailed chronological history of the current disease from its onset until the time of examination.",
["Onset time & mode (acute vs gradual)", "Course & progression", "Triggering factors",
"Previous investigations & treatments", "Helps establish diagnosis and severity"]),
(3, None, "Types of Diagnosis",
"Diagnosis progresses through four stages: preliminary (after history + exam), clinical (clinical + lab), differential (comparison with similar diseases), and final (confirmed).",
["Preliminary → Clinical → Differential → Final",
"Stages: History → Physical exam → Investigations → Differential → Final diagnosis"]),
(4, None, "Scheme of Medical History",
"The medical history is a scientific, medical, and legal document consisting of 10 key sections.",
["Sections: ID data, Chief complaints, Anamnesis morbi, Anamnesis vitae, Physical exam, Lab investigations, Instrumental studies, Diagnosis, Treatment, Follow-up",
"Importance: clinical continuity, academic documentation, legal evidence"]),
(5, None, "Anamnesis Vitae (Life History)",
"Collection of information about a patient's life and previous health, covering birth, occupation, lifestyle, allergies, past diseases, and family history.",
["Most important: smoking history, occupational exposure, allergies, chronic diseases, family history"]),
(12, None, "Scheme of Questioning a Patient",
"A structured 6-step process to obtain complete and accurate clinical information.",
["Steps: Introduce → Rapport → Chief complaint → Clarify → Anamnesis morbi → Anamnesis vitae",
"Open questions: 'What brought you here?'", "Closed questions: 'Do you have fever?'"]),
# SECTION 2: Physical Examination
("SECTION 2", "PHYSICAL EXAMINATION", None, None, None),
(6, None, "Physical Examination Methods",
"Four fundamental examination methods used in internal medicine.",
["Inspection – visual observation", "Palpation – examination by touch",
"Percussion – tapping to evaluate underlying structures",
"Auscultation – listening to body sounds",
"Respiratory sequence: Inspection → Palpation → Percussion → Auscultation"]),
(7, None, "Medical Ethics & Deontology",
"Deontology is the science of a physician's professional duties and conduct.",
["Principles: Beneficence, Non-maleficence, Autonomy, Confidentiality, Justice, Competence",
"Obligations: Respect dignity, obtain consent, maintain privacy, provide competent care"]),
(8, None, "Symptom, Syndrome, Diagnosis",
"A symptom is a subjective or objective sign of disease. A syndrome is a group of related symptoms/signs. A diagnosis is the identification of disease.",
["Relationship: Symptoms → Syndrome → Diagnosis",
"Example: Cough + fever + crepitations → Pulmonary consolidation syndrome → Pneumonia"]),
(28, None, "Principles of Physical Examination",
"Systematic examination performed in proper sequence with attention to patient comfort and dignity.",
["Requirements: good lighting, comfortable temperature, privacy",
"Position: physician on patient's right; patient relaxed",
"Sequence: History → Inspection → Palpation → Percussion → Auscultation"]),
# SECTION 3: Respiratory System
("SECTION 3", "RESPIRATORY SYSTEM", None, None, None),
(9, None, "Rules of Chest Percussion",
"Percussion is performed by comparing symmetrical areas, always moving from healthy to suspected areas.",
["Comparative: compare lung fields side by side",
"Topographic: determine organ borders",
"Sounds: Resonant (normal), Dull (consolidation/effusion), Hyperresonant (emphysema), Tympanic (air cavity)"]),
(13, None, "Chest Palpation",
"Bilateral comparison of chest symmetry, respiratory movement, vocal fremitus, tenderness, and elasticity.",
["Increased fremitus → consolidation",
"Decreased fremitus → pleural effusion or pneumothorax",
"Reduced elasticity → emphysema"]),
(15, None, "Respiratory Examination Sequence",
"Systematic 4-step approach to examining the respiratory system.",
["1. Inspection: chest shape, RR, symmetry",
"2. Palpation: fremitus, elasticity",
"3. Percussion: lung borders, percussion sound",
"4. Auscultation: breath sounds, added sounds"]),
(16, None, "Auscultation of Lungs",
"Compare symmetrical areas with the patient breathing deeply through the mouth.",
["Vesicular breathing: soft inspiration, short expiration — normal over lung fields",
"Bronchial breathing: loud, tubular — normal over trachea; pathological over lungs = consolidation"]),
(33, None, "Bronchial Obstruction Syndrome",
"Group of symptoms due to reduced expiratory airflow caused by bronchospasm, mucosal edema, increased mucus, or airway narrowing.",
["Clinical: expiratory dyspnea, cough with viscid sputum, wheezing",
"Percussion: box sound", "Auscultation: harsh vesicular, prolonged expiration, dry rales"]),
(34, None, "Emphysema Syndrome",
"Permanent enlargement of distal airspaces with alveolar destruction.",
["Etiology: chronic bronchitis, asthma, smoking, occupational exposure",
"Clinical: expiratory dyspnea, barrel chest, accessory muscle use",
"Percussion: hyperresonant (bandbox sound)", "Spirometry: decreased FEV1 and FVC"]),
(35, None, "Pulmonary Compaction Syndrome",
"Consolidation of lung tissue. Causes: pneumonia, atelectasis, pulmonary fibrosis.",
["Increased vocal fremitus", "Dull percussion", "Bronchial breathing", "Crepitations"]),
(36, None, "Fluid in Pleural Cavity",
"Accumulation of fluid (hydrothorax or pleural effusion) causing compression of the lung.",
["Clinical: dyspnea, chest asymmetry, lagging of affected side",
"Palpation: decreased fremitus", "Percussion: absolute dullness",
"Auscultation: reduced/absent breath sounds"]),
(37, None, "Pneumothorax Syndrome",
"Air in the pleural cavity. Types: spontaneous, traumatic, tension.",
["Clinical: sudden chest pain, dyspnea",
"Absent fremitus, tympanic percussion, absent breath sounds"]),
(38, None, "Lung Cavity Syndrome",
"Detectable when cavity is large, connected to bronchus, and near chest wall.",
["Examples: lung abscess, TB cavity",
"Tympanic percussion, amphoric/bronchial breathing, copious sputum"]),
(39, None, "Bronchiectasis Syndrome",
"Permanent abnormal dilation of bronchi.",
["Clinical: chronic productive cough, purulent sputum, hemoptysis",
"Coarse crackles, wheezing", "Diagnosis: HRCT (gold standard)"]),
(40, None, "Respiratory Failure Syndrome",
"Impaired blood gas composition due to failure of the respiratory system.",
["Obstructive: decreased FEV1, FEV1/FVC <70%",
"Restrictive: decreased VC, normal/increased ratio",
"Degrees: I compensated, II subcompensated, III decompensated"]),
(41, None, "Respiratory Failure (Clinical)",
"Inability to maintain normal blood O2 and CO2 levels.",
["Clinical: dyspnea, tachypnea, cyanosis, accessory muscles, fatigue",
"Gold standard test: Arterial Blood Gas (ABG)"]),
(47, None, "Chest X-ray",
"Standard projections: PA (posteroanterior) and lateral.",
["Pneumonia → consolidation opacity",
"Pleural effusion → homogeneous opacity",
"Pneumothorax → hyperlucency",
"Emphysema → increased translucency, low flat diaphragm"]),
(48, None, "Adventitious Breath Sounds",
"Abnormal sounds heard on auscultation of the lungs.",
["Dry wheezes (rhonchi, sibilant): narrowed bronchi",
"Moist rales (fine/medium/coarse): air passing through fluid",
"Pleural friction rub: rough scratching — does NOT disappear after coughing"]),
(43, None, "Spirometry",
"Measures lung function through forced breathing manoeuvres.",
["Key parameters: VC, FVC, FEV1, FEV1/FVC (Tiffeneau index)",
"Obstructive pattern: decreased FEV1, FEV1/FVC <70%",
"Restrictive pattern: decreased VC, normal or increased ratio"]),
(44, None, "Bronchodilator Test",
"Baseline spirometry followed by a bronchodilator, repeated after 10-15 minutes.",
["Positive test: FEV1 increases >=12% AND >=200 mL",
"Significance: indicates reversible airway obstruction (asthma)"]),
(45, None, "Thoracentesis (Pleural Puncture)",
"Invasive procedure to remove fluid from the pleural cavity.",
["Indications: pleural effusion, diagnostic analysis, therapeutic drainage",
"Site: 7th-9th ICS, needle inserted above upper rib border",
"Complications: pneumothorax, bleeding, infection"]),
(46, None, "Sputum Analysis",
"Morning deep-cough specimen collected in a sterile container.",
["Macroscopic: color, odor, consistency, layering",
"Microscopy: leukocytes, RBCs, bacteria, acid-fast bacilli (AFB)",
"TB: AFB positive; Abscess: foul smell; Bronchiectasis: layered sputum"]),
(42, None, "Cor Pulmonale Syndrome",
"RV hypertrophy caused by pulmonary disease leading to pulmonary hypertension.",
["Pathophysiology: Lung disease → Pulmonary HTN → RV overload → RV hypertrophy/failure",
"Clinical: dyspnea, fatigue, cyanosis, peripheral edema, raised JVP",
"Exam: epigastric pulsation, accentuated P2, tricuspid murmur"]),
# SECTION 4: Cardiovascular System
("SECTION 4", "CARDIOVASCULAR SYSTEM — EXAMINATION", None, None, None),
(10, None, "Inspection of Heart Area",
"Visual assessment of the precordium for pulsations and deformities.",
["Normal: no deformity; apical impulse at L 5th ICS MCL",
"Visible apex beat → LV hypertrophy",
"Epigastric pulsation → RV hypertrophy",
"Precordial bulging → cardiomegaly"]),
(14, None, "Auscultation of the Heart",
"Performed in 5 standard areas in three patient positions.",
["Sequence: Mitral → Aortic → Pulmonary → Tricuspid → Erb's point",
"Positions: sitting, supine, left lateral",
"Assess: rhythm, heart sounds, murmurs"]),
(19, None, "Cardiovascular Physical Examination",
"Systematic examination assessing cardiac size, function, and haemodynamics.",
["Inspection: chest deformity, pulsations",
"Palpation: apical impulse, cardiac impulse",
"Percussion: heart borders, cardiac dullness",
"Auscultation: heart sounds, murmurs"]),
(11, None, "Heart Sounds S1 & S2",
"S1: closure of mitral and tricuspid valves at start of ventricular systole (best at apex). S2: closure of aortic and pulmonary valves at start of diastole (best at base).",
["S1 increased: tachycardia, mitral stenosis",
"S1 decreased: mitral regurgitation, heart failure",
"S2 increased: hypertension", "S2 decreased: aortic stenosis"]),
(18, None, "Extra Heart Sounds S3 & S4",
"S3: early diastolic sound from rapid ventricular filling. S4: late diastolic sound from atrial contraction against a stiff ventricle.",
["S3 occurs in: heart failure, dilated cardiomyopathy",
"S4 occurs in: hypertension, LV hypertrophy"]),
(21, None, "Palpation: Apical Impulse",
"Palpable pulsation caused by left ventricular contraction.",
["Normal: L 5th ICS, midclavicular line; diameter 1-2 cm",
"L displacement → LV hypertrophy/dilatation",
"Increased force → hyperdynamic circulation",
"Weak/absent → obesity, emphysema"]),
(25, None, "Cardiac Dullness (Relative & Absolute)",
"Relative dullness: area of heart partly covered by lungs. Absolute dullness: area directly contacting the chest wall.",
["Technique: quiet percussion from lung field toward heart",
"Normal borders — Right: R sternal border; Left: 1-2 cm medial to MCL; Upper: 3rd rib",
"Enlargement → cardiomegaly"]),
(23, None, "Auscultation: 4 Standard Points",
"Four valvular auscultation areas plus Erb's point.",
["Mitral: apex (L 5th ICS MCL)",
"Aortic: R 2nd ICS parasternal",
"Pulmonary: L 2nd ICS parasternal",
"Tricuspid: lower L sternal border"]),
(32, None, "Heart Murmurs",
"Abnormal sounds caused by turbulent blood flow through valves or vessels.",
["Systolic: mitral regurgitation, aortic stenosis",
"Diastolic: mitral stenosis, aortic regurgitation",
"Characteristics: timing, intensity, pitch, radiation"]),
(17, None, "Pulse Characteristics",
"Assess the radial pulse for 6 parameters.",
["Rate (60-100/min), Rhythm, Tension, Filling, Form, Symmetry",
"Tachycardia >100, Bradycardia <60"]),
(27, None, "Blood Pressure Measurement",
"Korotkoff auscultatory method; patient rested for 5 minutes with arm at heart level.",
["First Korotkoff sound = systolic BP",
"Disappearance of sounds = diastolic BP",
"Normal: ~120/80 mmHg",
"Errors: wrong cuff size, talking, rapid deflation"]),
(31, None, "BP: Physiological Determinants",
"Blood pressure equals cardiac output multiplied by peripheral vascular resistance (BP = CO x PVR).",
["Normal: ~120/80 mmHg",
"Hypertension: >=140/90 mmHg",
"Hypotension: <90/60 mmHg"]),
(24, None, "Peripheral Arteries & Veins",
"Inspection and examination of peripheral vessels to evaluate circulation.",
["Varicose veins → venous insufficiency",
"Visible arterial pulsation → increased pulse pressure",
"Edema → venous or cardiac disease"]),
# SECTION 5: ECG
("SECTION 5", "ELECTROCARDIOGRAM (ECG)", None, None, None),
(20, None, "ECG Electrode Placement",
"Standard 12-lead ECG with limb, augmented, and precordial leads.",
["Limb: Lead I (RA-LA), II (RA-LL), III (LA-LL)",
"Augmented: aVR, aVL, aVF",
"Precordial: V1-V2 (4th ICS), V4 (5th ICS MCL), V5 (anterior axillary), V6 (midaxillary)"]),
(22, None, "ECG Normal Values",
"Normal sinus rhythm with regular intervals and normal axis.",
["HR: 60-100/min", "Electrical axis: -30 deg to +90 deg",
"Sinus rhythm: every P wave followed by QRS; regular RR interval"]),
(26, None, "ECG Waves & Intervals",
"Each ECG wave represents a specific phase of cardiac electrical activity.",
["P wave: atrial depolarization; duration <=0.12 s",
"PR interval: AV conduction; 0.12-0.20 s",
"QRS complex: ventricular depolarization; <0.12 s",
"QT interval: ventricular electrical systole; QTc <440-460 ms",
"T wave: ventricular repolarization"]),
(30, None, "ECG: Definition & Indications",
"Recording of the electrical activity of the heart.",
["Indications: chest pain, arrhythmia, syncope, hypertension, MI",
"Lead regions — Inferior: II, III, aVF; Lateral: I, aVL, V5-V6; Anterior: V1-V4"]),
# SECTION 6: Cardiac Syndromes
("SECTION 6", "CARDIAC SYNDROMES", None, None, None),
(49, None, "Myocarditis Syndrome",
"Inflammatory disease of the myocardium.",
["Clinical: chest pain, fatigue, dyspnea, palpitations",
"ECG: ST-T changes, arrhythmias",
"Lab: Troponin up, CK-MB up, CRP up, ESR up"]),
(50, None, "Endocarditis Syndrome",
"Inflammation of the endocardium, usually involving cardiac valves.",
["Clinical: fever, fatigue, weight loss",
"Findings: new/changing murmur, splenomegaly, petechiae",
"Investigations: blood cultures, echocardiography"]),
(51, None, "Pericarditis: Dry vs Effusive",
"Inflammation of the pericardium. Dry (fibrinous): sharp chest pain worse on inspiration, relieved by sitting forward, pericardial friction rub. Effusive: dyspnea, muffled heart sounds.",
["Dry ECG: diffuse ST elevation, PR depression",
"Effusive: enlarged cardiac dullness, absent friction rub"]),
(52, None, "Arterial Hypertension: Classification",
"WHO/ESH classification by blood pressure level and stage of organ damage.",
["Grade 1: 140-159/90-99; Grade 2: 160-179/100-109; Grade 3: >=180/>=110",
"Stage I: no organ damage; Stage II: organ damage; Stage III: associated disease",
"Target organs: heart (LVH), brain (stroke), kidney (nephropathy), retina (retinopathy)"]),
(53, None, "Arterial Hypertension: Clinical Picture",
"Essential (primary) or secondary hypertension with multisystem effects.",
["Risk factors: family history, obesity, smoking, stress, high salt intake",
"Symptoms: headache, dizziness, palpitations, visual disturbance",
"Investigations: ECG, echocardiography, fundoscopy"]),
(54, None, "Acute Coronary Insufficiency: Classification",
"Spectrum of conditions from unstable angina to complete myocardial infarction.",
["Unstable angina: ST depression/T inversion (possible)",
"NSTEMI: ST depression +/- T inversion",
"STEMI: ST elevation"]),
(55, None, "ACS: Clinical Findings",
"Severe chest pain >20 minutes with radiation and autonomic features.",
["Radiation: left arm/jaw; sweating; dyspnea",
"Lab: Troponin up, CK-MB up",
"Investigations: ECG, echocardiography, coronary angiography"]),
(56, None, "Chronic Coronary Insufficiency",
"Long-term myocardial ischaemia due to reduced coronary blood supply.",
["Clinical: stable exertional angina, exercise intolerance",
"Investigations: stress testing, echo, coronary angiography"]),
(57, None, "Acute LV Failure (Pulmonary Oedema)",
"LV dysfunction leads to pulmonary venous congestion and alveolar oedema.",
["Clinical: severe dyspnea, orthopnea, pink frothy sputum, cyanosis",
"Examination: tachycardia, bilateral crackles"]),
(58, None, "Acute RV Failure",
"RV pump failure causes systemic venous congestion.",
["Clinical: peripheral oedema, raised JVP, hepatomegaly, ascites",
"Findings: cyanosis, weakness"]),
(59, None, "Chronic Heart Failure",
"Progressive cardiac dysfunction classified by NYHA functional class.",
["NYHA I: no limitation; II: slight limitation; III: marked limitation; IV: symptoms at rest",
"Lab: BNP/NT-proBNP elevated",
"Investigations: ECG, echo, chest X-ray"]),
(73, None, "Echocardiography",
"Ultrasound assessment of cardiac structure and function.",
["Parameters: EF, EDV, ESV, wall thickness, valve morphology, diastolic function",
"Indications: murmurs, heart failure, valve disease, cardiomyopathy, pericardial disease"]),
# SECTION 7: Valve Diseases
("SECTION 7", "VALVULAR HEART DISEASE", None, None, None),
(69, None, "Mitral Stenosis",
"Narrowing of the mitral valve obstructs LV filling, raising left atrial pressure.",
["Clinical: dyspnea, hemoptysis, fatigue",
"Exam: malar flush, loud S1, opening snap, mid-diastolic murmur at apex"]),
(70, None, "Mitral Regurgitation",
"Backflow from LV to LA during systole causes volume overload.",
["Clinical: dyspnea, fatigue, palpitations",
"Exam: displaced hyperdynamic apex, soft S1, holosystolic murmur radiating to axilla"]),
(71, None, "Aortic Stenosis",
"Narrowing of the aortic valve obstructs LV outflow, causing pressure overload and LV hypertrophy.",
["Classic triad: exertional dyspnea, angina, syncope",
"Exam: pulsus parvus et tardus, heaving apex, systolic ejection murmur",
"Murmur: right 2nd ICS, radiates to carotids; soft/absent A2"]),
(72, None, "Aortic Regurgitation",
"Backflow from aorta to LV during diastole causes volume overload and LV dilatation.",
["Clinical: palpitations, dyspnea, fatigue",
"Exam: wide pulse pressure, water-hammer pulse, displaced apex",
"Early diastolic decrescendo murmur along left sternal border"]),
# SECTION 8: Arrhythmias
("SECTION 8", "ARRHYTHMIAS & CONDUCTION DISORDERS", None, None, None),
(60, None, "Supraventricular Extrasystole",
"Premature beat originating above the bundle of His.",
["ECG: premature P wave, narrow QRS, incomplete compensatory pause",
"Often benign; may cause palpitations"]),
(61, None, "Ventricular Extrasystole (PVC)",
"Premature ventricular complex originating below the bundle of His.",
["ECG: wide/deformed QRS >0.12 s, no P wave, full compensatory pause, T wave opposite QRS",
"Types: monomorphic, polymorphic, bigeminy, trigeminy"]),
(62, None, "Ventricular Fibrillation & Flutter",
"Ventricular flutter: rapid regular activity 150-300/min with sine-wave pattern. VF: chaotic irregular waves with no identifiable complexes.",
["Both cause no effective cardiac output", "Medical emergency — requires immediate defibrillation"]),
(63, None, "Atrial Fibrillation",
"Chaotic atrial electrical activity causing irregular ventricular response.",
["ECG: no P waves, irregular RR intervals, fibrillatory (f) waves, narrow QRS",
"Classification: paroxysmal, persistent, long-standing persistent, permanent"]),
(64, None, "SVT & Atrial Flutter",
"SVT: narrow complex tachycardia at 150-250/min. Atrial flutter: saw-tooth F waves at 250-350/min.",
["SVT ECG: HR 150-250, narrow QRS, absent/abnormal P waves",
"Flutter ECG: saw-tooth waves, regular ventricular response"]),
(65, None, "AV Block Syndrome",
"Impaired conduction through the AV node.",
["1st degree: PR >0.20 s, all P conducted",
"2nd degree Mobitz I (Wenckebach): progressive PR lengthening until dropped QRS",
"2nd degree Mobitz II: constant PR, sudden dropped QRS",
"3rd degree (complete): full AV dissociation"]),
(66, None, "Bundle Branch Block",
"Delayed or blocked conduction through the right or left bundle branch.",
["RBBB: QRS >=0.12 s, rSR' in V1, wide S in V5-V6",
"LBBB: wide QRS >=0.12 s, broad/notched R in V5-V6, deep S in V1"]),
(67, None, "LV Hypertrophy Syndrome",
"Increased LV muscle mass, usually from chronic pressure overload.",
["Sokolov-Lyon: SV1 + RV5/V6 >=35 mm",
"Cornell voltage: RaVL + SV3 >28 mm (men), >20 mm (women)",
"Confirmed by echocardiography"]),
(68, None, "RV Hypertrophy Syndrome",
"Increased RV muscle mass from pulmonary hypertension or COPD.",
["ECG: right axis deviation, tall R in V1, deep S in V5-V6",
"Clinical: RV heave, accentuated P2"]),
# SECTION 9: Practical Skills
("SECTION 9", "PRACTICAL SKILLS", None, None, None),
(74, None, "Palpation: Aortic Arch",
"Gentle palpation of the suprasternal notch. Normally not palpable.",
["Strong pulsation → aortic aneurysm or hypertension"]),
(75, None, "Chest Types on Inspection",
"Chest shape reflects underlying disease.",
["Barrel chest → emphysema",
"Paralytic chest → chronic wasting disease",
"Other types: normal, asthenic, hypersthenic, rachitic"]),
(76, None, "Breathing Parameters on Inspection",
"Assess rate, rhythm, depth, type, and symmetry of breathing.",
["Normal RR: 12-20/min",
"Abnormal patterns: tachypnea, bradypnea, Cheyne-Stokes, Kussmaul"]),
(78, None, "Lower Borders of Right Lung (Topographic Percussion)",
"Percuss downward along lines until resonance changes to dullness.",
["Midclavicular line: 6th rib", "Midaxillary line: 8th rib", "Scapular line: 10th rib",
"Lower border displaced downward → emphysema",
"Higher border → pleural effusion"]),
(79, None, "Lung Apex Percussion",
"Percuss upward from the supraclavicular area.",
["Normal: 3-4 cm above the clavicle anteriorly; ~C7 level posteriorly",
"Elevated → fibrosis; Lowered → emphysema"]),
(80, None, "Palpation: Epigastric Pulsation",
"Fingers placed below the xiphoid process to assess pulsation.",
["Normal: minimal pulsation",
"Strong epigastric pulsation → RV hypertrophy",
"Aortic pulsation → abdominal aortic enlargement"]),
(81, None, "Palpation: Cardiac Impulse",
"Palpable chest wall movement produced by cardiac contraction.",
["Technique: palm over precordium, then localize with fingertips",
"Assess: location, area, strength, duration",
"Strong impulse → ventricular hypertrophy"]),
(82, None, "Palpation: Vascular Bundle",
"Palpate along upper sternum to assess great vessel width.",
["Normal width: ~5-6 cm",
"Widening → aortic dilatation or mediastinal enlargement"]),
(83, None, "Palpation: Apical Impulse (Practical)",
"Systematic assessment of the apex beat in supine or left lateral position.",
["Normal: L 5th ICS near MCL, diameter 1-2 cm",
"L displacement → LV enlargement",
"Strong → hypertrophy; Weak → emphysema"]),
(84, None, "Superficial Abdominal Palpation",
"Light palpation of all abdominal quadrants beginning away from the painful area.",
["Purpose: tenderness, muscle guarding, superficial masses",
"Abnormal: guarding, rigidity, local pain"]),
(85, None, "Auscultation: Bronchial Breathing",
"Loud, high-pitched sound with expiration >= inspiration. Normal over trachea only.",
["Pathological over lungs: pneumonia, consolidation, lung cavity"]),
(86, None, "Auscultation: Vesicular Breathing",
"Soft inspiration with short quiet expiration. Normal over most lung fields.",
["Reduced in: emphysema, pleural effusion, pneumothorax"]),
(87, None, "Chest Palpation (Practical)",
"Bilateral comparison of expansion, elasticity, tenderness, and vocal fremitus.",
["Increased fremitus → consolidation",
"Decreased fremitus → effusion or pneumothorax"]),
(88, None, "Comparative Percussion of Lungs",
"Percuss symmetrical points bilaterally with patient sitting upright.",
["Normal: clear pulmonary sound",
"Dull → consolidation; Hyperresonant → emphysema; Tympanic → cavity/pneumothorax"]),
(89, None, "Auscultation of Heart (Practical)",
"5-area auscultation in 3 patient positions.",
["Sequence: Mitral → Aortic → Pulmonary → Tricuspid → Erb's point",
"Assess: rhythm, rate, S1/S2, extra sounds, murmurs",
"Positions: sitting, supine, left lateral"]),
(90, None, "Percussion: Relative Cardiac Dullness",
"Quiet percussion from lung field toward heart to determine heart borders.",
["Normal: Right = R sternal border; Upper = 3rd rib; Left = 1-2 cm medial to MCL",
"Enlargement → cardiomegaly",
"L shift → LV enlargement; R shift → RV enlargement"]),
]
# ─── Build PDF ───────────────────────────────────────────────────────────────
def build_pdf():
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=1.4*cm, rightMargin=1.4*cm,
topMargin=1.5*cm, bottomMargin=1.3*cm,
title="Clinical Medicine Key Definitions Q1-Q90"
)
S = make_styles()
story = []
# ── Cover page ─────────────────────────────────────────────────────────
story.append(Spacer(1, 2.5*cm))
story.append(Paragraph("Clinical Medicine", S['cover_title']))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Key Definitions & Quick Review Guide", S['cover_sub']))
story.append(Spacer(1, 0.4*cm))
# Coloured divider bar using a table
bar = Table([["" ]], colWidths=[16.2*cm], rowHeights=[0.18*cm])
bar.setStyle(TableStyle([('BACKGROUND', (0,0), (-1,-1), C_ACCENT), ('LINEABOVE', (0,0), (-1,-1), 0, colors.transparent)]))
story.append(bar)
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph("Questions 1 – 90", S['cover_tag']))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"Internal Medicine • Physical Examination • ECG • Clinical Syndromes",
ParagraphStyle('cov2', fontName='Helvetica', fontSize=10,
textColor=C_SUBTLE, alignment=TA_CENTER)))
story.append(Spacer(1, 2.5*cm))
# Summary stats box
stats_data = [
[Paragraph("<b>90</b>", ParagraphStyle('st', fontName='Helvetica-Bold', fontSize=22, textColor=C_ACCENT, alignment=TA_CENTER)),
Paragraph("<b>9</b>", ParagraphStyle('st', fontName='Helvetica-Bold', fontSize=22, textColor=C_GOLD, alignment=TA_CENTER)),
Paragraph("<b>A4</b>", ParagraphStyle('st', fontName='Helvetica-Bold', fontSize=22, textColor=C_GREEN, alignment=TA_CENTER))],
[Paragraph("Questions", ParagraphStyle('sl', fontName='Helvetica', fontSize=8, textColor=C_SUBTLE, alignment=TA_CENTER)),
Paragraph("Topics", ParagraphStyle('sl', fontName='Helvetica', fontSize=8, textColor=C_SUBTLE, alignment=TA_CENTER)),
Paragraph("Format", ParagraphStyle('sl', fontName='Helvetica', fontSize=8, textColor=C_SUBTLE, alignment=TA_CENTER))],
]
stats_table = Table(stats_data, colWidths=[5.4*cm, 5.4*cm, 5.4*cm], rowHeights=[1.1*cm, 0.5*cm])
stats_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_MIDBLUE),
('ROWBACKGROUNDS', (0,0), (-1,-1), [C_MIDBLUE, C_MIDBLUE]),
('BOX', (0,0), (-1,-1), 1.5, C_HEADER),
('LINEAFTER', (0,0), (1,-1), 1, C_HEADER),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
]))
story.append(stats_table)
story.append(Spacer(1, 1.0*cm))
story.append(Paragraph(
"This quick-review guide presents every key definition, mechanism, clinical finding, and diagnostic criterion "
"from the 90 viva questions. Each entry is colour-coded by topic section for rapid retrieval.",
ParagraphStyle('intro', fontName='Helvetica', fontSize=9, textColor=C_TEXT,
alignment=TA_JUSTIFY, leading=13)))
story.append(PageBreak())
# ── Contents table ────────────────────────────────────────────────────
story.append(Paragraph("Contents", S['toc_title']))
toc_items = [
("1", "Clinical Interview & History Taking", "Q1, 2, 3, 4, 5, 12"),
("2", "Physical Examination", "Q6, 7, 8, 28"),
("3", "Respiratory System", "Q9, 13, 15, 16, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48"),
("4", "Cardiovascular System — Examination", "Q10, 11, 14, 17, 18, 19, 21, 23, 24, 25, 27, 29, 30, 31, 32"),
("5", "Electrocardiogram (ECG)", "Q20, 22, 26, 30"),
("6", "Cardiac Syndromes", "Q49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 73"),
("7", "Valvular Heart Disease", "Q69, 70, 71, 72"),
("8", "Arrhythmias & Conduction Disorders", "Q60, 61, 62, 63, 64, 65, 66, 67, 68"),
("9", "Practical Skills", "Q74–Q90"),
]
toc_data = []
for num, title, qs in toc_items:
toc_data.append([
Paragraph(f"<b>{num}</b>", ParagraphStyle('tn', fontName='Helvetica-Bold', fontSize=9, textColor=C_GOLD, alignment=TA_CENTER)),
Paragraph(f"<b>{title}</b>", ParagraphStyle('tt', fontName='Helvetica-Bold', fontSize=9, textColor=C_ACCENT)),
Paragraph(qs, ParagraphStyle('tq', fontName='Helvetica', fontSize=8, textColor=C_SUBTLE)),
])
toc_table = Table(toc_data, colWidths=[0.9*cm, 10.3*cm, 5.0*cm])
toc_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_MIDBLUE),
('ROWBACKGROUNDS', (0,0), (-1,-1), [C_MIDBLUE, C_STRIPE1]),
('BOX', (0,0), (-1,-1), 1, C_HEADER),
('LINEBELOW', (0,0), (-1,-2), 0.5, C_HEADER),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 6),
('RIGHTPADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(toc_table)
story.append(PageBreak())
# ── Main content ──────────────────────────────────────────────────────
current_section = None
for entry in QUESTIONS:
if entry[1] is not None and entry[0] == "SECTION":
# Section heading
_, _, sec_title, _, _ = entry
story.append(Spacer(1, 0.3*cm))
sec_bar = Table([[Paragraph(f" {sec_title}", ParagraphStyle('sh',
fontName='Helvetica-Bold', fontSize=11.5, textColor=C_WHITE,
leading=14, alignment=TA_LEFT))]],
colWidths=[16.2*cm], rowHeights=[0.65*cm])
sec_bar.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_HEADER),
('TOPPADDING', (0,0), (-1,-1), 8),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(KeepTogether([sec_bar]))
story.append(Spacer(1, 0.2*cm))
continue
q_num, _, q_title, definition, key_points = entry
# Build a card for each question
card_content = []
# Q number + title header row
header_row = Table([[
Paragraph(f"Q{q_num}", ParagraphStyle('qh', fontName='Helvetica-Bold', fontSize=9,
textColor=C_GOLD, alignment=TA_CENTER)),
Paragraph(f"<b>{q_title}</b>", ParagraphStyle('qt', fontName='Helvetica-Bold',
fontSize=10, textColor=C_ACCENT, leading=13))
]], colWidths=[1.0*cm, 15.2*cm], rowHeights=[0.55*cm])
header_row.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_STRIPE1),
('BACKGROUND', (0,0), (0,-1), C_HEADER),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
# Definition row
def_para = Paragraph(
f'<font color="#3DBE8A"><b>Definition: </b></font>{definition}',
ParagraphStyle('dp', fontName='Helvetica', fontSize=8.5, textColor=C_TEXT,
leading=12, leftIndent=6, rightIndent=6))
def_row = Table([[def_para]], colWidths=[16.2*cm])
def_row.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_STRIPE2),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 8),
('RIGHTPADDING', (0,0), (-1,-1), 8),
]))
# Key points rows
bullets_text = ""
if key_points:
lines = []
for pt in key_points:
lines.append(f'<bullet bulletIndent="4" bulletOffsetY="-1">\u2022</bullet>{pt}')
bullets_text = "<br/>".join(lines)
bp = Paragraph(bullets_text, ParagraphStyle('kp', fontName='Helvetica', fontSize=8.5,
textColor=C_TEXT, leading=12, leftIndent=14, rightIndent=6, bulletIndent=4))
bp_row = Table([[bp]], colWidths=[16.2*cm])
bp_row.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_MIDBLUE),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 8),
('RIGHTPADDING', (0,0), (-1,-1), 8),
('LINEBELOW', (0,0), (-1,-1), 1, C_HEADER),
]))
story.append(KeepTogether([header_row, def_row, bp_row, Spacer(1, 0.15*cm)]))
story.append(Spacer(1, 0.5*cm))
# Final note
story.append(HRFlowable(width="100%", thickness=1, color=C_HEADER, spaceAfter=8))
story.append(Paragraph(
"End of Quick Review Guide • Questions 1–90 • Clinical Medicine",
ParagraphStyle('end', fontName='Helvetica-Oblique', fontSize=8,
textColor=C_SUBTLE, alignment=TA_CENTER)))
doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print("PDF saved to:", OUTPUT)
if __name__ == "__main__":
build_pdf()
cd /home/daytona/workspace/mindmaps && python3 build_summary_pdf.py 2>&1
~/mindmaps/build_summary_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mindmaps/build_summary_pdf.py'
~/mindmaps/build_summary_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mindmaps/build_summary_pdf.py'
~/mindmaps/build_summary_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mindmaps/build_summary_pdf.py'
cd /home/daytona/workspace/mindmaps && python3 build_summary_pdf.py 2>&1
ls -lh /home/daytona/workspace/mindmaps/Clinical_Medicine_Summary_Q1-Q90.pdf
Clinical Medicine Summary Q1 Q90
PDF Document · PDF