Hi all, I am debating with myself (surely a sign of madness) over a design question to do with an evolving medical application.
There is a patient file with details of all the patients. I have created a doctor table for doctors who send patients to the clinic. But they can be patients also.
I also need to store info on the doctors that work at the clinic.
I am thinking that maybe I should make the patient file effectively a people file and use flags to indicate whether a person is also a doctor and or is a staff member and then use indexes to enable queries on doctors or staff doctors etc to proceed nearly as quickly as if they were in separate tables. My index count will go up by 2 so time to add a patient will increase slightly.
Some questions:
Can I conditionally add records to an index? It would be wonderful if a person record that will only function as a patient could just update the appropriate indexes (primary key, name, date of birth) whilst a person record marked as a doctor could also add to the index of doctors, and similarly for a staff member.
Has anyone implemented a design like this I wonder?
Any thoughts you may have would be appreciated.
Regards
xProgrammer