Maternal Blood Risk Model — GCP Build Roadmap

Prepared for: Chief Technology Officer Author: Nyota Health — Predictive Engineering Branch: predictive-blood-model Date: October 2026


1. Executive summary

This roadmap moves the Maternal Blood Risk Model from its current deterministic, rule-based prototype (live on the Nyota Base44 app) to a production predictive system on Google Cloud Platform (GCP) that scores three domains for women of maternal age:

  1. Blood disorders — anemia, von Willebrand disease (vWD), thrombocytopenia
  2. Heavy menstrual / postpartum bleeding — menorrhagia, postpartum hemorrhage (PPH)
  3. Fibroid development and progression

The goal: a validated, HIPAA-compliant, retrainable model that feeds the existing clinician assessment tool and population dashboard, and that gives MCO executives the risk-stratified visibility they currently lack.

The migration path is non-disruptive: the Base44 backend function (assessBloodRisk) becomes a thin proxy to a GCP Vertex AI endpoint. The frontend, entity, and dashboard do not change. The deterministic prototype stays as a fallback baseline and a calibration reference.


2. Current state — the Base44 prototype (Phase 0)

Already shipped on this branch:

  • Entity: BloodRiskAssessment — persists one record per assessment (patient factors + computed scores + tier + recommendations).
  • Model: base44/shared/bloodRiskModel.ts — evidence-weighted additive scoring, three domains, overall tier (low → critical), auto-generated clinical recommendations.
  • Function: base44/functions/assessBloodRisk/entry.ts — computes, persists, returns.
  • UI: /blood-risk-model — Assess Patient / Result / Population Dashboard tabs.

Why keep it: it is interpretable, auditable, needs no training data, and immediately collects the labeled/usage signal that Phase 2 models will train on. It is the data flywheel — every real assessment becomes a training row with clinician-confirmed labels.


3. Target architecture (GCP)

EHR / Claims (FHIR/HL7/CCDA) ──► Cloud Healthcare API ──► BigQuery (analytics warehouse)
                                                                   │
                                                                   ▼
                                                         Vertex AI Feature Store
                                                                   │
        Vertex AI Pipelines (training) ◄──────────────────────────┤
                   │                                                │
                   ▼                                                │
        Model Registry ──► Vertex AI Endpoints (online) ◄───── Feature Store
                                   │                                ▲
                                   │                                │
        Base44 `assessBloodRisk` function ──► Vertex endpoint ──► scores
                                   │
                                   ▼
                       BloodRiskAssessment entity + Dashboard

| Layer | GCP service | |---|---| | Ingestion / interoperability | Cloud Healthcare API (FHIR R4 store), Pub/Sub | | Analytics warehouse | BigQuery (with BigQuery ML for fast baselines) | | Feature store | Vertex AI Feature Store | | Training / orchestration | Vertex AI Pipelines (TFX), Vertex AI Workbench notebooks | | Models | Vertex AI custom training + AutoML Tables; Model Registry | | Serving | Vertex AI Endpoints (online) + Batch Prediction | | Real-time trigger | Eventarc / Cloud Functions v2 (score on new assessment or new lab result) | | Secrets / config | Secret Manager | | Observability | Cloud Monitoring, Cloud Logging, Vertex AI Model Monitoring (drift, skew, feature attribution) | | Security | IAM (least-privilege), VPC Service Controls, CMEK, Private Service Connect, Assured Workloads (HIPAA) |


4. Data strategy

Sources

  • EHR structured data: CBC, ferritin, iron studies, coagulation panels, vitals, OB history, imaging reports.
  • EHR unstructured: clinical notes (NLP for bleeding descriptions, fibroid size/counts).
  • Imaging: pelvic ultrasound DICOM / measurements (fibroid volume, location) via Vertex AI / DICOMstore.
  • Claims: diagnoses (ICD-10: D25.x fibroids, N92.x heavy bleeding, O72.x PPH, D50–D64 anemias, D68.0 vWD), transfusions, procedures, pharmacy (iron, hormonal therapy).
  • SDOH: Z-codes, food/housing insecurity indices — anemia and PPH outcomes worsen with access barriers.

