If, prior to the hearing required in § 27A-10-8, the director of the facility where the person is detained determines that the person no longer meets the commitment criteria, the director shall so notify the county board chairman. If the chairman agrees, the person shall be released and his record sealed in accordance with the provisions of state law. Following such release, the referring county shall provide the person with transportation to the county where he was taken into custody if the person so chooses.
SDCL 27A-14-1.3