$age = ""; } $ageUnit = getAgeUnitByValue($con, $row['age_unit']); $sex = $row['sex']; if ($sex == 1) { $sex = "Male"; } else { if ($sex == 2) { $sex = "Female"; } else { if ($sex == 3) { $sex = "Unknown"; } } } $ethnic = getEthnicByValue($con, $row['ethnic']); $desig = $row['desig']; $org = $row['reporter_org']; $Source = getPrimSourceByValue($con, $row['Source']); $State = $row['State']; $table .= "<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style='vertical-align:top'>{$c}</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style='vertical-align:top'> <input type='checkbox' name='formID[]' value='{$formID}' /> </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style='vertical-align:top'> <input type='button' class='btn btn-sm' value=' + ' onclick='toggle(\"{$formID}\")' /> </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style='vertical-align:top'> \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>{$adrNo}</b> <br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPatient Demographic: {$age} {$ageUnit}, {$sex}, {$ethnic} <br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tReporter: {$Source}, {$desig}, {$State}, {$org} <br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id='{$formID}' class='cToggle'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<table class='table table-condensed table-bordered'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width='50%'><b><center> Drug Details </center></b></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width='50%'><b><center> Adverse Drug Reaction </center></b></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style='vertical-align:top'>{$drugStr}</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style='vertical-align:top'>{$reacStr}</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>"; $c++; } } else { // $table .= "<tr class='error'> <td> <center> No Result Found </center> </td> </tr>"; // $table .= "<tr class='error'> <td></td><td></td><td></td><td></td> </tr>"; } $table .= "</tbody></table>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='totalRes' value='{$c}'/>\n\t\t\t\t\t\t\t\t\t\t\t\t<center> {$generateButton} </center>\n\t\t\t\t\t\t\t\t\t\t\t</form></div></div>"; echo $table; } else { echo "An error occured";
$sex = "Female"; } else { if ($sex == 3) { $sex = "Unknown"; } } } $pregnancyStat = $rowPart1['pregnancyStat']; if ($pregnancyStat == 1) { $pregnancyStat = "Yes"; } else { if ($pregnancyStat == 2) { $pregnancyStat = "No"; } } $ethnic = getEthnicByValue($con, $rowPart1['ethnic']); $allergyStat = $rowPart1['allergyStat']; if ($allergyStat == 1) { $allergyStat = "Yes"; } else { if ($allergyStat == 2) { $allergyStat = "No"; } else { if ($allergyStat == 3) { $allergyStat = "Unknown"; } } } $history = $rowPart1['history']; $part1Table = "<table border='1' class='table table-condensed table-bordered'><tr class='dark'><td colspan='8'> <b> REPORT FORM <b> </td></tr><tr><td> Report No. </td><td> Report Type </td><td> Case Type </td><td> Reference Number </td><td></td><td></td><td></td><td></td></tr><tr><td> {$Adrno} </td><td> {$reportInit} </td><td> {$caseType} </td><td> {$notes} </td><td></td><td></td><td></td><td></td></tr><tr class='dark'><td colspan='8'> <b> PATIENT DEMOGRAPHIC </b> </td></tr><tr><td> Age </td><td> Age Group </td><td> Sex </td><td> Pregnancy Status </td><td> Ethnic </td><td> Allergy Status </td><td></td><td></td></tr><tr><td> {$age} {$age_unit} </td><td> {$age_group} </td><td> {$sex} </td><td> {$pregnancyStat} </td><td> {$ethnic} </td><td> {$allergyStat} </td><td></td><td></td></tr><tr class='dark'><td colspan='8'> <b> Medical History </b> </td></tr><tr><td colspan='8'> <p>{$history}</p> </td></tr></table>"; } else {