The hospital might have prescribed it, but if they didn't there is a lung exercising product out there that people use to improve their lung capacity and strength. I forgot what it's called, and I don't want to post some google shit that might be wrong, but I know of someone who used it after having pneumonia.
__________________
VATO LOCO FOR LIFE