THere " might" be language in the order to effect moms custody begins Wed at end of school day but I doubt it. Something is missing and it's more than unusual to get child involved if she wants to go with mom..the more usual bureaucratic obfuscation is to send custody letter to solicitor for reciew ...and do whatever punt fits in meantime. And a restraining order very likely gets sent to solicitor if there is any doubt at all as to what it means
, the local principal rarely wants to be in middle of these issues .
IN theory it would be nice to schedule Dr s appointments after school but that's not always practical .
IF the school routinely permits parent / guardian to take/ sign out child out of school for Dr s appointments then I just gotta bet something else is going on and or the CP is in backdoor to this issue or OP "forgot " to post some key details
OP as an aside, on the proper day , sort thru the,school policy as to access to ALL your child's records and files and go examine them..make a good log of what's there, photo log if possible....