Story highlights Prosecutor: Kwiatkowski, who has the virus, stole syringes of painkillers from patients

Kwiatkowski then injected himself, filled the syringes with saline and replaced them

He is suspected in the outbreak that sickened 30 people with hepatitis C

Court documents: Kwiatkowski admitted to swapping syringes in Georgia and Kansas

David Kwiatkowski , a hospital worker accused of causing a multi-state outbreak of hepatitis C last year, will plead guilty to all 14 charges in exchange for a prison term of 30 to 40 years.

Kwiatkowski agreed to plead guilty to seven counts of tampering with a consumer product and seven counts of obtaining controlled substances by fraud, according to a plea agreement filed Monday.

The outbreak sickened 30 people with hepatitis C, a sometimes-fatal virus that attacks the liver.

How did this happen?

Ten months after he was diagnosed with hepatitis C, Kwiatkowski began working at New Hampshire's Exeter Hospital in April 2011.

Investigators said Kwiatkowski stole syringes of the painkiller fentanyl from patients who were scheduled for surgery.

"Kwiatkowski used the stolen syringes to inject himself, causing them to become tainted with his infected blood, before filling them with saline and then replacing them for use in the medical procedure," the U.S. attorney's office in Concord, New Hampshire, said in a statement.

"Consequently, instead of receiving the prescribed dose of fentanyl, patients instead received saline tainted by Kwiatkowski's infected blood."

According to the plea agreement, Kwiatkowski told an investigator, "I'm going to kill a lot of people out of this."

Offenses across the country

Before moving to New Hampshire, Kwiatkowski worked as a traveling medical technician for hospitals in Arizona, Georgia, Kansas, Maryland, Michigan, New York and Pennsylvania, officials in those states said.

"The defendant admitted that he diverted drugs in a similar way at Houston Medical Center in Georgia and Hays Medical Center in Kansas," the plea agreement states. "He estimated that he swapped syringes at least 20 times in Kansas and approximately 30 times in Georgia.

But if a New Hampshire court accepts Kwiatkowski's plea deal, he can avoid federal criminal charges in Kansas, Maryland and Georgia, the plea agreement states.

Fired in Arizona

Kwiatkowski was fired from an Arizona hospital in 2010 after a fellow employee found him passed out in the men's room with a syringe floating in the toilet, according to documents obtained by CNN. A spokeswoman for the Arizona Heart Hospital said Kwiatkowski was immediately fired, and he relinquished his license as a radiologic technologist.

The agency that placed Kwiatkowski in the Arizona job had reported the incident to the American Registry of Radiologic Technologists, according to a spokeswoman for the agency, Springboard, Inc.

But a few weeks later, he was working at Temple University Hospital in Pennsylvania, and then went on to work in Kansas and Georgia before moving to New Hampshire.