A person who is charged with any criminal offense in which it is alleged that the person interfered with the official duties of a law-enforcement officer by biting, scratching, spitting or transferring blood or other bodily fluids on or through the skin or membranes of a law-enforcement officer is subject to a court order requiring testing for the human immunodeficiency virus, any antibody to human immunodeficiency virus or hepatitis.