It's not neccessarily because your array is sorted, but because the array you are populating your table from is not the same as the array that you are removing the object from.
Where are you sorting the patients
array? Is the actual patients
array being sorted or are you sorting it in your tableView delegates method and not actually sorting patients
?
The reason for this is that the index of the object you deleted is not the same as the index that it has in the actual patients
array (because one is sorted and one is not). Because of this, it is first deleting the wrong object, then it crashes because the tableView expects one to be deleted (so that it can animate that cell being removed) but the wrong one was deleted.