Emergency personnel wait at Orlando Regional Medical Center for the arrival of patients from the shooting at Pulse nightclub on Sunday. (Phelan M. Ebenhack/AP)

While following the news Sunday of the devastating shooting at an Orlando nightclub you may have heard that the city mayor's office took some action related to HIPAA. What, you probably wondered, does this have to do with the shooting?

HIPAA stands for the Health Insurance Portability and Accountability Act. Passed in 1996, it is one of the most important laws in our country protecting our privacy. It restricts health care providers from sharing medical information with anyone but the patient unless the patient explicitly gives permission.

Under normal circumstances, this puts all the power in the hands of individuals and makes a lot of sense. But in a time of crisis, HIPPA can be a hindrance. That's because if a person is incapacitated and can't make his or her wishes known, doctors, hospitals and other health-care groups are asked to use their professional discretion in revealing their patients'  information to others, and usually that means talking only to a spouse or next of kin. But what if a person doesn't have a spouse or relative close by?

The issue is especially important for the gay community, which was the target of the overnight attack on Sunday.

While the U.S. Supreme Court declared same-sex marriage legal in all 50 states, there has been resistance in some jurisdictions. In Mississippi, some lawmakers have been trying to stop the passage of laws that would stop discrimination against lesbian, gay and bisexual people. In Kentucky, county clerk Kim Davis was jailed for refusing to issue marriage licenses to gay couples.

In the chaos of the tragedy in Orlando, as hospitals began to fill up with victims, it became clear that many of those waiting outside and desperate for news about their loved ones did not have any blood or legal relationship with them. That put doctors in the tricky position of having to decide whether to release anything beyond publicly available "directory" information -- that the patient is being treated and that his or her general condition is "stable," "critical" or otherwise.

Orlando Mayor Buddy Dyer announced Monday morning that he had tried to get clarification in an unusual way — by seeking a  HIPPA waiver by the White House to Orlando Regional Medical Center, the area's only level 1 trauma hospital, where many of the victims were being treated. This was possible because there's a clause in the law that allows the secretary of health and human services to waive portions in certain exceptional situations.

"The CEO of [a] hospital came to me and said they had an issue related to the families who came to the emergency room. Because of HIPAA regulations, they could not give them any information," Dyer said, according to NewsChannel 10.

The White House didn't end up issuing a waiver because officials said it wasn't necessary.  The Department of Health and Human Services issued this clarification about the law:

HIPAA allows health care professionals the flexibility to disclose limited health information to the public or media in appropriate circumstances. These disclosures, which are made when it is determined to be in the best interest of a patient, are permissible without a waiver to help identify incapacitated patients, or to locate family members of patients to share information about their condition. Disclosures are permissible to same sex, as well as opposite sex, partners.

The request by Dyer was nonetheless an important victory for gay rights. In using the language he did during the news conference, he was implicitly recognizing that family has a broader meaning than blood relative. And that prompted the federal government to give health care workers in Orlando the cover some needed to be able to communicate with some loved ones of victims who might otherwise been kept out of the loop.

Hayley Gorenberg, deputy legal director of Lambda Legal, a national  civil-rights group based in New York, explained in an interview that in the lesbian, gay, bisexual and transgender community "there are many people who don't have formalized legal connections to others who have been their family for decades and decades."

While same-sex marriage may be official on the books, she said, there is still a long way to go before there is true marriage equality in the United States. "The weight of discrimination over years still has deep impact," she said.

That fact that many of the victims in Sunday's tragedy identify as gay has created additional layers of sensitivity and complexity in how local officials and health care providers are responding to the crisis. Another issue, Gorenberg said, is that it is "highly likely that many people who were injured or killed, now that names may be released, may be outed to family or other people in their lives who were not aware of their sexual orientation." Grieving relatives might accept the revelation in a positive way, or they might not — possibly compounding the grief felt by friends and significant others.

"It’s understandable that information might need to flow in different ways because people have been walled out of traditional respected family structures for so long," Gorenberg said.

In the case of Eddie Sotomayer Jr., a brand manager for a gay travel company, the hospital allowed his close friends to go to the hospital with other family members to hear information about whether he was on the list of people being treated. Orlando officials have since confirmed that Sotomayer is among the deceased.

Revealing health information to non-family members is not without its critics, and even supporters cautioned that it can be tricky to determine whether a person asking for information is truly someone the patient would want to be involved in their health care decisions.

"There is always reasonable professional discretion," Kirk Nahra, an attorney specializing in health care, told Politico. "At the same time you would obviously need to be careful, since you have to have some real idea that it's family. Some guy from TMZ could call and say, 'Tell me about my son.'"

President Obama has been a champion for equal rights for same-sex couples. In 2010, after a judge reluctantly dismissed a case in Miami against a hospital by Janice Langbehn, who had been denied visitation with her female life partner who collapsed while on vacation, the president issued an executive memo ordering the Department of Health and Human Services to address the issue of hospital visitation for same-sex couples.

In November 2010, Health and Human Services did just that, prohibiting hospitals from discriminating against visitation rights based on sexual orientation and gender identity.

Clarification: This post was previously written based on information provided by the Orlando mayor's office that a HIPPA waiver had been granted. The Department of Health and Human Service has since clarified that no waiver was necessary. The story has been updated.

Read more:

In Orlando, an agonizing wait as shooting victims’ names are slowly released

Casualties of America’s worst mass shooting: Orlando nightclub shooting victims

The controversy over whether gay men should be able to donate blood after Orlando shooting