I am trying to work my way though all the tables and how they are connected and I am getting to some results, but I thought maybe asking somebody who just KNOWS the structure of the database, gets me on the way without missing anything.
What I have to do is output an encounter for a patient as a pdf files which includes all the data in the encounter forms.
So, 1st what table do I use best to get all the encounters for a specific patient ID - the same info that I see when I look at the encounter history in a patients demographics?
Once I have the array of all the encounters, I use each of them (by data) to find all the data for this encounter. For this one, how do I find all the forms (and I have a lot of custom forms there) that were used in that encounter?
Thanks for any help you might be able to give me here.