The Compassionate Use Act of 1996 (Health & Saf. Code, sec. 11362.5, subd. (d)) does not confer a “complete” immunity from prosecution. However, in light of its language and purpose, it grants a limited immunity which not only allows a defendant to raise the medical marijuana defense at trial, but also permits a defendant to raise his status as a patient or caregiver by moving to set aside an indictment or information prior to trial. Further, the burden of proof as to the facts underlying the defense may and should be allocated to a defendant, but the defendant is only required to raise a reasonable doubt as to those facts, rather than to prove them by a preponderance of the evidence. Therefore, here, where the trial court instructed the jury that it was the defendant’s burden to prove the defense, reversal was required.