Shiri Appleby is set to appear in “Code Black,” Variety has learned exclusively. Though she is expected to have an arc in the CBS medical drama this season, she is currently signed on to guest star in one episode.

Appleby, who also stars in Lifetime’s “UnReal,” will play Dr. Carla Niven, the ex-girlfriend of first-year resident Dr. Malaya Pineda (Melanie Chandra), who comes back into her life unexpectedly when she shows up to the hospital, this time, as a patient.

Dr. Niven is described as a hard charging, type-A ER doctor from another area hospital who trained at Code Black’s Angels Memorial, which is where her romance began with Dr. Pineda who was then a medical student. Now an ER resident at Angels, Dr. Pineda treats Dr. Niven, who is pregnant and shows up to the hospital for treatment for muscle pain that turns out to be a form of cancer. (In real life, Appleby is expecting her second child.)

“She has this ex who shows up and it seems simple, but it turns into something serious, “Code Black” creator Michael Seitzman tells Variety. “Over the course of Malaya treating her and supporting her, this love story develops, but ultimately, it’s a bit of a tragic love story.”

Seitzman adds, “She’s a terrific actress. It’s a wonderful story.”

“Code Black” won’t be Appleby’s first medical drama — she appeared in 10 episodes of “ER” over the course of the long-running show. Aside from “UnReal,” in which she will remain a series regular for Season 2, Appleby starred in “Roswell,” and her other TV credits “Life Unexpected” and recently, HBO’s “Girls.”

Appleby’s guest gig marks a reunion for her and exec producer Marti Noxon, who is the creator and showrunner of “UnReal.”

Other guest players in the Marcia Gay Harden-led ensembler are Gail O’Grady and Cress Williams, who were recently announced.

“Code Black” premieres Sept. 30 on CBS.