Write 'rankhospital' Function

Write 'rankhospital' function to return the hospital with a specific rank for a given outcome.