Whenever, in the judgment of the physician or physicians in charge of any of the charitable or penal institutions of the state, it becomes necessary to perform an operation or give special treatment or care to any inmate of any such institution, if the institution is not equipped for the performance of the operation or to give special treatment, the physician in charge of such institution may, with the approval of the commissioner vested with the administration of such institution, have such inmate placed in a first-class hospital of the state where the inmate may have the necessary operation, hospitalization, care and treatment.