Benjamin Consolvo commited on
Commit
bdebaa6
·
1 Parent(s): 67e1ee3

readme tweaks

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. data/patients.csv +29 -29
README.md CHANGED
@@ -66,7 +66,9 @@ deactivate
66
 
67
  ### OpenAI API Key, Model Name, and Endpoint URL
68
 
69
- 1. Add your OpenAI-compatible API key to the `OAI_CONFIG_LIST.json` file.
 
 
70
  2. Modify the `model` and `base_url` to the model name and endpoint URL that you are using. The `OAI_CONFIG_LIST.json` should look like:
71
  ```json
72
  [
@@ -86,7 +88,7 @@ deactivate
86
  ```
87
 
88
  ### Modifying prompts
89
- To modify prompts, you can edit them in the UI, or you can edit the following files:
90
 
91
  1. User proxy agent: the agent responsible for passing along the user's preventative healthcare task to the other agents.
92
  [prompts/user_proxy_prompt.py](https://huggingface.co/spaces/Intel/preventative_healthcare/blob/main/prompts/user_proxy_prompt.py)
@@ -99,13 +101,13 @@ To modify prompts, you can edit them in the UI, or you can edit the following fi
99
 
100
  ### Example Usage
101
 
102
- If you want to run the app with streamlit, you can run using:
103
 
104
  ```bash
105
  streamlit run app.py
106
  ```
107
 
108
- If you want to just run the script locally from the command line, use the following command:
109
 
110
  ```bash
111
  python intelpreventativehealthcare.py \
 
66
 
67
  ### OpenAI API Key, Model Name, and Endpoint URL
68
 
69
+
70
+ 1. You can add your OpenAI-compatible API key to the [Hugging Face Settings](https://huggingface.co/spaces/Intel/preventative_healthcare/settings) under "Variables and secrets". Or, you can add them directly to the [OAI_CONFIG_LIST.json](https://huggingface.co/spaces/Intel/preventative_healthcare/blob/main/OAI_CONFIG_LIST.json) file if you are keeping everything local. Don't expose your precious API key to the world!
71
+
72
  2. Modify the `model` and `base_url` to the model name and endpoint URL that you are using. The `OAI_CONFIG_LIST.json` should look like:
73
  ```json
74
  [
 
88
  ```
89
 
90
  ### Modifying prompts
91
+ To modify prompts, you can edit them in the UI on the left sidebar, or you can edit the following files:
92
 
93
  1. User proxy agent: the agent responsible for passing along the user's preventative healthcare task to the other agents.
94
  [prompts/user_proxy_prompt.py](https://huggingface.co/spaces/Intel/preventative_healthcare/blob/main/prompts/user_proxy_prompt.py)
 
101
 
102
  ### Example Usage
103
 
104
+ If you want to run the app with streamlit, you can run locally with:
105
 
106
  ```bash
107
  streamlit run app.py
108
  ```
109
 
110
+ If you want to just run just the Python script without any frontend interface, you can use the following command with arguments as below:
111
 
112
  ```bash
113
  python intelpreventativehealthcare.py \
data/patients.csv CHANGED
@@ -17,35 +17,35 @@ patient_id,First Name,Last Name,Email,Patient diagnosis summary,age,gender,condi
17
  15,Megan,Clark,[email protected],"A 35-year-old female reports persistent fatigue and weight gain. Thyroid function tests reveal hypothyroidism, and she is started on levothyroxine. She is advised to monitor her symptoms and return for regular thyroid function tests.",35,F,Hypothyroidism
18
  16,Joseph,Rodriguez,[email protected],"A 58-year-old male with a history of coronary artery disease presents with chest pain on exertion. Stress test shows ischemic changes, and coronary angiography reveals significant stenosis. The patient is scheduled for coronary artery bypass grafting.",58,M,Coronary Artery Disease
19
  17,Laura,Lewis,[email protected],"A 42-year-old female presents with skin rash and joint pain. Blood tests reveal positive ANA and anti-dsDNA antibodies, consistent with systemic lupus erythematosus. She is started on hydroxychloroquine and advised to avoid sun exposure.",42,F,Systemic Lupus Erythematosus
20
- 18,Charles,Walker,[email protected],"A 65-year-old female with a history of osteoporosis presents for follow-up. DEXA scan shows stable bone density, and she is advised to continue calcium and vitamin D supplementation and engage in weight-bearing exercises.",65,M,Osteoporosis (Stable)
21
- 19,Anna,Hall,[email protected],"A 29-year-old male presents with persistent cough and night sweats. Chest X-ray shows hilar lymphadenopathy, and biopsy confirms sarcoidosis. The patient is started on corticosteroids and advised to monitor his symptoms closely.",29,F,Sarcoidosis
22
- 20,Matthew,Allen,[email protected],"A 50-year-old female reports frequent episodes of heartburn and regurgitation. Upper endoscopy reveals erosive esophagitis, consistent with gastroesophageal reflux disease (GERD). She is started on proton pump inhibitors and advised to avoid trigger foods.",50,M,GERD
23
- 21,Stephanie,Young,[email protected],"A 37-year-old male presents with knee pain after a sports injury. MRI shows a torn meniscus, and he is scheduled for arthroscopic surgery. He is advised to engage in physical therapy post-surgery to regain strength and mobility.",37,F,Torn Meniscus
24
- 22,Anthony,King,[email protected],"A 60-year-old female with a history of breast cancer presents for follow-up. Mammogram and MRI show no evidence of recurrence, and she is advised to continue regular screenings and report any new symptoms.",60,M,Breast Cancer (Remission)
25
- 23,Rebecca,Wright,[email protected],"A 45-year-old male reports difficulty sleeping and daytime fatigue. Sleep study confirms obstructive sleep apnea, and he is started on CPAP therapy. He is advised to maintain a healthy weight and avoid alcohol before bedtime.",45,F,Obstructive Sleep Apnea
26
- 24,Joshua,Scott,[email protected],A 33-year-old female presents with abdominal bloating and irregular bowel movements. Colonoscopy reveals signs of irritable bowel syndrome (IBS). She is advised to follow a low-FODMAP diet and monitor her symptoms.,33,M,IBS
27
- 25,Patricia,Green,[email protected],"A 70-year-old male with a history of atrial fibrillation presents for follow-up. ECG shows controlled rhythm, and he is advised to continue anticoagulation therapy and regular monitoring.",70,F,Atrial Fibrillation (Controlled)
28
- 26,Andrew,Adams,[email protected],"A 25-year-old female reports frequent migraines with aura. Neurological examination is normal, and she is started on triptans for acute management and advised to keep a headache diary.",25,M,Migraines with Aura
29
- 27,Kimberly,Baker,[email protected],"A 55-year-old male presents with persistent knee pain and swelling. X-ray shows osteoarthritis, and he is started on NSAIDs and advised to engage in low-impact exercises to manage symptoms.",55,F,Osteoarthritis
30
- 28,Eric,Gonzalez,[email protected],"A 40-year-old female reports fatigue and hair loss. Blood tests reveal iron deficiency anemia, and she is started on iron supplements. She is advised to increase dietary iron intake.",40,M,Iron Deficiency Anemia
31
- 29,Michelle,Nelson,[email protected],"A 68-year-old male with a history of chronic kidney disease presents for follow-up. Blood tests show stable kidney function, and he is advised to continue dietary modifications and regular monitoring.",68,F,Chronic Kidney Disease (Stable)
32
- 30,Kevin,Carter,[email protected],A 30-year-old female presents with recurrent episodes of vertigo. Audiometry and vestibular testing confirm Meniere's disease. She is started on diuretics and advised to follow a low-sodium diet.,30,M,Meniere's Disease
33
- 31,Elizabeth,Mitchell,[email protected],"A 45-year-old male reports persistent shoulder pain after a fall. MRI shows a rotator cuff tear, and he is scheduled for surgical repair. He is advised to engage in physical therapy post-surgery.",45,F,Rotator Cuff Tear
34
- 32,Jason,Perez,[email protected],"A 50-year-old female presents with frequent urination and thirst. Blood tests reveal elevated blood glucose levels, consistent with type 2 diabetes. She is started on metformin and advised to monitor her blood sugar levels closely.",50,M,Type 2 Diabetes
35
- 33,Angela,Roberts,[email protected],"A 60-year-old male with a history of stroke presents for follow-up. Neurological examination shows stable condition, and he is advised to continue antiplatelet therapy and engage in regular physical activity.",60,F,Stroke (Stable)
36
- 34,Mark,Phillips,[email protected],"A 35-year-old female reports persistent abdominal pain and diarrhea. Colonoscopy reveals signs of Crohn's disease, and she is started on biologic therapy. She is advised to monitor her symptoms and follow dietary recommendations.",35,M,Crohn's Disease
37
- 35,Laura,Evans,[email protected],"A 28-year-old male presents with recurrent episodes of chest pain and palpitations. ECG shows signs of Wolff-Parkinson-White syndrome, and he is referred to a cardiologist for further evaluation.",28,F,Wolff-Parkinson-White Syndrome
38
- 36,Steven,Turner,[email protected],"A 70-year-old female with a history of Alzheimer's disease presents for follow-up. Cognitive testing shows progression of symptoms, and she is started on memantine. She is advised to engage in cognitive exercises and maintain a structured routine.",70,M,Alzheimer's Disease
39
- 37,Jennifer,Parker,[email protected],"A 22-year-old male comes in for a routine physical exam. He reports no health issues and is physically active. His examination is normal, and he is advised to continue regular exercise and healthy eating.",22,F,None
40
- 38,Paul,Collins,[email protected],"A 55-year-old female presents with persistent fatigue and joint pain. Blood tests reveal elevated ESR and CRP, consistent with polymyalgia rheumatica. She is started on corticosteroids and advised to monitor her symptoms closely.",55,M,Polymyalgia Rheumatica
41
- 39,Laura,Stewart,[email protected],A 40-year-old male reports frequent episodes of heartburn and regurgitation. Upper endoscopy reveals signs of Barrett's esophagus. He is started on proton pump inhibitors and scheduled for regular surveillance endoscopies.,40,F,Barrett's Esophagus
42
- 40,Thomas,Morris,[email protected],"A 65-year-old female with a history of hypertension presents for follow-up. Blood pressure is well-controlled, and she is advised to continue her current medication regimen and lifestyle modifications.",65,M,Hypertension (Controlled)
43
- 41,Emily,Reed,[email protected],"A 30-year-old male presents with recurrent episodes of abdominal pain and diarrhea. Stool tests reveal signs of celiac disease, and he is advised to follow a strict gluten-free diet.",30,F,Celiac Disease
44
- 42,Richard,Howard,[email protected],"A 50-year-old female reports persistent fatigue and weight gain. Thyroid function tests reveal Hashimoto's thyroiditis, and she is started on levothyroxine. She is advised to monitor her symptoms and return for regular thyroid function tests.",50,M,Hashimoto's Thyroiditis
45
- 43,Barbara,Cooper,[email protected],"A 60-year-old male with a history of chronic liver disease presents for follow-up. Liver function tests show stable condition, and he is advised to continue dietary modifications and regular monitoring.",60,F,Chronic Liver Disease (Stable)
46
  44,Jessica,Peterson,[email protected],"A 35-year-old female presents with recurrent episodes of chest pain and palpitations. ECG shows signs of long QT syndrome, and she is referred to a cardiologist for further evaluation.",35,F,Long QT Syndrome
47
  45,Timothy,Gray,[email protected],"A 28-year-old male reports persistent knee pain after a sports injury. MRI shows a torn ACL, and he is scheduled for surgical repair. He is advised to engage in physical therapy post-surgery.",28,M,Torn ACL
48
  46,Sharon,Ramirez,[email protected],"A 70-year-old female with a history of macular degeneration presents for follow-up. Ophthalmological examination shows stable condition, and she is advised to continue regular eye exams and take prescribed supplements.",70,F,Macular Degeneration (Stable)
49
- 47,Gregory,James,[email protected],"A 22-year-old female comes in for a routine physical exam. She reports no health issues and is physically active. Her examination is normal, and she is advised to continue regular exercise and healthy eating.",22,M,None
50
- 48,Victoria,Hughes,[email protected],"A 55-year-old male presents with persistent fatigue and joint pain. Blood tests reveal elevated ESR and CRP, consistent with rheumatoid arthritis. He is started on DMARDs and advised to engage in regular low-impact exercise to manage symptoms.",55,F,Rheumatoid Arthritis
51
- 49,Scott,Foster,[email protected],"A 40-year-old female reports frequent episodes of heartburn and regurgitation. Upper endoscopy reveals signs of erosive esophagitis, consistent with gastroesophageal reflux disease (GERD). She is started on proton pump inhibitors and advised to avoid trigger foods.",40,M,GERD
 
17
  15,Megan,Clark,[email protected],"A 35-year-old female reports persistent fatigue and weight gain. Thyroid function tests reveal hypothyroidism, and she is started on levothyroxine. She is advised to monitor her symptoms and return for regular thyroid function tests.",35,F,Hypothyroidism
18
  16,Joseph,Rodriguez,[email protected],"A 58-year-old male with a history of coronary artery disease presents with chest pain on exertion. Stress test shows ischemic changes, and coronary angiography reveals significant stenosis. The patient is scheduled for coronary artery bypass grafting.",58,M,Coronary Artery Disease
19
  17,Laura,Lewis,[email protected],"A 42-year-old female presents with skin rash and joint pain. Blood tests reveal positive ANA and anti-dsDNA antibodies, consistent with systemic lupus erythematosus. She is started on hydroxychloroquine and advised to avoid sun exposure.",42,F,Systemic Lupus Erythematosus
20
+ 18,Charles,Walker,[email protected],"A 65-year-old male with a history of osteoporosis presents for follow-up. DEXA scan shows stable bone density, and she is advised to continue calcium and vitamin D supplementation and engage in weight-bearing exercises.",65,M,Osteoporosis (Stable)
21
+ 19,Anna,Hall,[email protected],"A 29-year-old female presents with persistent cough and night sweats. Chest X-ray shows hilar lymphadenopathy, and biopsy confirms sarcoidosis. The patient is started on corticosteroids and advised to monitor his symptoms closely.",29,F,Sarcoidosis
22
+ 20,Matthew,Allen,[email protected],"A 50-year-old male reports frequent episodes of heartburn and regurgitation. Upper endoscopy reveals erosive esophagitis, consistent with gastroesophageal reflux disease (GERD). She is started on proton pump inhibitors and advised to avoid trigger foods.",50,M,GERD
23
+ 21,Stephanie,Young,[email protected],"A 37-year-old female presents with knee pain after a sports injury. MRI shows a torn meniscus, and he is scheduled for arthroscopic surgery. He is advised to engage in physical therapy post-surgery to regain strength and mobility.",37,F,Torn Meniscus
24
+ 22,Anthony,King,[email protected],"A 60-year-old male with a history of breast cancer presents for follow-up. Mammogram and MRI show no evidence of recurrence, and she is advised to continue regular screenings and report any new symptoms.",60,M,Breast Cancer (Remission)
25
+ 23,Rebecca,Wright,[email protected],"A 45-year-old female reports difficulty sleeping and daytime fatigue. Sleep study confirms obstructive sleep apnea, and he is started on CPAP therapy. He is advised to maintain a healthy weight and avoid alcohol before bedtime.",45,F,Obstructive Sleep Apnea
26
+ 24,Joshua,Scott,[email protected],A 33-year-old male presents with abdominal bloating and irregular bowel movements. Colonoscopy reveals signs of irritable bowel syndrome (IBS). She is advised to follow a low-FODMAP diet and monitor her symptoms.,33,M,IBS
27
+ 25,Patricia,Green,[email protected],"A 70-year-old female with a history of atrial fibrillation presents for follow-up. ECG shows controlled rhythm, and he is advised to continue anticoagulation therapy and regular monitoring.",70,F,Atrial Fibrillation (Controlled)
28
+ 26,Andrew,Adams,[email protected],"A 25-year-old male reports frequent migraines with aura. Neurological examination is normal, and she is started on triptans for acute management and advised to keep a headache diary.",25,M,Migraines with Aura
29
+ 27,Kimberly,Baker,[email protected],"A 55-year-old female presents with persistent knee pain and swelling. X-ray shows osteoarthritis, and he is started on NSAIDs and advised to engage in low-impact exercises to manage symptoms.",55,F,Osteoarthritis
30
+ 28,Eric,Gonzalez,[email protected],"A 40-year-old male reports fatigue and hair loss. Blood tests reveal iron deficiency anemia, and she is started on iron supplements. She is advised to increase dietary iron intake.",40,M,Iron Deficiency Anemia
31
+ 29,Michelle,Nelson,[email protected],"A 68-year-old female with a history of chronic kidney disease presents for follow-up. Blood tests show stable kidney function, and he is advised to continue dietary modifications and regular monitoring.",68,F,Chronic Kidney Disease (Stable)
32
+ 30,Kevin,Carter,[email protected],A 30-year-old male presents with recurrent episodes of vertigo. Audiometry and vestibular testing confirm Meniere's disease. She is started on diuretics and advised to follow a low-sodium diet.,30,M,Meniere's Disease
33
+ 31,Elizabeth,Mitchell,[email protected],"A 45-year-old female reports persistent shoulder pain after a fall. MRI shows a rotator cuff tear, and he is scheduled for surgical repair. He is advised to engage in physical therapy post-surgery.",45,F,Rotator Cuff Tear
34
+ 32,Jason,Perez,[email protected],"A 50-year-old male presents with frequent urination and thirst. Blood tests reveal elevated blood glucose levels, consistent with type 2 diabetes. She is started on metformin and advised to monitor her blood sugar levels closely.",50,M,Type 2 Diabetes
35
+ 33,Angela,Roberts,[email protected],"A 60-year-old female with a history of stroke presents for follow-up. Neurological examination shows stable condition, and he is advised to continue antiplatelet therapy and engage in regular physical activity.",60,F,Stroke (Stable)
36
+ 34,Mark,Phillips,[email protected],"A 35-year-old male reports persistent abdominal pain and diarrhea. Colonoscopy reveals signs of Crohn's disease, and she is started on biologic therapy. She is advised to monitor her symptoms and follow dietary recommendations.",35,M,Crohn's Disease
37
+ 35,Laura,Evans,[email protected],"A 28-year-old female presents with recurrent episodes of chest pain and palpitations. ECG shows signs of Wolff-Parkinson-White syndrome, and he is referred to a cardiologist for further evaluation.",28,F,Wolff-Parkinson-White Syndrome
38
+ 36,Steven,Turner,[email protected],"A 70-year-old male with a history of Alzheimer's disease presents for follow-up. Cognitive testing shows progression of symptoms, and she is started on memantine. She is advised to engage in cognitive exercises and maintain a structured routine.",70,M,Alzheimer's Disease
39
+ 37,Jennifer,Parker,[email protected],"A 22-year-old female comes in for a routine physical exam. He reports no health issues and is physically active. His examination is normal, and he is advised to continue regular exercise and healthy eating.",22,F,None
40
+ 38,Paul,Collins,[email protected],"A 55-year-old male presents with persistent fatigue and joint pain. Blood tests reveal elevated ESR and CRP, consistent with polymyalgia rheumatica. She is started on corticosteroids and advised to monitor her symptoms closely.",55,M,Polymyalgia Rheumatica
41
+ 39,Laura,Stewart,[email protected],A 40-year-old female reports frequent episodes of heartburn and regurgitation. Upper endoscopy reveals signs of Barrett's esophagus. He is started on proton pump inhibitors and scheduled for regular surveillance endoscopies.,40,F,Barrett's Esophagus
42
+ 40,Thomas,Morris,[email protected],"A 65-year-old male with a history of hypertension presents for follow-up. Blood pressure is well-controlled, and she is advised to continue her current medication regimen and lifestyle modifications.",65,M,Hypertension (Controlled)
43
+ 41,Emily,Reed,[email protected],"A 30-year-old female presents with recurrent episodes of abdominal pain and diarrhea. Stool tests reveal signs of celiac disease, and he is advised to follow a strict gluten-free diet.",30,F,Celiac Disease
44
+ 42,Richard,Howard,[email protected],"A 50-year-old male reports persistent fatigue and weight gain. Thyroid function tests reveal Hashimoto's thyroiditis, and she is started on levothyroxine. She is advised to monitor her symptoms and return for regular thyroid function tests.",50,M,Hashimoto's Thyroiditis
45
+ 43,Barbara,Cooper,[email protected],"A 60-year-old female with a history of chronic liver disease presents for follow-up. Liver function tests show stable condition, and he is advised to continue dietary modifications and regular monitoring.",60,F,Chronic Liver Disease (Stable)
46
  44,Jessica,Peterson,[email protected],"A 35-year-old female presents with recurrent episodes of chest pain and palpitations. ECG shows signs of long QT syndrome, and she is referred to a cardiologist for further evaluation.",35,F,Long QT Syndrome
47
  45,Timothy,Gray,[email protected],"A 28-year-old male reports persistent knee pain after a sports injury. MRI shows a torn ACL, and he is scheduled for surgical repair. He is advised to engage in physical therapy post-surgery.",28,M,Torn ACL
48
  46,Sharon,Ramirez,[email protected],"A 70-year-old female with a history of macular degeneration presents for follow-up. Ophthalmological examination shows stable condition, and she is advised to continue regular eye exams and take prescribed supplements.",70,F,Macular Degeneration (Stable)
49
+ 47,Gregory,James,[email protected],"A 22-year-old male comes in for a routine physical exam. She reports no health issues and is physically active. Her examination is normal, and she is advised to continue regular exercise and healthy eating.",22,M,None
50
+ 48,Victoria,Hughes,[email protected],"A 55-year-old female presents with persistent fatigue and joint pain. Blood tests reveal elevated ESR and CRP, consistent with rheumatoid arthritis. He is started on DMARDs and advised to engage in regular low-impact exercise to manage symptoms.",55,F,Rheumatoid Arthritis
51
+ 49,Scott,Foster,[email protected],"A 40-year-old male reports frequent episodes of heartburn and regurgitation. Upper endoscopy reveals signs of erosive esophagitis, consistent with gastroesophageal reflux disease (GERD). She is started on proton pump inhibitors and advised to avoid trigger foods.",40,M,GERD