1. Except as otherwise provided in this section, a person who violates a provision of section 155A.23 or who sells or offers for sale, gives away, or administers to another person any prescription drug or device in violation of this chapter commits a public offense and shall be punished as follows:

 a. If the prescription drug is a controlled substance, the person shall be punished pursuant to section 124.401, subsection 1, and other provisions of chapter 124, subchapter IV.
 b. If the prescription drug is not a controlled substance, the person, upon conviction of a first offense, is guilty of a serious misdemeanor. For a second offense, or if in case of a first offense the offender previously has been convicted of any violation of the laws of the United States or of any state, territory, or district thereof relating to prescription drugs or devices, the offender is guilty of an aggravated misdemeanor. For a third or subsequent offense or if in the case of a second offense the offender previously has been convicted two or more times in the aggregate of any violation of the laws of the United States or of any state, territory, or district thereof relating to prescription drugs or devices, the offender is guilty of a class “D” felony.
 2. A person who violates any provision of this chapter by selling, giving away, or administering any prescription drug or device to a minor is guilty of a class “C” felony.
 3. A wholesaler who, with intent to defraud or deceive, fails to deliver to another person, when required by rules of the board, complete and accurate pedigree concerning a drug prior to transferring the drug to another person is guilty of a class “C” felony.
 4. A wholesaler who, with intent to defraud or deceive, fails to acquire, when required by rules of the board, complete and accurate pedigree concerning a drug prior to obtaining the drug from another person is guilty of a class “C” felony.
 5. A wholesaler who knowingly destroys, alters, conceals, or fails to maintain, as required by rules of the board, complete and accurate pedigree concerning any drug in the person’s possession is guilty of a class “C” felony.
 6. A wholesaler who is in possession of pedigree documents required by rules of the board, and who knowingly fails to authenticate the matters contained in the documents as required, and who nevertheless distributes or attempts to further distribute drugs is guilty of a class “C” felony.
 7. A wholesaler who, with intent to defraud or deceive, falsely swears or certifies that the person has authenticated any documents related to the wholesale distribution of drugs or devices is guilty of a class “C” felony.
 8. A wholesaler who knowingly forges, counterfeits, or falsely creates any pedigree, who falsely represents any factual matter contained in any pedigree, or who knowingly fails to record material information required to be recorded in a pedigree is guilty of a class “C” felony.
 9. A wholesaler who knowingly purchases or receives drugs or devices from a person not authorized to distribute drugs or devices in wholesale distribution is guilty of a class “C” felony.
 10. A wholesaler who knowingly sells, barters, brokers, or transfers a drug or device to a person not authorized to purchase the drug or device under the jurisdiction in which the person receives the drug or device in a wholesale distribution is guilty of a class “C” felony.
 11. A person who knowingly manufacturers, sells, or delivers, or who possesses with intent to sell or deliver, a counterfeit, misbranded, or adulterated drug or device is guilty of the following:

 a. If the person manufactures or produces a counterfeit, misbranded, or adulterated drug or device; or if the quantity of a counterfeit, misbranded, or adulterated drug or device being sold, delivered, or possessed with intent to sell or deliver exceeds one thousand units or dosages; or if the violation is a third or subsequent violation of this subsection, the person is guilty of a class “C” felony.
 b. If the quantity of a counterfeit, misbranded, or adulterated drug or device being sold, delivered, or possessed with intent to sell or deliver exceeds one hundred units or dosages but does not exceed one thousand units or dosages; or if the violation is a second or subsequent violation of this subsection, the person is guilty of a class “D” felony.
 c. All other violations of this subsection shall constitute an aggravated misdemeanor.
 12. A person who knowingly forges, counterfeits, or falsely creates any label for a drug or device or who falsely represents any factual matter contained on any label of a drug or device is guilty of a class “C” felony.
 13. A person who knowingly possesses, purchases, or brings into the state a counterfeit, misbranded, or adulterated drug or device is guilty of the following:

 a. If the quantity of a counterfeit, misbranded, or adulterated drug or device being possessed, purchased, or brought into the state exceeds one hundred units or dosages; or if the violation is a second or subsequent violation of this subsection, the person is guilty of a class “D” felony.
 b. All other violations of this subsection shall constitute an aggravated misdemeanor.
 14. This section does not prevent a licensed practitioner of medicine, dentistry, podiatry, nursing, psychology, veterinary medicine, optometry, or pharmacy from acts necessary in the ethical and legal performance of the practitioner’s profession.
 15. Subsections 1 and 2 shall not apply to a parent or legal guardian administering, in good faith, a prescription drug or device to a child of the parent or a child for whom the individual is designated a legal guardian.