Assault victims may be able to find out if they are at risk of contracting HIV or hepatitis.
Police officers called for mandatory tests three years ago
The Scottish Executive is proposing measures to ensure victims have access to their attacker's medical records.
At present, only a procurator fiscal can access an accused's medical records or order a blood sample during an investigation into an alleged assault.
The proposal is contained in the executive's consultation on blood testing following criminal incidents.
Concerns were first raised in 2002 by the Scottish Police Federation which said that officers often had to deal with dangerous incidents ranging from a bite to a rape, which could put them at risk from serious infection.
Other at-risk workers have been added including those working in the NHS, the prison service, social workers and the general public.
Ministers now plan to bring forward legislation enabling a victim to ask the fiscal for information about the accused's hepatitis and HIV status and for an answer to be given within days of an assault.
This is aimed at minimising the worry caused by the victim not knowing whether or not they are at risk of contracting a disease.
The proposals also include a new civil order in the form of a mandatory testing order, which would enable a victim to apply to a sheriff for a suspect to be tested if that person is unable to obtain the information from the fiscal.
This may occur if there is unsufficient evidence for a criminal prosecution.
Justice Minister Cathy Jamieson said: "I hope this sends a clear message not just to public sector staff but to all victims of crime - that we will continue to improve their rights and that we are firmly on their side."
NHS staff are among those most at risk from attack
The general secretary of the Scottish Police Federation, Doug Keil, said police officers were pleased with the proposals, describing them as "something positive" for the victims of assaults and their families.
"Assaults on police are increasing and wherever there is contact with blood or other body fluids there is fear and risk of infectious disease," he went on.
"It should be compulsory for assailants to submit to a blood test and the victims should get the results."
Blood borne infections can be passed on through bites, sexual assaults, spitting in the eyes, injury by a contaminated needle or where blood or other body fluids from an infected person come into contact with an open wound, rash or a sore.
Under the proposals, refusal to comply with a mandatory test would be a criminal offence carrying a fine of up to £2,500 or 28 days in prison.