If a defendant is sentenced to prison, the department shall develop a file which shall contain a complete history of that person. Except for the information authorized for release pursuant to § 24-2-20, the record shall be a permanent record of the department, solely for the proper supervision of the inmate by the department and as a guide to the inmate's needs. No person other than members of the board, its executive director, the secretary, and any person specifically delegated for such access by the secretary, may inspect the file unless otherwise ordered by a circuit court or subpoena after notice to the secretary and an opportunity for a hearing on any objections to inspection. The secretary shall have ten days after receipt of the notice to inform the court if the secretary requests a hearing.
SDCL 24-15A-14