McQ file ready to download for fmge exam in first attempt for psychiatry subject mbbs

Reading File
Reading File
I can prepare an FMGE Psychiatry MCQ file with answers and brief explanations.
It can cover:
  1. General psychiatry and mental status examination
  2. Schizophrenia and other psychoses
  3. Mood disorders and suicide
  4. Anxiety, OCD, trauma, and dissociative disorders
  5. Substance-use disorders
  6. Personality, eating, sleep, and sexual disorders
  7. Child and geriatric psychiatry
  8. Psychopharmacology, ECT, ethics, and Indian mental-health law
Choose the file format and size you prefer:
  • PDF: 100 high-yield MCQs
  • PDF: 200 topic-wise MCQs
  • Excel: MCQ practice sheet with answers hidden/separate
  • Word: Printable question bank with explanations

Create a 200-MCQ Psychiatry PDF with answers

Reading File
Reading File
Browsing Directory

~/

Finding Sources
Searching PubMed

psychiatry education AND multiple choice

Searching the Web

FMGE psychiatry syllabus National Board of Examinations 2026

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Running Command

mkdir -p "/tmp/workspace/fmge_psychiatry_mcq/src" "/tmp/workspace/fmge_psychiatry_mcq/output"

Writing File

~/fmge_psychiatry_mcq/src/create_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak, KeepTogether
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.pdfbase import pdfmetrics
from reportlab.lib.enums import TA_CENTER
from reportlab.pdfbase.pdfmetrics import stringWidth
from pathlib import Path
import random

OUT = Path('/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_200_MCQ_Answer_Key.pdf')
random.seed(20260829)

