<?php
//============================================================+
// File name   : example_012.php
// Begin       : 2008-03-04
// Last Update : 2013-05-14
//
// Description : Example 012 for TCPDF class
//               Graphic Functions
//
// Author: Nicola Asuni
//
// (c) Copyright:
//               Nicola Asuni
//               Tecnick.com LTD
//               www.tecnick.com
//               info@tecnick.com
//============================================================+

/**
 * Creates an example PDF TEST document using TCPDF
 * @package com.tecnick.tcpdf
 * @abstract TCPDF - Example: Graphic Functions
 * @author Nicola Asuni
 * @since 2008-03-04
 */

header("Content-Type:text/html;charset=utf-8");
// Incluir librerias de datos
include_once('../php_conexion.php'); 
include_once('../Class/funciones.php');
$idinf=$_POST['idinf'];
$queryinfpac=mysqli_query($conexion,"SELECT * FROM paciente_informe WHERE id=$idinf");
$datainfpac=mysqli_fetch_array($queryinfpac);

// Include the main TCPDF library (search for installation path).
require_once('../tcpdf/tcpdf.php');

// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {

    //Page header
    public function Header() {
        // Logo
        $image_file = 'logosm.png';
        $this->Image($image_file, 12, 7, 25, '', 'PNG', '', 'T', false, 300, '', false, false, 0, false, false, false);
        // Position at 15 mm from bottom
        //$this->SetY(25);
        // Set font
        //$this->SetFont('times', 'BI', 20);
        // Title
        //$this->Cell(0, 10, 'Informe Citológico', 0, false, 'C', 0, '', 0, false, 'M', 'M');
    }

    // Page footer
    public function Footer() {
        // Position at 15 mm from bottom
        $this->SetY(-12);
        // Set font
        $this->SetFont('helvetica', 'I', 10);
        // set color for background
		$this->SetFillColor(193, 274, 255);
        // Page number
        //$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
        $this->Cell(0, 10, 'Av. de la Cultura Nº 1420 - Edificio Gonzáles Of. Nº 202 - Telf.:248494 - 984761002 - 273625', 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}

// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

//establecer margenes
$pdf->SetMargins(5,5,10);
$pdf->setHeaderMargin(10);

// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Jose HUiñapi');
$pdf->SetTitle('Informe Citologico');
$pdf->SetSubject('Citologico');
$pdf->SetKeywords('Informe, PDF, Citologico, Paciente');

if (!empty($_POST['membrete'])) {
// set default header data
    $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);

// disable header and footer
//$pdf->setPrintHeader(false);
//$pdf->setPrintFooter(false);

// CONJUNTO CABESERA Y PIE DE PAGINA

    $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
    $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
}else{
    $pdf->setPrintHeader(false);
    $pdf->setPrintFooter(false);
}


// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);

// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);

// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);

// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);

// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
	require_once(dirname(__FILE__).'/lang/eng.php');
	$pdf->setLanguageArray($l);
}

// ---------------------------------------------------------

// set font
$pdf->SetFont('times', 'BI', 20);
// add page
$pdf->AddPage();

//ESTILOS PARA GRAFICOS
$style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0));
$style2 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
$style3 = array('width' => 1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(255, 0, 0));
$style4 = array('L' => 0,
                'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)),
                'R' => array('width' => 0.50, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),
                'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10'));
$style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128));
$style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0));
$style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0));

//$txt = <<<EOD
//Informe Citológico
//EOD;

//$pdf->SetY(15);
//$pdf->Write(5, $txt, '', 0, 'C', true, 0, false, false, 0);

//set font
$pdf->SetFont('helvetica', 'BI', 10);

// set cell padding
$pdf->setCellPaddings(0, 0, 0, 0);

// set cell margins
$pdf->setCellMargins(0, 1, 0, 1);

