The problem comes from the fact that you have split the persons into two separate tables.
So instead of having separate
Doctor
and
Nurse
table, replace them with a single
Person
table and add a column which identifies if the person is a doctor or a nurse.
So the person could be something like
Person
------
- PersonCode
- PersonType (e.g. 1=doctor, 2=nurse)
- Name
- ...
The foreign key reference in
Accounting
would now point only to person table.