Section 17. Multiple source drugs listed in the Massachusetts list of interchangeable drug products established pursuant to the provisions of section thirteen of chapter seventeen of the General Laws and regulations adopted thereunder shall not be reimbursable except for the ''Massachusetts maximum allowable cost'', as defined by regulations of the department, unless the division grants prior authorization based upon the provision of written documentation by the practitioner to the division that satisfactorily demonstrates that a recipient's medical condition requires the use of a nongeneric drug and unless the practitioner writes on the face of the prescription in his or her own handwriting the words ''brand name medically necessary'' under the words ''no substitution'' in a manner consistent with applicable state law; provided that a pharmacist dispensing in accordance with this section shall be exempt from the provisions of the fourth paragraph of section twelve D of chapter one hundred and twelve.