Fixed some bugs with the new patient IDs