Rica Madrid poses for a photograph as she smokes pot in her home on the first day of legal possession of marijuana for recreational purposes, Thursday, Feb. 26, 2015, in Washington. Democratic Mayor Muriel Bowser defied threats from Congress by implementing a voter-approved initiative on Thursday, making the city the only place east of the Mississippi River where people can legally grow and share marijuana in private. (AP Photo/Alex Brandon)

Correction: Medical marijuana or medical CBD oil is legal in all but 12 states: Idaho, North and South Dakota, Nebraska, Kansas, Louisiana, Arkansas, Florida, Indiana, Ohio, West Virginia and Pennsylvania. An earlier version incorrectly included Michigan on that list. Michigan voters approved a measure to legalize medical marijuana in 2008. The story has been corrected.

With a wave of legalization measures in recent years, marijuana in some form is now legal in 38 states. But in the 12 where it is not — a swath of the west and Midwest, including Kansas, Nebraska and the Dakotas, and in the rust belt states of Ohio, Indiana and Pennsylvania — parents whose use of the drug would be legal elsewhere are losing their children and often seen as irresponsible parenting pariahs.

In March, Child Protective Service workers took Shona Banda’s 11-year-old son from her home in Garden City, Kansas, saying her use of marijuana to control debilitating Crohn’s Disease put the child in danger.

Last Friday, the state of Kansas charged Banda with five felony counts of possession of marijuana with the intent to distribute, manufacturing Tetrahydrocannabinol, an oil extracted from marijuana, two counts of possession of drug paraphernalia and one count of child endangerment.

Banda, who will turn herself in to authorities June 15, according to her attorney, could face a maximum of 30 years in prison.

On the day she was charged, June 5, the Louisiana state legislature sent a bill to legalize medical marijuana to Republican Gov. Bobby Jindal, who’d indicated he’d sign it, and the Detroit Free Press reported that establishment Republicans are backing a recreational marijuana bill for 2016. It was also the day Amber Thurmond, of Arizona, appeared in family court in Hays, Kansas and was told by a judge that if she ever wanted to be reunited with her nine-year-old daughter, Thurmond would have to move to Kansas.

Thurmond lives in Arizona, where medical marijuana is legal, uses medical marijuana to control seizures and works at a medical marijuana dispensary. She’s facing charges of physical, mental and emotional neglect in Kansas, where she sent her daughter to live with her brother, a police officer, for a semester, she said, while she got on her feet financially. Eighteen months later, her daughter has been put in the state foster care system and placed with her brother.

“These mothers are being forced to choose between their health and their ability to be a parent,” said Sarah Swain, a Kansas attorney who is representing both Banda and Thurmond. “And there really is no choice to be made. We can’t be mothers if we’re so sick that we’re bedridden, or if we aren’t alive.”

[Related: Even where it’s legal for parents to smoke pot: What about the kids?]

Thurmond was featured on the National Geographic TV series, “American Weed,” which followed the story of the town of Castle Rock, Colorado voting to close down her medical marijuana dispensary, Plants4Life.

“I want to tell everyone I see, ‘you have children? Well, you better reconsider your usage,’” Thurmond said. “And yet, we can go home and drink ourselves to death and never have children removed from our homes.”

Charlene Brubaker, the county attorney involved in Thurmond’s case, said the judge found that her daughter had special needs that could only be met with Thurmond’s frequent presence with the child in Kansas. “The court did not make its decision based on medical marijuana. It’s just their spin, not the truth,” Brubaker said, though she said she could not say more for confidentiality reasons.

Chuck Noerenberg, president of the National Alliance for Drug Endangered Children, a group that works with law enforcement and social services, say they’re intensely watching how legalizing marijuana is affecting caregivers’ ability to provide proper care to children.

“Whether it’s a legal or illegal substance, if it has an impact on caregivers’ ability to take care of children, that’s a concern of ours,” he said.

Banda, who has become an outspoken advocate for medical marijuana, had 17 surgeries, tried a number of medications and was prescribed the powerful narcotic, fentanyl, to “ease her passing,” she said, because her doctors thought she was going to die. Then she tried marijuana, and began to heal, a journey she chronicles in her book, Live Free or Die, and on her Facebook page.

[Related: A D.C. doctor makes medical marijuana a specialty]

“I spent years raising my children from a couch, not being able to move much,” Banda said, who also has an 18-year-old son. “I wasn’t able to be a proper mother when I was sick. And now I’m a fantastic mother.”

Twice Banda tried to move to Colorado, where marijuana is legal, she said, but was forced to move back to Kansas near family for financial reasons. Banda is separated from her husband, who now has custody of their 11-year-old son.

The child was in a drug education class at school March 24, and spoke up about his mother’s medical marijuana use. School officials called the police and Child Protective Services. A search of the house found marijuana and drug paraphernalia on the kitchen counters.

Banda has seen the child just once since March 24, she said. Nor has she used cannabis, advocates’ preferred term for marijuana. She’s begun losing weight and an infection that rotted the roof of her mouth has returned. “I’m very afraid,” she said. “I cannot believe that I could be facing 30 years in prison for trying to save my life.”

Keith Stroup, founder and legal counsel for NORML, the advocacy group pushing for marijuana legalization, said he gets calls from parents every week who are embroiled in custody battles because of their marijuana use.

“There are far too many people who presume that if you smoke marijuana, you’re not a qualified parent,” Stroup said. “That’s the result of 80 years of prohibition, and the natural tendency to presume there’s something terribly wrong with it. Only 14 percent of the country are regular marijuana smokers. Eight-six percent are not. A lot of people still presume that if you have children, you should not smoke. Even though they’re quite comfortable with you drinking alcohol around children.”