PHIT Logo

PREPRINT: Harnessing Digital Health and Machine Learning for Early Detection of Hypertensive Disorders in Pregnancy: Insights from low-resource settings, Tanzania

  • research
  • 30 June 2025

Référence

PREPRINT: Harnessing Digital Health and Machine Learning for Early Detection of Hypertensive Disorders in Pregnancy: Insights from low-resource settings, Tanzania. research, 2025.

Résumé

Harnessing Digital Health and Machine Learning for Early Detection of Hypertensive Disorders in Pregnancy: Insights from Low-Resource Settings in Tanzania

View the full article

Study Overview

This study explored how routine digital antenatal care data and machine learning could support earlier identification of women at risk of hypertensive disorders of pregnancy (HDP) in Tanzania.

Hypertensive disorders, including gestational hypertension, pre-eclampsia, and eclampsia, are major causes of maternal and newborn complications. Early identification is especially challenging in low-resource settings, where healthcare facilities may face shortages of skilled providers, limited diagnostic capacity, high patient volumes, and incomplete clinical records.

Researchers analysed routine antenatal care records collected through Tanzania's Unified Community System (UCS), a government-led digital health platform used to capture individual-level health information at facility and community levels.

The initial dataset contained 337,027 antenatal care visits recorded between 2020 and 2024. After records from repeated visits were combined, the dataset represented 187,438 pregnant women.

Five machine learning classifiers were evaluated: K-Nearest Neighbours, Logistic Regression, Support Vector Machine, Random Forest, and Extreme Gradient Boosting (XGBoost). XGBoost demonstrated the strongest cross-validation performance and was selected for the final risk-prediction model.

The model was designed as a clinical decision-support and risk-stratification tool. Its purpose was to help healthcare workers identify women who may require repeat blood-pressure measurement, additional clinical assessment, laboratory investigations, closer monitoring, or referral.

Data and Model Development

The study used routinely collected maternal health variables available in the UCS antenatal care module. These included gestational age, systolic and diastolic blood pressure, weight, height, body mass index, urine protein, urine glucose, blood glucose, temperature, blood group, syphilis status, and ANC visit number.

Records from repeated ANC visits were transformed into one record per woman. Some variables, including blood pressure, weight, body mass index, blood glucose, and temperature, were summarised using average values. Gestational age was represented by the maximum recorded value, while the most recent values were retained for selected laboratory and visit variables.

Because hypertensive disorders were not consistently documented as confirmed clinical diagnoses in the routine dataset, the study derived the outcome from recorded blood-pressure measurements.

A woman was classified as being at risk of HDP when her systolic blood pressure was 140 mmHg or higher and/or her diastolic blood pressure was 90 mmHg or higher. Records below both thresholds were classified as having no identified risk.

A balanced modelling dataset was created using 1,894 records classified as at risk and 1,894 records classified as not at risk. The data were divided into training and testing sets, and the five classification algorithms were compared through cross-validation.

Key Findings

The XGBoost model achieved the highest cross-validation score among the five machine learning approaches evaluated and was selected for application to an independent dataset.

The final model was applied to 120,232 additional ANC records obtained from the UCS central repository. It achieved an overall accuracy of approximately 91%.

For records classified as being at risk of HDP, the model achieved 100% recall or sensitivity. This means that it identified all records meeting the study's blood-pressure-based risk definition in the validation dataset.

The model's precision for the at-risk category was 14%, with an F1-score of 0.24. The low precision indicates that many records flagged by the model would not meet the study's derived HDP definition and would therefore require additional clinical assessment.

This performance reflects a deliberately sensitive screening approach. In maternal healthcare, missing a woman with a potentially serious hypertensive condition may have greater consequences than referring a woman for an additional assessment that later confirms she is not hypertensive.

The model achieved an Area Under the Receiver Operating Characteristic Curve of 0.95, indicating strong ability to distinguish between records classified as at risk and those classified as not at risk.

When applied to the independent dataset, the model flagged 12,603 records as potentially at risk of hypertensive disorders. These alerts should not be interpreted as confirmed diagnoses. Instead, they identify women who may benefit from repeat measurements, clinical review, further investigations, or referral.

Important Predictors

Systolic and diastolic blood pressure were the strongest contributors to the model's predictions. This was expected because the study's outcome definition was based directly on blood-pressure thresholds.

Other variables made smaller contributions to risk classification. These included body mass index, protein in urine, and blood glucose. Temperature and syphilis status had comparatively little influence on the final prediction.

The inclusion of multiple routinely collected variables demonstrates how machine learning can combine several pieces of clinical information when generating a risk alert. However, the model does not replace established diagnostic procedures for gestational hypertension, pre-eclampsia, or eclampsia.

