This must be a common issue.
My medical practice db obviously revolves around patients.
A core table is the patient table (pt_t). Initially, I thought the fields would be name (first, middle, last, suffix, etc), date of birth, social security number, address, city, state, phone.
I then thought that I would trim the patient table by putting those things that change (address, phone) to a demographics table that would be a child table in the set. (patient table would be parent table). This would be updated with each visit.
I then started thinking, well, people change their names all the time (marriage/divorce/personal reasons). So I thought maybe, I should put that also in a child table. However, that would essentially leave me with just 3 fields: pt_id (key/unique field), ss#, and DOB. Also, occasionally, people don't have a ss# (e.g., illegal aliens, young children).
The alternative to having a child table would be that the patient table would be editable and with each new office visit/interaction the data for those fields could be "updated". However, I assume that would mean a record from the past would show up with the person's new name and not their previous name. This wouldn't be good either.
I guess my patient table could have the name fields there that would just draw from the child table, but I thought that was the purpose of relational databases- you don't have to have redundant fields.
I would appreciate other's experiences, advice.
Thanks.
My medical practice db obviously revolves around patients.
A core table is the patient table (pt_t). Initially, I thought the fields would be name (first, middle, last, suffix, etc), date of birth, social security number, address, city, state, phone.
I then thought that I would trim the patient table by putting those things that change (address, phone) to a demographics table that would be a child table in the set. (patient table would be parent table). This would be updated with each visit.
I then started thinking, well, people change their names all the time (marriage/divorce/personal reasons). So I thought maybe, I should put that also in a child table. However, that would essentially leave me with just 3 fields: pt_id (key/unique field), ss#, and DOB. Also, occasionally, people don't have a ss# (e.g., illegal aliens, young children).
The alternative to having a child table would be that the patient table would be editable and with each new office visit/interaction the data for those fields could be "updated". However, I assume that would mean a record from the past would show up with the person's new name and not their previous name. This wouldn't be good either.
I guess my patient table could have the name fields there that would just draw from the child table, but I thought that was the purpose of relational databases- you don't have to have redundant fields.
I would appreciate other's experiences, advice.
Thanks.
Comment