ACCUSED Colorado movie theatre shooter James Holmes was being treated by a psychiatrist at the university at the time of the massacre, a court has been told.

The motion named Dr. Lynn Fenton as defence lawyers sought to gain access to a package James Holmes had mailed to her prior the July 20 mass shooting, which also wounded 58 people.

Reports surfaced Wednesday that Holmes - who recently dropped out of the University of Colorado - had sent a notebook to a university psychiatrist that included details and drawing of his plans to kill people.

There were conflicting reports about whether the package reached the school in time to potentially prevent the massacre, but officials remained tight-lipped due to a strict gag order imposed by the judge overseeing the case.

Judge William Sylvester unsealed some court filings on Friday after defence lawyers argued that Holmes's constitutional rights had been violated by the "breach of confidentiality and privilege" and sought "sanctions for this misconduct".

In a preview of likely battles to come, the defence lawyers also argued that the contents of the package should not be used as evidence because "Mr Holmes was a psychiatric patient of Dr Fenton, and his communications with her are protected."

Colorado apartmentSource:AP

Fenton teaches at the University of Colorado's medical school and heads student mental health services there in addition to conducting research into schizophrenia and other mental illnesses.

Prosecutors rebuffed the defence motion, arguing that news stories about the package contained significant factual errors and that there was no evidence the government was responsible for the leaks.

They also indicated that a FoxNews.com report that the package contained a notebook "full of details about how he was going to kill people" was incorrect.

Reports that the police "are currently examining the contents of the box" are "untrue, as the contents were secured and not examined," prosecutors said.

Holmes, who was studying neuroscience in a doctoral program at the University of Colorado Denver, is expected to be formally charged at his next court hearing on Monday.

Sylvester ordered a hearing on the defence motions also be held on that day.

Colorado ShootingSource:AP

The alleged gunman gained access to the movie theatre in Aurora, Colorado outside Denver via a fire exit shortly after the screening of The Dark Knight Rises began and threw two canisters of noxious gas into the auditorium, witnesses said.

After firing one round directly into the air with a pump-action shotgun, he began shooting people at random with a military-style assault rifle capable of firing 50 to 60 rounds a minute.

Authorities say Holmes - who had dyed his hair a reddish orange - claimed he was the Joker, Batman's sworn enemy in the comic book series that inspired director Christopher Nolan's film trilogy, which features British-born actor Christian Bale as "the caped crusader."

He gave himself up outside the cinema, still clad in the body armour witnesses described the gunman wearing.

Authorities said Holmes booby-trapped his apartment with the aim of killing anyone who went outside, likely targeting police and first responders.

It was days before neighbours were allowed back in the three-story building.

Holmes, 24, is being held in solitary confinement at the Arapahoe County Detention Center and could face the death penalty if convicted, although Colorado has only executed one person since capital punishment was reinstated in 1976.