Every inmate, prisoner, patient, or pupil in any of the institutions, who has any dangerous, infectious or contagious disease, including syphilis in the infectious stages and gonococcus infection, shall be forthwith placed under medical treatment, and, if in the opinion of the attending physician it is necessary, shall be isolated until danger of contagion has passed or until the attending physician determines that further isolation is unnecessary; and if danger of contagion shall not have passed or if further isolation is still necessary at the expiration of sentence or at the time for discharge or release from the institution, that inmate, prisoner, patient, or pupil shall be detained in the institution and continued under medical treatment until the attending physician shall determine that his or her discharge or release from the institution will not endanger the public health; and during the period of detention, the person so detained shall be supported in the same manner as before the detention.
R.I. Gen. Laws § 40-2-15