Prevent maternal deaths before the warning signs.

Maternal Intelligence is a Tanzania STG 2021-grounded clinical decision support engine that scores maternal risk, fires real-time guideline alerts, and generates ICD-10-coded care plans at every visit.

9
Conditions covered
38+
Risk indicators monitored
STG 2021
Tanzania guideline grounded
Engine running · Ready
Maternal Health Risk Score
Pre-eclampsia · Patient P-001 · 34 weeks
68
/ 100
High Risk
Blood Pressure
158 / 102
↑ Elevated
Proteinuria
++
Significant
Suspected pre-eclampsia — start close BP and urine monitoring.
STG 2021 · 11.7.3
Initiate urgent referral with pre-referral stabilisation.
National Referral Guideline
Alert
Elevated preeclampsia risk · 34w
9
Maternal conditions covered
38+
Clinical risk indicators
5
Severity levels — low to emergency
100%
Alerts traceable to STG 2021
Real-time
Re-evaluated on every visit

Every two minutes, a woman dies from a preventable pregnancy complication.

Most maternal deaths are preventable when warning signs are caught early. Overworked clinicians, fragmented records, and inconsistent risk screening mean critical signals are missed every day — especially in Tanzania's low-resource settings.

  • Haemorrhage, pre-eclampsia and sepsis — account for over 75% of maternal deaths globally.
  • Risk is dynamic — but most clinics still screen on a static, one-time basis.
  • Tanzania STG 2021 guidelines exist — but applying them at the bedside in real time is hard.
Tanzania
Maternal Health
Outcome
Earlier detection of high-risk pregnancies at every visit.

See the engine in action.

Three real-world cases showing how the engine evaluates different maternal conditions, fires guideline alerts, and generates prioritised interventions.

Pre-eclampsia Severe features at 34w
Gestational Age
34 weeks
Blood Pressure
158 / 102
Proteinuria
++
Headache
Yes
Visual disturbance
Yes
Condition
preeclampsia
Risk Score
68
HIGH
Suspected pre-eclampsia — start BP monitoring
Consider MgSO4 if symptoms progress
Urgent referral with pre-referral stabilisation
Haemorrhage Major PPH at delivery
Days postpartum
0
Blood Loss
1,200 ml
Pulse
128 bpm
Systolic BP
88 mmHg
Uterus Tone
Soft (atony)
Bleeding mins
20 min
Risk Score
95
CRITICAL
Major PPH — activate PPH bundle immediately
Oxytocin 10 IU IV/IM + TXA 1 g IV + uterine massage
Monitor for haemorrhagic shock
Sepsis Puerperal infection day 5
Days postpartum
5
Temperature
38.9°C
Pulse
118 bpm
Systolic BP
86 mmHg
Foul lochia
Yes
Condition
sepsis
Risk Score
62
HIGH
Puerperal sepsis suspected — start antibiotics
IV fluids and close monitoring of vital signs
Urgent referral if no response in 6 hours

Decision support that thinks like an obstetrician.

Continuous Risk Scoring
A rule-based composite model evaluates vitals, labs, and symptom flags at every visit to produce a 0–100 risk score and level — updated in real time.
Bedside STG 2021 Alerts
Actionable, guideline-referenced alerts fire when clinical thresholds are crossed — never a generic warning, always a specific step with a Tanzania STG 2021 citation.
Trimester-Aware Timeline
Track risk trends across every visit. The engine detects worsening, stable, or improving trajectories and adjusts care plan recommendations accordingly.
Explainable & Auditable
Every risk score shows the factors that drove it. Every intervention is traceable to a guideline. ICD-10-coded outputs integrate directly into EHR systems.

Every alert is traceable.

Alerts are not generic warnings. Each one carries a severity level, a clinical message, a specific STG 2021 chapter reference, and a rule ID — so clinicians always know exactly what triggered it and where to find the protocol.

  • Five severity levels: low, medium, high, critical, emergency
  • Every alert includes the exact STG 2021 section reference
  • Machine-readable rule IDs for EHR integration and audit logs
  • Alert score contributions feed directly into the 0–100 composite risk