Labels

  • Blood disorders: Hgb below trimester-specific thresholds, confirmed vWD/thrombocytopenia, transfusion events.
  • Heavy bleeding: documented PPH (estimated blood loss ≥ 500 mL vaginal / ≥ 1000 mL cesarean), menorrhagia (PBAC ≥ 100), iron-deficiency anemia secondary to blood loss.
  • Fibroids: ultrasound-confirmed presence, growth ≥ 25% volume / 6 months, intervention (myomectomy, embolization, ablation).

Cohort: women 15–49 with ≥ 1 maternal-stage encounter (preconception, prenatal, postpartum). Define inclusion/exclusion clearly; handle right-censoring for fibroid progression.

Governance: a single feature dictionary, versioned, with provenance. PHI never leaves the secured GCP project; only de-identified exports for research/external validation.


5. Modeling approach (per domain)

| Domain | Task | Candidate models | Key features | Output | |---|---|---|---|---| | Blood disorders | Multi-label classification (anemia type / severity) + risk of transfusion | Gradient-boosted trees (XGBoost / BQML), logistic regression baseline for interpretability | CBC, ferritin, TSAT, bleeding hx, family hx, parity, BMI, trimester, SDOH | P(deficiency), P(transfusion) | | Heavy bleeding / PPH | Classification (any/severe PPH) + time-to-event for antepartum risk | XGBoost; survival (Cox / DeepSurv) for progression | Prior PPH, fibroids, parity, age, BMI, Hgb, labor factors (when available), antepartum Hgb trend | P(PPH), risk horizon | | Fibroid development/progression | Classification (presence) + longitudinal growth regression | XGBoost for presence; mixed-effects / sequence model for growth; NLP on ultrasound text | Age, race, BMI, parity, family hx, prior fibroid size/location, menarche age | P(fibroid), predicted growth rate |

Calibration is mandatory — clinician trust requires that a "70" means ~70% risk. Use isotonic / Platt calibration on a held-out, time-shifted validation set.

