The Legislature has taken steps to expand the availability of medical marijuana to Minnesota hospitals when it becomes legal in July.

When state lawmakers approved the original law authorizing health care providers to dispense the drug, they didn't include hospitals where terminally ill patients could end up.

That left hospitals wondering what they would do for patients who use medical marijuana, and whether they could allow it.

The Legislature has added hospitals to the list of facilities that can control, dispense and manage the use of cannabis inside their systems, said Manny Munson-Regala, an assistant state health commissioner. Gov. Mark Dayton signed off on the change, he said.

"Those hospitals that are willing to continue the care regimen of those patients in their hospital setting, they said the state law needs to give us the same abilities and immunities that are afforded nursing homes," Munson-Regala said.

State officials do not expect hospitals to actually acquire the drug from Minnesota's two producers on behalf of patients. A hospital would have to go through a legal process to designate a staffer as an eligible caregiver recognized by the state, which is not realistic for many stays. But Munson-Regala said patients or their families could bring their own supply, and have it managed with other medication by hospital staff.

The registry for medical marijuana in Minnesota opens next week in the first step toward bringing users into the state's new medical cannabis system.

Pill and liquid forms of marijuana will be legal in Minnesota July 1 for those that qualify. They are initially expected to be available from dispensaries in Minneapolis and Eagan.

Raw leaf and smokable marijuana will still be illegal.

The change only involves state law. The federal ban on marijuana, including a ban on prescribing it, remains in place.