OPINION OF THE COURT
Andrias, J.Defendant seeks to appeal from an order that denied his motion to quash a court-ordered subpoena duces tecum served on behalf of the New York County District Attorney’s Office on the Director of Medical Records of Kirby Forensic Psychiatric Center (Kirby) requesting defendant’s postcommitment psychiatric records in connection with a pending CPL 730.50 (2) retention hearing. As explained below, the denial of the motion to quash the subpoena is a nonappealable order. However, were the order appealable, we would find that Supreme Court correctly determined that the District Attorney had standing to participate in the retention proceeding and was entitled to the subpoenaed psychiatric records in the interests of justice pursuant to Mental Hygiene Law § 33.13 (c).
On February 19, 2009, defendant was arrested and charged with setting fire to a bookcase in the lobby of an occupied apartment building and to four cars. At the time of his arrest, defend*118ant possessed several weapons, including a loaded .22 caliber firearm, and a bottle of gasoline. A search of his home recovered a sawed-off shotgun with ammunition, as well as more than 200 rounds of .22 caliber ammunition and another bottle of gasoline.
On February 20, 2009, defendant was arraigned at Bellevue Hospital and remanded for a competency examination pursuant to CPL 730.30. On March 11, 2009, defendant was indicted on arson and weapons possession charges. On March 26, 2009, he was arraigned on the indictment and the People moved to confirm the results of the CPL 730.30 examination, which found that defendant lacked the capacity to understand the proceedings and assist in his defense. Defendant was committed to the custody of the Commissioner of Mental Health and confined to Kirby (see CPL 730.50 [1]).
On March 24, 2010, Kirby notified the court and the District Attorney that defendant had been restored to fitness. The report in support of competency restoration noted possible malingering. After defendant was transferred to Hiker’s Island to await trial, his attorney once again requested a CPL 730.30 examination, and the examiners found that defendant was not fit to stand trial. By order dated July 1, 2010, defendant was committed to the custody of the Commissioner and returned to Kirby as an incapacitated person.
In June 2011, two members of Kirby’s forensic committee concluded that defendant was fit to stand trial; one of them implied that defendant had feigned delusional thinking during his previous admission, i.e., had been malingering. The third member found that defendant was still incapacitated. Defendant’s treating psychiatrist also found that defendant was fit, and recommended that he be returned to court. Nevertheless, Kirby’s clinical director disapproved the recommended action, and on June 27, 2011, Kirby filed an application for an order of retention pursuant to CPL 730.50 (2). Notice of the application was served on Mental Hygiene Legal Services (MHLS) and the District Attorney.
Defendant requested a CPL 730.50 (2) hearing on the retention application. At a July 21, 2011 hearing date, the People, expressing concern over defendant’s history of violence and the possibility that he was malingering, presented a subpoena duces tecum, which the court signed, directing Kirby to produce defendant’s psychiatric records “from April 1, 2009 to the present.” On August 16, 2011, defendant, represented by MHLS, *119moved to quash the subpoena. Supreme Court denied the motion.
‘ ‘It is well established that ‘[n]o appeal lies from a determination made in a criminal proceeding unless specifically provided for by statute’ ” (People v Pagan, 19 NY3d 368, 370 [2012], quoting People v Dunn, 4 NY3d 495, 497 [2005]). The order appealed from, which denied defendant’s motion to quash a court-ordered subpoena, is not a disposition listed in CPL 450.10 or 450.15 (see People v Hurley, 47 AD3d 488, 488 [1st Dept 2008] [“Nothing in CPL article 450 authorizes an appeal from an order denying a motion for a subpoena duces tecum”]).
Nor was Supreme Court “acting solely in the exercise of its civil jurisdiction” (CPL 10.10 [7]; see also People v Santos, 64 NY2d 702 [1984] [orders determining motions to quash subpoenas are appealable civil orders only when issued in the investigation stage of a criminal case]). CPL article 730 “provides a procedure for assessing the mental capacity of criminal defendants to stand trial and for the commitment of those found incapacitated, until such time as they regain competency to understand the criminal proceedings against them and to assist in their defense” (People v Lewis, 95 NY2d 539, 543 [2000], cert denied 534 US 833 [2001]). In this case, Kirby sought an order of retention pursuant to CPL 730.50 (2), which is issued by a superior court exercising criminal jurisdiction (see id. at 547). Defendant then requested a retention hearing, and the so-ordered subpoena duces tecum addressed to Kirby’s director of medical records was issued in connection therewith to aid the People in their examination of Kirby’s witnesses (see CPL 610.10 [2], [3]).
Defendant’s invocation of the subpoena provision of CPLR 2304 and his characterization of this appeal as civil do not alter the conclusion that the motion court was not acting solely in the exercise of its civil jurisdiction when it denied his motion to quash the subpoena. CPL 1.20 (18) (b) defines a criminal proceeding as any proceeding that, among other things, “occurs in a criminal court and is related to a prospective, pending or completed criminal action.” It cannot be argued that the proceedings herein “in no way affect the criminal proceeding . . . and are entirely collateral to and discrete from the criminal proceeding” (see Matter of Director of Assigned Counsel Plan of City of N.Y. [Bodek], 87 NY2d 191, 196 [1995, Bellacosa, J., concurring]). “Defendant remains under criminal indictment, and the order clearly arose out of the criminal proceeding against him” (People v Anonymous, 284 AD2d 207, 208 [1st *120Dept 2001] [citation omitted]). To describe this appeal as “civil” because the court alternatively based its determination on Mental Hygiene Law § 33.13 (c) would be to “resort to interpretative contrivances to broaden the scope” of CPL article 450 (see People v Hernandez, 98 NY2d 8, 10 [2002]).
We note that trial courts that have addressed the issue of whether the District Attorney has standing to participate in a retention proceeding have rendered conflicting decisions (compare e.g. People v Lesly T., 33 Misc 3d 881 [Sup Ct, Kings County 2011], with People v Popa, Sup Ct, NY County, 2009, index No. 1938/07). Were we to reach this substantive issue, we would reject defendant’s argument that, under People v Lebron (88 NY2d 891, 894-895 [1996]), the District Attorney does not have standing to participate (see People v Elizabeth P., 34 Misc 3d 647, 658 [Sup Ct, NY County 2011]). The issue in Lebrón was whether the People, in the context of a speedy trial motion, are chargeable with the time that elapses between an order of commitment and a judicial finding that the defendant is no longer incapacitated. Finding that the District Attorney had no duty of inquiry until the defendant was declared competent, the Court of Appeals held that the People had no obligation to independently monitor the defendant’s commitment status in order to exclude the period of commitment for CPL 30.30 (4) (a) trial readiness purposes, even though the defendant’s absence during that time was attributable in part to his being in the custody of the Department of Correctional Services in an unrelated case, rather than the Department of Mental Hygiene. The Court of Appeals did not address the question of whether or not the District Attorney had the right to participate in a CPL 730.50 (2) retention hearing if it desired to do so.
Although a defendant’s incapacity suspends the criminal proceeding, it does not end the felony prosecution. While the District Attorney does not have any duty of inquiry until the defendant is declared competent, CPL 730.50 (2) does not mandate that the District Attorney be precluded from contesting a defendant’s continued unfitness at a retention hearing when the District Attorney deems such participation necessary to protect the public and the public’s interest in the future of the criminal prosecution against a defendant who may be malingering for the purpose of avoiding prosecution.
“A finding of . . . competency [to stand trial] is within the sound discretion of the trial court and involves a legal and not a medical determination” (People v Phillips, 16 NY3d 510, 517 [2011] [internal quotation marks omitted]). Each retention or*121der has an impact on the indictment because the delay in prosecution will affect the viability of the People’s case. Witnesses’ memories may dim, or the witnesses may become inaccessible. Evidence may be lost. Moreover, if the delay continues long enough, it will eventually result in the automatic dismissal of the charges against defendant by operation of law (see CPL 730.50 [3], [4]). In cases such as this, where the hospital and the Commissioner agree to retention notwithstanding medical opinions to the contrary and indications in the medical records that the defendant may be malingering, the input of the District Attorney is needed to present competing evidence on the issue of a defendant’s fitness so that the court may informatively weigh the defendant’s welfare against the safety of the public.
Significantly, there is no other party who will perform that function in this case. Quite often, the Attorney General’s Office represents the broad public interest. However, here the Attorney General’s Office represents the interest of the Commissioner and the hospital, and Kirby is of the view that defendant is not fit to proceed, a position which, according to the District Attorney, is at odds with the public interest in seeing that defendant is timely prosecuted. MHLS represents the defendant’s interests. Consequently, under the circumstances before us, there is no one to protect the public interest absent the participation of the District Attorney.
“Interpreting the notice provisions of CPL 730.50 (2) as limiting the district attorney to the role of observer in retention . . . proceedings is too narrow and does not comport with the legislative directive that no incompetent defendant’s custodial status be changed, except on notice to the district attorney (CPL 730.60 [6] [a] [1])” (Lesly T., 33 Misc 3d at 883).
The provisions of article 730 relating to notice to the District Attorney should be seen as a “floor,” or a level of entitlement, with regard to prosecutorial participation, not a “ceiling” that limits a court’s reasonable execution of its duty to effectively conduct the hearing.
Indeed, CPL 730.50 (2) provides that an application for retention “must be made within sixty days prior to the expiration of [the] period [prescribed in the temporary order of commitment] on forms that have been jointly adopted by the judicial conference and the commissioner.” The official forms for retention hearings formulated under CPL 730.50 (2) provide for notice to the county’s district attorney (22 NYCRR subtit D, ch VI, form *12216-h). 22 NYCRR 111.5 (a) provides that notice of the retention application shall be served “on the defendant, on the defendant’s attorney if known to the director, on the district attorney of the county where the criminal proceeding is pending, and on the Mental Health Information Service” (emphasis added). 22 NYCRR 111.5 (b) provides that if defendant requests a hearing, “[t]he clerk of the court shall notify the defendant, the defendant’s attorney if any, the district attorney, the director of the institution where defendant is confined, and the Mental Health Information Service of the time and place of the hearing” (emphasis added). In conformity with these rules and accepted practice, the District Attorney was served with Kirby’s application for the order of retention, which included a Certificate of the District Attorney stating that 25 years was the maximum term of imprisonment defendant faced if he was convicted on the highest felony charged in the indictment.
Defendant is correct that a person does not, as Supreme Court found, “place[ ] his mental competency at issue,” and thus waive confidentiality, by being an “incapacitated person” under CPL article 730. “[Ijncompetency to stand trial, lack of criminal responsibility because of mental disease or defect, and mental illness for purposes of civil commitment are independent concepts” (see Matter of Westchester Rockland Newspapers v Leggett, 48 NY2d 430, 441 [1979]). The purpose of a retention hearing is to determine whether the defendant remains unfit to stand trial, and the inquiry focuses narrowly on the defendant’s present mental capacity to understand the proceedings against him or her and to assist in his or her own defense. By requesting a retention hearing, defendant merely invoked a statutory due process right to defend against the State’s allegation that he was unfit to proceed to trial (see Matter of Barbara W., 142 Misc 2d 542 [Sup Ct, Albany County 1988]). However, Supreme Court correctly determined that the People were entitled to defendant’s psychiatric records pursuant to Mental Hygiene Law § 33.13 (c) (1).
Mental Hygiene Law § 33.13 (c) states that information about mental health patients, and clinical records and information tending to identify patients, are not public records, and that such information and records may be released only under the limited exceptions and restrictions set forth therein. Pursuant to Mental Hygiene Law § 33.13 (c) (1), a court may order the release of the documents “upon a finding by the court that the interests of justice significantly outweigh the need for confidentiality.”
*123The welfare of the allegedly mentally incapacitated defendant needs to be weighed against the safety of the public (see People v Schaffer, 86 NY2d 460, 468-469 [1995]). The District Attorney demonstrated that the requested psychiatric records, limited to the period after defendant was first committed to Kirby, are needed to enable it to present relevant evidence on the issue of defendant’s fitness, including, among other things, whether defendant has been feigning mental illness. This is essential to preserving the integrity of the fact-finding process and our adversarial system, as it will allow the court to make proper legal determinations affecting the future of the criminal action, after considering all the evidence. While Kirby sought an order of retention, there was a split among members of the hospital forensic committee as to defendant’s fitness to proceed, and defendant’s treating psychiatrist believed he should be returned to court. The privacy concerns expressed by MHLS “are adequately protected by compliance with the controlling state and federal privacy laws, which do not prohibit disclosure where the applicable conditions of those laws are satisfied” (People v Madrid, 88 AD3d 674, 675 [2d Dept 2011]; see also Mental Hygiene Law § 33.13 [f] [“Any disclosure made pursuant to this section shall be limited to that information necessary in light of the reason for disclosure. Information so disclosed shall be kept confidential by the party receiving such information and the limitations on disclosure in this section shall apply to such party”]).
Accordingly, the appeal from the order of the Supreme Court, New York County (Larry R.C. Stephen, J.), entered on or about October 4, 2011, which denied defendant’s motion to quash a court-ordered subpoena duces tecum served on behalf of the New York County District Attorney’s Office seeking defendant’s psychiatric records in connection with a pending CPL 730.50 retention hearing, should be dismissed, without costs, as taken from a nonappealable order.
Saxe, Catterson, Renwick and Román, JJ., concur.
Appeal from order, Supreme Court, New York County, entered on or about October 4, 2011, dismissed, without costs, as taken from a nonappealable order.
Motion to amend the caption granted.