Hollywood could learn a thing or two from medical schools about casting transgender actors in transgender roles.

A study published today in the Journal of Graduate Medical Education is one of the first of its kind to show the benefits of using actual transgender actors to help medical residents grow more comfortable treating transgender people.

Medical schools often use “standardized patients”—actors who have been trained to simulate real patients—in order to help train students, providing them with a low-stakes opportunity to practice providing care.

But because virtually all of these actors are cisgender, too many doctors don’t interact with their first transgender patient until after their education is over.

That’s why Dr. Richard Greene, the director of gender and health education at NYU Langone Medical Center, decided to conduct this new study, hiring a transgender actress as a standardized patient to help train 23 residents. “I noticed that [residents] can sort of smile and nod their way through a lecture or even a seminar and then when a patient shows up, it’s a very different feeling,” Greene told The Daily Beast. “So, I took advantage of the opportunity that we hire actors and said, ‘Why can’t we get a trans actor in here?’ And so we did.” Why not hire a cisgender actor to play a transgender patient?

“Getting cisgender people to play transgender actors is inauthentic and doesn’t come off the same way,” Greene told The Daily Beast.

The actress he and his co-authors hired was trained to present as a transgender woman who was experiencing high blood pressure and high levels of potassium—all while taking both the testosterone-suppressing drug spironolactone and the estrogen estradiol. After each simulated encounter with a resident, she rated them on their communication skills and on how adequately they addressed her transgender status.

The experience proved to be invaluable for the residents, says Greene.

“The opportunity to interact with a transgender patient in a low-stakes setting during medical training increased [their] comfort during future real-world outpatient encounters,” he noted in a press release. “Even those who had baseline knowledge of care for transgender patients before the study found that learning in this safe, simulated way added value in helping them provide more sensitive care for transgender patients.”

Overall, the transgender actress gave the residents good scores on communication (89 percent) and patient satisfaction (85 percent).

However, many of the residents did not openly address the fact that the patient was transgender, with only 14 of the 23 asking about it directly.

But this shortcoming, the study notes, gave faculty the opportunity to give the residents feedback, helping them “identify learning needs, including how to ask directly about transition, appropriate terminology, how to admit lack of knowledge to a patient, and putting aside preconceptions about a patient’s identity.”

If anything, the minor slip-ups the residents made only proved “the importance of including a transgender case” in medical training, as the study noted. And it’s especially critical, says Greene, for medical students to overcome their fear of making mistakes in a safe environment.

“This is a low-stakes way for them to have an opportunity to talk to a trans patient, to stumble over their words, to stay the wrong thing and apologize, and realize that it’s really not so scary,” he told The Daily Beast. “For a bunch of perfectionists and Type A people in medicine, it can be a really scary moment to do something you’re unfamiliar with.”

The particular challenge the residents faced in this scenario was to sensitively address the patient’s gender identity without fixating on it. One-third of transgender respondents to the U.S. Trans Survey have reported having a negative experience with a health care provider in the last year. So it’s important, says Greene, for physicians to put transgender patients at ease without making them feel othered—a sometimes fine line that is best learned through experience.

“The pitfall in this case is to only address the hypertension [high blood pressure] and to completely ignore the patient’s gender identity or to go completely in the other direction and make everything about the patient being trans and not focus at all on the medical issues,” Greene explained to The Daily Beast.

For example, in this case, the patient’s spironolactone was the obvious culprit for her high potassium levels. And although most residents, Greene told The Daily Beast, did not fall into the “trap” of telling her to stop her medically necessary hormone therapy outright in order to lower the patient’s potassium levels, not enough of them directly made the patient feel comfortable talking about being transgender.

Some tiptoed around the issue for fear of offending, addressing her symptoms in isolation. This avoidance can make transgender patients feel misunderstood.

As Greene told The Daily Beast, “The goal is to not leave patients feeling that hole in their care but to have [the physician] say, ‘Talk to me a little bit about your hormones.’”

Hiring transgender standardized patients is just one way to help fill the gaps in medical education around transgender issues.

Despite the fact that transition-related medical care is supported by virtually every major medical association, many medical schools still don’t cover it on their curriculum. But while medical schools work to update their curricula, there is no substitute, says Greene, for this valuable hands-on experience.

That’s why Greene is especially proud of the fact that, in addition to this new study, “every first year medical student in NYU School of Medicine this year went through an OSCE [objective structured clinical examination] where they met a trans patient.”

“Starting now,” he told The Daily Beast, “no one who graduates from NYU School of Medicine can ever say, ‘No, I never met a trans patient while I was in training.’”