I have already developed a similar solution.
I store in the same table patient and companies (they share many similar data),
my invoices have two filed looking to the ID in the above table:
when invoices directly the patient, the two field have the same data
so I can address the patient data and the company to be invoiced fata
Thank you for your reply.
I am not quite sure if I understand have you have set it up.
Could you be a little more specific?
I use only one table to store data about patients and companies (you have two patient and payers)
In the invoice table I have two fields that are related with 2 patients TOC; first is the id of the examined patient and the second the ID of the payer. In the case the patient is the payer, the 2 field store the same ID.
This allow me to use the same scripts and layouts f.i. to search and select the payer company, etc.
hope it is clear
Thank you Gianandrea.
It was the 2 TOC I didn´t get right.