I have a query on database table structure. My Patient Details table in a SQL Server 2008 database looks like this:
--PatientId(PK)-- --PatientType-- --DoctorId(FK)-- --DateOfVisit-- --PrescriptionId(FK)--
Each patient may visit the hospital multiple times. I need to link all the visits of a patient and show them in a linked way that the admin can navigate with the previous and next visits..
So I think I can do it only by having a record for each visit with a VisitId.
I need to be Careful that the database should not be loaded with unnecessary fields. Also it should not affect the fetching time badly.
I think these are the available ways. Suggest me if any available.
--PatientId(PK)-- --PatientType-- --DoctorId(FK)-- --DateOfVisit-- --PrescriptionId(FK)-- --VisitId-- --PrevVisitId-- NextVisitId--
or
having a separate table for Visit as
--VisitId(PK)-- -PrevVisitId(FK)-- --NextVisitId(FK)--
Apologies if my post is duplicate.. Correct me, redirect me wherever/whenever needed.