Anatomy of an Alert
Critical PRE_ECLAMPSIA_SUSPECTED
Suspected pre-eclampsia. Start close BP and urine protein monitoring. Prepare for possible escalation.
STG 2021 · 11.7.3 ICD-10: O14.9
Severity dot + badge
Machine-readable rule ID
Clinical action message
STG chapter reference
ICD-10 code
Severity Scale
Low +4pts Medium +10pts High +18pts Critical +28pts Emergency +35pts

Trained on real Tanzania guidelines. Validated on every visit.

The risk engine combines weighted clinical parameters with a rule-firing system grounded in Tanzania STG 2021. Every score is explainable — clinicians see exactly what drove the alert and which protocol step to follow.

  • Composite 0–100 risk score from vitals and labs
  • Every alert traced to a specific STG 2021 chapter
  • Interventions ranked emergency → low priority
  • Free-text narrative intake via NLP story parser
Risk Indicators
Score contribution by factor
Major haemorrhage ≥ 1000 ml100%
Severe hypertension ≥ 160/11083%
Severe anaemia (Hb < 7 g/dL)73%
Significant proteinuria ++/+++60%
Maternal fever ≥ 38°C47%
Hyperglycaemia33%
9
Conditions
38+
Indicators
Real-time
Per visit

Risk that evolves with every visit.

The engine stores every visit in a patient timeline and derives a trend — worsening, stable, or improving. Care plans adapt automatically based on trajectory, not just a single snapshot.

  • All visits persisted per patient in timeline store
  • Trend derived: improving / stable / worsening
  • Care plans update based on risk trajectory, not just current score
  • GET /cds/timeline/:id returns full history
Patient P-001 · ANC Journey
Risk score across 5 antenatal visits
↑ Worsening
Critical ≥ 80
High ≥ 60
Medium ≥ 35
Low < 35
18 24 38 56 82
10w
Low
18w
Med
26w
Med
32w
High
34w
Critical
Worsening trend detected — care plan escalated to 24-hour reassessment + urgent referral recommendation.

9 conditions. Ethically grounded.

Every condition module is built directly from Tanzania STG 2021 — rules, thresholds, intervention priorities, and ICD-10 mappings are all traceable to a published guideline chapter.

Condition Alerts ICD-10
Pre-eclampsia8O14.x
Postpartum Haemorrhage6O72.x
Sepsis5O85
Anaemia4O99.0
Gestational Diabetes4O24.4
ANC Routine6Z34.x
PNC Routine5Z39.x
Obstructed Labour3O65.x
Maternal Default2O99.8

Type a case. Get a full evaluation.

Clinicians can describe a patient in plain language. The NLP parser extracts condition, vitals, and symptoms automatically — then the full CDS pipeline runs as normal. No structured form required.

  • Extracts BP, gestational age, blood loss, Hb, temperature
  • Infers condition from clinical keywords in the narrative
  • Assigns auto-generated patient ID when none provided
  • POST /cds/story — response includes raw + structured + evaluation
Clinical Narrative Input POST /cds/story
32 year old woman, 34 weeks pregnant, BP 158/102, severe headache, visual disturbance, proteinuria ++. No previous hypertension history. First presentation this visit.
NLP extraction + full CDS evaluation
Structured Case + Evaluation JSON
{
  "patientId": "TZA-847291",
  "condition": "preeclampsia",
  "ga": 34,
  "bpSyst": 158, "bpDiast": 102,
  "proteinuria": "++",
  "headache": true,
  "visualDisturbance": true,
  "risk": { "level": "high", "score": 68 },
  "icd10Code": "O14.9",
  "alerts": [{ "severity": "critical", "stgRef": "STG 2021 11.7.3" }]
}

Six endpoints. One integration.

