School attendance rules

Ch

I've heard of parents being hauled into court for their child's trunacy (low attendance).

What can be done to protect kids health at school and ensure parents are prioritizing their education?

Any educators have any insight? Or parents who have dealt with backlash for keeping kids home?

ETA: what about parents who can't afford to take kids to the Dr every time they keep them out of school?