Hi,
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.
Merlin
thanks, but I guess I was not clear that I am trying to do this programmatically, not from the user interface. I have my customization function already written in php and now want to learn what SQL queries I have to write against the database to get the data I described in my initial message.
Excellent Stephen!
that helped me a lot already - digging myself through the code.
I might have a few follow up questions, but for now I am up and running.
Thanks - Merlin