Noi Liang was sitting on a couch in Geneva, Switzerland, in 2009 flipping through her old medical records when she noticed an unusual letter in the file. The 32-year-old had just moved abroad. A careful planner, Liang had ordered her past medical records so she’d have them overseas, just in case. Now that she had her file, she’d become curious. The particular document that caused Liang to pause—a 15-year-old letter between her gynecologist and the surgeon who had performed what Liang was told was an operation to remove her ovaries when she was 17—was short: The patient is recovering well. As we discussed, I did not reveal the full diagnosis or chromosomal status to the patient.

When she was a teenager, Liang’s doctor explained that Liang wouldn’t be able to have biological children—her uterus was missing, and she had potentially cancerous, “twisted ovaries” that needed to be removed. This letter suggested her doctor had left something out. Liang turned the page and saw a diagram of her 46 chromosomes. The top of the page read “46, XY.” It had been a long time since Liang had taken high school biology, but she remembered enough to know that the genetics of sex came down to two different sets of chromosomes—XX and XY—and that she was staring at the wrong pair.

Liang stood up and walked to a mirror. She examined her body and face, attempting to see what was written in the doctor’s letter—that her chromosomes indicated she was male. Was it her cheekbones? Her small bust? Her height? Liang, a tall, striking woman, never had cause to think about any of this before, to question the legitimacy of her gender identity. Given this new information, could she call herself a woman? What would her husband say? Like most everyone else, Liang had always assumed sex was binary—you were either male or you were female. Turns out, it’s not that simple.

Genetic sex is determined at conception: Most babies are born with 46 chromosomes that are either female (46, XX) or male (46, XY), but early on all fetuses look the same and have the ability to produce male or female reproductive structures. In the seventh or eighth week of pregnancy, if the male Y chromosome is present, an important gene initiates a series of tiny genetic commands that leads to the development of the testes. Those testes then release testosterone, which helps create internal organs, such as the seminal vesicles, and eventually the penis and scrotum. If the Y chromosome is absent and two X chromosomes are present, the body creates female reproductive parts. But a glitch in the series of actions can alter the entire process.

In those cases—medical conditions like Liang’s, known as disorders of sex development (DSDs)—genetic sex doesn’t match the appearance of internal or external anatomy. Most DSDs are the result of sex chromosome abnormalities. About one in 2,000 people are affected by DSDs—approximately 160,500 nationally and 2,700 in Colorado—which makes the disorder about as prevalent as spina bifida and more common than congenital heart defects.

Liang has a particular DSD known as Complete Androgen Insensitivity Syndrome (CAIS). She developed testes as a fetus, but when the testes began emitting testosterone, the receptors that were supposed to read the male hormones were, in a sense, illiterate; in utero, her body didn’t understand that it was supposed to build male genitalia, so it made female external parts instead and the testes never dropped. When Liang was born, although she had male genes, she looked like a baby girl—nothing appeared medically amiss.

As a toddler, Liang went in for hernia surgery, which is when doctors discovered her testes. Years later, when Liang was a teenager and hadn’t had her period, her gynecologist grew concerned. The doctor eventually ordered a karyotype—a picture of her chromosomes. It was that diagram Liang discovered 15 years later in her medical records: She was genetically male, despite having female external body parts and always identifying as a woman.

Back then, Liang’s parents and doctor figured that if Liang was a healthy woman in every other way, why bring it up? But imagine waking up one day and discovering that your chromosomes belong to the opposite sex. “It was so difficult to realize that I’d been lied to, or not told the whole truth,” Liang says. “There was confusion and shock, and anger and sadness. I was upset with my mother at first, but I’m not sure she totally understood what was happening, and I think she did the best she could.”

If Liang had been born three decades later, doctors would have likely handled things differently. In recent years, a small number of children’s hospitals around the country have created multidisciplinary teams to tackle the complex care necessary for kids born with DSDs—everything from slight abnormalities to ambiguous genitalia. Three years ago, doctors opened the SOAR Clinic (Sex development Outcomes—Achieving Results) at Children’s Hospital Colorado on the Anschutz Medical Campus. SOAR was the state’s first multidisciplinary clinic for children with DSDs and today is among the leaders in the field.

