File size: 822 Bytes
877add7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
"""Generate synthetic patient snapshots."""

from __future__ import annotations

import json
from pathlib import Path

from app.common.enums import Difficulty
from app.simulator.patient_generator import generate_patient_profile


def main() -> None:
    root = Path(__file__).resolve().parents[1]
    out_dir = root / "data" / "synthetic"
    out_dir.mkdir(parents=True, exist_ok=True)
    rows = []
    for i in range(20):
        diff = [Difficulty.EASY, Difficulty.MEDIUM, Difficulty.HARD][i % 3]
        rows.append(generate_patient_profile(seed=42 + i, difficulty=diff).model_dump(mode="json"))
    (out_dir / "synthetic_patients.json").write_text(json.dumps(rows, ensure_ascii=True, indent=2), encoding="utf-8")
    print(f"wrote {len(rows)} patients")


if __name__ == "__main__":
    main()