예제 #1
0
 function runCheck()
 {
     global $options;
     $nom1 = $options->getOption("sansContrainte1");
     $val1 = $options->getOption("sansContrainteVal1");
     $nom2 = $options->getOption("sansContrainte2");
     $val2 = $options->getOption("sansContrainteVal2");
     $nom3 = $options->getOption("sansContrainte3");
     $val3 = $options->getOption("sansContrainteVal3");
     if (!$this->checkSansContrainte($nom1, $val1) and !$this->checkSansContrainte($nom2, $val2) and !$this->checkSansContrainte($nom3, $val3)) {
         $this->check("recours_categorie", "CategorieRecours", "Catégorie de recours", ERR_RECOURS_CATEGORIE);
         $this->check("code_gravite", "CodeGravite", "Code Gravité", ERR_CODE_GRAVITE);
         $this->check("dt_examen", "DateExamen", "Date d'examen", ERR_DATE_EXAMEN);
         $this->check("dest_attendue", "DestAttendue", "Destination attendue", ERR_DEST_ATTENDUE);
         $this->check("dest_souhaitee", "DestSouhaitee", "Destination souhaitée", ERR_DEST_SOUHAITEE);
         $this->check("ide", "IDE", "IDE", ERR_IDE);
         $this->check("medecin_urgences", "Medecin", "Médecin", ERR_MEDECIN);
         $this->check("motif_transfert", "MotifTransfert", "Motif de transfert", ERR_MOTIF_TRANSFERT, "type_destination", "T");
         $this->check("moyen_transport", "MoyenTransport", "Moyen de transport", ERR_MOYEN_TRANSPORT, "type_destination", "T");
         $this->check("dest_pmsi", "DestPMSI", "Destination PMSI", ERR_DEST_PMSI, "type_destination");
         $this->check("orientation", "Orientation", "Orientation", ERR_ORIENTATION, "type_destination");
         $this->check("motif_recours", "Recours", "Recours", ERR_RECOURS);
         $this->check("salle_examen", "Salle", "Salle d'examen", ERR_SALLE_EXAMEN);
         $this->check("provenance", "Provenance", "Provenance", ERR_PROVENANCE);
         $this->check("tiss", "TISS", "TISS", ERR_TISS);
         if ($options->getOption("GestionAdresseur")) {
             $this->check("adresseur", "Adresseur", "Adresseur", ERR_ADRESSEUR);
         }
         if ($options->getOption("GestionModeAdmission")) {
             $this->check("mode_admission", "ModeAdmission", "Mode d'admission", ERR_MODE_ADMISSION);
         }
         if ($options->getOption("GestionCCMU")) {
             $this->check("ccmu", "CCMU", "Code CCMU", ERR_CCMU);
         }
         if ($options->getOption("GestionGEMSA")) {
             $this->check("gemsa", "GEMSA", "GEMSA", ERR_GEMSA);
         }
         if ($options->getOption("GestionTraumato")) {
             $this->check("traumato", "Traumato", "Traumato", ERR_TRAUMATO);
         }
         if ($options->getOption("CCAMExterne")) {
         }
         // Récupération des contraintes liées aux actes et aux diagnostics
         $contrainteActesDiag = new clCCAMCotationActesDiags($this->paramCCAM);
         $tabContraintesActesDiag = $contrainteActesDiag->getContraintes();
         if ($this->patient->getTypeDestination() != 'H' and $this->patient->getUF() != $options->getOption('numUFUHCD') and $this->patient->getUF() != $options->getOption('numUFSC') and $this->patient->getUF() != $options->getOption('numUFUHCDrepere')) {
             if (is_array($tabContraintesActesDiag[acte])) {
                 $this->bool = 0;
                 $this->messages[$tabContraintesActesDiag[acte][nom]] = $tabContraintesActesDiag[acte][description];
             }
         }
         if (is_array($tabContraintesActesDiag[diag])) {
             $this->bool = 0;
             $this->messages[$tabContraintesActesDiag[diag][nom]] = $tabContraintesActesDiag[diag][description];
         }
         if (is_array($tabContraintesActesDiag[consultation])) {
             $this->bool = 0;
             $this->messages[$tabContraintesActesDiag[consultation][nom]] = $tabContraintesActesDiag[consultation][description];
         }
         if ($this->patient->getTypeDestination() != 'H' and $this->patient->getUF() != $options->getOption('numUFUHCD') and $this->patient->getUF() != $options->getOption('numUFSC') and $this->patient->getUF() != $options->getOption('numUFUHCDrepere')) {
             if (!$this->checkCora()) {
                 $this->bool = 0;
                 $this->messages['CORA'] = 'Les actes doivent etre saisis dans CORA.';
             }
         }
         //contraintes "plugin"
         $this->checkCustom();
     }
     return $this->bool;
 }