How to handle doctor's appointments on a day schedule?

I’ve never had a problem with it, but my occupation leads to relaxed job hours. Assuming we are not against a deadline I will typically just tell my boss the day before that I have a doctor/dentist/whatever appointment and will be gone for an hour to two. I will then work late that day to make up for the time I was gone. Obviously this will not work for all jobs, but the idea of talking to your boss will. Most employers are pretty accommodating of making sure their employees stay as healthy as possible (as non healthy employees can lead to days off not just hours off). I know of very few jobs where a system can’t be developed to cover for an employee for an hour or two, but you need to let your boss know now so you can figure out what that system might be.