forked from gcivil-nyu-org/INT2-Monday-Spring2024-Team-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.txt
34 lines (29 loc) · 4.11 KB
/
example.txt
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
@csrf_exempt
def add_mock_data(request):
if request.method == "POST":
# Adding data to the Hospital table
# hospital.objects.create(name="NYU Langone Health", address="424 E 34th St, New York, NY 10016", email="[email protected]", password="123456", contactInfo="123456781", status="approved")
# hospital.objects.create(name="Mount Sinai Hospital", address="1468 Madison Ave, New York, NY 10029", email="[email protected]", password="123456", contactInfo="123456781", status="approved")
# hospital.objects.create(name="CVS Pharmacy", address="305 East 86th St, New York, NY 10028", email="[email protected]", password="123456", contactInfo="123456781", status="approved")
# hospital.objects.create(name="Duane Reade", address="1 Union Square South, New York, NY 10003", email="[email protected]", password="123456", contactInfo="123456781", status="approved")
# Adding hospitalStaff data
# hospitalStaff.objects.create(hospitalID=hospital.objects.get(id=5), admin=False, name="Dr. Steve Johnson", email="[email protected]", password="pass1234", specialization="Orthopedics", contactInfo="1234567890")
# hospitalStaff.objects.create(hospitalID=hospital.objects.get(id=6), admin=False, name="Dr. Coco Gauff", email="[email protected]", password="pass1234", specialization="Anesthesiology", contactInfo="1234567890")
# hospitalStaff.objects.create(hospitalID=hospital.objects.get(id=7), admin=False, name="Carlos Alcaraz", email="[email protected]", password="pass1234", specialization="", contactInfo="1234567890")
# hospitalStaff.objects.create(hospitalID=hospital.objects.get(id=8), admin=False, name="Sofia Kenin", email="[email protected]", password="pass1234", specialization="", contactInfo="1234567890")
# hospitalStaff.objects.create(hospitalID=hospital.objects.get(id=6), admin=False, name="Dr. Jannik Sinner", email="[email protected]", password="pass1234", specialization="Psychiatry", contactInfo="1234567890")
# Adding user data
# user.objects.create(email="[email protected]", name="Sam Geier", password="userpass1", username="sgeier19", dob="1994-05-14", contactInfo="1234567890", proofOfIdentity="Proof1", address="70 Washington Square S, New York, NY 10012", securityQues="", securityAns="",bloodGroup="A+")
# Adding appointment Data
# appointment.objects.create(name="Vaccine", properties = json.dumps({"type":"Fluzone Sanofi", "dose_2": False, "date":datetime.datetime.now()}, default=str))
# appointment.objects.create(name="Vaccine", properties = json.dumps({"type":"Comirnaty Pfizer", "dose_2": True, "date":datetime.datetime.now()}, default=str))
# appointment.objects.create(name="Blood test", properties = json.dumps({"type":"Iron check", "dose_2": False, "date":datetime.datetime.now()}, default=str))
# appointment.objects.create(name="MRI", properties = json.dumps({"type":"Bad back", "dose_2": False, "date":datetime.datetime.now()}, default=str))
# healthRecord data
# healthRecord.objects.create(doctorID=11, userID=user.objects.get(id=5), hospitalID=7, status="approved", createdAt=datetime.datetime.now(), updatedAt=datetime.datetime.now(), appointmentId=appointment.objects.get(id=5), healthDocuments="")
# healthRecord.objects.create(doctorID=12, userID=user.objects.get(id=5), hospitalID=8, status="approved", createdAt=datetime.datetime.now(), updatedAt=datetime.datetime.now(), appointmentId=appointment.objects.get(id=6), healthDocuments="")
# healthRecord.objects.create(doctorID=9, userID=user.objects.get(id=5), hospitalID=5, status="approved", createdAt=datetime.datetime.now(), updatedAt=datetime.datetime.now(), appointmentId=appointment.objects.get(id=7), healthDocuments="")
# healthRecord.objects.create(doctorID=10, userID=user.objects.get(id=5), hospitalID=6, status="approved", createdAt=datetime.datetime.now(), updatedAt=datetime.datetime.now(), appointmentId=appointment.objects.get(id=8), healthDocuments="")
return HttpResponse("Data Added to the database")
else:
return HttpResponse("Please change the request method to POST")