CBS has ordered a pilot for the medical drama “Code Black,” which is set in the busiest emergency room in the country, Los Angeles County/USC Medical Center.

The Eye also greenlit a multicamera comedy pilot “The Half of It,” from scribe Mike Gibbons and CBS Television Studios. Gibbons is also head writer and a co-exec producer of CBS’ “The Late Late Show with James Corden.”

If ordered to series, “Code Black” would mark the sole medical drama on CBS’ slate — a genre in which chairman Nina Tassler has expressed interest.

The pilot follows the ER staff as they confront a broken system to protect their ideals and most importantly, their patients.

Based on Ryan McGarry’s 2014 feature documentary of the same name, “Code Black” comes from ABC Studios and CBS Television Studios.

Drama vets Michael Seitzman and David Semel will exec produce with McGarry, Marti Noxon (“Girlfriends Guide To Divorce”) and Linda Goldstein-Knowlton, who also worked on the original doc with McGarry. Semel, whose credits also include “House,” will direct. Seitzman penned the pilot.

“Half of It” revolves around a newly divorced father who revels in the fact that he gets to keep half of his stuff — more than he ever had when he was married.