Side Effects Counts
How often are side effects reported?
');
echo('DISCLAIMER: ALL DATA PROVIDED AS-IS. Not for clinical use, you should assume all results are unvalidated.');
echo('Side EffectReport Count');
$con = mysql_connect("localhost","patient2_user3","best3");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("patient2_patient_pvpoll", $con);
//echo("Maintenance in progress..");
$sql = "SELECT se, freq from `FDAMPSEALL` where mp = '".$mp."' ORDER BY se ";
$fdaresult = mysql_query($sql) or die(mysql_error());
//echo("Maintenance in progress..");
$fdanum = mysql_num_rows($fdaresult);
while ($row = mysql_fetch_array($fdaresult))
{
$key = strtolower(trim($row['se']));
$both_array[$key] = $row['freq'];
}
//echo("Maintenance in progress..");
/* add votes from fdaselist */
$sql = "SELECT se, count(*) as stot from fdaselist where mp = '".$mp."' group by se ORDER BY `stot`";
$result = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($result);
/* add counts if match found */
while ($row = mysql_fetch_array($result))
{
$key = strtolower(trim($row['se']));
if( array_key_exists( $key, $both_array ))
{
// if found - add frequency, otherwise ignore
$both_array[$key] = $both_array[$key] + $row['stot'];
}
}
arsort($both_array);
$n=0;
foreach ($both_array as $key => $value)
{
$n++;
if($n < 1000)
{
$se = substr( trim($key), 0, 50);
$most = $most. '|'. ucfirst(substr($se, 0, 10));
$freq = $value;
$trstyle = '';
$goodse = ucwords($se);
$goodse = str_replace('I Have', '', $goodse);
$goodse = str_replace(' Have ', '', $goodse);
$selink = str_replace(' ', '-', $se);
if($n < 200)
$link = '';
else{
$link = '';
}
echo(''.$trstyle.'> ('.$freq.')');
}
}
echo('');
mysql_close($con);
?>
Common Side Effects
|