Digital Antenatal Card

A FHIR-backed antenatal card: opening a pregnancy creates a FHIR EpisodeOfCare and an antenatal CarePlan, generates the WHO recommended 8 ANC contacts, and wires pregnancy into the Preventive Care Engine (pre-eclampsia aspirin/calcium, GDM, perinatal-depression screening). Each contact is captured as an Encounter plus Observations.

Base path /care-coordination/api/v1/antenatal/. Opening/filling requires a provider acting within a facility (or a trusted service).

Endpoints

POST/care-coordination/api/v1/antenatal/pregnancies/open/Open a pregnancy
GET/care-coordination/api/v1/antenatal/card/{uhid}/Get the antenatal card
POST/care-coordination/api/v1/antenatal/contacts/record/Record an ANC contact
GET/care-coordination/api/v1/antenatal/danger-signs/Danger-sign checklist
POST/care-coordination/api/v1/antenatal/danger-signs/screen/Screen danger signs
GET/care-coordination/api/v1/antenatal/weekly-guidance/{uhid}/WOA-driven weekly guidance
POST/care-coordination/api/v1/antenatal/pregnancies/complete/Close the pregnancy

Open a pregnancy

A woman rarely knows on day one and may not know her LMP. Provide any one of: a reliable lmp_date (EDD = LMP + 280 days), an edd_date from a dating scan (the gold standard when LMP is unknown), or a gestational_age_weeks. Weeks of amenorrhoea are always derived from the EDD anchor, and late booking is handled — contacts whose window has already passed are marked missed.

POST/care-coordination/api/v1/antenatal/pregnancies/open/

Request Body

patient_uhidstringrequired

The pregnant woman

lmp_datedateoptional

First day of LNMP (if known)

lmp_certainbooleanoptional

Is the LMP reliable? Default true

Default: true

edd_datedateoptional

EDD from an ultrasound dating scan

edd_methodstringoptional

lmp | ultrasound | clinical

gestational_age_weeksintegeroptional

Clinical GA (with assessed date)

gestational_age_assessed_datedateoptional

Date the GA was assessed

gravidaintegeroptional

Number of pregnancies

paraintegeroptional

Number of births

Request (dating scan)
bash
curl -X POST https://api.mediloop.co/care-coordination/api/v1/antenatal/pregnancies/open/ \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "patient_uhid": "UG123456789A",
    "edd_date": "2026-11-15",
    "edd_method": "ultrasound",
    "gravida": 2, "para": 1
  }'
RESPONSE201
{
  "has_active_pregnancy": true,
  "pregnancy_number": "PREG-20260716-0001",
  "lmp_date": null,
  "edd_date": "2026-11-15",
  "edd_method": "ultrasound",
  "woa_weeks": 22,
  "contacts_total": 8,
  "contacts_missed": 2,
  "booked_late": true
}

Record an ANC contact

Fills a contact at a facility: creates an Encounter and terminology-coded Observations (WOA, fundal height, fetal heart rate, blood pressure, weight, haemoglobin, urine) and records interventions (TT/Td, IPTp, iron-folate, deworming, ITN).

POST/care-coordination/api/v1/antenatal/contacts/record/
Request
bash
curl -X POST https://api.mediloop.co/care-coordination/api/v1/antenatal/contacts/record/ \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "patient_uhid": "UG123456789A",
    "contact_number": 2,
    "measurements": {
      "fundal_height_cm": 20, "fetal_heart_rate": 142,
      "bp_systolic": 118, "bp_diastolic": 76,
      "weight_kg": 62.5, "haemoglobin": 11.2, "urine_protein": "negative"
    },
    "interventions": ["iron-folate", "IPTp"]
  }'

Danger-sign screening

A positive screen (vaginal bleeding, severe headache, convulsions, reduced fetal movement, etc.) routes to the safeguarding/urgent path — never a silent note.

POST/care-coordination/api/v1/antenatal/danger-signs/screen/
RESPONSE201
{
  "patient_uhid": "UG123456789A",
  "is_urgent": true,
  "present_labels": [
    "Vaginal bleeding",
    "Severe or persistent headache"
  ],
  "safeguarding_routed": true,
  "recommendation": "Seek care immediately — go to the nearest health facility or call for help."
}