A former University of Colorado graduate student accused of killing 12 people and wounding 58 others in a shooting rampage at a Denver-area movie theater last week had been under the care of a psychiatrist who was part of a campus threat-assessment team.

The disclosure came in court documents filed overnight, NZT, by lawyers for James Holmes, 24, who is accused of opening fire last weekend on a packed showing of the latest Batman movie, The Dark Knight Rises, in the Denver suburb of Aurora.

The defence attorneys, in their request to an Arapahoe County district judge, are seeking a court order requiring prosecutors to turn over the contents of a package that Holmes sent to Dr Lynne Fenton and was later seized by investigators.

''Mr Holmes was a psychiatric patient of Dr Fenton, and his communications with her are protected,'' the filing said.

Fenton, medical director for student mental health services at the University of Colorado-Denver Anschutz Medical Campus, provides medication and psychotherapy for grad students in addition to her teaching duties, according to a school website.

A professional biography of Fenton posted on the site said she had conducted research on schizophrenia, including a two-year grant to work in the schizophrenia research department of the US Department of Veterans Affairs from 2008 to 2010.

Fenton is also a member of the campus-based ''behavioral assessment and threat assessment team,'' which helps faculty and staff deal with ''individuals who may be threatening, disruptive or otherwise problematic,'' according to that group's website.

It could not be ascertained if Fenton was caring for Holmes under the threat-assessment programme or under routine counselling she provided to students on campus.

Under Colorado law, mental health professionals cannot be held liable in civil suits for failing to predict a patient's violent behavior unless it involves a ''serious threat of imminent physical violence against a specific person or persons''. When such a threat is made, the mental health professional is required to take action, which may include notifying those targeted or a law enforcement agency.

Fenton could not immediately be reached by Reuters for comment, and a spokeswoman for the University of Colorado medical school declined to comment, citing restrictions under a gag order issued by the judge presiding over the case.

The university, where Holmes had been enrolled as a doctoral student of neuroscience, confirmed earlier this week that a suspicious package was delivered by mail on Monday and that it was ''immediately investigated and handed over to authorities within hours.''

DEFENCE LAWYERS SEEK SANCTIONS FOR MEDIA 'LEAKS'

Fox News has reported, citing an unnamed law enforcement source close to the investigation, that two packages were sent by Holmes to a psychiatrist on the faculty of the University of Colorado, and that one contained a notebook detailing the shooting scenario. According to Fox News, the notebook contained hand-drawn illustrations of stick figures shooting at other stick figures.

The defence motion accuses the government of leaking information to the media in defiance of a gag order, thereby jeopardising Holmes' rights to due process and fair trial by an impartial jury. It says his lawyers will request a hearing to determine ''appropriate sanctions for this misconduct''.

Prosecutors, responding to the discovery motion, disputed various elements of media accounts as being erroneous, suggesting that anyone who had provided information to Fox News and other outlets lacked real knowledge of the case.

''These factual errors lead (the government) to believe ... that the media is getting information from hoaxers, fraudsters, or maybe from nobody at all by creating fake 'law enforcement sources' out of whole cloth,'' prosecutors said in their filing.

Formal charges against the suspect, who dyed his hair bright orange and was said by authorities to have referred to himself as the Joker - Batman's comic book archenemy - are expected to be filed in court on Tuesday (NZT).

The judge in the case, William Sylvester, set a hearing on the defence discovery motion to be held as part of the proceedings. Sylvester also said he would consider a pleading by news media organisations to make public court documents the judge has sealed in the case.

Arrested within minutes of the shooting rampage at his car in the theater's parking lot, Holmes is being held in solitary confinement in the local jail.

In addition to charges stemming from one of the worst outbursts of US gun violence in recent years, he is accused of wiring his apartment with enough explosives to have levelled the entire building if they had been detonated.

The apartment house was evacuated when the booby traps were discovered. But the explosives were later safely dismantled and removed by authorities and Holmes' neighbours began returning to their homes on Wednesday night (local time).

The latest disclosures about the suspect came to light as mourners attended the third funeral in as many days for one of the victims of the shooting rampage, this one for an 18-year-old high school graduate, Alexander J ''AJ'' Boik, who was bound for art college in the autumn.

Aurora's Queen of Peace Catholic Church was filled with hundreds of mourners, including Colorado Governor John Hickenlooper, Aurora Mayor Steve Hogan and a contingent of Aurora police officers and firefighters.

Boik was one of the youngest among 12 people, aged 6 to 51, killed in the hail of gunfire. Of the 58 wounded, 12 remain hospitalised, including five in critical condition.