North Texas Medical Center decided to switch the contracted physician group that staffed its emergency department in 2015, seeking better service and quality.

The rural hospital had long been outsourcing its ED operations primarily because it has struggled to recruit and retain doctors. It is one of an estimated 4,000 U.S. hospitals that outsource their EDs, many of which routinely shop around for better options

“It’s hard to recruit folks to rural areas. Having a provider group with a large panel gives us peace of mind that we will always have a provider available,” said Tom Sledge, CEO of North Texas Medical Center, adding that the Gainesville hospital’s volumes and finances have rebounded over the past couple of years. “We might need to add an extra provider, but rather than bring in a locum tenens firm, we have the ability to ring (Concord Medical Group) up and say we need an extra provider without that additional locums cost.”

In addition to the recruitment boost, contracting out ED operations has remained a popular practice given the financial risk of providing emergency care for the uninsured and underinsured, the costly overhead and the liability. That can amount to significant losses. Oftentimes, the contracted group will take on a portion of patients’ bad debt, limiting the hospital’s risk.

Many hospitals would rather spend money and resources on primary-care doctors who could refer patients to the hospital and grow market share, said Brian Tanquilut, a healthcare equity analyst with Jefferies.

But with the emergence of surprise billing as a national problem, arranging ED outsourcing relationships is trickier. One of the biggest reasons hospitals have shuffled contracted physician groups is because of surprise billing, which happens when patients unexpectedly receive a large bill for an out-of-network provider, Tanquilut said. The practice exposes patients to balance billing, or the difference between the provider’s undiscounted charge and what the health plan agrees to pay. The issue—centered around some emergency physician staffing firms—has sparked related legislation that aims to cap out-of-network payments and patients’ out-of-pocket costs.

“You don’t have full control of what they do in terms of contracting,” Tanquilut said. “On one hand you can argue that a lot of contracts already have a provision that the provider has to be in-network, but the reality is that some of these doctors don’t necessarily abide by it—they go out of network for leverage and to get better rates. Then they can balance-bill, and the hospital has a PR problem.”