A former Parvo puppy patient at the Austin Pets Alive! Parvo ICU

The Last 10%: Using Data Science to Save Parvo Puppies in Animal Shelters

Kevin Horecka
Horecka Research

--

Shelter medicine in the United States has been operating under many of the same parameters and assumptions for decades, with more recent movements to attempt to stop the practice of killing animals unnecessarily in shelters (with the definition of “necessary” being the topic of substantial debate). There are many critical causes pointed to by shelters which euthanize animals en mass including a lack of space, a lack of funding to maintain a population (especially of sick or injured animals), behavioral issues, and, in many cases, the presence of otherwise minor diseases in animals which makes their treatment and ultimate adoption prohibitively expensive. Several shelters throughout the country have had fantastic success in handling many, if not all, of these issues, allowing cities to achieve “no kill” status, saving greater than 90% of animals regardless of their condition(s). One such city, is Austin, TX, which has maintained “no kill” status since 2011 using a combination of city-run and private non-profit resources to ensure that animals do not slip through the cracks.

One of the hardest issues to handle in a shelter environment, dense as it is with animals from the surrounding areas, is treatment of highly contagious diseases. Diseases like the Canine Distemper and Canine Parvovirus can rip through a shelter, decimating its population of dogs who have not completed the required vaccinations yet due to their circumstances before arriving at the shelter. Although several contagious diseases are of concern in shelters, one of the most tragic is the Canine Parvovirus, which tends to kill young puppies more often than adult dogs.

Austin Pets Alive! (APA!), a non-profit, no-kill shelter in Austin, has been treating the Canine Parvovirus en mass since late 2008 with significant success. Only recently, APA!, in conjunction with Maddie’s Fund, an organization dedicated to the advancement of shelter medical knowledge and efficacy, has begun a concerted effort to formally collect data for research purposes to better understand the nature of the disease, their successes, and their failures. This presents an opportunity for Data Scientists (such as myself) to evaluate our progress in treating the disease in a data-driven way. One critical question is why, despite their best efforts, virtually no one has been able to save >90% of animals infected with Parvo.

In summary, this work will intend to address the following questions:

  • How successful has APA! been in treating the Canine Parvovirus?
  • What has the economic (financial and volunteer hours) cost been of treating animals? How can we predict these costs?
  • What can we do for the last 10% of animals that don’t survive, despite our best efforts?

What is the Canine Parvovirus?

The Canine Parvovirus is a viral illness known for its incredible infectiousness and infliction primarily on young dog populations. Although a vaccine exists which is highly effective in preventing infection, this vaccine takes time to generate immunity, and animal populations lacking access to the vaccine will, obviously, not be protected. Because the Canine Parvovirus (Parvo, for short) can live on surfaces for 6–12 months, transmitted via the fecal-oral route, it can easily infect virtually any young dog who is unprotected. Moreover, households which are infected may assume particular cleaning methods normally utilized for infectious disease control (i.e. soap, all-purpose cleaners, etc) will kill Parvo; however, the only household cleaner which kills Parvo is bleach. If bleach is not used, it is likely a household will remain contaminated and any under-vaccinated puppy brought into the home in the future is likely to contract the disease. All of that said, Parvo is a very treatable illness. In
many private practice environments, the treatment can cost more than 1,000 to 2,000 USD in the United States (though this price may be coming down), and shelters are often hesitant to treat it due to the highly infectious nature of the illness — instead, choosing euthanasia to protect the rest of the shelter population.

To get started, let’s look at the basic demographics of what animals are in our data set. This data was collected on all dogs treated for the virus from January, 2017 to February, 2018. It contains 710 animals of varying weights, ages, sexes, duration of stay, and outcome. Here, we’ll visualize weight by the size of the dot, survival by either an X or O (X is deceased), and sex by color (red for female).

Basic Demographics of Dogs Infected with the Canine Parvovirus

Within this data set, 85.8% of animals survived. This is slightly lower than is typical for APA! due to an enormous influx of animals during Hurricane Harvey from Houston and other surrounding areas. These numbers have exceeded 95% in the past.

We know surprisingly little about the disease, but through this work, hopefully we can learn a little more.

The Economics of Shelter Treatment of Parvo

