コード例 #1
0
function ListesBilans_choixbilan_formulaire_bio($formx)
{
    $listesbilans = new clListes("ListesBilans");
    $liste = array();
    foreach ($listesbilans->getListeListes("ListesBilans", 1, 0, 0, 1) as $liste1 => $liste2) {
        $liste[utf8_encode($liste2)] = $liste2;
        //$liste[ $liste1]= $liste2;
    }
    //eko ( $liste );
    return $liste;
}
コード例 #2
0
function ListesBilans_casespredef_formulaire_bio_stand($formx)
{
    $listesbilans = new clListes("ListesBilans");
    $liste = array();
    $liste_const = "";
    $choixbilan = utf8_decode($formx->getFormVar('Val_F_BIO_Liste_Choix'));
    //eko ( $casespredefinies );
    foreach ($listesbilans->getListeItems($choixbilan, 1, 0, "*AUCUNITEM*", 1) as $liste1 => $liste2) {
        $liste[$liste2] = $liste2;
        $liste_const .= $liste2 . "|";
    }
    $liste_const = substr($liste_const, 0, strlen($liste_const) - 1);
    //eko ( $liste );
    //eko ( $liste_const );
    if ($liste_const == "null") {
        $liste_const = "";
    }
    return utf8_encode($liste_const);
}
コード例 #3
0
ファイル: clListesPatients.php プロジェクト: jeromecc/tuv2
 function addPatientPresent()
 {
     global $session;
     global $listeMois;
     global $options;
     // Si la confirmation d'ajout est présente, alors on ajoute le nouveau patient dans la table.
     if ($_POST['ValiderAjouter'] or $_POST['ValiderAjouter_x']) {
         global $errs;
         // Préparation de la date d'admission.
         $date = new clDate();
         $dateN = new clDate($_POST['naissance']);
         /*if ( $options -> getOption ( "DoubleEtablissement" ) AND ! ( $options -> getOption ( 'DoubleSansCom' ) ) ) {
           $req = new clResultQuery ;			
             	  $ras = $req -> Execute ( "Fichier", "getMaxIdToulon", array(), "ResultQuery" ) ; 
           $max = 1 ;
           for ( $j = 0 ; isset ( $ras['idpatient'][$j] ) ; $j++ )
           	if ( $ras['idpatient'][$j] > $max ) $max = $ras['idpatient'][$j] ;
           $max++ ;
           eko ( "Double Etablissement : Calcul du max ($max)" ) ;
           $data['idpatient'] = $max ;
             }*/
         // Remplissage des champs pour la requête.
         $data['idu'] = "X";
         $data['ilp'] = "X";
         $data['nsej'] = "X";
         $data['uf'] = $options->getOption("AjoutManuelUF");
         $data['sexe'] = $_POST['sexe'];
         $data['prenom'] = $_POST['prenom'];
         $data['nom'] = $_POST['nom'];
         $data['dt_admission'] = $date->getDatetime();
         $data['dt_naissance'] = $dateN->getDatetime();
         $data['adresse_libre'] = $_POST['adresse'];
         $data['adresse_cp'] = $_POST['cp'];
         $data['adresse_ville'] = $_POST['ville'];
         $data['telephone'] = $_POST['telephone'];
         $data['salle_examen'] = $_POST['salle'];
         $data['dest_souhaitee'] = $_POST['destSouhaitee'];
         $data['dest_attendue'] = $_POST['destAttendue'];
         $data['adresseur'] = $_POST['adresseur'];
         $data['medecin_urgences'] = $_POST['medecin'];
         if ($_POST['medecin']) {
             $data[dt_examen] = $date->getDatetime();
         }
         $data['recours_categorie'] = $_POST['categorieRecours'];
         $data['manuel'] = 1;
         // Préparation de la requête.
         $requete = new clRequete(BDD, PPRESENTS, $data);
         // Exécution de la requête.
         $resu = $requete->addRecord();
         // On signale les éventuelles erreurs rencontrées.
         if ($resu['error']) {
             $errs->addErreur("clListesPatients : Erreur lors de la bascule d'un patient attendu en patient présent (" . $resu[error] . ").");
         }
         $param['table'] = PPRESENTS;
         $param['cw'] = "WHERE idu='X'";
         $req = new clResultQuery();
         $res = $req->Execute("Fichier", "getPatients", $param, "ResultQuery");
         for ($i = 0; isset($res['idpatient'][$i]); $i++) {
             $data2['idu'] = "MANU" . $res['idpatient'][$i];
             $data2['ilp'] = "MANU" . $res['idpatient'][$i];
             $data2['nsej'] = "MANU" . $res['idpatient'][$i];
             // Préparation de la requête.
             $requete = new clRequete(BDD, PPRESENTS, $data2);
             // Exécution de la requête.
             $requete->updRecord("idpatient='" . $res['idpatient'][$i] . "'");
             header('Location:' . URLNAVI . $session->genNavi($session->getNavi(0)));
         }
     } else {
         // Sinon, nous affichons le formulaire d'ajout d'un nouveau patient présent.
         // Chargement du template ModeliXe.
         $mod = new ModeliXe("addPresent.html");
         $mod->SetModeliXe();
         // Préparation du titre, des images, des urls...
         $mod->MxText("titre", "Ajouter un nouveau patient présent");
         $mod->MxImage("imgClose", URLIMGFER, "Annuler");
         $mod->MxUrl("lienClose", URLNAVI . $session->genNavi($session->getNavi(0)));
         // Champs IDU, IPP, et nsej...
         // $mod -> MxFormField ( "idu", "text", "idu", $_POST['idu'], "size=\"47\" maxlength=\"50\"" ) ;
         // $mod -> MxFormField ( "ilp", "text", "ilp", $_POST['ilp'], "size=\"47\" maxlength=\"50\"" ) ;
         // $mod -> MxFormField ( "nsej", "text", "nsej", $_POST['nsej'], "size=\"47\" maxlength=\"50\"" ) ;
         // Champs de l'état civil du patient.
         $data['M'] = "Homme";
         $data['F'] = "Femme";
         $data['I'] = "Indéterminé";
         $javascript1 = XhamTools::genAjax('onKeyUp', 'getPatients', 'navi=' . $session->genNavi('Ajax', 'getPatientsSortis'));
         $javascript3 = XhamTools::genAjax('onChange', 'getPatients', 'navi=' . $session->genNavi('Ajax', 'getPatientsSortis'));
         $javascript1 = XhamTools::genAjaxWithTempo('getPatients', 'navi=' . $session->genNavi('Ajax', 'getPatientsSortis'));
         $mod->MxSelect("sexe", "sexe", $_POST['sexe'], $data, '', '', 'class="w300"  ' . "{$javascript3}");
         $mod->MxFormField("prenom", "text", "prenom", $_POST['prenom'], "size=\"47\" maxlength=\"50\" {$javascript1} {$javascript3}");
         $mod->MxFormField("nom", "text", "nom", $_POST['nom'], "size=\"47\" maxlength=\"50\"  {$javascript1} {$javascript3}");
         // Gestion des champs de la date de naissance.
         $_POST['naissance'] = date('d/m/Y');
         $mod->MxFormField("naissance", "text", "naissance", $_POST['naissance'], "id=\"naissance\"");
         // Adresse et téléphone du patient.
         $mod->MxFormField("adresse", "text", "adresse", $_POST['adresse'], "size=\"47\" maxlength=\"128\"");
         $mod->MxFormField("telephone", "text", "telephone", $_POST['telephone'], "size=\"47\" maxlength=\"64\"");
         $mod->MxFormField("cp", "text", "cp", $_POST['cp'], "size=\"5\" maxlength=\"5\"");
         $mod->MxFormField("ville", "text", "ville", $_POST['ville'], "size=\"38\" maxlength=\"64\"");
         // Préparation des listes dynamiques.
         $listeCom = new clListes("Recours", "recup");
         $listeGen = new clListesGenerales("recup");
         $listeMedecins = $listeGen->getListeItems("Médecins", "1", '', '', "1");
         $listeSalles = $listeGen->getListeItems("Salles d'examens", "1", '', '', "1");
         $listeCategoriesRecours = $listeCom->getListes("", "1");
         $listeDestSouhaitees = $listeGen->getListeItems("Destinations souhaitées", "1", '', '', "1");
         $listeDestAttendues = $listeGen->getListeItems("Destinations attendues", "1", '', '', "1");
         // Affichage des listes dynamiques.
         $mod->MxSelect("medecin", "medecin", $_POST['medecin'], $listeMedecins, '', '', 'class="w300"');
         $mod->MxSelect("salle", "salle", $_POST['salle'], $listeSalles, '', '', 'class="w300"');
         $mod->MxSelect("categorieRecours", "categorieRecours", $_POST['categorieRecours'], $listeCategoriesRecours, '', '', 'class="w300"');
         $mod->MxSelect("destSouhaitee", "destSouhaitee", $_POST['destSouhaitee'], $listeDestSouhaitees, '', '', 'class="w300"');
         $mod->MxSelect("destAttendue", "destAttendue", $_POST['destAttendue'], $listeDestAttendues, '', '', 'class="w300"');
         // Suppression du bouton de modification inutile ici.
         $mod->MxBloc("modifier", "modify", " ");
         // Variable de navigation.
         $mod->MxHidden("hidden", "navi=" . $session->genNavi($session->getNavi(0), "addPatientPresent"));
         // Récupération du code HTML généré par le template ModeliXe.
         $this->af .= $mod->MxWrite("1");
     }
 }
