Notwithstanding the provisions of Sections 4 and 5 of this Act, informed consent and pre-test information are not required for the performance of an HIV test: (a) for the purpose of research, if the testing is performed in such a way that the identity of the test subject is not known and may not be retrieved by the researcher, and in such a way that the test subject is not informed of the results of the testing, or (b) when in the judgment of the physician, such testing is medically indicated to provide appropriate diagnosis and treatment to the subject of the test, provided that the subject of the test has otherwise provided his or her consent to such physician for medical treatment.
410 ILCS 305/8