-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (32 loc) · 1.33 KB
/
main.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
"""
TODO:
- generate staff manager id
"""
from generators import dummy_generator, queries_generator
import json
def main():
patients = dummy_generator.generatePatient()
staffs = dummy_generator.generateStaff()
clinics = dummy_generator.generateClinics()
wards = dummy_generator.generateWards(clinics, staffs)
beds = dummy_generator.generateBeds(wards)
ipts, opts, appointments = dummy_generator.generateOPTIPTAppointment(patients, staffs, clinics)
treatments = dummy_generator.generateTreatmentDrug(ipts, opts)
suppliers = dummy_generator.generateSupplySuppliers()
queries_generator.insert_patients(patients)
queries_generator.insert_staffs(staffs)
queries_generator.insert_clinics(clinics)
queries_generator.insert_suppliers(suppliers)
queries_generator.insert_supplies(suppliers,staffs)
queries_generator.insert_wards(wards)
queries_generator.insert_beds(beds)
queries_generator.insert_ipts(ipts, wards, beds)
queries_generator.insert_opts(opts)
queries_generator.insert_appointments(appointments)
queries_generator.insert_treatments(treatments)
queries = queries_generator.get_queries()
with open("queries.sql", "w", encoding="utf8") as queries_file:
for query in queries:
queries_file.write(query + "\n")
if __name__ == "__main__":
main()