Skip to content

Commit 22da4ac

Browse files
committed
update
1 parent 6447c7d commit 22da4ac

3 files changed

Lines changed: 31 additions & 10 deletions

File tree

config/env/env.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ SQL_HOST=db
99
SQL_PORT=5432
1010
DATABASE=postgres
1111
LOGIN_REDIRECT_URL=
12+
OPENAI_API_KEY=
13+
PINECONE_API_KEY=

frontend/src/pages/PatientManager/NewPatientForm.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ const NewPatientForm = ({
298298
className={isLoading ? " url_input_loading" : "dropdown"}
299299
>
300300
<option value="Null"> </option>
301-
<option value="mania"> Manic </option>
302-
<option value="depression">Depressed</option>
301+
<option value="manic"> Manic </option>
302+
<option value="depressed">Depressed</option>
303303
<option value="hypomania">Hypomanic</option>
304304
<option value="euthymic">Euthymic</option>
305-
<option value="Mixed">Mixed</option>
305+
{/* <option value="Mixed">Mixed</option> */}
306306
</select>
307307
</div>
308308
{/* {errorMessage && (
@@ -320,19 +320,19 @@ const NewPatientForm = ({
320320
<div className="justify-left flex gap-x-3">
321321
<div className="flex h-6 items-center ">
322322
<input
323-
id="Mania"
324-
name="Mania"
323+
id="Manic"
324+
name="Manic"
325325
type="checkbox"
326326
className="h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"
327-
onChange={(e) => handleCheckboxChange(e, "Mania")}
327+
onChange={(e) => handleCheckboxChange(e, "Manic")}
328328
/>
329329
</div>
330330
<div className="text-sm leading-6">
331331
<label
332-
htmlFor="Mania"
332+
htmlFor="Manic"
333333
className="font-medium text-gray-900"
334334
>
335-
Mania
335+
Manic
336336
</label>
337337
</div>
338338
</div>
Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
1-
# Generated by Django 4.2.3 on 2023-12-01 10:39
2-
31
from django.db import migrations
42

53

4+
def add_state_medication_data(apps, schema_editor):
5+
StateMedication = apps.get_model('api', 'StateMedication')
6+
7+
# Define your data
8+
state_medication_data = [
9+
{'state': 'mania', 'first': 'mania-first',
10+
'second': 'mania-second', 'third': 'mania-third'},
11+
{'state': 'hypomanic', 'first': 'hypomanic-first',
12+
'second': 'hypomanic-second', 'third': 'hypomanic-third'},
13+
{'state': 'depressed', 'first': 'depressed-first',
14+
'second': 'depressed-second', 'third': 'depressed-third'},
15+
{'state': 'euthymic', 'first': 'euthymic-first',
16+
'second': 'euthymic-second', 'third': 'euthymic-third'},
17+
]
18+
19+
# Insert the data into the StateMedication table
20+
for med in state_medication_data:
21+
StateMedication.objects.create(**med)
22+
23+
624
class Migration(migrations.Migration):
725

826
dependencies = [
927
('api', '0001_initial'),
1028
]
1129

1230
operations = [
31+
migrations.RunPython(add_state_medication_data),
1332
]

0 commit comments

Comments
 (0)