# Each item: (stem, correct answer, distractor answers). Content is intended for MBBS/FMGE revision.
groups = [
('I. Psychopathology and Mental Status Examination', [
('A false, fixed belief not amenable to contrary evidence is called', 'Delusion', ['Hallucination','Illusion','Obsession']),
('A perception occurring without an external stimulus is a', 'Hallucination', ['Delusion','Illusion','Confabulation']),
('Misinterpretation of a real external stimulus is an', 'Illusion', ['Hallucination','Delusion','Depersonalization']),
('A thought that is recurrent, intrusive, ego-dystonic, and resisted is an', 'Obsession', ['Delusion','Overvalued idea','Compulsion']),
('A repetitive behavior performed to reduce anxiety caused by an obsession is a', 'Compulsion', ['Stereotypy','Mannerism','Automatic obedience']),
('Rapidly shifting from one topic to another with understandable links is', 'Flight of ideas', ['Loosening of associations','Thought blocking','Perseveration']),
('A reply that repeatedly returns to a previously used answer despite a new question is', 'Perseveration', ['Echolalia','Neologism','Clang association']),
('A newly coined word with an idiosyncratic meaning is a', 'Neologism', ['Neologism','Pun','Verbigeration','Echolalia']),
('Repeating another person’s words is', 'Echolalia', ['Echopraxia','Palilalia','Perseveration']),
('Repeating one’s own words or phrases is', 'Palilalia', ['Echolalia','Verbigeration','Mutism']),
('The experience that one’s thoughts are being removed from the mind is', 'Thought withdrawal', ['Thought insertion','Thought broadcasting','Depersonalization']),
('The belief that one’s thoughts are accessible to others is', 'Thought broadcasting', ['Thought insertion','Thought withdrawal','Ideas of reference']),
('A feeling of being detached from one’s own body or self is', 'Depersonalization', ['Derealization','Jamais vu','Deja vu']),
('The feeling that the external world is unreal is', 'Derealization', ['Depersonalization','Dissociation','Confabulation']),
('Inability to recognize a familiar object despite intact primary sensory function is', 'Agnosia', ['Apraxia','Aphasia','Alexia']),
('Inability to carry out a learned purposeful motor act despite intact strength is', 'Apraxia', ['Agnosia','Ataxia','Aphasia']),
('Awareness of one’s illness and its implications is termed', 'Insight', ['Judgment','Attention','Orientation']),
('The capacity to sustain focus is assessed as', 'Attention', ['Memory','Insight','Judgment']),
('A sudden complete cessation of speech in the middle of a thought is', 'Thought blocking', ['Flight of ideas','Tangentiality','Circumstantiality']),
('Speech that reaches the goal only after unnecessary detail is', 'Circumstantiality', ['Tangentiality','Loosening of associations','Word salad']),
]),
('II. Schizophrenia and Other Psychotic Disorders', [
('The minimum duration required for schizophrenia is', '6 months', ['1 month','2 weeks','2 years']),
('The minimum duration required for schizophreniform disorder is', '1 month', ['24 hours','6 months','2 years']),
('Brief psychotic disorder lasts for at least 1 day and less than', '1 month', ['1 week','6 months','1 year']),
('A characteristic first-rank symptom of schizophrenia is', 'Thought insertion', ['Derealization','Illusion','Depersonalization']),
('An example of a negative symptom is', 'Avolition', ['Delusion','Hallucination','Agitation']),
('Reduced emotional expression is called', 'Blunted affect', ['Labile affect','Euphoria','Ambivalence']),
('The antipsychotic with the highest risk of agranulocytosis is', 'Clozapine', ['Olanzapine','Risperidone','Haloperidol']),
('Clozapine is particularly indicated in', 'Treatment-resistant schizophrenia', ['Simple phobia','Delirium tremens','Acute stress reaction']),
('Acute dystonia due to antipsychotics is commonly treated with', 'Anticholinergic medication', ['Lithium','Propranolol','Fluoxetine']),
('Akathisia due to antipsychotics is commonly treated with', 'Propranolol', ['Benztropine only','Disulfiram','Donepezil']),
('Tardive dyskinesia is characterized by', 'Orobuccolingual choreoathetoid movements', ['Lead-pipe rigidity','Intention tremor','Resting tremor only']),
('Neuroleptic malignant syndrome classically includes fever, rigidity, autonomic instability, and', 'Elevated creatine kinase', ['Low serum sodium','Eosinophilia','Hypercalcemia']),
('A dopamine partial agonist used as an antipsychotic is', 'Aripiprazole', ['Clozapine','Chlorpromazine','Haloperidol']),
('Marked hyperprolactinemia is most associated with', 'Risperidone', ['Aripiprazole','Clozapine','Quetiapine']),
('Psychosis occurring exclusively during a mood episode favors', 'Mood disorder with psychotic features', ['Schizophrenia','Delusional disorder','Brief psychotic disorder']),
('Schizoaffective disorder requires mood episodes plus psychosis and at least 2 weeks of psychosis', 'Without mood symptoms', ['Only during mania','Only during depression','Only during delirium']),
('Delusional disorder usually has', 'Relatively preserved functioning outside the delusion', ['Prominent disorganization','Marked negative symptoms','Clouding of consciousness']),
('Capgras syndrome is the belief that', 'A familiar person has been replaced by an impostor', ['One is dead','One has a duplicate self','Thoughts are broadcast']),
('Cotard syndrome is characterized by', 'Nihilistic delusions', ['Grandiose delusions','Erotomania','Jealous delusions']),
('Erotomanic delusion is the belief that', 'Another person is in love with the patient', ['The patient has a fatal illness','The spouse is unfaithful','The body is infested']),
]),
('III. Mood Disorders and Suicide', [
('A manic episode lasts at least', '1 week', ['2 days','4 days','2 weeks']),
('A hypomanic episode lasts at least', '4 consecutive days', ['24 hours','1 week','2 weeks']),
('Bipolar I disorder requires a history of', 'At least one manic episode', ['At least one hypomanic episode only','Major depression only','Cyclothymia only']),
('Bipolar II disorder requires hypomania plus', 'Major depressive episode', ['Full mania','Psychosis only','Delirium']),
('Rapid cycling bipolar disorder means at least', '4 mood episodes in 12 months', ['2 in 1 month','3 in 6 months','12 in 1 month']),
('A core symptom needed for major depressive episode is depressed mood or', 'Loss of interest or pleasure', ['Increased appetite','Flight of ideas','Compulsion']),
('Minimum duration of a major depressive episode is', '2 weeks', ['2 days','1 month','6 months']),
('Depression with atypical features commonly shows', 'Mood reactivity', ['Early morning awakening only','Weight loss only','Psychomotor retardation only']),
('Depression with melancholic features commonly shows', 'Anhedonia', ['Mood reactivity','Hyperphagia','Hypersomnia']),
('Postpartum psychosis is most strongly associated with', 'Bipolar disorder', ['Specific phobia','Somatic symptom disorder','Dysthymia only']),
('A classic adverse effect of lithium is', 'Nephrogenic diabetes insipidus', ['Pulmonary fibrosis','Agranulocytosis','Gingival hyperplasia']),
('Lithium toxicity is more likely after starting', 'A thiazide diuretic', ['A proton-pump inhibitor','Vitamin B12','Lactulose']),
('The mood stabilizer associated with neural tube defects is', 'Valproate', ['Lithium','Lamotrigine','Olanzapine']),
('The mood stabilizer associated with serious rash including Stevens-Johnson syndrome is', 'Lamotrigine', ['Lithium','Valproate','Carbamazepine only']),
('The most effective acute treatment for severe depression with psychotic features is often', 'ECT', ['Supportive counseling alone','Exposure therapy','Disulfiram']),
('A high-yield clinical predictor of suicide risk is', 'Previous suicide attempt', ['Good insight','Stable employment','Absence of substance use']),
('A protective factor against suicide is', 'Strong social support', ['Hopelessness','Intoxication','Prior attempt']),
('Persistent depressive disorder requires depressed mood for at least', '2 years in adults', ['2 weeks','6 months','1 month']),
('Cyclothymic disorder requires fluctuating hypomanic and depressive symptoms for at least', '2 years in adults', ['2 weeks','6 months','1 month']),
('Seasonal pattern depression is most often treated with', 'Bright light therapy', ['Sleep deprivation only','Antipsychotic depot only','Insulin therapy']),
]),
('IV. Anxiety, OCD, Trauma, and Dissociation', [
('Panic disorder is characterized by recurrent unexpected', 'Panic attacks', ['Obsessions','Manic episodes','Delirium']),
('Agoraphobia involves fear or avoidance of situations where escape may be', 'Difficult or help unavailable', ['Embarrassing due to blushing only','Associated with contamination only','Linked only to trauma reminders']),
('Generalized anxiety disorder requires excessive worry for at least', '6 months', ['1 week','1 month','2 years']),
('First-line pharmacotherapy for generalized anxiety disorder commonly includes', 'SSRI', ['Disulfiram','Lithium','Haloperidol depot']),
('First-line psychological treatment for specific phobia is', 'Exposure therapy', ['Free association','Aversion therapy for alcohol','ECT']),
('Social anxiety disorder commonly involves fear of', 'Negative evaluation by others', ['Being unable to escape','Contamination','Weight gain']),
('OCD obsessions are generally experienced as', 'Ego-dystonic', ['Ego-syntonic','Always bizarre delusions','Voluntary habits']),
('A highly effective psychotherapy for OCD is', 'Exposure and response prevention', ['Dream interpretation alone','Aversion therapy','Light therapy']),
('Acute stress disorder occurs from 3 days to', '1 month after trauma', ['6 months after trauma only','2 years after trauma only','Before trauma']),
('PTSD symptoms persist for more than', '1 month', ['24 hours','3 days','1 week']),
('A core PTSD symptom cluster includes', 'Re-experiencing', ['Formal thought disorder','Aphasia','Apraxia']),
('Dissociative amnesia is inability to recall', 'Important autobiographical information', ['Remote semantic memory only','All new learning due to dementia','Motor sequences']),
('Dissociative fugue involves amnesia with', 'Purposeful travel or wandering', ['Recurrent seizures','Motor tics','Compulsive washing']),
('Depersonalization-derealization disorder has intact', 'Reality testing', ['Orientation always absent','Long-term memory always absent','Consciousness always clouded']),
('Conversion disorder symptoms are incompatible with', 'Recognized neurological or medical conditions', ['All personality traits','Any psychosocial stressor','Every laboratory result']),
('Illness anxiety disorder usually involves minimal or absent', 'Somatic symptoms', ['Health anxiety','Reassurance seeking','Medical visits']),
('In somatic symptom disorder, symptoms are accompanied by excessive', 'Thoughts, feelings, or behaviors about symptoms', ['Negative symptoms','Manic symptoms','Cognitive decline only']),
('Selective mutism is most commonly classified among', 'Anxiety disorders', ['Psychotic disorders','Neurocognitive disorders','Feeding disorders']),
('A feared situation deliberately entered until anxiety decreases is', 'Exposure', ['Response prevention','Flooding only','Cognitive fusion']),
('Benzodiazepines are most appropriate for', 'Short-term relief of acute severe anxiety', ['Long-term OCD monotherapy','Core treatment of personality disorder','Chronic dementia prevention']),
]),
('V. Substance Use Disorders', [
('The antidote for opioid overdose is', 'Naloxone', ['Naltrexone','Disulfiram','Flumazenil']),
('The medication used to reverse benzodiazepine effects is', 'Flumazenil', ['Naloxone','Acamprosate','Methadone']),
('Alcohol withdrawal seizures are typically', 'Generalized tonic-clonic seizures', ['Absence seizures','Focal impaired-awareness seizures only','Myoclonic seizures only']),
('Delirium tremens usually occurs about', '48 to 96 hours after alcohol cessation', ['Within 5 minutes','After 2 weeks','After 6 months']),
('First-line treatment for alcohol withdrawal is', 'Benzodiazepines', ['SSRIs','Antipsychotic monotherapy','Lithium']),
('Wernicke encephalopathy is treated urgently with', 'Thiamine', ['Folate only','Vitamin C','Iron']),
('The classic triad of Wernicke encephalopathy includes confusion, ataxia, and', 'Ophthalmoplegia', ['Tremor','Aphasia','Hyperreflexia']),
('Korsakoff syndrome is characterized prominently by', 'Confabulation', ['Echolalia','Palilalia','Mutism']),
('Disulfiram inhibits', 'Aldehyde dehydrogenase', ['Alcohol dehydrogenase','Monoamine oxidase','Acetylcholinesterase']),
('Acamprosate is used to help maintain', 'Alcohol abstinence', ['Opioid reversal','Nicotine intoxication','Cocaine overdose reversal']),
('Naltrexone is an opioid', 'Antagonist', ['Full agonist','Partial agonist only','Cholinergic agonist']),
('Methadone maintenance treats', 'Opioid use disorder', ['Alcohol withdrawal delirium','Cocaine intoxication','Cannabis intoxication']),
('Buprenorphine is a partial agonist at the', 'Mu-opioid receptor', ['NMDA receptor','GABA-A receptor','D2 receptor']),
('Opioid intoxication classically causes', 'Miosis', ['Mydriasis','Hyperreflexia','Diarrhea']),
('Opioid withdrawal commonly causes', 'Diarrhea and piloerection', ['Miosis and constipation','Bradycardia and hypothermia','Agranulocytosis']),
('Cocaine intoxication commonly causes', 'Mydriasis and hypertension', ['Miosis and respiratory depression','Bradycardia','Hypothermia']),
('Cannabis intoxication may cause', 'Conjunctival injection', ['Pinpoint pupils','Lead-pipe rigidity','Aphasia']),
('Nicotine withdrawal commonly causes', 'Irritability', ['Euphoria','Ophthalmoplegia','Anesthesia']),
('The most dangerous complication of sedative-hypnotic withdrawal is', 'Seizures', ['Constipation','Weight gain','Tinnitus']),
('Alcohol-related hallucinosis typically occurs with', 'Clear consciousness', ['Coma','Profound disorientation in every case','Aphasia']),
]),
('VI. Neurocognitive Disorders and Delirium', [
('The hallmark disturbance in delirium is impaired', 'Attention', ['Remote memory only','Language only','Insight only']),
('The usual onset of delirium is', 'Acute', ['Gradual over years','Congenital','Always after age 80']),
('A typical course of delirium is', 'Fluctuating', ['Progressive and stable only','Episodic mania only','Fixed since birth']),
('The most common cause of dementia is', 'Alzheimer disease', ['Huntington disease','Creutzfeldt-Jakob disease','Normal-pressure hydrocephalus']),
('The earliest prominent cognitive deficit in Alzheimer disease is often', 'Episodic memory impairment', ['Apraxia only','Agnosia only','Parkinsonism']),
('Lewy body dementia is associated with', 'Visual hallucinations', ['Pure expressive aphasia only','Early disinhibition only','Chorea']),
('Lewy body dementia shows marked sensitivity to', 'Antipsychotics', ['Thiamine','SSRIs','Acetaminophen']),
('Frontotemporal dementia often presents early with', 'Behavioral disinhibition', ['Prominent visual hallucinations','Stepwise course','Fluctuating attention']),
('Vascular dementia classically has a', 'Stepwise decline', ['Smoothly progressive decline only','Congenital onset','Single panic attack course']),
('Normal-pressure hydrocephalus classically includes gait disturbance, urinary incontinence, and', 'Cognitive impairment', ['Aphasia','Tremor','Myoclonus']),
('Huntington disease is inherited in an', 'Autosomal dominant pattern', ['Autosomal recessive pattern','X-linked pattern','Mitochondrial pattern']),
('A classic motor feature of Huntington disease is', 'Chorea', ['Resting tremor','Lead-pipe rigidity','Asterixis']),
('Creutzfeldt-Jakob disease often presents with rapidly progressive dementia and', 'Myoclonus', ['Slow progression over decades','Only aphasia','Isolated insomnia']),
('Donepezil is a', 'Acetylcholinesterase inhibitor', ['NMDA antagonist','D2 blocker','GABA agonist']),
('Memantine is an', 'NMDA receptor antagonist', ['Acetylcholinesterase inhibitor','MAO inhibitor','Opioid antagonist']),
('The best initial approach to delirium includes', 'Identify and treat the underlying cause', ['Long-term psychoanalysis','Routine restraints','Start lithium']),
('Sundowning refers to', 'Evening worsening of confusion and agitation', ['Morning panic attacks','Nocturnal seizures','Dawn depression']),
('Pseudodementia is most often associated with', 'Depression', ['Specific phobia','Alcohol intoxication only','Schizotypal personality']),
('In dementia, insight into deficits is often', 'Impaired', ['Always intact','Always exaggerated','Unrelated to disease']),
('Delirium due to a medical condition requires evidence of', 'A physiological consequence of the condition', ['A lifelong personality trait','A psychodynamic conflict alone','A specific phobia']),
]),
('VII. Child and Adolescent Psychiatry', [
('ADHD requires symptoms before age', '12 years', ['3 years','18 years','25 years']),
('Core ADHD symptom domains are inattention and', 'Hyperactivity-impulsivity', ['Delusions','Compulsions','Amnesia']),
('First-line stimulant medications for ADHD include', 'Methylphenidate', ['Donepezil','Disulfiram','Haloperidol depot']),
('Autism spectrum disorder features deficits in social communication and', 'Restricted repetitive behaviors', ['Fluctuating consciousness','Manic episodes','Progressive aphasia only']),
('Rett syndrome is most commonly associated with mutation in', 'MECP2', ['FMR1','HTT','APOE']),
('Fragile X syndrome is associated with', 'FMR1 gene expansion', ['MECP2 mutation','Trisomy 21 only','CAG repeat in HTT']),
('Tourette disorder requires both multiple motor tics and', 'At least one vocal tic', ['Psychosis','A seizure disorder','Intellectual disability']),
('Tourette disorder tics persist for more than', '1 year', ['1 week','1 month','6 months']),
('Oppositional defiant disorder includes an angry/irritable mood and', 'Argumentative or defiant behavior', ['Repeated serious rights violations','Hallucinations','Compulsive rituals']),
('Conduct disorder includes', 'Violation of rights of others or societal norms', ['Only separation anxiety','Only inattentiveness','Only academic difficulty']),
('Separation anxiety disorder involves excessive fear concerning', 'Separation from attachment figures', ['Contamination','Weight gain','Public speaking']),
('Enuresis is repeated voiding into bed or clothes at least', 'Twice weekly for 3 months', ['Once yearly','Daily for 1 week','Only during sleep']),
('Encopresis is repeated passage of', 'Feces into inappropriate places', ['Urine only','Blood only','Saliva']),
('Anorexia nervosa involves restriction leading to', 'Significantly low body weight', ['Obesity','Only binge eating','Only purging with normal eating']),
('Bulimia nervosa includes recurrent binge eating and', 'Compensatory behaviors', ['Persistently low weight required','Delirium','Motor tics']),
('Pica is persistent eating of', 'Non-nutritive, nonfood substances', ['Only excessive food','Only meat','Only sugar']),
('Rumination disorder involves repeated', 'Regurgitation of food', ['Binge drinking','Nightmares','Compulsions']),
('Intellectual disability requires deficits in intellectual and', 'Adaptive functioning', ['Motor function only','Vision only','Psychosis']),
('Specific learning disorder is diagnosed when academic skills are', 'Substantially below expected for age', ['Always absent from childhood','Better than expected','Explained only by poor motivation']),
('Selective mutism usually occurs despite ability to speak in', 'Other settings', ['No setting at all','Only sleep','Only writing']),
]),
('VIII. Personality, Eating, Sleep, Sexual Disorders', [
('Cluster A personality disorders are characterized as', 'Odd or eccentric', ['Dramatic or emotional','Anxious or fearful','Neurocognitive']),
('Cluster B personality disorders are characterized as', 'Dramatic, emotional, or erratic', ['Odd or eccentric','Anxious or fearful','Psychotic only']),
('Cluster C personality disorders are characterized as', 'Anxious or fearful', ['Dramatic or erratic','Odd or eccentric','Delirious']),
('Borderline personality disorder is characterized by instability of relationships, self-image, and', 'Affects', ['Orientation','Visual fields','Reflexes']),
('A therapy with evidence for borderline personality disorder is', 'Dialectical behavior therapy', ['Aversion therapy','Insulin coma therapy','Light therapy alone']),
('Antisocial personality disorder requires age at least', '18 years', ['12 years','15 years','65 years']),
('Antisocial personality disorder also requires evidence of conduct disorder before age', '15 years', ['5 years','12 years','18 years']),
('Narcissistic personality disorder features a need for admiration and', 'Lack of empathy', ['Fear of abandonment only','Detachment from relationships','Perfectionism only']),
('Histrionic personality disorder features excessive', 'Emotionality and attention seeking', ['Social detachment','Suspiciousness','Perfectionism']),
('Avoidant personality disorder is marked by social inhibition and', 'Feelings of inadequacy', ['Grandiosity','Disregard for rights','Emotional coldness']),
('Dependent personality disorder features excessive need to be', 'Taken care of', ['Admired','Feared','Left alone']),
('Obsessive-compulsive personality disorder is ego-syntonic and marked by', 'Perfectionism and control', ['Intrusive obsessions only','Hallucinations','Dissociation']),
('Narcolepsy is characterized by excessive daytime sleepiness and', 'Cataplexy', ['Sleep terror only','Bruxism','Somnambulism only']),
('Cataplexy is sudden loss of muscle tone triggered by', 'Strong emotion', ['High fever','Alcohol withdrawal','Head trauma']),
('Sleep terror occurs during', 'NREM stage N3 sleep', ['REM sleep','Wakefulness only','Stage N1 only']),
('Nightmares occur predominantly during', 'REM sleep', ['NREM stage N3 only','Stage N1 only','Wakefulness only']),
('REM sleep behavior disorder involves loss of normal', 'Muscle atonia during REM sleep', ['Dreaming','Circadian rhythm','Slow-wave sleep']),
('Premature ejaculation is a disorder of', 'Ejaculatory timing', ['Gender identity','Sexual interest only','Fertility only']),
('Gender dysphoria refers to distress due to incongruence between experienced gender and', 'Assigned gender', ['Personality traits','Academic performance','Sleep schedule']),
('Paraphilic disorder requires atypical sexual interest plus', 'Distress, impairment, or harm/risk to others', ['Any consensual preference','A mood episode','A medical illness']),
]),
('IX. Psychopharmacology, ECT, and Psychotherapy', [
('SSRIs primarily inhibit reuptake of', 'Serotonin', ['Dopamine','Acetylcholine','GABA']),
('SNRIs inhibit reuptake of serotonin and', 'Norepinephrine', ['Acetylcholine','Histamine','Glutamate']),
('MAO inhibitors can cause hypertensive crisis with', 'Tyramine-rich foods', ['Vitamin C','Lactose','Folic acid']),
('A classic adverse effect of tricyclic antidepressants is', 'Anticholinergic effects', ['Agranulocytosis','Pulmonary fibrosis','Tendon rupture']),
('Bupropion is relatively contraindicated in', 'Seizure disorder', ['Migraine','Osteoarthritis','Hypothyroidism']),
('Mirtazapine commonly causes', 'Increased appetite and weight gain', ['Severe diarrhea','Hypertension crisis with cheese','Tardive dyskinesia']),
('Trazodone is associated with', 'Priapism', ['Agranulocytosis','Nephrogenic diabetes insipidus','Gingival hyperplasia']),
('Serotonin syndrome commonly includes hyperreflexia and', 'Clonus', ['Lead-pipe rigidity only','Miosis only','Bradykinesia only']),
('The classic antidote used for severe serotonin syndrome is', 'Cyproheptadine', ['Dantrolene','Naloxone','Flumazenil']),
('Neuroleptic malignant syndrome is treated with supportive care and may include', 'Dantrolene', ['Cyproheptadine','Naltrexone','Disulfiram']),
('Lithium monitoring is especially important because of its', 'Narrow therapeutic index', ['Risk of agranulocytosis only','Risk of priapism only','Tyramine reaction']),
('Carbamazepine can cause', 'Hyponatremia', ['Hypernatremia only','Pulmonary edema only','Mydriasis only']),
('Valproate can cause', 'Hepatotoxicity', ['Agranulocytosis as its hallmark','Retinal detachment','Nephrogenic diabetes insipidus']),
('ECT is especially indicated when depression is severe with', 'Catatonia or psychosis', ['Simple phobia','Nicotine withdrawal','Specific learning disorder']),
('A common transient adverse effect of ECT is', 'Memory impairment', ['Permanent paralysis','Agranulocytosis','Pulmonary fibrosis']),
('Cognitive behavioral therapy focuses on', 'Thoughts, feelings, and behaviors', ['Only unconscious conflict','Only dream symbols','Only medication adherence']),
('Behavioral activation is used prominently in', 'Depression', ['Delirium tremens','Schizoid personality disorder','Dementia prevention only']),
('Motivational interviewing is particularly useful for', 'Ambivalence about behavior change', ['Treating acute NMS','Diagnosing delirium','Managing seizures']),
('Systematic desensitization pairs relaxation with', 'Gradual exposure to feared stimuli', ['Sleep deprivation','Punishment','Free association']),
('Dialectical behavior therapy emphasizes acceptance plus', 'Change strategies', ['Dream analysis','Aversion conditioning','Insulin therapy']),
]),
('X. Ethics, Law, Emergencies, and Miscellaneous', [
('Capacity to consent is decision-specific and includes ability to understand, appreciate, reason, and', 'Communicate a choice', ['Have a high IQ','Be free from every diagnosis','Agree with the clinician']),
('Confidentiality may be breached when there is a serious threat of', 'Imminent harm to self or others', ['Mild disagreement','Academic failure','A routine request by family']),
('The first priority in an acutely agitated patient is', 'Safety of patient and staff', ['Detailed personality testing','Long-term psychotherapy','Neuropsychological testing']),
('Catatonia may show mutism, posturing, negativism, and', 'Waxy flexibility', ['Aphasia','Ataxia','Agnosia']),
('A diagnostic and therapeutic challenge for catatonia is', 'Lorazepam', ['Naloxone','Thiamine','Donepezil']),
('Malignant catatonia can resemble', 'Neuroleptic malignant syndrome', ['Panic disorder','Specific phobia','Dyslexia']),
('Delirious mania is a psychiatric emergency characterized by mania and', 'Delirium', ['Only aphasia','Only tremor','Only a specific phobia']),
('The most immediate medical assessment in altered mental status includes', 'Vital signs and glucose', ['Rorschach testing','IQ testing','Family therapy']),
('A suicidal patient with a specific plan and intent requires', 'Urgent safety assessment and protective intervention', ['Routine follow-up next year','Reassurance only','Exposure therapy only']),
('In India, the Mental Healthcare Act is from', '2017', ['1987','2001','2024']),
('Under the Mental Healthcare Act 2017, an advance directive concerns preferences for', 'Mental healthcare and treatment', ['Property inheritance','School admissions','Driving license only']),
('A nominated representative under the Mental Healthcare Act 2017 assists a person with', 'Mental healthcare decisions', ['Tax assessment','Election duties','Only surgery scheduling']),
('Section 309 IPC was effectively changed by the Mental Healthcare Act to presume severe stress in', 'Attempted suicide', ['Theft','Defamation','Traffic offenses']),
('An organic cause should be considered particularly in first-episode psychosis with', 'Fluctuating consciousness', ['Stable lifelong traits','Normal attention','Clear temporal association with stress only']),
('Visual hallucinations are more suggestive of', 'Delirium or organic illness', ['Primary schizophrenia alone','Specific phobia','OCD']),
('Auditory hallucinations commenting on actions are classically associated with', 'Schizophrenia', ['Delirium tremens only','Dementia only','Conversion disorder']),
('Command hallucinations should prompt assessment of', 'Risk to self or others', ['Only intelligence','Only appetite','Only handwriting']),
('A patient refusing food due to severe depression may require', 'Urgent medical and psychiatric intervention', ['Simple reassurance only','Aversion therapy','No assessment']),
('The term “double depression” describes major depression superimposed on', 'Persistent depressive disorder', ['Cyclothymia','Schizophrenia','Delirium']),
('The most appropriate initial response to a patient reporting suicidal thoughts is', 'Ask directly about intent, plan, means, and protective factors', ['Avoid the topic','Promise secrecy regardless of danger','Immediately argue that suicide is wrong']),
])
]

