Can I take the day after pill post op?

Patient: I had unprotected sex last night (Monday) and I’m having shoulder surgery on Wednesday. I am nervous about taking the day after pill today because I don’t want it to impact my surgery. Can I take the day after pill on Thursday after my surgery? I will also be on hydrocodone.

Doctor: