A gastrointestinal outbreak has forced the cancellation of some surgeries at Mississauga's Credit Valley Hospital, and visitor access has also been restricted.

The hospital said it is taking the precautions to prevent the spread of the gastrointestinal illness, which is often called the stomach flu.

"Because the inability to guarantee scheduled surgical patients a bed for recovery, the hospital has already cancelled some scheduled surgeries and is putting other surgical patients on notice that their surgery may be postponed, " read a statement from the hospital on Wednesday.

Some cancer surgeries have also been postponed. The hospital said it can't discharge patients who would ordinarily return to nursing homes because of the risk of taking the infection with them.

"It's causing outbreaks in nursing homes, long-term care facilities and individual homes," Dr. Alicia Sarabia told CTV Toronto.

Visitor access has been restricted at the two nursing units experiencing the outbreak, the hospital said, but visitors are allowed in the other areas of the facility.

Gastrointestinal illnesses are passed in the stool and vomit of infected persons. Proper hand hygiene is imperative to prevent the spread of the illness, the hospital said.

"It takes several days to confirm that a patient has gastrointestinal illness, " the statement read. "While the diagnosis is being determined, the patients are kept in isolation and staff and physicians coming in contact with the patients must wear gloves and gowns to protect themselves and others from spreading infection outside the patient's room."

With a report from CTV Toronto's Roger Petersen