mailcron = new Envoimailcron(); $mailaenvoyer = $this->mailcron->getmailaenvoyer(); $this->idMail = $mailaenvoyer['idMail']; $this->typeMail = $mailaenvoyer['typeMail']; $this->numeroBon = $mailaenvoyer['numeroBon']; $this->numeroFeuilleMaladie = $mailaenvoyer['numeroFeuilleMaladie']; $this->codePrestataire = $mailaenvoyer['codePrestataire']; $this->codeTypeBon = $mailaenvoyer['codeTypeBon']; $this->quantite = $mailaenvoyer['quantite']; $this->prestataire = $mailaenvoyer['prestataire']; $this->noDepart = $mailaenvoyer['noDepart']; $this->noFin = $mailaenvoyer['noFin']; $this->idBon = $mailaenvoyer['idBon']; $this->codeDerogation = $mailaenvoyer['codeDerogation']; $this->observations = $mailaenvoyer['observations']; $this->idBeneficiaire = $mailaenvoyer['idBeneficiaire']; $this->codeActe = $mailaenvoyer['codeActe']; $this->receptionnaire = $mailaenvoyer['receptionnaire']; $this->idDemandederogation = $mailaenvoyer['idDemandederogation']; $this->idDemandeententeprealable = $mailaenvoyer['idDemandeententeprealable']; $this->idDemandeautorisation = $mailaenvoyer['idDemandeautorisation']; $this->montant = format_N($mailaenvoyer['montant']); $this->envoye = $mailaenvoyer['envoye']; $this->dateSysteme = $mailaenvoyer['dateSysteme']; $this->heureCourante = dateheureFr($mailaenvoyer['dateSysteme']); $this->prestataireMail = $mailaenvoyer['prestataireMail']; $this->codeLanguePrestataire = $mailaenvoyer['codeLanguePrestataire']; } public function charger_les_mails($nbMail) { require_once 'Envoimailcron.php'; $this->mailcron = new Envoimailcron(); $this->lesMails = $this->mailcron->get_les_mails_aenvoyer($nbMail); } public function marquermail($idMail, $etat) { require_once 'Envoimailcron.php'; $this->mailcron = new Envoimailcron(); $mailaenvoyer = $this->mailcron->marquermail($idMail, $etat); } public function chargersociete() { require_once 'Societeuser.php'; $this->societe = new Societeuser(); $societe = $this->societe->getparametressociete(); $this->emailMedecinConseil = $societe['emailMedecinConseil']; $this->emailGestionBon = $societe['emailGestionBon']; $this->emailCcomptabilite = $societe['emailCcomptabilite']; $this->emailDerogation = $societe['emailDerogation']; $this->emailAccordPrealable = $societe['emailAccordPrealable']; $this->emailFraudeFinger = $societe['emailFraudeFinger']; $this->email_standard = $societe['email_standard']; $this->devise = $societe['devise']; $this->nomProduitSante = $societe['nomProduitSante']; $this->nbMailParCron = $societe['nbMailParCron']; $this->codeLangueSociete = $societe['codeLangueSociete']; $this->emailAdherent = ""; $this->codePrestataire = ""; } public function chargerprestataire($codePrestataire) { require_once 'Prestataire.php'; $this->societeprestataire = new Prestataire(); $societeprestataire = $this->societeprestataire->getPrestataireCode($codePrestataire); $this->codePrestataire = $societeprestataire['codePrestataire']; $this->prestataire = $societeprestataire['prestataire']; $this->codeReseauPrestataire = $societeprestataire['codeReseauPrestataire']; $this->codeTypePrestataire = $societeprestataire['codeTypePrestataire']; $this->reseausoinPrestataire = $societeprestataire['reseausoinPrestataire']; $this->emailGestionPrestataire = $societeprestataire['emailGestionPrestataire']; $this->codeTarifMedicament = $societeprestataire['codeTarifMedicament']; $this->codeTarifOptique = $societeprestataire['codeTarifOptique']; $this->codeTarifActe = $societeprestataire['codeTarifActe']; $this->codeLanguePrestataire = $societeprestataire['codeLanguePrestataire']; } public function chargerinfosbon($codeTypeBon) { require_once 'Typebon.php'; $this->typebon = new Typebon(); $infoTypeBon = $this->typebon->getInfos($codeTypeBon); $this->libelletypebon = $infoTypeBon['libelle']; $this->libelletypebonEng= $infoTypeBon['libelleEng']; } public function chargerinfosderogation($codeDerogation) { require_once 'Derogation.php'; $this->derogation = new Derogation(); $infoderogation = $this->derogation->getInfos($codeDerogation); $this->libellederogation = $infoderogation['libelle']; $this->libellederogationEng = $infoderogation['libelleEng']; } public function chargerinfosdemandederogation($idDemandederogation) { require_once 'Derogation.php'; $this->derogation = new Derogation(); $infosdemandederogation = $this->derogation->getinfosDerogation($idDemandederogation); $this->idDemandederogation = $infosdemandederogation['idDemandederogation']; $this->codeDerogation = $infosdemandederogation['codeDerogation']; $this->dateDemande = dateheureFr($infosdemandederogation['dateSysteme']); $this->prestataire = $infosdemandederogation['prestataire']; $this->codePrestataire = $infosdemandederogation['codePrestataire']; $this->libelleDerogation = $infosdemandederogation['libelleDerogation']; $this->libelleDerogationEng = $infosdemandederogation['libelleDerogationEng']; $this->numeroBeneficiaire = $infosdemandederogation['numeroBeneficiaire']; $this->beneficiaire = $infosdemandederogation['beneficiaire']; $this->numeroDerogation = $infosdemandederogation['numeroDerogation']; $this->motivations = $infosdemandederogation['observations']; $this->dateReponse = dateheureFr($infosdemandederogation['dateReponse']); $this->codeReponseDerogation = $infosdemandederogation['codeReponseDerogation']; $this->responsableDerogation = $infosdemandederogation['responsableDerogation']; $this->motifRefusAssure = $infosdemandederogation['motifRefusAssure']; $this->debut = dateFr($infosdemandederogation['debut']); $this->fin = dateFr($infosdemandederogation['fin']); $this->montant = $infosdemandederogation['montant']; $this->tmDerogation = $infosdemandederogation['tmDerogation']; $this->emailGestionPrestataire = $infosdemandederogation['emailGestionPrestataire']; $this->emailAdherent = $infosdemandederogation['emailAdherent']; } public function chargerinfosententeprealable($idDemandeententeprealable) { require_once 'Ententeprealable.php'; $this->ententeprealable = new Ententeprealable(); $infosententeprealable = $this->ententeprealable->getinfosEntenteprealable($idDemandeententeprealable); $this->idDemandeententeprealable = $infosententeprealable['idDemandeententeprealable']; $this->dateDemande = dateheureFr($infosententeprealable['dateSysteme']); $this->prestataire = $infosententeprealable['prestataire']; $this->libelleActe = $infosententeprealable['libelleActe']; $this->numeroBeneficiaire = $infosententeprealable['numeroBeneficiaire']; $this->numeroFeuilleMaladie = $infosententeprealable['numeroFeuilleMaladie']; $this->beneficiaire = $infosententeprealable['beneficiaire']; $this->numeroEntentePrealable = $infosententeprealable['numeroEntentePrealable']; $this->motivations = $infosententeprealable['observations']; $this->dateReponse = dateheureFr($infosententeprealable['dateReponse']); $this->codeReponseEntentePrealable = $infosententeprealable['codeReponseEntentePrealable']; $this->reponsentEnteprealable = $infosententeprealable['reponsentEnteprealable']; $this->reponsentEnteprealableEng = $infosententeprealable['reponsentEnteprealableEng']; $this->responsableAccord = $infosententeprealable['responsableAccord']; $this->motifRefusAssure = $infosententeprealable['motifRefusAssure']; $this->emailGestionPrestataire = $infosententeprealable['emailGestionPrestataire']; $this->emailAdherent = $infosententeprealable['emailAdherent']; } public function chargerinfosententeprealablepha($idDemandeententeprealable) { require_once 'Ententeprealable.php'; $this->ententeprealable = new Ententeprealable(); $infosententeprealable = $this->ententeprealable->getinfosEntenteprealablepha($idDemandeententeprealable); $this->idDemandeententeprealable = $infosententeprealable['idDemandeententeprealable']; $this->dateDemande = dateheureFr($infosententeprealable['dateSysteme']); $this->prestataire = $infosententeprealable['prestataire']; $this->libelleActe = $infosententeprealable['libelleMedicament']; $this->libelleMedicament = $infosententeprealable['libelleMedicament']; $this->numeroBeneficiaire = $infosententeprealable['numeroBeneficiaire']; $this->numeroFeuilleMaladie = $infosententeprealable['numeroFeuilleMaladie']; $this->beneficiaire = $infosententeprealable['beneficiaire']; $this->numeroEntentePrealable = $infosententeprealable['numeroEntentePrealable']; $this->motivations = $infosententeprealable['observations']; $this->dateReponse = dateheureFr($infosententeprealable['dateReponse']); $this->codeReponseEntentePrealable = $infosententeprealable['codeReponseEntentePrealable']; $this->reponsentEnteprealable = $infosententeprealable['reponsentEnteprealable']; $this->reponsentEnteprealableEng = $infosententeprealable['reponsentEnteprealableEng']; $this->responsableAccord = $infosententeprealable['responsableAccord']; $this->motifRefusAssure = $infosententeprealable['motifRefusAssure']; $this->emailGestionPrestataire = $infosententeprealable['emailGestionPrestataire']; $this->emailAdherent = $infosententeprealable['emailAdherent']; } public function chargerinfosententeprealableopt($idDemandeententeprealable) { require_once 'Ententeprealable.php'; $this->ententeprealable = new Ententeprealable(); $infosententeprealable = $this->ententeprealable->getinfosEntenteprealableopt($idDemandeententeprealable); $this->idDemandeententeprealable = $infosententeprealable['idDemandeententeprealable']; $this->dateDemande = dateheureFr($infosententeprealable['dateSysteme']); $this->prestataire = $infosententeprealable['prestataire']; $this->libelleActe = $infosententeprealable['libelleOptique']; $this->libelleOptique = $infosententeprealable['libelleOptique']; $this->numeroBeneficiaire = $infosententeprealable['numeroBeneficiaire']; $this->numeroFeuilleMaladie = $infosententeprealable['numeroFeuilleMaladie']; $this->beneficiaire = $infosententeprealable['beneficiaire']; $this->numeroEntentePrealable = $infosententeprealable['numeroEntentePrealable']; $this->motivations = $infosententeprealable['observations']; $this->dateReponse = dateheureFr($infosententeprealable['dateReponse']); $this->codeReponseEntentePrealable = $infosententeprealable['codeReponseEntentePrealable']; $this->reponsentEnteprealable = $infosententeprealable['reponsentEnteprealable']; $this->reponsentEnteprealableEng = $infosententeprealable['reponsentEnteprealableEng']; $this->responsableAccord = $infosententeprealable['responsableAccord']; $this->motifRefusAssure = $infosententeprealable['motifRefusAssure']; $this->emailGestionPrestataire = $infosententeprealable['emailGestionPrestataire']; $this->emailAdherent = $infosententeprealable['emailAdherent']; } public function chargerinfosententeprealablemont($idDemandeententeprealable) { require_once 'Ententeprealable.php'; $this->ententeprealable = new Ententeprealable(); $infosententeprealable = $this->ententeprealable->getinfosEntenteprealablemont($idDemandeententeprealable); $this->idDemandeententeprealable = $infosententeprealable['idDemandeententeprealable']; $this->dateDemande = dateheureFr($infosententeprealable['dateSysteme']); $this->prestataire = $infosententeprealable['prestataire']; $this->libelleActe = $infosententeprealable['libelleOptique']; $this->libelleOptique = $infosententeprealable['libelleOptique']; $this->numeroBeneficiaire = $infosententeprealable['numeroBeneficiaire']; $this->numeroFeuilleMaladie = $infosententeprealable['numeroFeuilleMaladie']; $this->beneficiaire = $infosententeprealable['beneficiaire']; $this->numeroEntentePrealable = $infosententeprealable['numeroEntentePrealable']; $this->motivations = $infosententeprealable['observations']; $this->dateReponse = dateheureFr($infosententeprealable['dateReponse']); $this->codeReponseEntentePrealable = $infosententeprealable['codeReponseEntentePrealable']; $this->reponsentEnteprealable = $infosententeprealable['reponsentEnteprealable']; $this->reponsentEnteprealableEng = $infosententeprealable['reponsentEnteprealableEng']; $this->responsableAccord = $infosententeprealable['responsableAccord']; $this->motifRefusAssure = $infosententeprealable['motifRefusAssure']; $this->emailGestionPrestataire = $infosententeprealable['emailGestionPrestataire']; $this->emailAdherent = $infosententeprealable['emailAdherent']; } public function chargerinfosautorisation($idDemandeautorisation) { require_once 'Ententeprealable.php'; $this->ententeprealable = new Ententeprealable(); $infosententeprealable = $this->ententeprealable->getinfosAutorisation($idDemandeautorisation); $this->idDemandeautorisation = $infosententeprealable['idDemandeautorisation']; $this->dateDemande = dateheureFr($infosententeprealable['dateSysteme']); $this->prestataire = $infosententeprealable['prestataire']; $this->libelleActe = $infosententeprealable['libelleActe']; $this->numeroBeneficiaire = $infosententeprealable['numeroBeneficiaire']; $this->numeroFeuilleMaladie = $infosententeprealable['numeroFeuilleMaladie']; $this->beneficiaire = $infosententeprealable['beneficiaire']; $this->numeroAutorisation = $infosententeprealable['numeroAutorisation']; $this->motivations = $infosententeprealable['observations']; $this->dateReponse = dateheureFr($infosententeprealable['dateReponse']); $this->codeReponseAutorisation = $infosententeprealable['codeReponseAutorisation']; $this->reponseAutorisation = $infosententeprealable['reponseAutorisation']; $this->responsableAccord = $infosententeprealable['responsableAccord']; $this->motifRefusAssure = $infosententeprealable['motifRefusAssure']; $this->emailGestionPrestataire = $infosententeprealable['emailGestionPrestataire']; $this->emailAdherent = $infosententeprealable['emailAdherent']; $this->prixTarif = format_N($infosententeprealable['prixTarif']); $this->valeurActe = format_N($infosententeprealable['valeurActe']); } public function chargerinfosacte($codeActe) { require_once 'Acte.php'; $this->acte = new Acte(); $infoacte = $this->acte->getInfos($codeActe); $this->libelleacte = $infoacte['libelle']; } public function chargerbonpec($idBon) { require_once 'Typebon.php'; $this->typebon = new Typebon(); $bonpec = $this->typebon->getbonpec($idBon) ; $this->idBon = $bonpec['idBon']; $this->codeTypeBon = $bonpec['codeTypeBon']; $this->typebon = $bonpec['typebon']; $this->libelleTypebon = $bonpec['typebon']; $this->libelleTypebonEng = $bonpec['typebonEng']; $this->numeroBon = $bonpec['numeroBon']; $this->codeEtatBon = $bonpec['codeEtatBon']; $this->etatbon = $bonpec['etatbon']; $this->motifAnnulation = $bonpec['motifAnnulation']; $this->motifAnnulation = $bonpec['motifAnnulation']; $this->numeroFeuilleMaladie = $bonpec['numeroFeuilleMaladie']; $this->numeroPrescription = $bonpec['numeroPrescription']; $this->numeroBonConsultation = $bonpec['numeroBonConsultation']; $this->numeroBonOrdonnance = $bonpec['numeroBonOrdonnance']; $this->numeroBonHospitalisation = $bonpec['numeroBonHospitalisation']; $this->hospitalisation = $bonpec['hospitalisation']; $this->numeroChambre = $bonpec['numeroChambre']; $this->numeroBonOptique = $bonpec['numeroBonOptique']; $this->numeroOptique = $bonpec['numeroOptique']; $this->codePrestataire = $bonpec['codePrestataire']; $this->prestataire = $bonpec['prestataire']; $this->numeroBeneficiaire = $bonpec['numeroBeneficiaire']; $this->adherent = $bonpec['adherent']; $this->emailAdherent = $bonpec['emailAdherent']; } public function chargerbeneficiaire($idBeneficiaire) { require_once 'Beneficiaire.php'; $this->personne = new Beneficiaire(); $personne = $this->personne->getInfosBeneficiaire($idBeneficiaire); $this->idBeneficiaire = $personne['idBeneficiaire']; $this->idAdherent = $personne['idAdherent']; $this->numeroAdherent = $personne['numeroAdherent']; $this->numeroBeneficiaire = $personne['numeroBeneficiaire']; $this->adherent = $personne['adherent']; $this->beneficiaire = $personne['beneficiaire']; $this->emailAdherent = $personne['emailAdherent']; } public function chargerfeuillemaladie($numeroFeuilleMaladie) { require_once 'Feuillemaladie.php'; require_once 'Societeuser.php'; $this->societe = new Societeuser(); $societe = $this->societe->getparametressociete(); $this->emailMedecinConseil = $societe['emailMedecinConseil']; $this->emailGestionBon = $societe['emailGestionBon']; $this->emailCcomptabilite = $societe['emailCcomptabilite']; $this->emailDerogation = $societe['emailDerogation']; $this->emailAccordPrealable = $societe['emailAccordPrealable']; $this->emailFraudeFinger = $societe['emailFraudeFinger']; $this->email_standard = $societe['email_standard']; $this->feuillemaladie = new Feuillemaladie(); $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); $this->numeroFeuilleMaladie = $numeroFeuilleMaladie; $this->prestataire = $feuillemaladie['prestataire']; $this->numeroBeneficiaire = $feuillemaladie['numeroBeneficiaire']; $this->beneficiaire = $feuillemaladie['beneficiaire']; $this->adherent = $facture['adherent']; $this->emailAdherent = $feuillemaladie['emailAdherent']; $this->numeroPrescription = $feuillemaladie['numeroPrescription']; $this->numeroBonConsultation = $feuillemaladie['numeroBonConsultation']; $this->numeroBonOrdonnance = $feuillemaladie['numeroBonOrdonnance']; $this->numeroBonHospitalisation = $feuillemaladie['numeroBonHospitalisation']; $this->hospitalisation = $feuillemaladie['hospitalisation']; $this->numeroChambre = $feuillemaladie['numeroChambre']; $this->numeroBonOptique = $feuillemaladie['numeroBonOptique']; $this->numeroOptique = $feuillemaladie['numeroOptique']; $this->fraisReel = $feuillemaladie['fraisReel']; $this->cout = $feuillemaladie['fraisReel']; $this->montantTm = $feuillemaladie['montantTm']; $this->montantArembourser = $feuillemaladie['montantArembourser']; $this->fraisExclu = $feuillemaladie['fraisExclu']; $this->fraisRetenu = $feuillemaladie['fraisRetenu']; $this->montantRembourse = $feuillemaladie['montantRembourse']; } public function chargerfacture($numeroFeuilleMaladie, $codePrestataire) { require_once 'Facture.php'; require_once 'Societeuser.php'; $this->societe = new Societeuser(); $societe = $this->societe->getparametressociete(); $this->emailMedecinConseil = $societe['emailMedecinConseil']; $this->emailGestionBon = $societe['emailGestionBon']; $this->emailCcomptabilite = $societe['emailCcomptabilite']; $this->emailDerogation = $societe['emailDerogation']; $this->emailAccordPrealable = $societe['emailAccordPrealable']; $this->emailFraudeFinger = $societe['emailFraudeFinger']; $this->email_standard = $societe['email_standard']; $this->facture = new Facture(); $facture = $this->facture->getfacturecron($numeroFeuilleMaladie, $codePrestataire); $this->numeroFeuilleMaladie = $numeroFeuilleMaladie; $this->numeroPrescription = $facture['numeroPrescription']; $this->numeroBonConsultation = $facture['numeroBonConsultation']; $this->numeroBonOrdonnance = $facture['numeroBonOrdonnance']; $this->numeroBonHospitalisation = $facture['numeroBonHospitalisation']; $this->hospitalisation = $facture['hospitalisation']; $this->numeroChambre = $facture['numeroChambre']; $this->numeroBonOptique = $facture['numeroBonOptique']; $this->numeroOptique = $facture['numeroOptique']; $this->numeroDecompte = $facture['numeroDecompte']; $this->prestataire = $facture['prestataire']; $this->numeroBeneficiaire = $facture['numeroBeneficiaire']; $this->beneficiaire = $facture['beneficiaire']; $this->adherent = $facture['adherent']; $this->emailAdherent = $facture['emailAdherent']; $this->fraisReel = $facture['fraisReel']; $this->cout = $facture['fraisReel']; $this->montantTm = $facture['montantTm']; $this->montantArembourser = $facture['montantArembourser']; $this->fraisExclu = $facture['fraisExclu']; $this->fraisRetenu = $facture['fraisRetenu']; $this->montantRembourse = $facture['montantRembourse']; $this->montantForce = $facture['montantForce']; $this->montantApayer = $facture['montantApayer']; $this->montantPaye = $facture['montantPaye']; $this->idFacture = $facture['idFacture']; } public function traiterdestinationmail() { require_once 'Ebenegmail.php'; // $this->email = $mail; $this->email = $_SESSION['c_mail']; } public function envoyerlemail() { $this->email->ClearAllRecipients(); $this->email->clearAttachments(); if($this->emailDestination<=" ") { $this->emailDestination = "gmebene@gmail.com"; } // var_dump($this->idMail." => emailDestination => ".$this->emailDestination); $this->body = $this->body; $addr = explode(';', $this->emailDestination); foreach ($addr as $ad) { $this->email->AddAddress(trim($ad) ); } $this->email->Subject = $this->objet; $this->email->Body = $this->body; // var_dump("idMail => ".$this->idMail); // var_dump("emailDestination => ".$this->emailDestination); // var_dump("objet => ".$this->objet); if(!$this->email->send()) { $this->marquermail($this->idMail, "9"); } else { $this->marquermail($this->idMail, "1"); } } public function envoyer_les_mails() { $this->traiterdestinationmail(); $lesMails = $this->lesMails; // var_dump($lesMails); // exit(); foreach ($lesMails as $un_mail) { $this->idMail = $un_mail['idMail']; $this->typeMail = $un_mail['typeMail']; $this->numeroBon = $un_mail['numeroBon']; $this->numeroFeuilleMaladie = $un_mail['numeroFeuilleMaladie']; $this->codePrestataire = $un_mail['codePrestataire']; $this->codeTypeBon = $un_mail['codeTypeBon']; $this->quantite = $un_mail['quantite']; $this->prestataire = $un_mail['prestataire']; $this->noDepart = $un_mail['noDepart']; $this->noFin = $un_mail['noFin']; $this->idBon = $un_mail['idBon']; $this->codeDerogation = $un_mail['codeDerogation']; $this->observations = $un_mail['observations']; $this->idBeneficiaire = $un_mail['idBeneficiaire']; $this->codeActe = $un_mail['codeActe']; $this->receptionnaire = $un_mail['receptionnaire']; $this->idDemandederogation = $un_mail['idDemandederogation']; $this->idDemandeententeprealable = $un_mail['idDemandeententeprealable']; $this->idDemandeautorisation = $un_mail['idDemandeautorisation']; $this->montant = format_N($un_mail['montant']); $this->envoye = $un_mail['envoye']; $this->dateSysteme = $un_mail['dateSysteme']; $this->heureCourante = dateheureFr($un_mail['dateSysteme']); $this->prestataireMail = $un_mail['prestataireMail']; $this->codeLanguePrestataire = $un_mail['codeLanguePrestataire']; $typeMail = $this->typeMail; $numeroFeuilleMaladie = $this->numeroFeuilleMaladie; $idMail = $this->idMail; $numeroBon = $this->numeroBon; $codePrestataire = $this->codePrestataire; $codeTypeBon = $this->codeTypeBon; $quantite = $this->quantite; $prestataire = $this->prestataire; $noDepart = $this->noDepart; $noFin = $this->noFin; $idBon = $this->idBon; $codeDerogation = $this->codeDerogation; $observations = $this->observations; $idBeneficiaire = $this->idBeneficiaire; $codeActe = $this->codeActe; $receptionnaire = $this->receptionnaire; $idDemandederogation = $this->idDemandederogation; $idDemandeententeprealable = $this->idDemandeententeprealable; $idDemandeautorisation = $this->idDemandeautorisation; $montant = $this->montant; $envoye = $this->envoye; $dateSysteme = $this->dateSysteme; $heureCourante = $this->heureCourante; // var_dump($un_mail); // var_dump("typeMail => ".$this->idMail." => ".$typeMail); if ($typeMail == 'mailgenererbon') { $this->mailgenererbon($codeTypeBon, $noDepart, $noFin, $receptionnaire, $codePrestataire, $heureCourante); } if ($typeMail == 'refusderogation') { $this->mailrefusderogation($idDemandederogation, $heureCourante); } if ($typeMail == 'accordderogation') { $this->mailaccordderogation($idDemandederogation, $heureCourante); } if ($typeMail == 'fraisfuneraire') { $this->mailfraisfuneraire($idBeneficiaire, $montant, $heureCourante); } if ($typeMail == 'refusententeprealable') { $this->mailrefusententeprealable($idDemandeententeprealable, $heureCourante); } if ($typeMail == 'accordententeprealable') { $this->mailaccordententeprealable($idDemandeententeprealable, $heureCourante); } if ($typeMail == 'accordacteexclu') { $this->mailaccordacteexclu($idDemandeautorisation, $heureCourante); } if ($typeMail == 'refusacteexclu') { $this->mailrefusacteexclu($idDemandeautorisation, $heureCourante); } if ($typeMail == 'accordententeprealablepha') { $this->mailaccordententeprealablepha($idDemandeententeprealable, $heureCourante); } if ($typeMail == 'refusententeprealablepha') { $this->mailrefusententeprealablepha($idDemandeententeprealable, $heureCourante); } // OPT if ($typeMail == 'accordententeprealableopt') { $this->mailaccordententeprealableopt($idDemandeententeprealable, $heureCourante); } if ($typeMail == 'refusententeprealableopt') { $this->mailrefusententeprealableopt($idDemandeententeprealable, $heureCourante); } // MONT if ($typeMail == 'accordententeprealablemont') { $this->mailaccordententeprealablemont($idDemandeententeprealable, $heureCourante); } if ($typeMail == 'refusententeprealablemont') { $this->mailrefusententeprealablemont($idDemandeententeprealable, $heureCourante); } // sleep(3); usleep(2000); // Stoppe pour 2 millisecondes } } public function mailgenererbon($codeTypeBon, $noDepart, $noFin, $receptionnaire, $codePrestataire, $heureCourante) { $this->chargerprestataire($codePrestataire); $this->chargerinfosbon($codeTypeBon); $this->emailDestination = $this->emailGestionPrestataire; if($this->codeLanguePrestataire=="en_US") { $this->objet = "ATTRIBUTION OF CLAIMS FORMS : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Date : ".$heureCourante." - Range : ".$noDepart." - ".$noFin." - Type of forms : ".$this->libelletypebonEng." - Receiver : ".$receptionnaire." Thank you and good reception."; } else { $this->objet = "ATTRIBUTION DE BONS DE PEC : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Date : ".$heureCourante." - Plage : ".$noDepart." - ".$noFin." - Type de bons : ".$this->libelletypebon." - Réceptionnaire : ".$receptionnaire." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailaccordderogation($idDemandederogation, $heureCourante) { $this->chargerinfosdemandederogation($idDemandederogation); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } $tm=""; if($this->codeDerogation=="01") { $tm="- Ticket Modérateur / User Fees : ".$this->tmDerogation." % "; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "EXEMPTION AGREEMENT : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Exemption : ".$this->libelleDerogationEng." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroDerogation." - Motivations : ".$this->motivations." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableDerogation." - Token life from : ".$this->debut." to ".$this->fin." Thank you and good reception."; } else { $this->objet = "ACCORD DE DEROGATION : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Dérogation : ".$this->libelleDerogation." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroDerogation." - Motivations : ".$this->motivations." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableDerogation." - Vie du jeton du : ".$this->debut." au ".$this->fin." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailrefusderogation($idDemandederogation, $heureCourante) { $this->chargerinfosdemandederogation($idDemandederogation); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "REFUSAL OF EXEMPTION : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Exemption : ".$this->libelleDerogationEng." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroDerogation." - Motivations : ".$this->motivations." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableDerogation." - Reason for refusal : ".$this->motifRefusAssure." Thank you and good reception."; } else { $this->objet = "REFUS DE DEROGATION : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Dérogation : ".$this->libelleDerogation." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroDerogation." - Motivations : ".$this->motivations." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableDerogation." - Motis du refus : ".$this->motifRefusAssure." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailfraisfuneraire($idBeneficiaire, $montant, $heureCourante) { $this->chargerbeneficiaire($idBeneficiaire); $this->emailDestination = $this->emailCcomptabilite; // Propre à ce mail => non fonctorisable if($this->codeLangueSociete=="en_US") { $this->objet = "REQUEST FOR FUNERAL FEES : ".$this->nomProduitSante; $this->body = "- Insured : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Date : ".$heureCourante." - Amount : ".$this->montant." ".$this->devise." Thank you and good reception."; } else { $this->objet = "DEMANDE DE FRAIS FUNERAIRES : ".$this->nomProduitSante; $this->body = "- Assuré : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Date : ".$heureCourante." - Montant : ".$this->montant." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailaccordententeprealable($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealable($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "ACT AGREEMENT : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Act : ".$this->libelleActe." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception."; } else { $this->objet = "ACCORD ACTE : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Acte : ".$this->libelleActe." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailrefusententeprealable($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealable($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "REFUSAL ACT : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Act : ".$this->libelleActe." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." - Motis of refusal : ".$this->motifRefusAssure." Thank you and good reception."; } else { $this->objet = "REFUS ACTE : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Acte : ".$this->libelleActe." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." - Motis du refus : ".$this->motifRefusAssure." Merci et bonne réception."; } $this->envoyerlemail(); } // public function mailaccordacteexclu($idDemandeautorisation, $heureCourante) { $this->chargerinfosautorisation($idDemandeautorisation); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } // Propre à ce mail => non fonctorisable $this->objet = "ACCORD ACTE EXCLU : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Acte : ".$this->libelleActe." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroAutorisation." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." - Tarif Coventionné : ".$this->prixTarif." - Tarif accordé : ".$this->valeurActe." Merci et bonne réception."; $this->envoyerlemail(); } public function mailrefusacteexclu($idDemandeautorisation, $heureCourante) { $this->chargerinfosautorisation($idDemandeautorisation); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } // Propre à ce mail => non fonctorisable $this->objet = "REFUS ACTE EXCLU : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Acte : ".$this->libelleActe." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroAutorisation." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." - Motis du refus : ".$this->motifRefusAssure." Merci et bonne réception."; $this->envoyerlemail(); } // 24/01/2019 mails accoirs préalables PHA, OPT et MONT public function mailaccordententeprealablepha($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealablepha($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "DRUG AGREEMENT : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Drug : ".$this->libelleMedicament." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception."; } else { $this->objet = "ACCORD MEDICAMENT : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Medicament : ".$this->libelleMedicament." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailrefusententeprealablepha($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealablepha($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "REFUSAL DRUG : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Drug : ".$this->libelleMedicament." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception."; } else { $this->objet = "REFUS MEDICAMENT : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Ledicament : ".$this->libelleMedicament." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } // OPT public function mailaccordententeprealableopt($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealableopt($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "OPTICAL GLASSES AGREEMENT : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Glasses : ".$this->libelleOptique." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception."; } else { $this->objet = "ACCORD OPTIQUE / VERRES : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Verres : ".$this->libelleOptique." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailrefusententeprealableopt($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealableopt($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "REFUSAL OPTICAL GLASSES : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Glasses: ".$this->libelleOptique." - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer: ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception."; } else { $this->objet = "REFUS OPTIQUE / VERRES : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Verres : ".$this->libelleOptique." - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } // FIN OPT // MONT public function mailaccordententeprealablemont($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealablemont($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "OPTICAL FRAMES AGREEMENT : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception.";; } else { $this->objet = "ACCORD MONTURE : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } public function mailrefusententeprealablemont($idDemandeententeprealable, $heureCourante) { $this->chargerinfosententeprealablemont($idDemandeententeprealable); $this->emailDestination = $this->emailGestionPrestataire; if($this->emailAdherent>" ") { $this->emailDestination .= ";".$this->emailAdherent; } if($this->codeLanguePrestataire=="en_US") { $this->objet = "REFUSAL OPTICAL FRAMES : ".$this->nomProduitSante; $this->body = "- Provider : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Date Request : ".$this->dateDemande." - Request No : ".$this->numeroEntentePrealable." - Date Answer : ".$heureCourante." - Answered by : ".$this->responsableAccord." Thank you and good reception."; } else { $this->objet = "REFUS MONTURE : ".$this->nomProduitSante; $this->body = "- Prestataire : ".$this->prestataire." - Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.") - Date Demande : ".$this->dateDemande." - N° Demande : ".$this->numeroEntentePrealable." - Date Réponse : ".$heureCourante." - Répondu par : ".$this->responsableAccord." Merci et bonne réception."; } $this->envoyerlemail(); } // FIN MONT }