A 32-year-old man acted aggressively and spat at police officers.
Richard Gibson, of Fintryside, was jailed for nine months at Dundee Sheriff Court.
Gibson admitted behaving in a threatening or abusive manner by shouting, swearing and acting aggressively at Ninewells Hospital, James Arnott Drive, on September 29.
He also admitted a second charge of threatening or abusive behaviour by informing PC Ian Storrar that he was a carrier of HIV and threatening to spit on him at the same location and on the same date.
He further admitted assaulting PCs Ross Hunter and Paul Findlay by spitting towards them at police headquarters on September 30.