§1. Apart from a case of necessity, baptism is not to be conferred in private houses, unless the local ordinary has permitted it for a grave cause.
§2. Except in a case of necessity or for some other compelling pastoral reason, baptism is not to be celebrated in hospitals unless the diocesan bishop has established otherwise.
Source: Code of Canon Law (Vatican.va)