Absolutely.
In our defence force everyone who joins, either as an officer or as an enlistee, is put through psychological testing. We administer intelligence testing and we have an army general classification test. It's a bulk-administered IQ test. They also have a one-on-one interview with a psychologist.
However, the limitation with this method is that the applicant can choose to withhold information from the psychologist, so we can only make an assessment based on what the applicant tells us. If the applicant has made a prior suicide attempt or has had mental health problems in the past and has sought treatment and doesn't disclose that in the psychological assessment, that person can be enlisted, and we don't know anything about it.
Certainly, when we've gone through the psychological files of a number of the people who have suicided, we have seen that they have disclosed some things that at the time they enlisted may not have been considered big issues. With the benefit of hindsight, you can start putting things into place and see what they told to the recruiting psychologist. For example, it didn't seem like a major issue at the time that he'd experimented with cannabis a few years ago--it was just experimentation--or he came from a broken family, and that didn't seem like a major issue at the time as well, but when you start putting these things together with the benefit of hindsight after the person has suicided, you start seeing that maybe this person did have some predisposing factors.