The engine

Determinism you can audit.

At the heart of ObGynAssist™ sits its flagship FetalGrowth engine: biometry, Doppler and maternal data become a sourced classification through one fixed pipeline — no sampling, no hidden state. The same input yields a byte-identical plan, every line traces back to the rule and guideline that produced it, and all ten modules share this foundation: deterministic, sourced, on-device.

v1.56.0Engine version
243Guideline-wired rules
50,000 / 50,000Bit-identical runs
< 0.4 msp95 latency

The pipeline

One input, seven fixed steps.

A case enters as a GrowthInput and leaves as a GrowthOutput — never by a different route. Each step has one job, runs in order, and stamps what it did. Nothing is sampled; nothing is guessed.

Input sanity

Single-field bounds. Gestational age, EFW, Doppler PI, short-term variation and AFI are checked against physical limits before anything downstream runs — so impossible or missing values are rejected, not silently carried forward.

Plausibility gate

Cross-field checks for combinations that can't physically coexist. Hard violations stop the case; soft ones are noted and surfaced afterward. An appropriate-for-GA fetus with abnormal Doppler is not a contradiction — it's the late-onset phenotype the engine is built to catch.

State classification

The data layer. Centiles are computed, the 80-cell gate decides the pathway, and every clinical axis — flow, MCA, ductus venosus, CTG, AFI, maternal factors and multi-visit trajectory — is classified into a single state vector.

Rule selection

The gate picks the rule subset to evaluate. Monochorionic pairs see every table; singletons and DCDA twins are routed to the FGR, AGA or LGA table by size category — so only relevant rules are ever considered.

Layered rule evaluation

Staging takes the highest-priority match (alphabetical tiebreak guards against table drift); surveillance unions modalities and takes the minimum interval; birth timing takes the most urgent signal. The result records exactly which rule IDs fired.

Coherence modifiers

A bank of consistency modifiers plus the maternal, trajectory and Doppler-cascade chains adapt the raw verdict — periviable ordering, term overrides, severe-preeclampsia crossing and more. Each modifier carries a fixed ID and is appended to the audit trail.

Stamp & format

Soft-plausibility notes are appended, then the output is stamped with engineVersion, rulesetSHA and firedRules[] and handed to the formatter — which renders a classification label, an acuity tier, surveillance timing and the citations behind each line.

The pipeline order is fixed in code and documented step by step in the architecture reference. Because the route never branches at random, any output can be replayed from its stamp.

Three-layer gating

It rejects bad input instead of guessing.

A language model fills gaps with confident invention. The engine does the opposite: when the input is nonsensical, physically impossible or simply insufficient, it declines to classify and says why.

01 / Sanity

Input sanity

An 80-cell cartesian gate matrix and single-field bounds catch out-of-range or absent values at the door. Nothing impossible reaches the clinical logic — a refused input returns a clear rejection, not a fabricated answer.

02 / Plausibility

Plausibility (hard + soft)

Cross-field checks for impossible combinations. Hard violations stop the case outright; soft ones — clinically unusual but physically possible — pass through and are flagged as "also note" advisories alongside the plan.

03 / Sufficiency

Sufficiency

When staging genuinely requires data that isn't present, the engine asks for it rather than extrapolating. Where a decision is already determinate — at term, for instance — it ships the coherent plan and notes what would refine the staging.

Declining to answer is a feature.

Every refusal is itself a stamped output — carrying the gate ID that fired (INPUT-VALIDATION-REJECTED, GATE-PLAUSIBILITY-REJECTED-<id>) — so a clinician sees a reason, not a blank. Saying "criteria not met for a confident classification — clinician evaluation required" is safer than a plausible-looking number with no basis.

Provenance & reproducibility

Every output replays bit-for-bit.

Three fields travel with every result. Together they let anyone reconstruct exactly what the engine decided, and why, long after the fact.

engineVersion

The exact engine configuration that produced the output — currently v1.56.0. Pin it, and a retrospective review knows precisely which logic was in force.

rulesetSHA

A full-content CryptoKit SHA-256 over every rule's decision fields — not just its ID. Move a delivery window from 34 to 37 weeks and the hash changes, so a moved threshold can never hide.

firedRules[]

The ordered list of every rule and modifier that fired. Each ID is defined in exactly one place, so any entry is grep-traceable from the output straight down to the code.

0
Runs · 50 configs × 1,000 seeds
0
Bit-identical outputs
0
Divergent results
commit-backed
Determinism proof

For medico-legal review this is the difference between an opinion and a record: a stamped output can be re-run on the same engine version to reproduce the identical plan, byte for byte, with the full chain of fired rules and their guideline sources visible. No black box, no "it depends on the run."

The sentinel

A last check for self-contradiction.

Before any plan renders, an OutputCoherenceGate verifies structural invariants — the relationships an output must never violate, regardless of which rules fired.

  • An FGR classification is never silently blocked.
  • Severe-preeclampsia crossing stays internally consistent.
  • Periviable ordering holds across staging, urgency and timing.

If two parts of an output disagree, the sentinel traps it before a clinician ever sees it — contradictions are caught at the boundary, not in the clinic.

OutputCoherenceGate
Invariant
FGR ⇒ not blocked
✓ holds
Invariant
severe-PE crossing consistent
✓ holds
Invariant
periviable ordering preserved
✓ holds

contradictory output → trapped before render

Rule tables at a glance

243 rules. Five tables. Every one sourced.

The clinical logic is data, not buried code — five rule tables, each entry wired to a named guideline. The engine reads them; it doesn't improvise around them.

Rule table Rules Representative sources
FGR / SGA 112 RCOG GTG 31 · Delphi 2016 · ISUOG · TRUFFLE
AGA 43 NICE NG133 · ISUOG · INTERGROWTH-21st
LGA 26 ACOG · NICE · diabetes-stratified
Twin-pair 43 ISUOG twin · NICE NG137 · Quintero · Solomon
Modifier 19 Coherence · maternal · trajectory · Doppler cascade
Total 243 58 guideline reference cards behind them

One engine, the full spectrum.

Those tables route through eight pathways and four interchangeable centile standards, reaching the locked phenotype set the synthetic harness exercises.

8 pathways 4 centile standards 47 phenotypes

8 pathways

AGA · SGA · FGR · LGA · DCDA · MCDA · MCMA · Periviable.

4 standards

WHO (default, CC-BY) · INTERGROWTH-21st · Hadlock 1991 · NICHD.

47 phenotypes

Locked phenotype set, ~97% reachable in the synthetic harness.

6 dimensions

Staging · disposition · urgency · deliver-now · scan interval · delivery window.

On-device by architecture

No network call. The data stays on the iPhone.

Privacy here isn't a policy bolted on top — it's a property of the design. The engine is pure Swift; it computes the whole plan locally, so patient data never has to leave the device to get an answer.

Local compute

A full sourced plan resolves in under 0.4 ms p95, recomputing in real time — about 250 ms — as you type. No round-trip, no waiting on a server.

No cloud dependency

Determinism and traceability survive offline. With no external service in the loop, there's no remote model to drift and no transcript leaving the phone.

GDPR-ready by design

Built on iOS 17+ with SwiftUI, MVVM and SwiftData. Data minimization is structural — the simplest way to protect data is to never transmit it.

ObGynAssist is a clinical companion and reference tool — App Store category Medical Reference — not a regulated medical device. Its concordance figures are measured on synthetic cases against standard-of-care guideline references, not neonatal outcomes; a prospective clinical-validation study is in design.

Go deeper

Structure is the easy part to claim.

So we measured it. See how the engine holds up under grading, mutation, stress and parity — or look at the ten modules the pipeline powers.