It has been decided, as I understand it, that if the parents try to deny necessary medical attention then the state can step in and gain temporary custody to make the necessary decisions. Exactly this situation has arisen here more than once and the parents were not allowed to stop the medical attention needed.
What seems to be a gray area is when can the minor child make a decision for themselves. Obviously, it they are adult they can commit suicide by turning down the needed surgery. When they are very young they aren't allowed to make that choice. There has been considerable argument in the years between.