A lightweight REST API — POST a patient payload or a clinical story, GET a timeline or risk snapshot. Everything returns structured JSON ready for EHR integration.

POST
/cds/evaluate
Core evaluation — runs rules, scores risk, generates ICD-10, alerts, interventions and care plan from a structured patient payload.
POST
/cds/story
Free-text narrative intake. NLP parser extracts clinical parameters then runs the full evaluation pipeline.
GET
/cds/risk/:id
Returns the latest risk score, level, and contributing factors for a given patient from their stored timeline.
GET
/cds/timeline/:id
Returns all recorded visits plus a longitudinal trend summary (improving / stable / worsening) for the patient.
POST
/cds/explain
Accepts an evaluation result and returns a plain-language explanation of the risk level, factors, and active alerts.
GET
/health
Service health check. Returns status and service name. Use for load-balancer and uptime monitoring probes.
Interactive API Documentation Explore all 6 endpoints, try live requests, download the OpenAPI 3.0 spec, and copy ready-to-run curl commands — right in your browser.
OpenAPI JSON  ↗ Open Swagger UI  →
Sample Payloads — 9 Conditions
Copy any example and POST to /cds/evaluate — or paste into Swagger UI above.
Pre-eclampsia
PPH
Sepsis
Anaemia
Gest. Diabetes
ANC Routine
PNC Routine
Obstructed Labour
Maternal Default
SCD
Request body
{
  "patientId": "P-PRE-001",
  "condition": "preeclampsia",
  "ga": 34,
  "bpSyst": 158,
  "bpDiast": 102,
  "proteinuria": "++",
  "headache": true,
  "visualDisturbance": true
}
Expected response
{
  "icd10Code": "O14.9",
  "risk": { "level": "high", "score": 68 },
  "alerts": [{ "severity": "critical",
    "stgRef": "STG 2021 11.7.3" }],
  "interventions": [{ "priority": "emergency" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-PRE-001","condition":"preeclampsia","ga":34,"bpSyst":158,"bpDiast":102,"proteinuria":"++","headache":true,"visualDisturbance":true}'
Request body
{
  "patientId": "P-PPH-001",
  "condition": "postpartum_hemorrhage",
  "daysPostpartum": 0,
  "bloodLoss": 1200,
  "pulse": 128,
  "systolicBP": 88,
  "ongoingBleedingMinutes": 20,
  "uterusTone": "soft"
}
Expected response
{
  "icd10Code": "O72.1",
  "risk": { "level": "critical", "score": 92 },
  "alerts": [{ "severity": "emergency",
    "stgRef": "STG 2021 11.4.2" }],
  "interventions": [{ "priority": "emergency" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-PPH-001","condition":"postpartum_hemorrhage","daysPostpartum":0,"bloodLoss":1200,"pulse":128,"systolicBP":88,"ongoingBleedingMinutes":20,"uterusTone":"soft"}'
Request body
{
  "patientId": "P-SEP-001",
  "condition": "sepsis",
  "daysPostpartum": 5,
  "temperature": 38.9,
  "pulse": 118,
  "systolicBP": 86,
  "foulLochia": true
}
Expected response
{
  "icd10Code": "O85",
  "risk": { "level": "critical", "score": 88 },
  "alerts": [{ "severity": "critical",
    "stgRef": "STG 2021 11.9.1" }],
  "interventions": [{ "priority": "emergency" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-SEP-001","condition":"sepsis","daysPostpartum":5,"temperature":38.9,"pulse":118,"systolicBP":86,"foulLochia":true}'
Request body
{
  "patientId": "P-ANA-001",
  "condition": "anaemia",
  "ga": 30,
  "hb": 6.5
}
Expected response
{
  "icd10Code": "O99.0",
  "risk": { "level": "high", "score": 72 },
  "alerts": [{ "severity": "high",
    "stgRef": "STG 2021 9.1.2" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-ANA-001","condition":"anaemia","ga":30,"hb":6.5}'
Request body
{
  "patientId": "P-GDM-001",
  "condition": "gestational_diabetes",
  "ga": 26,
  "glucoseTestDone": false,
  "glucoseFasting": 5.6,
  "glucoseRandom": 10.4
}
Expected response
{
  "icd10Code": "O24.4",
  "risk": { "level": "medium", "score": 44 },
  "alerts": [{ "severity": "medium",
    "stgRef": "STG 2021 11.6.1" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-GDM-001","condition":"gestational_diabetes","ga":26,"glucoseTestDone":false,"glucoseFasting":5.6,"glucoseRandom":10.4}'
Request body
{
  "patientId": "P-ANC-001",
  "condition": "anc_routine",
  "ga": 24,
  "lastIPTpWeek": 18,
  "ttDoseCount": 1,
  "dewormingGiven": false
}
Expected response
{
  "icd10Code": "Z34.0",
  "risk": { "level": "low", "score": 22 },
  "alerts": [{ "severity": "medium",
    "id": "IPTP_OVERDUE" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-ANC-001","condition":"anc_routine","ga":24,"lastIPTpWeek":18,"ttDoseCount":1,"dewormingGiven":false}'
Request body
{
  "patientId": "P-PNC-001",
  "condition": "pnc_routine",
  "daysPostpartum": 4,
  "pncVisitDone": false,
  "bpSyst": 146,
  "bpDiast": 94,
  "postnatalDepressionScore": 12,
  "breastfeedingDifficulty": true
}
Expected response
{
  "icd10Code": "Z39.1",
  "risk": { "level": "medium", "score": 45 },
  "alerts": [{ "severity": "medium",
    "id": "POSTNATAL_DEPRESSION_RISK" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-PNC-001","condition":"pnc_routine","daysPostpartum":4,"pncVisitDone":false,"bpSyst":146,"bpDiast":94,"postnatalDepressionScore":12,"breastfeedingDifficulty":true}'
Request body
{
  "patientId": "P-OBL-001",
  "condition": "obstructed_labor",
  "ga": 40,
  "laborDurationHours": 18,
  "descentArrested": true,
  "foetalDistress": true,
  "moulding": 3,
  "cervixDilation": 8
}
Expected response
{
  "icd10Code": "O64",
  "risk": { "level": "critical", "score": 95 },
  "alerts": [{ "severity": "emergency",
    "stgRef": "STG 2021 12.3" }]
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-OBL-001","condition":"obstructed_labor","ga":40,"laborDurationHours":18,"descentArrested":true,"foetalDistress":true,"moulding":3,"cervixDilation":8}'
Request body
{
  "patientId": "P-DEF-001",
  "condition": "maternal_default",
  "ga": 28,
  "bpSyst": 132,
  "bpDiast": 86,
  "hb": 10.8,
  "temperature": 36.8
}
Expected response
{
  "icd10Code": "Z34.9",
  "risk": { "level": "low", "score": 18 },
  "alerts": [],
  "interventions": []
}
curl -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"P-DEF-001","condition":"maternal_default","ga":28,"bpSyst":132,"bpDiast":86,"hb":10.8,"temperature":36.8}'
Request body
{
  "patientId": "TZ-SCD-001",
  "condition": "SCD",
  "temperature": 39.0,
  "hb": 4.5,
  "oxygenSat": 90,
  "cough": true,
  "difficultyBreathing": true,
  "fever": true,
  "crisesPerYear": 4,
  "strokeHistory": false,
  "admitted": true
}
Expected response
{
  "icd10Code": "D57.01",
  "risk": { "level": "critical", "score": 97 },
  "alerts": [
    { "id": "SCD_ACUTE_CHEST_SYNDROME", "severity": "emergency" },
    { "id": "SCD_SEVERE_ANAEMIA", "severity": "critical" }
  ],
  "interventions": [
    { "code": "SCD_ACS_PROTOCOL", "priority": "emergency" }
  ]
}
curl -s -X POST https://mama.swahilidevelopers.com/cds/evaluate \
  -H "Content-Type: application/json" \
  -d '{"patientId":"TZ-SCD-001","condition":"SCD","temperature":39.0,"hb":4.5,"oxygenSat":90,"cough":true,"difficultyBreathing":true,"fever":true,"crisesPerYear":4,"strokeHistory":false,"admitted":true}'
POST /cds/evaluate Pre-eclampsia · 34 weeks
Request body
{
  "patientId": "P-001",
  "condition": "preeclampsia",
  "ga": 34,
  "bpSyst": 158,
  "bpDiast": 102,
  "proteinuria": "++",
  "headache": true,
  "visualDisturbance": true
}
Response 200
{
  "icd10Code": "O14.9",
  "risk": {
    "level": "high",
    "score": 68
  },
  "alerts": [{ "severity": "critical",
    "stgRef": "STG 2021 11.7.3" }],
  "interventions": [{ "priority": "emergency" }],
  "longitudinal": { "trend": "stable" }
}

From first visit to safe delivery.

01
Assess
Clinician enters vitals, labs, and symptoms at intake — or submits a free-text narrative. The NLP parser extracts structured clinical parameters automatically.
02
Score
The engine fires STG 2021 rules, calculates a composite 0–100 risk score, selects an ICD-10 code, and appends the visit to the patient's longitudinal timeline.
03
Act
Clinicians receive prioritised interventions with specific protocol steps and STG citations — updated at every visit as the patient's risk trend evolves.

One engine, three audiences.

Whether you're at the bedside, building a system, or setting policy — the engine is designed to serve you directly.

Clinicians
Bedside Decision Support
Get a risk score, guideline alerts, and ranked interventions in seconds — directly from the patient vitals you already have.
  • No training required — submit vitals, receive guidance
  • Story mode — describe the case in plain language
  • Every alert links to the exact STG 2021 protocol
Developers
REST API Integration
Six clean endpoints returning structured JSON. Embed CDS into EMRs, mobile apps, or FHIR pipelines with a single POST request.
  • ICD-10 coded outputs ready for EHR integration
  • Node.js engine — lightweight, no GPU required
  • Guideline rules loaded from hot-reloadable JSON
Health Systems
Standardised Protocols
Deploy a consistent, auditable clinical decision layer across facilities — grounded in Tanzania's national guidelines, traceable in every output.
  • STG 2021 + ANC 2018 grounded rules
  • Longitudinal patient timeline for audit and review
  • Rules updated via JSON — no redeployment needed

Try the engine live.

The full interactive demo is hosted on Hugging Face Spaces. Submit a structured patient intake or paste a free-text clinical narrative — the engine returns a real-time risk score, STG 2021 alerts, ICD-10 code, and prioritised interventions.

  • Structured Intake — enter vitals, labs and condition, get a full JSON evaluation
  • Story Intake — paste a clinical narrative, NLP extracts parameters and evaluates
  • JSON output — risk score, alerts, interventions and ICD-10 code
Open in Hugging Face  ↗
Hosted on Hugging Face Spaces · No sign-in required
huggingface.co/spaces/Japhari/maternal-clinical-decision-support-ai
Maternal Intelligence — CDS Engine
Clinical decision support aligned to STG/NEMLIT 2021 and ANC 2018.
Structured Intake
Story Intake
Patient ID
TZA-DEMO-001
Condition
preeclampsia ▾
Gestational Age (weeks)
34
BP Systolic
158
BP Diastolic
102
Evaluate Case
CDS Output
"risk": {
  "level": "high",
  "score": 68,
  "factors": ["hypertension", "proteinuria"]
},
"icd10Code": "O14.9",
"alerts": [{
  "severity": "critical",
  "stgRef": "STG 2021 11.7.3"
}]
Hosted on
Hugging Face Spaces

Every mother deserves care that's guided by science.

Maternal Intelligence puts Tanzania's best clinical guidelines into the hands of every provider, at every visit, in every facility — no matter the resource level.