SPRINGFIELD, Ill. (CBS) — A bill approved by both houses of the Illinois General Assembly would make HIV test results available to the court system for certain criminal cases.

But critics say the bill serves to marginalize people with HIV and worsen prevention efforts due to concerns about the stigmatizing effect of medical records, the Chicago Phoenix reports.

The bill, SB 3673, amends the AIDS Confidentiality Act – which restricts the disclosure of a person’s HIV status – to allow a court to access HIV tests for those are charged with criminal transmission of HIV.

To be charged with the crime, someone must know that he or she is infected with HIV, and engage in sexual activity with someone without a condom anyway.

The bill was sponsored by state Sen. Dale A. Righter (R-Mattoon) in the Senate, and by Rep. Jim G. Sacia (R-Freeport) in the House, the Phoenix reported.

It passed both houses on May 25, but has yet to be signed or vetoed by Gov. Pat Quinn.

In addition to allowing for the access of medical records by a court, the bill also changes the language regarding criminal transmission of HIV. Previously, the crime was defined as someone who knew he or she had HIV having “intimate contact” with someone, but now, the definition has been restricted to sex without condoms.

Ramon Gardenhire, director of government affairs at the AIDS Foundation of Chicago, tells the Phoenix that the change is a step forward, but his agency does not want HIV to be criminalized at all.

Meanwhile, another critic, legal advocate Owen Daniel-McCarter, tells the Phoenix he thinks allowing court access to medical records will damage HIV prevention efforts because of the stigmatizing effect of medical records.

But a sponsor, Sen. Mike Jacobs (D-Moline) tells the publication the purpose is not to punish people with HIV in general, but to go after serial offenders who have infected multiple people.