Two West Auckland-based police officers were at Waitakere Hospital in Henderson dealing with an unrelated matter in October last year when the gunman pulled up in the ambulance bay at the emergency department.
Schuster got out of the car brandishing the single-barrel pump-action shotgun.
"The defendant has walked around the (empty) police patrol vehicle and fired three shots into it from different angles," court documents said.
"These shots have shattered the front passenger window, sprayed the vehicle exterior with dents and holes, and caused a large hole in the metal boot."
Members of the public in a nearby waiting room were in direct line of any stray shotgun rounds, the summary of facts said.
Two constables left the hospital and saw what had happened.
"While one constable spoke to him, the other went to the police car and retrieved a firearm," Detective Inspector Bruce Scott then told the New Zealand Herald.
"He was then arrested at gunpoint as he tried to drive away. They [the constables] were hugely brave. They made sure that nobody was injured or killed as a result of their brave actions."
Schuster first came to police attention that afternoon when he went to a Glenfield property and fired two shots inside, from which the aggravated burglary charge stemmed.
After firing rounds into the television and the wall, he threatened the occupants with the shotgun and bizarrely asked a female resident, who was in bed at the time, to Google "PHD and world population".
Schuster eventually left for the hospital in her car.
While medical professionals had agreed the defendant was now fit to plead, Mr Mansfield said his client's mental health was "particularly poor at the time".
The defendant explained to officers that he "was paranoid, being spied on and that he needed to see a doctor as all of his organs were failing".
He will be sentenced in August and was given a first-strike warning this morning.