The primary two arguments against treating Parvo in an animal shelter are cost and risk. For risk, we can address this fairly quickly. There is no evidence at APA! of Parvo spreading outside of the ICU quarantine area. Animals in the general population at Austin Pets Alive! never catch Parvo, even though puppies that had survived Parvo were, shortly after testing negative for the virus (via IDEXX Elisa Testing performed in the ICU), housed near puppies still susceptible to the disease; outbreaks never occurred. The protocols which are in place have worked for nearly a decade now, even when catastrophic events such as hurricanes, floods, and power outages have occurred. For more information on these protocols, please contact Austin Pets Alive! directly.

The next common argument is that Parvo is simply too costly to treat. At its surface, this is a completely reasonable concern. Private practice can charge well over 1000 USD per dog treated for Parvo. However, with a dedicated quarantine area, volunteers for treatments and cleaning, medical protocols to streamline treatment for a large population, and other process optimizations, this cost can be substantially reduced. Here, we’ll evaluate the primary costs associated with treatment in three main areas:

  • Medicine usage
  • Volunteer hours
  • Space and equipment

Medication is a primary cost driver for treatment. The costs of the primary medications used in treating Parvo can be seen below.

Distribution of costs of different medications administered during treatment of the Canine Parvovirus

Note that Parvo is a virus and is treated only with supportive care to prevent secondary infections and dehydration, so only some of the medications on this list directly treat these two primary issues; these include Baytril, Polyflex, Cefazolin, SQ Fluids, Hetastarch, Metoclopromide, Cerenia, Anzemet, and Famotidine. Strongid, Panacur, and Marquis Paste are dewormers (to reduce secondary complications from Parvo while the virus is acute). Oral Dextrose and Nutrical are given rarely and are for nutrition. In particular, note that at times in the past, Cerenia has not been given at APA! due to its cost.

The next major expense is basic supplies such as syringes, Parvo Tests (IDEXX Elisa Testing which can be performed in the ICU), food, and cleaning supplies. These are estimated to cost 5, 12.50, 10, 2.76 USD per dog, respectively, based on retrospective views of the expenditures for the year. When these expenses are added to the average medical costs, the total per-dog cost is computed to be an average of 56.08 USD per dog with a strong left-skewed distribution. Note that this average includes all medicines administered during treatment (i.e. anti-nausea, dewormers, etc are included).

Cost distribution for dogs treated for Canine Parvovirus

When we look at some of our demographic information, we find, somewhat predictably, that there is a strong correlation between the weight of a dog and its cost for treatment. This is predictable because the dosages (and therefore, volumes) of medicines are determined by weight.

Relationship between intake weight and cost of dogs treated for Parvo

However, financial costs are not the only costs associated with treatment. A fantastic group of volunteers perform all treatments and care for the animals, free of charge. Their time should be factored in as well. One complication occurs when attempting to compute volunteer hours — these volunteers also simultaneously treated kittens with feline panleukemia. However, since we are looking for an estimate of the time spent on treatment (for the purpose of illustrating costs), we can simply count this as an overestimate.

Animals per shift associated with volunteer man-hours during that shift

As a fun aside, a logarithmic curve actually fits the data slightly better (r2=0.5), suggesting volunteers may be optimizing treatment as animals scale, rather than things getting worse as the population scales up.

The direct association between number of animals and time spent can be seen, however, it is worth noting that the manager of the ICU load-balances the number of volunteers based on a week-by-week evaluation of the needs of the ICU, as such, a third variable (number of volunteers per shift) is needed to get a more complete picture.

Shift time, number of volunteers/staff, and number of dogs in the ICU

Note that, in general, the shift time in hours remains within a window of 0–6 hours thanks to this load balancing. The number of volunteers remains within a window of 1 to 5 with one outlier exception. The averages from this evaluation end up being 9.09 hours of work per animal for the entirety of their treatment.

Thus, to save an animal with the Canine Parvovirus, 9.09 hours of work + 58.08 USD (and a quarantine area) are required.

The Last 10%

Now that we have taken stock of our successes and established how imminently treatable the Canine Parvovirus is in an Animal Shelter setting, we can turn our attention to the areas where we have room for improvement— i.e. the last 10% of Parvo dogs that do not survive, despite receiving the same care as the 90% who do. It is interesting to note that this is not a limitation of the APA! treatment protocol, and, in fact, no one in the world knows how to save this last 10%. Several experimental treatments are possible for saving this group, but it is difficult to tell who should receive such treatments before they have reached a severity level where the efficacy of any treatment is doubtful. Our goal, as Data Scientists, should be to identify these animals before they reach a theoretical “point of no return” so an alternate treatment may be attempted. To this end, a survival model can be employed to determine what measured, critical factors contribute to the probability of death, and, moreover, how successful we can be with the basic metrics in predicting which dogs will not respond to the treatment.

