This is a massive overreach on the part of the school.
They are only responsible for the child when they are in their environs.
Otherwise the parent is responsible for all aspects of their child's life - including education (they choose to delegate this to the school)
I would absolutely refuse to co-operate with any of this and would be happy to see them in court if it took that.
They are assuming parents are liars, which is not a great way to get parents on board.
It is up to the parents to make the decision of whether a child is well enough for school or not.
If the school has serious concerns about the child they can contact social services and they can take if from there.
I would be contacting the school immediately and letting them know this - but my children's schools soon figured out that I would not tolerate any of this nonsense and that I made the decisions about my children's health - they do not have any rights to be given medical information unless it is necessary for the safety of the children in school (public health type issues) or if I deem it useful.