What means OPD Visit table? What is its purpose?

About your 2nd question, simply put another foreign key of Referring Doctor into the OPD table. What you have to do, when you will insert one or another? For that one which you want to insert an ID (which has to be higher then 0) simple put an integer, but the other put 0 (zero). This way you will know what kind of doctor it is. If the value is zero, you will know its not this type (but the other).
I hope you know what I mean.

Edited by Mitja Bonca: n/a



OPD Visit table is created as separate table from OPD table because OPD REG_NO in OPD table is a unique no. but same no. wil repeat when same patient comes in next visit. So the fact is pk column does not get duplicate no. to avoid redudency I have created another table as OPD Visit table.Is it correct?



As per your advice I have made little changes now there is composite key(2 pk) in OPD table i.e. OPD_RegNo & OPD Date. Now my query is
In 'Patient Complaint' table can (OPD_RegNo & OPD Date) composite foreign keys will be able to uniquely identify each complaint?

Pl. reply


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.