Jennifer Esposito, a lead in the CBS drama “Blue Bloods,” took to Twitter to tell her fans she was written out of the show because of her medical condition, celiac disease. The actress, who played  Detective Jackie Curatola, has been feuding with CBS.

The drama finally came to a head when Esposito took the network to court Saturday and openly accused CBS of getting rid of her character because she has celiac disease.

The New York Post reported that Esposito collapsed in the middle of filming a scene for “Blue Bloods." As a result, the scene had to be reshot and some of the actors were forced to come back to the set on a Saturday. The Post cited a source saying she collapsed because of working long hours, but the actress denies that.

Esposito, however, later admitted that her schedule had to be changed to work fewer hours by doctor’s orders because of her celiac disease.

The National Center for Biotechnology Information describes celiac disease as "a condition that damages the lining of the small intestine and prevents it from absorbing parts of food that are important for staying healthy. The damage is due to a reaction to eating gluten, which is found in wheat, barley, rye, and possibly oats."

Esposito believes she was discriminated against and written off the show unfairly because of her disease.

She tweeted on Saturday: "CBS put me on unpaid leave and has blocked me from working anywhere else after my doc said I needed a reduced schedule due to celiac."

The actress continued to tweet:

"CBS didn't listen to my doc and I collapsed on set. Which everyone saw! After a week off my doc said I could return to work but CBS implied that I was NOT truly ill and this was a scheme to get a raise! It's been almost two months without bringing me back to work and keeping me from working anywhere else! So no, that article is not telling you the truth. Absolutely shameful behavior."

CBS responded in a statement, saying, "Jennifer has informed us that she is only available to work on a very limited part-time schedule. As a result, she’s unable to perform the demands of her role and we regretfully had to put her character on a leave of absence. We hope that she will be able to return at some point in the future."

Esposito’s last appearance on “Blue Bloods” will air Nov. 2.