Not unless they have a signed waiver by you or your spouse. It may be in paperwork summited at the beginning of school. Otherwise this is a big HIPPA violation.
The school should at least call you to see if you could provide proof of her medical record. Why did they not do this? Per the state, I believe each child needs to be at school X number of days in a year. The medical record could be her only way around the state regulation. hence the reason for the school’s inquiry. But why not call the parent?
I am also impressed that your daughter would know off the top of her head her MYCHART sign in and password.