コード例 #4
0
ファイル: clDemandeBons.php プロジェクト: jeromecc/tuv2
 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();
 }
コード例 #5
0
ファイル: clDemandeBons.php プロジェクト: jeromecc/tuv2
 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();
 }
コード例 #6
0
ファイル: clDocuments.php プロジェクト: jeromecc/tuv2
 function genTab()
 {
     global $errs;
     $liste = new clListes($this->DocumentsNameList, "1");
     $tab = $liste->getListes();
     //newfct ( gen_affiche_tableau, $tab ) ;
     while (list($key, $val) = each($tab)) {
         $tub[$val] = $liste->getListes($val);
         //newfct ( gen_affiche_tableau, $tab[$val] ) ;
     }
     return $tub;
 }
コード例 #7
0
ファイル: clFichePatient.php プロジェクト: jeromecc/tuv2
 function genBlocInformation($nomBloc, $nomListe, $mod, $retour = '', $nomCategorie = '', $nomBlocOptionnel = '', $code = '')
 {
     global $session;
     $res = '';
     if (isset($_POST['Medecin'])) {
         $session->setLogSup('Mise à jour des informations de passage');
     }
     // Si une modification de ce bloc a été transmise, alors on met à jour les informations du patient.
     if (isset($_POST[$nomBloc])) {
         $this->remplissageAutomatique($nomBloc, $_POST[$nomBloc]);
         $this->patient->setAttribut($nomBloc, stripslashes($_POST[$nomBloc]));
         $this->patient = new clPatient($this->idpatient, $this->type);
         if ($nomBloc == "DestinationAttendue") {
             $this->patient->setAttribut("TypeDestAttendue", $this->patient->getTypeAdmission());
             $this->patient->setAttribut("DestPMSI", $this->patient->getNewDestPMSI());
             $this->patient->setAttribut("Orientation", $this->patient->getNewOrientation());
             $this->patient = new clPatient($this->idpatient, $this->type);
         }
         if ($nomBloc == "Recours") {
             $newCR = $this->patient->getCodeRecoursFirst();
             if ($newCR != $this->patient->getCodeRecours()) {
                 $this->newRecours = 1;
             }
             $this->patient->setAttribut("CodeRecours", $newCR);
             $this->patient = new clPatient($this->idpatient, $this->type);
         }
     }
     // Récupération de la valeur actuelle du bloc.
     eval("\$res = \$this->patient->get{$nomBloc} ( ) ;");
     // Si le droit de modification est présent, alors on affiche le select,
     if ($session->getDroit($this->type . "_Informations", "m") and !$this->export) {
         // Si $retour a été transmis alors nous sommes dans la sous-liste
         // des catégories de recours : la liste des recours.
         if ($retour) {
             // On récupère les recours contenus dans la catégorie associée au patient.
             if ($nomCategorie) {
                 $listeCom = new clListes("Recours", "recup");
                 if ($nomCategorie == '__VIDE__') {
                     $nomCategorie = '';
                 }
                 $liste = $listeCom->getListes($nomCategorie, "1");
             }
             // Sinon, on récupère les informations à mettre dans le select.
         } else {
             $listeGen = new clListesGenerales("recup");
             if ($code) {
                 $liste = $listeGen->getListeItemsV2($nomListe, "1", '', "1");
             } else {
                 $liste = $listeGen->getListeItems($nomListe, "1", '', '', "1");
             }
             //eko ( $liste ) ;
         }
         if (is_array($liste)) {
             $mod->MxSelect($nomBlocOptionnel . "select" . $nomBloc, $nomBloc, $res, $liste, '', '', "onChange=\"reload(this.form)\"");
         } else {
             $mod->MxBloc($nomBlocOptionnel . "recours", "modifiy", " ");
         }
         // Sinon (le droit de modification n'est pas présent), on affiche seulement la valeur actuelle.
     } else {
         $mod->MxText($nomBlocOptionnel . "text" . $nomBloc, $res);
     }
     if ($retour) {
         return $res;
     }
 }
コード例 #8
0
ファイル: clDocuments.php プロジェクト: jeromecc/tuv2
 function genTab()
 {
     $liste = new clListes("Documents", "1");
     $tab = $liste->getListes();
     //newfct ( gen_affiche_tableau, $tab ) ;
     while (list($key, $val) = each($tab)) {
         $tub[$val] = $liste->getListes($val);
         //newfct ( gen_affiche_tableau, $tab[$val] ) ;
     }
     return $tub;
 }