Notwithstanding any other provision of law, a physician may prescribe or administer controlled substances to a patient in the course of the physician’s treatment of the patient for pain. A physician shall keep records of purchases and disposals of controlled substances prescribed or administered under this section. The records must include the date of purchase, the date of sale or administration by the physician, the name and address of the patient, and the reason for the prescribing or the administering of the substances to the patient.