예제 #1
0
 function __construct($idu, $nsej, $type = 'radio')
 {
     global $tab;
     // Préparation du document PDF.
     $liste = new clListes("Documents", "1");
     $tub = $liste->getListes();
     //newfct ( gen_affiche_tableau, $tab ) ;
     while (list($key, $val) = each($tub)) {
         $tab[$val] = $liste->getListes($val);
         //newfct ( gen_affiche_tableau, $tab[$val] ) ;
     }
     //if ( headers_sent() ) print "<br/><b>Avant Formx : Headers déjà envoyés</b><br/>" ;
     //else print "<br/><b>Avant Formx : Headers non envoyés</b><br/>" ;
     $formx = new clFoRmX($idu, 'NO_POST_THREAT');
     //header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     // setcookie("pouet","pouet");
     //if ( headers_sent() ) print "<br/><b>Après Formx : Headers envoyés</b><br/><br/>" ;
     //else print "<br/><b>Après Formx : Headers non envoyés</b><br/><br/>" ;
     if ($_REQUEST['Formulaire2print'] == 'bio2009') {
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         //print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "M" or $r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 }
                 if ($r['Val_IDENT_SexePat'][0] == "F" or $r['Val_IDENT_SexePat'][0] == "Feminin" or $r['Val_IDENT_SexePat'][0] == "Féminin" or $r['Val_IDENT_SexePat'][0] == utf8_encode("Féminin")) {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_BIO_Motif'][$i] . '<br><br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 $pdf->SetFont('times', 'BU', 11);
                 $pdf->setx(65);
                 $pdf->Cell(80, 10, "EXAMENS", 0, 1, L);
                 if ($r['biochimie'][$i] and $r['biochimie'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Biochimie", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     if ($r['biochimie_temp'][$i] and $r['biochimie_temp'][$i] != 'Aucun.') {
                         $pdf->Cell(80, 3, $r['biochimie_temp'][$i], 0, 1, L);
                         $pdf->Cell(80, 3, " ", 0, 1, L);
                     }
                     $exp = explode('|', $r['biochimie'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['hematologie'][$i] and $r['hematologie'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Hématologie", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['hematologie'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['grossesse'][$i] and $r['grossesse'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Grossesse", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     if ($r['grossesse_date_regles'][$i] and $r['grossesse_date_regles'][$i] != 'Aucun.') {
                         $pdf->Cell(80, 3, "Dernières règles : " . $r['grossesse_date_regles'][$i], 0, 1, L);
                     }
                     $exp = explode('|', $r['grossesse'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['toxicologie'][$i] and $r['toxicologie'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Toxicologie", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['toxicologie'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['hemostase_renseignements'][$i] and $r['hemostase_renseignements'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Hemostase Renseignements", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['hemostase_renseignements'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['anti_vit_medic'][$i] and $r['anti_vit_medic'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Détail Médicamentation Anti Vit", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, "Médicament : " . $r['anti_vit_medic'][$i], 0, 1, L);
                     $pdf->Cell(80, 3, "Dose : " . $r['anti_vit_dose'][$i], 0, 1, L);
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['hph_medic'][$i] and $r['hph_medic'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Détail Médicamentation Héparine", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, "Médicament : " . $r['hph_medic'][$i], 0, 1, L);
                     $pdf->Cell(80, 3, "Dose : " . $r['hph_dose'][$i], 0, 1, L);
                     $pdf->Cell(80, 3, "Heure injection : " . $r['hph_heure_injec'][$i], 0, 1, L);
                     $pdf->Cell(80, 3, "Heure prélèvement : " . $r['hph_heure_prelev'][$i], 0, 1, L);
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['hemostase_examens_demandes'][$i] and $r['hemostase_examens_demandes'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'B', 11);
                     $pdf->Cell(80, 5, "Hemostase Examens Demandés", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['hemostase_examens_demandes'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                     $pdf->Cell(80, 3, " ", 0, 1, L);
                 }
                 if ($r['Val_F_BIO_F2'][$i] and $r['Val_F_BIO_F2'][$i] != 'Aucun.') {
                     //$pdf -> SetFont ( 'times', 'BU', 12 ) ;
                     //$pdf -> setx ( 65 ) ;
                     //$pdf -> Cell ( 80, 10, "", 0, 1, L ) ;
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['Val_F_BIO_F2'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_BIO_Autres_E'][$i] and $r['Val_F_BIO_Autres_E'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 11);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "AUTRES", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, $r['Val_F_BIO_Autres_E'][$i], 0, 1, L);
                 }
                 if ($r['Val_F_BIO_Comm'][$i] and $r['Val_F_BIO_Comm'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 11);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "COMMENTAIRES", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, $r['Val_F_BIO_Comm'][$i], 0, 1, L);
                 }
                 // Préleveur.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 25, "Préleveur : " . $r['Val_F_BIO_Nom_Prel'][$i], 0, 1, L);
                 $pdf->SetY(229);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 25, "Heure prélevement : " . $r['Val_F_BIO_Heure_Prel'][$i], 0, 1, L);
                 // IPP
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(82);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_ILPPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(76);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(80, 0, "N° IPP : ", 0, 1, R);
                 // Nsej
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(100);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_NsejPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(96);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(80, 0, "N° Séjour : ", 0, 1, R);
                 // Signature du médecin.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(120, 25, "Docteur : " . $r['Val_F_BIO_Nom_P'][$i], 0, 1, R);
                 //$pdf -> Footer ( ) ;
             }
         }
     } elseif ($_REQUEST['Formulaire2print'] == 'radio') {
         //if ( headers_sent() ) print "<br/><b>Headers déjà envoyés</b><br/>" ;
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         //$r = $formx -> getAllItems ( ) ;
         //print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "M" or $r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 }
                 if ($r['Val_IDENT_SexePat'][0] == "F" or $r['Val_IDENT_SexePat'][0] == "Feminin" or $r['Val_IDENT_SexePat'][0] == "Féminin" or $r['Val_IDENT_SexePat'][0] == utf8_encode("Féminin")) {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_RADIO_Motif'][$i] . '<br><br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 if ($r['Val_F_RADIO_CoteDroit'][$i] == 'Aucune Radio à effectuer' and $r['Val_F_RADIO_Centre'][$i] == 'Aucune Radio à effectuer' and $r['Val_F_RADIO_CoteGauche'][$i] == 'Aucune Radio à effectuer' or !$r['Val_F_RADIO_CoteDroit'][$i] and !$r['Val_F_RADIO_Centre'][$i] and !$r['Val_F_RADIO_CoteGauche'][$i]) {
                 } else {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "RADIOGRAPHIES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     if ($r['Val_F_RADIO_CoteDroit'][$i] != 'Aucune Radio à effectuer') {
                         $exp = explode('|', $r['Val_F_RADIO_CoteDroit'][$i]);
                         while (list($key, $val) = each($exp)) {
                             if ($val) {
                                 $pdf->Cell(80, 3, "1x " . $val . " côté droit", 0, 1, L);
                             }
                         }
                         $exp = explode('|', $r['Val_F_RADIO_Centre'][$i]);
                         while (list($key, $val) = each($exp)) {
                             if ($val) {
                                 $pdf->Cell(80, 3, "1x " . $val . " centre", 0, 1, L);
                             }
                         }
                         if ($r['Val_F_RADIO_Indication'][0] or $r['Val_F_RADIO_Recherche'][0]) {
                             $pdf->Cell(80, 3, '', 0, 1, L);
                             $pdf->Cell(80, 3, "Indication : " . $r['Val_F_RADIO_Indication'][0], 0, 1, L);
                             $pdf->Cell(80, 3, '', 0, 1, L);
                             $pdf->Cell(80, 3, "Je recherche : " . $r['Val_F_RADIO_Recherche'][0], 0, 1, L);
                             $req = new clResultQuery();
                             $param['base'] = BDD;
                             $param['cw'] = ", radios_enquetes e where e.idradio=r.idradio and r.idpatient=p.idpatient and p.idu='{$idu}'";
                             $res = $req->Execute("Fichier", "getRadios", $param, "ResultQuery");
                             $pdf->Cell(80, 3, '', 0, 1, L);
                             $pdf->Cell(80, 3, "Destination confirmée : " . $res['dest_attendue'][0], 0, 1, L);
                             $pdf->Cell(80, 3, '', 0, 1, L);
                         }
                         $exp = explode('|', $r['Val_F_RADIO_CoteGauche'][$i]);
                         while (list($key, $val) = each($exp)) {
                             if ($val) {
                                 $pdf->Cell(80, 3, "1x " . $val . " côté gauche", 0, 1, L);
                             }
                         }
                     }
                 }
                 if ($r['Val_F_RADIO_TDM'][$i] == 'Aucun Scanner à effectuer' or !$r['Val_F_RADIO_TDM'][$i]) {
                 } else {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "SCANNER", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_TDM'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_RADIO_Echo'][$i] == 'Aucune Echographie à effectuer' or !$r['Val_F_RADIO_Echo'][$i]) {
                 } else {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "ECHOGRAPHIES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_Echo'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_RADIO_Autres_E'][$i] and $r['Val_F_RADIO_Autres_E'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "AUTRES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_Autres_E'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_RADIO_Comm'][$i] and $r['Val_F_RADIO_Comm'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "COMMENTAIRES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_Comm'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 $pdf->Rect(15, 235, 115, 20);
                 $pdf->SetY(232);
                 $pdf->SetFont('times', '', 9);
                 $pdf->Cell(0, 0, "Cotation", 0, 1, L);
                 // IPP
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(82);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_ILPPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(76);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(80, 0, "N° IPP : ", 0, 1, R);
                 // Nsej
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(100);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_NsejPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(96);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(80, 0, "N° Séjour : ", 0, 1, R);
                 // Signature du médecin.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(120, 25, "Docteur : " . $r['Val_F_RADIO_Nom_P'][$i], 0, 1, R);
                 //$pdf -> Footer ( ) ;
             }
         }
     } elseif ($_REQUEST['Formulaire2print'] == 'labo') {
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         //print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "M" or $r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 }
                 if ($r['Val_IDENT_SexePat'][0] == "F" or $r['Val_IDENT_SexePat'][0] == "Feminin" or $r['Val_IDENT_SexePat'][0] == "Féminin" or $r['Val_IDENT_SexePat'][0] == utf8_encode("Féminin")) {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_BIO_Motif'][$i] . '<br><br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 $pdf->SetFont('times', 'BU', 11);
                 $pdf->setx(65);
                 $pdf->Cell(80, 10, "EXAMENS", 0, 1, L);
                 if ($r['Val_F_BIO_F1'][$i] and $r['Val_F_BIO_F1'][$i] != 'Aucun.') {
                     //$pdf -> SetFont ( 'times', 'BU', 12 ) ;
                     //$pdf -> setx ( 65 ) ;
                     //$pdf -> Cell ( 80, 10, "", 0, 1, L ) ;
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['Val_F_BIO_F1'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_BIO_F2'][$i] and $r['Val_F_BIO_F2'][$i] != 'Aucun.') {
                     //$pdf -> SetFont ( 'times', 'BU', 12 ) ;
                     //$pdf -> setx ( 65 ) ;
                     //$pdf -> Cell ( 80, 10, "", 0, 1, L ) ;
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['Val_F_BIO_F2'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_BIO_Autres_E'][$i] and $r['Val_F_BIO_Autres_E'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 11);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "AUTRES", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, $r['Val_F_BIO_Autres_E'][$i], 0, 1, L);
                 }
                 if ($r['Val_F_BIO_Comm'][$i] and $r['Val_F_BIO_Comm'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 11);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "COMMENTAIRES", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, $r['Val_F_BIO_Comm'][$i], 0, 1, L);
                 }
                 // Préleveur.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 25, "Préleveur : " . $r['Val_F_BIO_Nom_Prel'][$i], 0, 1, L);
                 $pdf->SetY(229);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 25, "Heure prélevement : " . $r['Val_F_BIO_Heure_Prel'][$i], 0, 1, L);
                 // IPP
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(82);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_ILPPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(76);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(80, 0, "N° IPP : ", 0, 1, R);
                 // Nsej
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(100);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_NsejPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(96);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(80, 0, "N° Séjour : ", 0, 1, R);
                 // Signature du médecin.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(120, 25, "Docteur : " . $r['Val_F_BIO_Nom_P'][$i], 0, 1, R);
                 //$pdf -> Footer ( ) ;
             }
         }
     } else {
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         //print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "M" or $r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 }
                 if ($r['Val_IDENT_SexePat'][0] == "F" or $r['Val_IDENT_SexePat'][0] == "Feminin" or $r['Val_IDENT_SexePat'][0] == "Féminin" or $r['Val_IDENT_SexePat'][0] == utf8_encode("Féminin")) {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br>';
                 $html .= "<b>IPP : </b>" . $r['Val_IDENT_ILPPatient'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_CS_Motif'][$i] . '<br>';
                 $html .= "<b>Prescripteur : </b>" . $r['Val_F_CS_Nom_P'][$i] . '<br>';
                 $html .= "<b>Consultation : </b>" . $r['Val_F_CS_Con'][$i] . '<br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 $pdf->SetFont('times', 'BU', 11);
                 // Compte rendu spécialiste
                 $pdf->SetY(129);
                 $pdf->SetFont('times', 'b', 13);
                 $pdf->Cell(0, 10, "COMPTE RENDU SPECIALISTE", 0, 1, C);
                 // IPP
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(85);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_ILPPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(81);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(88, 0, "N° IPP : ", 0, 1, R);
                 // Nsej
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(100);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_NsejPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(96);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(88, 0, "N° Séjour : ", 0, 1, R);
                 // Signature
                 $pdf->SetY(216);
                 $pdf->SetFont('times', 'b', 11);
                 $pdf->Cell(0, 10, "Signature : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetY(229);
                 $pdf->SetX(5);
                 $pdf->Cell(0, 0, "Partie à remettre au service demandeur");
                 /*
                  * PARTIE BASSE DU BON
                  */
                 $pdf->SetY(237);
                 $pdf->SetX(5);
                 $pdf->Cell(0, 0, "Partie à remettre au service financier");
                 $pdf->Image(URLIMG . "pointillers_decoupe.png", 0, 233);
                 // Spécialiste
                 $pdf->setx(65);
                 $pdf->SetY(250);
                 $pdf->SetFont('times', 'b', 11);
                 $pdf->Cell(0, 0, "Spécialiste : ", 0, 1, L);
                 $pdf->SetX(86);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 0, $r['Val_F_CS_Spe'][$i], 0, 1, L);
                 // Cotation CCAM
                 $pdf->SetY(250);
                 $pdf->SetFont('times', 'b', 11);
                 $pdf->Cell(55, 10, "Cotation CCAM : ", 0, 1, L);
                 // affichage nom du service sur la partie basse du bon
                 global $options;
                 global $tab;
                 reset($tab);
                 list($key, $service) = each($tab);
                 $pdf->setxy(66, 239);
                 $pdf->SetFont('times', 'B', 12);
                 list($key, $val) = each($service);
                 $pdf->Cell(132, 5, $val, 1, 2, C);
                 reset($service);
                 // affichage des infos patients
                 $x_titre = 10;
                 $y = 243;
                 // nom
                 $pdf->SetY($y);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "Nom : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(21);
                 $pdf->Cell(80, 0, $r['Val_IDENT_NomPatient'][$i], 0, 1, L);
                 // prenom
                 $pdf->SetY($y + 4);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "Prenom : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(25);
                 $pdf->Cell(80, 0, $r['Val_IDENT_PrenomPatient'][$i], 0, 1, L);
                 // date naissance
                 $pdf->SetY($y + 4 * 2);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "Né{$e} le : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(21);
                 $pdf->Cell(80, 0, $r['Val_IDENT_DateNPat2'][$i], 0, 1, L);
                 // ipp
                 $pdf->SetY($y + 4 * 3);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "IPP : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(19);
                 $pdf->Cell(80, 0, $r['Val_IDENT_ILPPatient'][$i], 0, 1, L);
                 // motif
                 $pdf->SetY($y + 4 * 5);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "Motif : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(22);
                 $pdf->Cell(80, 0, $r['Val_F_CS_Motif'][$i], 0, 1, L);
                 // prescripteur
                 $pdf->SetY($y + 4 * 6);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "Prescripteur : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(32);
                 $pdf->Cell(80, 0, $r['Val_F_CS_Nom_P'][$i], 0, 1, L);
                 // consultation
                 $pdf->SetY($y + 4 * 7);
                 $pdf->SetX($x_titre);
                 $pdf->SetFont('times', 'b', 10);
                 $pdf->Cell(88, 0, "Consultation : ", 0, 1, L);
                 $pdf->SetFont('times', '', 10);
                 $pdf->SetX(32);
                 $pdf->Cell(80, 0, $r['Val_F_CS_Con'][$i], 0, 1, L);
                 // divers rectangles dans la page
                 $pdf->Rect(97, 257 - 5, 101, 6);
                 $pdf->Rect(65, 130, 133, 7);
                 $pdf->Rect(65, 138, 133, 80);
                 $pdf->Rect(86, 219, 112, 7);
             }
         }
     }
     $pdf->Output();
 }
예제 #2
0
 function __construct($idu, $nsej, $type = 'radio')
 {
     global $tab;
     // Préparation du document PDF.
     $liste = new clListes("Documents", "1");
     $tub = $liste->getListes();
     //newfct ( gen_affiche_tableau, $tab ) ;
     while (list($key, $val) = each($tub)) {
         $tab[$val] = $liste->getListes($val);
         //newfct ( gen_affiche_tableau, $tab[$val] ) ;
     }
     $formx = new clFoRmX($idu, 'NO_POST_THREAT');
     //print $_REQUEST['FormX_ext_goto_'] ;
     //$formx -> loadInstance (  ) ;
     if ($_REQUEST['Formulaire2print'] == 'radio') {
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         //$r = $formx -> getAllItems ( ) ;
         //print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 } else {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_RADIO_Motif'][$i] . '<br><br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 if ($r['Val_F_RADIO_CoteDroit'][$i] == 'Aucune Radio à effectuer' and $r['Val_F_RADIO_Centre'][$i] == 'Aucune Radio à effectuer' and $r['Val_F_RADIO_CoteGauche'][$i] == 'Aucune Radio à effectuer' or !$r['Val_F_RADIO_CoteDroit'][$i] and !$r['Val_F_RADIO_Centre'][$i] and !$r['Val_F_RADIO_CoteGauche'][$i]) {
                 } else {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "RADIOGRAPHIES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     if ($r['Val_F_RADIO_CoteDroit'][$i] != 'Aucune Radio à effectuer') {
                         $exp = explode('|', $r['Val_F_RADIO_CoteDroit'][$i]);
                         while (list($key, $val) = each($exp)) {
                             if ($val) {
                                 $pdf->Cell(80, 3, "1x " . $val . " côté droit", 0, 1, L);
                             }
                         }
                         $exp = explode('|', $r['Val_F_RADIO_Centre'][$i]);
                         while (list($key, $val) = each($exp)) {
                             if ($val) {
                                 $pdf->Cell(80, 3, "1x " . $val . " centre", 0, 1, L);
                             }
                         }
                         $exp = explode('|', $r['Val_F_RADIO_CoteGauche'][$i]);
                         while (list($key, $val) = each($exp)) {
                             if ($val) {
                                 $pdf->Cell(80, 3, "1x " . $val . " côté gauche", 0, 1, L);
                             }
                         }
                     }
                 }
                 if ($r['Val_F_RADIO_TDM'][$i] == 'Aucun Scanner à effectuer' or !$r['Val_F_RADIO_TDM'][$i]) {
                 } else {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "SCANNER", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_TDM'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_RADIO_Echo'][$i] == 'Aucune Echographie à effectuer' or !$r['Val_F_RADIO_Echo'][$i]) {
                 } else {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "ECHOGRAPHIES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_Echo'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_RADIO_Autres_E'][$i] and $r['Val_F_RADIO_Autres_E'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "AUTRES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_Autres_E'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_RADIO_Comm'][$i] and $r['Val_F_RADIO_Comm'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 12);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "COMMENTAIRES", 0, 1, L);
                     $pdf->SetFont('times', '', 12);
                     $exp = explode('|', $r['Val_F_RADIO_Comm'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 $pdf->Rect(15, 235, 115, 20);
                 $pdf->SetY(232);
                 $pdf->SetFont('times', '', 9);
                 $pdf->Cell(0, 0, "Cotation", 0, 1, L);
                 // Signature du médecin.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(120, 25, "Docteur : " . $r['Val_F_RADIO_Nom_P'][$i], 0, 1, R);
                 //$pdf -> Footer ( ) ;
             }
         }
     } elseif ($_REQUEST['Formulaire2print'] == 'labo') {
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         // print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 } else {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_BIO_Motif'][$i] . '<br><br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 $pdf->SetFont('times', 'BU', 11);
                 $pdf->setx(65);
                 $pdf->Cell(80, 10, "EXAMENS", 0, 1, L);
                 if ($r['Val_F_BIO_F1'][$i] and $r['Val_F_BIO_F1'][$i] != 'Aucun.') {
                     //$pdf -> SetFont ( 'times', 'BU', 12 ) ;
                     //$pdf -> setx ( 65 ) ;
                     //$pdf -> Cell ( 80, 10, "", 0, 1, L ) ;
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['Val_F_BIO_F1'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_BIO_F2'][$i] and $r['Val_F_BIO_F2'][$i] != 'Aucun.') {
                     //$pdf -> SetFont ( 'times', 'BU', 12 ) ;
                     //$pdf -> setx ( 65 ) ;
                     //$pdf -> Cell ( 80, 10, "", 0, 1, L ) ;
                     $pdf->SetFont('times', '', 11);
                     $exp = explode('|', $r['Val_F_BIO_F2'][$i]);
                     while (list($key, $val) = each($exp)) {
                         $pdf->Cell(80, 3, "1x " . $val, 0, 1, L);
                     }
                 }
                 if ($r['Val_F_BIO_Autres_E'][$i] and $r['Val_F_BIO_Autres_E'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 11);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "AUTRES", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, $r['Val_F_BIO_Autres_E'][$i], 0, 1, L);
                 }
                 if ($r['Val_F_BIO_Comm'][$i] and $r['Val_F_BIO_Comm'][$i] != 'Aucun.') {
                     $pdf->SetFont('times', 'BU', 11);
                     $pdf->setx(65);
                     $pdf->Cell(80, 10, "COMMENTAIRES", 0, 1, L);
                     $pdf->SetFont('times', '', 11);
                     $pdf->Cell(80, 3, $r['Val_F_BIO_Comm'][$i], 0, 1, L);
                 }
                 // Préleveur.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 25, "Préleveur : " . $r['Val_F_BIO_Nom_Prel'][$i], 0, 1, L);
                 $pdf->SetY(229);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 25, "Heure prélevement : " . $r['Val_F_BIO_Heure_Prel'][$i], 0, 1, L);
                 // IPP
                 $pdf->SetFont('code39h48', '', 16);
                 $pdf->sety(85);
                 $pdf->Cell(0, 0, "*" . $r['Val_IDENT_ILPPatient'][$i] . "*", 0, 1, R);
                 $pdf->SetY(81);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(88, 0, "N° IPP : ", 0, 1, R);
                 // Signature du médecin.
                 $pdf->SetY(225);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(120, 25, "Docteur : " . $r['Val_F_BIO_Nom_P'][$i], 0, 1, R);
                 //$pdf -> Footer ( ) ;
             }
         }
     } else {
         $r = $formx->getAllValuesFromFormx($_REQUEST['FormX_ext_goto_'], '', '', 'idinstance');
         //print affTab ( $r ) ;
         $pdf = new clFPDF();
         $pdf->footerOn = 1;
         $pdf->AliasNbPages();
         $pdf->SetFont('Times', '', 12);
         $pdf->AddFont('code39h48', '', 'IDAutomation_Code_39.php');
         for ($i = 0; isset($r['Val_IDENT_NomPatient'][$i]); $i++) {
             if ($r['Val_IDENT_NsejPatient'][$i] == $nsej) {
                 if ($r['Val_IDENT_SexePat'][0] == "Masculin") {
                     $e = '';
                     $titre = 'Mr ';
                 } else {
                     $e = 'e';
                     $titre = 'Mme ';
                 }
                 $html = "<b>Nom : </b>" . $titre . $r['Val_IDENT_NomPatient'][$i] . '<br>';
                 $html .= "<b>Prénom : </b>" . $r['Val_IDENT_PrenomPatient'][$i] . '<br>';
                 $html .= "<b>Né{$e} le : </b>" . $r['Val_IDENT_DateNPat2'][$i] . '<br>';
                 $html .= "<b>IPP : </b>" . $r['Val_IDENT_ILPPatient'][$i] . '<br><br>';
                 $html .= "<b>Motif : </b>" . $r['Val_F_CS_Motif'][$i] . '<br>';
                 $html .= "<b>Prescripteur : </b>" . $r['Val_F_CS_Nom_P'][$i] . '<br>';
                 $html .= "<b>Consultation : </b>" . $r['Val_F_CS_Con'][$i] . '<br>';
                 // Saut de page.
                 $pdf->AddPage();
                 // On remplace les balises par leurs valeurs réelles.
                 $pdf->SetFont('times', '', 10);
                 // Génération du contenu.
                 $pdf->writehtml($html);
                 $pdf->SetFont('times', 'BU', 11);
                 // Compte rendu spécialiste
                 $pdf->SetY(129);
                 $pdf->SetFont('times', 'b', 13);
                 $pdf->Cell(0, 10, "COMPTE RENDU SPECIALISTE", 0, 1, C);
                 // Signature
                 $pdf->SetY(216);
                 $pdf->SetFont('times', 'b', 11);
                 $pdf->Cell(0, 10, "Signature : ", 0, 1, L);
                 // Spécialiste
                 $pdf->setx(65);
                 $pdf->SetY(255);
                 $pdf->SetFont('times', 'b', 11);
                 $pdf->Cell(0, 0, "Spécialiste : ", 0, 1, L);
                 $pdf->SetX(86);
                 $pdf->SetFont('times', '', 11);
                 $pdf->Cell(0, 0, $r['Val_F_CS_Spe'][$i], 0, 1, L);
                 // Cotation CCAM
                 $pdf->SetY(255);
                 $pdf->SetFont('times', 'b', 11);
                 $pdf->Cell(65, 10, "Cotation CCAM : ", 0, 1, L);
                 $pdf->Rect(97, 257, 101, 6);
                 $pdf->Rect(65, 130, 133, 7);
                 $pdf->Rect(65, 138, 133, 80);
                 $pdf->Rect(86, 219, 112, 7);
             }
         }
     }
     $pdf->Output();
 }