示例#1
0
 $nombreReporte = "Examen Laboratorio Nro: " . $codPacienteLab;
 $labelCabecera = $o_ActionReporte->labelReportePdf("", $idReporte, 1);
 $datosPaciente = $o_ActionReporte->datosPacientexExamen($codPacienteLab);
 $datosCabecera = array();
 $datosCabecera[4] = $codPacienteLab;
 $datosCabecera[5] = $datosPaciente[0][0];
 $datosCabecera[6] = $datosPaciente[0][1];
 $datosCabecera[7] = $datosPaciente[0][2];
 $datosCabecera[8] = $datosPaciente[0][3];
 $datosCabecera[9] = $datosPaciente[0][4];
 $datosCabecera[10] = $datosPaciente[0][5];
 $datosCabecera[11] = $datosPaciente[0][6];
 $datosCabecera[12] = $datosPaciente[0][7];
 $labelDetalle = $o_ActionReporte->labelReportePdf("", $idReporte, 2);
 $datosExamen = $o_ActionReporte->aDatosPuntoControlPaciente($codPacienteLab);
 $datosGrupo = $o_ActionReporte->agrupodeDatos($codPacienteLab);
 $datosExamenUni = $o_ActionReporte->adatosExamenUni($codPacienteLab);
 $labelPie = $o_ActionReporte->labelReportePdf("", $idReporte, 3);
 $datosPie[0] = $datosPaciente[0][8];
 $atributosReceta = $o_ActionReporte->atributosRecetaMedica($idReporte);
 $parametros["PDF_PAGE_FORMAT"] = "A4";
 $parametros["PDF_MARGIN_HEADER"] = 0;
 $parametros["PDF_MARGIN_FOOTER"] = 0;
 $parametros["AUTO_PAGE_BREAK"] = true;
 $parametros["PDF_MARGIN_BOTTOM"] = 10;
 $parametros["PDF_MARGIN_LEFT"] = 6;
 $parametros["PDF_MARGIN_RIGHT"] = 6;
 $parametros["PDF_MARGIN_TOP"] = 10;
 $parametros["PRINT_HEADER"] = false;
 $parametros["PRINT_FOOTER"] = false;
 $parametros["CODIGO_DE_BARRAS"] = $datosPaciente[0][8];
示例#2
0
 function detalleLaboratorioExamenes($IdResult)
 {
     $o_ActionReporte = new ActionReporte();
     $datosExamen = $o_ActionReporte->aDatosPuntoControlPaciente($IdResult);
     $datosGrupo = $o_ActionReporte->agrupodeDatos($IdResult);
     $datosExamenUni = $o_ActionReporte->adatosExamenUni($IdResult);
     $cadenaPeche = '';
     foreach ($datosGrupo as $key => $value1) {
         $cadenaPeche .= '<br><b>GRUPO Nro. ' . ($key + 1) . ' ' . $value1[0] . '</b><br><br>';
         $cadenaPeche .= '<table border="1" CellPadding="0" cellspacing="0" width="650" align="center">
                     <tr  bgcolor="#aaffff" color="white">
                         <td width="100" align="center"><B><font size="1">ITEM</font></B></td>
                         <td width="50" align="center"><B><font size="1">RESULT.</font></B></td>
                         <td width="60" align="center"><B><font size="1">UNIDAD</font></B></td>
                         <td width="300" align="center"><B><font size="1">RANGO</font></B></td>
                     </tr>
                     </table>';
         $cadenaPeche .= '
                         <table border="0" CellPadding="0" cellspacing="0" width="650" align="center">
                             <tr>
                             <td width="100" align="center" bgcolor="white"></td>
                             <td width="50" align="center"  bgcolor="white"></td>
                             <td width="80" align="center" bgcolor="white"></td>
                             <td width="80" align="center" bgcolor="#ccffff"><font size="1">Edad</font></td>
                             <td width="80" align="center" bgcolor="#ccffff"><font size="1">Sexo</font></td>
                             <td width="80" align="center" bgcolor="#ccffff"><font size="1">Rango</font></td>
                             <td width="80" align="center" bgcolor="#ccffff"><font size="1">Significado</font></td>
                             </tr>
                         </table>';
         foreach ($datosExamenUni as $key => $value2) {
             if ($value1[1] == $value2[2]) {
                 $rangos = ' &#60; R &#60; ';
                 $edad = ' &#60; Edad &#60; ';
                 $cadenaPeche .= '
                             <table border="1" CellPadding="0" cellspacing="0" width="650" align="center">
                             <tr>
                             <td width="120" align="center"><font size="1">' . $value2[0] . '</font></td>
                             <td width="60" align="center"><font size="1">';
                 switch ($value2[4]) {
                     case '1':
                         $imprimirResultado = $value2[6];
                         break;
                     case '2':
                         $imprimirResultado = $value2[8];
                         break;
                     case '4':
                         $imprimirResultado = $value2[7];
                         break;
                     case '5':
                         $imprimirResultado = $value2[9];
                         break;
                     case '6':
                         $imprimirResultado = $value2[11];
                         break;
                 }
                 $cadenaPeche .= $imprimirResultado . '</font></td>
                             <td width="70" align="center"><font size="1">' . $value2[3] . '</font></td>
                             <td width="370" align="center"><font size="1"></font>';
                 foreach ($datosExamen as $key => $value) {
                     if ($value2[0] == $value[3]) {
                         $cadenaPeche .= '<table><tr> <td width="100" align="center"><font size="1">';
                         if ($value[16] == 1) {
                             $edades = $value[18] . $edad . $value[19];
                         }
                         $cadenaPeche .= $edades . '</font></td>
                             <td width="100" align="center"><font size="1">';
                         if ($value[15] == 1) {
                             $sexoes = $value[17];
                         }
                         $cadenaPeche .= $sexoes . '</font></td>
                             <td width="100" align="center"><font size="1">';
                         if ($value[20] == null && $value[21] == null) {
                         } else {
                             $rangosre = $value[20] . $rangos . $value[21];
                         }
                         $cadenaPeche .= $rangosre . '</font></td>
                             <td width="100" align="center"><font size="1">' . $value[22] . '</font></td>
                            </tr></table>';
                     }
                 }
                 $cadenaPeche .= '</td>
                             </tr>
                             </table>';
             }
         }
     }
     return $cadenaPeche;
 }