questions=[]
for title, facts in groups:
    for stem, correct, distractors in facts:
        opts=[correct]+distractors
        # Ensure four distinct display options even where source distractor duplicates occur
        unique=[]
        for x in opts:
            if x not in unique: unique.append(x)
        # Top up only if accidental duplicate source term
        fillers=['None of the above','All of the above','Not applicable','Unrelated finding']
        for x in fillers:
            if len(unique)>=4: break
            if x not in unique: unique.append(x)
        random.shuffle(unique)
        questions.append((title, stem, unique, unique.index(correct)))
assert len(questions)==200, len(questions)

styles=getSampleStyleSheet()
styles.add(ParagraphStyle(name='CoverTitle', parent=styles['Title'], alignment=TA_CENTER, fontSize=20, leading=25, textColor=colors.HexColor('#17365D'), spaceAfter=14))
styles.add(ParagraphStyle(name='Sub', parent=styles['Normal'], alignment=TA_CENTER, fontSize=10, leading=14, textColor=colors.HexColor('#404040')))
styles.add(ParagraphStyle(name='Group', parent=styles['Heading2'], fontSize=12, leading=15, textColor=colors.white, backColor=colors.HexColor('#17365D'), borderPadding=6, spaceBefore=12, spaceAfter=8))
styles.add(ParagraphStyle(name='Question', parent=styles['Normal'], fontSize=9.1, leading=12.2, spaceAfter=3))
styles.add(ParagraphStyle(name='Option', parent=styles['Normal'], fontSize=8.7, leading=11, leftIndent=12, spaceAfter=1))
styles.add(ParagraphStyle(name='Key', parent=styles['Normal'], fontSize=8.7, leading=11.2, spaceAfter=2))
styles.add(ParagraphStyle(name='Small', parent=styles['Normal'], fontSize=8, leading=10, textColor=colors.HexColor('#555555')))

