WASHINGTON -- New mental health screening that supporters say could help stem the high rate of military suicides or even stop shooting rampages passed the House on Thursday as part of the massive 2015 defense budget.

The House bill, sponsored by Rep. Glenn Thompson, R-Pa., orders the National Institutes of Health to create a universal mental health evaluation for potential recruits that would catch past suicide attempts and psychiatric disorders. The data could be used by the services to weed out candidates with potentially dangerous mental health issues.

Already, potential recruits are asked about past suicide attempts or mental disorders, and the military conducts security background checks. But recent studies have indicated such informal screening has not been entirely effective, and problems manifest or are detected after the recruit has entered service.

"Let's take it right back to the point of induction," Thompson said. "There is no mental health exam and that was startling."

Thompson said his bill would create a comprehensive mental exam to match the existing physical exams required for induction and could bar those prone to suicide or acts of violence from joining in the first place.

The military is struggling with an epidemic of suicides and a surge in mental health disability claims following the wars in Iraq and Afghanistan. A tragic new trend is also developing: mass shootings by service members on military facilities, including two separate incidents at Fort Hood that left 16 people dead and an incident at the Washington Navy Yard that killed 12 people.

Many troops and veterans who commit suicide made attempts before enlisting, he said. The connection between mental disorders and military base shootings is more unclear but experts said Spc. Ivan Lopez, who killed three and wounded 16 at Fort Hood in April before turning the weapon on himself, fit the psychological profile of a rampage shooter. Aaron Alexis, the former sailor and defense contractor who shot and killed 12 people at the Washington Navy Yard in D.C. last year, was thought to have mental health problems not caught by the military.

A series of Army studies published in March by the Journal of the American Medical Association found one in five soldiers has a common mental disorder and more than one in 100 had a past suicide attempt. Those same studies also found suicides among service members who have never deployed to war zones have risen, despite perceptions that combat trauma drives suicide rates.

The bill, which was approved as an amendment to the National Defense Authorization Act, directs the mental health arm of the National Institutes of Health to develop a screening procedure for those who want to join the military and report back to the Department of Defense and Congress. The recommendation would also focus on creating a mental health baseline for new troops that would help track traumatic brain injuries and post-traumatic stress disorder.

The Department of Defense and military services would still be responsible for deciding exactly how to use the screening data and for developing a criteria for allowing recruits to join, Thompson said.

"There may be some people who cannot serve their country due to this screening," he said. But the goal of the legislation is to keep service members "healthy and well."

The proposal has also been introduced in the Senate by Senators Rob Portman, R-Ohio, and Jay Rockefeller, D-W.Va., and to become law must be part of a final defense budget that is supposed to be passed by the Congress and the White House later this year.

Meanwhile, it has gained the support of service member and veteran groups including Iraq and Afghanistan Veterans of America, the National Guard Association, and the Military Officers Association of America.

Nick McCormick, a legislative associate with IAVA, said the bill would give the military a new tool to examine potential recruits and ensure the health of the ranks.

"It allows the military to establish a baseline so upfront you know who you are dealing with," McCormick said. "If you're a believer that more numbers are better, then this is something that you could definitely get behind."