Reputation: 3
I am getting crazy thinking about how to develop this:
For my current project (hospital) I need to manage lists of structured data from people with the following fields:
So, I have on my database a table named "patients" where it appears columns with this information.
But in that table could have duplicate records due to we receive the information from two hospital of the same owner.
Thus, it is possible to have a patient X from hospital A and also patient X from hospital B, because sometimes the information stored by hospital A is not complete and it is necessary to take a look to the information stored by hospital B in order to have a full record from that patient.
In this point, it is necessary to remove duplicate information.
And the question is: Once I have remove the duplicate information and I want to generate a list of patients, imagine, Patients_From_Floor1_Date_XX/XX/XXXX
, how could I store that generated list on database? Because I don't want to create one table for each generation.
I use a relational database, MySQL.
I wish you can understand my issue.
Thanks a lot!
Upvotes: 0
Views: 241
Reputation: 13667
I don’t fully understand your question as you jumped through the last part, but say you wanted to record visits, you would need a visits
table.
The visits
table would need to know which hospital, so you’d need a hospitals
table.
Then you’d be able to record a visit like so:
id
hospital_id
floor_number
patient_id
datetime
Then you’d be able to lookup visits acording to hospital, floor, or date.
Upvotes: 1