Hello. It's best if you talk to the physician who treated pneumonia 'cos he must be aware of the patient's history or consult a new doctor (Orthopedist). Now you've mentioned that there is pain and swelling which could be because of an underlying problem.
Next Steps
Consult the doctor in person and present him with all the reports.
Health Tips
In the meantime, Keep the leg elevated when lying on bed with the help of pillows, 6-8 inches. Do lightweight exercises like ankle-toe movements.