Interpretability: SHAP per-prediction, surfaced in the UI as "top drivers" (the prototype's additive scores already map cleanly to this).

Baseline anchor: every trained model is compared to the Phase 0 deterministic model. A model must beat the prototype on calibration + AUROC + equity before it replaces it.


6. Phased roadmap

Phase 0 — Prototype & data flywheel (✅ done)

  • Deterministic model, entity, dashboard live on Base44.
  • Every assessment persists a labeled record.

Phase 1 — Data foundation (Weeks 1–6)

  • Stand up HIPAA-assured GCP project; Healthcare API FHIR store; BigQuery warehouse.
  • Build ingestion from 1–2 priority EHR + claims feeds.
  • Feature engineering + feature dictionary v1.
  • Retrospective cohort with labels, de-identified, in BigQuery.
  • Exit gate: reproducible feature table + label set for ≥ 1 domain.

Phase 2 — First models (Weeks 7–14)

  • Train supervised models for the highest-signal domain first (recommended: heavy bleeding / PPH — strongest literature, clearest labels, fastest ROI).
  • Then blood disorders, then fibroid progression (fibroid growth is longitudinal and slower to label).
  • Hold-out + temporal validation; calibration; SHAP.
  • Shadow deploy: GCP scores vs. prototype scores in parallel, logged, not shown.
  • Exit gate: model beats prototype on calibration + AUROC + subgroup equity on held-out.

Phase 3 — Deploy & integrate (Weeks 15–20)

  • Vertex AI Endpoints; Base44 assessBloodRisk proxied to GCP (prototype remains fallback).
  • Clinician feedback loop: accept/reject/override captured as labels.
  • Model monitoring: drift, skew, feature attribution, latency.
  • Exit gate: clinician-facing scores are GCP-sourced; feedback loop live.

Phase 4 — Longitudinal & multimodal (Weeks 21–32)

  • Fibroid growth models (imaging + NLP).
  • Postpartum longitudinal risk (late PPH, anemia readmission).
  • Trends over time per patient, not just snapshots.
  • Exit gate: per-patient risk trajectory visible in dashboard.

Phase 5 — Scale, validate, certify (Weeks 33+)

  • Multi-site / multi-MCO external validation.
  • Bias audits across race, geography, payer.
  • Evaluate Software-as-a-Medical-Device (SaMD) classification path if used for diagnosis/treatment decisions; publication.
  • Exit gate: external validation + equity report; expansion plan.

7. Integration with the Nyota app

The cleanest migration keeps the Base44 app as the experience layer and GCP as the intelligence layer:

  1. GCP exposes a Vertex AI online endpoint returning { blood_disorder, bleeding, fibroid, overall, tier, drivers, recommendations }.
  2. The existing assessBloodRisk Base44 backend function is changed to call the GCP endpoint (via fetch, with the auth token from Secret Manager) and persist the returned record — frontend and dashboard unchanged.
  3. The deterministic prototype stays as fallback when GCP is unavailable or for new patients with no history.
  4. Real-time triggers: when a new lab result lands (e.g., CBC), Eventarc → Cloud Function → score → push an updated assessment to the entity, surfacing a refreshed risk to the clinician.

This keeps PHI handling inside GCP's secured perimeter; the Base44 function passes only the minimal feature payload.


8. MLOps & responsible AI

  • Reproducibility: every model version pinned in the registry; training pipelines version-controlled.
  • CI/CD: Vertex AI Pipelines for train→evaluate→register→deploy; gated promotion on metrics.
  • Monitoring: Vertex AI Model Monitoring for feature drift, prediction skew, and per-feature attribution drift; alerts to Cloud Monitoring.
  • Retraining: scheduled + triggered (drift threshold), always A/B against incumbent.
  • Human-in-the-loop: clinician overrides feed labels; no model decision acts without a clinician in the loop.
  • Equity: subgroup performance reported at every promotion gate (race, age band, geography, payer). Reject models that widen disparities.
  • Documentation: model cards for each version.

9. Compliance & security (HIPAA)

  • Assured Workloads / HIPAA-eligible GCP services; BAA in place.
  • PHI stays in the secured project; de-identification before any export.
  • CMEK encryption; VPC Service Controls; Private Service Connect; no public endpoints on data services.
  • Least-privilege IAM; access via short-lived tokens from Secret Manager.
  • Full audit logging; data retention per MCO contracts.
  • If the model is used for diagnosis/treatment (beyond risk stratification support), engage regulatory early on the SaMD path.

10. Success metrics & KPIs

Model

  • AUROC / AUPRC per domain, calibration error (ECE), subgroup parity gap.

Clinical

  • Severe PPH rate, transfusion rate, antepartum anemia at delivery, time-to-fibroid-intervention, avoidable imaging rate.

Operational / MCO

  • Members risk-stratified, care gaps closed, intervention attribution to cost reduction (predicted vs. actual), NICU/LOS impact.

Adoption

  • Assessments per clinician per week, override rate, time-to-act on a high-risk flag.

11. Risks & mitigations

| Risk | Mitigation | |---|---| | Label scarcity for fibroid growth | Start with presence; use ultrasound NLP; partner for imaging data | | Bias amplification (race in fibroid prevalence) | Equity gates; report subgroup metrics; use race only with clinical justification; monitor for harm | | EHR data quality / missing labs | Missingness-aware models; imputation; feature store tracks completeness | | Over-reliance / automation bias | Human-in-the-loop; explainability; override capture | | PHI exposure | GCP secured perimeter; de-id exports; CMEK + VPC SC | | Model drift post-pandemic / guideline changes | Drift monitoring + scheduled retraining |


12. Maximizing clinical & business value

(See companion section in chat: "Ideas to maximize value in blood disorders, heavy bleeding, and fibroids.")


13. Appendix — prototype feature → GCP feature store mapping

| Prototype input | GCP feature (source) | |---|---| | age, bmi, parity, race | Demographics (EHR / claims) | | gestational_age_weeks, stage | OB encounter record (EHR) | | hemoglobin, ferritin | Labs (EHR / FHIR Observation) | | history_fibroids, prior_pph, prior_transfusion | Problem list / procedure history (claims + EHR) | | family_history_blood_disorder | Family-history FHIR resource / NLP of notes | | (new) SDOH flags | Z-codes / social-needs screening | | (new) ultrasound fibroid metrics | Imaging (DICOM / report NLP) |

The prototype's additive weights become the calibration reference and the cold-start for new patients — GCP learns to beat them over time.