Immediately upon the denial of any application for a license or for a special permit for special services, the state department shall notify the applicant in writing. Within 20 days after the state department mails the notice, the applicant may present his written petition for a hearing to the state department. Upon receipt by the state department of the petition in proper form, such petition shall be set for hearing. The proceedings shall be conducted in accordance with Chapter 5 (commencing with Section 11500) of Part 1 of Division 3 of Title 2 of the Government Code, and the state department has all the powers granted therein.