A furious drug-addicted woman tried to "nut" a policewoman during violent scenes at Hull Royal Infirmary in a deliberate and desperate bid to get herself arrested.
Karina Thompson just wanted a bed for the night so caused chaos at the hospital, including throwing a chair at police and trying to hit her own head against walls.
It was "protracted and sustained violence" and the officer was only trying to stop her hurting herself, Hull Crown Court heard.
Click here for more Hull court news.
The drug user also cruelly stole cash and a bank card from a vulnerable elderly man who used a wheelchair and had given her money in the past.
Thompson, 40, of Holland Street, Hull, admitted assaulting a policewoman as an emergency worker on October 7.
She also admitted breaching a community order imposed on May 19 for theft.
Stephen Robinson, prosecuting, said that police were called to a report that Thompson had been the victim of an assault in Belmont Street, Hull, by being pushed out of a stationary car.
She was taken to Hull Royal Infirmary and claimed that she had taken 45 tablets and needed a bed for the night and just wanted to lie down.
She lay down on a sofa and was asked by a paramedic to leave.
Thompson kept saying that she wanted to lie down and, suddenly, she very aggressively threw a hospital chair towards police. It did not hit them.
We report from Hull's courts every week. So for the latest headlines and stories from Hull Crown and Magistrates Courts, subscribe to our free newsletter, sent out twice a week.
It's free, easy and takes no time at all. Just click on this link to our newsletter sign-up centre.
"She was told to calm down but she began to try to hit her head on the walls of the hospital," said Mr Robinson.
Police tried to keep a firm hold of her as she kept trying to hit her head on the wall.
"She managed to do that a number of times," said Mr Robinson.
Thompson swung her head backwards and forwards and it hit the hand that an officer had put against a wall in a bid to stop her hurting herself.
She told the policewoman: "I'm sorry. I tried to nut you on purpose."
The officer later said: "I was caring and compassionate to her. I was concerned for my colleagues' safety as well as my own."
She was "saddened" that Thompson "felt it was okay to assault her just to get arrested".
In a separate incident, Thompson walked in to the home of a retired disabled man, who used a wheelchair, on October 24 last year.
He had previously loaned her money and he shouted at her to leave.
She broke free and left and he realised that she had taken his bank card and two Â£10 notes.
Thompson had convictions for nine previous offences, including arson being reckless as to whether life was endangered, and had been jailed for that in 2007 for eight months.
She also had two offences of child cruelty in 2018.
Cathy Kioko-Gilligan, mitigating, said that the community order given to Thompson in May for the theft was a "wasted opportunity" for her.
"She simply was not ready to address her drug addiction," said Miss Kioko-Gilligan.
"Because of her addiction, her life began to spiral out of control.
"She had realised that she was in significant difficulties. This does not excuse her behaviour.
"These are appalling offences. She hopes that she will eventually break the cycle of her offending."
Judge David Tremberg told Thompson: "At Hull Royal Infirmary, you started to behave in a threatening and disruptive way, full of non-prescribed drugs.
"The police are entitled to all of the protection that these courts can give them.
"Committing offending at Hull Royal Infirmary is a substantial aggravating feature."
She used "protracted and sustained violence" during the confrontation.
Judge Tremberg said of the theft on the wheelchair user: "You inveigled your way into his home and stole money and his bank card.
"It's clear you targeted him because of his vulnerability. This was a very personal, intrusive offence causing consequential harm as you went on to use his card."
It caused a substantial amount of emotional distress.
"Your victim was left feeling exposed and vulnerable in his own home," said Judge Tremberg.
"In May, the court gave you a golden opportunity to sort your life out.
"The reality is that you were not ready to address your addiction and you spurned that opportunity.
Get the latest updates from across Hull and East Yorkshire direct to your inbox with the free Hull Live newsletters.
You can sign up very simply by following the instructions here
"Instead, you got back into Class A drugs, with all of the lifestyle instability and chaos that entails."
Thompson was jailed for 21 months.
Click here to get Hull court news straight to your email inbox.