Hi Jeremie,
If this is persistent data, you could retrieve and sort the data directly by using a retrieve from database. If not (or the data has not been committed yet), you could first sort the list of doctors by name, then iterate over this sorted list, retrieve all the certificates per doctor, and add this to the result list.
Hope this helps!