When the medical officer of a prison or a mental hospital certifies that a prisoner or patient is a leper the Governor General may order the leper to be removed to and detained in a leper asylum, and after the expiration of the leper's term of imprisonment or after he or she has recovered his or her sanity he or she shall be detained in the asylum until he or she is discharged by order of the Governor General.