class NumberedDocTemplate(SimpleDocTemplate):
    pass

def footer(canvas, doc):
    canvas.saveState()
    canvas.setStrokeColor(colors.HexColor('#B7C9DD'))
    canvas.line(1.55*cm, 1.35*cm, A4[0]-1.55*cm, 1.35*cm)
    canvas.setFont('Helvetica',8)
    canvas.setFillColor(colors.HexColor('#555555'))
    canvas.drawString(1.55*cm,0.92*cm,'FMGE Psychiatry - 200 MCQs | For educational revision')
    canvas.drawRightString(A4[0]-1.55*cm,0.92*cm,f'Page {doc.page}')
    canvas.restoreState()

doc=NumberedDocTemplate(str(OUT),pagesize=A4,rightMargin=1.55*cm,leftMargin=1.55*cm,topMargin=1.45*cm,bottomMargin=1.7*cm,title='FMGE Psychiatry: 200 MCQs with Answer Key',author='Orris')
story=[]
story += [Spacer(1,2.2*cm), Paragraph('FMGE Psychiatry',styles['CoverTitle']), Paragraph('200 Single-Best-Answer MCQs with Answer Key', styles['CoverTitle']), Spacer(1,0.5*cm), Paragraph('MBBS revision resource | Questions are organized topic-wise and designed for rapid exam practice.',styles['Sub']), Spacer(1,0.65*cm), Paragraph('<b>How to use:</b> Attempt each section without looking at the key. Answers are provided in a separate final section.',styles['Sub']), Spacer(1,1.0*cm), Paragraph('<b>Scope:</b> psychopathology, psychosis, mood, anxiety, substance use, neurocognitive disorders, child psychiatry, personality, sleep, psychopharmacology, emergencies, and Indian mental-health law.',styles['Sub']), Spacer(1,1.0*cm), Paragraph('Educational note: This is an exam-revision resource, not a clinical protocol. Confirm jurisdiction-specific legal details and current guidelines from primary sources.',styles['Small']), PageBreak()]

current=None
for n,(group,stem,opts,ans) in enumerate(questions,1):
    if group != current:
        story.append(Paragraph(group,styles['Group']))
        current=group
    story.append(Paragraph(f'<b>{n}.</b> {stem}:', styles['Question']))
    letters='ABCD'
    for i,opt in enumerate(opts):
        story.append(Paragraph(f'{letters[i]}. {opt}', styles['Option']))
    story.append(Spacer(1,4))

story.append(PageBreak())
story.append(Paragraph('Answer Key',styles['CoverTitle']))
story.append(Paragraph('Each answer corresponds to the single best answer for the numbered question.',styles['Sub']))
story.append(Spacer(1,0.4*cm))
current=None
for n,(group,stem,opts,ans) in enumerate(questions,1):
    if group != current:
        story.append(Paragraph(group,styles['Group']))
        current=group
    story.append(Paragraph(f'<b>{n}.</b> {"ABCD"[ans]}. {opts[ans]}',styles['Key']))
story.append(Spacer(1,0.3*cm))
story.append(Paragraph('<b>Reference used for content review:</b> Kaplan and Sadock\'s Synopsis of Psychiatry, relevant sections on psychopathology, mood disorders, anxiety disorders, substance-related disorders, neurocognitive disorders, child psychiatry, personality disorders, and psychopharmacology. Indian legal items should be verified against the Mental Healthcare Act, 2017 and current official materials.',styles['Small']))

doc.build(story,onFirstPage=footer,onLaterPages=footer)
print(OUT)
Running Command

python "/tmp/workspace/fmge_psychiatry_mcq/src/create_pdf.py" && python -c "from pypdf import PdfReader; p='/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_200_MCQ_Answer_Key.pdf'; r=PdfReader(p); t=''.join((x.extract_text() or '') for x in r.pages); print('pages=',len(r.pages),'questions=',t.count('Answer Key'),'size=',__import__('os').path.getsize(p)); print(t[:280])"

