As the administration of President Donald Trump gears up to hold more migrants in detention facilities for longer periods of times, health care and medical professionals are raising concerns and proposing changes to the way federal agencies provide medical treatment to immigrant detainees.

Dr. Paul Spiegel, director of the Center for Humanitarian Health at Johns Hopkins, argued in a commentary piece published Friday in the Journal of the American Medical Association (JAMA) that the way in which the government provides health care services to migrants who have been detained goes against the oath physicians take to make patients’ well-being their top priority.

“The mission of DHS is security, but oftentimes health decisions are not made by physicians,” Spiegel told NBC News. "What can be done when the standards of health care are not being met?”

Spiegel’s concerns started brewing after seeing job postings from the Department of Homeland Security, and the immigration agencies it oversees, seeking physicians who were willing to provide care at their detention centers.

He recalled that the job descriptions required physicians to “follow the spirit of the organization,” making him wonder why "doctors were not being asked to put patients first."

In his research, Spiegel found that all DHS employees, consultants and subcontractors are required to sign nondisclosure agreements that are quite strict and clearly state that if violated, the person could be subject to "administrative, disciplinary, civil or criminal action."

In his article, Spiegel proposed three changes:

Hire independent health care providers who do not report to the U.S. government or to companies that report to the government.

Form an independent oversight commission to serve as an external monitor and that has unrestricted access to detention centers in order to monitor all aspects of health services provided in facilities run by DHS as well was the Department of Health and Human Services and the Office of Refugee Resettlement and ensure that appropriate standards are being met.

Require immigration agencies to regularly report how they are living up to the agencies' own standard of care as well as international standards. Such reports should be provided to the independent oversight commission and made public.

"We’re proposing to not put health care providers in a position where they won’t be able to speak out," Spiegel said. “This is a difficult ethics dilemma. That’s why we ask agencies to not put physicians in these situations.”

Nearly 700,000 migrants have been apprehended at the southwest border and placed in detention centers by Customs and Border Protection, also known as CBP, since January, when a growing number of migrant families started to present themselves at the border seeking asylum.

Attorneys, human rights groups and health care professionals have called conditions in detention camps "appalling," saying they are overcrowded and unsanitary and have insufficient medical care.

Concerns have grown after the deaths of least seven children while in immigration custody under the Trump administration.

At least three of the children died of infectious diseases, such as the flu, over the last year.

CBP told NBC News in a statement that it doesn't routinely administer vaccines against infectious diseases such as the flu, chickenpox and measles, "due to the short-term nature of CBP holding and the complexities of operating vaccination programs" — even though the agency "counts approximately 200 medical personnel engaged along the southwest border."

Spiegel said that "what they’re saying doesn’t make sense from a public health point of view because even if a child is there for 72 hours, it's better to vaccinate them sooner rather than later. And with 200 health care providers, they should be able to do so with no problem."

Follow NBC Latino on Facebook, Twitter and Instagram.