The problem of matching medical students to hospitals is a bit different from what we've discussed.
A single hospital usually takes on more than one student.
This can be handled by actually treating a hospital as a group of people (one per fillable slot).
The same basic mathematical results hold in this variation (the MATCH algorithm always gives a unique, stable, boy-optimal marriage).