A doctor's note is not controlling on an employer; they can honor it or not as they wish. Therefore, unless you used PTO (vacation time or sick days or such time was covered by the FMLA or ADA) to cover your absence, then you can be written up for being out. That is unless this action violates the terms of a union agreement or employment contract or constitutes some form of legally actionable discrimination. Otherwise, as an "at will" worker, your employer can set the conditions of work much as it sees fit.