Women's Health

Track menstrual cycles, get a personalized next-period and fertile-window prediction, period-pain (dysmenorrhea) guidance, and a perimenopause/menopause estimate. Every logged period is written to the patient's record as a FHIR Observation (FHIR is the source of truth); predictions are computed from her own history and are guidance, never a diagnosis.

Base path /observation/api/v1/womens/. Menstrual/SRH data is confidential: access is limited to the woman herself, her treating provider, or a trusted service — never a guardian.

Endpoints

POST/observation/api/v1/womens/cycle/log/Log a period
GET/observation/api/v1/womens/cycle/history/Cycle history
GET/observation/api/v1/womens/cycle/predict/Personalized prediction
POST/observation/api/v1/womens/cycle/schedule-reminders/Schedule cycle reminders
GET/observation/api/v1/womens/dysmenorrhea/guidance/Period-pain guidance
GET/observation/api/v1/womens/menopause/estimate/Menopause estimate + range

Log a period

POST/observation/api/v1/womens/cycle/log/

Request Body

patient_uhidstringrequired

The patient UHID (the woman)

period_start_datedaterequired

YYYY-MM-DD

period_end_datedateoptional

YYYY-MM-DD

flowstringoptional

spotting | light | normal | heavy

pain_severitystringoptional

none | mild | moderate | severe

symptomsstring[]optional

e.g. cramps, mood, headache

notesstringoptional

Free text

Request
bash
curl -X POST https://api.mediloop.co/observation/api/v1/womens/cycle/log/ \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "patient_uhid": "UG123456789A",
    "period_start_date": "2026-07-14",
    "flow": "normal",
    "pain_severity": "moderate",
    "symptoms": ["cramps"]
  }'
RESPONSE201
{
  "log_number": "CYC-20260716-0004",
  "patient_uhid": "UG123456789A",
  "period_start_date": "2026-07-14",
  "cycle_length_days": 28,
  "flow": "normal",
  "observation_fhir_id": "559",
  "synced_to_fhir": false
}

The FHIR Observation is synced asynchronously; observation_fhir_id and synced_to_fhir resolve on the next read of the history. A post-menopausal woman who logs bleeding gets apost_menopausal_bleeding_flag and it is routed to the safeguarding path.

Personalized prediction

Returns the predicted next-period date with a confidence and date range, the fertile window, and any irregularity signals — computed from her own logged cycles (a 28-day guardrail is used only until enough history exists). Guidance, not a diagnosis.

GET/observation/api/v1/womens/cycle/predict/?patient_uhid=UG123456789A
RESPONSE200
{
  "patient_uhid": "UG123456789A",
  "model_version": "cycle-personalized-1.0",
  "confidence": "high",
  "cold_start": false,
  "median_cycle_length_days": 28,
  "predicted_next_period": "2026-08-11",
  "predicted_next_period_range": {
    "earliest": "2026-08-10",
    "latest": "2026-08-12"
  },
  "fertile_window": {
    "start": "2026-07-23",
    "end": "2026-07-28"
  },
  "irregularity_signals": [],
  "suggest_consult": false
}

Menopause estimate

A personalized estimate and range with the explicit caveat that the exact age cannot be predicted (per WHO). Uses her cycle-change history and recorded family menopause age.

GET/observation/api/v1/womens/menopause/estimate/?patient_uhid=UG123456789A
RESPONSE200
{
  "patient_uhid": "UG123456789A",
  "age": 47,
  "stage": "perimenopause",
  "estimated_menopause_age": 51,
  "estimated_range_years": {
    "low": 47,
    "high": 55
  },
  "confidence": "low",
  "caveat": "This is an estimate and a range only. The exact age of menopause cannot be predicted (WHO)."
}

Dysmenorrhea guidance

Self-care guidance and OTC options for period pain, escalating to a consult when pain is severe or disabling.

GET/observation/api/v1/womens/dysmenorrhea/guidance/?patient_uhid=UG123456789A&pain_severity=severe