//DATOS DEL PACIENTE
$pdf->SetFillColor(255,255,255);
$pdf->SetTextColor(0,0,0);
$pdf->SetXY(49, 37);
//$pdf->MultiCell(36, 3, 'Nombre', 0, 'J', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetFont('helvetica', 'I', 11);
$pdf->MultiCell(140, 3, ': '.$datainfpac['apepaterno'].' '.$datainfpac['apematerno'].' '.$datainfpac['nombres'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(49, 42);
//$pdf->SetFont('helvetica', 'BI', 10);
//$pdf->MultiCell(36, 3, 'Edad', 0, 'J', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetFont('helvetica', 'I', 11);
$pdf->MultiCell(140, 3, ': '.$datainfpac['edad'].' años', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(49, 47);
//$pdf->SetFont('helvetica', 'BI', 10);
//$pdf->MultiCell(36, 3, 'Muestra remitida', 0, 'J', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetFont('helvetica', 'I', 11);
$pdf->MultiCell(140, 3, ': '.$datainfpac['muestra'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(49, 52);
//$pdf->SetFont('helvetica', 'BI', 10);
//$pdf->MultiCell(36, 3, 'Fecha', 0, 'J', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetFont('helvetica', 'I', 11);
$pdf->MultiCell(140, 3, ': '.$datainfpac['fechareg'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(49, 57);
//$pdf->SetFont('helvetica', 'BI', 10);
//$pdf->MultiCell(36, 3, 'Solicitado por', 0, 'J', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetFont('helvetica', 'I', 11);
$pdf->MultiCell(140, 3, ': '.$datainfpac['solicita'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
//$pdf->Line(13, 65, 195, 65, $style2);

//foto
if (!empty($_POST['foto'])) {
    $pdf->SetXY(160, 39);
    $pdf->Image('../'.$datainfpac['foto'], '', '', 30, 22.5, '', '', '', false, 300, '', false, false, 0, false, false, false);
}

//Numero de registro
$pdf->SetFont('helvetica', 'I', 12);
$pdf->SetXY(140, 30);
$pdf->MultiCell(22, 3, 'Codigo Nº:', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetFont('helvetica', 'BI', 14);
$pdf->MultiCell(20, 3, prefempresa($conexion,$datainfpac['idempresa']).' '.str_pad($datainfpac['codpaciente'], 6, "0", STR_PAD_LEFT), 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
//$pdf->SetFont('helvetica', 'BI', 12);
//$pdf->SetXY(157, 30);
//$pdf->Cell(35, 0, 'Codigo Nº: '.prefempresa($conexion,$datainfpac['idempresa']).' '.str_pad($datainfpac['codpaciente'], 6, "0", STR_PAD_LEFT), 0, 1, 'L', 0, '', 1);

//DATOS DE EVALUACION

//set font
$pdf->SetFont('helvetica', 'BI', 10);

// set cell margins
$pdf->setCellMargins(1, 1, 1, 1);

$pdf->SetXY(13, 67);
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'INTERPRESTACIÓN CITOLÓGICA', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetFont('helvetica', '', 10);
$pdf->SetXY(13, 74);
if ($datainfpac['radio1']=="a"){
    $pdf->MultiCell(140, 3, 'Citología Convencional', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
}else{
    $pdf->MultiCell(140, 3, 'Citoloía base líquida', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
}
$pdf->SetFont('helvetica', 'BI', 10);
$pdf->SetXY(13, 81);
$pdf->MultiCell(140, 3, 'CALIDAD DE LA MUESTRA', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetFont('helvetica', '', 10);
$pdf->SetXY(13, 88);
if ($datainfpac['radio2']=="a") {
    $pdf->MultiCell(140, 3, 'Muestra satisfactoria', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
}else{
    $pdf->MultiCell(140, 3, 'Muestra inadecuada', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
}
$pdf->SetFont('helvetica', 'BI', 10);
$pdf->SetXY(13, 95);
$pdf->MultiCell(140, 3, 'ELEMENTOS DE LA ZONA DE TRANSFORMACION/ENDOCERVIX', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetFont('helvetica', '', 10);
$pdf->SetXY(13, 102);
if($datainfpac['radio3']=="a"){
    $pdf->MultiCell(140, 3, 'Presentes', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');    
}else{
    $pdf->MultiCell(140, 3, 'Ausentes', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');    
}
$pdf->SetXY(13, 110);
$pdf->SetFont('helvetica', 'BI', 10);
$pdf->MultiCell(140, 3, 'CATEGORIA GENERAL', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');


$pdf->SetFont('helvetica', '', 10);
$pdf->SetXY(13, 118);
if ($datainfpac['radio4']=="a") {
    $pdf->MultiCell(140, 3, 'Negativo para lesión intraepitelial o malignidad', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 126);
    $pdf->SetFont('helvetica', 'BI', 10);
    $pdf->MultiCell(140, 3, 'MICROORGANISMOS', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 134);
    $pdf->SetFont('helvetica', '', 10);
    if ($datainfpac['radio7']=="a") {
        $pdf->MultiCell(140, 3, 'Trichomonas vaginalis', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="a") {
        $pdf->MultiCell(140, 3, 'Cambios de flora vaginal sugerentes de vaginosis bacteriana', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="b") {
        $pdf->MultiCell(140, 3, 'Elemnetos micóticos morfológicamente compatibles con Candida', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="c") {
        $pdf->MultiCell(140, 3, 'Bacterias de características morfológicamente compatibles con Actinomyces', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="d") {
        $pdf->MultiCell(140, 3, 'Cambios compatibles con Herpes simple', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="e") {
        $pdf->MultiCell(140, 3, 'Actinomyces', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }
    $pdf->SetXY(13, 142);
    $pdf->SetFont('helvetica', 'BI', 10);
    $pdf->MultiCell(140, 3, 'OTROS HALLAZGOS NO NEOPLÁSICOS', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $otros = array(23 => "Cambios celulares reactivos asociados a inflamación", 24=> "Cambios celulares asociados a radiación", 25=>"Cambios celulares asociados a DIU", 26=>"Células endometriales en mujer mayos de 40 años", 27=>"Células glandulares poshisterectomía", 28=>"Atrofia");
    $result="";
    for ($i=23; $i<29 ; $i++) {
        if($datainfpac[$i]!=""){
            $result.=$otros[$i].", ";
        }
    }
    $pdf->SetXY(13, 150);
    $pdf->SetFont('helvetica', '', 10);
    $pdf->MultiCell(180, 3, $result, 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 170);
    $pdf->SetFont('helvetica', 'BI', 10);
    $pdf->MultiCell(140, 3, 'NOTAS ACLARATORIAS', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 178);
    $pdf->SetFont('helvetica', '', 10);
    $pdf->MultiCell(140, 3, $datainfpac['notas'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

}else{
    $pdf->MultiCell(55, 3, 'Anomalías de Células epiteliales:', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    if ($datainfpac['radio5']=="a") {
        $pdf->MultiCell(50, 3, 'Escamosas', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }else{
        $pdf->MultiCell(50, 3, 'Glandulares', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }
    $pdf->SetXY(13, 126);
    $pdf->SetFont('helvetica', 'BI', 10);
    $pdf->MultiCell(140, 3, 'INTERPRETACION/RESULTADO', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 134);
    $pdf->SetFont('helvetica', '', 10);
    if ($datainfpac['radio6']=="a") {
        $pdf->MultiCell(140, 3, 'Lesión escamosa intraepitelial de bajo grado (LEIBG)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="b") {
        $pdf->MultiCell(140, 3, 'Células escamosas atípicas de significado indeterminado (ASC-US)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="c") {
        $pdf->MultiCell(140, 3, 'Lesión escamosa intraepitelial de alto grado (LEIBG)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="d") {
        $pdf->MultiCell(140, 3, 'Células escamosas atípicas descartar lesión de alto grado (ASC-H)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="e") {
        $pdf->MultiCell(140, 3, 'Carsinoma escamoso', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="f") {
        $pdf->MultiCell(140, 3, 'Células glandulares atípicas (AGC)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="g") {
        $pdf->MultiCell(50, 3, 'Adenocarcinoma (Espesificar):', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
        $pdf->MultiCell(80, 3, $datainfpac['adeno'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio6']=="h") {
        $pdf->MultiCell(60, 3, 'Otros:', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
        $pdf->MultiCell(80, 3, $datainfpac['otros'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }
    $pdf->SetXY(13, 142);
    $pdf->SetFont('helvetica', 'BI', 10);
    $pdf->MultiCell(140, 3, 'MICROORGANISMOS', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 150);
    $pdf->SetFont('helvetica', '', 10);
    if ($datainfpac['radio7']=="a") {
        $pdf->MultiCell(140, 3, 'Trichomonas vaginalis', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="a") {
        $pdf->MultiCell(140, 3, 'Cambios de flora vaginal sugerentes de vaginosis bacteriana', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="b") {
        $pdf->MultiCell(140, 3, 'Elemnetos micóticos morfológicamente compatibles con Candida', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="c") {
        $pdf->MultiCell(140, 3, 'Bacterias de características morfológicamente compatibles con Actinomyces', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="d") {
        $pdf->MultiCell(140, 3, 'Cambios compatibles con Herpes simple', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }elseif ($datainfpac['radio7']=="e") {
        $pdf->MultiCell(140, 3, 'Actinomyces', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    }
    $pdf->SetXY(13, 158);
    $pdf->SetFont('helvetica', 'BI', 10);
    $pdf->MultiCell(140, 3, 'NOTAS ACLARATORIAS', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
    $pdf->SetXY(13, 166);
    $pdf->SetFont('helvetica', '', 10);
    $pdf->MultiCell(140, 3, $datainfpac['notas'], 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
}

/*$pdf->SetXY(13, 125);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check8'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'ASCUS En un fondo atrófico', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(13, 132);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check9'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'ASCUS Sugestivo de SIL', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->SetXY(13, 140);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('helvetica', 'BI', 11);
$pdf->MultiCell(140, 3, 'LESION ESCAMOSA INTRAEPITELIAL DE BAJO GRADO (LIE)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->SetFont('helvetica', '', 11);
$pdf->SetXY(13, 147);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check10'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'DISPLASIA LEVE (NIC I)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(13, 154);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check11'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'Cambios por Papiloma Virus Humano (Atipia Coilocitica)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->SetXY(13, 162);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('helvetica', 'BI', 11);
$pdf->MultiCell(140, 3, 'LESION ESCAMOSA INTRAEPITELIAL DE ALTO GRADO (LIE)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->SetFont('helvetica', '', 11);
$pdf->SetXY(13, 169);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check12'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'DISPLASIA MODERADA O SEVERA (NIC II Y III)', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(13, 176);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check13'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'CARCINOMA DE CALULAS ESCAMOSAS', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(13, 183);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check14'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'Células glandulares benignas', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(13, 190);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check15'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'Células glandulares atípicas de significado no determinado', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetXY(13, 197);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check16'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(140, 3, 'ADENOCARCINOMA', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->SetXY(13, 204);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check17'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(35, 3, 'M. Adecuada', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check18'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(35, 3, 'M. No Adecuada', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check19'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(50, 3, 'M. Adecuada pero limitada', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->SetXY(13, 212);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('helvetica', 'BI', 11);
$pdf->MultiCell(140, 3, 'DIAGNOSTICO', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');

$pdf->setCellPaddings(1, 1, 1, 1);
$pdf->SetXY(13, 218);
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(184, 30, $datainfpac['diagnostico'], 1, 'J', 1, 0, '', '', true, 0, true, true, 40, 'T');

$pdf->SetXY(13, 250);
$pdf->SetFont('helvetica', '', 11);
$pdf->setCellPaddings(0, 0, 0, 0);
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check20'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(50, 3, 'Dentro de limites Normales', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check21'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(25, 3, 'Inflamación', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(6, 3, $datainfpac['check22'], 1, 'C', 1, 0, '', '', true, 0, true, true, 40, 'T');
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(50, 3, 'Atrofia', 0, 'L', 1, 0, '', '', true, 0, false, true, 40, 'T');*/

mysqli_close($conexion);
// ---------------------------------------------------------
// move pointer to last page
$pdf->lastPage();

//Close and output PDF document
$pdf->Output($datainfpac['numdoc'].'-'.$datainfpac['apepaterno'].' '.$datainfpac['apematerno'].' '.$datainfpac['nombres'].'.pdf', 'I');

//============================================================+
// END OF FILE
//============================================================+
