An NBA doctor has ruled in the Heat’s favor and agrees with the organization’s belief that Bosh is dealing with a career-ending illness, according to a league source. Bosh, 33, missed this entire season after failing a preseason physical due to ongoing issues with blood clots, and also sat out the second half of the previous two seasons due to blood clots.

With this medical ruling, all that’s left for the Heat to remove Bosh from their salary cap is to officially release him. The Heat will not make that move until they feel they need that cap space, but they will make it official soon with the June 22 NBA draft approaching and free agency beginning on July 1.

After the Heat officially erase Bosh’s contract from their salary cap, they will have about $38 million in cap space this offseason. The agreement struck by Bosh, the Heat, the NBA and the players’ union will allow the Heat and Bosh to part ways without his salary ever returning to Miami’s cap even if he plays again.

Under the current NBA collective-bargaining agreement that expires on June 30, Bosh’s cap hit would go back on the Heat’s books if he were to return and play 25 total games in a single season for another team. But with the new CBA set to take effect on July 1, the timing of the Heat-Bosh situation allowed for a unique agreement that allows Miami to operate without having to worry about Bosh’s cap space ever returning to its cap.

Despite the latest ruling of a career-ending illness, Bosh could still return to the NBA if he provides medical evidence that meets league approval.

Bosh has not played in an NBA game since Feb. 9, 2016 because of recurring blood clotting issues. Although it won’t count toward the Heat’s cap, Bosh is guaranteed the remainder of his current contract with Miami — $25.3 million for 2017-18 and $26.8 million for 2018-19 — but a lot of it will be covered by insurance.

The Heat have been eligible to apply for salary-cap relief from Bosh’s contract since Feb. 9 — the one-year anniversary from his last game.