The rules of the Hospital were granted by King Manuel I in 1504, and were based on the rules of contemporary hospitals in Florence and Siena. Initially the Hospital had three infirmaries ("enfermarias") located in the upper storey, where the ill were treated. The groundfloor was occupied by the Hospital personnel (around 50 people, many of whom lived in the building). The first floor housed dependencies like the kitchen, refectory and pharmacy, as well as rooms for abandoned children (called "expostos"), beggars and the mentally ill.