When constructing a Survival Model, we will use a Cox Proportional Hazard Model which allows us to determine risk associated with the occurrence of an event in time, given some observed quantities. In this case, we can observe:

  • Subjective Status/Attitude (Comatose, Lethargic, Quiet and Responsive, Bright and Responsive)
  • Gum Color (White, Gray, Pale Pink, Pink)
  • Paw Temperature (Cold, Warm)
  • Appetite (No Interest, Voluntarily Eats Small Amount, Normal)
  • Drinking Water (Yes, No)
  • Feces (1–7 scale between solid and normal and bloody diarrhea)
  • Vomiting (Severe, Moderate, Mild, or None)
  • Sex (Male, Female)
  • Intake Age
  • Intake Weight

Note that Subjective Status is, in and of itself, a measure of Severity. However, when we look at it alone, we see it simply tracks with their time since intake (bifurcating if they get worse or better). It is not particularly resolute and does not offer much possibility of being a sole predictor of non-responsiveness as animals can arrive at variable stages of disease progression.

The subjective condition of animals given their number of days spent in the ICU

However, the Cox Proportional Hazard Model (which fits an exponential on a weighted sum of the variables to try to estimate the risk of encountering an event) does give us a measure of the variable significance as related to death — and Attitude does come out as a significant variable.

The relative significance of the coefficients of the Cox Proportional Hazard Model

What, then, does this tell us about this missing 10%? We should focus on Attitude, Gum Color, Appetite, and Vomiting primarily as variables which might contribute to the risk of imminent death, sure. Perhaps, however, the risk score we now have could be used as a predictor. We can begin by examining a small sub-population to see if this intuition makes sense. Let’s look at animals who were present for precisely 8 treatments.

An example of dogs who were either discharged or died after 8 treatments

We can see that the animals were fairly difficult to fully distinguish in the first treatment, but by the second, they were largely differentiated. On a larger scale, we can look at how the population’s hazard score across takes since intake changes.

The statistics of the hazard/survival score across days of treatment for animals that survived and died Parvo

In this box and whisker plot, we can see that, in general, animals for whom the treatment will not work are fairly separable from the first treatment, but become even more so as time goes on. This bodes well for being able to predict these animals from the start. In fact, the hazard score alone can be used to estimate this by drawing a cutoff based on when no animal has come back from a sufficiently high score. Additionally, we can train a simple linear classifier to determine how well we would be able to classify using this score alone (across the first two treatments).

Confusion matrix for a linear classifier trained on the hazard scores (f1=0.42)

This is not sufficient for our current predictions, but perhaps with more data and more observed variables, this prediction could be improved. The cost of false positives, in this case, is animals receive unnecessary treatment. On the other hand, false negatives mean animals receive the typical treatment and die anyway. Perhaps, then, a conservative estimate can be drawn until the efficacy of experimental treatments is established, allowing us to better our protocols and save the last 10%.

Looking Forward

In additional to experimental treatments, several other improvements may prove useful in saving these animals. Many of the last 10% may, in fact, not die from Parvo at all. They may die from (or their chances of surviving Parvo may be greatly reduced by) diseases such as Canine Distemper. If this is the case, perhaps strategies useful for Distemper treatment and prevention will help these animals. In particular, modeling the spread of the illness using a variation of an SIR epidemiological model is an active research direction.

Variation on an SIR epidemiological model for the spread of Canine Distemper

Moreover, although volunteers spend several hours, twice a day with these animals, they are not monitored 24/7. Monitoring devices are expensive, and shelters often cannot afford them. To this end, projects involving low cost monitoring of respiration or heart rate using sensors such as webcams may be the future of low-cost monitoring.

Eularian video magnification for identification of likely regions which represent respiration
PCA-based real-time monitoring of motion for a respiratory signal

Through the careful application of engineering, science, and technology, we can help animal shelters accomplish their important work of saving vulnerable animals. Organizations like Austin Pets Alive! are incredible proving grounds for innovative techniques which have the potential to revolutionize the way we care for homeless pets. If you are an engineer or scientist, consider reaching out to local shelter organizations (or the author of this article) to see how you can help.

--

--