executerRequete($sql); return $liste->fetchAll(PDO::FETCH_ASSOC); } public function enregistrerrefusderogation($idDemandederogation, $motifReel, $motifRefusAssure) { $user = $_SESSION['login']; $sql = 'call sp_refuser_derogation(?, ?, ?, ?)'; $this->executerRequete($sql, array($idDemandederogation, $motifReel, $motifRefusAssure, $user)); } public function enregistreraccordderogation($idDemandederogation, $motifReel, $debut, $fin, $codeDerogation, $tmDerogation) { $user = $_SESSION['login']; $sql = 'call sp_accepter_derogation(?, ?, ?, ?, ?, ?, ?)'; $this->executerRequete($sql, array($idDemandederogation, $motifReel, $debut, $fin, $user, $codeDerogation, $tmDerogation)); } public function getderogationsbenficiaire($idBeneficiaire, $d1, $d2) { $sql = 'call sp_get_derogations_beneficiaire(?, ?, ?)'; $resultat = $this->executerRequete($sql, array($idBeneficiaire, $d1, $d2)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getDerogationId($idDemandederogation) { if (est_anglophone()) { $sql = 'call sp_get_derogation_id_simple_eng(?)'; } else { $sql = 'call sp_get_derogation_id_simple(?)'; } $resultat = $this->executerRequete($sql, array($idDemandederogation)); return $resultat->fetch(PDO::FETCH_ASSOC); } public function getDerogationIdCOnsultation($idDemandederogation) { if (est_anglophone()) { $sql = 'call sp_get_derogation_id_eng(?)'; } else { $sql = 'call sp_get_derogation_id(?)'; } $resultat = $this->executerRequete($sql, array($idDemandederogation)); return $resultat->fetch(PDO::FETCH_ASSOC); } public function getinfosDerogation($idDemandederogation) { $sql = 'call sp_get_infos_derogation(?)'; $resultat = $this->executerRequete($sql, array($idDemandederogation)); return $resultat->fetch(PDO::FETCH_ASSOC); } public function getderogations($codePrestataire, $codeDerogation, $codeReponseDerogation, $debut, $fin) { $codePrestataire = contruireParamLike($codePrestataire); $codeDerogation = contruireParamLike($codeDerogation); $codeReponseDerogation = contruireParamLike($codeReponseDerogation); if (est_anglophone()) { $sql = 'call sp_get_derogations_eng(?, ?, ?, ?, ?)'; } else { $sql = 'call sp_get_derogations(?, ?, ?, ?, ?)'; } $resultat = $this->executerRequete($sql, array($codePrestataire, $codeDerogation, $codeReponseDerogation, $debut, $fin)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function requetesdemandederogation($codePrestataire, $dateDemande1, $dateDemande2, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation1, $numeroDerogation2, $codeDerogation, $codeReponseDerogation, $adherent, $beneficiaire) { $codePrestataire = contruireParamLike($codePrestataire); $numeroAdherent = contruireParamLike($numeroAdherent); $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); $codeDerogation = contruireParamLike($codeDerogation); $codeReponseDerogation = contruireParamLike($codeReponseDerogation); $adherent = contruireParamLike($adherent); $beneficiaire = contruireParamLike($beneficiaire); $sql = 'call sp_requetes_demande_derogation(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; $resultat = $this->executerRequete($sql, array($codePrestataire, $dateDemande1, $dateDemande2, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation1, $numeroDerogation2, $codeDerogation, $codeReponseDerogation, $adherent, $beneficiaire)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function requetesdemandederogationtotal($codePrestataire, $dateDemande1, $dateDemande2, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation1, $numeroDerogation2, $codeDerogation, $codeReponseDerogation, $adherent, $beneficiaire) { $codePrestataire = contruireParamLike($codePrestataire); $numeroAdherent = contruireParamLike($numeroAdherent); $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); $codeDerogation = contruireParamLike($codeDerogation); $codeReponseDerogation = contruireParamLike($codeReponseDerogation); $adherent = contruireParamLike($adherent); $beneficiaire = contruireParamLike($beneficiaire); $sql = 'call sp_requetes_demande_derogation_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; $resultat = $this->executerRequete($sql, array($codePrestataire, $dateDemande1, $dateDemande2, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation1, $numeroDerogation2, $codeDerogation, $codeReponseDerogation, $adherent, $beneficiaire)); return $resultat->fetch(PDO::FETCH_ASSOC); } public function requetesdemandederogationexport($codePrestataire, $dateDemande1, $dateDemande2, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation1, $numeroDerogation2, $codeDerogation, $codeReponseDerogation, $adherent, $beneficiaire) { $codePrestataire = contruireParamLike($codePrestataire); $numeroAdherent = contruireParamLike($numeroAdherent); $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); $codeDerogation = contruireParamLike($codeDerogation); $codeReponseDerogation = contruireParamLike($codeReponseDerogation); $adherent = contruireParamLike($adherent); $beneficiaire = contruireParamLike($beneficiaire); if (est_anglophone()) { $sql = 'call sp_requetes_demande_derogation_export_eng(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; } else { $sql = 'call sp_requetes_demande_derogation_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; } $resultat = $this->executerRequete($sql, array($codePrestataire, $dateDemande1, $dateDemande2, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation1, $numeroDerogation2, $codeDerogation, $codeReponseDerogation, $adherent, $beneficiaire)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getderogationpermanente($idBeneficiaire) { $sql = 'call sp_get_derogations_permanente(?)'; $resultat = $this->executerRequete($sql, array($idBeneficiaire)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function desactiverderogationpermanente($idBeneficiaire, $observations) { $user = $_SESSION['login']; $sql = 'call sp_r_desactiver_derogation_permananente(?, ?, ?)'; $this->executerRequete($sql, array($idBeneficiaire, $observations, $user)); } public function activerderogationpermanente($idBeneficiaire, $observations) { $user = $_SESSION['login']; $sql = 'call sp_r_activer_derogation_permananente(?, ?, ?)'; $this->executerRequete($sql, array($idBeneficiaire, $observations, $user)); } }