As expected, the Massachusetts House of Representatives Wednesday approved a bill designed to curb the state’s opioid crisis.

The vote was unanimous, reports the State House News Service.

RELATED: House bill would limit opioid prescription, take aim at abuse

With Senate approval and Gov. Charlie Baker's signature, the legislation would limit the size of first-time opioid prescriptions to a week's worth of the pills and require schools to screen students for signs of substance abuse.

The bill is part of a compromise reached by a six-member conference committee after almost seven weeks of Baker voicing the need for stronger legislation to combat opioid addiction.

Beyond limiting first-time quantities, the bill also sets a 24-hour evaluation period in emergency rooms for overdose victims seeking help, and it allows patients to only fill portions of their prescriptions at one time.

RELATED: Opioid overdose deaths climb: DPH

This compromise bill differed from Baker’s original proposal, which would have let doctors involuntarily commit patients for 72 hours in drug treatment facilities and restricted first-time pain killer prescriptions to three days' worth of the drugs.

The bill is scheduled for a vote in the Senate on Thursday.

Additional reporting from the State House News Service.