An assisted living facility in Mississippi must face trial on a nurse’s claim that it failed to take action when a mentally ill patient repeatedly sexually harassed her and other staff.

The June 29 ruling addresses the challenging issue of when an employer may be held liable to a worker for harassment by a nonemployee whose mental capacities are diminished. While the “unique nature” of health care and certain other workplaces is an important factor in deciding whether unlawful harassment...