Man facing prison time for allegedly pretending to be a doctor, even treating a patient in California

He allegedly impersonated a doctor seven times at a children's hospital.

A former college student is facing three years in state prison and eight years in jail for allegedly impersonating a doctor at several California hospitals and even diagnosing an unwitting patient, according to authorities.

Ariya Ouskouian, 23, of Irvine, California, was charged Tuesday with a felony count of providing medical diagnosis while impersonating a doctor and eight misdemeanors of misrepresenting oneself as a licensed medical practitioner.

On May 3, Ouskouian allegedly pretended to be a doctor when he diagnosed an unidentified patient for a growth on his neck at the University of California, Irvine (UCI), authorities said.

Ouskouian, a former student at the University of California, Irvine, also allegedly impersonated a doctor "on at least seven different occasions" between April 23 and June 4 at Children's Hospital of Orange County, the Orange County District Attorney's Office said.

On each of these occasions at the children's hospital, Ouskouian allegedly told security personnel that he'd lost his hospital badge and then requested a temporary badge to be issued, allowing him access to restricted floors, authorities said.

"When hospital staff became suspicious of the defendant and requested verification of his doctor status, Ouskouian is accused of providing the name of a UCI personnel," the district attorney's office said.

Ouskouian had convinced the UCI personnel of his doctor status and that personnel had verified him to the children's hospital, authorities said.

The Orange County Police Department, which was contacted by the children's hospital, then began investigating the case. The police department directed any questions regarding the case to the district attorney's office.

Ouskouian was arrested Tuesday and was released Wednesday after posting bond, according to the Orange County Sheriff's Department.

Children's Hospital of Orange County notified the state Department of Public Health and law enforcement agencies, as well as assisted in alerting area hospitals when it learned that an individual was trying to pose as a resident, the hospital said in a statement.

"During limited time on our campus, we believe this individual did not interact with any of our patients," the hospital said. "The individual did not have any access to patient health information. Out of deference to the prosecution and defense of this matter, we will not provide any additional details."

The University of California Irvine Medical Center had also cooperated with the Orange Police Department and the Orange County District Attorney's Office in this investigation, the school said.

"There is no indication the person impersonating a physician compromised UCI Health patient records or saw patients at UC Irvine Medical Center in Orange or at UCI Health outpatient physician offices," the medical center said in a statement to ABC station KABC-TV. "This person was not affiliated in any way with UCI's school of medicine or residency program."

Ouskouian was no longer a student at University of California Irvine, according to the university.

"He was not affiliated in any way with UCI's medical school, residency program or medical center. Federal student privacy laws prohibit me from sharing additional details," the university said. "The university fully cooperated with the investigation conducted by the Orange Police Department and the Orange County District Attorney's Office. Mr. Ouskouian did not have access to any UCI Health patient records."

Ouskouian hasn't entered a plea and will appear in court on Sept. 25.

ABC News' Jenna Harrison and Crystal Muguerza contributed to this story.