A patient who has requested release or an individual who is the subject of a petition for treatment has the right to refuse medication and other forms of treatment before the preliminary or treatment hearing. However, a physician, a physician assistant, or an advanced practice registered nurse may prescribe medication or a less restrictive alternative if it is necessary to prevent bodily harm to the respondent or others or to prevent imminent deterioration of the respondent's physical or mental condition. The patient has the right to be free of the effects of medication at the preliminary or treatment hearing by discontinuance of medication no later than twenty-four hours before the hearing unless, in the opinion of the prescriber, the need for the medication still exists or discontinuation would hamper the respondent's preparation for and participation in the proceedings.
N.D.C.C. § 25-03.1-16