All pleadings, evidence admitted, orders, judgments, and memoranda of findings and conclusions made in the proceedings held pursuant to sections to shall be made a part of the official record of the underlying criminal case. The court may direct that the medical and psychiatric records not received into evidence at such proceedings be kept confidential and not be available for public inspection.