A doctor performed an outpatient procedure on Joan Rivers that should ONLY have been performed in a hospital ... and that's what led to her death ... according to a new report.
During Rivers' planned endoscopy ... doctors discovered something on her vocal cords and her doctor decided he would biopsy it ... this according to the NY Daily News.
During the biopsy Rivers' vocal cords reportedly seized -- slammed shut -- cutting off her air supply. Sources tell TMZ while they were trying to resuscitate her, her heart stopped.
Medical experts told the Daily News ... the biopsy was too risky for outpatient surgery and should have been performed in a hospital.
Rivers never recovered and died a few days later.