
164 Cal.App.3d 947 (1985)
210 Cal. Rptr. 874
THE PEOPLE, Plaintiff and Respondent,
v.
BEVERLEY JO DURRETT, Defendant and Appellant.
Docket No. F003445.
Court of Appeals of California, Fifth District.
February 20, 1985.
*950 COUNSEL
Donnalee H. Huffman for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Lisa Lewis Dubois, James T. McNally and James Ching, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
HANSON (P.D.), Acting P.J.
An information was filed in Kern County Superior Court charging appellant with felony welfare fraud in violation of Welfare and Institutions Code section 11483, subdivision (2), and misdemeanor acquisition and use of food stamps in violation of Penal Code section 396. Appellant pleaded not guilty to both counts.
Appellant filed a nonstatutory motion to dismiss the complaint on the ground "the complaint could not be commenced where [the] prosecution did not review or consider restitution prior to institution of the criminal charges." After a hearing on appellant's motion, the motion was denied.
Appellant filed a petition for writ of prohibition in this court seeking to set aside the information; we denied the writ.
Appellant then changed her plea to guilty as to the first count. The change of plea was conditioned on being sentenced to felony probation, with service *951 of not more than six months in county jail, restitution of $1,870, and the issuance of a probable cause certificate for the purpose of appeal. The second count of the information was dismissed.
Appellant was sentenced to three years' probation on the condition she spend 90 days in county jail. She was ordered to pay $1,870 restitution. The court found good cause for issuance of a certificate of probable cause.

FACTS
Margaret Sweat, a Kern County welfare investigator who works on cases of suspected fraud involving aid to families with dependent children (AFDC), was in charge of the investigation of appellant's case. By letter dated October 8, 1982, Sweat requested restitution of an overpayment in AFDC from appellant. The letter stated appellant was overpaid $1,643 from May to September 1982, and the circumstances causing the overpayment were: "Your failure to report daughter left the home in March 1982 and did not return until July 1982, and failure to report the allegedly absent father was in the home as of June 1982." The letter requested payment or a satisfactory plan for repayment within 30 days; it was sent by certified mail with return receipt requested. Sweat testified the receipt was not signed by appellant and the letter was not returned to the welfare office. Appellant testified she never received a letter by registered mail from the welfare department.
After 30 days, Sweat began to compile information on the case to send to the district attorney. Before submitting the case to the district attorney's office, Sweat made personal contact with appellant and handed her the demand letter. A few days later, appellant went to the welfare office and signed a reimbursement agreement to repay $1,905 (an AFDC overpayment of $1,643 plus food stamp overissuance of $262) in payments of $100 per month, payable on the 15th of each month beginning December 15, 1982.
On December 3, 1982, Sweat sent a memo to the district attorney's office stating appellant had signed a reimbursement agreement but had not made any payments as of that date. Sweat did not state in the memo that payment was not due until the 15th of December. Sweat claimed, however, that she sent a copy of the reimbursement agreement with the memorandum.[1] Appellant *952 was arrested on December 13, 1982.
Appellant admitted making no payments to the welfare department under the restitution agreement as of the date of the hearing (Apr. 27, 1983), but testified she had the money on the 15th of December to make that payment.
Kern County Deputy District Attorney Barton H. Hegeler's declaration stated that he reviewed the documents concerning appellant on December 10, 1982, and determined a complaint should be issued. Hegeler further declared it was his practice to review carefully each request for a complaint to determine whether a felony or misdemeanor complaint should issue, or whether a complaint should issue at all. A complaint was executed on December 13, 1982, sworn by Margaret Sweat.

DISCUSSION

