-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed.py
131 lines (120 loc) · 7.31 KB
/
seed.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
"""SEED FOR CAPSTONE"""
from models import db, connect_db, Medication, Doctor, Patient, Nurse, Medication_Given
from app import app
import datetime
# Create Tables
db.drop_all()
db.create_all()
d1 = Doctor(first_name="mikey",last_name="jamie",office_phone="555-5555")
d2 = Doctor(first_name="Jun",last_name="Folkan",office_phone="555-5555")
d3 = Doctor(first_name="Moke",last_name="NightRyder",office_phone="555-5555")
d4 = Doctor(first_name="Miguel",last_name="Sabado",office_phone="555-5555")
db.session.add(d1)
db.session.add(d2)
db.session.add(d3)
db.session.add(d4)
# datetime.date(yr, month, day)
p1 = Patient(first_name="koopa",last_name="posha",date_of_birth= datetime.date(1999,1,19))
p2 = Patient(first_name="musha",last_name="shqarm",date_of_birth= datetime.date(2001,4,21))
p3 = Patient(first_name="Gibber",last_name="Nimmerman",date_of_birth= datetime.date(1973,1,9))
p4 = Patient(first_name="Andy",last_name="Rudoph",date_of_birth= datetime.date(1973,1,9))
p5 = Patient(first_name="Bob",last_name="James",date_of_birth= datetime.date(1973,1,9))
p6 = Patient(first_name="Catherine",last_name="Hackson",date_of_birth= datetime.date(1985,4,5))
p7 = Patient(first_name="Douglas",last_name="Nickerson",date_of_birth= datetime.date(1902,12,24))
p8 = Patient(first_name="Enith",last_name="Thorth",date_of_birth= datetime.date(1800,2,12))
p9 = Patient(first_name="Frank",last_name="Gord",date_of_birth= datetime.date(2000,3,2))
p10 = Patient(first_name="Gordon",last_name="Ramsuckle",date_of_birth= datetime.date(1989,6,19))
p11 = Patient(first_name="Henry",last_name="Shoowickle",date_of_birth= datetime.date(1999,3,20))
p12 = Patient(first_name="Isaac",last_name="Newton",date_of_birth= datetime.date(1995,4,29))
p13 = Patient(first_name="John",last_name="Hazzlesmith",date_of_birth= datetime.date(1992,4,16))
p14 = Patient(first_name="Ken",last_name="Zenith",date_of_birth= datetime.date(1959, 8,4))
p15 = Patient(first_name="Lewis",last_name="Apple",date_of_birth= datetime.date(1964,5,21))
db.session.add(p1)
db.session.add(p2)
db.session.add(p3)
db.session.add(p4)
db.session.add(p5)
db.session.add(p6)
db.session.add(p7)
db.session.add(p8)
db.session.add(p9)
db.session.add(p10)
db.session.add(p11)
db.session.add(p12)
db.session.add(p13)
db.session.add(p14)
db.session.add(p15)
m1 = Medication(name="tylenol 325mg",description="for pain",doctors_id=1,patients_id=1)
m2 = Medication(name="turmeric 500mg",description="anti-oxidant",doctors_id=1,patients_id=2)
m3 = Medication(name="caffeine tablets",description="for focus",doctors_id=1,patients_id=2)
m4 = Medication(name="vitamin c",description="immune support",doctors_id=1,patients_id=2)
m5 = Medication(name="hydralazine 50mg",description="blood pressure",doctors_id=1,patients_id=3)
m6 = Medication(name="hydrophor to bilateral heels",description="Dry Skin",doctors_id=1,patients_id=3)
m7 = Medication(name="labetalol 25mg",description="blood pressure",doctors_id=1,patients_id=3)
m8 = Medication(name="crestor 75mg",description="hyperlipidemia, cholesterol",doctors_id=1,patients_id=3)
m9 = Medication(name="vancomycin PO",description="C Diff",doctors_id=1,patients_id=3)
m10 = Medication(name="PLAQUENIL (Oral Pill)",description="U07.1 - COVID-19",doctors_id=1,patients_id=4)
m11 = Medication(name="TYLENOL (Oral Pill) 325mg",description="R52 - Pain, unspecified",doctors_id=1,patients_id=4)
m12 = Medication(name="Vancomycin (Oral Liquid) 25 mg/ml Sol",description="A04.71 - Enterocolitis due to Clostridium difficile, recurrent",doctors_id=1,patients_id=4)
m13 = Medication(name="PLAQUENIL (Oral Pill)",description="U07.1 - COVID-19",doctors_id=1,patients_id=5)
m14 = Medication(name="TYLENOL (Oral Pill) 325mg",description="R52 - Pain, unspecified",doctors_id=1,patients_id=5)
m15 = Medication(name="Vancomycin (Oral Liquid) 25 mg/ml Sol",description="A04.71 - Enterocolitis due to Clostridium difficile, recurrent",doctors_id=1,patients_id=5)
m16 = Medication(name="PLAQUENIL (Oral Pill)",description="U07.1 - COVID-19",doctors_id=1,patients_id=6)
m17 = Medication(name="TYLENOL (Oral Pill) 325mg",description="R52 - Pain, unspecified",doctors_id=1,patients_id=6)
m18 = Medication(name="Vancomycin (Oral Liquid) 25 mg/ml Sol",description="A04.71 - Enterocolitis due to Clostridium difficile, recurrent",doctors_id=1,patients_id=6)
m19 = Medication(name="PLAQUENIL (Oral Pill)",description="U07.1 - COVID-19",doctors_id=1,patients_id=7)
m20 = Medication(name="TYLENOL (Oral Pill) 325mg",description="R52 - Pain, unspecified",doctors_id=1,patients_id=7)
m21 = Medication(name="Vancomycin (Oral Liquid) 25 mg/ml Sol",description="A04.71 - Enterocolitis due to Clostridium difficile, recurrent",doctors_id=1,patients_id=7)
m22 = Medication(name="PLAQUENIL (Oral Pill)",description="U07.1 - COVID-19",doctors_id=1,patients_id=8)
m23 = Medication(name="TYLENOL (Oral Pill) 325mg",description="R52 - Pain, unspecified",doctors_id=1,patients_id=8)
m24 = Medication(name="Vancomycin (Oral Liquid) 25 mg/ml Sol",description="A04.71 - Enterocolitis due to Clostridium difficile, recurrent",doctors_id=1,patients_id=8)
m25 = Medication(name="metFORMIN (Oral Pill) 500 mg Tab",description="E08.9 - Diabetes mellitus due to underlying condition without complications",doctors_id=1,patients_id=9)
m26 = Medication(name="Calcium Carbonate (Chewable)",description="K21.9 - Gastro-esophageal reflux disease without esophagitis",doctors_id=1,patients_id=9)
m27 = Medication(name="PEPCID (Oral Pill) 10 mg Tab",description="K21.9 - Gastro-esophageal reflux disease without esophagitis",doctors_id=1,patients_id=10)
m28 = Medication(name="Levothyroxine (Oral Pill) 0.05 mg Tab",description="E03.9 - Hypothyroidism, unspecified",doctors_id=1,patients_id=10)
m29 = Medication(name="Levothyroxine (Oral Pill) 0.05 mg Tab",description="E03.9 - Hypothyroidism, unspecified",doctors_id=1,patients_id=11)
m30 = Medication(name="hydralazine 50mg",description="blood pressure",doctors_id=1,patients_id=12)
m31 = Medication(name="hydralazine 50mg",description="blood pressure",doctors_id=1,patients_id=13)
m32 = Medication(name="Calcium Carbonate (Chewable)",description="K21.9 - Gastro-esophageal reflux disease without esophagitis",doctors_id=1,patients_id=15)
m33 = Medication(name="Vancomycin (Oral Liquid) 25 mg/ml Sol",description="A04.71 - Enterocolitis due to Clostridium difficile, recurrent",doctors_id=1,patients_id=14)
db.session.add(m1)
db.session.add(m2)
db.session.add(m3)
db.session.add(m4)
db.session.add(m5)
db.session.add(m6)
db.session.add(m7)
db.session.add(m8)
db.session.add(m9)
db.session.add(m10)
db.session.add(m11)
db.session.add(m12)
db.session.add(m13)
db.session.add(m14)
db.session.add(m15)
db.session.add(m16)
db.session.add(m17)
db.session.add(m18)
db.session.add(m19)
db.session.add(m20)
db.session.add(m21)
db.session.add(m22)
db.session.add(m23)
db.session.add(m24)
db.session.add(m25)
db.session.add(m26)
db.session.add(m27)
db.session.add(m28)
db.session.add(m29)
db.session.add(m30)
db.session.add(m31)
db.session.add(m32)
db.session.add(m33)
n1 = Nurse(first_name="Michael",last_name="Jamieson")
db.session.add(n1)
db.session.commit()
mg1 = Medication_Given(nurses_id=1, patients_id=1,doctors_id=1,medications_id=1)
mg2 = Medication_Given(nurses_id=1, patients_id=2,doctors_id=1,medications_id=2)
db.session.add(mg1)
db.session.add(mg2)
db.session.commit()