Segregate the questions according to similar topics
cd /tmp/workspace/attachments/ee8841ff-5906-401a-af0b-a99985df8429 && python3 -c " from docx import Document doc = Document('hospital therapy 1.docx') for i,p in enumerate(doc.paragraphs): if p.text.strip(): print(i, '|', p.text) "
~/hospital-therapy-questions/build.py
from docx import Document
from docx.shared import Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
# (number_label, text, category)
items = [
("1","Acute coronary syndrome with ST-segment elevation. Definition, classification, clinical features, instrumental and laboratory diagnostic methods, diagnostic criteria, complications. Choice of treatment strategy: drug therapy, stenting, or bypass surgery.","CAD"),
("40","Acute coronary syndrome without ST-segment elevation. Definition, classification, clinical features, instrumental and laboratory diagnostic methods, diagnostic criteria, complications. Choice of treatment strategy: drug therapy, stenting, or bypass surgery.","CAD"),
("4","Relief of angina status in myocardial infarction.","CAD"),
("41","Emergency care for acute coronary syndrome with ST segment elevation.","CAD"),
("167","Emergency care for acute coronary syndrome without ST segment elevation.","CAD"),
("63","Stable angina. Definition, classification. Choice of treatment strategy: antianginal therapy, antiplatelet therapy, treatment of atherosclerosis.","CAD"),
("64","Unstable angina. Definition, classification, clinical presentation. Choice of medical tactics: myocardial revascularization, thrombolytic or antiplatelet therapy (taking into account indications and contraindications), percutaneous coronary intervention.","CAD"),
("130","Differential diagnosis of alcoholic heart disease and ischemic heart disease.","CAD"),
("2","Tactics for managing a patient with atrial flutter.","ARR"),
("166","Tactics for managing a patient with atrial flutter. (repeated in source)","ARR"),
("6","Providing emergency care for ventricular fibrillation.","ARR"),
("16","Emergency treatment of paroxysmal supraventricular tachycardia.","ARR"),
("21","Features of stopping paroxysmal atrial fibrillation in patients with WPW syndrome.","ARR"),
("47","Emergency treatment of paroxysmal atrial fibrillation.","ARR"),
("48","Tactics for managing a patient with a permanent form of atrial fibrillation when tachysystole occurs.","ARR"),
("59","Cardiac conduction disorders. ECG diagnostics of heart blocks. Definition, pathogenesis of hemodynamic disturbances, clinical features. Choice of treatment strategy: drug therapy, assessment of indications for pacemaker placement.","ARR"),
("62","Tachyarrhythmias. Definition, classification, pathogenesis of hemodynamic disturbances, clinical features, diagnostic methods. Choice of treatment strategy: drug therapy, electrical impulse therapy, or implantation of a cardioverter-defibrillator.","ARR"),
("65","Bradyarrhythmias. Definition, classification, pathogenesis of hemodynamic disturbances, clinical features, diagnostic methods. Choice of treatment strategy: drug therapy, assessment of indications for pacemaker implantation.","ARR"),
("122","Differential diagnosis of paroxysmal tachycardias taking into account clinical symptoms and ECG signs.","ARR"),
("148","Emergency therapy for asystole.","ARR"),
("192","Features of stopping paroxysmal nodal tachycardia in patients with WPW syndrome.","ARR"),
("198","Cardiopulmonary resuscitation.","ARR"),
("201","Emergency therapy for glycoside intoxication.","ARR"),
("205","Emergency treatment of paroxysmal ventricular tachycardia.","ARR"),
("208*","Morgagni-Adams-Stokes syndrome.","ARR"),
("8","Essential hypertension. Definition, classification, clinical features, instrumental and laboratory diagnostic methods, diagnostic criteria. Choice of treatment approach: non-drug or drug treatment.","HTN"),
("14","Some significant causes of symptomatic arterial hypertension in elderly and senile individuals. Diagnostics. Choice of medical tactics.","HTN"),
("17","Features of relief of hypertensive crises in patients with acute coronary syndrome.","HTN"),
("18","Treatment of hypertensive crisis complicated by dissecting aortic aneurysm.","HTN"),
("22","Emergency treatment of hypertensive crisis complicated by acute cerebrovascular accident.","HTN"),
("30","Algorithm for the treatment of malignant hypertension in scleroderma.","HTN"),
("86","Hemodynamic arterial hypertension with damage to the heart and large vessels. Classification. Etiology, pathogenesis, clinical manifestations, diagnostic methods. Choice of medical approach depending on the cause of arterial hypertension: treatment of the underlying disease, antihypertensive drug therapy.","HTN"),
("146","Emergency treatment of hypertensive crisis complicated by pulmonary edema.","HTN"),
("147","Emergency care for hypertensive crisis caused by corticosteroma.","HTN"),
("155","Emergency care for convulsive hypertensive crisis (eclampsia).","HTN"),
("156","Treatment tactics for uncontrolled arterial hypertension.","HTN"),
("158","Endocrine arterial hypertension. Classification, clinical features, diagnostic methods, and diagnostic criteria. Choice of treatment strategy depending on the endocrine disorder: drug therapy, surgery, or radiation therapy.","HTN"),
("159","Emergency care for hypertensive crisis caused by pheochromocytoma.","HTN"),
("165","Emergency care for hypertensive crisis caused by aldosterone (hyperaldosteronism).","HTN"),
("168","Congenital and acquired renovascular hypertension. Clinical features, diagnostic methods, diagnostic criteria. Choice of medical tactics depending on the cause of vascular damage: stenting of renal vessels, antihypertensive therapy.","HTN"),
("197","Emergency care for hypertensive crisis complicated by pulmonary edema.","HTN"),
("46","Emergency care for cardiogenic shock.","HF"),
("105","Emergency care for cardiogenic pulmonary edema.","HF"),
("149","Emergency treatment of acute right ventricular failure.","HF"),
("196","Providing emergency care for pulmonary edema combined with cardiogenic shock.","HF"),
("207","Providing emergency care for pulmonary edema occurring against a background of normal blood pressure.","HF"),
("32","Dilatation Cardiomyopathy. Definition, classification, etiology, pathogenesis, clinical features, diagnostic methods. Choice of treatment strategy: drug therapy, surgery, and assistive technologies for heart failure.","HF"),
("19","Systolic murmur in congenital and acquired heart defects: mitral valve prolapse, hypertrophic cardiomyopathy, cardiac myxoma. Clinical features, diagnostic methods, and choice of treatment approach for these conditions.","VALVE"),
("25","Diastolic murmur in congenital and acquired heart defects. Clinical features, diagnostic methods. Choice of treatment approach for these conditions.","VALVE"),
("26","Infective endocarditis. Definition, etiology, pathogenesis, classification, clinical presentation, diagnostic methods. Choice of treatment strategy: drug therapy, indications for surgical treatment.","VALVE"),
("56*","Atrial septal defect. Definition, pathogenesis of hemodynamic disturbances, clinical features, diagnostic methods. Selection of treatment strategy with assessment of indications for surgical treatment.","VALVE"),
("57","Coarctation of the aorta. Definition, classification, pathogenesis of hemodynamic disturbances, clinical features, diagnostic methods. Choice of treatment approach for this condition.","VALVE"),
("58","Patent ductus arteriosus and bicuspid aortic valve. Definition, pathogenesis of hemodynamic disturbances, clinical features, diagnostic methods. Selection of treatment strategy with assessment of indications for surgical treatment.","VALVE"),
("66","Ventricular septal defect. Definition, pathogenesis of hemodynamic disturbances, clinical features, diagnostic methods. Selection of treatment strategy with assessment of indications for surgical treatment.","VALVE"),
("33","Restrictive Cardiomyopathy in cardiac amyloidosis and sarcoidosis. Definition, classification, etiology, pathogenesis, clinical features, and diagnostic methods. Choice of treatment approach: medication or surgery.","CMP"),
("39b","Secondary cardiomyopathies. Definition, classification, etiology, pathogenesis, clinical features, diagnostic methods. Choice of treatment approach: medication or surgery.","CMP"),
("80","Pericarditis. Definition, classification, etiology, pathogenesis, clinical picture, diagnostic methods. Choice of medical tactics depending on the type of pericarditis: drug treatment (dry or exudative), surgical treatment (constrictive).","CMP"),
("87","Myocarditis. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, diagnostic criteria. Choice of treatment strategy depending on the etiology and severity of myocarditis.","CMP"),
("135","Differential diagnosis of pericardial effusion syndrome.","CMP"),
("9","Differential diagnosis of cardiogenic syncope.","CARD_DDX"),
("184","Differential diagnosis of fainting spells.","CARD_DDX"),
("3","Providing emergency care in case of fainting.","CARD_DDX"),
("24","First aid in case of collapse.","CARD_DDX"),
("5","Emergency care for cardiac tamponade.","CARD_DDX"),
("12","Differential diagnosis of pulmonary embolism with acute coronary syndrome.","CARD_DDX"),
("82","Differential diagnosis of edema syndrome.","CARD_DDX"),
("96","Differential diagnosis of cardiomegaly syndrome.","CARD_DDX"),
("118","Differential diagnosis of arterial hypotension syndrome.","CARD_DDX"),
("128","Differential diagnosis of dissecting aneurysm of the abdominal aorta and acute diseases of the abdominal organs.","CARD_DDX"),
("202","Differential diagnosis of cardiac and bronchial asthma.","CARD_DDX"),
("60","Pulmonary embolism. Etiology, pathogenesis, classification, clinical picture, complications, diagnostic methods, diagnostic criteria. Choice of medical approach for this disease.","CARD_DDX"),
("89","Pulmonary embolism. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, diagnostic criteria. Choice of treatment approach for this syndrome.","CARD_DDX"),
("160","Emergency care for pulmonary embolism.","CARD_DDX"),
("88","Cor pulmonale syndrome. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, diagnostic criteria. Choice of treatment approach for this condition.","CARD_DDX"),
# Pulmonology
("39a","Relief from an asthma attack in a patient with bronchial asthma.","PULM"),
("98","Broncho-obstructive syndrome. Bronchial asthma. Etiology,...","PULM"),
("154","Emergency care for life-threatening bronchial asthma.","PULM"),
("61","Broncho-obstructive syndrome. Chronic obstructive pulmonary disease. Etiology, pathogenesis, classification, clinical features, diagnostic methods, diagnostic criteria, complications. Choice of treatment approach for this disease.","PULM"),
("116","Differential diagnosis of bronchial obstruction syndrome.","PULM"),
("204","Differential diagnosis of suffocation syndrome.","PULM"),
("68","Community-acquired pneumonia. Etiology, pathogenesis, classification, severity assessment, diagnostic methods, and diagnostic criteria. Selection of treatment strategies depending on the severity of the pneumonia.","PULM"),
("7","Providing emergency care for infectious toxic shock in a patient with pneumonia.","PULM"),
("67","Alveolitis. Idiopathic alveolitis and exogenous alveolitis. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, diagnostic criteria. Choice of medical tactics in the treatment of alveolitis.","PULM"),
("191","Differential diagnosis of alveolitis.","PULM"),
("171","Differential diagnosis of diffuse lung lesions.","PULM"),
("172","Differential diagnosis of focal lung lesion syndrome.","PULM"),
("145","Differential diagnosis of pleural effusion syndrome.","PULM"),
("35","Emergency care for spontaneous pneumothorax.","PULM"),
("23","Emergency care for pulmonary hemorrhage.","PULM"),
("153","Differential diagnosis of gastrointestinal and pulmonary bleeding.","PULM"),
("34","Emergency care for Mendelson aspiration syndrome.","PULM"),
("11","Differential diagnosis of acute respiratory failure.","PULM"),
("200","Emergency care for acute respiratory failure.","PULM"),
("170","Differential diagnosis of chronic respiratory failure.","PULM"),
("20","Emergency care for laryngeal stenosis.","PULM"),
("208covid","Providing emergency care for acute lung injury in Covid-19.","PULM"),
("104","Providing emergency care for acute myocardial injury in Covid-19.","CAD"),
# Gastroenterology / Hepatology
("37","Principles of therapy of hepatic encephalopathy.","GI"),
("49","Emergency care for hepatic coma.","GI"),
("52","Emergency care for hepatic coma. (repeated in source)","GI"),
("185","Differential diagnosis of jaundice syndrome.","GI"),
("131","Differential diagnosis of portal hypertension syndrome.","GI"),
("114","Differential diagnosis of hepatomegaly syndrome.","GI"),
("209","Differential diagnosis of hepatosplenomegaly.","GI"),
("54","Emergency treatment of gastrointestinal bleeding.","GI"),
("183","Symptomatic gastroduodenal ulcers (medicinal, stress, endocrine, and other chronic internal diseases). Definition, pathogenesis, classification, clinical presentation, and diagnostic methods. Choice of treatment approach: medication or surgery.","GI"),
("144","Differential diagnosis of esophageal diseases (GERD, Barrett's syndrome, esophageal cancer).","GI"),
("176","Functional disorders of the esophagus and stomach. Definition, classification, clinical features, instrumental and laboratory diagnostics, diagnostic criteria. Choice of medical tactics in the treatment of these diseases.","GI"),
("138","Differential diagnosis of gastric dyspepsia syndrome.","GI"),
("139","Differential diagnosis of diseases accompanied by maldigestion and malabsorption syndromes.","GI"),
("121","Inflammatory bowel diseases. Crohn's disease. Etiology, pathogenesis, clinical presentation, diagnostic methods, diagnostic criteria, complications. Choice of treatment approach: drug therapy or surgery.","GI"),
("188","Inflammatory bowel diseases. Ulcerative colitis. Etiology, pathogenesis, clinical presentation, diagnostic methods, diagnostic criteria, complications. Choice of treatment approach: drug therapy or surgery.","GI"),
("126","Pseudomembranous and ischemic colitis. Etiology, pathogenesis, clinical presentation, diagnostic methods, diagnostic criteria, complications. Choice of treatment approach for these diseases.","GI"),
("203","Differential diagnosis of irritable bowel syndrome.","GI"),
("90","Differential diagnosis of diarrhea syndrome.","GI"),
("85","Differential diagnosis of constipation.","GI"),
("178","Differential diagnosis of acute abdominal pain.","GI"),
# Nephrology
("27","Emergency care for acute renal failure.","RENAL"),
("97","Differential diagnosis of renal amyloidosis.","RENAL"),
("117","Differential diagnosis of glomerulonephritis and pyelonephritis.","RENAL"),
("150","Differential diagnosis of hematuria syndrome.","RENAL"),
("83","Differential diagnostics of diseases manifested by polyuria and polydipsia.","RENAL"),
# Hematology
("81","Differential diagnosis of hemoglobinopathies (thalassemia, sickle cell anemia).","HEME"),
("94","Differential diagnosis of aplastic anemia.","HEME"),
("111","Macrocytic anemia. Etiology, pathogenesis, classification, clinical features, complications, diagnostic methods, and diagnostic criteria. Treatment approach based on the etiology and severity of the anemia.","HEME"),
("112","Normochromic Normocytic anemia. Definition, etiology, pathogenesis, clinical manifestations, diagnostic methods, diagnostic criteria. Treatment decisions based on the severity of the anemia.","HEME"),
("120","Hypochromic microcytic anemia. Etiology, pathogenesis, classification, clinical features, diagnostic methods, and diagnostic criteria. Treatment options for this anemia.","HEME"),
("180","Differential diagnosis of anemic syndrome.","HEME"),
("106","Emergency care for anemic coma.","HEME"),
("174","Hemolysis syndrome. Intracellular and intravascular hemolysis. Definition, classification, clinical features, instrumental and laboratory diagnostic methods, diagnostic criteria. Choice of treatment strategy for intracellular and intravascular hemolysis.","HEME"),
("50","Emergency care for hemolytic crisis.","HEME"),
("119","Essential polycythemia. Definition, etiology, pathogenesis, classification, clinical features, diagnostic methods, diagnostic criteria. Choice of treatment strategy for polycythemia.","HEME"),
("182","Differential diagnosis of erythrocytosis syndrome.","HEME"),
("79","Chronic lymphoproliferative diseases. Lymphogranulomatosis. Definition, classification, stages, course variants, clinical features, diagnostic methods, diagnostic criteria. Choice of treatment strategy depending on the stage and course of the disease.","HEME"),
("99","Paraproteinemic hemoblastoses. Multiple myeloma. Etiology, pathogenesis, classification, clinical variants, diagnostic methods, diagnostic criteria. Choice of medical tactics for this disease.","HEME"),
("100","Chronic myelogenous leukemia. Definition, etiology, pathogenesis, clinical features, diagnostic methods, diagnostic criteria. Choice of treatment strategy for this disease.","HEME"),
("110","Chronic lymphocytic leukemia. Definition, etiology, pathogenesis, clinical manifestations, course variants, diagnostic methods, diagnostic criteria. Choice of medical tactics for this disease.","HEME"),
("136","Differential diagnosis of acute leukemia.","HEME"),
("107","Myeloproliferative syndrome. Idiopathic myelofibrosis. Etiology, pathogenesis, clinical features, diagnostic methods, diagnostic criteria. Choice of medical tactics for this disease.","HEME"),
("108","Essential thrombocythemia. Etiology, pathogenesis, clinical features, complications, diagnostic methods, diagnostic criteria. Choice of treatment strategy for this disease.","HEME"),
("124","Differential diagnosis of myeloproliferative diseases.","HEME"),
("125","Differential diagnosis of leukemoid myeloid reactions.","HEME"),
("109","Agranulocytosis. Etiology, pathogenesis, clinical manifestations, complications, diagnostic methods, diagnostic criteria. Choice of medical tactics for agranulocytosis.","HEME"),
("190","Differential diagnosis of agranulocytosis.","HEME"),
("137","Differential diagnosis of lymphadenopathy syndrome.","HEME"),
("173","Differential diagnosis of splenomegaly syndrome.","HEME"),
("28","Emergency care in the development of DIC syndrome.","HEME"),
("113","DIC syndrome. Definition, etiology, pathogenesis, stages of the syndrome, diagnostic methods, diagnostic criteria. Choice of treatment strategy depending on the stage of DIC syndrome.","HEME"),
("175","Hemorrhagic syndrome with petechial-spotted bleeding. Idiopathic thrombocytopenic purpura. Clinical presentation, diagnostic methods, diagnostic criteria. Choice of medical tactics for this pathology.","HEME"),
("78","Hemorrhagic syndrome with vasculitis-purpura type of bleeding. Vasculitis Henoch-Schonlein syndrome. Etiology, pathogenesis, clinical features, course variations, diagnostic methods, and diagnostic criteria. Choosing a treatment approach for this condition.","HEME"),
("151","Differential diagnosis of bleeding syndrome.","HEME"),
("186","Differential diagnosis of hemorrhagic syndrome.","HEME"),
("152","Differential diagnosis of cytopenic syndrome.","HEME"),
# Rheumatology
("13","Differential diagnosis of seronegative arthritis (Bechterew's disease, Reiter's disease, psoriatic arthropathy).","RHEUM"),
("75","Seronegative arthritis (Bechterew's disease, Reiter's disease, psoriatic Arthropathy). Definition, etiology, pathogenesis, classification, course variants, clinical picture, diagnostic methods, diagnostic criteria. Choice of treatment strategy depending on the etiology of the disease.","RHEUM"),
("72","Microcrystalline arthritis (gout, pyrophosphate Arthropathy, osteoarthrosis). Definition, etiology, pathogenesis, classification, clinical presentation, instrumental and laboratory diagnostics, diagnostic criteria. Choice of treatment strategy depending on the etiology of the disease.","RHEUM"),
("189","Differential diagnosis of gout.","RHEUM"),
("73","Rheumatoid arthritis. Definition, etiology, pathogenesis, classification, clinical presentation, instrumental and laboratory diagnostics, diagnostic criteria. Choice of treatment strategy depending on the degree of disease activity.","RHEUM"),
("177","Differential diagnosis of articular syndrome.","RHEUM"),
("74","Systemic lupus erythematosus. Definition, etiology, pathogenesis, classification, clinical presentation, instrumental and laboratory diagnostics, diagnostic criteria. Choice of treatment strategy depending on the degree of disease activity.","RHEUM"),
("84","Differential diagnosis of systemic lupus erythematosus.","RHEUM"),
("76","Systemic scleroderma. Etiology, pathogenesis, clinical picture, main syndromes, course variants, diagnostic methods, diagnostic criteria. Choice of treatment strategy depending on the degree of disease activity.","RHEUM"),
("77","Dermatomyositis. Etiology, pathogenesis, clinical presentation, main syndromes, course variants, diagnostic methods and criteria. Choice of treatment strategy depending on the degree of disease activity.","RHEUM"),
("69","Systemic vasculitides affecting small vessels. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, and diagnostic criteria. Choice of treatment approach for these diseases.","RHEUM"),
("70","Systemic vasculitides affecting large vessels. Giant cell arteritis. Takayasu's arteritis. Etiology, pathogenesis, clinical presentation, diagnostic methods, and diagnostic criteria. Choice of treatment approach for these diseases.","RHEUM"),
("71","Systemic vasculitides affecting medium-sized vessels. Polyarteritis nodosa. Definition, etiology, pathogenesis, classification, clinical manifestations, diagnostic methods, diagnostic criteria. Choice of treatment strategy for this disease.","RHEUM"),
# Endocrinology - Diabetes/glucose
("127","Type 1 diabetes mellitus. Etiology, pathogenesis, clinical manifestations, diagnostic methods, diagnostic criteria, chronic complications. Choice of treatment strategy depending on the patient's age, presence of chronic complications, and medical conditions.","ENDO_DM"),
("133","Type 2 diabetes mellitus. Etiology, pathogenesis, clinical manifestations, diagnostic methods, diagnostic criteria, chronic complications. Choice of treatment strategy depending on the presence of chronic complications and the occurrence of acute surgical pathology.","ENDO_DM"),
("29","Emergency treatment of diabetic ketoacidemic coma.","ENDO_DM"),
("51","Emergency care for hyperosmolar diabetic coma.","ENDO_DM"),
("55","Emergency treatment of diabetic lactic acidemic coma.","ENDO_DM"),
("45","Emergency treatment of hypoglycemic coma.","ENDO_DM"),
("195","Emergency care for severe hypoglycemia.","ENDO_DM"),
("10","Differential diagnosis of hypoglycemia syndrome.","ENDO_DM"),
("42","Differential diagnosis of conditions manifested by hyperglycemia.","ENDO_DM"),
("179","Differential diagnosis of conditions manifested by hyperinsulinemia.","ENDO_DM"),
("123","Differential diagnosis of convulsive syndrome in hypoglycemia, hypocalcemia, epilepsy.","ENDO_DM"),
("193","Algorithm for emergency care in coma of unknown etiology.","ENDO_DM"),
("44","Metabolic syndrome. Etiology, pathogenesis, main components of metabolic syndrome, clinical features, diagnostic methods, diagnostic criteria. Choice of treatment strategy depending on the main components of metabolic syndrome.","ENDO_DM"),
# Endocrinology - Thyroid
("103","Diffuse toxic goiter. Etiology, pathogenesis, clinical features, laboratory and instrumental diagnostics, diagnostic criteria. Choice of medical tactics: drug treatment, surgical treatment or radiotherapy.","ENDO_THY"),
("53","Emergency therapy for thyrotoxic crisis.","ENDO_THY"),
("92","Differential diagnosis of thyrotoxicosis syndrome.","ENDO_THY"),
("140","Hypothyroidism. Etiology, pathogenesis, clinical features, diagnostics (laboratory, instrumental, morphological). Choice of treatment strategy: replacement therapy (calculation of the replacement dose of thyroxine depending on the patient's age and the presence of concomitant diseases).","ENDO_THY"),
("132","Differential diagnosis of hypothyroidism syndrome.","ENDO_THY"),
("194","Tactics for managing a patient with hypothyroid coma.","ENDO_THY"),
# Endocrinology - Adrenal
("36","Emergency treatment of acute adrenal insufficiency.","ENDO_ADR"),
("134","Chronic adrenal insufficiency. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, diagnostic criteria. Selection of drugs for drug replacement therapy.","ENDO_ADR"),
("115","Differential diagnostics of hypocorticism syndrome.","ENDO_ADR"),
("169","Differential diagnosis of primary and secondary hypocorticism.","ENDO_ADR"),
("142","Corticosteroma. Definition, pathogenesis, clinical presentation, instrumental and laboratory diagnostics, diagnostic criteria. Choice of treatment approach when surgical treatment is impossible or the patient refuses it.","ENDO_ADR"),
("93","Differential diagnosis of hypercorticism syndrome.","ENDO_ADR"),
("95","Differential diagnosis of hypercorticism syndrome. (repeated in source)","ENDO_ADR"),
("143","Differential diagnosis of hypercorticism syndrome. (repeated in source)","ENDO_ADR"),
("101","Pheochromocytoma. Etiology, pathogenesis, clinical features, complications, diagnostic methods, diagnostic criteria. Choice of treatment strategy: drug therapy, surgical treatment - adenomectomy.","ENDO_ADR"),
("102","Primary hyperaldosteronism. Etiology, pathogenesis, clinical features, diagnostic methods, and diagnostic criteria. Choice of treatment approach: drug therapy or surgery.","ENDO_ADR"),
("129","Differential diagnosis of primary and secondary hyperaldosteronism syndrome.","ENDO_ADR"),
# Endocrinology - Parathyroid
("31","Providing emergency care for acute hypocalcemia.","ENDO_PARA"),
("141","Primary hyperparathyroidism. Etiology, pathogenesis, classification, clinical presentation, diagnostic methods, diagnostic criteria. Choice of treatment strategy: pathogenetic and symptomatic therapy.","ENDO_PARA"),
("181","Differential diagnostics of diseases manifested by hyperparathyroidism syndrome.","ENDO_PARA"),
# Allergy/Immunology emergencies
("15","First aid for acute urticaria.","ALLERGY"),
("38","Providing emergency care for Quincke's edema (angioneurotic edema).","ALLERGY"),
("91","Differential diagnosis of anaphylactic shock.","ALLERGY"),
("206","Emergency care for anaphylactic shock.","ALLERGY"),
("157","Lyell's syndrome (epidermal toxic necrolysis).","ALLERGY"),
("210","Differential diagnosis of acute allergies.","ALLERGY"),
# General / Infectious / Multisystem
("43","Differential diagnosis of fever of unknown genesis.","GENERAL"),
("187","Differential diagnosis of fever of unknown genesis. (repeated in source)","GENERAL"),
("199","Emergency therapy for convulsive syndrome.","GENERAL"),
]
print(len(items))
cat_order = [
("CAD", "1. Coronary Artery Disease / Acute Coronary Syndromes"),
("ARR", "2. Cardiac Arrhythmias & Conduction Disorders / CPR"),
("HTN", "3. Arterial Hypertension & Hypertensive Emergencies"),
("HF", "4. Heart Failure, Cardiogenic Shock & Pulmonary Edema"),
("VALVE", "5. Valvular & Congenital Heart Disease / Endocarditis"),
("CMP", "6. Cardiomyopathies, Myocarditis & Pericardial Disease"),
("CARD_DDX", "7. Other Cardiovascular Syndromes & Differential Diagnoses (syncope, tamponade, PE, cor pulmonale, edema, hypotension)"),
("PULM", "8. Pulmonology (asthma/COPD, pneumonia, pneumothorax, respiratory failure, lung lesions)"),
("GI", "9. Gastroenterology & Hepatology"),
("RENAL", "10. Nephrology"),
("HEME", "11. Hematology (anemias, leukemias, myeloproliferative, coagulation/bleeding disorders)"),
("RHEUM", "12. Rheumatology & Systemic Autoimmune Disease (arthritides, connective tissue disease, vasculitis)"),
("ENDO_DM", "13. Endocrinology - Diabetes Mellitus & Glycemic Disorders"),
("ENDO_THY", "14. Endocrinology - Thyroid Disorders"),
("ENDO_ADR", "15. Endocrinology - Adrenal Disorders"),
("ENDO_PARA", "16. Endocrinology - Parathyroid/Calcium Disorders"),
("ALLERGY", "17. Allergology / Immunology Emergencies"),
("GENERAL", "18. General / Multisystem"),
]
doc = Document()
style = doc.styles["Normal"]
style.font.name = "Calibri"
style.font.size = Pt(11)
title = doc.add_heading("Hospital Therapy & Endocrinology Exam Questions - Grouped by Topic", level=1)
sub = doc.add_paragraph("Astrakhan State Medical University - Department of Hospital Therapy, 2025-2026 academic year")
sub.italic = True
note = doc.add_paragraph()
run = note.add_run("Note: The original question list contained a few numbering irregularities (duplicated numbers, e.g. #52 hepatic coma repeats #49; a few unnumbered items). These are marked as \"(repeated in source)\" or with an asterisk (*) where the number was inferred from context. Content is unchanged.")
run.italic = True
run.font.size = Pt(9)
by_cat = {}
for num, text, cat in items:
by_cat.setdefault(cat, []).append((num, text))
total_written = 0
for cat_key, cat_title in cat_order:
doc.add_heading(cat_title, level=2)
for num, text in by_cat.get(cat_key, []):
p = doc.add_paragraph(style="List Bullet")
r = p.add_run(f"Q{num}. ")
r.bold = True
p.add_run(text)
total_written += 1
print("total written:", total_written)
doc.save("/tmp/workspace/hospital-therapy-questions/Hospital_Therapy_Questions_by_Topic.docx")
print("saved")
mkdir -p /tmp/workspace/hospital-therapy-questions && cd /tmp/workspace/hospital-therapy-questions && python3 build.py
cd /tmp/workspace/hospital-therapy-questions && python3 -c " from build import by_cat, cat_order for k,title in cat_order: print(f'{title}: {len(by_cat.get(k,[]))}') print('TOTAL:', sum(len(v) for v in by_cat.values())) "
Hospital Therapy Questions by Topic
Word Document · DOCX
| # | Topic | Count |
|---|---|---|
| 1 | Coronary Artery Disease / ACS | 9 |
| 2 | Arrhythmias & Conduction Disorders / CPR | 17 |
| 3 | Hypertension & Hypertensive Emergencies | 16 |
| 4 | Heart Failure, Cardiogenic Shock & Pulmonary Edema | 6 |
| 5 | Valvular & Congenital Heart Disease / Endocarditis | 7 |
| 6 | Cardiomyopathies, Myocarditis & Pericardial Disease | 5 |
| 7 | Other Cardiovascular Syndromes/DDx (syncope, tamponade, PE, cor pulmonale, edema, hypotension) | 15 |
| 8 | Pulmonology (asthma/COPD, pneumonia, pneumothorax, resp. failure, lung lesions) | 22 |
| 9 | Gastroenterology & Hepatology | 20 |
| 10 | Nephrology | 5 |
| 11 | Hematology (anemias, leukemias, myeloproliferative, bleeding disorders) | 31 |
| 12 | Rheumatology & Systemic Autoimmune Disease | 13 |
| 13 | Endocrinology - Diabetes & Glycemic Disorders | 13 |
| 14 | Endocrinology - Thyroid Disorders | 6 |
| 15 | Endocrinology - Adrenal Disorders | 11 |
| 16 | Endocrinology - Parathyroid/Calcium Disorders | 3 |
| 17 | Allergology / Immunology Emergencies | 6 |
| 18 | General / Multisystem | 3 |
| Total | 208 |