I
Appellant pleaded guilty after her nonstatutory motion to dismiss was denied. The initial question on appeal is whether appellant's contention of error in the denial of her motion to dismiss survives her guilty plea.
Penal Code section 1237.5 provides: "No appeal shall be taken by defendant from a judgment of conviction upon a plea of guilty or nolo contendere, or a revocation of probation following an admission of violation, except where:
"(a) The defendant has filed with the trial court a written statement, executed under oath or penalty of perjury showing reasonable constitutional, jurisdictional, or other grounds going to the legality of the proceedings; and
"(b) The trial court has executed and filed a certificate of probable cause for such appeal with the county clerk."
(1a) Welfare and Institutions Code section 11483[2] requires in cases of *953 welfare overpayments, that a demand for restitution be made and considered by the district attorney prior to bringing charges. The purpose of the demand is to give some limited protection to those charged with welfare fraud, allowing for an early opportunity to make restitution and possibly obtain favorable consideration from the prosecuting authorities. (2a) After restitution has been sought, the prosecutor must evaluate the circumstances of the case, including the nature of the accused's response to the demand for restitution. If the restitution requirement has been met, the district attorney may prosecute even though the accused has agreed to pay and is making payments or has made full restitution. (People v. Sims (1982) 32 Cal.3d 468, 475-476 [186 Cal. Rptr. 77, 651 P.2d 321]; People v. McGee (1977) 19 Cal.3d 948, 964-966 [140 Cal. Rptr. 657, 568 P.2d 382]; People v. Isaac (1976) 56 Cal. App.3d 679, 682 [128 Cal. Rptr. 872], disapproved on another ground in People v. Jenkins (1980) 28 Cal.3d 494, 503 [170 Cal. Rptr. 1, 620 P.2d 587]; Madrid v. Justice Court (1975) 52 Cal. App.3d 819, 824 [125 Cal. Rptr. 348].)
(3) The question of whether the state has failed to seek restitution before bringing charges concerns a statutory procedural defense properly resolved prior to trial by a motion to set aside the information. The question "`relates not to the guilt or innocence of the accused,'" but to the statutorily defective institution of the prosecution. (People v. McGee, supra, 19 Cal.3d 948, 968, and fn. 9.) (1b) Failure to seek restitution thus serves as a bar to prosecution.
The restitution requirement of section 11483 is a codification of legislative intent to provide protection for individuals accused of welfare fraud and not a codification of any constitutional requirement. Further, the restitution issue does not implicate jurisdiction. (4) "Jurisdiction in the fundamental sense `is essentially the power or authority conferred upon a court to decide a given type of case.' (Camp v. United States (8th Cir.1978) 587 F.2d 397, 399.)" (People v. Cella (1981) 114 Cal. App.3d 905, 915, fn. 5 [170 Cal. Rptr. 915].)
(5) We decide a question of first impression: whether the phrase "other grounds going to the legality of the proceedings" under Penal Code section 1237.5 includes a challenge to the restitution requirements of section 11483. We conclude that it does and the issue may be asserted on appeal following a plea of guilty.
In People v. Cella, supra, 114 Cal. App.3d 905, the defendant moved to dismiss the accusatory pleading by arguing article IV, subdivision (e), of *954 the Interstate Agreement on Detainers had been violated.[3]
In holding Cella's argument cognizable on appeal following the entry of his plea of guilty, the court stated: "Although the impact upon a defendant may be substantial, the statutory procedural right to uninterrupted rehabilitative incarceration and to dismissal for violation of that right conferred upon a defendant by article IV, subdivision (e), is neither constitutional nor jurisdictional in a fundamental sense. (United States v. Palmer (3d Cir.1978) 574 F.2d 164, 167; Gray v. Benson (D.Kan. 1978) 458 F. Supp. 1209, 1213.) ... Indeed, the sanctions of article IV, subdivision (e) `... go not to the authority or jurisdiction of the court but rather to the power of the prosecution to proceed against a person charged with a criminal offense.' (Camp v. United States (8th Cir.1978) 587 F.2d 397, 399, fn. 4.) Consequently, they pertain to `the legality of the proceedings,' for `... a formal accusation is an essential condition precedent to a valid prosecution for a criminal offense. If Article IV(e) is violated and the indictment therefore loses its "force or effect," the condition precedent is unsatisfied and the prosecution is technically precluded from proceeding further.' (Ibid.) Accordingly, defendant's contention is cognizable on appeal, as a guilty plea does not constitute a waiver of any violation of the Agreement, properly asserted before the plea." (People v. Cella, supra, 114 Cal. App.3d 905, 915, fn. 5.)
The situation in Cella is analogous to the present matter. Just as a violation of the Interstate Agreement on Detainers will prevent a prosecution, a failure to comply with the restitution requirements of section 11483 of the Welfare and Institutions Code bars prosecution. The contention survives a guilty plea where, as here, appellant properly asserts the violation prior to the plea.
In People v. Padfield (1982) 136 Cal. App.3d 218 [185 Cal. Rptr. 903], the court held the denial of pretrial diversion implicated "other grounds going to the legality of the proceedings" under Penal Code section 1237.5 and was cognizable on appeal after a plea of nolo contendere. The court first noted that although a plea of guilty or nolo contendere admitted all matters essential to the conviction, a conviction was not a predicate to pretrial *955 diversion. The court characterized pretrial diversion as a procedure to postpone prosecution temporarily or permanently based on the two-fold purpose of (1) sparing appropriately selected first-time offenders the stigma of carrying a criminal record by promptly exposing them to counseling programs, and (2) relieving congested criminal courts of relatively minor prosecutions. The purpose is accomplished by dismissing the charges at the end of the diversion period for the defendant who successfully completes the diversion program. (Id., at p. 228.) The court held: "Since a factually guilty but otherwise eligible defendant is entitled to be diverted, his plea of guilty cannot be deemed a waiver of his asserted but denied right to diversion. We hold therefore that the wrongful denial of pretrial diversion constitutes `other grounds going to the legality of the proceedings' (Pen. Code, § 1237.5), and may be raised on appeal by a certificate of probable cause after a plea of guilty or nolo contendere." (Id., at p. 228, fn. omitted.)
Similar to the situation in the Padfield case, the requirement of demanding and considering restitution under section 11483 has nothing to do with the accused's guilt or innocence. In an egregious case, prosecution may be instituted even when restitution has been agreed to and/or paid. However, the accused has a statutory right to have a demand made and his or her response to the demand considered before criminal charges are filed. The failure to do so implicates "other grounds going to the legality of the proceedings" under Penal Code section 1237.5, and is cognizable on appeal after a plea of guilty. The purpose of requiring a restitution demand comports with the purposes of pretrial diversion discussed above. (People v. Padfield, supra, 136 Cal. App.3d at p. 228.)

