If any person ordered to be admitted to an institution pursuant to this chapter, Chapter 9, Chapter 11, Chapter 13, Article 1 of Chapter 15, Chapter 17, and Chapter 27, is eligible for institutional care or treatment by any agency of the United States, the court, upon receipt of a certificate from the agency showing the facilities are available and that the person is eligible for care or treatment there, may order him to be placed in the custody of the agency for admittance. Jurisdiction shall be retained in the appropriate courts to inquire into the mental condition of the person admitted and to determine the necessity for continuance of his confinement. Every order of admittance issued pursuant to this section is so conditioned.
S.C. Code § 44-17-640