Based on Kagan et al 2008 and references within it.
- CRL to GA conversion. Use a look up table to convert Crown-Rump Length (CRL) in mm to Gestational Age (GA) in weeks + days. If CRL is not available, use provided GA. (v2: Adjust for uncertainty in GA if CRL is not available).
- STEP 1: Calculate risk based on age. Based on a look up table. Integrate both lookup tables - Spencer, 2002 and FMF age risk. Use linear interpolation for values in between. Adjust for Gestational Age (GA) at scan date? Use a default or provided GA if CRL is not available. Not test comparision available with a age dependent risk formula from Reynolds et al 1989 (Mathematical basis of multivar risk) -> [Age Odd]
- STEP 2: NT measurement -> likelihood ratio of DM using a 2 component gaussian mixture model. Input: { CRL } - with and without CRL. Based on FMF paper (2008). -> Output Likelihood ratio. 1 test case avaible and one plot for qualitative judgement available. -> [LR(NT)]
- STEP 3: For bHCG and Pappa, estimate MoM based on GA, Parameter concentrations - with adjustment for weight, ethnicity, smoking, conception method, parity??, and assay machine. Outcome logMom values. Keep conc. to MoM conversion modular. Finally will depend on our own study for MoM estimation. For now, will use particular paper for Indian Population. (Kumar et. al.) - (MoM Considerations.docx) -> [logMoM(NT), logMoM(bHCG)]
- STEP 4: Add FHR Marker (Delta FHR) for increase patient specific risk -> [Delta(FHR)]
- STEP 5: Estimate final Likelihood ratio: Age related . A graph of gaussians in 2D for bHCG vs Pappa available for visual/qualitative comparision. (Kagan et al 2008). -> [p ~ N_trivariate(theta0, theta1, theta2, beta0, beta1, beta2) => p(logMoM(NT), logMoM(bHCG), logMoM(Pappa), Delta(FHR)) * Age Odd]
- Synthetic dataset scraped form FMF's online calculator.
- Roche Elecsys's parameter and model information (implement and cross compare).
- Clone the repo.
- Install uv and run
uv sync
to install dependencies. - Run
uv run python estimate_risk.py --crl 60 --ma 35
- Run
uv run pytest
to run tests.