Added error handling to check if patient exists (in prescription
application)