A lot of nurses hate the Showtime series "Nurse Jackie," which wrapped up its sixth season Sunday evening. Actually, to be precise, they hate the show's lead character, the emergency department nurse Jackie Peyton. There's much to dislike: She is an adulterer, a liar, an unreliable mother and, most significantly, addicted to prescription painkillers. (That's hardly giving anything away, but be warned: spoilers ahead.)

Many nurses will tell you that Jackie's addiction makes the entire profession look bad. Lives are at stake in hospitals, and health care requires constant multi-tasking and focused attention. A nurse — or doctor — tanked up on OxyContin is likely not only to do a poor job, but also to place patients in jeopardy.

Still, I see the show differently: Despite the fact that Jackie is a seriously flawed human being, the show itself is a standout portrayal of nursing, when TV almost always gets nursing wrong.

Nurse Jackie, played by the gifted Edie Falco, has enviable clinical judgment and an unshakable commitment to patients. But, like many addicts, she lies and sometimes steals to maintain her habit. Married with two daughters at the show's start, she gets clean at the beginning of season four, but not before her marriage has broken up. At the end of season five she relapses after a year of sobriety, and she uses drugs throughout season six. "You're toxic!" Jackie's sponsor tells her.

But I praise the show because its clinical portrayals of nursing are realistic and mostly positive, in contrast to almost every other medical program on television. TV hospitals are almost exclusively staffed by doctors. These physicians diagnose and prescribe, as all medical doctors do, but also hang IVs, take blood samples, keep an eye out for crises by checking on patients at all hours and sit with those patients in need of a little extra TLC. In real hospitals, those jobs are almost always done by nurses, and "Nurse Jackie," true to its name, shows that.

The show also keeps the clinical focus on the nurses, who are all very capable. Zoey Barkow (Merritt Wever) and Thor Lundgren (Stephen Wallem), the registered nurses who work alongside Jackie, are likewise highly skilled, relate well with patients and act as integrated parts of a team, just like the best hospital units do in real life.

But Jackie is the best of them. She is "the vein whisperer," a sobriquet I've actually used for a nurse I know who's great at starting IVs. She's respected enough that the head of the department tells her to keep an eye on a doctor coming off probation. And it's Jackie who, realizing that a suddenly quiet infant is no longer breathing, hurries a physician to the bedside to rapidly insert a breathing tube. This is all real nursing, and we rarely see it on television.

Past seasons suggested that Jackie's at-work drug abuse didn't affect her job. That might push the limits of plausibility, but then I've worked with a nurse who was addicted to narcotics — and stealing them from the hospital — and none of us had any idea. Nevertheless, I was concerned at times that the show's writers were too committed to the idea that Jackie was just barely keeping her balance to deal with the obvious ethical issues raised by her addiction.

The season that is just finishing was different, though. In an early episode, Jackie, high on OxyContin, doesn't hear the call of "clear" before a defibrillator goes off, and the electric shock knocks her out. The penultimate episode shows Jackie snorting crushed Oxy in the hospital bathroom, then giving a patient 100 times the ordered dose of intravenous insulin — a potentially deadly mistake that Zoey, Jackie's protégé, catches and corrects.

Still, Zoey worries whether Jackie is dangerously impaired at work. Alerted by Zoey, Gloria Akalitus (Anna Deavere Smith), the nurse-administrator of the department, tells Jackie that she risks losing her nursing license if she doesn't attend rehab. Jackie tries to make a desperate getaway but crashes her car on the way to the airport, forcing open her suitcase filled with drugs. The episode ends with her mug shot being taken.

It's a sad finale, what I hope is the low point for a nurse I like and even admire. But the nurse in me also felt gratified. The show might be fiction, but I still don't want to see Jackie taking care of patients if she is high. A nurse hooked on opioids feels like the ultimate on-the-job betrayal; as Zoey tells Gloria, "I'm worried about her, and I'm worried about us."

Showtime has renewed "Nurse Jackie" for a seventh season, and many nurses will be watching closely. The show has done a great job of keeping Jackie's personal flaws and professional skills more or less separate, and fans love it; now it needs to take a risk by throwing the two together. Jackie's commitment to patients has to include being clearheaded and safe on the job — or else not do the job, even though she's so great at it.

That's what we nurses ask of ourselves. And even though some of us fail, surely it's fair to ask the same from the one TV show that really "gets" nursing, when so few others even try.

Theresa Brown is an oncology nurse and the author of "Critical Care: A New Nurse Faces Death, Life, and Everything in Between." She wrote this article for the New York Times.