1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
| $sheet4 = $workbook->createSheet();
//$sheet4 = $workbook->getActiveSheet();
$sheet4->setTitle('TUMOR');
$events = $conn->prepare("SELECT * FROM neuro_event WHERE SUBSTRING(content_type_id,1,5) = 'tumor' ORDER BY patient_id, position");
$events->execute();
$lign = 2; //ligne de début
$tour = 1; //cela me permet de ne pas réécrire le dmu si on est au tour 2 ou plus
$dmu_actuel = "";
$col = 0; //colonne A commence à 0 avec les référence L1C1
while($event = $events->fetch())
{
$dmu_actuel = $sheet4->getCellByColumnAndRow(0, $lign)->getValue(); //je récupère dans le ficheir excel le dmu se trouvant en A1 (ou A2...)
$tumors = $conn->prepare("SELECT * FROM neuro_tumor WHERE event_ptr_id = :id_examen");
$tumors->execute(array(":id_examen"=>$event['content_type_id']));
while($la_tumor = $tumors->fetch())
{
if($dmu_actuel != "")
{
if($dmu_actuel != $event['patient_id']) //Je vérifie si on travaille avec le même patient ou si on change de ligne
{
$lign++; //je change de ligne
$col = 0; //je reviens à la colonne A
$tour = 1;
}
}
if($tour == 1)
{
$sheet4->setCellValueByColumnAndRow($col, $lign, $event['patient_id']);
$col++;
}
$sheet4->setCellValueByColumnAndRow($col, $lign,$event['event_date']);
$col++;
$sheet4->setCellValueByColumnAndRow($col, $lign,$la_tumor['ap_number']);
$col++;
$sheet4->setCellValueByColumnAndRow($col, $lign,$la_tumor['surgery_type']);
$col++;
$sheet4->setCellValueByColumnAndRow($col, $lign,$la_tumor['tumoral_bloc']);
$col++;
$sheet4->setCellValueByColumnAndRow($col, $lign,$la_tumor['infiltrant_cells']);
$col++;
$sheet4->setCellValueByColumnAndRow($col, $lign,$la_tumor['radio_necrosis']);
$col++;
$sheet4->setCellValueByColumnAndRow($col, $lign,$la_tumor['corticoids']);
$col++;
//histochimie
$tumor_histochimie = $conn->prepare("SELECT * FROM neuro_tumor_histochimie WHERE event_ptr_id = :id_examen");
$tumor_histochimie->execute(array(":id_examen"=>$event['content_type_id']));
$tumor_histo = $tumor_histochimie->fetch();
$sheet4->setCellValue($col.$lign,$tumor_histo['ki67']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['hot_spot']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['p53']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['IDH1']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['GFAP']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['marquage_cadre']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['OLIG']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['Synaptophysine']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['Beta3Tubuline']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['NFP']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['NeuN']);
$col++;
echo "$col++";
$sheet4->setCellValue($col.$lign,$tumor_histo['Vimentine']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['EMA']);
$col++;
//$sheet4->setCellValue('W'.$lign,$tumor_histo['marquage_cytoplasmique_nucleaire']);
$sheet4->setCellValue($col.$lign,$tumor_histo['marquage_dot']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['EGFR']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['Betacathenine']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_histo['INI1']);
$col++;
//BIOL_MOLECULAIRE
$tumor_biologie_moleculaire = $conn->prepare("SELECT * FROM neuro_tumor_biol_moleculaire WHERE event_ptr_id = :id_examen");
$tumor_biologie_moleculaire->execute(array(":id_examen"=>$event['content_type_id']));
$tumor_biologie_mol = $tumor_biologie_moleculaire->fetch();
$col++;
$sheet4->setCellValue($col.$lign,$tumor_biologie_mol['IDH1_BIOL']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_biologie_mol['MGMT1']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_biologie_mol['1p']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_biologie_mol['19q']);
$col++;
$sheet4->setCellValue($col.$lign,$tumor_biologie_mol['EGFRIHC']);
$col++;
//$sheet4->setCellValue('AF'.$lign,$tumor_biologie_mol['EGFRCISH']);
$sheet4->setCellValue($col.$lign,$tumor_biologie_mol['p16']);
$col++;
}
$tour++;
} |
Partager