Which one do I go by?

Okay so I have 2 different apps that track my periods, fertility, and log everything. Glow goes by my average logs which is normally about a 42 day cycle, however, the other app goes by a normal 28 day cycle. I just recently started taking medicine to try to regulate me to a 28 day cycle, I've done 2 rounds of it. I have also taken a round of clomid to help me ovulate. So technically I should be on a 28 day cycle now, and my doctor said to go by the 28 day cycle. So my question is, should I go by the 28 day cycle? Because if so I am on day 22 and my period is supposed to be expected next Tuesday. I need to know when to start taking pregnancy test for 1, and for 2 I'm scheduled for surgery next Monday and I will be sedated and I know it's dangerous for the baby, so even if I do take a pregnancy test and it comes up positive, I need to know is it still ok to have the surgery because it's so early in pregnancy or should I find out before surgery and cancel if it's positive. My nurse said I should be fine either way. Honestly I'm just impatient as hell and want to know if this medicine worked and if I'm going to get my miracle baby.