Calculates medical date windows.
ParameterTypeDefaultRequiredDescription--type, -tstring-YesCalculation type (gestational or followup)--date, -dstring-YesDate in YYYY-MM-DD format--weeksint4NoNumber of weeks for follow-up--window-daysint7NoFollow-up window size in days--output, -ostring-NoOutput JSON file path
bash
# Calculate gestational age
python scripts/main.py --type gestational --date 2024-01-15
# Calculate 4-week follow-up window
python scripts/main.py --type followup --date 2024-03-01
# Calculate custom follow-up (6 weeks)
python scripts/main.py --type followup --date 2024-03-01 --weeks 6
Gestational calculation:
json
{
"lmp_date": "2024-01-15",
"gestational_age": "12 weeks 3 days",
"gestational_age_days": 87,
"estimated_delivery_date": "2024-10-21",
"calculation_date": "2024-04-12"
}
Follow-up calculation:
json
{
"start_date": "2024-03-01",
"followup_weeks": 4,
"window_start": "2024-03-29",
"window_end": "2024-04-05",
"window_range": "2024-03-29 to 2024-04-05"
}
Risk IndicatorAssessmentLevelCode ExecutionPython/R scripts executed locallyMediumNetwork AccessNo external API callsLowFile System AccessRead input files, write output filesMediumInstruction TamperingStandard prompt guidelinesLowData ExposureOutput files saved to workspaceLow
No additional Python packages required.
Current Stage: Draft
Next Review Date: 2026-03-06
Known Issues: None
Planned Improvements: