bug fix of encounter id sent to report.php function