Sarah Edwards was initially arrested for being drunk and disorderly near her home, on Outram Street, on December 18, last year, said prosecutor Daniel Pietryka.
She was taken to King’s Mill Hospital, Sutton, where she shouted the racist comments ‘at random’, he added, and the offences were aggravated by her previous convictions.
"She is struggling with a strong addiction to alcohol," said Abbey Edwards, mitigating. “Ten years ago she was the victim of quite severe domestic violence.
“Social services became involved and her children were taken into care because it was deemed she couldn't protect her family.
“Regrettably. she turned to alcohol to mask the pain and her drinking has spiralled out of control.
“An alcoholic drink is the first drink she takes when she gets up.”
Mansfield magistrates heard that, at the time of the offence, the 37-year-old was diagnosed with breast cancer, and is due to start radiotherapy.
The court also heard Edwards has voluntarily engaged with Change Grow Live, a charity which specialises in helping people tackle substance misuse.
Edwards admitted being drunk and disorderly, assaulting an emergency worker and racially-aggravated harassment.
She was handed an 18-week prison sentence, suspended for 18 months, and ordered to participate in a six-month alcohol treatment requirement and 25 rehabilitation days.
She was ordered to pay £50 compensation to the officer, as well as a £128 surcharge and £85 court costs.