A federal jury in New Hampshire has slapped the nation’s largest retailer with more than $31 million in penalties for unlawful retaliation and gender bias against a former pharmacist who blew the whistle on safety concerns involving her co-workers.

The lawsuit, originally filed in 2014, claimed that Walmart “negligently trained and supervised the pharmacy staff” at the plaintiff’s store in the New Hampshire town of Seabrook. The former pharmacist alleged that she was fired in Nov. 2012 — after 18 years on the job — not just for blowing the whistle on potentially unsafe practices and privacy violations, but because of her gender and her “serious medical condition.”

In the two years leading up to her dismissal — which Walmart blamed on the pharmacist losing her key to the pharmacy — the plaintiff said that 13 different pharmacy employees either “quit, transferred, or were fired,” and that Walmart either left these positions vacant or replaced these workers with “new inexperienced employees.”

“This constant turnover, understaffing, and inexperienced staff created a serious threat to the safety of patients and resulted in regulatory violations regarding the safe practice of pharmacy,” reads the complaint.

In 2011, believing that “too many mistakes were occurring” in the pharmacy and that the lack of properly trained staff presented a public health risk, the plaintiff contacted the Chief Compliance Investigator of the New Hampshire Board of Pharmacy.

Then in Aug. 2012, the plaintiff brought her concerns to the Walmart District Manager for her area but “nothing was done to correct the situation.”

That same month, she claims that a “serious dispensing error occurred,” which her boss initially tried to blame on the plaintiff, though she was ultimately found to not be responsible for the mistake.

According to the plaintiff, the stress of the job, and the lack of support from Walmart, got so bad that she had lost 18 pounds, was having headaches, gastrointestinal symptoms, anxiety, and depression. She says she needed prescription medication to sleep at night.

In Sept. 2012, her doctor advised she take a two-week medical leave from the store. When she returned, she learned that a pharmacy technician had not only accessed her private health information, but had then told others at the pharmacy about the plaintiff’s use of prescription sleep meds.

Given that this unauthorized disclosure of private medical data is a violation of the law, the plaintiff took her concerns about the incident to the District Manager.

But rather than fire or transfer the worker who had illegally accessed the plaintiff’s file, the District Manager reassigned that employee to the loss prevention department in the same store.

The plaintiff does acknowledge that she temporarily misplaced her pharmacy key in Nov. 2012 when she was in the process of moving to a new home, but she also maintains that she followed the proper protocol and immediately reported the missing key.

In court, the plaintiff showed that other male pharmacy employees had similarly lost their keys, but they had not been fired for the error. Rather, she claims that company’s “Coaching for Improvement” policy is to give employees who commit a serious violation a warning in the form of a “Decision-Making Day.”

During the course of the nearly two-year lawsuit, the plaintiff has dropped some of the allegations against Walmart. In Nov. 2015, the retailer asked the court to grant summary judgment, hoping it would dismiss additional allegations. But in the end, the court allowed the case to go to trial on multiple counts of discrimination and one count each of retaliation and wrongful termination.

The matter finally went before a jury this month, and yesterday they sided with the plaintiff [PDF].

The jury concluded that Walmart had discriminated against the plaintiff based on her gender — a violation of both the Civil Rights Act and New Hampshire state law. The jury also agreed that Walmart had retaliated against the plaintiff, not for her two-week medical leave but because of her attempts to blow the whistle on unsafe conditions at the pharmacy. So it should be no surprise that the jury believed that Walmart was in the wrong for firing the plaintiff.

In terms of damages, the jury awarded her $164,093 in back pay, another $558,392.87 in front pay, $500,000 in compensatory damages, and $15 million in punitive damages each for the federal and state-level discrimination claims.

In total, Walmart is on the hook for around $31.22 million… which is less than .03% of the $117 billion in revenue brought in in the third quarter of 2015. So of course the company — which spent more than $2 million and five years fighting a $7,000 safety fine for a worker who was trampled to death on Black Friday — has said it is going to appeal the verdict.