During the attack, which targeted a nearby office of the intelligence services, a series of explosions broke nearly every window in the hospital, smashed down doors and destroyed medical equipment.
"There were three of us here in my office having lunch," said doctor Abdul Samad Hakimi, the hospital director, remembering the horrors of the attack last month.
"We heard a loud noise, then another, and the windows exploding. We went out into the hallway. There were shards of glass everywhere and gunshots outside."
Miraculously the flying glass did not kill anyone, but 80 hospital staff and 80 patients sustained minor injuries in 45 minutes of mayhem.
"The hospital was full of pieces of broken glasses and smoke, and all the patients came to hide in the corridor," said Hakimi. "Wounded people were treating other wounded people."
The attack demonstrated the resilience of many Afghan medical staff, but it also underlined the threat from Taliban militants who have fought a guerrilla war against the government since being ousted from power in 2001.
Madain Shar, in Wardak province, is just a 40 minutes drive from the capital Kabul, and is situated on the national ring road that links the city to Kandahar, Herat and Mazar-i-Sharif.
It is a hotbed of insurgent activity and proof that the rebels pose a real danger as US-led Nato forces withdraw from the country, leaving Afghan soldiers and police to impose peace.
"We are facing more and more security problems. We have a feeling that it is increasing," said Anders Rosen, spokesman for the Swedish Committee for Afghanistan (SCA), which manages the public hospital.
"This summer we had an ambulance attacked in Laghman (also near Kabul). When the ambulance was on its way to hospital, it was hit by insurgents and one person was killed."
Rosen said that, despite the threats, the SCA was determined to stay even if Afghanistan spirals into turmoil after elections next year and the Nato withdrawal.
"We've been working here during the Soviet occupation (in the 1980s), during the civil war, and the Taliban... we will stay. We actually want to develop our efforts."
At the hospital, amid the chaos of repair work, patients are still being treated by nurses such as Attiqullah Amarkhil, who was on duty when the Taliban attack started with two huge car bombs.
"When the sound of gunfire was gone, ambulances brought in wounded security forces, intelligence forces, police and local residents who had been hurt," he said.
Amarkhil, 50, was himself cut on the wrist by falling glass, but like all the staff refused to leave work.
"Even on the day of the attack, they did not stop providing services," doctor Yousuf Fayez said. "They worked all night cleaning up the glass. We are prepared, we know what can happen."
Abdul Wahid Taqat, a political analyst and retired army general, said that Wardak province provided a sobering symbol of the challenges ahead.
"Insecurity or fighting in any part of the country has a direct effect on the security of Kabul," he said. "This violence is not organised war but a guerrilla war, and it can spread."
Government spokesmen in Kabul stress that the Afghan army and police are increasingly successful in beating down the Taliban, and that the rebels hold very little territory across the country.
But in Wardak, officials admit that the attack that wrecked the Maidan Shar hospital reflects the violent reality of life in the region.
"The security situation is really bad," Mohammad Hazrat Janan, deputy director of Wardak provincial council, told AFP.
"If the situation remains the same as it is now, and the security forces are not trained and well-equipped, the Taliban could make a comeback."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