II
(6a) In urging affirmance, respondent preliminarily contends that because appellant raises issues on appeal identical to those raised in appellant's previously filed petition for writ, and this court denied relief "on the merits," the decision on the petition is res judicata. Respondent is incorrect. The denial of appellant's petition for relief was not an opinion on the merits. The denial merely stated that appellant's petition failed to show appellant fell within the restitution requirement of section 11483. (1c) (See fn. 4.), (6b) "The denial without opinion of a petition for a writ of mandate or prohibition is not res judicata except when the sole possible ground of denial was on the merits or it affirmatively appears that the denial was intended to be on the merits." (People v. Medina (1972) 6 Cal.3d 484, 491, fn. 6 [99 Cal. Rptr. 630, 492 P.2d 686].)[4]
*956 (1d) In People v. McGee, supra, 19 Cal.3d 948, our Supreme Court determined that the restitution requirement of section 11483 was intended to provide some limited protection for those accused of welfare fraud and that to achieve such protection, a demand is mandatory prior to the initiation of any prosecution. (Id., at pp. 965-966.) "The purposes underlying the demand requirement of section 11483 are: (1) to ensure that enforcement officials make a case-by-case determination of whether the state's interest could be adequately served by obtaining restitution or by also proceeding with criminal prosecution; and (2) to protect defendant by permitting her an opportunity to make restitution in cases where there are mitigating circumstances." (People v. Harper (1981) 121 Cal. App.3d 283, 287 [175 Cal. Rptr. 146].) (2b) Demanding restitution alone is not enough. The prosecutor must then evaluate whether to prosecute based on the circumstances of the particular case, including the nature of the accused's response to the restitution demand. (People v. Sims, supra, 32 Cal.3d 468, 475.)
(7) In the present case, a proper demand for restitution was made. Appellant agreed in writing to repay $100 per month on the 15th of each month, beginning December 15, 1982. On December 3, 1982, the welfare investigator, Sweat, sent a memo to the district attorney's office stating appellant had signed a repayment agreement but had not made any payments as of that date. The memo failed to state that no payment was due until the 15th of December. Although Sweat claims a copy of the reimbursement agreement was sent with the memorandum, it is unclear whether a copy of the reimbursement agreement actually accompanied the memorandum. (See fn. 1, ante.)
The declaration of Kern County Deputy District Attorney Hegeler states that on December 10, 1982, he reviewed the documents concerning appellant and determined a complaint should issue. Hegeler further declared it was his practice "to carefully review every request for a complaint to determine whether to issue a felony, misdemeanor or to determine if a complaint should be issued at all." The complaint was executed on December 13, 1982, sworn by Sweat, and appellant was arrested that date.
Even if the reimbursement agreement was attached to the memorandum sent to the district attorney's office by Sweat, it was impossible for the *957 district attorney, when deciding whether or not to prosecute appellant on December 10, 1982, to consider fully the total circumstances. No payment was due until December 15. The district attorney could not have evaluated all the circumstances of the case, particularly the accused's response to the demand for restitution.[5] Because of the apparent impossibility of the district attorney's having fully considered the circumstances of appellant's case, we reverse.
The judgment of conviction is reversed.
Hamlin, J., and Best, J., concurred.
Respondent's petition for a hearing by the Supreme Court was denied April 18, 1985. Kaus, J., Grodin, J., and Lucas, J., were of the opinion that the petition should be granted.
NOTES
[1]  It is unclear whether the reimbursement agreement was attached to the memorandum sent to the district attorney. The court did not have the memorandum in its file. It marked a copy presented by the district attorney for identification. This copy, however, did not have the reimbursement agreement attached. The declaration of the deputy district attorney stated that he reviewed the documents in determining if a complaint should be issued; the declaration does not state the reimbursement agreement was one of the documents considered.
[2]  Welfare and Institutions Code section 11483 provides in pertinent part: "Whenever any person has, by means of false statement or representation or by impersonation or other fraudulent device, obtained aid for a child not in fact entitled thereto, the person obtaining the aid shall be punished as follows:

