While Thomas was flying at 30,000ft, his body was already bereft of medicines for 5-hours, a dangerous situation for a diabetic.
When first insulin shot didn't work, air-hostess announced emergency landing
The attending doctor, himself a diabetic, had short-term fast working insulin with him, different from what Thomas needed.
But given the emergency, he took the risk and shot the dose using the insulin-pen.
It didn't work.
After an hour, an air-hostess announced that they would make an emergency landing in the war-torn Afghanistan-Kazakhstan region.
Thomas was foaming at the mouth, she said.
Using flight's Wi-Fi, Mangalam read up pen's mechanism online
The doctor explained that Thomas' blood sugar had touched an alarming level and that his medicine might not work due to a resistance Thomas had developed gradually.
Still, he attempted to push, but this time, the insulin-pen didn't work, though it did the first time.
It then struck a suspicious Mangalam to use the flight's Wi-Fi and read the insulin-pen's mechanism online.
Using a simple ball-pen's spring, Mangalam repaired the insulin-pen
"I found a large engineering drawing style diagram in the manual showing how every part works," said Mangalam.
He disbanded the pen and realized it was the absence of a spring that caused the malfunction.
He asked for ball pens and found a perfect-fit spring from one pen.
He reassembled the insulin-pen, returned it to the doctor, who injected the readjusted dosage to Thomas.
Mangalam assisted Thomas to a check-up, arranged for insulin-pump
In 15-minutes, Thomas' blood-sugar levels started normalizing and emergency landing was called off.
He was shifted to business class, along with Mangalam.
Upon landing at Delhi Airport, Mangalam assisted Thomas to a check-up at Medanta hospital and also arranged for an insulin pump.
As a return gesture, Thomas invited Mangalam to his Amsterdam restaurant and gorge his way to glory without paying a penny!
'I am grateful to IIT-K for making me this capable'
"This incident has made me realize the importance of the basic engineering skills we are taught in our freshman year. I am grateful to IIT-K for making me this capable to actually matter in such a critical situation," wrote Mangalam in his memoir.