The post that was quoted here has been removedThat's the dilemma. Had Lubitz known that his doctor was required to report mental health problems to the airline he wouldn't have sought medical treatment and would possibly have crashed the plane anyway.
Having said that, that it was that plane on that day may have been a response to the letter. I think there's a possible systems failure at the medical end. It's surprising to me that he was told not to fly by letter, this is the kind of thing that requires the presence of a councillor. Had he been told in person, with a councillor ready to talk to him and persuade him to tell his employers then this would, in all likelihood, not have happened.
Edit: According to the bbc news website he was not being treated for a mental health condition and the "letter" was in fact a sick note. So my assessment about medical procedures is not correct. Nevertheless I feel that this situation could have been contained. The "rule of two" is being adopted by Lufthansa and probably all European carriers will adopt it. If the nature of his medical problem is relevant then systems concerning that need to be looked at.