The department may deny an application or take disciplinary action against the license of an applicant or a licensee upon the failure of the applicant or licensee to comply with this chapter or with any of the rules adopted by the department. Before the department takes disciplinary action against a license for failure of a license, the department shall notify the licensee in writing of the reason disciplinary action is being considered and shall provide a reasonable amount of time for correction to be made. The notice must be in writing and delivered personally by an inspector of the department or sent by registered or certified mail. Action taken under the authority granted in this section must comply with chapter 28-32.