1. The department of mental health may perform or conduct HIV testing or HIV sampling without the right of refusal on:

(1) Any individual participating in a methadone treatment program for the treatment of intravenous drug abuse and who has refused to undergo such testing whenever there are reasonable grounds to believe that the individual is infected with HIV and is a reasonable health threat to others;

(2) Any individual under the care and custody of the department of mental health who has refused to undergo testing whenever there are reasonable grounds to believe that the individual is infected with HIV and is a reasonable health threat to others, unless such testing is otherwise prohibited by law.

2. The department of mental health shall not report to the department of health and senior services the identity of any individual for whom HIV testing pursuant to this section confirms HIV infection if such reporting is prohibited by federal law or regulation.