When a family arrives at SOAR for its first appointment (parents often find SOAR via doctor referrals), the clinic staff determines which health-care professionals the family might require—a nurse, a geneticist, an endocrinologist, a urologist, a gynecologist, a psychologist. Depending on the type of care a child needs, the multidisciplinary team initially meets with the family as often as every two to four months. The first steps, however, are to address any life-threatening complications and conduct genetic tests; understanding the DSD goes a long way in helping decipher the likelihood of a child identifying as male or female. Then comes the hard part: assigning gender. “It is still common in many hospitals for an endocrinologist to make the sole diagnosis and gender assignment,” says Sharon Travers, a pediatric endocrinologist at SOAR. “Families need all of their doctors working together to support them. Not only for making diagnosis and gender assignments, but to educate and support them through difficult times.”

Doctors have to consider many factors before assigning gender. They begin the process by looking at a child’s karyotype. Then they examine the child’s physical appearance in relation to what’s called the Prader scale—an illustrated chart that shows the spectrum of genitalia appearance. Doctors also view a child’s internal makeup via ultrasound and test the functionality of the reproductive organs. In Liang’s case (46, XY with CAIS), her body was unable to recognize testosterone and she had female external structures, so doctors assigned female gender. If a 46, XY child can recognize testosterone, the assignment may go the other way, depending on the completeness and functionality of the physical reproductive body parts, cultural influences, or parental wishes.

Timing is also a challenging factor. If possible, doctors prefer to assign gender within three weeks of a child’s birth, but that can feel like years to new parents. “It’s one thing to put off relatives and friends who want to know the sex of the baby for 24 hours,” Travers says. “But can you imagine 48 hours? Three days? Three weeks?” And some types of DSDs are easier to assign than others; the certainty of a gender assignment can vary greatly depending on the DSD.

In fact, most children—with or without DSDs—don’t identify as male or female until they’re about two or three years old. For that reason, with inconclusive DSD cases the SOAR team asks parents to consider waiting on surgery that would cosmetically alter a child’s genitals until the child can make the decision. A few decades ago, doctors were quick to perform surgeries that altered babies’ genitalia if their body parts were considered abnormal; this led to a generation of men and women who were incorrectly raised as the opposite gender. “In an ideal world, we wouldn’t give the baby a gender and would let the child figure it out when he or she gets older,” Travers says. “But our society isn’t ready for that. Instead, we try to make the best decision. Then we encourage the families to have an open mind because we may not get it right.”

Five years ago, Liang moved to Colorado from Switzerland to work in the technology industry. But the 38-year-old is even more passionate about what she does with her time outside of work: volunteering at SOAR. Liang stood in the clinic lobby one morning this past spring, smiling at young children as they rolled by in red wagons.

Most families who walk into SOAR have never met an adult with a DSD; at the clinic, parents have a chance to ask those volunteers what the future might look like. “At SOAR, I have the opportunity to be a former patient’s voice,” Liang says. “Giving families access to adults with DSDs is not often practiced here in the States; it’s a subtle reminder that when these kids grow up and become adults, they can live normal, happy lives.”

The clinic staff is trying to find other ways to improve the care SOAR offers. Travers and one of her colleagues, psychologist Cindy Buchanan, are working to create guidelines to help families and their children understand and navigate the complexities of DSDs. They’re also considering research that looks into long-term surgical and gender assignment outcomes—the better the understanding of how different DSDs affect gender identity, the better the chance of assigning the correct one for a newborn baby. And SOAR isn’t the only clinic of its kind across the country. Other facilities—such as the University of Minnesota and the University of California, San Francisco—are using a comprehensive approach like SOAR’s to care for children with DSDs and their families.

For now, Travers’ biggest hope is that SOAR can raise awareness and let people know there are thousands of children out there with DSDs living normal lives. It’s a wish Liang shares as well. “I hope the public will one day understand that biological sex and gender are not binary,” Liang says. “We see this not just in human beings, but in nature and among animals. It’s been this way for thousands of years. We’re all on a spectrum.