$reappear = "Yes";
             } else {
                 if ($reappear == 2) {
                     $reappear = "No";
                 } else {
                     if ($reappear == 3) {
                         $reappear = "Unknown";
                     } else {
                         if ($reappear == 4) {
                             $reappear = "Not Applicable";
                         }
                     }
                 }
             }
             $AdrTerminology = $rowPart4['AdrTerminology'];
             $relatedness = getRelatednessByValue($con, $rowPart4['relatedness']);
             $part4Table .= "<tr> <td>{$suspected}</td> <td>{$actvIngredient}</td> <td>{$actionTaken}</td> <td> {$subsided} </td> <td> {$reappear} </td> <td>{$AdrTerminology}</td> <td>{$relatedness}</td> <td> </td> </tr>";
         }
     } else {
         $part4Table .= "<tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr>";
     }
     $part4Table .= "</table>";
 }
 $sqlPart5 = "SELECT adrDataIDAI, Source, reporter_state, reporter_org, dateRcv\n\t\t\t\t\t\t\t\t\tFROM adrdata WHERE adrFormID = '{$fID}'";
 $resPart5 = mysqli_query($con, $sqlPart5);
 if ($resPart5) {
     $part5Table = "<table border='1' class='table table-condensed table-bordered'><tr class='dark'><td colspan='8'> <b> REPORTER INFORMATION </b> </td></tr><tr><td> Qualification </td><td> Primary Source Qualification </td><td> State </td><td> Instituition </td><td> Date of Report </td><td>  </td><td>  </td><td> </td></tr>";
     if (mysqli_num_rows($resPart5) > 0) {
         $rowPart5 = mysqli_fetch_array($resPart5);
         $Source = getPrimSourceByValue($con, $rowPart5['Source']);
         $reporter_state = $rowPart5['reporter_state'];
Ejemplo n.º 2
0
            $adrugRes = mysqli_query($con, $adrugSql);
            if ($adrugRes) {
                if (mysqli_num_rows($adrugRes) > 0) {
                    while ($adrugRows = mysqli_fetch_assoc($adrugRes)) {
                        $suspected = getCharacterisation($adrugRows['suspected']);
                        $product_name = $adrugRows['product_name'];
                        $MALnum = $adrugRows['MALnum'];
                        $actvIngredient = $adrugRows['actvIngredient'];
                        $dosage = $adrugRows['dosage'];
                        $dosageUnit = getDoseUnitByValue($con, $adrugRows['dosageUnit']);
                        $doseInterval = $adrugRows['doseInterval'];
                        $doseIntervalUnit = getDoseUnitByValue($con, $adrugRows['doseIntervalUnit']);
                        $indication = $adrugRows['indication'];
                        $therapy_start = $adrugRows['therapy_start'];
                        $therapy_stop = $adrugRows['therapy_stop'];
                        $relatedness = getRelatednessByValue($con, $adrugRows['relatedness']);
                        $drugTable .= '<tr>
						<td> ' . $suspected . ' </td>
						<td> ' . $product_name . ' </td>
						<td> ' . $MALnum . ' </td>
						<td> ' . $actvIngredient . ' </td>
						<td> ' . $dosage . ' ' . $dosageUnit . ' </td>
						<td> ' . $doseInterval . ' ' . $doseIntervalUnit . ' </td>
						<td> ' . $indication . ' </td>
						<td> ' . $therapy_start . ' </td>
						<td> ' . $therapy_stop . ' </td>
						<td> ' . $relatedness . ' </td>
					</tr>';
                    }
                }
            }
			<!-- Content Header -->
			<div class="content-header">
				<h2><b class="text-primary"> ADR </b> MADRAC List </h2>
			</div>

			<div class="col-md-12">
				<div class="panel">

					<div class="panel-body">
						<div class="tab-content pn br-n admin-form">

							<?php 
if (isset($_POST)) {
    $relatedness = $_POST['relatedness'];
    $relatednessDesc = getRelatednessByValue($con, $relatedness);
    $madracno = trim($_POST['madracno']);
    $Pharmacological = $_POST['Pharmacological'];
    $sumTable = "<table class='table table-bordered'>\n\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<td width='40%'> Relatedness Drug Reaction: </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width='60%'> {$relatedness} - {$relatednessDesc} </td>\n\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<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> MADRAC No. : </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$madracno} </td>\n\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<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> Pharmacological Group: </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$Pharmacological} </td>\n\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</table><hr/>";
    echo $sumTable;
    // echo "$relatedness, $madracno, $Pharmacological";
    $sql1 = "SELECT DISTINCT adrug.actvIngredient, adrug.product_name\n\t\t\t\t\t\t\t\t\t\t\tFROM adrdata adata, adr_druglist adrug, adrdetail adetail\n\t\t\t\t\t\t\t\t\t\t\tWHERE adata.adrFormID = adrug.adrFormID\n\t\t\t\t\t\t\t\t\t\t\tAND adata.adrFormID = adetail.adrFormID\n\t\t\t\t\t\t\t\t\t\t\tAND adata.`status` = 'MM'\n\t\t\t\t\t\t\t\t\t\t\tAND (adrug.actvIngredient != '' OR adrug.actvIngredient IS NULL)\n\t\t\t\t\t\t\t\t\t\t\tAND (adrug.product_name != '' OR adrug.product_name IS NULL)\n\t\t\t\t\t\t\t\t\t\t\tAND adrug.relatedness = '{$relatedness}'\n\t\t\t\t\t\t\t\t\t\t\tAND adata.Madracno = '{$madracno}'\n\t\t\t\t\t\t\t\t\t\t\tAND adrug.Pharmacological = '{$Pharmacological}'";
    $res1 = mysqli_query($con, $sql1);
    if ($res1) {
        if (mysqli_num_rows($res1) > 0) {
            $c1 = 1;
            $resTable = "<table class='table table-bordered' border='1'>\n\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<th> No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Active Ingredient </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Product Name </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Route </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='10%'> Report No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='8%'> Age </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='8%'> Onset </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Reaction Terminology </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Action Taken </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Dechallenge </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Rechallange </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>";
            while ($row1 = mysqli_fetch_array($res1)) {
                $actvIngredient = $row1['actvIngredient'];
                $product_name = $row1['product_name'];
                $sql2 = "SELECT DISTINCT adrug.route, adata.Adrno, adata.age, adata.age_unit, adetail.Adr_rctFirstTime, adetail.Adr_rctFirstTimeUnit, adetail.AdrTerminology, adrug.drugAction, adrug.subsided, adrug.reappear\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM adrdata adata, adr_druglist adrug, adrdetail adetail\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE adata.adrFormID = adrug.adrFormID\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adata.adrFormID = adetail.adrFormID\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adata.`status` = 'MM'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adrug.relatedness = '{$relatedness}'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adata.Madracno = '{$madracno}'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adrug.Pharmacological = '{$Pharmacological}'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adrug.actvIngredient = '{$actvIngredient}'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND adrug.product_name = '{$product_name}'";