
668 P.2d 656 (1983)
Mark Wayne SCHMIDT, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 5828.
Supreme Court of Wyoming.
September 2, 1983.
Sylvia Lee Hackl, Appellate Counsel, Wyoming Public Defender Program, Cheyenne, for appellant.
A.G. McClintock, Atty. Gen., Gerald A. Stack, Deputy Atty. Gen., John W. Renneisen, Sr. Asst. Atty. Gen., and Michael L. Hubbard, Asst. Atty. Gen., for appellee.
Before ROONEY, C.J., and RAPER,[*] THOMAS, ROSE, and BROWN, JJ.
THOMAS, Justice.
This case presents the question of an abuse of discretion on the part of the district court in denying a motion which was made prior to the imposition of sentence by the appellant, Mark Wayne Schmidt, to withdraw his plea of guilty. We conclude that under Rule 33(d), W.R.Cr.P., the test to be applied in reviewing the ruling of the district court when a criminal defendant moves to withdraw his plea of guilty before sentence is imposed is whether there was an abuse of discretion on the part of the sentencing judge. In this instance there was no abuse of discretion, and the judgment and sentence imposed by the district court will be affirmed.
In his brief Mark Wayne Schmidt states the issue as follows:

*657 "Whether trial court erred in denying Appellant's pre-sentence motion to withdraw his guilty plea and re-enter pleas of not guilty and not guilty by reason of mental illness or deficiency."
In its statement of the issue appellee, the State of Wyoming, invokes the applicable test, and states the issue as follows:
"DID THE TRIAL COURT ABUSE ITS DISCRETION IN DENYING APPELLANT'S MOTION TO WITHDRAW HIS GUILTY PLEA PRIOR TO SENTENCING?"
The record in this case discloses the following events in connection with the prosecution of Schmidt. The criminal complaint which was filed on July 16, 1981, charged that on July 14, 1981, Schmidt committed the crimes of sexual assault in the first degree in violation of § 6-4-302(a), W.S. 1977, and assault while armed with a deadly or dangerous weapon in violation of § 6-4-506(b), W.S. 1977. Schmidt was arrested on August 2, 1981, and on August 4, 1981 he was brought before the commissioner for proceedings in accordance with Rule 5, W.R. Cr.P. On August 14, 1981, a written waiver of Schmidt's right to a speedy preliminary hearing was filed, and on August 25, 1981, he filed a motion pursuant to § 7-11-303, W.S. 1977, seeking an examination on the question of whether he suffered from a mental illness or deficiency.[1]
On August 26, 1981, the State and Schmidt stipulated a reasonable belief that grounds existed which would necessitate the examination under the statute, and on August 27, 1981, the justice of the peace transferred the case to the district court so that it might proceed to order an examination pursuant to the statute. On August 31, 1981, the district court ordered the examination, and Dr. Brian Miracle was appointed to make it.
*658 Dr. Miracle submitted his report on October 1, 1981, and on October 30, 1981, the district court remanded the case to the justice of the peace court for a preliminary hearing. Thereafter, on November 6, 1981, Mark Schmidt filed a written waiver of his right to a preliminary hearing, and on November 9, 1981, an information was filed in the district court. The charges alleged in the information were identical to those which had been asserted in the criminal complaint, except that reference was made to a prior conviction of rape in the State of Iowa which the State suggested resulted in the maximum penalty for the charge of sexual assault being five years to life in accordance with § 6-4-306(c)(i), W.S. 1977. On November 12, 1981, an order was entered setting the case for arraignment on November 20, 1981.
On November 20, 1981, Schmidt filed a Motion to Require Plaintiff to Amend Information to Conform to Charge on Original Complaint in which he contended that he had waived preliminary hearing on only a charge of sexual assault in the first degree and had not waived preliminary hearing on a charge of sexual assault in the first degree aggravated by a prior conviction. On November 20, 1981, Schmidt's arraignment was commenced together with the arraignment of other persons charged with criminal violations, but when he pressed his motion no plea was entered. On December 11, 1981, a written waiver of his right to a speedy trial was filed by Schmidt, and on the same date he entered pleas of not guilty to both Count 1 and Count 2 of the Information which had been amended to delete from Count 1 the aggravating circumstances with respect to the charge of sexual assault in the first degree.
On December 12, 1981, Schmidt was released from custody after the appearance bond required by the court had been filed. On February 12, 1982, that bond was revoked. Other information in the record discloses that the bond was revoked after Schmidt was charged with another sexual assault in Washakie County, Wyoming, which occurred after his release from custody. Schmidt's trial was set for April 12, 1981, and the State subpoenaed witnesses for that trial.
On April 9, 1982, Schmidt again was before the district court at which time he continued his plea of not guilty but added a plea of not guilty by reason of mental illness or deficiency. In an order which was dated April 13, 1982, and filed on April 16, 1982, the district court reflected those proceedings and ordered an examination in accordance with § 7-11-304, W.S. 1977[2], noting *659 in its order that an earlier examination had been made in accordance with § 7-11-303(b), W.S. 1977. On May 24, 1982, Dr. Miracle, who again had been designated as the examiner, but this time of the defendant's choice, filed his second report. In the meantime an examination also had been conducted at the Wyoming State Hospital, apparently in connection with the criminal proceedings which had been filed in Washakie County, Wyoming, and a report dated February 25, 1982, from the Wyoming State Hospital is included among the papers in the record in this case.
Thereafter the trial date again was set for August 5, 1982. The State of Wyoming subpoenaed six witnesses to proceed with this trial. In the meantime the State of Wyoming had filed another Amended Information which alleged the aggravation of the first count relating to sexual assault in the first degree and which relied upon a conviction of sexual assault in Washakie County as an aggravating circumstance enhancing the available sentence. On August 5, 1982, Mark Wayne Schmidt then changed his plea from not guilty and not guilty by reason of mental illness or deficiency to guilty to Count 1. The record reflects that this occurred while the jury panel was waiting in the court room. The record also reflects a written agreement between Mark Wayne Schmidt and the Big Horn County and Prosecuting Attorney by which the defendant agreed to plead guilty to one count of sexual assault after the Amended Information had again been amended to delete the aggravating circumstance for the enhancement of punishment as to that count. The State of Wyoming agreed to this amendment; agreed to dismiss Count 2 of the Amended Information; agreed not to object to any recommendation by defense counsel that the sentence imposed be the same as that imposed in Washakie County; and both parties agreed that the agreement which they had made was subject to approval by the court. On the same day the district court ordered a presentence investigation to be accomplished and the sentencing then was set for October 22, 1982.
On October 15, 1982, a Motion to Withdraw Guilty Plea was filed by the defendant, Mark Wayne Schmidt. This motion reflects that Schmidt had been evaluated on October 1, 1981, and May 24, 1982, by Dr. Brian Miracle, a clinical psychologist. It also notes that he had been evaluated by the Wyoming State Hospital at Evanston, Wyoming. The essence of the motion, then, is that in an examination performed on September 29, 1982, Dr. John F. Yost, a psychiatrist practicing in Denver, Colorado, concluded that Mark Schmidt "lacks substantial capacity to appreciate the wrongfullness [sic] of his conduct or to conform his conduct to the requirements of law in regards [sic] to the two sexual assaults mentioned in the preceding evaluation." In an accompanying affidavit Dr. Yost stated his conclusion:
"5. That on September 29, 1982, I conducted an examination of Mark Wayne Schmidt, defendant in the above-entitled matter, and based upon the examination upon my professional knowledge as a psychiatrist, it is my opinion that at the time of the alleged criminal conduct in this case, the accused, Mark Schmidt, as a result of mental illness or deficiency, lacked substantial capacity to appreciate the wrongfulness of his conduct or to conform his conduct to the requirements of law."
Dr. Yost's conclusion was premised upon his diagnosis that Schmidt suffered from:
"1) Post traumatic stress disorder delayed type (DSM III # 309.81); 2) Obsessive Compulsive Disorder (DSM III *660 # 300.30) manifested by repeated sexual acting out."
The justification in Schmidt's motion for relying upon Dr. Yost was that the previous evaluators did not have the specialized experience and training in dealing with post-Vietnam stress syndrome. The evaluations by Dr. Miracle and the Wyoming State Hospital were contrary in their ultimate conclusion to that of Dr. Yost. The reports indicate that the evaluators were aware of his service in Vietnam. Dr. Miracle's diagnoses do reflect "AXIS I 309.81 Post Traumatic Stress Syndrome." The report from the Wyoming State Hospital does not include that diagnosis. There also is present in the file a copy of a report submitted by the Iowa Security Medical Facility, Oakdale, Iowa, on August 24, 1973, a date which preceded Mark Wayne Schmidt's service in Vietnam, which relates to a similar event to that involved in this criminal case, and contains conclusions similar to those reached by the Wyoming State Hospital and Dr. Miracle.
The perimeter of our law with respect to the contentions of Mark Wayne Schmidt is set forth in Ecker v. State, Wyo., 545 P.2d 641, 642 (1976):
"Withdrawal of a plea of guilty before sentencing is not an absolute right. Denial by the district court is within its sound discretion and there must be a plausible reason for withdrawal. United States v. Webster, 9 Cir.1972, 468 F.2d 769, cert. den., 410 U.S. 934, 93 S.Ct. 1385, 35 L.Ed.2d 597; United States v. Valdez, 5 Cir.1971, 450 F.2d 1145. See also United States v. Needles, 2 Cir.1973, 472 F.2d 652. Where an exhaustive voir dire of defendant before accepting plea makes it abundantly clear that the plea was entered voluntarily, with full understanding of its consequences, and there is a factual basis, there is no abuse of discretion. United States v. Fernandez, 2 Cir.1970, 428 F.2d 578. When a patient and understanding judge gives every consideration to a defendant's change of position the day before trial and the defendant attempts to mock the administration of justice, there is no abuse of discretion. Burnett v. United States, 10 Cir.1968, 404 F.2d 29."
In its reliance upon federal authorities, Ecker v. State, supra, reflects the proposition set forth in Hicklin v. State, Wyo., 535 P.2d 743, 748, 79 A.L.R.3d 1050 (1975), that our Rule 33(d), W.R.Cr.P., is identical to Rule 32(d), F.R.Cr.P., which leads to persuasive authority in the federal cases which have construed that rule.
In Ecker v. State, supra, we alluded to "a plausible reason for withdrawal." Federal authorities have identified this as a "fair and just" reason for withdrawing the plea. See, e.g., Kercheval v. United States, 274 U.S. 220, 224, 47 S.Ct. 582, 583, 71 L.Ed. 1009 (1927); Barker v. United States, 579 F.2d 1219 (10th Cir.1978). Whichever phrase is used, the presentation by Schmidt in connection with his motion for leave to withdraw his plea of guilty of supporting documentation for the proposition that he had developed reliable evidence sustaining the defense of mental illness or deficiency does present a "plausible reason" and a "fair and just" reason for withdrawing the plea. Other federal authorities then suggest that the burden should shift to the government to establish that it would be prejudiced if leave to withdraw the plea were granted. United States v. Strauss, 563 F.2d 127 (4th Cir.1977); United States v. Savage, 561 F.2d 554 (4th Cir.1977). This is not a universal view in the federal courts, however (United States v. Saft, 558 F.2d 1073, 41 A.L.R.Fed. 859 (2nd Cir.1977), and it would appear that there has been a shift in emphasis by virtue of the amendment of Rule 11, F.R.Cr.P., which now requires the placing of plea agreements in the record, for full inquiry into the voluntariness of the plea, for detailed advice to the defendant concerning his rights and consequences of the plea and a determination that the defendant understands these matters, and for a determination of the accuracy of the plea. United States v. Barker, 514 F.2d 208 (D.C. Cir.1975), cert. denied 421 U.S. 1013, 95 S.Ct. 2420, 44 L.Ed.2d 682 (1975).
The American Bar Association Standards for Criminal Justice espouse in Standard 14-2.1 the proposition that the defendant should be allowed to withdraw his plea prior *661 or to imposition of sentence for any fair and just reason unless the prosecution has been substantially prejudiced by reliance upon defendant's plea. We note that prejudice has been recognized if potential witnesses may no longer be available, Government of Virgin Islands v. Berry, 631 F.2d 214 (3rd Cir.1980); in instances in which the government had discontinued its trial preparation and notified a number of witnesses not to appear and grand jury sessions scheduled for the defendant and other witnesses to testify to related circumstances would have to be cancelled, United States v. Brown, 617 F.2d 54 (4th Cir.1980); when the government would have to re-assemble some eighteen witnesses and the trial judge had at arraignment fully complied with Rule 11, United States v. Strauss, supra; and similar instances.
In this case Schmidt makes no contention that Rule 15, W.R.Cr.P., which tracks Rule 11 of the Federal Rules of Criminal Procedure, was not complied with scrupulously. The appellant Schmidt was advised in accordance with this rule on more than one occasion. There is no indication that the plea of guilty was not voluntary. The plea agreement is spread upon the record. There is no question as to the factual basis for the plea. On August 5, 1982, when, with the jury panel waiting, Mark Wayne Schmidt withdrew his pleas of not guilty and not guilty by reason of mental illness or deficiency and entered a plea of guilty the following colloquy occurred:
"THE COURT: Okay. Now, secondly, if you do withdraw your pleas of mental illness or deficiency, that ends that. You can't put that out as an issue. You can be tried on those two charges, your mental illness and deficiency pleas, that you were mentally ill. That's up to the jury to determine despite the fact that Mr. Miracle and Evanston say you are not mentally ill and you lack the capacity to go to trial, you can still plead that as an issue in the Courtroom and ask the jury to make that determination.
"Do you understand that?
"MR. SCHMIDT: Yes, sir.
"THE COURT: You waive that if you plead guilty.
"Do you understand that?
"MR. SCHMIDT: Yes, sir."
With due regard to the federal cases cited above, and the American Bar Association Standards for Criminal Justice, the rule in this state still is that withdrawal of a plea of guilty before sentencing is not an absolute right, and denial by the district court is within its sound discretion. Hanson v. State, Wyo., 590 P.2d 832 (1979); Ecker v. State, supra. See United States v. Rodriguez-DeMaya, 674 F.2d 1122 (5th Cir.1982). In light of the circumstances which have been recited at some length in this opinion, we cannot discern any abuse of the trial court's discretion in this instance. The trial court twice had ordered that Schmidt be examined on the issue of mental illness or deficiency. It had before it a third report from the Wyoming State Hospital, a fourth report from Dr. Yost, and a report made some years earlier in Iowa. The case had been filed in the district court for almost a year. Similar proceedings had been conducted in a neighboring county. The State of Wyoming had prepared its case for trial on two occasions, and on one of those the jury panel actually had reported for duty. Because abuse of discretion is the standard we do not require that the State establish prejudice, but on the state of this record we could not as a matter of law negate a conclusion by the district court that prejudice had been shown.
Concluding that there is no abuse of discretion manifested by the proceedings in this case, the judgment and sentence of the district court is affirmed.
ROSE, Justice, dissenting.
I dissent. Defendant Schmidt, subsequent to entering his plea of guilty pursuant to a plea agreement with the State, became possessed of a meritorious defense to the charges lodged against him. This defense was not discoverable prior to the time that Schmidt pled guilty. Certainly this constitutes a "plausible" reason for withdrawing the plea. To grant the motion to withdraw the guilty plea under such circumstances would indeed be fair and just.
*662 Schmidt had originally pled not guilty and later added a plea of not guilty by reason of mental illness or deficiency. Prior to changing his plea to guilty, he had been evaluated for mental capacity at least four times. The first of these was in Iowa in connection with similar charges several years previous. The second was performed in accordance with § 7-11-303(b), W.S. 1977 in connection with the instant charges. The third was necessitated by charges in another county. The fourth examination was conducted by the same doctor who performed the § 7-11-303(b) examination, and for purposes of this case he conducted another examination by authority of § 7-11-304, W.S. 1977. All of these examinations resulted in a determination that Schmidt was mentally competent at the time of the alleged criminal acts giving rise to this prosecution. After completion of these four examinations, the State amended the information to allege aggravating circumstances. Defendant then changed his plea to guilty to the current charge, in exchange for the State's promise to drop the aggravating charge and other concessions. Shortly thereafter, yet another examination was performed by a doctor who had more extensive experience with the post-Vietnam stress syndrome than any of the other evaluators. His determination was that Schmidt, at the time of the alleged criminal act, lacked substantial capacity to appreciate the wrongfulness of his conduct. Thus, the results of this examination revealed to the defendant a meritorious defense to the charges against him and he sought to withdraw his plea of guilty.
Based on these facts, the majority determine that the trial court did not abuse its discretion in denying the presentence motion to withdraw the guilty plea. The majority properly indicate that there is no absolute right to withdraw a guilty plea prior to sentencing and that whether to grant such a motion is within the sound discretion of the trial court. Hanson v. State, Wyo., 590 P.2d 832, 835 (1979); Ecker v. State, Wyo., 545 P.2d 641, 642 (1976); Nagelberg v. United States, 377 U.S. 266, 267, 84 S.Ct. 1252, 1253, 12 L.Ed.2d 290 (1964); United States v. Hancock, 607 F.2d 337 (10th Cir.1979); Dorton v. United States, 447 F.2d 401, 411-412 (10th Cir.1971). The majority also properly equate the Wyoming standard that the defendant must show a plausible reason to withdraw his plea, Ecker v. State, supra, with the federal test of fairness and justice. Kercheval v. United States, 274 U.S. 220, 224, 47 S.Ct. 582, 583, 71 L.Ed. 1009 (1927); Barker v. United States, 579 F.2d 1219, 1223 (10th Cir.1978); Dorton v. United States, 447 F.2d at 412. However, the majority seem to ignore the fact that in discretionary rulings on motions to withdraw pleas of guilty, the trial court, and this court on review, have the benefit of judicial opinions which delineate the factors to be considered in the exercise of such discretion. Without saying as much, the majority consider and eliminate one such factor in this case by indicating that there is no contention that Rule 15, W.R.Cr.P. (Rule 11, F.R.Cr.P.) has not been complied with. 668 P.2d at 660-661. I depart from the majority because they have failed to adequately evaluate the other factors which must bear upon the discretionary exercise.
A presentence motion to withdraw a guilty plea is judged by a less stringent standard than a postsentence motion, Hicklin v. State, Wyo., 535 P.2d 743, 749 (1975), primarily because at this stage it is approprite to give maximum protection to the defendant's right to his day in court. Kadwell v. United States, 315 F.2d 667, 670 (9th Cir.1963). In such cases, doubts should be resolved in favor of the defendant, United States v. Stayton, 408 F.2d 559, 560 (3rd Cir.1969), because the benefits which accrue to all of us by putting the State to its proof override any consideration of inconvenience to courts and prosecutors. United States v. Roberts, 187 U.S.App.D.C. 90, 570 F.2d 999, 1009 (1977), appeal after remand 195 U.S. App.D.C. 1, 600 F.2d 815, aff'd 445 U.S. 552, 100 S.Ct. 1358, 63 L.Ed.2d 622. These are the reasons behind the early holding that a presentence motion to withdraw a guilty plea should be granted "if for any reason the granting of the privilege seems fair and just." (Emphasis added.) Kercheval v. United States, 274 U.S. at 224, 47 S.Ct. at *663 583. Such withdrawal should be "freely allowed," Poole v. United States, 102 U.S. App.D.C. 71, 250 F.2d 396, 400 (1957); United States v. Roberts, 570 F.2d at 1008; Kadwell v. United States, 315 F.2d at 670, and granted with liberality, Dorton v. United States, 447 F.2d at 411-412, and even with "`great liberality,'" United States v. Fina, 289 F. Supp. 288, 289 (E.D.Pa. 1968), quoting from United States v. Roland, 318 F.2d 406, 409 (4th Cir.1963). These are the general principles that guide the trial court's discretion in such cases.
These general principles are further refined by specific guidelines adopted by the courts. These guidelines include consideration of the timeliness of the motion, United States v. Roberts, 570 F.2d at 1008, and whether the Rule 15, W.R.Cr.P. hearing was properly afforded to the defendant. Kadwell v. United States, 315 F.2d at 669. The courts are split on whether an avowal of innocence should be a factor to consider. United States v. Washington, 341 F.2d 277, 9 A.L.R.3d 448, 460 (3d Cir.1965), cert. denied 382 U.S. 850, 86 S.Ct. 96, 15 L.Ed.2d 89, reh. denied 382 U.S. 933, 86 S.Ct. 317, 15 L.Ed.2d 346; Kadwell v. United States, 315 F.2d at 670, n. 12. In this case, the most important factor of those embraced by the courts as mitigating in favor of granting a plea-withdrawal motion is that the defendant believed and had reason to believe that a meritorious defense was available to him. United States v. Joslin, 140 U.S.App.D.C. 252, 434 F.2d 526, 531 (1970); Kadwell v. United States, 315 F.2d at 670, n. 12; Gearhart v. United States, 106 U.S.App.D.C. 270, 272 F.2d 499, 502 (1959).
Defendant Schmidt believed he had a meritorious defense based on the fifth of the enumerated psychiatric evaluations. This factor alone is sufficient to mandate granting of the plea-withdrawal motion. Poole v. United States, 250 F.2d at 400. Coupled with the principles of great liberality which guide the courts, United States v. Hancock, 607 F.2d at 337, this basis indicates a clear case of abuse of discretion by the trial court.
Upon a motion to withdraw a guilty plea based on an available defense, the trial court should not undertake to decide the merits of the defense. Gearhart v. United States, 272 F.2d at 502. Also see: Poole v. United States, 250 P.2d at 401; 3 Wright, Federal Practice & Procedure: Criminal 2d § 538, p. 203 (1982). That is the jury's function. Hence it is irrelevant in this case that there were four reports in the record indicating that defendant was competent and only one indicating he was incompetent. While this might possibly defeat the defense at trial, the question to be addressed on the motion to withdraw the guilty plea is whether, based on the possible defense, defendant is entitled to an opportunity to cast a reasonable doubt on the State's case against him. Our entire criminal justice system is based on the premise that he is.
Although the majority acknowledge that prejudice to the prosecution is not required to defeat a motion to withdraw a guilty plea, their emphasis on the fact that the State had prepared its case and that the jury panel was waiting seems to indicate they were not unaffected by the possibility of prejudice to the State. I emphasize that prejudice is not determinative. Even if it were, it is my firm conviction that prejudice has not been shown here. This cannot constitute prejudice as a matter of law. "[W]here such prejudice is absent or minimal, withdrawal is routinely permitted," United States v. Roberts, 570 F.2d at 1011. The State must also show that the witnesses would be unavailable, Government of the Virgin Islands v. Berry, 631 P.2d 214 (3rd Cir.1980), or some other substantial impact on the State's presentation of its case. United States v. Brown, 617 F.2d 54 (4th Cir.1980); United States v. Carden, 599 F.2d 1320 (4th Cir.1979), cert. denied 444 U.S. 874, 100 S.Ct. 156, 62 L.Ed.2d 101; United States v. Strauss, 563 F.2d 127 (4th Cir.1977).
The trial judge abused his discretion in denying Schmidt's presentence motion to withdraw his guilty plea based upon an available defense. I would reverse.
NOTES
[*]  Retired June 13, 1983, but continued to participate in the decision of the court in this case pursuant to order of the court entered June 13, 1983.
[1]  Section 7-11-303, W.S. 1977 (Cum.Supp. 1982), provides in pertinent part as follows:

"(a) If it appears at any stage of a criminal proceeding, by motion or upon the court's own motion, that there is reasonable cause to believe that the accused has a mental illness or deficiency making him unfit to proceed, any further proceedings shall be suspended. If the question is raised in a court other than the district court, the proceeding shall be suspended and the cause transferred to the district court.
"(b) The district court shall order an examination of the accused by a designated examiner. The order may include, but is not limited to, an examination at the Wyoming state hospital on an inpatient or outpatient basis, the utilization of local mental health centers on an inpatient or outpatient basis, or the examination of the accused, should he be incarcerated for any reason, at his place of detention. In selecting the examination site, the court may consider proximity to the court, availability of an examiner or examiners, and the necessity for security precautions. If the order provides for commitment of the accused to a designated facility, the commitment shall continue no longer than a thirty (30) day period for the study of the mental condition of the accused.
"(c) Written reports of the pretrial examination shall be filed with the clerk of court. The report shall include:
"(i) Detailed findings;
"(ii) An opinion as to whether the accused has a mental illness or deficiency, and its probable duration;
"(iii) An opinion as to whether the accused, as a result of mental illness or deficiency, lacks capacity to comprehend his position, to understand the nature and object of the proceedings against him, to conduct his defense in a rational manner, and to cooperate with his counsel to the end that any available defense may be interposed;
"(iv) An opinion as to whether at the time of the alleged criminal conduct the accused, as a result of mental illness or deficiency, lacked substantial capacity to appreciate the wrongfulness of his conduct or to conform his conduct to the requirements of law;
"(v) A recommendation as to whether the accused should be held in a designated facility for treatment pending determination by the court of the issue of mental fitness to proceed; and
"(vi) A recommendation as to whether the accused, if found by the court mentally fit to proceed, should be detained in a designated facility pending further proceedings.
"(d) The clerk of court shall deliver copies of the report to the district attorney and to the accused or his counsel. The report is not a public record or open to the public. Within five (5) days after receiving a copy of the report, both the accused and the state may, upon written request, obtain an order granting them an examination of the accused by a designated examiner of their own choosing. If such an examination is ordered, a report conforming to the requirements of subsection (c) of this section shall be furnished to the court and the opposing party."
[2]  Section 7-11-304, W.S. 1977, provides as follows:

"(a) A person is not responsible for criminal conduct if at the time of the criminal conduct, as a result of mental illness or deficiency, he lacked substantial capacity either to appreciate the wrongfulness of his conduct or to conform his conduct to the requirements of law.
"(b) As used in this section, the terms `mental illness or deficiency' do not include an abnormality manifested only by repeated criminal or otherwise antisocial conduct.
"(c) Evidence that a person is not responsible for criminal conduct by reason of mental illness or deficiency is not admissible at the trial of the defendant unless a plea of `not guilty by reason of mental illness or deficiency' is made. A plea of `not guilty by reason of mental illness or deficiency' may be pleaded orally or in writing by the defendant or his counsel at the time of his arraignment. The court, for good cause shown, may also allow such a plea to be entered at a later time. Such a plea does not deprive the defendant of other defenses.
"(d) In all cases where a plea of `not guilty by reason of mental illness or deficiency' is made, the judge shall order the defendant examined as provided in W.S. 242.3(b) [§ 7-11-303(b)]. If an examination provided in W.S. 7-242.3(b) [§ 7-11-303(b)] was made, the report may be received in evidence and no new examination shall be required unless, in the discretion of the court, another examination is necessary. Within five (5) days after receiving a copy of the report, both the accused and the state, upon written request, may obtain an order granting them an examination of the accused by a designated examiner of their own choosing. The clerk of court shall deliver copies of the report or reports to the district attorney and to the accused or his counsel. All reports required by this subsection shall conform to the requirements of W.S. 7-242.3(c) [§ 7-11-303(c)]. These reports are not public records or open to the public.
"(e) If the initial report contains the recommendation that the accused be held in a designated facility pending trial, the court may order that the accused be committed to or held in a designated facility pending trial.
"(f) No statement made by the defendant in the course of an examination or treatment pursuant to this section and no information received by any person in the course thereof is admissible in evidence in any criminal proceeding on any issue other than that of the mental condition of the defendant."
