Switch to unified view

a b/src/MISC/GenerateNewSynthetic.ipynb
1
{
2
 "cells": [
3
  {
4
   "cell_type": "code",
5
   "execution_count": 2,
6
   "metadata": {},
7
   "outputs": [],
8
   "source": [
9
    "from getpass import getpass\n",
10
    "import os\n",
11
    "\n",
12
    "OPENAI_API_KEY = getpass()\n",
13
    "os.environ[\"OPENAI_API_KEY\"] = OPENAI_API_KEY"
14
   ]
15
  },
16
  {
17
   "cell_type": "code",
18
   "execution_count": 3,
19
   "metadata": {},
20
   "outputs": [],
21
   "source": [
22
    "from langchain.prompts import FewShotPromptTemplate, PromptTemplate\n",
23
    "from langchain_core.pydantic_v1 import BaseModel\n",
24
    "from langchain_experimental.tabular_synthetic_data.openai import (\n",
25
    "    OPENAI_TEMPLATE,\n",
26
    "    create_openai_data_generator,\n",
27
    ")\n",
28
    "\n",
29
    "from langchain_experimental.tabular_synthetic_data.prompts import (\n",
30
    "    SYNTHETIC_FEW_SHOT_PREFIX,\n",
31
    "    SYNTHETIC_FEW_SHOT_SUFFIX,\n",
32
    ")\n",
33
    "from langchain_openai import ChatOpenAI"
34
   ]
35
  },
36
  {
37
   "cell_type": "code",
38
   "execution_count": 4,
39
   "metadata": {},
40
   "outputs": [],
41
   "source": [
42
    "class CancerPatientProfile(BaseModel):\n",
43
    "    patient_id: int\n",
44
    "    patient_age: int\n",
45
    "    patient_sex: str\n",
46
    "    present_condition_history: str\n",
47
    "    cancer_type: str\n",
48
    "    cancer_stage: str\n",
49
    "    cancer_location: str\n",
50
    "    metastatic_locations: str\n",
51
    "    past_medical_history: str\n",
52
    "    symptoms: str\n",
53
    "    allergies: str\n",
54
    "    medications: str\n",
55
    "    genetic_mutations: str\n",
56
    "    diagnosis_staging: str\n",
57
    "    imaging_reports: str\n",
58
    "    pathological_findings: str\n",
59
    "    molecular_testing: str\n",
60
    "    treatment: str\n",
61
    "    adjuvant_therapy: str\n",
62
    "    metastatic_therapy: str\n",
63
    "    medical_examinations: str\n",
64
    "    follow_up_imaging: str\n",
65
    "    treatment_outcomes: str\n",
66
    "    family_history: str"
67
   ]
68
  },
69
  {
70
   "cell_type": "code",
71
   "execution_count": 5,
72
   "metadata": {},
73
   "outputs": [],
74
   "source": [
75
    "examples = [\n",
76
    "    {\n",
77
    "        \"example\": \"\"\"Patient ID: 1012, Age: 58, Sex: F,\n",
78
    "History of Present Condition: Presented with persistent abdominal pain, unintentional weight loss, and changes in bowel habits. Colonoscopy revealed a 6 cm mass in the ascending colon.\n",
79
    "Past Medical History: No significant medical history. Regular screenings revealed no abnormalities.\n",
80
    "Symptoms: Persistent abdominal pain (right-sided), unintentional weight loss, changes in bowel habits (diarrhea and constipation).\n",
81
    "Allergies: Allergic to Penicillin and Codeine.\n",
82
    "Past and Present Medications: No regular medications.\n",
83
    "Genetic Mutations: Underwent genetic testing revealing wild-type KRAS, NRAS, and BRAF.\n",
84
    "Diagnosis Staging: T4aN1bM0, Stage IIIB colorectal adenocarcinoma.\n",
85
    "\n",
86
    "Imaging Reports:\n",
87
    "1. **Colonoscopy:**\n",
88
    "   - Findings: 6 cm mass in the ascending colon, biopsy confirmed adenocarcinoma.\n",
89
    "\n",
90
    "2. **CT Scan of Abdomen and Pelvis:**\n",
91
    "   - Localized tumor in the ascending colon with involvement of adjacent structures.\n",
92
    "\n",
93
    "3. **PET-CT Scan:**\n",
94
    "   - Detected hypermetabolic activity in the primary tumor and regional lymph nodes.\n",
95
    "\n",
96
    "Pathological Findings:\n",
97
    "- Tumor Size: 6 cm\n",
98
    "- Margin Status: Positive\n",
99
    "- Lymphovascular Invasion: Present\n",
100
    "\n",
101
    "Immunohistochemistry Results:\n",
102
    "- CK20: Positive\n",
103
    "- CDX2: Positive\n",
104
    "- Mismatch Repair Proteins: Intact\n",
105
    "\n",
106
    "Molecular Testing:\n",
107
    "- KRAS Mutation: Wild-type\n",
108
    "- NRAS Mutation: Wild-type\n",
109
    "- BRAF Mutation: Wild-type\n",
110
    "\n",
111
    "Treatment History:\n",
112
    "- Underwent laparoscopic right hemicolectomy with clear surgical margins.\n",
113
    "\n",
114
    "Adjuvant Chemotherapy:\n",
115
    "- Initiated adjuvant chemotherapy with FOLFOX regimen.\n",
116
    "\n",
117
    "Medical Examinations:\n",
118
    "1. **Blood Tests:**\n",
119
    "   - Normal complete blood count, liver and kidney function.\n",
120
    "\n",
121
    "2. **Colonoscopic Biopsy Pathology:**\n",
122
    "   - Histology: Moderately differentiated adenocarcinoma.\n",
123
    "   - Tumor Grade: G2.\n",
124
    "\n",
125
    "Follow-up Imaging:\n",
126
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
127
    "\n",
128
    "Treatment Outcomes:\n",
129
    "- Good response to adjuvant chemotherapy with no evidence of disease recurrence.\n",
130
    "\n",
131
    "Family History: Limited family history; paternal grandfather with colorectal cancer at an advanced age.\n",
132
    "\"\"\"\n",
133
    "    },\n",
134
    "\n",
135
    "    {\n",
136
    "        \"example\": \"\"\"Patient ID: 2022, Age: 45, Sex: F,\n",
137
    "History of Present Condition: Noted a painless lump in the left breast during self-examination. Mammogram and biopsy confirmed invasive ductal carcinoma.\n",
138
    "Past Medical History: No significant medical history. Regular mammograms were negative in previous years.\n",
139
    "Symptoms: Painless lump in the left breast.\n",
140
    "Allergies: Allergic to Codeine.\n",
141
    "Past and Present Medications: Occasional use of over-the-counter pain relievers.\n",
142
    "Genetic Mutations: Underwent genetic testing revealing BRCA mutations.\n",
143
    "Diagnosis Staging: T2N0M0, Stage IIA invasive ductal carcinoma.\n",
144
    "\n",
145
    "Imaging Reports:\n",
146
    "1. **Mammogram:**\n",
147
    "   - Detected a 2 cm irregular mass in the left breast.\n",
148
    "\n",
149
    "2. **Breast Ultrasound:**\n",
150
    "   - Confirmed the presence of the mass with no additional suspicious findings.\n",
151
    "\n",
152
    "3. **Core Needle Biopsy:**\n",
153
    "   - Histology: Invasive ductal carcinoma.\n",
154
    "\n",
155
    "Pathological Findings:\n",
156
    "- Tumor Size: 2 cm\n",
157
    "- Hormone Receptor Status: ER-positive, PR-positive, HER2-negative.\n",
158
    "\n",
159
    "Genomic Testing:\n",
160
    "- Oncotype DX test performed, revealing a low recurrence score.\n",
161
    "\n",
162
    "Surgical Procedures:\n",
163
    "- Underwent lumpectomy with sentinel lymph node biopsy.\n",
164
    "\n",
165
    "Adjuvant Therapy:\n",
166
    "- Initiated adjuvant chemotherapy with AC-T regimen.\n",
167
    "- Followed by adjuvant radiotherapy.\n",
168
    "\n",
169
    "Endocrine Therapy:\n",
170
    "- Prescribed tamoxifen for hormonal therapy.\n",
171
    "\n",
172
    "Medical Examinations:\n",
173
    "1. **Blood Tests:**\n",
174
    "   - Normal complete blood count and liver function.\n",
175
    "   - Monitoring tumor markers CA 15-3 and CEA.\n",
176
    "\n",
177
    "2. **Cardiac Evaluation:**\n",
178
    "   - Normal baseline cardiac function before starting chemotherapy.\n",
179
    "\n",
180
    "Follow-up Imaging:\n",
181
    "- Regular mammograms and breast ultrasounds scheduled for surveillance.\n",
182
    "\n",
183
    "Treatment Outcomes:\n",
184
    "- Completed adjuvant chemotherapy and radiotherapy with good tolerance.\n",
185
    "- Ongoing hormonal therapy with tamoxifen.\n",
186
    "\n",
187
    "Family History: Limited family history; no reported history of breast cancer or other malignancies.\n",
188
    "\"\"\"\n",
189
    "    },\n",
190
    "    \n",
191
    "    {\n",
192
    "        \"example\": \"\"\"Patient ID: 3030, Age: 60, Sex: M,\n",
193
    "History of Present Condition: Presented with persistent changes in bowel habits, abdominal pain, and unintentional weight loss. Colonoscopy revealed a 4 cm mass in the rectum.\n",
194
    "Past Medical History: History of irritable bowel syndrome (IBS) managed with dietary modifications. No prior history of colorectal issues.\n",
195
    "Symptoms: Changes in bowel habits (diarrhea and constipation alternately), abdominal pain (lower left quadrant), unintentional weight loss.\n",
196
    "Allergies: Allergic to Soy. Allergies to medications like Ibuprofen or Aspirin.\n",
197
    "Past and Present Medications: Occasional use of over-the-counter antispasmodics for IBS symptoms.\n",
198
    "Genetic Mutations: Underwent genetic testing revealing wild-type KRAS, NRAS, and BRAF.\n",
199
    "Diagnosis Staging: T3N1M0, Stage III rectal adenocarcinoma.\n",
200
    "\n",
201
    "Imaging Reports:\n",
202
    "1. **Colonoscopy:**\n",
203
    "   - Findings: 4 cm mass in the rectum, biopsy confirmed adenocarcinoma.\n",
204
    "\n",
205
    "2. **CT Scan of Abdomen and Pelvis:**\n",
206
    "   - Localized tumor in the rectum with regional lymph node involvement.\n",
207
    "\n",
208
    "3. **MRI Pelvis:**\n",
209
    "   - Detailed visualization of tumor extent and potential involvement of surrounding structures.\n",
210
    "\n",
211
    "Pathological Findings:\n",
212
    "- Tumor Size: 4 cm\n",
213
    "- Differentiation: Moderately differentiated adenocarcinoma.\n",
214
    "\n",
215
    "Molecular Testing:\n",
216
    "- KRAS Mutation: Wild-type\n",
217
    "- NRAS Mutation: Wild-type\n",
218
    "- BRAF Mutation: Wild-type\n",
219
    "\n",
220
    "Treatment:\n",
221
    "- Underwent neoadjuvant chemoradiotherapy followed by low anterior resection.\n",
222
    "\n",
223
    "Adjuvant Chemotherapy:\n",
224
    "- Initiated adjuvant chemotherapy with FOLFOX regimen.\n",
225
    "\n",
226
    "Medical Examinations:\n",
227
    "1. **Blood Tests:**\n",
228
    "   - Normal complete blood count and liver function.\n",
229
    "   - Monitoring for tumor markers CEA and CA 19-9.\n",
230
    "\n",
231
    "2. **Colonoscopic Surveillance:**\n",
232
    "   - Scheduled for regular colonoscopic surveillance.\n",
233
    "\n",
234
    "Follow-up Imaging:\n",
235
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
236
    "\n",
237
    "Treatment Outcomes:\n",
238
    "- Good response to neoadjuvant therapy and successful low anterior resection.\n",
239
    "- Ongoing adjuvant chemotherapy with manageable side effects.\n",
240
    "\n",
241
    "Family History: Limited family history; paternal uncle with colorectal polyps.\n",
242
    "\"\"\"\n",
243
    "    },\n",
244
    "    \n",
245
    "\n",
246
    "    {\n",
247
    "        \"example\": \"\"\"Patient ID: 4040, Age: 65, Sex: F,\n",
248
    "History of Present Condition: Presented with persistent abdominal pain, jaundice, and unintended weight loss. Imaging studies revealed a 3 cm mass in the head of the pancreas.\n",
249
    "Past Medical History: History of type 2 diabetes managed with oral medications. No prior history of pancreatic issues.\n",
250
    "Symptoms: Abdominal pain (epigastric), jaundice, unintended weight loss.\n",
251
    "Allergies: Allergic reactions or adverse events related to the use of heparin.\n",
252
    "Past and Present Medications: Oral antidiabetic medication for type 2 diabetes.\n",
253
    "Genetic Mutations: Underwent genetic testing revealing no known mutations.\n",
254
    "Diagnosis Staging: T3N1M0, Stage II pancreatic adenocarcinoma.\n",
255
    "\n",
256
    "Imaging Reports:\n",
257
    "1. **Abdominal CT Scan:**\n",
258
    "   - Findings: 3 cm mass in the head of the pancreas with involvement of the common bile duct.\n",
259
    "\n",
260
    "2. **MRI Abdomen:**\n",
261
    "   - Detailed visualization of tumor extent and potential vascular involvement.\n",
262
    "\n",
263
    "3. **Endoscopic Ultrasound (EUS):**\n",
264
    "   - Confirmed the presence of the pancreatic mass and obtained fine-needle biopsy for histology.\n",
265
    "\n",
266
    "Pathological Findings:\n",
267
    "- Tumor Size: 3 cm\n",
268
    "- Differentiation: Poorly differentiated adenocarcinoma.\n",
269
    "\n",
270
    "Molecular Testing:\n",
271
    "- No actionable mutations identified.\n",
272
    "\n",
273
    "Treatment:\n",
274
    "- Underwent Whipple procedure for tumor resection.\n",
275
    "\n",
276
    "Adjuvant Chemotherapy:\n",
277
    "- Initiated adjuvant chemotherapy with gemcitabine and capecitabine.\n",
278
    "\n",
279
    "Medical Examinations:\n",
280
    "1. **Blood Tests:**\n",
281
    "   - Monitoring liver function and complete blood count.\n",
282
    "   - Regular monitoring of tumor markers CA 19-9 and CEA.\n",
283
    "\n",
284
    "2. **Pancreatic Enzyme Replacement Therapy (PERT):**\n",
285
    "   - Prescribed PERT due to post-surgical pancreatic insufficiency.\n",
286
    "\n",
287
    "Follow-up Imaging:\n",
288
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
289
    "\n",
290
    "Treatment Outcomes:\n",
291
    "- Successful Whipple procedure with clear surgical margins.\n",
292
    "- Managing chemotherapy-related side effects well.\n",
293
    "\n",
294
    "Family History: Limited family history; no reported history of pancreatic cancer or related conditions.\n",
295
    "\"\"\"\n",
296
    "    },\n",
297
    "    \n",
298
    "   \n",
299
    "    {\n",
300
    "        \"example\": \"\"\"Patient ID: 5050, Age: 55, Sex: M,\n",
301
    "History of Present Condition: Presented with persistent cough, hemoptysis, and chest pain. Imaging studies revealed a 5 cm mass in the right upper lobe of the lung.\n",
302
    "Past Medical History: Former smoker with a 20-pack-year history. No prior history of lung issues.\n",
303
    "Symptoms: Persistent cough, hemoptysis, chest pain (right-sided).\n",
304
    "Allergies: Allergic to contrast media.\n",
305
    "Past and Present Medications: None reported.\n",
306
    "Genetic Mutations: Underwent genetic testing revealing an EGFR mutation.\n",
307
    "Diagnosis Staging: T2bN2M0, Stage IIIA non-small cell lung cancer (adenocarcinoma).\n",
308
    "\n",
309
    "Imaging Reports:\n",
310
    "1. **Chest X-ray:**\n",
311
    "   - Initial finding of a suspicious mass in the right upper lobe.\n",
312
    "\n",
313
    "2. **CT Scan of Chest:**\n",
314
    "   - Confirmed a 5 cm mass in the right upper lobe with hilar and mediastinal lymph node involvement.\n",
315
    "\n",
316
    "3. **Bronchoscopy with Biopsy:**\n",
317
    "   - Histology: Adenocarcinoma with an EGFR mutation.\n",
318
    "\n",
319
    "Molecular Testing:\n",
320
    "- EGFR Mutation: Present.\n",
321
    "\n",
322
    "Treatment:\n",
323
    "- Underwent concurrent chemoradiotherapy with cisplatin and etoposide.\n",
324
    "\n",
325
    "Surgical Consultation:\n",
326
    "- Considered for surgical resection after initial chemoradiotherapy.\n",
327
    "\n",
328
    "Medical Examinations:\n",
329
    "1. **Pulmonary Function Tests:**\n",
330
    "   - Evaluated lung function before and after treatment.\n",
331
    "\n",
332
    "2. **PET-CT Scan:**\n",
333
    "   - Post-treatment scan showed a partial response with decreased metabolic activity.\n",
334
    "\n",
335
    "Follow-up Imaging:\n",
336
    "- Regular CT scans and PET-CT scans for surveillance post-treatment.\n",
337
    "\n",
338
    "Treatment Outcomes:\n",
339
    "- Favorable response to concurrent chemoradiotherapy.\n",
340
    "- Ongoing evaluation for potential surgical intervention.\n",
341
    "\n",
342
    "Family History: Limited family history; no reported history of lung cancer or related conditions.\n",
343
    "\"\"\"\n",
344
    "    },\n",
345
    "    \n",
346
    "\n",
347
    "    {\n",
348
    "        \"example\": \"\"\"Patient ID: 6060, Age: 70, Sex: F,\n",
349
    "History of Present Condition: Presented with persistent upper abdominal pain, unintentional weight loss, and difficulty swallowing. Endoscopy revealed a 6 cm mass in the gastric cardia.\n",
350
    "Past Medical History: History of chronic gastritis managed with proton pump inhibitors. No prior history of gastric issues.\n",
351
    "Symptoms: Persistent upper abdominal pain, unintentional weight loss, dysphagia.\n",
352
    "Allergies: No known allergies.\n",
353
    "Past and Present Medications: Proton pump inhibitors for chronic gastritis.\n",
354
    "Genetic Mutations: Underwent genetic testing revealing no known mutations.\n",
355
    "Diagnosis Staging: T3N1M0, Stage IIB gastric adenocarcinoma.\n",
356
    "\n",
357
    "Imaging Reports:\n",
358
    "1. **Upper Gastrointestinal Endoscopy:**\n",
359
    "   - Findings: 6 cm mass in the gastric cardia.\n",
360
    "\n",
361
    "2. **CT Scan of Abdomen:**\n",
362
    "   - Localized tumor in the gastric cardia with regional lymph node involvement.\n",
363
    "\n",
364
    "3. **Endoscopic Ultrasound (EUS):**\n",
365
    "   - Detailed visualization of tumor depth and potential invasion.\n",
366
    "\n",
367
    "Pathological Findings:\n",
368
    "- Tumor Size: 6 cm\n",
369
    "- Differentiation: Moderately differentiated adenocarcinoma.\n",
370
    "\n",
371
    "Molecular Testing:\n",
372
    "- No actionable mutations identified.\n",
373
    "\n",
374
    "Treatment:\n",
375
    "- Underwent total gastrectomy with D2 lymphadenectomy.\n",
376
    "\n",
377
    "Adjuvant Chemotherapy:\n",
378
    "- Initiated adjuvant chemotherapy with a fluoropyrimidine-based regimen.\n",
379
    "\n",
380
    "Medical Examinations:\n",
381
    "1. **Blood Tests:**\n",
382
    "   - Monitoring complete blood count and liver function.\n",
383
    "   - Regular follow-up for tumor markers CA 19-9 and CEA.\n",
384
    "\n",
385
    "2. **Nutritional Assessment:**\n",
386
    "   - Consulted with a dietitian for post-gastrectomy nutritional support.\n",
387
    "\n",
388
    "Follow-up Imaging:\n",
389
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
390
    "\n",
391
    "Treatment Outcomes:\n",
392
    "- Successful total gastrectomy with clear surgical margins.\n",
393
    "- Adjuvant chemotherapy ongoing with good tolerance.\n",
394
    "\n",
395
    "Family History:\n",
396
    "- Paternal grandmother diagnosed with gastric cancer at an advanced age.\n",
397
    "- Maternal side has a history of colorectal polyps.\n",
398
    "\"\"\"\n",
399
    "    },\n",
400
    "    \n",
401
    "    {\n",
402
    "        \"example\": \"\"\"Patient ID: 8080, Age: 52, Sex: F,\n",
403
    "History of Present Condition: Presented with persistent headaches, visual disturbances, and difficulty with memory. Brain imaging revealed a 5 cm mass in the left temporal lobe.\n",
404
    "Past Medical History: History of hypertension managed with antihypertensive medication. No prior history of neurological issues.\n",
405
    "Symptoms: Persistent headaches, visual disturbances, difficulty with memory.\n",
406
    "Allergies: Allergic to Propofol and Isoflurane.\n",
407
    "Past and Present Medications: Antihypertensive medication.\n",
408
    "Genetic Mutations: Genetic testing revealed an IDH1 mutation and MGMT promoter methylation.\n",
409
    "Diagnosis: Anaplastic astrocytoma, WHO Grade III.\n",
410
    "\n",
411
    "Imaging Reports:\n",
412
    "1. **MRI Brain:**\n",
413
    "   - Findings: 5 cm mass in the left temporal lobe with surrounding edema.\n",
414
    "\n",
415
    "2. **CT Scan of Head:**\n",
416
    "   - Confirmed the presence of the brain mass.\n",
417
    "\n",
418
    "3. **Stereotactic Biopsy:**\n",
419
    "   - Histology: Anaplastic astrocytoma.\n",
420
    "\n",
421
    "Molecular Testing:\n",
422
    "- IDH1 Mutation: Present\n",
423
    "- MGMT Promoter Methylation: Present\n",
424
    "\n",
425
    "Treatment:\n",
426
    "- Underwent stereotactic biopsy followed by concurrent chemoradiotherapy with temozolomide.\n",
427
    "\n",
428
    "Adjuvant Chemotherapy:\n",
429
    "- Initiated adjuvant temozolomide chemotherapy.\n",
430
    "\n",
431
    "Medical Examinations:\n",
432
    "1. **Neurological Assessments:**\n",
433
    "   - Regular assessments for changes in cognitive function and motor skills.\n",
434
    "\n",
435
    "2. **Blood Tests:**\n",
436
    "   - Monitoring complete blood count and liver function.\n",
437
    "   - Regular follow-up for general health status.\n",
438
    "\n",
439
    "Follow-up Imaging:\n",
440
    "- Regular MRI brain scans for surveillance post-surgery and during chemotherapy.\n",
441
    "\n",
442
    "Treatment Outcomes:\n",
443
    "- Partial resection achieved with stabilization of symptoms.\n",
444
    "- Ongoing adjuvant chemotherapy with manageable side effects.\n",
445
    "\n",
446
    "Family History: Limited family history; no reported history of brain cancer or related conditions.\n",
447
    "\"\"\"\n",
448
    "    },\n",
449
    "\n",
450
    "    {\n",
451
    "        \"example\": \"\"\"Patient ID: 9090, Age: 48, Sex: F,\n",
452
    "History of Present Condition: Presented with abdominal bloating, pelvic pain, and changes in bowel habits. Imaging studies revealed a 10 cm mass in the left ovary.\n",
453
    "Past Medical History: History of polycystic ovary syndrome (PCOS). No prior history of gynecological issues.\n",
454
    "Symptoms: Abdominal bloating, pelvic pain (left-sided), changes in bowel habits.\n",
455
    "Allergies: Allergic to Heparin.\n",
456
    "Past and Present Medications: Occasional use of over-the-counter pain relievers for PCOS-related discomfort.\n",
457
    "Genetic Mutations: Underwent genetic testing revealing a BRCA1 mutation.\n",
458
    "Diagnosis Staging: T3cN0M0, Stage IIIc high-grade serous ovarian carcinoma.\n",
459
    "\n",
460
    "Imaging Reports:\n",
461
    "1. **Pelvic Ultrasound:**\n",
462
    "   - Findings: 10 cm mass in the left ovary with peritoneal involvement.\n",
463
    "\n",
464
    "2. **CT Scan of Abdomen and Pelvis:**\n",
465
    "   - Confirmed localized tumor in the left ovary with omental cake formation.\n",
466
    "\n",
467
    "3. **CA-125 Blood Test:**\n",
468
    "   - Elevated CA-125 levels.\n",
469
    "\n",
470
    "Pathological Findings:\n",
471
    "- Tumor Size: 10 cm\n",
472
    "- Histology: High-grade serous ovarian carcinoma.\n",
473
    "\n",
474
    "Molecular Testing:\n",
475
    "- BRCA1 Mutation: Present\n",
476
    "\n",
477
    "Treatment:\n",
478
    "- Underwent total abdominal hysterectomy and bilateral salpingo-oophorectomy.\n",
479
    "\n",
480
    "Adjuvant Chemotherapy:\n",
481
    "- Initiated adjuvant chemotherapy with a carboplatin-paclitaxel regimen.\n",
482
    "\n",
483
    "Medical Examinations:\n",
484
    "1. **Blood Tests:**\n",
485
    "   - Monitoring complete blood count and CA-125 levels.\n",
486
    "\n",
487
    "2. **Genetic Counseling:**\n",
488
    "   - Undertook genetic counseling for family members due to BRCA1 mutation.\n",
489
    "\n",
490
    "Follow-up Imaging:\n",
491
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
492
    "\n",
493
    "Treatment Outcomes:\n",
494
    "- Successful surgical resection with no residual disease.\n",
495
    "- Ongoing adjuvant chemotherapy with good tolerance.\n",
496
    "\n",
497
    "Family History:\n",
498
    "- Maternal side has a history of breast cancer; genetic testing pending for family members.\n",
499
    "\"\"\"\n",
500
    "    },\n",
501
    "    \n",
502
    "    {\n",
503
    "        \"example\": \"\"\"Patient ID: 9090, Age: 48, Sex: F,\n",
504
    "History of Present Condition: Presented with abdominal bloating, pelvic pain, and changes in bowel habits. Imaging studies revealed a 10 cm mass in the left ovary.\n",
505
    "Past Medical History: History of polycystic ovary syndrome (PCOS). No prior history of gynecological issues.\n",
506
    "Symptoms: Abdominal bloating, pelvic pain (left-sided), changes in bowel habits.\n",
507
    "Allergies: Allergic to Lisinopril and Metoprolol.\n",
508
    "Past and Present Medications: Occasional use of over-the-counter pain relievers for PCOS-related discomfort.\n",
509
    "Genetic Mutations: Underwent genetic testing revealing a BRCA1 mutation.\n",
510
    "Diagnosis Staging: T3cN0M0, Stage IIIc high-grade serous ovarian carcinoma.\n",
511
    "\n",
512
    "Imaging Reports:\n",
513
    "1. **Pelvic Ultrasound:**\n",
514
    "   - Findings: 10 cm mass in the left ovary with peritoneal involvement.\n",
515
    "\n",
516
    "2. **CT Scan of Abdomen and Pelvis:**\n",
517
    "   - Confirmed localized tumor in the left ovary with omental cake formation.\n",
518
    "\n",
519
    "3. **CA-125 Blood Test:**\n",
520
    "   - Elevated CA-125 levels.\n",
521
    "\n",
522
    "Pathological Findings:\n",
523
    "- Tumor Size: 10 cm\n",
524
    "- Histology: High-grade serous ovarian carcinoma.\n",
525
    "\n",
526
    "Molecular Testing:\n",
527
    "- BRCA1 Mutation: Present\n",
528
    "\n",
529
    "Treatment:\n",
530
    "- Underwent total abdominal hysterectomy and bilateral salpingo-oophorectomy.\n",
531
    "\n",
532
    "Adjuvant Chemotherapy:\n",
533
    "- Initiated adjuvant chemotherapy with a carboplatin-paclitaxel regimen.\n",
534
    "\n",
535
    "Medical Examinations:\n",
536
    "1. **Blood Tests:**\n",
537
    "   - Monitoring complete blood count and CA-125 levels.\n",
538
    "\n",
539
    "2. **Genetic Counseling:**\n",
540
    "   - Undertook genetic counseling for family members due to BRCA1 mutation.\n",
541
    "\n",
542
    "Follow-up Imaging:\n",
543
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
544
    "\n",
545
    "Treatment Outcomes:\n",
546
    "- Successful surgical resection with no residual disease.\n",
547
    "- Ongoing adjuvant chemotherapy with good tolerance.\n",
548
    "\n",
549
    "Family History:\n",
550
    "- Maternal side has a history of breast cancer; genetic testing pending for family members.\n",
551
    "\"\"\"\n",
552
    "    },\n",
553
    "\n",
554
    "    {\n",
555
    "        \"example\": \"\"\"Patient ID: 11111, Age: 68, Sex: M,\n",
556
    "History of Present Condition: Presented with urinary frequency, hesitancy, and nocturia. Digital rectal examination revealed an abnormal prostate. PSA levels were elevated.\n",
557
    "Past Medical History: History of benign prostatic hyperplasia (BPH) managed with alpha-blockers. Also, diagnosed with hypertension and hyperlipidemia, managed with antihypertensive medication and statins. No prior history of prostate cancer.\n",
558
    "Symptoms: Urinary frequency, hesitancy, nocturia.\n",
559
    "Allergies: No known allergies.\n",
560
    "Past and Present Medications: Alpha-blockers for BPH symptoms, antihypertensive medication, and statins.\n",
561
    "Genetic Mutations: Underwent genetic testing revealing no known mutations.\n",
562
    "Diagnosis Staging: T2bN0M0, Stage II prostate adenocarcinoma.\n",
563
    "\n",
564
    "Imaging Reports:\n",
565
    "1. **Transrectal Ultrasound (TRUS):**\n",
566
    "   - Findings: 2 cm lesion in the right posterior lobe of the prostate.\n",
567
    "\n",
568
    "2. **Prostate Biopsy:**\n",
569
    "   - Histology: Adenocarcinoma with a Gleason score of 7 (3+4).\n",
570
    "\n",
571
    "3. **MRI Prostate:**\n",
572
    "   - Detailed visualization of tumor extent and potential extracapsular extension.\n",
573
    "\n",
574
    "Pathological Findings:\n",
575
    "- Tumor Size: 2 cm\n",
576
    "- Gleason Score: 7 (3+4)\n",
577
    "\n",
578
    "Molecular Testing:\n",
579
    "- No actionable mutations identified.\n",
580
    "\n",
581
    "Treatment:\n",
582
    "- Underwent radical prostatectomy with pelvic lymph node dissection.\n",
583
    "\n",
584
    "Adjuvant Therapy:\n",
585
    "- Initiated adjuvant radiation therapy to the prostate bed.\n",
586
    "\n",
587
    "Medical Examinations:\n",
588
    "1. **PSA Monitoring:**\n",
589
    "   - Regular monitoring of PSA levels post-prostatectomy.\n",
590
    "\n",
591
    "2. **Uroflowmetry:**\n",
592
    "   - Assessing postoperative urinary function.\n",
593
    "\n",
594
    "Follow-up Imaging:\n",
595
    "- Regular MRI scans for surveillance post-surgery and during adjuvant therapy.\n",
596
    "\n",
597
    "Treatment Outcomes:\n",
598
    "- Negative surgical margins with no evidence of residual disease.\n",
599
    "- Ongoing adjuvant radiation therapy with well-tolerated side effects.\n",
600
    "\n",
601
    "Family History:\n",
602
    "- Paternal uncle diagnosed with prostate cancer at an older age.\n",
603
    "\"\"\"\n",
604
    "    },\n",
605
    "    {\n",
606
    "        \"example\": \"\"\"Patient ID: 12121, Age: 55, Sex: F,\n",
607
    "History of Present Condition: Noted a painless lump in the left breast during self-examination. Mammogram and biopsy confirmed invasive ductal carcinoma.\n",
608
    "Past Medical History: Diagnosed with type 2 diabetes at the age of 45, managed with oral hypoglycemic agents. Also, history of hypertension diagnosed at 50, controlled with antihypertensive medication. Experienced a transient ischemic attack (TIA) at 53, currently on antiplatelet therapy. No prior history of breast issues.\n",
609
    "Symptoms: Painless lump in the left breast.\n",
610
    "Allergies: Allergic to Lidocaine.\n",
611
    "Past and Present Medications: Oral hypoglycemic agents, antihypertensive medication, and antiplatelet therapy.\n",
612
    "Genetic Mutations: Underwent genetic testing revealing no BRCA mutations.\n",
613
    "Diagnosis Staging: T2N0M0, Stage IIA invasive ductal carcinoma.\n",
614
    "\n",
615
    "Imaging Reports:\n",
616
    "1. **Mammogram:**\n",
617
    "   - Detected a 2 cm irregular mass in the left breast.\n",
618
    "\n",
619
    "2. **Breast Ultrasound:**\n",
620
    "   - Confirmed the presence of the mass with no additional suspicious findings.\n",
621
    "\n",
622
    "3. **Core Needle Biopsy:**\n",
623
    "   - Histology: Invasive ductal carcinoma.\n",
624
    "\n",
625
    "Pathological Findings:\n",
626
    "- Tumor Size: 2 cm\n",
627
    "- Hormone Receptor Status: ER-positive, PR-positive, HER2-negative.\n",
628
    "\n",
629
    "Genomic Testing:\n",
630
    "- Oncotype DX test performed, revealing an intermediate recurrence score.\n",
631
    "\n",
632
    "Surgical Procedures:\n",
633
    "- Underwent lumpectomy with sentinel lymph node biopsy.\n",
634
    "\n",
635
    "Adjuvant Therapy:\n",
636
    "- Initiated adjuvant chemotherapy with AC-T regimen.\n",
637
    "- Followed by adjuvant radiotherapy.\n",
638
    "\n",
639
    "Endocrine Therapy:\n",
640
    "- Prescribed aromatase inhibitor for hormonal therapy.\n",
641
    "\n",
642
    "Medical Examinations:\n",
643
    "1. **Blood Tests:**\n",
644
    "   - Monitoring complete blood count, liver function, and HbA1c levels.\n",
645
    "\n",
646
    "2. **Cardiac Evaluation:**\n",
647
    "   - Regular cardiac assessments due to prior TIA.\n",
648
    "\n",
649
    "Follow-up Imaging:\n",
650
    "- Regular mammograms and breast ultrasounds scheduled for surveillance.\n",
651
    "\n",
652
    "Treatment Outcomes:\n",
653
    "- Successful lumpectomy with clear surgical margins.\n",
654
    "- Completed adjuvant chemotherapy and radiotherapy with good tolerance.\n",
655
    "\n",
656
    "Family History:\n",
657
    "- Maternal side has a history of breast cancer; genetic counseling recommended for family members.\n",
658
    "\"\"\"\n",
659
    "    },\n",
660
    "    \n",
661
    "    {\n",
662
    "        \"example\": \"\"\"Patient ID: 13131, Age: 62, Sex: M,\n",
663
    "History of Present Condition: Presented with persistent cough, hemoptysis, and chest pain. Imaging studies revealed a 5 cm mass in the right upper lobe of the lung.\n",
664
    "Past Medical History: Diagnosed with chronic obstructive pulmonary disease (COPD) at the age of 55, managed with bronchodilators and inhaled corticosteroids. Also, history of coronary artery disease (CAD) with a previous myocardial infarction at 58, managed with antiplatelet therapy and statins. No prior history of lung issues.\n",
665
    "Symptoms: Persistent cough, hemoptysis, chest pain (right-sided).\n",
666
    "Allergies: Allergic to Ibuprofen and Aspirin.\n",
667
    "Past and Present Medications: Bronchodilators, inhaled corticosteroids, antiplatelet therapy, and statins.\n",
668
    "Genetic Mutations: Underwent genetic testing revealing no EGFR or ALK mutations.\n",
669
    "Diagnosis Staging: T2bN2M0, Stage IIIA non-small cell lung cancer (adenocarcinoma).\n",
670
    "\n",
671
    "Imaging Reports:\n",
672
    "1. **Chest X-ray:**\n",
673
    "   - Initial finding of a suspicious mass in the right upper lobe.\n",
674
    "\n",
675
    "2. **CT Scan of Chest:**\n",
676
    "   - Confirmed a 5 cm mass in the right upper lobe with hilar and mediastinal lymph node involvement.\n",
677
    "\n",
678
    "3. **Bronchoscopy with Biopsy:**\n",
679
    "   - Histology: Adenocarcinoma with no actionable mutations.\n",
680
    "\n",
681
    "Molecular Testing:\n",
682
    "- EGFR Mutation: Absent\n",
683
    "- ALK Rearrangement: Absent\n",
684
    "\n",
685
    "Treatment:\n",
686
    "- Underwent concurrent chemoradiotherapy with cisplatin and etoposide.\n",
687
    "\n",
688
    "Surgical Consultation:\n",
689
    "- Considered for surgical resection after initial chemoradiotherapy.\n",
690
    "\n",
691
    "Medical Examinations:\n",
692
    "1. **Pulmonary Function Tests:**\n",
693
    "   - Monitored lung function before and after treatment.\n",
694
    "\n",
695
    "2. **Cardiac Evaluations:**\n",
696
    "   - Regular assessments due to prior myocardial infarction.\n",
697
    "\n",
698
    "Follow-up Imaging:\n",
699
    "- Regular CT scans for surveillance post-treatment.\n",
700
    "\n",
701
    "Treatment Outcomes:\n",
702
    "- Favorable response to concurrent chemoradiotherapy.\n",
703
    "- Ongoing evaluation for potential surgical intervention.\n",
704
    "\n",
705
    "Family History:\n",
706
    "- Paternal side has a history of COPD; genetic counseling recommended for family members.\n",
707
    "\"\"\"\n",
708
    "    },\n",
709
    "    \n",
710
    "    \n",
711
    "{        \"example\": \"\"\"Patient ID: 15151, Age: 55, Sex: M,\n",
712
    "History of Present Condition: Presented with persistent changes in bowel habits, rectal bleeding, and abdominal pain. Colonoscopy revealed a 6 cm mass in the sigmoid colon.\n",
713
    "Past Medical History: Diagnosed with hypertension at 50, managed with antihypertensive medication. No prior history of gastrointestinal issues.\n",
714
    "Symptoms: Changes in bowel habits, rectal bleeding, abdominal pain (left lower quadrant).\n",
715
    "Allergies: Allergic to Fentanyl and Morphine.\n",
716
    "Past and Present Medications: Antihypertensive medication.\n",
717
    "Genetic Mutations: Underwent genetic testing revealing no known mutations.\n",
718
    "Diagnosis Staging: T3N1M0, Stage IIIA colorectal adenocarcinoma.\n",
719
    "\n",
720
    "Imaging Reports:\n",
721
    "1. **Colonoscopy:**\n",
722
    "   - Detected a 6 cm mass in the sigmoid colon.\n",
723
    "\n",
724
    "2. **CT Scan of Abdomen and Pelvis:**\n",
725
    "   - Confirmed localized tumor with regional lymph node involvement.\n",
726
    "\n",
727
    "3. **Biopsy:**\n",
728
    "   - Histology: Moderately differentiated adenocarcinoma.\n",
729
    "\n",
730
    "Molecular Testing:\n",
731
    "- No actionable mutations identified.\n",
732
    "\n",
733
    "Treatment:\n",
734
    "- Underwent sigmoid colectomy with regional lymph node dissection.\n",
735
    "\n",
736
    "Adjuvant Chemotherapy:\n",
737
    "- Initiated adjuvant chemotherapy with FOLFOX regimen.\n",
738
    "\n",
739
    "Medical Examinations:\n",
740
    "1. **Colonoscopy Surveillance:**\n",
741
    "   - Scheduled for regular follow-up colonoscopies.\n",
742
    "\n",
743
    "2. **Blood Pressure Monitoring:**\n",
744
    "   - Ongoing management of hypertension during cancer treatment.\n",
745
    "\n",
746
    "Follow-up Imaging:\n",
747
    "- Regular CT scans for surveillance post-surgery and during chemotherapy.\n",
748
    "\n",
749
    "Treatment Outcomes:\n",
750
    "- Successful sigmoid colectomy with clear surgical margins.\n",
751
    "- Ongoing adjuvant chemotherapy with manageable side effects.\n",
752
    "\n",
753
    "Family History:\n",
754
    "- Maternal side has a history of colorectal polyps; genetic counseling recommended for family members.\n",
755
    "\"\"\"\n",
756
    "}\n",
757
    "# Include other patient profiles in a similar format\n",
758
    "]\n"
759
   ]
760
  },
761
  {
762
   "cell_type": "code",
763
   "execution_count": null,
764
   "metadata": {},
765
   "outputs": [],
766
   "source": [
767
    "len(examples)"
768
   ]
769
  },
770
  {
771
   "cell_type": "code",
772
   "execution_count": 5,
773
   "metadata": {},
774
   "outputs": [],
775
   "source": [
776
    "# Define the prompt template\n",
777
    "SYNTHETIC_FEW_SHOT_PREFIX = \"\"\"Given this {task}. You are a clinical assistant and you should generate a clinically rich and detailed synthetic cancer patient profile using the provided information as a foundation. \n",
778
    "You can go beyond the information provided in the examples to create a comprehensive cancer patient profile, but following the same logic as the exmaples provided to you.\n",
779
    "Include extensive details to simulate a real medical case. Consider the patient's age, sex, present and past medical history, condition, current symptoms, diagnostic and therapeutic procedures,\n",
780
    "imaging reports, genetic mutations, treatment modalities, treatment outcomes, and relevant family history. \n",
781
    "Ensure the profile is clinically plausible and reflects the complexities often encountered in oncology cases.  \n",
782
    "Your goal is to create a thorough and informative narrative that healthcare professionals could encounter in a real-world clinical setting.\\n\\n\"\"\"\n",
783
    "\n",
784
    "SYNTHETIC_FEW_SHOT_PREFIX = \"\"\"Include comprehensive details to simulate a real medical case to complete the {subject}. See the provided context examples for inspiration, but you are free to generate any information not necessarily included in the examples. \n",
785
    "Consider the patient's age, sex, past medical history, current symptoms, diagnostic procedures, imaging reports, genetic mutations, treatment modalities, treatment outcomes, and relevant family history. Ensure the profile is plausible and reflects the complexities often encountered in oncology cases. \n",
786
    "Your goal is to create a thorough and informative narrative that healthcare professionals could encounter in a real-world clinical setting. Consider {extra} \\n\\n\"\"\"\n",
787
    "\n",
788
    "\n",
789
    "OPENAI_TEMPLATE = PromptTemplate(input_variables=[\"example\"], template=\"{example}\")\n",
790
    "\n",
791
    "prompt_template = FewShotPromptTemplate(\n",
792
    "    prefix=SYNTHETIC_FEW_SHOT_PREFIX,\n",
793
    "    examples=examples,\n",
794
    "    suffix=SYNTHETIC_FEW_SHOT_SUFFIX,\n",
795
    "    input_variables=[\"task\", \"extra\"],\n",
796
    "    example_prompt=OPENAI_TEMPLATE,\n",
797
    ")\n"
798
   ]
799
  },
800
  {
801
   "cell_type": "code",
802
   "execution_count": 6,
803
   "metadata": {},
804
   "outputs": [],
805
   "source": [
806
    "synthetic_data_generator = create_openai_data_generator(\n",
807
    "    output_schema=CancerPatientProfile,\n",
808
    "    llm=ChatOpenAI(\n",
809
    "        temperature=0.75,\n",
810
    "    ),  # You'll need to replace with your actual Language Model instance\n",
811
    "    prompt=prompt_template,\n",
812
    ")"
813
   ]
814
  },
815
  {
816
   "cell_type": "code",
817
   "execution_count": 13,
818
   "metadata": {},
819
   "outputs": [
820
    {
821
     "name": "stdout",
822
     "output_type": "stream",
823
     "text": [
824
      "0\n",
825
      "1\n",
826
      "2\n",
827
      "3\n",
828
      "4\n"
829
     ]
830
    }
831
   ],
832
   "source": [
833
    "synthetic_results = []\n",
834
    "for i in range(5):\n",
835
    "    print(i)\n",
836
    "    synthetic_results.extend(synthetic_data_generator.generate(\n",
837
    "        subject=\"generation of synthetic cancer patient clinical data\",\n",
838
    "        extra=\"Patient ID should be 8 digits and generated randomly. Do not repeat the same patient more than once. Try to be creative in wording and details, do not sound monotonic\",\n",
839
    "        runs=20,\n",
840
    "    )\n",
841
    "    )"
842
   ]
843
  },
844
  {
845
   "cell_type": "code",
846
   "execution_count": null,
847
   "metadata": {},
848
   "outputs": [],
849
   "source": []
850
  },
851
  {
852
   "cell_type": "code",
853
   "execution_count": 14,
854
   "metadata": {},
855
   "outputs": [
856
    {
857
     "name": "stdout",
858
     "output_type": "stream",
859
     "text": [
860
      "Data saved to ../data/synthetic_patients/7070.json\n",
861
      "Data saved to ../data/synthetic_patients/17171.json\n",
862
      "Data saved to ../data/synthetic_patients/2020.json\n",
863
      "Data saved to ../data/synthetic_patients/3030.json\n",
864
      "Data saved to ../data/synthetic_patients/2525.json\n",
865
      "Data saved to ../data/synthetic_patients/5050.json\n",
866
      "Data saved to ../data/synthetic_patients/6060.json\n",
867
      "Data saved to ../data/synthetic_patients/7071.json\n",
868
      "Data saved to ../data/synthetic_patients/8080.json\n",
869
      "Data saved to ../data/synthetic_patients/9999.json\n",
870
      "Data saved to ../data/synthetic_patients/9090.json\n",
871
      "Data saved to ../data/synthetic_patients/1111.json\n",
872
      "Data saved to ../data/synthetic_patients/12345.json\n",
873
      "Data saved to ../data/synthetic_patients/9998.json\n",
874
      "Data saved to ../data/synthetic_patients/7777.json\n",
875
      "Data saved to ../data/synthetic_patients/7778.json\n",
876
      "Data saved to ../data/synthetic_patients/1010.json\n",
877
      "Data saved to ../data/synthetic_patients/1357.json\n",
878
      "Data saved to ../data/synthetic_patients/2468.json\n",
879
      "Data saved to ../data/synthetic_patients/2021.json\n",
880
      "Data saved to ../data/synthetic_patients/3333.json\n",
881
      "Data saved to ../data/synthetic_patients/5555.json\n",
882
      "Data saved to ../data/synthetic_patients/7779.json\n",
883
      "Data saved to ../data/synthetic_patients/2469.json\n",
884
      "Data saved to ../data/synthetic_patients/8888.json\n",
885
      "Data saved to ../data/synthetic_patients/9876.json\n",
886
      "Data saved to ../data/synthetic_patients/1111.json\n",
887
      "Data saved to ../data/synthetic_patients/9999.json\n",
888
      "Data saved to ../data/synthetic_patients/1234.json\n",
889
      "Data saved to ../data/synthetic_patients/7777.json\n",
890
      "Data saved to ../data/synthetic_patients/6543.json\n",
891
      "Data saved to ../data/synthetic_patients/1357.json\n",
892
      "Data saved to ../data/synthetic_patients/7777.json\n",
893
      "Data saved to ../data/synthetic_patients/2468.json\n",
894
      "Data saved to ../data/synthetic_patients/3698.json\n",
895
      "Data saved to ../data/synthetic_patients/5555.json\n",
896
      "Data saved to ../data/synthetic_patients/7777.json\n",
897
      "Data saved to ../data/synthetic_patients/2468.json\n",
898
      "Data saved to ../data/synthetic_patients/8888.json\n",
899
      "Data saved to ../data/synthetic_patients/8888.json\n",
900
      "Data saved to ../data/synthetic_patients/9876.json\n",
901
      "Data saved to ../data/synthetic_patients/1111.json\n",
902
      "Data saved to ../data/synthetic_patients/1234.json\n",
903
      "Data saved to ../data/synthetic_patients/9999.json\n",
904
      "Data saved to ../data/synthetic_patients/2468.json\n",
905
      "Data saved to ../data/synthetic_patients/1357.json\n",
906
      "Data saved to ../data/synthetic_patients/6543.json\n",
907
      "Data saved to ../data/synthetic_patients/1357.json\n",
908
      "Data saved to ../data/synthetic_patients/7777.json\n",
909
      "Data saved to ../data/synthetic_patients/5555.json\n",
910
      "Data saved to ../data/synthetic_patients/3698.json\n",
911
      "Data saved to ../data/synthetic_patients/7777.json\n",
912
      "Data saved to ../data/synthetic_patients/7777.json\n",
913
      "Data saved to ../data/synthetic_patients/2468.json\n",
914
      "Data saved to ../data/synthetic_patients/8888.json\n",
915
      "Data saved to ../data/synthetic_patients/1111.json\n",
916
      "Data saved to ../data/synthetic_patients/1234.json\n",
917
      "Data saved to ../data/synthetic_patients/9999.json\n",
918
      "Data saved to ../data/synthetic_patients/9632.json\n",
919
      "Data saved to ../data/synthetic_patients/7771.json\n",
920
      "Data saved to ../data/synthetic_patients/2463.json\n",
921
      "Data saved to ../data/synthetic_patients/5555.json\n",
922
      "Data saved to ../data/synthetic_patients/7779.json\n",
923
      "Data saved to ../data/synthetic_patients/5555.json\n",
924
      "Data saved to ../data/synthetic_patients/7772.json\n",
925
      "Data saved to ../data/synthetic_patients/7778.json\n",
926
      "Data saved to ../data/synthetic_patients/1357.json\n",
927
      "Data saved to ../data/synthetic_patients/7773.json\n",
928
      "Data saved to ../data/synthetic_patients/2468.json\n",
929
      "Data saved to ../data/synthetic_patients/1111.json\n",
930
      "Data saved to ../data/synthetic_patients/1001.json\n",
931
      "Data saved to ../data/synthetic_patients/9632.json\n",
932
      "Data saved to ../data/synthetic_patients/8888.json\n",
933
      "Data saved to ../data/synthetic_patients/9999.json\n",
934
      "Data saved to ../data/synthetic_patients/2469.json\n",
935
      "Data saved to ../data/synthetic_patients/8889.json\n",
936
      "Data saved to ../data/synthetic_patients/7777.json\n",
937
      "Data saved to ../data/synthetic_patients/5555.json\n",
938
      "Data saved to ../data/synthetic_patients/3333.json\n",
939
      "Data saved to ../data/synthetic_patients/7779.json\n",
940
      "Data saved to ../data/synthetic_patients/1234.json\n",
941
      "Data saved to ../data/synthetic_patients/7776.json\n",
942
      "Data saved to ../data/synthetic_patients/7778.json\n",
943
      "Data saved to ../data/synthetic_patients/7531.json\n",
944
      "Data saved to ../data/synthetic_patients/1111.json\n",
945
      "Data saved to ../data/synthetic_patients/6543.json\n",
946
      "Data saved to ../data/synthetic_patients/1010.json\n",
947
      "Data saved to ../data/synthetic_patients/9876.json\n",
948
      "Data saved to ../data/synthetic_patients/9999.json\n",
949
      "Data saved to ../data/synthetic_patients/8888.json\n",
950
      "Data saved to ../data/synthetic_patients/8889.json\n",
951
      "Data saved to ../data/synthetic_patients/5555.json\n",
952
      "Data saved to ../data/synthetic_patients/6666.json\n",
953
      "Data saved to ../data/synthetic_patients/2468.json\n",
954
      "Data saved to ../data/synthetic_patients/7779.json\n",
955
      "Data saved to ../data/synthetic_patients/1234.json\n",
956
      "Data saved to ../data/synthetic_patients/7777.json\n",
957
      "Data saved to ../data/synthetic_patients/2468.json\n",
958
      "Data saved to ../data/synthetic_patients/1111.json\n",
959
      "Data saved to ../data/synthetic_patients/7771.json\n",
960
      "Data saved to ../data/synthetic_patients/76543210.json\n",
961
      "Data saved to ../data/synthetic_patients/12345678.json\n",
962
      "Data saved to ../data/synthetic_patients/98765432.json\n",
963
      "Data saved to ../data/synthetic_patients/65432109.json\n",
964
      "Data saved to ../data/synthetic_patients/13579246.json\n",
965
      "Data saved to ../data/synthetic_patients/88888888.json\n",
966
      "Data saved to ../data/synthetic_patients/98765432.json\n",
967
      "Data saved to ../data/synthetic_patients/76543210.json\n",
968
      "Data saved to ../data/synthetic_patients/98765432.json\n",
969
      "Data saved to ../data/synthetic_patients/12345679.json\n",
970
      "Data saved to ../data/synthetic_patients/87654321.json\n",
971
      "Data saved to ../data/synthetic_patients/24681357.json\n",
972
      "Data saved to ../data/synthetic_patients/34658901.json\n",
973
      "Data saved to ../data/synthetic_patients/98765432.json\n",
974
      "Data saved to ../data/synthetic_patients/35782649.json\n",
975
      "Data saved to ../data/synthetic_patients/36985214.json\n",
976
      "Data saved to ../data/synthetic_patients/98765432.json\n",
977
      "Data saved to ../data/synthetic_patients/31415926.json\n",
978
      "Data saved to ../data/synthetic_patients/12345678.json\n",
979
      "Data saved to ../data/synthetic_patients/65432109.json\n",
980
      "Data saved to ../data/synthetic_patients/7070.json\n",
981
      "Data saved to ../data/synthetic_patients/17171.json\n",
982
      "Data saved to ../data/synthetic_patients/2020.json\n",
983
      "Data saved to ../data/synthetic_patients/3030.json\n",
984
      "Data saved to ../data/synthetic_patients/2525.json\n",
985
      "Data saved to ../data/synthetic_patients/5050.json\n",
986
      "Data saved to ../data/synthetic_patients/6060.json\n",
987
      "Data saved to ../data/synthetic_patients/7071.json\n",
988
      "Data saved to ../data/synthetic_patients/8080.json\n",
989
      "Data saved to ../data/synthetic_patients/9999.json\n",
990
      "Data saved to ../data/synthetic_patients/9090.json\n",
991
      "Data saved to ../data/synthetic_patients/1111.json\n",
992
      "Data saved to ../data/synthetic_patients/12345.json\n",
993
      "Data saved to ../data/synthetic_patients/9998.json\n",
994
      "Data saved to ../data/synthetic_patients/7777.json\n",
995
      "Data saved to ../data/synthetic_patients/7778.json\n",
996
      "Data saved to ../data/synthetic_patients/1010.json\n",
997
      "Data saved to ../data/synthetic_patients/1357.json\n",
998
      "Data saved to ../data/synthetic_patients/2468.json\n",
999
      "Data saved to ../data/synthetic_patients/2021.json\n",
1000
      "Data saved to ../data/synthetic_patients/3333.json\n",
1001
      "Data saved to ../data/synthetic_patients/5555.json\n",
1002
      "Data saved to ../data/synthetic_patients/7779.json\n",
1003
      "Data saved to ../data/synthetic_patients/2469.json\n",
1004
      "Data saved to ../data/synthetic_patients/8888.json\n",
1005
      "Data saved to ../data/synthetic_patients/9876.json\n",
1006
      "Data saved to ../data/synthetic_patients/1111.json\n",
1007
      "Data saved to ../data/synthetic_patients/9999.json\n",
1008
      "Data saved to ../data/synthetic_patients/1234.json\n",
1009
      "Data saved to ../data/synthetic_patients/7777.json\n",
1010
      "Data saved to ../data/synthetic_patients/6543.json\n",
1011
      "Data saved to ../data/synthetic_patients/1357.json\n",
1012
      "Data saved to ../data/synthetic_patients/7777.json\n",
1013
      "Data saved to ../data/synthetic_patients/2468.json\n",
1014
      "Data saved to ../data/synthetic_patients/3698.json\n",
1015
      "Data saved to ../data/synthetic_patients/5555.json\n",
1016
      "Data saved to ../data/synthetic_patients/7777.json\n",
1017
      "Data saved to ../data/synthetic_patients/2468.json\n",
1018
      "Data saved to ../data/synthetic_patients/8888.json\n",
1019
      "Data saved to ../data/synthetic_patients/8888.json\n",
1020
      "Data saved to ../data/synthetic_patients/9876.json\n",
1021
      "Data saved to ../data/synthetic_patients/1111.json\n",
1022
      "Data saved to ../data/synthetic_patients/1234.json\n",
1023
      "Data saved to ../data/synthetic_patients/9999.json\n",
1024
      "Data saved to ../data/synthetic_patients/2468.json\n",
1025
      "Data saved to ../data/synthetic_patients/1357.json\n",
1026
      "Data saved to ../data/synthetic_patients/6543.json\n",
1027
      "Data saved to ../data/synthetic_patients/1357.json\n",
1028
      "Data saved to ../data/synthetic_patients/7777.json\n",
1029
      "Data saved to ../data/synthetic_patients/5555.json\n",
1030
      "Data saved to ../data/synthetic_patients/3698.json\n",
1031
      "Data saved to ../data/synthetic_patients/7777.json\n",
1032
      "Data saved to ../data/synthetic_patients/7777.json\n",
1033
      "Data saved to ../data/synthetic_patients/2468.json\n",
1034
      "Data saved to ../data/synthetic_patients/8888.json\n",
1035
      "Data saved to ../data/synthetic_patients/1111.json\n",
1036
      "Data saved to ../data/synthetic_patients/1234.json\n",
1037
      "Data saved to ../data/synthetic_patients/9999.json\n",
1038
      "Data saved to ../data/synthetic_patients/9632.json\n",
1039
      "Data saved to ../data/synthetic_patients/7771.json\n",
1040
      "Data saved to ../data/synthetic_patients/2463.json\n",
1041
      "Data saved to ../data/synthetic_patients/5555.json\n",
1042
      "Data saved to ../data/synthetic_patients/7779.json\n",
1043
      "Data saved to ../data/synthetic_patients/5555.json\n",
1044
      "Data saved to ../data/synthetic_patients/7772.json\n",
1045
      "Data saved to ../data/synthetic_patients/7778.json\n",
1046
      "Data saved to ../data/synthetic_patients/1357.json\n",
1047
      "Data saved to ../data/synthetic_patients/7773.json\n",
1048
      "Data saved to ../data/synthetic_patients/2468.json\n",
1049
      "Data saved to ../data/synthetic_patients/1111.json\n",
1050
      "Data saved to ../data/synthetic_patients/1001.json\n",
1051
      "Data saved to ../data/synthetic_patients/9632.json\n",
1052
      "Data saved to ../data/synthetic_patients/8888.json\n",
1053
      "Data saved to ../data/synthetic_patients/9999.json\n",
1054
      "Data saved to ../data/synthetic_patients/2469.json\n",
1055
      "Data saved to ../data/synthetic_patients/8889.json\n",
1056
      "Data saved to ../data/synthetic_patients/7777.json\n",
1057
      "Data saved to ../data/synthetic_patients/5555.json\n",
1058
      "Data saved to ../data/synthetic_patients/3333.json\n",
1059
      "Data saved to ../data/synthetic_patients/7779.json\n",
1060
      "Data saved to ../data/synthetic_patients/1234.json\n",
1061
      "Data saved to ../data/synthetic_patients/7776.json\n",
1062
      "Data saved to ../data/synthetic_patients/7778.json\n",
1063
      "Data saved to ../data/synthetic_patients/7531.json\n",
1064
      "Data saved to ../data/synthetic_patients/1111.json\n",
1065
      "Data saved to ../data/synthetic_patients/6543.json\n",
1066
      "Data saved to ../data/synthetic_patients/1010.json\n",
1067
      "Data saved to ../data/synthetic_patients/9876.json\n",
1068
      "Data saved to ../data/synthetic_patients/9999.json\n",
1069
      "Data saved to ../data/synthetic_patients/8888.json\n",
1070
      "Data saved to ../data/synthetic_patients/8889.json\n",
1071
      "Data saved to ../data/synthetic_patients/5555.json\n",
1072
      "Data saved to ../data/synthetic_patients/6666.json\n",
1073
      "Data saved to ../data/synthetic_patients/2468.json\n",
1074
      "Data saved to ../data/synthetic_patients/7779.json\n",
1075
      "Data saved to ../data/synthetic_patients/1234.json\n",
1076
      "Data saved to ../data/synthetic_patients/7777.json\n",
1077
      "Data saved to ../data/synthetic_patients/2468.json\n",
1078
      "Data saved to ../data/synthetic_patients/1111.json\n",
1079
      "Data saved to ../data/synthetic_patients/7771.json\n",
1080
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1081
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1082
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1083
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1084
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1085
      "Data saved to ../data/synthetic_patients/88888888.json\n",
1086
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1087
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1088
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1089
      "Data saved to ../data/synthetic_patients/12345679.json\n",
1090
      "Data saved to ../data/synthetic_patients/87654321.json\n",
1091
      "Data saved to ../data/synthetic_patients/24681357.json\n",
1092
      "Data saved to ../data/synthetic_patients/34658901.json\n",
1093
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1094
      "Data saved to ../data/synthetic_patients/35782649.json\n",
1095
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1096
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1097
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1098
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1099
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1100
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1101
      "Data saved to ../data/synthetic_patients/98765431.json\n",
1102
      "Data saved to ../data/synthetic_patients/24680135.json\n",
1103
      "Data saved to ../data/synthetic_patients/78563412.json\n",
1104
      "Data saved to ../data/synthetic_patients/15975346.json\n",
1105
      "Data saved to ../data/synthetic_patients/74589213.json\n",
1106
      "Data saved to ../data/synthetic_patients/10247856.json\n",
1107
      "Data saved to ../data/synthetic_patients/96325874.json\n",
1108
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1109
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1110
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1111
      "Data saved to ../data/synthetic_patients/87965432.json\n",
1112
      "Data saved to ../data/synthetic_patients/72563491.json\n",
1113
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1114
      "Data saved to ../data/synthetic_patients/17456320.json\n",
1115
      "Data saved to ../data/synthetic_patients/65432198.json\n",
1116
      "Data saved to ../data/synthetic_patients/89654123.json\n",
1117
      "Data saved to ../data/synthetic_patients/82574631.json\n",
1118
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1119
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1120
      "Data saved to ../data/synthetic_patients/7070.json\n",
1121
      "Data saved to ../data/synthetic_patients/17171.json\n",
1122
      "Data saved to ../data/synthetic_patients/2020.json\n",
1123
      "Data saved to ../data/synthetic_patients/3030.json\n",
1124
      "Data saved to ../data/synthetic_patients/2525.json\n",
1125
      "Data saved to ../data/synthetic_patients/5050.json\n",
1126
      "Data saved to ../data/synthetic_patients/6060.json\n",
1127
      "Data saved to ../data/synthetic_patients/7071.json\n",
1128
      "Data saved to ../data/synthetic_patients/8080.json\n",
1129
      "Data saved to ../data/synthetic_patients/9999.json\n",
1130
      "Data saved to ../data/synthetic_patients/9090.json\n",
1131
      "Data saved to ../data/synthetic_patients/1111.json\n",
1132
      "Data saved to ../data/synthetic_patients/12345.json\n",
1133
      "Data saved to ../data/synthetic_patients/9998.json\n",
1134
      "Data saved to ../data/synthetic_patients/7777.json\n",
1135
      "Data saved to ../data/synthetic_patients/7778.json\n",
1136
      "Data saved to ../data/synthetic_patients/1010.json\n",
1137
      "Data saved to ../data/synthetic_patients/1357.json\n",
1138
      "Data saved to ../data/synthetic_patients/2468.json\n",
1139
      "Data saved to ../data/synthetic_patients/2021.json\n",
1140
      "Data saved to ../data/synthetic_patients/3333.json\n",
1141
      "Data saved to ../data/synthetic_patients/5555.json\n",
1142
      "Data saved to ../data/synthetic_patients/7779.json\n",
1143
      "Data saved to ../data/synthetic_patients/2469.json\n",
1144
      "Data saved to ../data/synthetic_patients/8888.json\n",
1145
      "Data saved to ../data/synthetic_patients/9876.json\n",
1146
      "Data saved to ../data/synthetic_patients/1111.json\n",
1147
      "Data saved to ../data/synthetic_patients/9999.json\n",
1148
      "Data saved to ../data/synthetic_patients/1234.json\n",
1149
      "Data saved to ../data/synthetic_patients/7777.json\n",
1150
      "Data saved to ../data/synthetic_patients/6543.json\n",
1151
      "Data saved to ../data/synthetic_patients/1357.json\n",
1152
      "Data saved to ../data/synthetic_patients/7777.json\n",
1153
      "Data saved to ../data/synthetic_patients/2468.json\n",
1154
      "Data saved to ../data/synthetic_patients/3698.json\n",
1155
      "Data saved to ../data/synthetic_patients/5555.json\n",
1156
      "Data saved to ../data/synthetic_patients/7777.json\n",
1157
      "Data saved to ../data/synthetic_patients/2468.json\n",
1158
      "Data saved to ../data/synthetic_patients/8888.json\n",
1159
      "Data saved to ../data/synthetic_patients/8888.json\n",
1160
      "Data saved to ../data/synthetic_patients/9876.json\n",
1161
      "Data saved to ../data/synthetic_patients/1111.json\n",
1162
      "Data saved to ../data/synthetic_patients/1234.json\n",
1163
      "Data saved to ../data/synthetic_patients/9999.json\n",
1164
      "Data saved to ../data/synthetic_patients/2468.json\n",
1165
      "Data saved to ../data/synthetic_patients/1357.json\n",
1166
      "Data saved to ../data/synthetic_patients/6543.json\n",
1167
      "Data saved to ../data/synthetic_patients/1357.json\n",
1168
      "Data saved to ../data/synthetic_patients/7777.json\n",
1169
      "Data saved to ../data/synthetic_patients/5555.json\n",
1170
      "Data saved to ../data/synthetic_patients/3698.json\n",
1171
      "Data saved to ../data/synthetic_patients/7777.json\n",
1172
      "Data saved to ../data/synthetic_patients/7777.json\n",
1173
      "Data saved to ../data/synthetic_patients/2468.json\n",
1174
      "Data saved to ../data/synthetic_patients/8888.json\n",
1175
      "Data saved to ../data/synthetic_patients/1111.json\n",
1176
      "Data saved to ../data/synthetic_patients/1234.json\n",
1177
      "Data saved to ../data/synthetic_patients/9999.json\n",
1178
      "Data saved to ../data/synthetic_patients/9632.json\n",
1179
      "Data saved to ../data/synthetic_patients/7771.json\n",
1180
      "Data saved to ../data/synthetic_patients/2463.json\n",
1181
      "Data saved to ../data/synthetic_patients/5555.json\n",
1182
      "Data saved to ../data/synthetic_patients/7779.json\n",
1183
      "Data saved to ../data/synthetic_patients/5555.json\n",
1184
      "Data saved to ../data/synthetic_patients/7772.json\n",
1185
      "Data saved to ../data/synthetic_patients/7778.json\n",
1186
      "Data saved to ../data/synthetic_patients/1357.json\n",
1187
      "Data saved to ../data/synthetic_patients/7773.json\n",
1188
      "Data saved to ../data/synthetic_patients/2468.json\n",
1189
      "Data saved to ../data/synthetic_patients/1111.json\n",
1190
      "Data saved to ../data/synthetic_patients/1001.json\n",
1191
      "Data saved to ../data/synthetic_patients/9632.json\n",
1192
      "Data saved to ../data/synthetic_patients/8888.json\n",
1193
      "Data saved to ../data/synthetic_patients/9999.json\n",
1194
      "Data saved to ../data/synthetic_patients/2469.json\n",
1195
      "Data saved to ../data/synthetic_patients/8889.json\n",
1196
      "Data saved to ../data/synthetic_patients/7777.json\n",
1197
      "Data saved to ../data/synthetic_patients/5555.json\n",
1198
      "Data saved to ../data/synthetic_patients/3333.json\n",
1199
      "Data saved to ../data/synthetic_patients/7779.json\n",
1200
      "Data saved to ../data/synthetic_patients/1234.json\n",
1201
      "Data saved to ../data/synthetic_patients/7776.json\n",
1202
      "Data saved to ../data/synthetic_patients/7778.json\n",
1203
      "Data saved to ../data/synthetic_patients/7531.json\n",
1204
      "Data saved to ../data/synthetic_patients/1111.json\n",
1205
      "Data saved to ../data/synthetic_patients/6543.json\n",
1206
      "Data saved to ../data/synthetic_patients/1010.json\n",
1207
      "Data saved to ../data/synthetic_patients/9876.json\n",
1208
      "Data saved to ../data/synthetic_patients/9999.json\n",
1209
      "Data saved to ../data/synthetic_patients/8888.json\n",
1210
      "Data saved to ../data/synthetic_patients/8889.json\n",
1211
      "Data saved to ../data/synthetic_patients/5555.json\n",
1212
      "Data saved to ../data/synthetic_patients/6666.json\n",
1213
      "Data saved to ../data/synthetic_patients/2468.json\n",
1214
      "Data saved to ../data/synthetic_patients/7779.json\n",
1215
      "Data saved to ../data/synthetic_patients/1234.json\n",
1216
      "Data saved to ../data/synthetic_patients/7777.json\n",
1217
      "Data saved to ../data/synthetic_patients/2468.json\n",
1218
      "Data saved to ../data/synthetic_patients/1111.json\n",
1219
      "Data saved to ../data/synthetic_patients/7771.json\n",
1220
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1221
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1222
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1223
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1224
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1225
      "Data saved to ../data/synthetic_patients/88888888.json\n",
1226
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1227
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1228
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1229
      "Data saved to ../data/synthetic_patients/12345679.json\n",
1230
      "Data saved to ../data/synthetic_patients/87654321.json\n",
1231
      "Data saved to ../data/synthetic_patients/24681357.json\n",
1232
      "Data saved to ../data/synthetic_patients/34658901.json\n",
1233
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1234
      "Data saved to ../data/synthetic_patients/35782649.json\n",
1235
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1236
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1237
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1238
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1239
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1240
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1241
      "Data saved to ../data/synthetic_patients/98765431.json\n",
1242
      "Data saved to ../data/synthetic_patients/24680135.json\n",
1243
      "Data saved to ../data/synthetic_patients/78563412.json\n",
1244
      "Data saved to ../data/synthetic_patients/15975346.json\n",
1245
      "Data saved to ../data/synthetic_patients/74589213.json\n",
1246
      "Data saved to ../data/synthetic_patients/10247856.json\n",
1247
      "Data saved to ../data/synthetic_patients/96325874.json\n",
1248
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1249
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1250
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1251
      "Data saved to ../data/synthetic_patients/87965432.json\n",
1252
      "Data saved to ../data/synthetic_patients/72563491.json\n",
1253
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1254
      "Data saved to ../data/synthetic_patients/17456320.json\n",
1255
      "Data saved to ../data/synthetic_patients/65432198.json\n",
1256
      "Data saved to ../data/synthetic_patients/89654123.json\n",
1257
      "Data saved to ../data/synthetic_patients/82574631.json\n",
1258
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1259
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1260
      "Data saved to ../data/synthetic_patients/78521463.json\n",
1261
      "Data saved to ../data/synthetic_patients/36925814.json\n",
1262
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1263
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1264
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1265
      "Data saved to ../data/synthetic_patients/31472569.json\n",
1266
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1267
      "Data saved to ../data/synthetic_patients/58469371.json\n",
1268
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1269
      "Data saved to ../data/synthetic_patients/67482913.json\n",
1270
      "Data saved to ../data/synthetic_patients/68419523.json\n",
1271
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1272
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1273
      "Data saved to ../data/synthetic_patients/12547896.json\n",
1274
      "Data saved to ../data/synthetic_patients/74562198.json\n",
1275
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1276
      "Data saved to ../data/synthetic_patients/98745632.json\n",
1277
      "Data saved to ../data/synthetic_patients/78541236.json\n",
1278
      "Data saved to ../data/synthetic_patients/63987524.json\n",
1279
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1280
      "Data saved to ../data/synthetic_patients/7070.json\n",
1281
      "Data saved to ../data/synthetic_patients/17171.json\n",
1282
      "Data saved to ../data/synthetic_patients/2020.json\n",
1283
      "Data saved to ../data/synthetic_patients/3030.json\n",
1284
      "Data saved to ../data/synthetic_patients/2525.json\n",
1285
      "Data saved to ../data/synthetic_patients/5050.json\n",
1286
      "Data saved to ../data/synthetic_patients/6060.json\n",
1287
      "Data saved to ../data/synthetic_patients/7071.json\n",
1288
      "Data saved to ../data/synthetic_patients/8080.json\n",
1289
      "Data saved to ../data/synthetic_patients/9999.json\n",
1290
      "Data saved to ../data/synthetic_patients/9090.json\n",
1291
      "Data saved to ../data/synthetic_patients/1111.json\n",
1292
      "Data saved to ../data/synthetic_patients/12345.json\n",
1293
      "Data saved to ../data/synthetic_patients/9998.json\n",
1294
      "Data saved to ../data/synthetic_patients/7777.json\n",
1295
      "Data saved to ../data/synthetic_patients/7778.json\n",
1296
      "Data saved to ../data/synthetic_patients/1010.json\n",
1297
      "Data saved to ../data/synthetic_patients/1357.json\n",
1298
      "Data saved to ../data/synthetic_patients/2468.json\n",
1299
      "Data saved to ../data/synthetic_patients/2021.json\n",
1300
      "Data saved to ../data/synthetic_patients/3333.json\n",
1301
      "Data saved to ../data/synthetic_patients/5555.json\n",
1302
      "Data saved to ../data/synthetic_patients/7779.json\n",
1303
      "Data saved to ../data/synthetic_patients/2469.json\n",
1304
      "Data saved to ../data/synthetic_patients/8888.json\n",
1305
      "Data saved to ../data/synthetic_patients/9876.json\n",
1306
      "Data saved to ../data/synthetic_patients/1111.json\n",
1307
      "Data saved to ../data/synthetic_patients/9999.json\n",
1308
      "Data saved to ../data/synthetic_patients/1234.json\n",
1309
      "Data saved to ../data/synthetic_patients/7777.json\n",
1310
      "Data saved to ../data/synthetic_patients/6543.json\n",
1311
      "Data saved to ../data/synthetic_patients/1357.json\n",
1312
      "Data saved to ../data/synthetic_patients/7777.json\n",
1313
      "Data saved to ../data/synthetic_patients/2468.json\n",
1314
      "Data saved to ../data/synthetic_patients/3698.json\n",
1315
      "Data saved to ../data/synthetic_patients/5555.json\n",
1316
      "Data saved to ../data/synthetic_patients/7777.json\n",
1317
      "Data saved to ../data/synthetic_patients/2468.json\n",
1318
      "Data saved to ../data/synthetic_patients/8888.json\n",
1319
      "Data saved to ../data/synthetic_patients/8888.json\n",
1320
      "Data saved to ../data/synthetic_patients/9876.json\n",
1321
      "Data saved to ../data/synthetic_patients/1111.json\n",
1322
      "Data saved to ../data/synthetic_patients/1234.json\n",
1323
      "Data saved to ../data/synthetic_patients/9999.json\n",
1324
      "Data saved to ../data/synthetic_patients/2468.json\n",
1325
      "Data saved to ../data/synthetic_patients/1357.json\n",
1326
      "Data saved to ../data/synthetic_patients/6543.json\n",
1327
      "Data saved to ../data/synthetic_patients/1357.json\n",
1328
      "Data saved to ../data/synthetic_patients/7777.json\n",
1329
      "Data saved to ../data/synthetic_patients/5555.json\n",
1330
      "Data saved to ../data/synthetic_patients/3698.json\n",
1331
      "Data saved to ../data/synthetic_patients/7777.json\n",
1332
      "Data saved to ../data/synthetic_patients/7777.json\n",
1333
      "Data saved to ../data/synthetic_patients/2468.json\n",
1334
      "Data saved to ../data/synthetic_patients/8888.json\n",
1335
      "Data saved to ../data/synthetic_patients/1111.json\n",
1336
      "Data saved to ../data/synthetic_patients/1234.json\n",
1337
      "Data saved to ../data/synthetic_patients/9999.json\n",
1338
      "Data saved to ../data/synthetic_patients/9632.json\n",
1339
      "Data saved to ../data/synthetic_patients/7771.json\n",
1340
      "Data saved to ../data/synthetic_patients/2463.json\n",
1341
      "Data saved to ../data/synthetic_patients/5555.json\n",
1342
      "Data saved to ../data/synthetic_patients/7779.json\n",
1343
      "Data saved to ../data/synthetic_patients/5555.json\n",
1344
      "Data saved to ../data/synthetic_patients/7772.json\n",
1345
      "Data saved to ../data/synthetic_patients/7778.json\n",
1346
      "Data saved to ../data/synthetic_patients/1357.json\n",
1347
      "Data saved to ../data/synthetic_patients/7773.json\n",
1348
      "Data saved to ../data/synthetic_patients/2468.json\n",
1349
      "Data saved to ../data/synthetic_patients/1111.json\n",
1350
      "Data saved to ../data/synthetic_patients/1001.json\n",
1351
      "Data saved to ../data/synthetic_patients/9632.json\n",
1352
      "Data saved to ../data/synthetic_patients/8888.json\n",
1353
      "Data saved to ../data/synthetic_patients/9999.json\n",
1354
      "Data saved to ../data/synthetic_patients/2469.json\n",
1355
      "Data saved to ../data/synthetic_patients/8889.json\n",
1356
      "Data saved to ../data/synthetic_patients/7777.json\n",
1357
      "Data saved to ../data/synthetic_patients/5555.json\n",
1358
      "Data saved to ../data/synthetic_patients/3333.json\n",
1359
      "Data saved to ../data/synthetic_patients/7779.json\n",
1360
      "Data saved to ../data/synthetic_patients/1234.json\n",
1361
      "Data saved to ../data/synthetic_patients/7776.json\n",
1362
      "Data saved to ../data/synthetic_patients/7778.json\n",
1363
      "Data saved to ../data/synthetic_patients/7531.json\n",
1364
      "Data saved to ../data/synthetic_patients/1111.json\n",
1365
      "Data saved to ../data/synthetic_patients/6543.json\n",
1366
      "Data saved to ../data/synthetic_patients/1010.json\n",
1367
      "Data saved to ../data/synthetic_patients/9876.json\n",
1368
      "Data saved to ../data/synthetic_patients/9999.json\n",
1369
      "Data saved to ../data/synthetic_patients/8888.json\n",
1370
      "Data saved to ../data/synthetic_patients/8889.json\n",
1371
      "Data saved to ../data/synthetic_patients/5555.json\n",
1372
      "Data saved to ../data/synthetic_patients/6666.json\n",
1373
      "Data saved to ../data/synthetic_patients/2468.json\n",
1374
      "Data saved to ../data/synthetic_patients/7779.json\n",
1375
      "Data saved to ../data/synthetic_patients/1234.json\n",
1376
      "Data saved to ../data/synthetic_patients/7777.json\n",
1377
      "Data saved to ../data/synthetic_patients/2468.json\n",
1378
      "Data saved to ../data/synthetic_patients/1111.json\n",
1379
      "Data saved to ../data/synthetic_patients/7771.json\n",
1380
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1381
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1382
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1383
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1384
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1385
      "Data saved to ../data/synthetic_patients/88888888.json\n",
1386
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1387
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1388
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1389
      "Data saved to ../data/synthetic_patients/12345679.json\n",
1390
      "Data saved to ../data/synthetic_patients/87654321.json\n",
1391
      "Data saved to ../data/synthetic_patients/24681357.json\n",
1392
      "Data saved to ../data/synthetic_patients/34658901.json\n",
1393
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1394
      "Data saved to ../data/synthetic_patients/35782649.json\n",
1395
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1396
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1397
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1398
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1399
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1400
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1401
      "Data saved to ../data/synthetic_patients/98765431.json\n",
1402
      "Data saved to ../data/synthetic_patients/24680135.json\n",
1403
      "Data saved to ../data/synthetic_patients/78563412.json\n",
1404
      "Data saved to ../data/synthetic_patients/15975346.json\n",
1405
      "Data saved to ../data/synthetic_patients/74589213.json\n",
1406
      "Data saved to ../data/synthetic_patients/10247856.json\n",
1407
      "Data saved to ../data/synthetic_patients/96325874.json\n",
1408
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1409
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1410
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1411
      "Data saved to ../data/synthetic_patients/87965432.json\n",
1412
      "Data saved to ../data/synthetic_patients/72563491.json\n",
1413
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1414
      "Data saved to ../data/synthetic_patients/17456320.json\n",
1415
      "Data saved to ../data/synthetic_patients/65432198.json\n",
1416
      "Data saved to ../data/synthetic_patients/89654123.json\n",
1417
      "Data saved to ../data/synthetic_patients/82574631.json\n",
1418
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1419
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1420
      "Data saved to ../data/synthetic_patients/78521463.json\n",
1421
      "Data saved to ../data/synthetic_patients/36925814.json\n",
1422
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1423
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1424
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1425
      "Data saved to ../data/synthetic_patients/31472569.json\n",
1426
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1427
      "Data saved to ../data/synthetic_patients/58469371.json\n",
1428
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1429
      "Data saved to ../data/synthetic_patients/67482913.json\n",
1430
      "Data saved to ../data/synthetic_patients/68419523.json\n",
1431
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1432
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1433
      "Data saved to ../data/synthetic_patients/12547896.json\n",
1434
      "Data saved to ../data/synthetic_patients/74562198.json\n",
1435
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1436
      "Data saved to ../data/synthetic_patients/98745632.json\n",
1437
      "Data saved to ../data/synthetic_patients/78541236.json\n",
1438
      "Data saved to ../data/synthetic_patients/63987524.json\n",
1439
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1440
      "Data saved to ../data/synthetic_patients/36985241.json\n",
1441
      "Data saved to ../data/synthetic_patients/21547896.json\n",
1442
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1443
      "Data saved to ../data/synthetic_patients/85694712.json\n",
1444
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1445
      "Data saved to ../data/synthetic_patients/31478596.json\n",
1446
      "Data saved to ../data/synthetic_patients/36985263.json\n",
1447
      "Data saved to ../data/synthetic_patients/98745632.json\n",
1448
      "Data saved to ../data/synthetic_patients/63258741.json\n",
1449
      "Data saved to ../data/synthetic_patients/78451236.json\n",
1450
      "Data saved to ../data/synthetic_patients/98563214.json\n",
1451
      "Data saved to ../data/synthetic_patients/78523614.json\n",
1452
      "Data saved to ../data/synthetic_patients/63258741.json\n",
1453
      "Data saved to ../data/synthetic_patients/78563214.json\n",
1454
      "Data saved to ../data/synthetic_patients/45781234.json\n",
1455
      "Data saved to ../data/synthetic_patients/15987463.json\n",
1456
      "Data saved to ../data/synthetic_patients/73218456.json\n",
1457
      "Data saved to ../data/synthetic_patients/78523698.json\n",
1458
      "Data saved to ../data/synthetic_patients/74859623.json\n",
1459
      "Data saved to ../data/synthetic_patients/52478963.json\n",
1460
      "Data saved to ../data/synthetic_patients/7070.json\n",
1461
      "Data saved to ../data/synthetic_patients/17171.json\n",
1462
      "Data saved to ../data/synthetic_patients/2020.json\n",
1463
      "Data saved to ../data/synthetic_patients/3030.json\n",
1464
      "Data saved to ../data/synthetic_patients/2525.json\n",
1465
      "Data saved to ../data/synthetic_patients/5050.json\n",
1466
      "Data saved to ../data/synthetic_patients/6060.json\n",
1467
      "Data saved to ../data/synthetic_patients/7071.json\n",
1468
      "Data saved to ../data/synthetic_patients/8080.json\n",
1469
      "Data saved to ../data/synthetic_patients/9999.json\n",
1470
      "Data saved to ../data/synthetic_patients/9090.json\n",
1471
      "Data saved to ../data/synthetic_patients/1111.json\n",
1472
      "Data saved to ../data/synthetic_patients/12345.json\n",
1473
      "Data saved to ../data/synthetic_patients/9998.json\n",
1474
      "Data saved to ../data/synthetic_patients/7777.json\n",
1475
      "Data saved to ../data/synthetic_patients/7778.json\n",
1476
      "Data saved to ../data/synthetic_patients/1010.json\n",
1477
      "Data saved to ../data/synthetic_patients/1357.json\n",
1478
      "Data saved to ../data/synthetic_patients/2468.json\n",
1479
      "Data saved to ../data/synthetic_patients/2021.json\n",
1480
      "Data saved to ../data/synthetic_patients/3333.json\n",
1481
      "Data saved to ../data/synthetic_patients/5555.json\n",
1482
      "Data saved to ../data/synthetic_patients/7779.json\n",
1483
      "Data saved to ../data/synthetic_patients/2469.json\n",
1484
      "Data saved to ../data/synthetic_patients/8888.json\n",
1485
      "Data saved to ../data/synthetic_patients/9876.json\n",
1486
      "Data saved to ../data/synthetic_patients/1111.json\n",
1487
      "Data saved to ../data/synthetic_patients/9999.json\n",
1488
      "Data saved to ../data/synthetic_patients/1234.json\n",
1489
      "Data saved to ../data/synthetic_patients/7777.json\n",
1490
      "Data saved to ../data/synthetic_patients/6543.json\n",
1491
      "Data saved to ../data/synthetic_patients/1357.json\n",
1492
      "Data saved to ../data/synthetic_patients/7777.json\n",
1493
      "Data saved to ../data/synthetic_patients/2468.json\n",
1494
      "Data saved to ../data/synthetic_patients/3698.json\n",
1495
      "Data saved to ../data/synthetic_patients/5555.json\n",
1496
      "Data saved to ../data/synthetic_patients/7777.json\n",
1497
      "Data saved to ../data/synthetic_patients/2468.json\n",
1498
      "Data saved to ../data/synthetic_patients/8888.json\n",
1499
      "Data saved to ../data/synthetic_patients/8888.json\n",
1500
      "Data saved to ../data/synthetic_patients/9876.json\n",
1501
      "Data saved to ../data/synthetic_patients/1111.json\n",
1502
      "Data saved to ../data/synthetic_patients/1234.json\n",
1503
      "Data saved to ../data/synthetic_patients/9999.json\n",
1504
      "Data saved to ../data/synthetic_patients/2468.json\n",
1505
      "Data saved to ../data/synthetic_patients/1357.json\n",
1506
      "Data saved to ../data/synthetic_patients/6543.json\n",
1507
      "Data saved to ../data/synthetic_patients/1357.json\n",
1508
      "Data saved to ../data/synthetic_patients/7777.json\n",
1509
      "Data saved to ../data/synthetic_patients/5555.json\n",
1510
      "Data saved to ../data/synthetic_patients/3698.json\n",
1511
      "Data saved to ../data/synthetic_patients/7777.json\n",
1512
      "Data saved to ../data/synthetic_patients/7777.json\n",
1513
      "Data saved to ../data/synthetic_patients/2468.json\n",
1514
      "Data saved to ../data/synthetic_patients/8888.json\n",
1515
      "Data saved to ../data/synthetic_patients/1111.json\n",
1516
      "Data saved to ../data/synthetic_patients/1234.json\n",
1517
      "Data saved to ../data/synthetic_patients/9999.json\n",
1518
      "Data saved to ../data/synthetic_patients/9632.json\n",
1519
      "Data saved to ../data/synthetic_patients/7771.json\n",
1520
      "Data saved to ../data/synthetic_patients/2463.json\n",
1521
      "Data saved to ../data/synthetic_patients/5555.json\n",
1522
      "Data saved to ../data/synthetic_patients/7779.json\n",
1523
      "Data saved to ../data/synthetic_patients/5555.json\n",
1524
      "Data saved to ../data/synthetic_patients/7772.json\n",
1525
      "Data saved to ../data/synthetic_patients/7778.json\n",
1526
      "Data saved to ../data/synthetic_patients/1357.json\n",
1527
      "Data saved to ../data/synthetic_patients/7773.json\n",
1528
      "Data saved to ../data/synthetic_patients/2468.json\n",
1529
      "Data saved to ../data/synthetic_patients/1111.json\n",
1530
      "Data saved to ../data/synthetic_patients/1001.json\n",
1531
      "Data saved to ../data/synthetic_patients/9632.json\n",
1532
      "Data saved to ../data/synthetic_patients/8888.json\n",
1533
      "Data saved to ../data/synthetic_patients/9999.json\n",
1534
      "Data saved to ../data/synthetic_patients/2469.json\n",
1535
      "Data saved to ../data/synthetic_patients/8889.json\n",
1536
      "Data saved to ../data/synthetic_patients/7777.json\n",
1537
      "Data saved to ../data/synthetic_patients/5555.json\n",
1538
      "Data saved to ../data/synthetic_patients/3333.json\n",
1539
      "Data saved to ../data/synthetic_patients/7779.json\n",
1540
      "Data saved to ../data/synthetic_patients/1234.json\n",
1541
      "Data saved to ../data/synthetic_patients/7776.json\n",
1542
      "Data saved to ../data/synthetic_patients/7778.json\n",
1543
      "Data saved to ../data/synthetic_patients/7531.json\n",
1544
      "Data saved to ../data/synthetic_patients/1111.json\n",
1545
      "Data saved to ../data/synthetic_patients/6543.json\n",
1546
      "Data saved to ../data/synthetic_patients/1010.json\n",
1547
      "Data saved to ../data/synthetic_patients/9876.json\n",
1548
      "Data saved to ../data/synthetic_patients/9999.json\n",
1549
      "Data saved to ../data/synthetic_patients/8888.json\n",
1550
      "Data saved to ../data/synthetic_patients/8889.json\n",
1551
      "Data saved to ../data/synthetic_patients/5555.json\n",
1552
      "Data saved to ../data/synthetic_patients/6666.json\n",
1553
      "Data saved to ../data/synthetic_patients/2468.json\n",
1554
      "Data saved to ../data/synthetic_patients/7779.json\n",
1555
      "Data saved to ../data/synthetic_patients/1234.json\n",
1556
      "Data saved to ../data/synthetic_patients/7777.json\n",
1557
      "Data saved to ../data/synthetic_patients/2468.json\n",
1558
      "Data saved to ../data/synthetic_patients/1111.json\n",
1559
      "Data saved to ../data/synthetic_patients/7771.json\n",
1560
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1561
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1562
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1563
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1564
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1565
      "Data saved to ../data/synthetic_patients/88888888.json\n",
1566
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1567
      "Data saved to ../data/synthetic_patients/76543210.json\n",
1568
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1569
      "Data saved to ../data/synthetic_patients/12345679.json\n",
1570
      "Data saved to ../data/synthetic_patients/87654321.json\n",
1571
      "Data saved to ../data/synthetic_patients/24681357.json\n",
1572
      "Data saved to ../data/synthetic_patients/34658901.json\n",
1573
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1574
      "Data saved to ../data/synthetic_patients/35782649.json\n",
1575
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1576
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1577
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1578
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1579
      "Data saved to ../data/synthetic_patients/65432109.json\n",
1580
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1581
      "Data saved to ../data/synthetic_patients/98765431.json\n",
1582
      "Data saved to ../data/synthetic_patients/24680135.json\n",
1583
      "Data saved to ../data/synthetic_patients/78563412.json\n",
1584
      "Data saved to ../data/synthetic_patients/15975346.json\n",
1585
      "Data saved to ../data/synthetic_patients/74589213.json\n",
1586
      "Data saved to ../data/synthetic_patients/10247856.json\n",
1587
      "Data saved to ../data/synthetic_patients/96325874.json\n",
1588
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1589
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1590
      "Data saved to ../data/synthetic_patients/31415926.json\n",
1591
      "Data saved to ../data/synthetic_patients/87965432.json\n",
1592
      "Data saved to ../data/synthetic_patients/72563491.json\n",
1593
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1594
      "Data saved to ../data/synthetic_patients/17456320.json\n",
1595
      "Data saved to ../data/synthetic_patients/65432198.json\n",
1596
      "Data saved to ../data/synthetic_patients/89654123.json\n",
1597
      "Data saved to ../data/synthetic_patients/82574631.json\n",
1598
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1599
      "Data saved to ../data/synthetic_patients/12345678.json\n",
1600
      "Data saved to ../data/synthetic_patients/78521463.json\n",
1601
      "Data saved to ../data/synthetic_patients/36925814.json\n",
1602
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1603
      "Data saved to ../data/synthetic_patients/13579246.json\n",
1604
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1605
      "Data saved to ../data/synthetic_patients/31472569.json\n",
1606
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1607
      "Data saved to ../data/synthetic_patients/58469371.json\n",
1608
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1609
      "Data saved to ../data/synthetic_patients/67482913.json\n",
1610
      "Data saved to ../data/synthetic_patients/68419523.json\n",
1611
      "Data saved to ../data/synthetic_patients/74125896.json\n",
1612
      "Data saved to ../data/synthetic_patients/98765432.json\n",
1613
      "Data saved to ../data/synthetic_patients/12547896.json\n",
1614
      "Data saved to ../data/synthetic_patients/74562198.json\n",
1615
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1616
      "Data saved to ../data/synthetic_patients/98745632.json\n",
1617
      "Data saved to ../data/synthetic_patients/78541236.json\n",
1618
      "Data saved to ../data/synthetic_patients/63987524.json\n",
1619
      "Data saved to ../data/synthetic_patients/36985274.json\n",
1620
      "Data saved to ../data/synthetic_patients/36985241.json\n",
1621
      "Data saved to ../data/synthetic_patients/21547896.json\n",
1622
      "Data saved to ../data/synthetic_patients/36985247.json\n",
1623
      "Data saved to ../data/synthetic_patients/85694712.json\n",
1624
      "Data saved to ../data/synthetic_patients/36985214.json\n",
1625
      "Data saved to ../data/synthetic_patients/31478596.json\n",
1626
      "Data saved to ../data/synthetic_patients/36985263.json\n",
1627
      "Data saved to ../data/synthetic_patients/98745632.json\n",
1628
      "Data saved to ../data/synthetic_patients/63258741.json\n",
1629
      "Data saved to ../data/synthetic_patients/78451236.json\n",
1630
      "Data saved to ../data/synthetic_patients/98563214.json\n",
1631
      "Data saved to ../data/synthetic_patients/78523614.json\n",
1632
      "Data saved to ../data/synthetic_patients/63258741.json\n",
1633
      "Data saved to ../data/synthetic_patients/78563214.json\n",
1634
      "Data saved to ../data/synthetic_patients/45781234.json\n",
1635
      "Data saved to ../data/synthetic_patients/15987463.json\n",
1636
      "Data saved to ../data/synthetic_patients/73218456.json\n",
1637
      "Data saved to ../data/synthetic_patients/78523698.json\n",
1638
      "Data saved to ../data/synthetic_patients/74859623.json\n",
1639
      "Data saved to ../data/synthetic_patients/52478963.json\n",
1640
      "Data saved to ../data/synthetic_patients/36987452.json\n",
1641
      "Data saved to ../data/synthetic_patients/32659847.json\n",
1642
      "Data saved to ../data/synthetic_patients/36521487.json\n",
1643
      "Data saved to ../data/synthetic_patients/69582431.json\n",
1644
      "Data saved to ../data/synthetic_patients/30217485.json\n",
1645
      "Data saved to ../data/synthetic_patients/78451269.json\n",
1646
      "Data saved to ../data/synthetic_patients/87459621.json\n",
1647
      "Data saved to ../data/synthetic_patients/41789562.json\n",
1648
      "Data saved to ../data/synthetic_patients/78541236.json\n",
1649
      "Data saved to ../data/synthetic_patients/97531468.json\n",
1650
      "Data saved to ../data/synthetic_patients/10254786.json\n",
1651
      "Data saved to ../data/synthetic_patients/83549201.json\n",
1652
      "Data saved to ../data/synthetic_patients/63148725.json\n",
1653
      "Data saved to ../data/synthetic_patients/48756321.json\n",
1654
      "Data saved to ../data/synthetic_patients/74851236.json\n",
1655
      "Data saved to ../data/synthetic_patients/31548927.json\n",
1656
      "Data saved to ../data/synthetic_patients/23569874.json\n",
1657
      "Data saved to ../data/synthetic_patients/78541236.json\n",
1658
      "Data saved to ../data/synthetic_patients/63987452.json\n",
1659
      "Data saved to ../data/synthetic_patients/36982475.json\n"
1660
     ]
1661
    }
1662
   ],
1663
   "source": [
1664
    "import json\n",
1665
    "for res in synthetic_results:\n",
1666
    "    \n",
1667
    "    file_path = \"../data/synthetic_patients/%s.json\"%res.patient_id\n",
1668
    "\n",
1669
    "    # Save the dictionary to a JSON file\n",
1670
    "    with open(file_path, \"w\") as json_file:\n",
1671
    "        json.dump(res.dict(), json_file)\n",
1672
    "\n",
1673
    "    print(f\"Data saved to {file_path}\")"
1674
   ]
1675
  },
1676
  {
1677
   "cell_type": "code",
1678
   "execution_count": null,
1679
   "metadata": {},
1680
   "outputs": [],
1681
   "source": []
1682
  },
1683
  {
1684
   "cell_type": "code",
1685
   "execution_count": null,
1686
   "metadata": {},
1687
   "outputs": [],
1688
   "source": [
1689
    "import pickle\n",
1690
    "# Specify the file path where you want to save the list\n",
1691
    "file_path = \"synthetic_list_data.pkl\"\n",
1692
    "\n",
1693
    "# Save the list to disk using pickle\n",
1694
    "with open(file_path, 'wb') as file:\n",
1695
    "    pickle.dump(synthetic_results, file)\n",
1696
    "\n",
1697
    "print(f\"The list has been saved to {file_path}\")\n"
1698
   ]
1699
  },
1700
  {
1701
   "cell_type": "code",
1702
   "execution_count": null,
1703
   "metadata": {},
1704
   "outputs": [],
1705
   "source": [
1706
    "import json\n",
1707
    "\n",
1708
    "# Specify the file path from which to load the list\n",
1709
    "file_path = \"synthetic_list_data.json\"\n",
1710
    "\n",
1711
    "# Load the list from disk using json\n",
1712
    "with open(file_path, 'r') as file:\n",
1713
    "    loaded_list = json.load(file)\n",
1714
    "\n",
1715
    "print(f\"The loaded list is: {loaded_list}\")\n",
1716
    "\n"
1717
   ]
1718
  },
1719
  {
1720
   "cell_type": "code",
1721
   "execution_count": null,
1722
   "metadata": {},
1723
   "outputs": [],
1724
   "source": []
1725
  }
1726
 ],
1727
 "metadata": {
1728
  "kernelspec": {
1729
   "display_name": "base",
1730
   "language": "python",
1731
   "name": "python3"
1732
  },
1733
  "language_info": {
1734
   "codemirror_mode": {
1735
    "name": "ipython",
1736
    "version": 3
1737
   },
1738
   "file_extension": ".py",
1739
   "mimetype": "text/x-python",
1740
   "name": "python",
1741
   "nbconvert_exporter": "python",
1742
   "pygments_lexer": "ipython3",
1743
   "version": "3.11.4"
1744
  }
1745
 },
1746
 "nbformat": 4,
1747
 "nbformat_minor": 2
1748
}