Complex Python Codes To Get Patient