Cannabis is expected to be sold legally in Illinois for the first time in decades Monday to those who have qualified to be among the first patients in the state’s medical cannabis program.

Barring any last-minute glitches, up to eight marijuana dispensaries, including several in the Chicago area, are scheduled to open Monday, after state regulators gave cultivation centers the go-ahead to start shipping the drug to the retailers late last week.

Five of the dispensaries confirmed they have inventory and are ready to open, according to the Medical Cannabis Alliance of Illinois. Those include dispensaries in the suburbs of Addison and Mundelein and in Canton, Marion and Quincy.

Illinois officials said they mailed the required ID cards Oct. 30 to qualifying patients, whose numbers have climbed to about 3,300 — still well below the number that many people in the fledgling industry say is needed to make the business viable in Illinois.

State workers were expected to work through the weekend to finish setting up a computer database of patients and caregivers that dispensaries must use to track where patients buy their cannabis and how much, so that patients cannot exceed the legal limit of 2 1/2 ounces every two weeks.

Additional dispensaries are expected to be authorized to open by the end of the year, with a total of 18 grow houses and 60 dispensaries authorized to operate under the state’s four-year pilot program, scheduled to end in 2018.

Illinois growers get green light to ship marijuana to stores

The state’s Medical Cannabis Pilot Program, which former Gov. Pat Quinn signed into law in August 2013, was designed by lawmakers to be more stringent than other states that were earlier to legalize the drug for medical purposes. Those seeking to become qualified patients, for example, must not only get proof from a doctor that they have one of about 40 qualifying conditions, but they must also submit fingerprints and get criminal background checks — measures that critics call heavy-handed and one cause of the program’s slow start.

When Quinn lost re-election to Bruce Rauner, the new administration took over the process of approving the licenses for growers and sellers. That led to further delays as Rauner’s office said it has to undertake a legal review of the process after a lawsuit was filed challenging the procedures Quinn’s administration had used.

Rauner later rejected proposals to add 11 new qualifying conditions to the list. A state panel later recommended that four pain-related conditions, autism, osteoarthritis, irritable bowel syndrome and PTSD be added to the list, but those have not yet won final approval.