A person's medical information, their medical file, is confidential.
There are two pieces of information that go to commanders so they can command effectively. One is whether the person's employment should be limited. Two is the prognosis, or roughly how long their employment should be limited.
As for diagnosis or personal medical information, that does not get released. The information on a person's medical chart, the paper it is on, belongs to the CF, but the information contained on that chart actually belongs to the patient. If the person wants a copy of it and wants to give it to the commanding officer or wants to discuss it with the supervisor, that is up to him or her. That's not inhibited in any way. But as for whether anybody in the health profession hands information on a medical diagnosis or personal medical information to commanders, no.