Running Command

python -c "from pypdf import PdfReader; import os, re; p='/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_200_MCQ_Answer_Key.pdf'; r=PdfReader(p); txt='\n'.join((pg.extract_text() or '') for pg in r.pages); nums=set(map(int,re.findall(r'(?m)^\s*(\d{1,3})\.\s',txt))); print('exists',os.path.exists(p),'bytes',os.path.getsize(p),'pages',len(r.pages),'q_number_range',min(nums),max(nums),'all_1_to_200',len(nums)==200 and nums==set(range(1,201))); print('key_200_present', bool(re.search(r'(?m)^\s*200\.\s+[ABCD]\.\s+',txt)))"

Your 200-question FMGE Psychiatry MCQ PDF with answer key is ready.

FMGE Psychiatry 200 MCQ Answer Key

PDF Document · PDF

Create a one-page psychiatry revision cheat sheet

Reading File
Reading File
Browsing Directory

~/

Searching the Web

site:indiacode.nic.in Mental Healthcare Act 2017 advance directive nominated representative

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Browsing Directory

~/fmge_psychiatry_mcq/

Writing File

~/fmge_psychiatry_mcq/src/create_cheatsheet.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.pdfgen import canvas
from reportlab.pdfbase.pdfmetrics import stringWidth
from reportlab.lib.units import mm
from pypdf import PdfReader
import os

OUT='/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_One_Page_Revision_Cheat_Sheet.pdf'
W,H=A4
M=10*mm
COL_GAP=5*mm
COLW=(W-2*M-COL_GAP)/2

c=canvas.Canvas(OUT,pagesize=A4)
c.setTitle('FMGE Psychiatry - One-Page Revision Cheat Sheet')
c.setAuthor('Orris')

# background and header
c.setFillColor(colors.HexColor('#F7FAFC')); c.rect(0,0,W,H,fill=1,stroke=0)
c.setFillColor(colors.HexColor('#173F5F')); c.rect(0,H-28*mm,W,28*mm,fill=1,stroke=0)
c.setFillColor(colors.white); c.setFont('Helvetica-Bold',17); c.drawString(M,H-13*mm,'FMGE PSYCHIATRY')
c.setFont('Helvetica',8.5); c.drawString(M,H-19*mm,'One-page last-minute revision | Diagnostic anchors, drugs, emergencies, and exam traps')
c.setFont('Helvetica-Bold',7.2); c.drawRightString(W-M,H-18*mm,'SINGLE-BEST-ANSWER FOCUS')

# Helpers
def wrap(txt,font,size,maxw):
    words=txt.split(); lines=[]; cur=''
    for w in words:
        test=(cur+' '+w).strip()
        if stringWidth(test,font,size)<=maxw: cur=test
        else: lines.append(cur); cur=w
    if cur: lines.append(cur)
    return lines

def section(x,y,title,items,accent):
    c.setFillColor(accent); c.roundRect(x,y-5.2*mm,COLW,5.2*mm,1.5*mm,fill=1,stroke=0)
    c.setFillColor(colors.white); c.setFont('Helvetica-Bold',7.6); c.drawString(x+2.2*mm,y-3.7*mm,title)
    y-=7.2*mm
    for lead, text in items:
        c.setFont('Helvetica-Bold',6.7); c.setFillColor(colors.HexColor('#1F2937'))
        prefix='• '+lead
        c.drawString(x,y,prefix)
        pw=stringWidth(prefix,'Helvetica-Bold',6.7)
        lines=wrap(text,'Helvetica',6.65,COLW-pw-1*mm)
        c.setFont('Helvetica',6.65)
        for i,line in enumerate(lines):
            c.drawString(x+pw if i==0 else x+2.4*mm,y,line)
            y-=3.05*mm
        y-=0.65*mm
    return y-1.2*mm

leftx=M; rightx=M+COLW+COL_GAP; top=H-32*mm
blue=colors.HexColor('#226C8A'); purple=colors.HexColor('#7851A9'); teal=colors.HexColor('#087E8B'); red=colors.HexColor('#B23A48')

y=top
y=section(leftx,y,'1. MENTAL STATUS EXAMINATION',[
('Thought process:', 'flight of ideas = mania; loosening of associations = schizophrenia; tangentiality never reaches goal; circumstantiality eventually does.'),
('Perception:', 'illusion = misinterpretation of real stimulus; hallucination = perception without stimulus; pseudohallucination is recognized as internal/not real.'),
('Thought content:', 'delusion is fixed, false, culturally inappropriate belief. Thought insertion, withdrawal and broadcasting are Schneiderian first-rank symptoms.'),
('Cognition:', 'attention is impaired early and fluctuates in delirium. MMSE screens cognition; insight and judgment are assessed separately.'),
],blue)
y=section(leftx,y,'2. PSYCHOSIS',[
('Schizophrenia:', 'at least 6 months of disturbance, with at least 1 month of active symptoms. Negative symptoms: flat affect, avolition, alogia, anhedonia, asociality.'),
('High yield:', 'brief psychotic disorder <1 month; schizophreniform 1-6 months; schizoaffective = mood episode plus at least 2 weeks of psychosis without mood symptoms.'),
('Clozapine:', 'for treatment-resistant schizophrenia and suicide-risk reduction. Monitor ANC due to agranulocytosis; also myocarditis, seizures, metabolic effects.'),
('NMS:', 'fever, lead-pipe rigidity, autonomic instability, raised CK. Stop antipsychotic, supportive care; dantrolene or bromocriptine in severe cases.'),
],purple)
y=section(leftx,y,'3. MOOD DISORDERS',[
('MDD:', 'at least 2 weeks, depressed mood or anhedonia plus neurovegetative/cognitive symptoms. SIGECAPS: Sleep, Interest, Guilt, Energy, Concentration, Appetite, Psychomotor, Suicide.'),
('Mania:', 'at least 1 week or any duration if hospitalized. DIGFAST: Distractibility, Indiscretion, Grandiosity, Flight of ideas, Activity, Sleep reduced, Talkative.'),
('Bipolar:', 'Bipolar I requires mania. Bipolar II requires hypomania plus major depression, with no past mania. Hypomania lasts at least 4 days and has no marked impairment/psychosis.'),
('Lithium:', 'tremor, hypothyroidism, nephrogenic DI, weight gain, Ebstein anomaly risk. Toxicity increased by thiazides, NSAIDs, ACE inhibitors and dehydration.'),
],teal)

# right
r=top
r=section(rightx,r,'4. ANXIETY, OCD, TRAUMA',[
('Panic:', 'recurrent unexpected attacks with at least 1 month of worry/avoidance. Acute: short-acting benzodiazepine only when appropriate; long-term: CBT and SSRI/SNRI.'),
('GAD:', 'excessive worry on most days for at least 6 months, difficult to control, with somatic/cognitive symptoms.'),
('OCD:', 'obsessions are intrusive ego-dystonic thoughts; compulsions reduce anxiety. Best psychotherapy: exposure and response prevention. SSRIs/clomipramine are drugs used.'),
('PTSD:', 'trauma exposure followed by intrusion, avoidance, negative mood/cognition, hyperarousal for more than 1 month.'),
],blue)
r=section(rightx,r,'5. SUBSTANCES AND WITHDRAWAL',[
('Alcohol:', 'withdrawal: tremor, anxiety, seizures, delirium tremens. Treat withdrawal with benzodiazepines; give thiamine before glucose when deficiency is suspected.'),
('Opioids:', 'intoxication: miosis, respiratory depression, coma - naloxone. Withdrawal: mydriasis, diarrhea, piloerection, yawning, aches; uncomfortable but usually not fatal.'),
('Stimulants:', 'cocaine/amphetamines cause mydriasis, hypertension, agitation, paranoia. Cocaine chest pain: benzodiazepines and supportive care.'),
('Nicotine:', 'varenicline is a partial nicotinic receptor agonist. Bupropion can assist cessation but avoid in seizure disorder/eating disorder.'),
],red)
r=section(rightx,r,'6. DELIRIUM, DEMENTIA AND CHILD PSYCH',[
('Delirium:', 'acute onset, fluctuating course, impaired attention/awareness. Find and treat cause; use non-drug measures first. Low-dose antipsychotic may be used for dangerous agitation.'),
('Dementia:', 'progressive cognitive decline with clear consciousness early. Alzheimer disease: early episodic memory loss; Lewy body: visual hallucinations, fluctuation, parkinsonism.'),
('ADHD:', 'inattention and/or hyperactivity-impulsivity before age 12 in 2 or more settings. Stimulants are first-line in many patients.'),
('Autism:', 'social-communication deficits plus restricted/repetitive behaviors, early developmental onset. No single diagnostic laboratory test.'),
],purple)
r=section(rightx,r,'7. DRUGS, ECT, PSYCHOTHERAPY',[
('EPS:', 'acute dystonia: anticholinergic; akathisia: beta-blocker; parkinsonism: anticholinergic/amantadine; tardive dyskinesia: VMAT2 inhibitor or change antipsychotic.'),
('Serotonin syndrome:', 'clonus, hyperreflexia, hyperthermia, agitation, diarrhea. Stop serotonergic agents; supportive care, benzodiazepine, cyproheptadine if indicated.'),
('ECT:', 'major depression with suicidality, psychosis/catatonia, severe/refractory mania, malignant catatonia. Short-term memory effects are common.'),
('Therapy:', 'CBT links thoughts-feelings-behaviors; DBT is associated with borderline personality disorder; motivational interviewing helps resolve ambivalence in substance use.'),
],teal)

