I am working on creating custom forms for my clinic. I would like to know how to retrieve data of a form from the previous encounter of a patient. I have been trying something like this just to access any data from the database (in this case for the current patient) in the new.php file of the form, but I’m not having much luck. I will keep playing around with this and figure out a way to get the data. Any suggestions are welcome. If necessary, I will establish my own database connection and get the data that way.
(This fails … working on enabling debug messages in PHP to figure out the problem)
if (is_numeric($pid)) {
$result = getPatientData($pid, "fname,lname");
echo 'true';
}