Opinion by
Judge FURMAN.T1 The People's appeal presents a single issue of first impression: is a writ to transport an inmate from one county jail to another, prior to that inmate's testimony before a grand jury, the functional equivalent of a subpoena to testify before the grand jury? We conclude it is not and therefore reverse the district court's judgment dismissing an indictment against defendant, Jason Seader, *1194for theft by receiving and conspiracy to commit theft by receiving.
12 Defendant was being held at the City and County of Denver Jail on an unrelated matter. It was undisputed that the Jefferson County authorities executed a transport writ so that he could be taken to Jefferson County Jail in order to testify before a Jefferson County grand jury. -It was also undisputed that defendant was never served with a grand jury subpoena.
T8 After defendant arrived at the Jefferson County Jail, a district attorney investigator met with him. The investigator informed defendant that he had been transferred to answer questions before a grand jury, if he chose to do so, and that he should consider "helping himself." Defendant asked to speak with an attorney, but the investigator told defendant he would need to make his own arrangements to do so.
4 Two district attorney investigators then had defendant released to their custody, and together they transported defendant in handcuffs and shackles to the grand jury waiting area inside the district attorney's office.
T5 There, a deputy district attorney told defendant that he was likely to be charged by the grand jury and that he might be able to help himself if he testified. The deputy district attorney informed defendant that (1) he was not under subpoena to testify, (2) he could choose not to testify, (8) anything he said could be used against him, and (4) if he chose to proceed without an attorney, he would do so voluntarily. Defendant did not speak with an attorney, and no plea agreement was reached.
T6 After this discussion, defendant was brought inside the grand jury room. Before defendant testified regarding the matter under investigation, the following exchange took place:
DISTRICT ATTORNEY: You are not under subpoena here today; is that correct?
DEFENDANT: Correct.
DISTRICT ATTORNEY: You are here of your own free will and volition, meaning that although you wouldn't be able to walk away from custody, you don't have to be in here and you know that?
DEFENDANT: Yes.
DISTRICT ATTORNEY: You know and we talked about the fact that anything you say in here can be used against you?
DEFENDANT: Yes.
DISTRICT ATTORNEY: And that you could-I think at one point you indicated that you may want to consult with an attorney, but you decided to go forward without an attorney; is that correct?
DEFENDANT: Yes.
DISTRICT ATTORNEY: You and I, at this point, do not have any plea bargain agreements or deals in place that would say, if you came in and testify, here's what we're going to do for you?
DEFENDANT: Right.
DISTRICT ATTORNEY: But I have told you that we will treat you like every other witness who comes in and cooperates, in that we will factor into what happens here-and I can't promise you what is or what is not going to happen-we will factor into whatever happens, your cooperation.
That's what we talked about; is that correct?
DEFENDANT: Yes.
T7 Defendant testified before the grand jury regarding his involvement in the theft and sale of certain brass cemetery vases and sprinkler parts. The grand jury subsequently returned an indictment against him.
8 Defendant filed a motion to dismiss the indictment, contending, among other things, that he was "brought before the grand jury in custody, against his wishes, without a full and effective advisal of [his] right to counsel and his right to remain silent."
T9 Relying on section 16-5-204(4), C.R.S. 2012, the district court granted defendant's motion to dismiss the indictment. This statute reads, in pertinent part:
(a) At the option of the prosecuting attorney, a grand jury subpoena may contain an advisement of rights. If the prosecuting attorney determines that an advisement is necessary, the grand jury subpoena shall *1195contain the following advisement prominently displayed on the front of the subpoena....
(b) Any witness who is not advised of his rights pursuant to paragraph (a) of this subsection (4) shall not be prosecuted or subjected to any penalty or forfeiture for or on account of any transaction, matter, or thing concerning which he testifies or any evidence he produces, nor shall any such testimony or evidence be used as evidence in any criminal proceeding, except for perjury, against him in any court.
110 The district court found that, when defendant arrived at the Jefferson County Jail, he "had no idea why he was there" and "[nlo one from the Sheriff's office knew why he was there. He didn't have a court appearance. He was spoken to by the DA's office earlier and told he didn't have to testify." The court then found, "[Defendant] wasn't free to leave. He didn't come of his own volition, he didn't even know why he was there," and:
I'm not even sure what the authority of the DA's office to issue that writ without a subpoena is because you can writ-you're only allowed to writ somebody in for permitted purposes. One of them being an appearance in court, but it was not subject to a subpoena. And I didn't look into whether or not the grand jury requested his testimony, et cetera.
T11 After finding that the writ was "the functional equivalent of a subpoena," the district court determined that defendant was entitled to an advisement pursuant to section 16-5-204(4). Because defendant was not so advised, the court dismissed the indictment.
T 12 The People appeal the district court's judgment dismissing the indictment.
I. Jurisdiction
113 Before turning to the merits of this appeal, we note we have jurisdiction under section 16-12-102(1), C.R.S.2012, because the district court's dismissal of all charges in the indictment against defendant constitutes a final judgment. See People v. Gabriesheski, 262 P.3d 653, 657 (Colo.2011) ("The dismissal of all charges in a criminal prosecution clearly ends the particular action in which the order of dismissal is entered and therefore constitutes a final judgment for purposes of the appellate review of any ruling in the case.").
IIL -A Writ Transferring an Inmate Is Not the Functional Equivalent of a Subpoena
14 The People contend the district court erred when it dismissed the indictment pursuant to section 16-5-204(4) based on its finding that the writ to transport defendant from the City and County of Denver Jail to the Jefferson County Jail was the functional equivalent of a subpoena. We agree.
T 15 The interpretation of a statute is a question of law. People v. Bergen, 883 P.2d 532, 537 (Colo.App.1994). Interpretations must reflect legislative intent. Id. "Courts look first and foremost to the language of the statute itself to discern legislative intent." Id. (quoting Martinez v. Badis, 842 P.2d 245, 249 (Colo.1992)).
T16 In Bergen, the division determined that if a grand jury witness is compelled to testify pursuant to a subpoena, such witness cannot later be prosecuted if the subpoena did not set forth a proper advisement under section 16-5-204(4)(a) and (b). See Bergen, 888 P.2d at 588. We must, therefore, determine whether the writ to transport defendant from the City and County of Denver Jail to the Jefferson County Jail was the functional equivalent of a subpoena in section 16-5-204(4). We conclude it was not.
{17 A subpoena is used to compel the attendance of a witness. See Crim. P. 17(a) (in every criminal case "[a subpoenal shall command each person to whom it is directed to attend and give testimony at the time and place specified therein."). Hence, a grand jury subpoena would have compelled defendant to appear and give testimony before the grand jury.
1 18 A transport writ, however, is an order to the incarcerating officials that requires these officials to produce the prisoner. Collins v. Bandy, 890 P.2d 266, 267 (Colo.App.1995). It is thus in the nature of a writ of habeas corpus ad testificandum, which requires the presence of a petitioner for a judicial proceeding. See People v. Calyer, 736 P.2d 1204, 1207 (Colo.1987); Black's Law Dictionary 778, 1749 (9th ed.2009).
*11961 19 We conclude the transport writ cannot be construed as the functional equivalent of a subpoena for the purposes of section 16-5-204(4) because it did not compel defendant to appear and give testimony before the grand jury. The writ in this case was only an order commanding the sheriff to bring defendant to the Jefferson County Jail for the defendant to provide testimony before the grand jury. See, eg., § 30-10-515, C.R.8.2012. It is undisputed that defendant was not provided a copy of the writ (presumably because it was directed to the sheriff) and that the writ contained neither an advisement of the nature of the proceedings nor an order directed to defendant.
120 Accordingly, the written advisement requirement of section 16-5-204(4)(a) and (b) was inapplicable, Bergen, 883 P.2d at 588, and the district court erred in dismissing the indictment under this statute.
[ 21 Defendant's reliance on People ex rel. Gallagher v. District Court, 198 Colo. 468, 601 P.2d 1380 (1979), is misplaced. The supreme court there upheld the trial court's dismissal of the indictment against the defendant because the district attorney's staff had told the defendant that he was under subpoena to appear before the grand jury, when in fact a subpoena had never been served. Id. at 470, 601 P.2d at 1381. In contrast, defendant here was not falsely informed that he was compelled to testify before the grand jury. Rather, defendant was told multiple times that he did not have to do so. Defendant also acknowledged he understood that he could choose not to testify. Therefore, defendant was not laboring under any misapprehension regarding his testimony.
122 The judgment is reversed, and the case is remanded with directions to reinstate the indictment.
Judge GRAHAM and Judge NIETO * concur.