# footer box
c.setFillColor(colors.HexColor('#E8F1F5')); c.roundRect(M,7*mm,W-2*M,12*mm,2*mm,fill=1,stroke=0)
c.setFillColor(colors.HexColor('#173F5F')); c.setFont('Helvetica-Bold',7); c.drawString(M+2*mm,14.5*mm,'FMGE RAPID TRAPS:')
c.setFont('Helvetica',6.7); c.drawString(M+27*mm,14.5*mm,'Delirium = attention fluctuates | Mania = hospitalize if unsafe | Clozapine = ANC | Alcohol withdrawal = benzodiazepine + thiamine | OCD = ERP')
c.setFont('Helvetica-Oblique',5.8); c.setFillColor(colors.HexColor('#4B5563')); c.drawString(M+2*mm,9.5*mm,'Educational revision aid. Use current institutional protocols for patient care. Content cross-checked against Kaplan and Sadock’s Synopsis of Psychiatry (library excerpts) and Mental Healthcare Act, 2017 reference.')
c.save()

reader=PdfReader(OUT)
assert len(reader.pages)==1, f'Expected 1 page, found {len(reader.pages)}'
text=reader.pages[0].extract_text() or ''
assert 'FMGE PSYCHIATRY' in text and 'Clozapine' in text
print(f'Created {OUT}: {len(text)} extracted characters, {os.path.getsize(OUT)} bytes')
Running Command

python "/tmp/workspace/fmge_psychiatry_mcq/src/create_cheatsheet.py" && python -c "from pypdf import PdfReader; p='/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_One_Page_Revision_Cheat_Sheet.pdf'; r=PdfReader(p); print('pages=',len(r.pages),'bytes=',__import__('os').path.getsize(p)); print((r.pages[0].extract_text() or '')[:550])"

One-page FMGE Psychiatry revision cheat sheet is ready.

FMGE Psychiatry One Page Revision Cheat Sheet

PDF Document · PDF

Create a PDF of psychiatry image-based questions

Reading File
Reading File
Browsing Directory

~/

Searching Images

psychiatry clinical assessment mental status examination image diagram

Searching Images

psychiatry neuroimaging dementia Alzheimer Lewy body MRI PET clinical image

Searching Images

psychiatry EEG delirium electroconvulsive therapy image

Searching Images

psychiatry drug adverse effect tardive dyskinesia antipsychotic image

Searching the Web

psychiatry image based questions medical exam EEG MRI dementia ECT

Finding Sources
Finding Sources
Finding Sources
Searching PubMed

psychiatric disorders AND neuroimaging

Writing File

~/fmge_psychiatry_mcq/src/create_image_questions_pdf.py

import os, math
from PIL import Image, ImageDraw, ImageFont
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image as RLImage, PageBreak, KeepTogether
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.pdfbase import pdfmetrics
from reportlab.lib.enums import TA_CENTER

ROOT='/tmp/workspace/fmge_psychiatry_mcq'
ASSET=os.path.join(ROOT,'assets','image_questions')
OUT=os.path.join(ROOT,'output','FMGE_Psychiatry_Image_Based_Questions.pdf')
os.makedirs(ASSET,exist_ok=True)
W,H=1200,620
font='/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf'
bold='/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf'
F=lambda n=27: ImageFont.truetype(font,n)
B=lambda n=30: ImageFont.truetype(bold,n)
NAVY=(18,52,86); BLUE=(51,126,182); TEAL=(18,142,135); RED=(185,56,62); GOLD=(232,165,51); GREY=(80,90,100); L=(244,247,250); BLACK=(23,31,38)

def base(title, subtitle='Original exam schematic - not a clinical radiograph or patient photograph'):
    im=Image.new('RGB',(W,H),'white'); d=ImageDraw.Draw(im)
    d.rectangle((0,0,W,82),fill=NAVY); d.text((35,18),title,font=B(34),fill='white')
    d.text((36,92),subtitle,font=F(17),fill=GREY)
    return im,d

def save(i, title, drawfn):
    im,d=base(title); drawfn(d); p=os.path.join(ASSET,f'q{i:02d}.png'); im.save(p); return p

def box(d,xy,text,color=BLUE,fs=22):
    d.rounded_rectangle(xy,18,fill=L,outline=color,width=4); x1,y1,x2,y2=xy
    # simple line wrap
    words=text.split(); lines=[]; cur=''
    for w in words:
        if d.textlength((cur+' '+w).strip(),font=F(fs))<x2-x1-24: cur=(cur+' '+w).strip()
        else: lines.append(cur); cur=w
    lines.append(cur); yy=(y1+y2-(len(lines)*fs*1.25))/2
    for line in lines: d.text((x1+12,yy),line,font=F(fs),fill=BLACK); yy+=fs*1.25

def arrow(d,a,b,color=GREY,w=5):
    d.line([a,b],fill=color,width=w); ang=math.atan2(b[1]-a[1],b[0]-a[0]); q=16
    for sign in [-1,1]: d.line([b,(b[0]-q*math.cos(ang+sign*0.55),b[1]-q*math.sin(ang+sign*0.55))],fill=color,width=w)

