Physicians are O-3's at the completion of medical school. They are promoted to O-4 once they have been out of medical school for 6 years. These are basically automatic promotions regardless if any or all of your training was in the military, subsidized by the military, or civilian.
From the minute you graduate medical school, you start what the military calls "Creditable Service". This time is what counts for your promotions mentioned above as well as some of the physician special pay. Promotions above the O-4 level are not automatic and require you to actually jump through hoops.
Time in Service only accumulates while you are on Active Duty, Reserve or National Guard service, and during your Active Duty medical school rotations for HPSP students. Sometimes if you were already in the military prior to going to medical school (on HPSP program), you will erroneously be given credit for the time you're in med school as Time in Service. This will make your paychecks much nicer, but...A word of caution...They will eventually catch this and take all of the extra money back from you. Which means that you could go months with little pay. It's better to bring it to their attention if they screw up. I speak from experience because the exact thing happened to me.
I'm not completely sure if this changes with ROTC, but I'd be willing to bet that it's the same. I'd check with whoever handles your administrative details...Physician Education/Deferment Office in the Air Force. There should be an equivalent office in the Army. At least they can point you towards someone that may know for sure.