Recovery from surgery can be quick and relatively painless for some, but a months-long slog for others. Now, researchers say they may be able figure out ahead of time how long a patient will be laid up after an operation, by looking at their immune cells, Live Science reports.

In a new study, researchers scrutinized the activity of a type of immune system cell called a CD14+ monocyte. They found that how active these cells are may determine how long it will be before a patient feels better, according to the study.

The research team took blood samples from 32 patients, ages 50 to 80, before and after hip replacement surgery. The samples were taken one hour before the operation, and then three times afterwards, at one hour, 24 and 72 hours.

The researchers found that when a subset of CD14+ cells were very active, patients seemed to get better faster. CD14+ cells make up only a small part of the cell population in the blood. When some type of trauma occurs, they start sending out chemical signals. It is these chemical markers that appear on blood tests within 24 hours after surgery, according to the study.

In the study, there wasn't any one chemical signal that indicated better recovery, it was a combination of signals that indicated what the cells' activity levels were, the researchers said.

What seems to be happening — although the research hasn't completely proved this— is that some of the cells suppress inflammation, and the more active these cells are, the faster a person recovers, according to the study.