The new law allows medical marijuana to be used as a replacement for opioid pain medication. That means anyone whose doctor would write them a prescription for pain pills like OxyContin or Vicodin could be certified for medical marijuana. Eventually, patients will be able to take their doctor certifications directly to a dispensary, complete their registration there and begin purchasing cannabis, and state health officials will review the registration later to make sure it meets the requirements of the law. But state officials say dispensary computer systems need to be upgraded before that will be possible.