".... .... .... .... .... .... .
"When the allegation is limited to failure to report not more than two thousand dollars ($2,000) of income or resources, or the failure to report the presence of an additional person or persons in the household, all actions necessary to secure restitution shall be brought against persons in violation of this section as provided in Sections 12250 and 12850. Such action for restitution may be satisfied by sending a registered letter requesting restitution to the last address at which the person was receiving public assistance."
[3]  The Interstate Agreement on Detainers is codified in Penal Code section 1389. Article IV, subdivision (a), of the agreement provides the means by which the presence of a prisoner in another jurisdiction may be secured when charges are pending in this state. Generally, a California prosecutor need only file a written request for temporary custody of the prisoner. Subdivision (e), however, limits the prosecuting authority by stating: "If trial is not had on any indictment, information or complaint contemplated hereby prior to the prisoner's being returned to the original place of imprisonment pursuant to Article V(e) hereof, such indictment, information or complaint shall not be of any further force or effect, and the court shall enter an order dismissing the same with prejudice."
[4]  Section 11483 requires a prior restitution demand only when the charges are brought because of a failure to report less than $2,000 of income or resources or the presence of an additional person (usually the father) in the household. Appellant's writ was denied because the charges were grounded in part upon appellant's failure to report that her daughter had left her home in March 1982.

Because one of the grounds upon which the charges are based requires a prior restitution demand, such a demand must be made; the People have not contended otherwise.
[5]  The People have not argued that the district attorney considered what he would do if appellant had made timely payments and decided to prosecute anyway, and Hegeler never made such a statement in his declaration. Moreover, even if he had so stated, such a presumptive analysis by the district attorney would be nothing more than a form of "mechanical compliance" which has been condemned by the courts. (People v. Harper, supra, 121 Cal. App.3d 283, 288.)
