Work and baby doc appointments

I work as a correctional officer and have been with this company for two years!! Have been on overtime constant for a year. I have been getting my appointments schedule around work except for this one time they were so booked so it fell on an overtime day. I went to my LT and he said I better come to work but there is no possible way I told him! I work nights my appt is @9:15am and I work the night before plus I have to drive and hour to the doc! He said if I don't come he will try everything in his power to write me up or possible termination!! How can he do this??? Is there some type of protection for this?? My opinion it's crazy I'm not gonna miss my appointment just because he feels like I should! Also keep in mind this is a charity hospital so waits are extremely long