The problems range from shackling patients to beds and not permitting them to use restrooms to pressuring doctors to discharge patients quickly and certify that they can be held in crowded detention facilities that immigration officials themselves say are unsafe. Physicians say that needed follow-up care for long-term detainees is often neglected, and that they have been prevented from informing family members about the status of critically ill patients. Agency vehicles parked conspicuously near hospital entrances, health providers say, are also stoking fear and interfering with broader immigrant care.

Doctors typically do not know what rights they might have to challenge these practices. At Banner and several other hospital systems across the country, they have called on administrators to oppose and change security measures that they view as endangering health.

In many cases, doctors say, their patients are newly arrived asylum seekers, like the Guatemalan woman in Tucson, who had fled violent abuse from her baby’s father back home. Such patients, who are in custody only because of their immigration status, are often subjected to security measures meant for prisoners charged with serious crimes. (In her case, medical providers at the hospital persuaded officials to allow her to be discharged to a respite center run by the Casa Alitas program of Catholic Community Services.)

“Doctors, who have a moral and ethical obligation and duty to care for patients, are actively being prevented from carrying out the practice of medicine as they’ve been trained to practice it,” said Kathryn Hampton, a program officer for Physicians for Human Rights, a nonprofit advocacy group. In a new report, the group documents a range of cases in which it said optimal health care was compromised by stepped-up immigration security.

Representatives for the two main agencies responsible for detaining migrants — Customs and Border Protection, on the border, and Immigration and Customs Enforcement, which oversees longer-term detention — declined to discuss the issue. They referred to their written standards for the supervision of detainees taken to community medical facilities. In C.B.P.’s case, the standards state that at least one agent should accompany detainees and, if the patient is hospitalized, “follow their operational office’s policies and procedures.”