Yes, it definitely is a flag. If the army doesn't want you around its weapons, you probably shouldn't be around any weapons at all.
I am not entirely familiar with the reasons he had been kicked out of basic training, but I know that it takes some pretty serious stuff for them to kick you out before you even get halfway through. There were a lot of mental health concerns in the past that were brought up. Yes, if the army says it doesn't think you're fit for duty after having accepted you, that definitely needs to be looked into when you're looking to own a firearm, because there is a reason they didn't want you around firearms in the army.
It's really important that all these different systems be able to communicate with each other, because right now they're not, so you can pretty much go through life just.... If you're in this one spot and that happened and you move to another spot and try again, you may have very different results, right? If you're somewhere where the doctor needs to be able to report, or there needs to be a database of reasons that someone was kicked out of basic training, or maybe if someone was asked to leave a gun club.... These are important measures that need to be addressed when someone is looking to buy something as dangerous as these guns are.