function genPat($idpatient) { global $session; global $options; // Si un idpatient est tranmis, alors on récupère ses informations // à l'aide de la classe Patient. if ($idpatient) { //concerne la recuperation d'une instance de la classe FoRmX gerant les actions if ($options->getOption("use_formx")) { global $actions; $actions = new clFoRmX($idpatient, 'NO_POST_THREAT'); } $patient = new clPatient($idpatient, $session->getNavi(5)); $pat[NMA] = $patient->getNom(); $pat[PRE] = $patient->getPrenom(); $pat[DNA] = $patient->getDateNaissance(); $pat[SEX] = $patient->getSexe(); $date = new clDate($patient->getDateAdmission()); $pat[DTA] = $date->getDate($options->getOption("Documents Date")); $pat[HEA] = $date->getDate("H:i"); $pat[MED] = $patient->getMedecin(); $pat[DHS] = $patient->getDateSortie(); $pat[DHE] = $patient->getDateExamen(); // Sinon, nous renseignons avec les valeurs par défaut. } else { $pat[NMA] = "Bon"; $pat[PRE] = "Jean"; $date = new clDate("1981-12-24 22:30:00"); $pat[DNA] = $date->getDate($options->getOption("Documents Date")); $pat[SEX] = "1"; $date = new clDate(); $pat[DTA] = $date->getDate($options->getOption("Documents Date")); $pat[HEA] = $date->getDate("H:i"); $pat[MED] = "Testeur"; $pat[DHS] = $date->getDate($options->getOption("Documents Date")); $pat[DHE] = $date->getDate($options->getOption("Documents Date")); } // On renvoie le tableau généré. return $pat; }
function genPat($idpatient) { global $session; global $options; // Si un idpatient est tranmis, alors on récupère ses informations // à l'aide de la classe Patient. if ($idpatient) { $patient = new clPatient($idpatient, $session->getNavi(5)); $pat[NMA] = $patient->getNom(); $pat[PRE] = $patient->getPrenom(); $pat[DNA] = $patient->getDateNaissance(); $pat[SEX] = $patient->getSexe(); $date = new clDate($patient->getDateAdmission()); $dateA = new clDate(); $dateE = new clDate($patient->getDateExamen()); $dateS = new clDate($patient->getDateSortie()); $pat[DTA] = $date->getDate($options->getOption("Documents Date")); $pat[HEA] = $date->getDate("H:i"); $pat[MED] = $patient->getMedecin(); $pat[DHS] = $dateS->getDate($options->getOption("Documents Date")); $pat[DHE] = $dateE->getDate($options->getOption("Documents Date")); $pat[IPP] = $patient->getILP(); $pat[SEJ] = $patient->getNSej(); $pat[ADD] = $patient->getAdresse(); $pat[CPO] = $patient->getCodePostal(); $pat[VIL] = $patient->getVille(); $pat[IDE] = $patient->getIDE(); $pat[SAL] = $patient->getSalle(); $pat[CCM] = $patient->getCCMU(); $pat[GRA] = $patient->getCodeGravite(); $pat[UF] = $patient->getUF(); $pat[CRE] = $patient->getCategorieRecours(); $pat[MRE] = $patient->getMotifRecours(); $pat[COR] = $patient->getCodeRecours(); $pat[DES] = $patient->getDestinationSouhaitee(); $pat[DAT] = $patient->getDestinationAttendue(); $pat[CDI] = $patient->getCategorieDiagnostic(); $pat[DIA] = $patient->getLibelleDiagnostic(); $pat[DIC] = $patient->getCodeDiagnostic(); // Sinon, nous renseignons avec les valeurs par défaut. } else { $pat[NMA] = "Bon"; $pat[PRE] = "Jean"; $date = new clDate("1981-12-24 22:30:00"); $pat[DNA] = $date->getDate($options->getOption("Documents Date")); $pat[SEX] = "1"; $date = new clDate(); $pat[DTA] = $date->getDate($options->getOption("Documents Date")); $pat[HEA] = $date->getDate("H:i"); $pat[MED] = "Testeur"; $pat[DHS] = $date->getDate($options->getOption("Documents Date")); $pat[DHE] = $date->getDate($options->getOption("Documents Date")); $pat[IPP] = "777777777"; $pat[SEJ] = "666666666"; $pat[ADD] = "Rue des patients"; $pat[CPO] = "83400"; $pat[VIL] = "PatientsVille"; $pat[IDE] = "IDE"; $pat[SAL] = "Salle"; $pat[CCM] = "II"; $pat[GRA] = "2"; $pat[UF] = "2701"; $pat[CRE] = "Catégorie de recours"; $pat[MRE] = "Motif de recours"; $pat[COR] = "CodeRecours"; $pat[DES] = "Destination souhaitée"; $pat[DAT] = "Destination attendue"; $pat[CDI] = "Catégorie de diagnotic"; $pat[DIA] = "Diagnostic"; $pat[DIC] = "Code diagnostic"; } // On renvoie le tableau généré. return $pat; }
function writeBALall($tabIdPatient) { global $fusion; global $table_patient_manuel; global $table_patient_automatique; //newfct(gen_affiche_tableau,$tabIdPatient); for ($ind = 0; $ind <= 1; $ind++) { if ($ind == 0) { //controleActesPresents $this->controleActesPresents($tabIdPatient[$ind + 1]); // unset($paramRq); $paramRq[cw] = "idEvent=" . $tabIdPatient[$ind + 1] . " and idDomaine=" . CCAM_IDDOMAINE; $req = new clResultQuery(); $res = $req->Execute("Fichier", "CCAM_getActesDiagsCotation", $paramRq, "ResultQuery"); $dateDemande = $res["dateDemande"][0]; //eko($res); // Mise à jour des données de $tabIdPatient[$ind] // Prendre le nom du medecin et son code ADELI de $tabIdPatient[$ind+1] // On prend le nom du medecin du patient $param[cw] = "WHERE idpatient='" . $tabIdPatient[$ind + 1] . "'"; $param[table] = $table_patient_manuel; $req = new clResultQuery(); $res = $req->Execute("Fichier", "getPatients", $param, "ResultQuery"); // On prend le numero ADELI unset($param); $param[nomitem] = $res["medecin_urgences"][0]; $req = new clResultQuery(); $res2 = $req->Execute("Fichier", "getMatriculeMedecin", $param, "ResultQuery"); $Medecin_urgences = $res["medecin_urgences"][0]; $Matricule = $res2["matricule"][0]; // Mise à jour de la fiche patient $tabIdPatient[$ind] seulement pour l'acte ATU $paramModif["envoi_nomIntervenant"] = $Medecin_urgences; $paramModif["envoi_matriculeIntervenant"] = $Matricule; $paramModif["dateDemande"] = $dateDemande; $requete = new clRequete(CCAM_BDD, "ccam_cotation_actes", $paramModif); $sql = $requete->updRecord("idEvent=" . $tabIdPatient[$ind] . " and idDomaine=" . CCAM_IDDOMAINE); unset($paramRq); $paramRq[cw] = "idEvent=" . $tabIdPatient[$ind] . " and idDomaine=" . CCAM_IDDOMAINE; $req = new clResultQuery(); $res = $req->Execute("Fichier", "CCAM_getActesDiagsCotation", $paramRq, "ResultQuery"); //eko($table_patient_automatique); if ($table_patient_automatique == PSORTIS) { $type = "suppression"; $this->contenuBAL($res, $type); } //Suppression dans la table ccam_cotation_actes (patient pastel pour le Ch-Hyeres) $requete = new clRequete(CCAM_BDD, "ccam_cotation_actes", array()); $sql = $requete->delRecord("idEvent=" . $tabIdPatient[$ind] . " and idDomaine=" . CCAM_IDDOMAINE); } else { //Récup des infos de pastel pour maj identité patient manuel if ($this->patientSorti($tabIdPatient[$ind])) { $table = "Sortis"; } else { $table = ""; } $patient = new clPatient($tabIdPatient[$ind], $table); unset($param); $param[numSejour] = $patient->getNSej(); $param[idu] = $patient->getIDU(); $param[ipp] = $patient->getILP(); $param[nomu] = $patient->getNom(); $param[pren] = $patient->getPrenom(); $param[sexe] = $patient->getSexe(); $param[dtnai] = substr($patient->getDateNaissance(), 0, 10); //eko($param); $requete = new clRequete(CCAM_BDD, "ccam_cotation_actes", $param); $sql = $requete->updRecord("idEvent=" . $tabIdPatient[$ind] . " and idDomaine=" . CCAM_IDDOMAINE); if ($table) { //Le patient manuel maintenant fusionné était sorti, on peut donc maintenant envoyer ses actes à la BAL /*$lesion=$this->lesion($tabIdPatient[$ind]); $tabAsso=$this->tabAsso($tabIdPatient[$ind],$lesion); unset($paramRq); $paramRq[cw]="idEvent=$tabIdPatient[$ind] and idDomaine=".CCAM_IDDOMAINE; $req=new clResultQuery; $res=$req->Execute("Fichier","CCAM_getActesDiagsCotation",$paramRq,"ResultQuery"); //eko($res[INDIC_SVC]); $type="creation"; $this->contenuBAL($res,$type,$tabAsso);*/ $this->writeBALSorti("", $tabIdPatient[$ind]); } } //eko("ind:$ind-idPatient:".$tabIdPatient[$ind]); } }
function createActes($res, $j = '', $tous = '', $id = '') { //eko($res); //eko($id); global $options; if (!$tous) { $deb = $j; $max = $j; } else { $deb = 0; $max = $res['INDIC_SVC'][2] - 1; } $mod = new ModeliXe("HprimXMLActes.html"); $mod->SetModeliXe(); $tabActe = explode('|', XhamTools::sansAccent($res['CONTENU'][$deb])); $type = $res['TYPE'][$deb]; $idpass = $tabActe[0]; $idu = $tabActe[1]; $nomu = $tabActe[2]; $pren = $tabActe[3]; $sexe = $tabActe[4]; $dtnai = $tabActe[5]; $dtdem = $tabActe[6]; $hhdem = $tabActe[7]; $ufd = $tabActe[8]; $action = $tabActe[9]; $date = new clDate($dtdem . ' ' . $hhdem); $date = new clDate(); if ($options->getOption("HprimXML_UF")) { $ufr = $options->getOption("HprimXML_UF"); $ufd = $options->getOption("HprimXML_UF"); } if ($options->getOption('HprimXML_AttributsESA')) { $mod->MxText("attributsesa", ' version="1.03a" xsi:schemaLocation="http://www.hprim.org/hprimXML msgEvenementsServeurActes103a.xsd" xmlns="http://www.hprim.org/hprimXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'); } else { $mod->MxText("attributsesa", ""); } if ($options->getOption('HprimXML_EnvoiGroupeParIntervenant')) { if ($options->getOption('HprimXML_EmetInterv') == 'ID') { $emetti = $id + 1; } else { $emetti = $res['DISCR'][$deb]; } } else { if ($options->getOption('HprimXML_EmetInterv') == 'ID') { $emetti = $res['ID'][$deb]; } elseif ($options->getOption('HprimXML_EmetInterv')) { $emetti = $options->getOption('HprimXML_EmetInterv'); } else { $emetti = $res['DISCR'][$deb]; } } if ($options->getOption('HprimXML_EnvoiGroupeParIntervenant')) { if ($options->getOption('HprimXML_EmetInterv') == 'ID') { $mod->MxText('identifiantMessage', $id); //eko("avignon"); } else { $mod->MxText('identifiantMessage', $res['ID'][$deb]); } } else { $mod->MxText('identifiantMessage', $res['ID'][$deb]); // eko("reste"); } $mod->MxText('codeEmetteur', $options->getOption('HprimXML_Emet') ? $options->getOption('HprimXML_Emet') : $res['DISCR'][$deb]); $mod->MxText('codeDestinataire', $options->getOption('HprimXML_Dest')); $mod->MxText('patientEmetteur', $idu); $mod->MxText('patientRecepteur', $idu); $mod->MxText('sexe', $sexe); $mod->MxText('patientNom', $nomu); $mod->MxText('patientPrenom', $pren); if ($dtnai != "00/00/0000") { $mod->MxText('patientNaissance', $dtnai); } else { $mod->MxText('patientNaissance', ""); } $pati = new clPatient($res['DISCR'][$deb], ''); if (!$pati->getID()) { $pati = new clPatient($res['DISCR'][$deb], 'Sortis'); } //$pati -> debugInfos ( ) ; //eko ( "UUUUUUUUUUUUUUUUUUUUUUUUFFFFFFFFFFFFFFFFFF : ".$pati->getInformation('uf').' pour '.$pati->getDateNaissance() ) ; // Correction date foireuse module ccam $datadmi = new clDate($pati->getDateAdmission()); $datexam = new clDate($pati->getDateExamen()); $datsort = new clDate($pati->getDateSortie()); if ($options->getOption("ChoixHeureAffectationActes") == "Heure d'admission") { $datdema = $datadmi; } elseif ($options->getOption("ChoixHeureAffectationActes") == "Heure d'examen") { $datdema = $datexam; } elseif ($options->getOption("ChoixHeureAffectationActes") == "Heure de sorti") { $datdema = $datsort; } else { if ($datadmi->getDatetime() != '1999-12-31 00:00:00' and $datsort->getDatetime() != '1999-12-31 00:00:00') { $time = (int) ($datadmi->getTimestamp() / 2) + $datsort->getTimestamp() / 2; } elseif ($datadmi->getDatetime() != '1999-12-31 00:00:00') { $time = $datadmi->getTimestamp(); } else { $time = $datsort->getTimestamp(); } $datdema = new clDate($time); $datmed = new clDate($time); //eko ( $datadmi->getTimestamp ( ).' + '.$datsort->getTimestamp ( ).' = '.$time.' = '.$datdema -> getTimestamp ( ) ) ; //eko ( $datadmi->getDatetime ( ).' + '.$datsort->getDatetime ( ).' = '.$time.' = '.$datdema -> getDatetime ( ) ) ; } $dtdem = $datdema->getDate('Y-m-d'); $hhdem = $datdema->getDate('H:i:s'); if ($options->getOption('HprimXML_DateProduction') == 'Heure médiane') { $date = $datmed; } elseif ($options->getOption('HprimXML_DateProduction') == 'Heure admission') { $date = $datadmi; } elseif ($options->getOption('HprimXML_DateProduction') == 'Heure examen') { $date = $datadmi; } elseif ($options->getOption('HprimXML_DateProduction') == 'Heure sortie') { $date = $datsort; } if ($options->getOption('HprimXML_DateT')) { $mod->MxText('dateHeureProduction', $date->getDate("Y-m-d\\TH:i:s")); } else { $mod->MxText('dateHeureProduction', $date->getDatetime()); } if ($options->getOption('HprimXML_DateVenue') == 'Heure médiane') { $dateve = $datmed; } elseif ($options->getOption('HprimXML_DateVenue') == 'Heure admission') { $dateve = $datadmi; } elseif ($options->getOption('HprimXML_DateVenue') == 'Heure examen') { $dateve = $datadmi; } elseif ($options->getOption('HprimXML_DateVenue') == 'Heure sortie') { $dateve = $datsort; } else { $dateve = $datdema; } $dtven = $dateve->getDate('Y-m-d'); $hhven = $dateve->getDate('H:i:s'); $mod->MxText('venueEmetteur', $idpass); $mod->MxText('venueRecepteur', $idpass); $mod->MxText('venueDate', $dtven); $mod->MxText('venueHeure', $hhven); $mod->MxText('interventionDate', $dtdem); $mod->MxText('interventionHeure', $hhdem); $mod->MxText('interventionEmetteur', $emetti); $mod->MxText('interventionDemandeDate', $dtdem); $mod->MxText('interventionDemandeHeure', $hhdem); $mod->MxText('interventionUF', $pati->getUF() ? $pati->getUF() : $ufr); $nbngap = 0; $nbccam = 0; $datenai = new clDate($pati->getDateNaissance()); $duree = new clDuree($datenai->getTimestamp()); $duree->getDuree($datenai->getTimestamp()); $ageannees = $duree->getYears(); //eko ( $ageannees ) ; for ($i = $deb; $i <= $max; $i++) { $tabActe = explode('|', XhamTools::sansAccent($res['CONTENU'][$i])); $type = $res['TYPE'][$i]; $idpass = $tabActe[0]; $idu = $tabActe[1]; $nomu = $tabActe[2]; $pren = $tabActe[3]; $sexe = $tabActe[4]; $dtnai = $tabActe[5]; $dtdem = $tabActe[6]; $hhdem = $tabActe[7]; $ufd = $tabActe[8]; $action = $tabActe[9]; $idact = $tabActe[10]; $cdccam = $tabActe[11]; $cddiags = $tabActe[12]; $cdacti = $tabActe[13]; $cdphase = $tabActe[14]; $dtr = $tabActe[15]; $hhr = $tabActe[16]; $nomumed = $tabActe[17]; $prenmed = $tabActe[18]; $adeli = $tabActe[19]; $ufr = $tabActe[20]; $modif = $tabActe[21]; $ngapl = $tabActe[22]; $ngapc = $tabActe[23]; $factu = $tabActe[24]; $cdasso = $tabActe[25]; $nuitjf = $tabActe[26]; $tabm = explode('~', $modif); if ($options->getOption("HprimXML_UF")) { $ufr = $options->getOption("HprimXML_UF"); $ufd = $options->getOption("HprimXML_UF"); } if (!$this->adeliMedecin) { if ($options->getOption("HprimXML_CodeMedecinInterv") == 'ADELI9') { $this->adeliMedecin = '<code>' . sprintf('%09d', $adeli) . '</code>'; } elseif ($options->getOption("HprimXML_CodeMedecinInterv") == 'NOMMED') { $this->adeliMedecin = '<code>' . $nomumed . ' ' . $prenmed . '</code>'; } elseif ($options->getOption("HprimXML_CodeMedecinInterv") == 'NOMMED10') { $this->adeliMedecin = '<code>' . substr($nomumed . ' ' . $prenmed, 0, 10) . '</code>'; } elseif ($options->getOption("HprimXML_CodeMedecinInterv") == 'ADELI') { $this->adeliMedecin = '<code>' . $adeli . '</code>'; } else { $this->adeliMedecin = ''; } } elseif (!ereg('<code>', $this->adeliMedecin)) { $this->adeliMedecin = '<code>' . $adeli . '</code>'; } if ($options->getOption("HprimXML_CodeMedecin") == 'ADELI') { $codeade = '<code>' . $adeli . '</code>'; } elseif ($options->getOption("HprimXML_CodeMedecin") == 'NOMMED') { $codeade = '<code>' . $nomumed . '</code>'; } elseif ($options->getOption("HprimXML_CodeMedecin") == 'ADELI9') { $codeade = '<code>' . sprintf('%09d', $adeli) . '</code>'; } elseif ($options->getOption("HprimXML_CodeMedecin") == 'VIDE') { $codeade = ''; } else { $codeade = '<code>' . 'x' . '</code>'; } //eko ( "CODE MEDECIN : $codeade" ) ; if ($options->getOption("HprimXML_ExecPrinc")) { $medExec = ' principal="oui"'; } else { $medExec = ''; } if ($options->getOption('HprimXML_StatutFT')) { $modStatut = ' statut="ft"'; } else { $modStatut = ''; } if ($action == 'creation') { $action = utf8_encode('création'); } if ($nuitjf == 'F') { $isFerie = "oui"; } else { // Encore une gestion supplémentaire d'un bug du module CACAM if ($type == 'NGAP' and $ngapl == 'AMI' and $datdema->getDate('w') == 6 and $datdema->getDate('H') >= 8) { $isFerie = "oui"; } else { $isFerie = "non"; } } if ($nuitjf == 'N') { $isNuit = '1t'; } elseif ($nuitjf == 'NM') { $isNuit = '2t'; } else { $isNuit = 'non'; } $listeTraited[$res['ID'][$i]] = $res['ID'][$i]; if ($options->getOption('LettreCleCSPsy') and $ngapl == 'CNPSY') { $ngapl = $options->getOption('LettreCleCSPsy'); } //$mod -> MxText ( 'identifiantMessage', $res['ID'][$deb] ) ; // Correction date foireuse module ccam $dtdem = $datdema->getDate('Y-m-d'); $hhdem = $datdema->getDate('H:i:s'); if ($type == 'NGAP') { if ($ngapl == 'MNO' and $ageannees > 2) { $erreurngap = 1; } if (!($ngapl == 'AMI' and $factu == 'non') and !$erreurngap) { if ($ngapl == 'C' or $ngapl == 'CS') { $tri = '2.'; } else { $tri = '3.'; } $mod->MxText('codeAdeliMedecin', $this->codeMedecinUrgentiste); $mod->MxText('actesngap.ngap.action', $action); $mod->MxText('actesngap.ngap.facturable', $factu); if ($ngapl == 'C' and isset($this->deqp[$pati->getID()]['U'])) { $isNuit = 'non'; } $mod->MxText('actesngap.ngap.executionNuit', $isNuit); if ($ngapl == 'C' and isset($this->deqp[$pati->getID()]['F'])) { $isFerie = 'non'; } $mod->MxText('actesngap.ngap.executionDimancheJourFerie', $isFerie); $mod->MxText('actesngap.ngap.ngapEmetteur', $idact); $mod->MxText('actesngap.ngap.lettreCle', $ngapl); $mod->MxText('actesngap.ngap.coefficient', $ngapc); $mod->MxText('actesngap.ngap.ngapDate', $dtdem); $mod->MxText('actesngap.ngap.ngapHeure', $hhdem); $mod->MxText('actesngap.ngap.medecinADELI', $adeli); $mod->MxText('actesngap.ngap.medecinCode', $codeade); $mod->MxText('actesngap.ngap.medecinNom', $nomumed); if ($ngapl == 'CS') { $mod->MxText('actesngap.ngap.medecinUF', $ufr); } else { $mod->MxText('actesngap.ngap.medecinUF', $pati->getUF() ? $pati->getUF() : $ufr); } $mod->MxBloc('actesngap.ngap', 'loop'); $nbngap++; if ($ngapl == 'ATU') { $repfic = "atuxml/"; } else { $repfic = "ngapxml/"; } } $erreurngap = 0; } elseif ($type == 'CCAM') { $tri = '1.'; $mod->MxText('codeAdeliMedecin', $this->codeMedecinUrgentiste); $mod->MxText('actesccam.ccam.action', $action); $mod->MxText('actesccam.ccam.ccamEmetteur', $idact); if ($options->getOption('HprimXML_Recepteur')) { $mod->MxText('actesccam.ccam.ccamRecepteur', '<recepteur>' . $options->getOption('HprimXML_Recepteur') . '</recepteur'); } else { $mod->MxText('actesccam.ccam.ccamRecepteur', ''); } $mod->MxText('actesccam.ccam.codeActe', $cdccam); $mod->MxText('actesccam.ccam.codeActivite', $cdacti); $mod->MxText('actesccam.ccam.codePhase', $cdphase); $mod->MxText('actesccam.ccam.ccamDate', $dtdem); $mod->MxText('actesccam.ccam.ccamHeure', $hhdem); $mod->MxText('actesccam.ccam.medExec', $medExec); $mod->MxText('actesccam.ccam.medecinADELI', $adeli); $mod->MxText('actesccam.ccam.medecinCode', $codeade); $mod->MxText('actesccam.ccam.medecinNom', $nomumed); //$mod -> MxText ( 'actesccam.ccam.medecinUF', $ufr ) ; $mod->MxText('actesccam.ccam.medecinUF', $pati->getUF() ? $pati->getUF() : $ufr); //if ( $options -> getOption ( 'HprimXML_AssoNonVide' ) ) $asso = ($cdasso==''?1:$cdasso) ; //else $asso = $cdasso ; if ($cdasso) { $asso = '<codeAssociationNonPrevue>' . $cdasso . '</codeAssociationNonPrevue>'; } else { $asso = ''; } $mod->MxText('actesccam.ccam.codeAssociationNonPrevue', $asso); $nbMod = 0; for ($k = 0; isset($tabm[$k]); $k++) { if ($tabm[$k]) { $mod->MxText('actesccam.ccam.modificateur.modificateur', $tabm[$k]); $mod->MxText('actesccam.ccam.modificateur.modStatut', $modStatut); $mod->MxBloc('actesccam.ccam.modificateur', 'loop'); if ($cdccam == 'DEQP003') { if ($tabm[$k] == 'U') { $this->deqp[$pati->getID()]['U'] = 1; } if ($tabm[$k] == 'P') { $this->deqp[$pati->getID()]['U'] = 1; } if ($tabm[$k] == 'S') { $this->deqp[$pati->getID()]['U'] = 1; } if ($tabm[$k] == 'F') { $this->deqp[$pati->getID()]['F'] = 1; } } $nbMod++; } } if ($nbMod == 0) { $mod->MxBloc('actesccam.ccam.modificateur', 'delete'); } $mod->MxBloc('actesccam.ccam', 'loop'); $nbccam++; $repfic = "ccamxml/"; } } if ($nbngap == 0) { $mod->MxBloc('actesngap', 'delete'); } if ($nbccam == 0) { $mod->MxBloc('actesccam', 'delete'); } if ($options->getOption("HprimXML_tri_CCAM_CCS_NGAP")) { $numfic = $tri . $res['ID'][$deb]; } else { $numfic = $res['ID'][$deb]; } if ($options->getOption('HprimXML_NomFic')) { $nomFic = $options->getOption('HprimXML_NomFic') . '_' . $numfic . ''; } else { $nomFic = 'fic' . $options->getOption('HprimXML_ChaineFic') . 'TV2_' . $numfic . ''; } if ($options->getOption('HprimXML_NomFic') and $options->getOption('HprimXML_NomModulo')) { $nomFic = $options->getOption('HprimXML_NomFic') . sprintf('%03d', $res['ID'][$deb] % 1000); } $num = $res['ID'][$deb]; if (!$pati->getManuel()) { $this->genFile($mod->MxWrite("1"), $num, $nomFic, $listeTraited, $repfic); } }