Derek-Wds / UH-backend

Guys, time to work! Feel free to contribute!
0 stars 0 forks source link

Table Information Duplication #4

Closed FrederickGeek8 closed 4 years ago

FrederickGeek8 commented 4 years ago

In the log table and medicine table, we have columns for doctors' names and patients' names. We shouldn't do this! If the doctor or patient changes their name, then the table becomes out of date.

Derek-Wds commented 4 years ago

Well, you are right but I guess we shouldn't consider that? Otherwise how can we link the log with patient and doctor? Simply use their phones? I mean this will reduce the information the log, detailed log and diagnosis have.

FrederickGeek8 commented 4 years ago

It's just a simple inner join on the phone numbers of the doctors and patients... Surely it's doable. You can output the same information still.

Also we have to consider it since editing your profile is one of the features we've had the longest...

Derek-Wds commented 4 years ago

I know, but again I don't know how to do a join table or foreign key stuff on sqlalchemy... There is always a bug in it...

FrederickGeek8 commented 4 years ago

If you really can't figure it out, just manually do it in Python. AKA, filter doctor by doctor phone then output the doctor name

Derek-Wds commented 4 years ago

Fix it in the latest push. Closed.