Massachusetts medical marijuana patients responding to a state survey said they spent at least $246 in the last month on the substance, on average.

The Massachusetts Department of Public Health on Friday released the study as part of an effort to create a baseline as the state enters a new era of marijuana legalization.

Massachusetts voters approved marijuana for medical use in 2012, and then broadly legalized marijuana for recreational use in November 2016.

As of the end of May, there were 31 registered medical dispensaries approved for selling marijuana and 50,353 active patients. Retail recreational pot shops are expected to open sometime this summer.

Ninety percent of survey responders said they are confident that they're buying safe, uncontaminated products from medical dispensaries.

"Overall, respondents reported high rates of positive outcomes/consequences of marijuana use, and little obvious harm," the study said. "Among all respondents, 78% reported positive changes in their mood or mental health, and 67% reported improved physical health."

Ten percent said they drove a car or operated a motor vehicle while under the influence of marijuana sometime in the last 30 days.

According to the survey of patients, individuals use marijuana for therapeutic use 24 days a month. They most commonly smoked it, vaporized marijuana concentrate or ate products with marijuana, also known as edibles.

"The amount of product used varied by gender, age group, and educational attainment. A significantly larger proportion of males compared to females reported using vaporized dried flower or a concentrated preparation of THC referred to as 'dabbing', while a larger proportion of females compared to males reported using sublingual or orally administered uptake products and applying topical cannabis products to the skin," the study said.

"A significantly larger proportion of respondents 50 years old or younger reported smoking (combusting) dried flower cigarettes (or "joints"), vaporizing dried flower, vaporizing marijuana concentrate, dabbing, or consuming edible marijuana products," the study added.

The state Department of Public Health conducted the survey as part of a mandate set up by state lawmakers in their efforts to revise the Massachusetts recreational marijuana law.