paths=[]
# 1 thought process
paths.append(save(1,'Thought Process: Which term fits?',lambda d:(box(d,(80,210,330,350),'Topic begins'),box(d,(470,210,740,350),'Many details, but returns to original question',TEAL),box(d,(890,210,1130,350),'Goal reached',TEAL),arrow(d,(330,280),(470,280)),arrow(d,(740,280),(890,280)),d.text((95,430),'Patient answers: “Yes, I came by bus... buses were late... my cousin drives... anyway, yes, I came today.”',font=F(23),fill=BLACK))))
# 2 EEG delirium
paths.append(save(2,'EEG Pattern',lambda d:(d.line((80,385,1120,385),fill=GREY,width=2),d.line((80,150,80,510),fill=GREY,width=2),[d.line([(x,385),(x+20,385-90*math.sin((x-80)/110))],fill=BLUE,width=4) for x in range(80,1100,20)],d.text((95,525),'Diffuse high-amplitude, low-frequency background activity',font=F(25),fill=BLACK))))
# 3 NPH
paths.append(save(3,'Axial Brain Schematic',lambda d:(d.ellipse((340,130,860,580),outline=NAVY,width=8,fill=(238,242,247)),d.ellipse((510,250,680,470),fill=(74,120,168)),d.ellipse((690,250,860,470),fill=(74,120,168)),d.text((480,155),'Marked ventriculomegaly',font=B(28),fill=RED),d.text((130,500),'Clinical triad: gait difficulty, cognitive decline, urinary symptoms',font=F(25),fill=BLACK))))
# 4 Alzheimer atrophy
paths.append(save(4,'Medial Temporal Lobe Schematic',lambda d:(d.ellipse((220,145,980,540),fill=(239,243,247),outline=NAVY,width=7),d.arc((345,230,580,445),0,360,fill=RED,width=12),d.arc((625,230,860,445),0,360,fill=RED,width=12),d.text((333,180),'bilateral hippocampal volume loss',font=B(29),fill=RED),d.text((250,480),'Progressive episodic-memory loss is the principal clinical clue.',font=F(24),fill=BLACK))))
#5 Huntington caudate
paths.append(save(5,'Axial Brain Schematic',lambda d:(d.ellipse((330,125,870,570),fill=(239,243,247),outline=NAVY,width=7),d.polygon([(520,250),(590,315),(540,400),(470,335)],fill=(240,201,104),outline=RED),d.polygon([(680,250),(610,315),(660,400),(730,335)],fill=(240,201,104),outline=RED),d.text((390,165),'Caudate atrophy with enlarged frontal horns',font=B(27),fill=RED),d.text((270,500),'Associated phenotype: chorea + psychiatric/cognitive change',font=F(24),fill=BLACK))))
#6 clock
paths.append(save(6,'Clock-Drawing Test',lambda d:(d.ellipse((345,130,825,585),outline=NAVY,width=8),[d.text((550+int(180*math.sin(i*math.pi/6)),355-int(180*math.cos(i*math.pi/6))),str(i if i else 12),font=B(28),fill=BLACK) for i in range(12)],d.line((585,355,690,275),fill=RED,width=9),d.line((585,355,500,450),fill=RED,width=9),d.text((75,525),'Asked: “Draw a clock showing 10 past 11.” Which bedside domain is being tested?',font=F(24),fill=BLACK))))
#7 ECT
paths.append(save(7,'ECT Electrode Placements',lambda d:(d.ellipse((285,130,550,490),fill=(239,222,192),outline=NAVY,width=6),d.ellipse((655,130,920,490),fill=(239,222,192),outline=NAVY,width=6),d.ellipse((350,210,395,255),fill=BLUE),d.ellipse((440,210,485,255),fill=BLUE),d.ellipse((720,210,765,255),fill=BLUE),d.ellipse((820,350,865,395),fill=BLUE),d.text((310,515),'Bifrontal',font=B(26),fill=BLACK),d.text((670,515),'Right unilateral',font=B(26),fill=BLACK))))
#8 EPS timeline
paths.append(save(8,'Antipsychotic Movement-Adverse-Effect Timeline',lambda d:(d.line((100,330,1100,330),fill=NAVY,width=7),[(d.ellipse((x-13,317,x+13,343),fill=BLUE),d.text((x-65,375),lab,font=B(21),fill=BLACK)) for x,lab in [(180,'hours-days'),(430,'days-weeks'),(700,'weeks-months'),(980,'months-years')]],d.text((130,190),'A. Acute dystonia    B. Akathisia    C. Drug-induced parkinsonism    D. Tardive dyskinesia',font=F(26),fill=BLACK))))
#9 NMS vs SS
paths.append(save(9,'Hyperthermia After Psychotropic Drug',lambda d:(box(d,(100,180,535,500),'Pathway 1\nLead-pipe rigidity\nHyporeflexia\nHigh CK',RED,27),box(d,(665,180,1100,500),'Pathway 2\nHyperreflexia/clonus\nGI hyperactivity\nDiaphoresis',TEAL,27),d.text((300,130),'Dopamine blockade',font=B(24),fill=RED),d.text((760,130),'Serotonergic excess',font=B(24),fill=TEAL))))
#10 lithium
paths.append(save(10,'Lithium: Thyroid and Renal Monitoring',lambda d:(d.line((150,455,1040,455),fill=NAVY,width=5),d.line((150,150,150,455),fill=NAVY,width=5),d.text((65,155),'TSH',font=B(25),fill=BLACK),[(d.ellipse((x-9,y-9,x+9,y+9),fill=RED),) for x,y in [(220,400),(400,360),(580,310),(760,240),(980,185)]],d.line([(220,400),(400,360),(580,310),(760,240),(980,185)],fill=RED,width=5),d.text((270,500),'Rising TSH during maintenance treatment: recognize the adverse effect',font=F(24),fill=BLACK))))
#11 alcohol withdrawal
paths.append(save(11,'Alcohol Withdrawal Time Course',lambda d:(d.line((110,430,1090,430),fill=NAVY,width=5),[(d.ellipse((x-10,420,x+10,440),fill=GOLD),d.text((x-65,455),lab,font=B(20),fill=BLACK),d.text((x-90,y),txt,font=F(20),fill=BLACK)) for x,lab,y,txt in [(220,'6-12 h',260,'tremor/anxiety'),(520,'12-48 h',200,'seizures'),(830,'48-96 h',140,'delirium tremens')]],d.text((130,110),'Last drink at time zero',font=B(28),fill=RED))))
#12 opioid pupils
paths.append(save(12,'Pupil Patterns in Toxidromes',lambda d:(d.ellipse((180,175,500,495),fill=(139,185,221),outline=NAVY,width=6),d.ellipse((315,310,365,360),fill=BLACK),d.ellipse((700,175,1020,495),fill=(139,185,221),outline=NAVY,width=6),d.ellipse((775,250,945,420),fill=BLACK),d.text((240,525),'Pinpoint pupil',font=B(27),fill=BLACK),d.text((755,525),'Dilated pupil',font=B(27),fill=BLACK))))
#13 sleep
paths.append(save(13,'Hypnogram',lambda d:(d.line((100,145,100,500),fill=NAVY,width=4),d.line((100,500,1100,500),fill=NAVY,width=4),[d.text((25,y),t,font=F(21),fill=BLACK) for y,t in [(160,'REM'),(245,'N2'),(330,'N3'),(415,'Wake')]],d.line([(105,410),(190,300),(270,335),(360,190),(440,330),(520,250),(610,410),(700,190),(790,330),(880,250),(970,410),(1080,190)],fill=BLUE,width=7),d.text((360,540),'The period shown with recurrent late-night episodes is which sleep stage?',font=F(23),fill=BLACK))))
#14 sleep EEG
paths.append(save(14,'Sleep EEG Schematic',lambda d:(d.line((70,340,1130,340),fill=GREY,width=2),[d.line([(x,340),(x+18,340-65*math.sin((x-70)/18))],fill=BLUE,width=4) for x in range(70,440,18)],[d.line([(x,340),(x+16,340-16*math.sin((x-500)/8))],fill=TEAL,width=3) for x in range(500,1130,16)],d.text((115,160),'Brief waxing-waning bursts are marked in the left segment.',font=B(27),fill=BLACK),d.text((150,480),'Identify the sleep stage associated with spindles and K complexes.',font=F(24),fill=BLACK))))
#15 autism
paths.append(save(15,'Developmental Communication Profile',lambda d:(d.line((210,500,1030,500),fill=NAVY,width=5),d.line((210,160,210,500),fill=NAVY,width=5),[(d.rectangle((x,500-y,x+80,500),fill=c),d.text((x,520),lab,font=F(18),fill=BLACK)) for x,y,c,lab in [(300,240,RED,'Joint\nattention'),(500,180,RED,'Reciprocal\nplay'),(700,300,TEAL,'Motor\nmilestones'),(900,280,TEAL,'Vision')]],d.text((260,105),'Selective impairment in social communication with restricted/repetitive behavior',font=B(23),fill=BLACK))))
#16 EEG absence
paths.append(save(16,'EEG Pattern During Brief Staring Episodes',lambda d:(d.line((80,350,1120,350),fill=GREY,width=2),[d.line([(x,350),(x+15,350-80*math.sin((x-80)/8))],fill=BLUE,width=4) for x in range(80,1110,15)],d.text((235,170),'Regular generalized spike-and-wave complexes at 3 Hz',font=B(28),fill=BLACK),d.text((120,500),'Child: abrupt behavioral arrest for seconds, no postictal confusion.',font=F(24),fill=BLACK))))
#17 panic cognitive loop
paths.append(save(17,'Panic Cycle',lambda d:(box(d,(120,235,345,375),'Palpitations',RED),box(d,(470,235,730,375),'Catastrophic interpretation',GOLD),box(d,(855,235,1090,375),'More anxiety',RED),arrow(d,(345,305),(470,305)),arrow(d,(730,305),(855,305)),arrow(d,(960,375),(270,440),RED),d.text((260,510),'First-line psychotherapy targets the interpretation and avoidance loop.',font=F(24),fill=BLACK))))
#18 OCD ERP
paths.append(save(18,'Exposure and Response Prevention',lambda d:(box(d,(100,210,340,390),'Contamination cue',BLUE),box(d,(480,210,720,390),'Anxiety rises',RED),box(d,(860,210,1100,390),'No ritual performed',TEAL),arrow(d,(340,300),(480,300)),arrow(d,(720,300),(860,300)),d.line([(980,460),(1000,420),(1020,380),(1040,350),(1060,330)],fill=TEAL,width=6),d.text((270,500),'Repeated exposure without compulsion permits habituation/inhibitory learning.',font=F(23),fill=BLACK))))
#19 personality clusters
paths.append(save(19,'Personality Disorder Cluster Map',lambda d:(box(d,(100,180,390,470),'Cluster A\nOdd/eccentric',BLUE,28),box(d,(455,180,745,470),'Cluster B\nDramatic/erratic',RED,28),box(d,(810,180,1100,470),'Cluster C\nAnxious/fearful',TEAL,28),d.text((142,510),'Paranoid | Schizoid | Schizotypal',font=F(19),fill=BLACK),d.text((470,540),'Antisocial | Borderline | Histrionic | Narcissistic',font=F(19),fill=BLACK))))
#20 Wernicke
paths.append(save(20,'Alcohol-Related Neurologic Emergency',lambda d:(d.polygon([(420,160),(780,160),(920,430),(280,430)],fill=(246,237,212),outline=NAVY),d.ellipse((500,230,570,290),fill=RED),d.ellipse((640,230,710,290),fill=RED),d.line((535,370,670,370),fill=BLUE,width=12),d.text((285,500),'Confusion + gait ataxia + ocular findings: immediate treatment is being tested.',font=F(24),fill=BLACK))))

