def getDoctorURL(instance): item = get_obj_from_field(instance, 'Doctor', None) return item and item.absolute_url_path() or ''
def getPatientURL(instance): item = get_obj_from_field(instance, 'Patient', None) return item and item.absolute_url_path() or ''