With digital traps in hospitals, there’s no need for personal injury lawyers to chase ambulances these days.

Law firms are using geofencing in hospital emergency rooms to target advertisements to patients’ mobile devices as they seek medical care, according to Philadelphia public radio station WHYY. Geofencing can essentially create a digital perimeter around certain locations and target location-aware devices within the borders of those locations. Patients who unwittingly jump that digital fence may see targeted ads for more than a month, and on multiple devices, the outlet notes.

While the reality may seem like a creepy nuisance to some, privacy experts are raising alarms.

"Private medical information should not be exploited in this way," Massachusetts Attorney General Maura Healey told WHYY. "Especially when it's gathered secretly without a consumer's knowledge—without knowledge or consent."

Last year, Healey’s office barred a digital firm from using geofencing in healthcare settings in the state after the firm was hired by a Christian pregnancy counseling and adoption agency to use digital perimeters to target ads to anyone who entered reproductive health facilities, including Planned Parenthood clinics. The goal was to make sure “abortion-minded women” saw certain ads on their mobile devices as they sat in waiting rooms. The ads had text such as “Pregnancy Help” or “You Have Choices,” which, if clicked, would direct them to information about abortion alternatives.

Healey equated the move to digital harassment and successfully claimed that it violated the state’s consumer protection act.

Still, the use of geofencing in hospitals for marketing is not necessarily illegal overall, and law firms and marketing agencies remain eager to put up their fences. Healthcare-related geo-targeting is occurring across the country, including in Tennessee and California. Bill Kakis, who runs the New York-based marketing firm Tell All Digital, told WHYY it was one of the fastest-growing parts of his business. He was recently hired by personal injury law firms in the Philadelphia area to target patients, for instance.

"Is everybody in an emergency room going to need an attorney? Absolutely not," Kakis said. "But people that are going to need a personal injury attorney are more than likely at some point going to end up in an emergency room."

Still, patients don’t seem pleased with the strategy. Joe Finnegan, of Northeast Philadelphia, recently had a hospital appointment in the area. He told the news outlet that he'd be furious if he got ads tied to his visit. "It's supposed to be your privacy as a patient," Finnegan said.