The North Carolina General Assembly has sent to Gov. Roy Cooper’s desk the latest legislation addressing opioid abuse by creating new crimes against medical workers and granting certain police investigators easier access to prescription records.

The Senate quickly voted 41-3 on Thursday for the measure authored by the House, which held extensive debate on the measure Wednesday. House members were divided on a provision that would allow an investigator to get records from the state’s controlled substance database without a warrant or court order.

The measure also makes it a felony for medical professionals to embezzle or divert pain medicines designated for a patient for their personal use or sale.

Attorney General Josh Stein backs the bill. He also worked with legislators in passing an opioid bill last year.