I can sympathise. I work in a technical engineering department, and in my own employment can see that it wouldn't take much for my employer to get formal about attendance too.
There's a couple of things I always do. I always make sure that my Nurse, GP, or anyone else I have an appointment with know that I can't take time out during the middle of the working day. So I make appointments for first thing in a morning, or last thing in the afternoon. They are the less intrusive times of the day, and so far so good.
I always offer to make up my time. Sometimes it's expected, other times my boss will tell me that it doesn't matter. But I've found that it's better to make the offer than just to expect to get the time off. I have also used holiday days to cover for longer appointments.
If you are seen to be going above and beyond in order to compensate for the time you are taking off, then there's not a jot that they can do about disciplining you.