1. Introduction
Clinical mastitis is among the most frequent clinical diseases in dairy cows [
1], characterized by visible changes in milk, potentially associated with signs of inflammation in the affected mammary quarter, and accompanied by systemic signs [
2]. Additionally, behavioral changes during cases of mastitis can be observed through sensors and have already been described [
3,
4,
5].
Sensors are devices that objectively and non-invasively measure animal behavior, capable of continuously detecting behavioral changes in real time [
6]. Thus, behavioral monitoring through sensors has also been studied as a criterion for disease cure in dairy cows. Cantor et al. [
7] used sensors from automatic feeders and pedometers to evaluate the cure of bovine respiratory disease and concluded that cured calves had higher feed intake and were more active when cured, while uncured calves had lower feeding speed. Prim et al. [
8] used a combination of behavioral data to predict the cure of metritis in dairy cows and concluded that cows that failed treatment had lower post-diagnosis rumination than cured cows. Although there are studies relating the behavior of dairy cows after diagnosis and during the treatment of mastitis through sensors [
9], no research has been found that aims to predict the cure of mastitis in dairy cows using sensors. Thus, there is a significant gap in the literature regarding this. Monitoring the cure of clinical mastitis can indicate when a cow has indeed recovered from the disease and detect cows that are unlikely to recover, allowing for an evaluation of clinical conduct and aiding future decision-making.
Therefore, the hypothesis of this study is that it is possible to predict the cure of clinical mastitis by combining behavioral and production data from sensors. Hence, the objective was firstly to associate behavioral and productive factors from monitoring collars and an automatic milking system (AMS) to better understand the impacts of mastitis and its clinical progression on these parameters and, secondly, to identify parameters that can predict the cure of clinical mastitis in lactating cows. The implications of this study encompass the understanding of key predictors for mastitis cure and the future development of predictive algorithms for mastitis cure, aiding veterinarians in selecting optimal treatment strategies.
2. Materials and Methods
This study was carried out in the Fazenda Experimental Gralha Azul (FEGA) (Fazenda Rio Grande, Brazil).
2.1. Cow Housing and Management
The research was conducted at the Dairy Cattle Facility of FEGA over a period of 17 months, from November 2022 to April 2024. The herd consisted of about 60 lactating Holstein dairy cows, managed according to standard procedures of the farm.
FEGA is equipped with a three-row free stall barn. The barn has multiple fans and automatic brush to support cow comfort and hygiene, as well as a footbath used according to the herd veterinarian’s recommendations. The flooring in the alleys is made of grooved and scarified concrete. The main alleys were cleaned with the aid of an automatic scraper (DeLaval, Jaguariúna, Brazil), which removed manure approximately eight times per day.
The stalls were composed of rubber mats over foam (DeLaval, Jaguariúna, Brazil), covered with a layer of wood shavings to help maintain cleanliness. Hydrated lime was applied to the bedding two to three times per week to reduce microbial contamination.
The cows remained housed in the facility throughout lactation, with access to a partial mixed ration at the feed bunk and free access to water. The amount of concentrate necessary to meet the milk yield demand was provided in the robotic milking unit, with the quantity defined according to the stage of lactation and the individual productivity. The diet provided at the feed bunk contained corn silage, ryegrass haylage, commercial concentrate, ground corn, soybean meal, sodium bicarbonate, and premix containing minerals, vitamins, and other additives (
Table 1). The diet was mixed using a mixer wagon (DeLaval, Jaguariúna, Brazil) and provided twice a day, at 08:00 AM and 04:00 PM.
2.1.1. Automatic Milking System
All cows were voluntarily milked by an automated milking system (AMS; VMS 300, DeLaval, Jaguariuna, Brazil) in a milk-first guided-flow free stall. A single-stall AMS was used on the farm to operate a herd of dairy cows and was equipped with a pre-selection gate. The average milking frequency was approximately 2.4 milkings per cow per day.
The AMS provides productive, health and behavior data, such as milk electrical conductivity (EC) per mammary quarter (mS/cm); variation in the expected production percentage per mammary quarter (%), total milk yield (L/cow) in the last 24 h; presence of blood in the milk during that milking (at any level detected by the equipment, expressed in ppm); milking interval (h); average milk flow in the last 7 days (kg/min); average number of gate passages in the last 48 h (
n/cow/day); and Mastitis Detection Index (MDi), which consists of EC per quarter (mS/cm), presence of blood (ppm), expected production percentage per quarter (%), and interval between milkings (h), presenting a variation from 0.8 to 4.0, where values below 1.4 indicate a low probability of mastitis and values around 2.0 or more indicate a high risk of mastitis [
10]. The data are issued through a management platform (DeLaval DelPro
®®, DeLaval, Jaguariuna, Brazil).
Average relative EC, average total milk yield, average MDi in the last 3 days, average milk flow in the last 7 days, and average gate passages in the last 48 h data were used during the mastitis cure evaluation period. The choice of these parameters was based on their biological relevance to mastitis and because they are provided by the AMS.
2.1.2. Behavioral Monitoring Device
All cows were equipped with a Behavioral Monitoring Collar (BMC; CowMed S.A., Santa Maria, Brazil). The BMC is attached to the left dorsocranial region of the neck, immediately caudal to the ear. The BMC used in this experiment determines rumination, feeding activity, panting, and idle time through an accelerometer. Daily data on feeding activity (h/day) during the clinical mastitis cure were obtained and used in this study, based on the reliability presented in the validation conducted by Lovatti et al. [
11].
2.2. Selection of Cows with Clinical Mastitis
All lactating cows were eligible for the study. Upon screening for mastitis, a step-by-step procedure was followed.
2.2.1. Screening of Mastitis Based on AMS Parameters
The screening of cows with mastitis followed the protocol used at the FEGA dairy farm. A cow was considered suspect for mastitis when one or more parameters indicated by the AMS were altered, namely: EC values per quarter above 5.37 (±0.02) mS/cm [
12]; variation in the expected production percentage per mammary quarter (%) (values below 80% of the expected production); presence of blood in the milk during that milking (at any level detected by the equipment); and MDi values close to or higher than two. Cows that met one or more of the mentioned parameters proceeded to clinical evaluation to confirm or rule out the diagnosis of clinical mastitis.
2.2.2. Diagnosis of Clinical Mastitis
The diagnosis of mastitis was confirmed or excluded through a clinical examination, specific udder examination, and the California Mastitis Test (CMT). The clinical examination consisted of evaluating physiological parameters: heart rate, with normal values between 65 and 90 bpm; respiratory rate, with normal values between 24 and 36 rpm; frequency of ruminal contractions, considered normal between 7 to 10 sounds in 5 min; rectal temperature, with normal values between 38.0 °C and 39.2 °C; and vaginal mucosa color, considered normal when pale pink, with a shiny, moist, and smooth appearance [
13]. The specific udder examination, adapted from Rosenberger [
13], involved palpating the udder, assessing consistency, sensitivity, and temperature of each mammary quarter individually. The udder consistency was considered normal when it was soft, with normal skin that moved freely over the tissue, and altered when the consistency was firm. Sensitivity was considered normal when palpation triggered a normal reaction relative to the animal’s temperament, or altered and sensitive to pressure when palpation elicited an exaggerated reaction to touch. Temperature assessment was performed by placing the back of the hand on the udder, comparing the temperature between mammary quarters, which could be warm (normal) or very warm (area with acute inflammation). Cows showing alterations in the clinical evaluation were classified as having clinical mastitis, while cows without alterations could be negative for clinical mastitis, depending on the evaluation of other parameters.
The next step for CM evaluation was the CMT, interpreted visually by observing the milk after mixing with the reagent [
14]. If the somatic cell count is low, no gel is formed, and the result is negative. According to the gel viscosity, the result is given in scores, ranging from trace (slight gel formation) to + (weakly positive), ++ (positive reaction), and +++ (strongly positive reaction). Mammary quarters with positive CMT but no clots were classified as subclinical mastitis, while those with positive CMT and clots were classified as clinical mastitis and selected for microbiological culture.
Milk sample collection for microbiological culture was performed aseptically. The teats were immersed in a non-iodine-based teat disinfectant solution containing glycolic acid (OceanBluTM Barrier, DeLaval) for 30 s, then individually dried with paper towels. The teat ends were disinfected with alcohol 70%, the first three streams of milk were discarded, and the milk was collected in a sterile tube. Microbiological culture was performed on chromogenic media plates using the OnFarm
®® method. The OnFarm
®® system, described and validated by Granja et al. [
15], allows faster diagnosis of various mastitis-causing bacterial species and genera through chromogenic culture media to facilitate pathogen identification. The system uses tripartite culture plates with three different culture media, allowing the growth of 13 bacterial species. These plates are kept in an incubator at a temperature of 35/36 °C for 24 h.
For cows up to 21 days postpartum, in addition to the previously described protocol, vaginal mucus was collected through vaginal palpation to evaluate odor, color, and appearance. Blood was also collected from coccygeal vessels to test for ketone bodies (beta-hydroxybutyrate) using test strips. According to Ospina et al. [
16], in cases of subclinical ketosis, the serum ketone body concentration is above 1.2 mmol/L.
After all evaluations were performed and the clinical mastitis diagnosis confirmed, the therapeutic protocol was implemented. This protocol was based on the mastitis severity score, being grade 1 when the animal presented only changes in the visual characteristics of the milk; grade 2 when, in addition to the previous symptoms, there were signs of inflammation in the teat or udder; and grade 3 when, besides changes in milk, teat, and udder, there were systemic signs [
2]. Grade 1 cases were treated with non-steroidal anti-inflammatory drugs (NSAIDs), which could be combined with supportive therapy (vitamin complex). In grade 2 cases, besides NSAIDs and supportive therapy, intramammary antibiotics were administered. Finally, cows with grade 3 clinical mastitis received systemic antibiotics in addition to NSAIDs, supportive therapy, and intramammary antibiotics. The choice of antibiotic was based on the microbiological culture results and farm’s antibiogram history.
2.2.3. Exclusion Criteria
Cows up to 21 days postpartum diagnosed with metritis or ketosis were not included in this study to avoid potential interference in the evaluation. Cows that left the freestall for any reason during the experimental period were also not included, as their data would be incomplete. Cows diagnosed with subclinical mastitis through a positive CMT, as described above, were excluded.
2.3. Definition of Experimental Groups
The experimental groups followed a case–control study design. Cows diagnosed with mastitis in udder examination and CMT were selected as cows with clinical mastitis, forming the mastitis group. For each cow with mastitis, a cow without mastitis was selected from the lactating cow group, forming the control case group. The cows in the control case group were matched based on parity, days in lactation (DIM), and milk yield. Subsequently, the cows underwent physical, specific udder, and CMT examinations, which were required to be negative for all evaluations. If the control cow developed mastitis, it would be replaced by another control cow and moved to the mastitis group.
2.4. Monitoring and Definition of Cure
The mastitis group and control cows were monitored for a period of 14 to 30 days, considering the day of mastitis confirmation (or not) as day zero (D0). During the monitoring period, the cows were evaluated three times a week, on Mondays, Wednesdays, and Fridays. The clinical, specific udder, and CMT examinations were performed as described above.
The monitoring period ranged from a minimum of 14 to a maximum of 30 days, until the cows were negative for mastitis in three consecutive evaluations. Non-cured cases within 30 days had their monitoring ended. After the period ended, the cows in the mastitis group were classified into two subgroups: cured cases and non-cured cases.
A cure was defined when the clinical, specific udder, and CMT examinations were negative in the last three evaluations within the stipulated period. The clinical examinations performed during the mastitis case monitoring were used only to define clinical cure.
2.5. Evaluated Parameters
Reports were generated and collected with data on feeding activity measured by the BMC and data on relative EC (%), total milk yield in the last 24 h (L), MDi, milk flow in the last 7 days (kg/min), and the number of gate passages in the last 48 h measured by the AMS. Due to occasional synchronization failures of the BMC data, 6 cows lost their feeding activity data and were thus included only in the analyses related to the data obtained by the AMS.
Additionally, clinical records of all cows included in the experiment were evaluated, with the primary aim of checking for the presence of hoof diseases causing lameness. The clinical records were made by the herd’s veterinary team at the time of disease diagnosis. During the experimental period, 9 cows were identified as lame. Lame cows can interfere with the evaluation and were therefore considered in the models.
2.6. Statistical Analysis
2.6.1. Sample Size Calculation
A sample size calculation was not performed because the study relied on the natural occurrence of mastitis, and the experimental herd had a limited number of lactating cows. This limitation is included in the discussion.
2.6.2. Association of Behavioral and Productive Parameters with the Cure of Clinical Mastitis
The data were analyzed using R (version 4.2.2) [
17] with the aid of the packages “lme4” [
18] and “lmerTest” [
19]. To compare the behavioral and productive data of cows in each group (control, cured, and non-cured), the association of the parameters of interest was analyzed via generalized mixed linear regression models. This analysis was performed to evaluate the significance of fixed effects and their interactions via Type 3 ANOVA. All models included the cow as a random effect, thus controlling repeated measures within cow. The models included the fixed effects of the groups (control, cured, and non-cured), days from diagnosis, and the interaction between these variables. The covariates included in the model were parity, DIM, and lameness (yes or no). The severity of mastitis was not included in the model as there were cows that were cured and were non-cured at all three severity levels, and preliminary exploratory analysis did not indicate interactions between severity and cured/non-cured groups. In the model of feeding activity, six cows had missing data and were removed from the model. When assessing mean differences between groups, least squares means were used, and Tukey correction was applied.
2.6.3. Exploratory Predictive Model
Binary outcomes (cure within 14 days) were analyzed using generalized mixed logistic regression with the “glmer” function from the “lme4” package, considering the random effect of the cow to control variance between cows. The covariates included in the model were DIM, parity, average MDi in the last 3 days, average milk yield in the last 24 h, and average relative EC of the affected quarter. Due to the low number of mastitis cases, behavioral data were not included. Two exploratory predictive models were created and evaluated for their ability to predict the outcome of interest: model 1—prediction of clinical mastitis cure at 14 days based on data from the day of diagnosis (D0); model 2—prediction of clinical mastitis cure at 14 days based on variations between D0 and D3. Due to overfitting indications (Se = 1.00 and Sp = 1.00), model 2 is not further addressed. To evaluate the predictive performance of model 1, sensitivity (Se) and specificity (Sp) were calculated using the ROC (Receiver Operating Characteristic) curve. The AUC (area under the curve) value and its confidence interval were also calculated. The calculations for Se and Sp are as follows:
The AUC values were defined as follows [
20]: 0.00 to 0.50 no discrimination; 0.51 to 0.69 low discrimination; 0.70 to 0.79 acceptable discrimination; 0.80 to 0.89 effective discrimination; and 0.90 to 1 excellent discrimination.
3. Results
3.1. Study Population
This study included 22 cases of clinical mastitis originating from 18 cows. Four cows experienced two distinct episodes of clinical mastitis during the study period; inclusion of the second episode required complete resolution of the first episode. Of the clinical mastitis cases, 14 were classified as “cured” and 8 as “not cured” based on resolution of clinical signs. The control case group comprised 22 cows, with 4 cows contributing two data points at different time points during the study period, resulting in 28 control cases.
Of the 50 cases included in the experiment (152.6 ± 109.1 DIM, 35.43 ± 9.7 kg/d milk yield, and 8 primiparous and 32 multiparous cows), all cases obtained data from the AMS. However, 28% (n = 14) were unable to obtain data from the BMC due to upload instability.
3.2. Descriptive Analysis
The parity of the cows ranged between 1 and 5, while the DIM ranged between 3 and 487 days across the groups. Among the 22 cases of clinical mastitis, there were 6 cases of grade 1 mastitis, 11 cases of grade 2 mastitis, and 5 cases of grade 3 mastitis. At all three severity levels, there were cows that were cured and were not cured.
The average clinical cure time in days for cows with clinical mastitis was 11 days, with 13 cases showing a cure within 14 days, 1 case curing at 16 days, and 8 cases not showing a cure within the 30 days of monitoring.
The cured cow cases presented the following microbiological culture results: five negative cultures, four cultures with Streptococcus agalactiae/dysgalactiae, two with non-aureus Staphylococcus, one with Streptococcus uberis/Enterococcus spp., and two with Klebsiella spp./Enterobacter/Serratia spp. In contrast, the non-cured cow cases had three cultures with Streptococcus agalactiae/dysgalactiae (including one case associated with Prothoteca), two with non-aureus Staphylococcus (including one case associated with Pseudomonas), one with Klebsiella spp./Enterobacter/Serratia spp., and two cultures with no microbial growth. The aforementioned results are described in this way as the OnFarm®® system does not differentiate between Streptococcus agalactiae and Streptococcus dysgalactiae, nor between Klebsiella spp., Enterobacter and Serratia spp., or between Streptococcus uberis and Enterococcus.
3.3. Factors Associated with Mastitis Cure
Among all evaluated factors, we observed differences between the cured cases, non-cured cases and control cases groups in terms of feeding activity, number of gate passages in the last 48 h, milk yield in the last 24 h (L), relative EC of the affected quarter in the last 24 h (%), MDI in the last 3 days, and milk flow in the last 7 days (kg/min). The comparison was made between the groups of clinical mastitis cases (cured or not) and the control cases.
3.4. Feeding Activity
There was a significant interaction (
p < 0.01;
Figure 1) between the groups over time for feeding activity. Non-cured cows showed a significant increase of 2.7 ± 0.9 min in feeding activity over the days compared to control (
p < 0.01), whereas there was no significant difference in feeding activity over the days for cured cows (1.61 ± 1.26 min;
p = 0.20) and control cows. Additionally, it can be observed that non-cured cows had lower average feeding activity over the period compared to the control (non-cured: 284 min/day; control: 395 min/day). Cured cows had an average feeding activity time as control cows (cured: 324 min/day; control: 395 min/day)
. 3.5. Average Gate Passages (48 h)
There was a significant interaction between the daily average number of gate passages over the last 48 h and the groups over time (
p < 0.01;
Figure 2). Non-cured cows showed an increase of 0.08 ± 0.03 passages over the days compared to the control (
p < 0.01). Cured cows also showed a significant difference in gate passages over the days (0.09 ± 0.04;
p = 0.05). Both cured and non-cured cows passed through the gate 9.0 times, while control cows passed through the gate 10.0 times.
3.6. Average Milk Yield (24 h)
For the average milk yield over the last 24 h, a significant interaction between the groups over time was observed (
p < 0.01;
Figure 3). Cured cows showed an increase in production of 0.29 ± 0.09 L per day compared to control (
p < 0.01), while non-cured cows had a daily increase of 0.18 ± 0.06 L compared to control (
p < 0.01). Thus, cured and non-cured cows produced, on average, less compared to control cows (averaged milk yield over the case period: non-cured: 32.28 L; cured: 38.08 L; control: 41.48 L).
3.7. Average Milk Flow (7 d)
A significant interaction was observed between the groups regarding the average milk flow over the past 7 days (
p < 0.01;
Figure 4). Cured cows showed a significant increase of 0.02 ± 0.005 kg/min (
p < 0.01) compared to control, while there was no significant difference in the average milk flow over the past 7 days over time for non-cured cows (0.007 ± 0.003 kg/min;
p = 0.03) compared to control. Thus, cured cows had an average milk flow of 2.91 kg/min over the past 7 days, while non-cured cows had an average milk flow of 2.8 kg/min (control: 2.96 kg/min).
3.8. Average Relative Electrical Conductivity (24 h)
For the average relative EC of the affected udder quarter, there was a significant interaction between the groups over time (
p < 0.01;
Figure 5). Cured cows showed a reduction in EC from the time of diagnosis until the day of cure (−1.14 ± 0.15%;
p < 0.01) compared to control cows. Non-cured cows exhibited a more gradual decrease in EC over the 30-day period (−0.6 ± 0.11%) compared to control cows. On average, non-cured cows had higher EC. (non-cured: 130.9%; cured: 118%; control: 102.4%;
p < 0.01).
3.9. Average MDi (3 d)
A significant interaction was observed between the groups regarding the average MDi over the last 3 days (
p < 0.01;
Figure 6). Cured cows showed a sharp decrease in the average MDi from the time of diagnosis until the day of cure (cured: −0.03 ± 0.004;
p < 0.01) compared to control cows (control: 1.28 ± 0.06;
p < 0.01). Non-cured cows also exhibited a decrease in average MDi (non-cured: −0.01 ± 0.003;
p < 0.01) from the day of diagnosis, but they did not reach normal levels when compared to control cows (
p < 0.01).
3.10. Prediction of Clinical Mastitis Cure
To predict clinical mastitis cure in dairy cows within 14 days, the AUC for the model based on data from the day of diagnosis (D0) was 0.89 (95% CI: 0.75–1.00). The sensitivity (Se) and specificity (Sp) were 1 (95% CI: 1.00–1.00) and 0.63 (95% CI: 0.37–0.91), respectively (
Figure 7).
4. Discussion
In this study, we confirm the hypothesis that cure from clinical mastitis can be predicted by integrating behavioral and production data obtained from sensors. We found associations between the state of clinical mastitis cure and the behavioral and productive factors evaluated during the 30 days after the start of treatment.
Most cows with clinical mastitis showed clinical cure within two weeks after the start of treatment. This finding is consistent with observations by Fogsgaard et al. [
9], where clinical signs as well as behavioral changes persisted for at least 10 days after the start of mastitis treatment. These behavioral changes may be considered a response to udder infection [
21,
22]. In general terms, infection, usually associated with inflammation, redirects energy resources to the immune system to resolve the disease [
23]. As a result, sick animals end up showing a set of behavioral changes [
21], such as decreased feeding, which has also been observed in the post-diagnosis and treatment period of bovine respiratory disease [
7].
Our results show that feeding activity varied between cows that cured and those that did not cure from mastitis. This association between cure and feeding behavior over the days suggests that cows that did not cure were less active from the time of diagnosis, spending less time eating compared to control cows. Furthermore, we observed that cows that cured did not differ from the control group cows, suggesting that sick cows with the potential to cure will not show such a marked drop-in feeding activity compared to healthy cows from the time of diagnosis, which can serve as an indicator of cure, as proposed by Fogsgaard et al. [
9]. In a study evaluating the behavior of cows after the induction of mastitis, a decrease in feeding was observed during the 2-day period after bacterial inoculation [
24]. Similarly, another study observed that the reduction in feed intake persisted during the 10-day follow-up after mastitis treatment, suggesting the use of this behavior as an indicator of recovery [
9]. In addition to mastitis, similar results have been reported in cattle with other diseases, such as bovine respiratory disease. Cantor et al. [
7] concluded that calves with bovine respiratory disease had higher feed intake and were more active when cured, while those not cured had lower consumption rates. Thus, it is understood that feeding activity may be a good indicator of recovery in diseased cattle, as changes in this behavior can reflect either improvement or persistence of the illness.
Our study demonstrated that, on the day of diagnosis, cows with mastitis passed through the gate fewer times compared to cows in the control group, regardless of whether they were lame or not. Irrespective of whether they were cured or not, cows with mastitis showed an increase in gate passages over time, but they did not reach the number of passages seen in the control group. Based on our findings, cows with mastitis exhibited a reduction in feeding activity, suggesting that they also seek out the AMS less frequently. Additionally, milking can be a stressful and painful experience for cows with mastitis, causing them to seek milking less frequently and thus pass through the separation gates fewer times. Medrano-Galarza et al. [
25] highlighted an increased frequency of kicking and leg lifting during milking in the first 3 days after the diagnosis of clinical mastitis, supporting the association between pain and altered behavior during milking.
Cows with mastitis, regardless of whether they were cured or not, showed a decline in milk production on the day of diagnosis. The non-cured cows did not return to their pre-clinical production levels over time, whereas the cured cows resumed their milk production levels approximately three weeks after diagnosis. Some authors suggest that the reduction in milk synthesis is a strategy to conserve glucose for the immune system [
23], indicating that an uncured cow will continue to have low milk production. Additionally, if the cow is in pain, elevated cortisol levels can inhibit oxytocin release [
26]. Similar to the findings of our study, Bonestroo et al. [
27] reported that the rate of milk synthesis decreased with an increase in somatic cell count, lactate dehydrogenase, and EC, which are frequently used as indicators of mastitis. The increase in these indicators is directly related to the severity of inflammation, resulting in greater milk production loss [
28].
Similarly to milk yield, milk flow was also affected. This can be explained by the fact that the average milk flow is obtained by dividing the total production by the duration of effective milking [
29]; therefore, if milking time remains the same and milk yield decreases, as in cases of clinical mastitis, the tendency is for a decrease in milk flow. This measurement aims to improve milking efficiency and promote udder health in dairy cows [
30]. Another reason that may explain the reduction in milk flow is the damage to the secretory epithelium caused by mastitis [
31]. In our study, the average milk flow was associated with the cure of mastitis. Cured cows showed an increase in average milk flow over time, reaching normal levels within 10 days after the start of treatment. In contrast, cows that did not cure remained with below-normal milk flow during the 30-day follow-up, without reaching normal levels.
We observed an association between EC and mastitis cure. Cows that were cured showed a decrease in EC over the days, reaching normal levels between the 10th and 20th days, while cows that did not cure within 30 days exhibited a more gradual decrease, not reaching normal levels. A similar dynamic was observed by Bonestroo et al. [
5], who evaluated the difference in udder EC between cows that recovered and those that did not after the onset of mastitis. The researchers concluded that when a cow maintains elevated EC for more than 3 to 4 weeks after the initial inflammation, it is unlikely to recover, reaffirming the findings of our study.
Another frequently used indicator in the detection of mastitis is the MDi, which, like EC, is also associated with the cure of mastitis. In our study, both the EC of the affected quarter and milk production were analyzed separately, and both proved efficient as indicators of mastitis cure. However, we evaluated MDi to observe if there would be an influence of other parameters it includes, such as the presence of blood (ppm) and milking interval. Cured cows showed a marked decrease in the MDi, reaching normal levels between the 10th and 20th days. Cows that did not cure, despite showing a decrease in MDi from the day of diagnosis, did not reach the levels considered normal for the index. The results show a similarity with the findings of EC, suggesting that cows that do not reach normal levels in MDi by the 20th day after the start of treatment are unlikely to be cured. No studies were found relating MDi to the mastitis cure period.
In addition to the association of productive and behavioral factors with mastitis cure, we built an exploratory model to predict clinical mastitis cure in dairy cows in 14 days, based on diagnostic data. The predictive model based on the day of diagnosis (D0) indicated good performance in classifying positive and negative cases. The high Se indicates that the model was able to correctly identify cured cases in 14 days, though caution is warranted as the high Se may have resulted from model overfitting due to our low sample size. The moderate Sp indicates that the model has a reasonable ability to identify truly non-cured cases. Our results show that the model has the potential to predict cure in 14 days based on the variables of the day of diagnosis, although it requires validation. In a clinical application, the predictive model based on the day of diagnosis (D0) ensures the identification of all cows that will truly cure, ensuring that all cows needing intervention or follow-up are correctly identified. Additionally, the model helps avoid cases erroneously determined as cured, preventing premature conclusions about the cow’s health status. The importance of monitoring clinical mastitis cure is crucial to ensure the health and welfare of dairy cows, so that the veterinarian knows if the treatment was adequate, after all, mastitis is an inflammation that causes pain and discomfort [
25,
32]. Furthermore, predicting mastitis cure helps identify persistent or chronic infections, guiding the farm team to make the best decision for each case. Based on the indicators and the predictive model, cows that possibly will not be cured can receive an early new therapeutic approach or other interventions, depending on the clinical history of each cow. Economically, it is known that effectively treating mastitis can reduce costs associated with prolonged treatment, medication, and loss due to discarded milk [
33].
Our study shows the potential of using sensors for the detection and prediction of clinical mastitis cure in dairy cows. However, our main limitation was the sample size, as the study depended on the natural occurrence of mastitis. The first issue is related to our inability to properly address the mastitis severity levels within groups. Although the number of cases was balanced within groups, it is likely that being able to stratify this effect would have yielded more insights into the predictive cure of the outcomes assessed. Due to the lower sample size, we suggest that the model should be validated in other farms. It is very likely that a farm-specific model needs to be developed, as many of the factors studied may have different dynamics within each herd. Overall, in the near future, achieving a model able to predict clinical cure of mastitis would aid farmers in assessing their treatment protocols and adapting them in a timely manner.