When it comes to medical decisions, it's important to remember that there are two main parts to child custody: legal custody and physical custody. They're very different, and you should never assume that having one means you have the other.
As the name implies, physical custody is tied to the child's living situation. Legal custody connects to life decisions like where the child will go to school or when and where the child will get medical care.
These can be divided, and both sides don't have to be divided equally.
For instance, your ex may get physical custody because he or she has a much more stable living situation. The child will clearly be better off living there, where he or she can stay in the same school and have a safe, consistent place to call home.
You haven't done anything wrong, though, and you could still be given legal custody. This means you get to weigh in on those important decisions. If your child gets a serious disease, for example, your spouse can't just start making medical choices without consulting you, even though the child is living under his or her roof.
Obviously, in emergency situations, decisions may need to be made quickly. The majority of medical care, including things like simple annual checkups, is done with time to think over all of the options and really consider what is best for the child. With joint legal custody, both parents need to be involved in that process.
This shows just how crucial it is for each parent to know his or her rights after a divorce, and to never make assumptions along the way.
Source: The Informed Parent, "Who Makes Medical Decisions After The Divorce," Peter W. Welty, accessed Sep. 11, 2017