questions=[
('A patient gives excessive, unnecessary details but eventually answers the question. The thought-process abnormality is:', ['Tangentiality','Circumstantiality','Loosening of associations','Perseveration'],'B','Circumstantial speech eventually reaches the goal; tangential speech does not.'),
('The EEG schematic is most typical of:', ['Delirium','Schizophrenia','Major depression','Panic disorder'],'A','Delirium characteristically shows generalized diffuse slowing on EEG.'),
('The schematic plus gait, cognitive and urinary symptoms most strongly suggests:', ['Alzheimer disease','Normal-pressure hydrocephalus','Frontotemporal dementia','Lewy body dementia'],'B','The classic triad is gait disturbance, cognitive decline and urinary incontinence with ventriculomegaly.'),
('The highlighted medial temporal change is most associated with:', ['Alzheimer disease','Huntington disease','Vascular dementia','Delirium'],'A','Hippocampal atrophy supports Alzheimer disease in the appropriate clinical setting.'),
('Caudate atrophy with enlarged frontal horns, chorea and behavioral change suggests:', ['Wilson disease','Huntington disease','Progressive supranuclear palsy','Parkinson disease'],'B','Huntington disease produces caudate atrophy and may have psychiatric symptoms before motor signs.'),
('A clock-drawing test primarily assesses:', ['Executive and visuospatial function','Long-term procedural memory only','Level of consciousness only','Aphasia only'],'A','Clock drawing samples executive planning, visuospatial ability and comprehension.'),
('The right-side electrode configuration shown is:', ['Bitemporal ECT','Right unilateral ECT','Bifrontal ECT','Transcranial magnetic stimulation'],'B','Right unilateral ECT places electrodes on the right side of the head.'),
('A chronic lip-smacking, tongue-protrusion movement after long-term antipsychotic therapy corresponds to the point labeled:', ['hours-days','days-weeks','weeks-months','months-years'],'D','Tardive dyskinesia is a late-onset involuntary hyperkinetic syndrome.'),
('Fever, autonomic instability, lead-pipe rigidity and very high creatine kinase after antipsychotic exposure indicate:', ['Serotonin syndrome','Neuroleptic malignant syndrome','Malignant hyperthermia','Anticholinergic toxicity'],'B','NMS is related to dopamine blockade and features rigidity, hyperthermia and elevated CK.'),
('The laboratory trend illustrates a common adverse effect of lithium:', ['Hyperthyroidism','Hypothyroidism','Pheochromocytoma','SIADH'],'B','Lithium may cause hypothyroidism, often reflected by a rise in TSH.'),
('A patient with severe confusion, autonomic hyperactivity and visual hallucinations at 72 hours after cessation of alcohol has:', ['Alcoholic hallucinosis','Delirium tremens','Opioid withdrawal','Wernicke encephalopathy'],'B','Delirium tremens generally occurs 48 to 96 hours after cessation and is a medical emergency.'),
('Marked miosis as depicted is most characteristic of:', ['Opioid intoxication','Sympathomimetic intoxication','Anticholinergic toxicity','Serotonin syndrome'],'A','Opioid intoxication classically causes miosis, respiratory depression and reduced consciousness.'),
('The late-night recurrent stage on the hypnogram is:', ['N1 sleep','N2 sleep','N3 sleep','REM sleep'],'D','REM periods recur cyclically and lengthen toward the latter part of the night.'),
('Sleep spindles and K complexes identify:', ['N1','N2','N3','REM'],'B','N2 sleep is defined electrographically by sleep spindles and K complexes.'),
('The profile is most consistent with:', ['Autism spectrum disorder','Specific learning disorder','Intellectual disability alone','Conduct disorder'],'A','Core ASD features include social-communication impairment and restricted/repetitive behavior.'),
('This 3-Hz generalized spike-and-wave pattern with brief staring spells is:', ['Focal impaired-awareness seizure','Absence seizure','Myoclonic seizure','Delirium'],'B','Typical absence seizures show 3-Hz generalized spike-and-wave EEG activity.'),
('The intervention that directly targets this panic-maintenance loop is:', ['Cognitive behavioral therapy','Supportive psychotherapy only','Aversion therapy','Electroconvulsive therapy'],'A','CBT addresses catastrophic misinterpretation and avoidance that perpetuate panic.'),
('The behavioral treatment illustrated is the psychological first-line treatment for:', ['OCD','Delirium','Schizophrenia','Somatic symptom disorder'],'A','Exposure and response prevention is a core CBT technique for OCD.'),
('Borderline personality disorder belongs to:', ['Cluster A','Cluster B','Cluster C','Not classified in clusters'],'B','Cluster B includes antisocial, borderline, histrionic and narcissistic personality disorders.'),
('The immediate treatment in this alcohol-related neurologic emergency is:', ['IV thiamine before glucose','Oral folate alone','Haloperidol','High-dose benzodiazepine alone'],'A','Suspected Wernicke encephalopathy requires prompt parenteral thiamine, given before glucose when possible.')]

styles=getSampleStyleSheet()
styles.add(ParagraphStyle(name='Cover',parent=styles['Title'],fontName='Helvetica-Bold',fontSize=22,leading=26,textColor=colors.HexColor('#123456'),alignment=TA_CENTER,spaceAfter=10))
styles.add(ParagraphStyle(name='Q',parent=styles['BodyText'],fontName='Helvetica-Bold',fontSize=10.4,leading=13,spaceAfter=5))
styles.add(ParagraphStyle(name='Opt',parent=styles['BodyText'],fontSize=9.6,leading=12,spaceAfter=3))
styles.add(ParagraphStyle(name='Ans',parent=styles['BodyText'],fontSize=9.5,leading=12,textColor=colors.HexColor('#173f5f'),spaceAfter=4))
styles.add(ParagraphStyle(name='Small',parent=styles['BodyText'],fontSize=8.2,leading=10,textColor=colors.HexColor('#555555')))

def footer(canvas,doc):
    canvas.saveState(); canvas.setFont('Helvetica',8); canvas.setFillColor(colors.HexColor('#666666'))
    canvas.drawString(1.3*cm,0.7*cm,'FMGE Psychiatry | Original schematic visual questions | Educational revision only')
    canvas.drawRightString(19.7*cm,0.7*cm,f'Page {doc.page}')
    canvas.restoreState()

doc=SimpleDocTemplate(OUT,pagesize=A4,rightMargin=1.25*cm,leftMargin=1.25*cm,topMargin=1.1*cm,bottomMargin=1.35*cm)
story=[Paragraph('FMGE Psychiatry: Image-Based Questions',styles['Cover']),Paragraph('20 original visual single-best-answer questions with answer key and concise explanations. Figures are teaching schematics, not patient photographs or diagnostic imaging.',styles['Small']),Spacer(1,12)]
for idx,(q,opts,ans,why) in enumerate(questions,1):
    blocks=[RLImage(paths[idx-1],width=17.7*cm,height=9.15*cm),Spacer(1,5),Paragraph(f'<b>Q{idx}.</b> {q}',styles['Q'])]
    for j,o in enumerate(opts): blocks.append(Paragraph(f'{chr(65+j)}. {o}',styles['Opt']))
    blocks += [Spacer(1,3),Paragraph(f'<b>Answer: {ans}</b> &nbsp; {why}',styles['Ans']),Spacer(1,8)]
    story.append(KeepTogether(blocks))
    if idx in [5,10,15]: story.append(PageBreak())
doc.build(story,onFirstPage=footer,onLaterPages=footer)
print(OUT)
Running Command

python "/tmp/workspace/fmge_psychiatry_mcq/src/create_image_questions_pdf.py" && python -c "from pypdf import PdfReader; import os,re; p='/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_Image_Based_Questions.pdf'; r=PdfReader(p); t='\n'.join(x.extract_text() or '' for x in r.pages); print('exists',os.path.exists(p),'pages',len(r.pages),'bytes',os.path.getsize(p)); print('questions',len(set(re.findall(r'Q(\\d+)\\.',t))),'answers',len(re.findall(r'Answer: [ABCD]',t))); print(t[:450])"

Reading File
Running Command

python -c "from matplotlib import font_manager; print(font_manager.findfont('DejaVu Sans')); print(font_manager.findfont('DejaVu Sans:bold'))"

Editing File

~/fmge_psychiatry_mcq/src/create_image_questions_pdf.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/fmge_psychiatry_mcq/src/create_image_questions_pdf.py'
Running Command

python "/tmp/workspace/fmge_psychiatry_mcq/src/create_image_questions_pdf.py" && python -c "from pypdf import PdfReader; import os,re; p='/tmp/workspace/fmge_psychiatry_mcq/output/FMGE_Psychiatry_Image_Based_Questions.pdf'; r=PdfReader(p); t='\n'.join(x.extract_text() or '' for x in r.pages); print('exists',os.path.exists(p),'pages',len(r.pages),'bytes',os.path.getsize(p)); print('questions',len(set(re.findall(r'Q(\\d+)\\.',t))),'answers',len(re.findall(r'Answer: [ABCD]',t))); print(t[:450])"

Reading File
The PDF contains 20 FMGE-style psychiatry image-based questions with original visual schematics, answers, and brief explanations. Topics include EEG, dementia imaging patterns, ECT, EPS, toxidromes, substance withdrawal, sleep, OCD, autism, and psychiatric emergencies.

FMGE Psychiatry Image Based Questions

PDF Document · PDF

This is a shared conversation. Sign in to Orris to start your own chat.