Adding debug to getPatientData