If it is shown to the satisfaction of the court that a committed person may not at once be admitted to the designated facility, and may not with safety, be allowed to go at liberty, the court shall require that the patient be provided for until admission can be accomplished, or until the occasion no longer exists. In any event, the patient may not be detained more than thirty days. Payment for such service is subject to § 34-20A-89.
SDCL 34-20A-77.1