By Ben Brumfield, Catherine E. Shoichet and Josh Rubin
KILLEEN, Texas (CNN) -- As the community reels from a shooting rampage at Fort Hood, investigators are grappling for answers on why Spc. Ivan Lopez opened fire against fellow soldiers.
Investigators are looking at a possible altercation with a soldier "that immediately preceded the shooting," said Lt. Gen. Mark Milley, the post's commanding general.
They are still piecing together the answer but seem to be homing in on at least one thing that they say might have made the 34-year-old pull the trigger.
"We have very strong evidence that he had a medical history that indicates an unstable psychiatric or psychological condition. (We're) going through all records to ensure that is, in fact, correct. But we believe that to be the fundamental underlying causal factor," Milley said Thursday.
Investigators say they haven't found any links to terrorism.
"At this point, we have not yet ruled out anything whatsoever," Milley said. "We are committed to letting the investigation run its course."
The shooting blindsided victims, said Dr. Matthew Davis, medical director of trauma services at Scott and White Memorial Hospital.
"It was a shocking episode. It felt very surreal," he said after speaking to victims. "It was a very unexpected thing in the middle of a working day."
Some patients may see Texas Gov. Rick Perry reaching out to shake their hands when he visits them Friday afternoon.
Military officials will brief Perry, who will speak to journalists afterward.
The conditions of three victims, who were previously listed as critical, have been upgraded to fair, Scott and White Memorial Hospital posted on Twitter on Friday morning.
Five have been discharged from the hospital. Of the four remaining Friday morning, one was expected to go home later in the day, the hospital said.
The shooting started about 4 p.m. Wednesday when Lopez walked into an administration building at the base and opened fire with his .45-caliber semiautomatic pistol.
He then got into a car, fired from the vehicle, got out of the car, walked into another nearby administration building and fired again.
One of the locations was the medical brigade, the other the transportation battalion. Lopez was assigned to the 13th Sustainment Command, which deals with logistics. In his work, he had regular dealings with the transportation battalion.
But authorities have "no indication at this time" that Lopez was targeting specific soldiers when he opened fire on the Army post, Milley said.
The base, which has more than 45,000 soldiers and nearly 9,000 civilian employees, went on lockdown after the shooting began.
A short time later, a military police officer came face to face with Lopez. Both he and she drew their weapons, Milley said.
Lopez put the gun to his head and pulled the trigger, ending his life.
At Lopez's apartment, his wife was watching news reports about the spree, worrying about her husband, from whom she had not heard all afternoon, said neighbor Xanderia Morris, who tried to console her.
But Lopez's wife had no idea that he was the shooter until a local TV station identified the dead gunman. His widow became "hysterical" when she heard the news, Morris said.
Officers picked up Lopez's widow at their apartment near the base in Killeen, and she was cooperating with law enforcement, an FBI official told CNN.
Lopez hailed from Puerto Rico, where he served in the National Guard from 1999 until 2010 before moving to the U.S. Army.
He had two deployments as an infantryman, including a four-month stint in Iraq in 2011 as a truck driver, Milley said.
Before coming to Fort Hood in February, Lopez served at Fort Bliss in Texas.
He, his wife and their daughter moved into an apartment a little more than a week before the shooting.
They appeared to be a normal couple, smiling "whenever they'd see someone," Morris said.
But behind Lopez's smile lay a history of depression, anxiety and other psychiatric disorders, Milley told reporters. The soldier was receiving treatment and taking antidepressants, he said.
Army records don't show him as having been wounded in Iraq, but Lopez himself reported that he had suffered a traumatic brain injury, Milley said.
The shooter "had a clean record" behaviorally, Army Secretary John McHugh said. And he gave no sign during a psychiatric exam last month that he was likely to become violent.
Lopez had also been prescribed the sedative Ambien, McHugh said.
All those killed in the shooting were military personnel, Milley said.
Sgt. Timothy Owens was one them, his family said in a prepared statement.
"He was a very outgoing person and enjoyed Taekwondo," the statement said. "He loved his job in the Army and was going to make it a career."
One or two wounded victims may face long-term disabilities, but doctors are working to prevent this, said Davis, the Scott and White Memorial Hospital medical director of trauma services.
When he first heard about the shooting, Davis says one thought ran through his mind: "How can this possibly happen again?"
Less than five years ago, the hospital where Davis works treated casualties after Army Maj. Nidal Malik Hasan killed 13 people and wounded 32 more in a November 2009 shooting at Fort Hood.
Hasan was convicted of 13 counts of murder and 32 counts of attempted murder, and a military jury recommended last August that he be put to death.
The former military psychiatrist told a court that he was on a terrorist mission to protect leading members of the Taliban.
CNN's Joshua Rubin reported from Killeen, Texas; Ben Brumfield and Catherine E. Shoichet reported and wrote from Atlanta. CNN's Tom Watkins contributed to this report.
™ & © 2014 Cable News Network, Inc., a Time Warner Company. All rights reserved.