(a) Except when dispensed directly by a practitioner, other than a pharmacy, to an ultimate user, no controlled substance in Schedule II may be dispensed without the lawful prescription of a practitioner.
(b) In emergency situations, as defined by rule of the said appropriate department, board or agency, Schedule II drugs may be dispensed upon oral prescription of a practitioner, reduced promptly to writing and filed by the pharmacy. Prescription shall be retained in conformity with the requirements of section three hundred six of this article. No prescription for a Schedule II substance may be refilled.
(c) Except when dispensed directly by a practitioner, other than a pharmacy, to an ultimate user, a controlled substance included in Schedule III or IV, which is a prescription drug as determined under appropriate state or federal statute, shall not be dispensed without a lawful prescription of a practitioner. The prescription shall not be filled or refilled more than six months after the date thereof or be refilled more than five times unless renewed by the practitioner.
(d) (1) A controlled substance included in Schedule V shall not be distributed or dispensed other than for a medicinal purpose: Provided, That buprenorphine shall be dispensed only by prescription pursuant to subsections (a), (b) and (c) of this section: Provided, however, That the controlled substances included in subsection (e), section two hundred twelve, article two of this chapter shall be dispensed, sold or distributed only by a physician, in a pharmacy by a pharmacist or pharmacy technician, or health care professional.
(2) If the substance described in subsection (e), section two hundred twelve, article two of this chapter is dispensed, sold or distributed in a pharmacy:
(A) The substance shall be dispensed, sold or distributed only by a pharmacist or a pharmacy technician; and
(B) Any person purchasing, receiving or otherwise acquiring any such substance shall produce a photographic identification issued by a state or federal governmental entity reflecting his or her date of birth.