Exemple #1
0
function viewChecklist($pp_kod)
{
    $query = "SELECT pp_ref_no,pp_nama_brand,pp_nama_generic,pp_nama FROM p_product\n            WHERE pp_kod='{$pp_kod}'";
    $result = selQuery($query);
    $row = mysqli_fetch_assoc($result);
    ?>
<div class="admin-form" id="preview">
  <div class="row">
    <div class="alert alert-sm alert-border-left alert-primary"><b>Product Information</b></div>
    <div class="col-md-6">
    <b>Reference No : </b>
    <p><?php 
    echo isEmpty($row['pp_ref_no']);
    ?>
</p>
    </div>
    <div class="col-md-6">
    <b>Brand Name : </b>
    <p><?php 
    echo isEmpty($row["pp_nama_brand"]);
    ?>
</p>
    </div>
    <div class="col-md-6">
    <b>Generic Name : </b>
    <p><?php 
    echo isEmpty($row["pp_nama_generic"]);
    ?>
</p>
    </div>
    <div class="col-md-6">
    <b>Full product name : </b>
    <p><?php 
    echo isEmpty($row["pp_nama"]);
    ?>
</p>
    </div>
  </div>
  <div class="row">
    <div class="section-divider mb40"></div>
  </div>
  <div class="row">
    <table class="table table-striped table-hover" cellspacing="0" width="100%">
      <thead>
        <tr class="primary" align="center">
          <td width="60%">Description</td>
          <td width="20%">Screening</td>
          <td width="20%">Evaluation</td>
        </tr>
      </thead>
      <tbody>
        <tr align="center">
          <td align="left">Summary of Method Validation</td>
          <td><?php 
    echo showScreening($pp_kod, "sumofMethod");
    ?>
</td>
          <td><?php 
    echo showEvaluate($pp_kod, "sumofMethod");
    ?>
</td>
        </tr>
        <tr align="center">
          <td align="left">Other Documents</td>
          <td><?php 
    echo showScreening($pp_kod, "otherDoc");
    ?>
</td>
          <td><?php 
    echo showEvaluate($pp_kod, "sumofMethod");
    ?>
</td>
        </tr>
      </tbody>
    </table>
  </div>
  <?php 
    $query = "SELECT protocol_id,protocol_method,protocol_category,protocol_desc FROM p_protocol\n            WHERE pp_kod='{$pp_kod}' AND protocol_category NOT IN('otherDoc','sumofMethod')";
    $result = selQuery($query);
    while ($row = mysqli_fetch_assoc($result)) {
        ?>
  <div class="row">
    <table class="table" cellspacing="0" width="100%">
      <?php 
        $protocol_id = $row['protocol_id'];
        $category = $row['protocol_category'];
        $method = $row['protocol_method'];
        ?>
        <tr align="center" class="primary">
          <td width="60%" align="left"><?php 
        echo $category . " " . $row['protocol_desc'] . " (" . $method . ")";
        ?>
</td>
          <td width="20%">Screening</td>
          <td width="20%">Evaluation</td>
        </tr>
        <?php 
        $query = "SELECT pp_kod FROM p_protocol\n                  WHERE protocol_id='{$protocol_id}'";
        $result = selQuery($query);
        $row = mysqli_fetch_assoc($result);
        $pp_kod = $row['pp_kod'];
        if ($category == "Assay" || $category == "Related Substance" || $category == "Dissolution" || $category == "Others") {
            $query = "SELECT test_id,test_label,test_required,test_name FROM lab_test_category,lab_test\n                  WHERE test_cat=lab_test_category.cat_ref\n                  AND test_method='{$method}'\n                  AND test_category='{$category}'";
            $results = selQuery($query);
            while ($rows = mysqli_fetch_assoc($results)) {
                ?>
            <tr align="center">
              <td align="left"><?php 
                echo $rows['test_label'];
                ?>
</td>
              <td><?php 
                echo showScreening($pp_kod, $rows['test_id']);
                ?>
</td>
              <td><?php 
                echo showEvaluate($pp_kod, $rows['test_id']);
                ?>
</td>
            </tr>
            <?php 
            }
        } else {
            $query = "SELECT sub_id,lab_test_sub.test_label FROM lab_test_category,lab_test\n                  LEFT JOIN lab_test_sub ON lab_test_sub.test_id=lab_test.test_id\n                  WHERE lab_test.test_cat=lab_test_category.cat_ref\n                  AND test_method='{$method}' AND test_category='{$category}'";
            $results = selQuery($query);
            while ($rows = mysqli_fetch_assoc($results)) {
                ?>
            <tr align="center">
              <td align="left"><?php 
                echo $rows['test_label'];
                ?>
</td>
              <td><?php 
                echo showScreening($pp_kod, $rows['sub_id']);
                ?>
</td>
              <td><?php 
                echo showEvaluate($pp_kod, $rows['sub_id']);
                ?>
</td>
            </tr>
            <?php 
            }
        }
        ?>
    </table>
    <?php 
    }
    ?>
  </div>
</div>
<?php 
}
Exemple #2
0
function viewChecklist($pp_kod)
{
    $query = "SELECT pp_ref_no,pp_nama_brand,pp_nama_generic,pp_nama FROM p_product\n            WHERE pp_kod='{$pp_kod}'";
    $result = selQuery($query);
    $row = mysqli_fetch_assoc($result);
    ?>
<div class="admin-form" id="preview">
  <div class="row">
    <div class="alert alert-sm alert-border-left alert-primary"><b>Product Information</b></div>
    <div class="col-md-6">
    <b>Reference No : </b>
    <p><?php 
    echo isEmpty($row['pp_ref_no']);
    ?>
</p>
    </div>
    <div class="col-md-6">
    <b>Brand Name : </b>
    <p><?php 
    echo isEmpty($row["pp_nama_brand"]);
    ?>
</p>
    </div>
    <div class="col-md-6">
    <b>Generic Name : </b>
    <p><?php 
    echo isEmpty($row["pp_nama_generic"]);
    ?>
</p>
    </div>
    <div class="col-md-6">
    <b>Full product name : </b>
    <p><?php 
    echo isEmpty($row["pp_nama"]);
    ?>
</p>
    </div>
  </div>
  <div class="row">
    <div class="section-divider mb40"></div>
  </div>
  <div class="row">
    <table class="table table-striped table-hover" cellspacing="0" width="100%">
      <thead>
        <tr class="primary" align="center">
          <td width="60%">Description</td>
          <td width="20%">Screening</td>
          <td width="20%">Evaluation</td>
        </tr>
      </thead>
      <tbody>
        <tr align="center">
          <td align="left">Summary of Method Validation</td>
          <td><?php 
    echo showScreening($pp_kod, "sumofMethod");
    ?>
</td>
          <td><?php 
    echo showEvaluate($pp_kod, "sumofMethod");
    ?>
</td>
        </tr>
        <tr align="center">
          <td align="left">Other Documents</td>
          <td><?php 
    echo showScreening($pp_kod, "otherDoc");
    ?>
</td>
          <td><?php 
    echo showEvaluate($pp_kod, "sumofMethod");
    ?>
</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
<?php 
}