  The management of hyperglycemia in hospitalized patients has a significant
impact on both morbidity and mortality. Therefore, it is important to predict
the need for diabetic patients to be hospitalized. However, using standard
machine learning approaches to make these predictions may result in health
disparities caused by biases in the data related to social determinants (such
as race, age, and gender). These biases must be removed early in the data
collection process, before they enter the system and are reinforced by model
predictions, resulting in biases in the model's decisions. In this paper, we
propose a machine learning pipeline capable of making predictions as well as
detecting and mitigating biases in the data and model predictions. This
pipeline analyses the clinical data and determines whether biases exist in the
data, if so, it removes those biases before making predictions. We evaluate the
performance of the proposed method on a clinical dataset using accuracy and
fairness measures. The findings of the results show that when we mitigate
biases early during the data ingestion, we get fairer predictions.
