コード例 #1
0
 public function hstrMotivoConsulta($idPaciente)
 {
     $oLActoMedico = new LActoMedico();
     $historiaMC = $oLActoMedico->hstrMotivoConsulta($idPaciente);
     $cadena = "";
     if ($historiaMC) {
         $fechaAnterior = "";
         foreach ($historiaMC as $i => $value) {
             $medico_instalacion = " Médico : " . htmlentities($historiaMC[$i][8]) . " " . htmlentities($historiaMC[$i][9]) . " " . htmlentities($historiaMC[$i][10]) . "        ";
             $medico_instalacion .= "    Consultorio : " . htmlentities($historiaMC[$i][14]) . " - " . htmlentities($historiaMC[$i][13]) . " - " . htmlentities($historiaMC[$i][12]);
             if ($fechaAnterior == "") {
                 /* --------------- Abrir ------------------ */
                 $cadena .= '<div><br><p class="p1">' . $historiaMC[$i][5] . '</p></div><br>';
                 $cadena .= '<div><h2>' . $medico_instalacion . '</h2></div><br>';
                 $fechaAnterior = $historiaMC[$i][5];
             } else {
                 if ($fechaAnterior != $historiaMC[$i][5]) {
                     /* --------------- Abrir ------------------ */
                     $cadena .= '<div><br><p class="p1">' . $historiaMC[$i][5] . '</p></div><br>';
                     $cadena .= '<div><h2>' . $medico_instalacion . '</h2></div><br>';
                     $fechaAnterior = $historiaMC[$i][5];
                 }
             }
             $cadena .= '<fieldset style=" padding-left: 20px;background-color: #FFFFFF;">
                            <table width="500" border="0" cellpadding="0" cellspacing="2" align="center">
                              <tr><td width="20%" class="letra16">S&iacute;ntoma :</td><td width="80%" class="letra16">' . htmlentities($historiaMC[$i][2]) . ' - ' . htmlentities($historiaMC[$i][3]) . '</td> </tr>
                             <tr><td class="letra16">Descripci&oacute;n :</td><td class="letra16">' . htmlentities($historiaMC[$i][4]) . '</td> </tr>
                            </table>
                       </fieldset><br>';
         }
     }
     return $cadena;
 }