A. No person shall be prosecuted under § 18.2-250 or § 18.2-250.1 for the possession of marijuana or tetrahydrocannabinol when that possession occurs pursuant to a valid prescription issued by a medical doctor in the course of his professional practice for treatment of cancer or glaucoma.

B. No medical doctor shall be prosecuted under § 18.2-248 or § 18.2-248.1 for dispensing or distributing marijuana or tetrahydrocannabinol for medical purposes when such action occurs in the course of his professional practice for treatment of cancer or glaucoma.

C. No pharmacist shall be prosecuted under §§ 18.2-248 to 18.2-248.1 for dispensing or distributing marijuana or tetrahydrocannabinol to any person who holds a valid prescription of a medical doctor for such substance issued in the course of such doctor’s professional practice for treatment of cancer or glaucoma.