A doctor at Lynebank Hospital in Dunfermline was repeatedly threatened in anonymous letters.
The letters were abusive and made ongoing threats that the staff member would come to harm and were sent over a period of 18 months.
The writer was identified as 57-year-old Alan Simpson, of Kennedy Crescent, Dunfermline.
When he appeared in the dock at Dunfermline Sheriff Court it emerged Simpson was apparently unhappy over the treatment of a family member.
He admitted that between March 1 2018 and August 30 this year, at his home and Lynebank Hospital, Dunfermline, he repeatedly sent anonymous letters to staff members there, containing abusive language, threats of violence and homophobic comments.
The letters to and about the doctor repeatedly called him “evil” and made threats to kill him.
The letters referred to the victim as an “evil homo doctor” and also stated “we all hope he gets Aids”.
Other threats included “we’ll be able to get him at his home” and “when we get him, you can guarantee he will be off the face of the Earth”.
The court was told Simpson had been unhappy about how a relative had been treated when she was a patient at Lynebank.
Sheriff Charles MacNair deferred sentence until November 11 for reports.