Any time a character in a comedy visits a mental institution or hospital psych ward, odds are good that they'll speak with the first professional-looking person in a lab coat they come upon. And nearly as good that, having spoken to that person, they'll be approached by a real doctor, who'll chew out the "professional" for skipping their meds and stealing somebody's white coat. Surprise! The visiting character — and audience — have just been caught off-guard by this trope.
Similar confusion can arise with mental patients who pose as nurses, security guards, teachers, police, clergy, or other figures of authority and/or respect. Usually a result of I Just Want to Be You, in that the patient wants to emulate the authority-figure's status so much that they adopt that role, suppressing their own identity.
Darker examples, in which a patient killed the doctor to assume his or her identity, appear in thrillers and horror stories. Such cases often start out as a straight-up deception, but may overlap with Becoming the Mask.
Compare Napoleon Delusion, in which the patient is convinced they're someone else, but the fact that they're deluded isn't initially hidden from other characters or the audience. Contrast Lost in Character, in which an otherwise-sane actor becomes caught up in living their assumed role. No relation other than the name to Running the Asylum, in which a fan takes over the writing of a series.
This trope is sometimes played for suspense rather than laughs, so possible spoilers below:
- In Teachers, a delusional patient wanders into the school and is mistaken for the new American history instructor. He embraces the role and winds up teaching for most of the year, winning students' approval with his over-the-top costumed portrayals of historical figures.
- A similar example involving a psychiatric patient that thinks he is a lawyer, talking to his family in pretty good legalese until he's subdued, appears on the second Airplane! movie.
- In The Couch Trip, Dan Aykroyd plays a mental patient who escapes & impersonates his psychiatrist at a conference while the psychiatrist is out of the country.
- In The A-Team, the Establishing Character Moment of Captain "Howling Mad" Murdoch has Baracus and Face mistake him for a doctor. He's already sown a wound on Baracus' arm in the shape of a lightning bolt by the time the real doctor (and Hannibal) comes along.
- In National Lampoon's Class Reunion, serial killer Walter Baylor assumes the identity of a psychiatrist to infiltrate the reunion party and "warn" its attendees about the murderer on the loose. It's unclear if he's mimicking a specific doctor or not.
- In I'm a Cyborg, but That's OK, the heroine wakes up in an hospital bed after a Bungled Suicide. An elderly women welcomes her and wheels her around the asylum for a while. Then a doctor comes along and berates the woman who turns out be be just another patient.
- In The Ninth Configuration, it's revealed that Colonel Kane was not the psychiatrist in charge of the ward for disturbed Vietnam Veterans, but rather a patient who was allowed to act out his delusions (by his brother, the actual psychiatrist on the ward) in the hope that it would be therapeutic both for him and the other patients.
- The Richard Pryor film Critical Condition plays with this: Pryor's character is a hustler that successfully pulled off the Insanity Defense and thus is admitted in the psychiatric wing of a hospital, from which he later manages to escape by pretending to be a doctor... and the plot forces him to keep up the charade when the area that the hospital is in becomes ground zero for the landfall of a hurricane, making transportation impossible and putting the patients (some of which became his friends) at risk.
- Inverted in Shutter Island, in which the protagonist believes he, himself, is a federal agent investigating sinister events at a psychiatric hospital, but is revealed to be a delusional patient.
- The Dream Team opens with a man (Christopher Lloyd) in a lab coat walking down the halls of a mental institution taking notes on a clipboard. It turns out that he's a patient, while in reality the psychiatrist treating him is dressed much more casually. Later in the film, he poses as a psychiatrist successfully so he can get some bad guys temporarily committed on a psych hold.
- The Alfred Hitchcock film Spellbound is one of the most famous examples, with Gregory Peck as Dr. Edwards, who initially presents as a psychiatrist and is later revealed to be a patient with delusions and severe amnesia.
- Stonehearst Asylum has the main character discover the entire staff of a mental hospital have been replaced by the patients, who took over the asylum. Some of them are actually much nicer than those they replaced. The ending reveals he himself is a patient impersonating a psychiatrist too.
- In Nuts (1987), Claudia Draper uses one to play a joke on her public defender, who doesn't realize it until the 'doctor' starts mumbling vaguely, gets up from the table and wanders off, revealing she's wearing Institutional Apparel under her coat.
- The 1972 horror anthology Asylum both inverts this trope and plays it straight: the applicant to replace the titular hospital's chief doctor is challenged by the acting head to determine which of four interviewed patients is the previous head of the facility, who has suffered a breakdown and no longer remembers being a staff member. The concluding twist has the attendant who'd let the would-be new head into the interview rooms turn out to be the previous office-holder he's looking for, having killed and assumed the identity of the real attendant.
- In Edgar Allan Poe's "The System of Doctor Tarr and Professor Fether" the narrator discovers that the mental institution staff that he's been talking to are actually the mental patients who have taken over the asylum.
- The Mary Russell novel Island of the Mad has an odd and complicated example. The very creepy doctor apparently in charge of the asylum on Poveglia is an insane patient — but he's actually the one and only patient, as all the apparent patients are a commune of abused women getting away from their abusers. The doctor, although he's a legitimate doctor, is an insane relative of one of them, who is being cared for there while also being used as a figurehead for the outside world.
- 21 Jump Street: Hanson and Penhall have to go visit a psychiatrist after they have been involved in a shooting. When they arrive in the doctor's office, a young woman starts a session with them, seemingly very professional—until a man, the real psychiatrist, walks in, apologizes for being late, and sends the woman away to her hospital room (it's also clear from his reaction, that this patient of his regularly does this).
- Ralph "the Birdman" on St. Elsewhere once spent an episode claiming to be "Dr. Bullfinch" and making rounds in the hospital.
- Monty Python's Flying Circus: Hamlet visits a psychiatrist, who turns out to be a fake pretending to be a psychiatrist. The fake is chased out by another psychiatrist, who it turns out is also a fake chased out by the "real" psychiatrist, etc. At one point one of the fakes claims it's a psychological test they're running on Hamlet.
- In NewsRadio, when Bill (Phil Hartman's character) gets institutionalised, one of his fellow inmates greets him, pretending to be a psychiatrist.
- Jonathan Creek "The Scented Room": Maddy is talking to a psychiatrist when a police officer bursts in saying that her psychiatrist is actually a mental patient with an obsession with listening to people's intimate sexual neuroses. But another psychiatrist comes in and tells her that the man is her patient and actually works for the North Thames Gas Board.
First Psychiatrist: Unsettling when that happens, isn't it? Now, you were talking about some general sense of confusion in your personal life.
- Played for drama in Iron Fist (2017), when Danny Rand is forcibly admitted to a psych ward, the "doctor" who greets him when he awakes tries to persuade him to kill himself because "it's the only way to escape". When this fails, he attacks Rand himself only to be dragged away by orderlies.
- Played for drama in Gotham. Jim Gordon is working as security in Arkham Asylum, and it turns out that the villain of the week is the nurse who had been helping him. Somehow no one in the staff recognised her in order to inform the head of security that she's not a nurse, but actually a patient.
- The investigators of CSI once spent most of an episode working with what they thought were a couple of FBI agents, only to learn that they were actually residents of a halfway house acting out those parts. One was deeply delusional, the other a habitual identity thief who was playing along to humor him.
- On The Alienist, Kreizler is greeted at the D.C. military asylum by a fellow physician who recognizes him from a past seminar. He's partway through questioning the man when the real doctor arrives, and explains that the man Kreizler's been talking to is a field surgeon who hasn't been right in the head since Gettysburg obliged him to amputate a lot of unfortunate troops' limbs.
- In the fourth season of Sherlock, John's therapist is actually the season Big Bad Eurus Holmes, during one of her "furloughs" from the secure hospital where she is meant to be the only patient.
- Brennan is duped by a psych patient in a Bones episode while investigating a murder at the facility. She thinks hes the first psychologist shes actually liked and then finds out hes a patient who believes hes a doctor.
- In Accidental Death of an Anarchist, the Maniac is being interrogated by Inspector Bertozzo in the police station. After he escapes from Bertozzo, he starts pretending to be the judge who is coming to investigate the death of the anarchist. Everyone believes this.
- In Anyone Can Whistle, J. Bowden Hapgood successfully convinces the whole town that he's a doctor at the local mental institution known as the Cookie Jar. His true identity as one of its patients is only revealed to Fay in the second act.
- In Shadowrun Returns, the Ripper turns out to be a Deadly Doctor who was actually a patient of said (legitimate) doctor who killed him and took his identity.
- In Psychonauts, Crispin (who actually impersonates an orderly, but otherwise counts) is actually a patient who managed to drive his orderly, Fred, into a breakdown and take over the asylum.
- In the bonus-game prequel to Mystery Case Files's Key to Ravenhearst, Benedict is admitted to the asylum by a "security guard" whose strange behavior suggests this trope is in play. It's confirmed when, after meeting an equally-unconvincing "doctor" in the lobby, he finds the actual asylum staff Bound and Gagged and suspended from the ceiling upstairs.
- In Rocko's Modern Life, Rocko goes to the hospital and the first doctor he sees treats him rather roughly during his physical. After he leaves, a nurse goes in, sees the "doctor" and exclaims "Hey! I thought I strapped you to the bed!"
- In the Looney Tunes short "Patient Porky", Porky Pig goes into a hospital for eating too much cake. A mental patient there pretends to be a doctor and puts him on the X-ray machine, showing a whole birthday cake (complete with candles) inside Porky's stomach. He then sends him to the OR to "operate" and get the cake out.
- In the I Am Weasel episode "He Said, He Said", the Red Guy plays a psychiatrist to Weasel and baboon. A look at his license reveals that he crossed out "OTIC" in "PSYCHOTIC" and write in "IATRIST".
- Dr. W.C. Minor was an accidental example. He was a frequent contributor to the first edition of the Oxford English Dictionary ... and also happened to be an inmate at Broadmoor Hospital (having shot a man in a paranoid fit; his victim's widow apparently brought him books to aid his research). Because he was a former army surgeon (and therefore a doctor), Sir James Murray assumed that he was a doctor who worked at the asylum and didn't learn otherwise until he visited him after several years. Note that Murray decided to visit Minor at Broadmoor after discovering that he was a patient - the exaggerated version of the story where he didn't find out until he arrived at the hospital is an urban legend.
- Real Life inversion: In 1973, Stanford University psychologist Dr. David Rosenhan and seven of his collaborators had themselves admitted to mental hospitals claiming to be hearing voices. All of the "patients" were admitted, none of them were discovered to be malingering, and they were detained for periods of seven to fifty-two days. Although the hospital staff never guessed the hoax, a number of other patients reportedly realised that the investigators were sane.