Hi,
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.

Thanks,

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?

Kishor

Hi,
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

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.