Antenatal Care Utilisation

The study also revealed important gaps in continuity of antenatal care. More than half of all recorded ANC visits were first visits, and only a small proportion of women had four or more documented contacts.

After repeated records were combined, approximately 43% of women had only one recorded ANC visit, while around 6% had four or more visits. The average gestational age recorded during ANC attendance was approximately 24 weeks.

Limited repeat attendance reduces opportunities for healthcare workers to monitor changes in blood pressure, proteinuria, maternal symptoms, foetal development, and other indicators throughout pregnancy. A digital risk-stratification tool may therefore be particularly useful when only limited patient information is available, although it cannot substitute for appropriate follow-up care.

Health-System Implications

The study demonstrates that routinely collected government health data can support the development of machine learning tools for maternal health, even in resource-constrained settings.

Integration of risk prediction into the UCS could help healthcare workers prioritise women requiring urgent review, repeat blood-pressure measurements, urine protein testing, symptom assessment, closer follow-up, or referral to a higher level of care.

Such tools may be valuable in busy ANC clinics where the number of patients exceeds the available clinical workforce. Risk-based prioritisation could support more efficient use of limited staff time and diagnostic resources.

However, implementation should be accompanied by clear clinical protocols. Every alert should lead to an appropriate action, such as verification of the blood-pressure reading, assessment for severe headache or visual disturbance, urine protein testing, clinical review, treatment, or referral.

The model should not be used independently to diagnose pre-eclampsia or other hypertensive disorders. Clinical diagnosis requires confirmation by trained healthcare providers using complete clinical information and established national guidelines.

Data Quality and Implementation Challenges

The study identified important weaknesses in routine antenatal care data. Hypertensive disorders were not consistently recorded using a standardised diagnostic field, and several clinically important symptoms and danger signs were frequently missing.

Because a clinically confirmed HDP diagnosis was unavailable, the researchers derived risk status from systolic and diastolic blood-pressure values. Although these thresholds are clinically relevant, this approach limits the model's ability to distinguish among chronic hypertension, gestational hypertension, pre-eclampsia, and isolated elevated blood-pressure readings.

The retrospective and de-identified nature of the dataset also prevented researchers from conducting individual follow-up, reviewing complete clinical files, or confirming pregnancy outcomes after the model generated a risk prediction.

Successful scale-up will therefore require improved data completeness, standardised clinical terminology, consistent documentation of maternal danger signs, stronger patient identification across visits, and mechanisms for linking risk alerts with subsequent clinical assessment and outcomes.

Health workers will also require training, supportive supervision, reliable digital devices, internet connectivity, technical support, and clear accountability for responding to model-generated alerts.

Conclusion

This study demonstrates the potential of combining digital antenatal care records with machine learning to support early identification of women at risk of hypertensive disorders of pregnancy in Tanzania.

The XGBoost model achieved strong overall discrimination and very high sensitivity, making it potentially useful as a safety-oriented screening tool. Its low precision, however, means that model alerts must always be followed by appropriate clinical verification.

Machine learning should therefore be implemented as a decision-support tool that complements, rather than replaces, healthcare providers. Its value lies in helping clinical teams prioritise women who may require additional assessment in settings with limited staff and diagnostic resources.

Before wider implementation, the model should undergo prospective clinical validation using confirmed diagnoses and pregnancy outcomes. Pilot implementation should also assess workload, referral patterns, alert management, cost-effectiveness, patient safety, acceptability, and equity.

With stronger data systems, appropriate clinical governance, and careful integration into routine workflows, digital health and machine learning may help Tanzania improve maternal risk detection and make more effective use of limited antenatal care resources.

Publication Details

The preprint was first published in 2025 in VeriXiv. It examined the use of routine digital antenatal care data from Tanzania's Unified Community System to develop and test a machine learning model for identifying women at risk of hypertensive disorders during pregnancy.

The work was undertaken by researchers from Prime Health Initiative Tanzania, Ifakara Health Institute, the Ministry of Health, the government office responsible for regional administration and local government, the University of Dodoma, and the Geita Regional Health Secretariat.

The project was funded by the Gates Foundation through the Grand Challenges initiative under Investment ID INV-046249.

Suggested citation:
Lyatuu I, Mwanga E, Kulindwa Y, et al. Harnessing Digital Health and Machine Learning for Early Detection of Hypertensive Disorders in Pregnancy: Insights from low-resource settings, Tanzania. VeriXiv. 2025;2:158. doi:10.12688/verixiv.1245.1.