1086 lines
32 KiB
PHP
Executable File
1086 lines
32 KiB
PHP
Executable File
<?php
|
|
require_once 'Functions.php';
|
|
|
|
class Cronenvoimail
|
|
{
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
public function chargermail()
|
|
{
|
|
require_once 'Envoimailcron.php';
|
|
|
|
$this->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->envoye = $mailaenvoyer['envoye'];
|
|
$this->dateSysteme = $mailaenvoyer['dateSysteme'];
|
|
$this->heureCourante = dateheureFr($mailaenvoyer['dateSysteme']);
|
|
$this->numeroBonOptique = $mailaenvoyer['numeroBonOptique'];
|
|
$this->prestataireMail = $mailaenvoyer['prestataireMail'];
|
|
$this->codeMedicament = $mailaenvoyer['codeMedicament'];
|
|
$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);
|
|
|
|
//var_dump($this->lesMails);
|
|
//exit();
|
|
}
|
|
|
|
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 = "";
|
|
}
|
|
|
|
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 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->numeroBonExamen = $bonpec['numeroBonExamen'];
|
|
$this->numeroExamen = $bonpec['numeroExamen'];
|
|
|
|
$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 = $feuillemaladie['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->numeroBonExamen = $feuillemaladie['numeroBonExamen'];
|
|
$this->numeroExamen = $feuillemaladie['numeroExamen'];
|
|
|
|
$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->numeroBonExamen = $facture['numeroBonExamen'];
|
|
$this->numeroExamen = $facture['numeroExamen'];
|
|
|
|
$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 chargerinfosnewverres($numeroBonOptique, $codePrestataire)
|
|
{
|
|
require_once 'Acte.php';
|
|
|
|
$this->acte = new Acte();
|
|
$infoacte = $this->acte->getInfosNewVerres($numeroBonOptique, $codePrestataire);
|
|
$this->libelleOptique = $infoacte['libelleOptique'];
|
|
}
|
|
|
|
|
|
public function chargerinfosmonture($idBeneficiaire, $codePrestataire)
|
|
{
|
|
require_once 'Acte.php';
|
|
|
|
$this->acte = new Acte();
|
|
$infoacte = $this->acte->getInfosMonture($idBeneficiaire, $codePrestataire);
|
|
|
|
$this->idBeneficiaire = $infoacte['idBeneficiaire'];
|
|
$this->idAdherent = $infoacte['idAdherent'];
|
|
$this->numeroAdherent = $infoacte['numeroAdherent'];
|
|
$this->numeroBeneficiaire = $infoacte['numeroBeneficiaire'];
|
|
$this->adherent = $infoacte['adherent'];
|
|
$this->beneficiaire = $infoacte['beneficiaire'];
|
|
$this->emailAdherent = $infoacte['emailAdherent'];
|
|
$this->libelleMonture = "Monture";
|
|
$this->libelleMontureEng = "Optical Frames";
|
|
}
|
|
|
|
public function chargerinfosnewmedicament($numeroFeuilleMaladie, $codePrestataire, $codeMedicament)
|
|
{
|
|
require_once 'Acte.php';
|
|
|
|
$this->acte = new Acte();
|
|
$infoacte = $this->acte->getInfosNewMedicament($numeroFeuilleMaladie, $codePrestataire, $codeMedicament);
|
|
$this->libelleMedicament = $infoacte['libelleMedicament'];
|
|
}
|
|
|
|
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." => objet => ".$this->objet);
|
|
|
|
$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;
|
|
|
|
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->envoye = $un_mail['envoye'];
|
|
$this->dateSysteme = $un_mail['dateSysteme'];
|
|
$this->heureCourante = dateheureFr($un_mail['dateSysteme']);
|
|
$this->numeroBonOptique = $un_mail['numeroBonOptique'];
|
|
$this->prestataireMail = $un_mail['prestataireMail'];
|
|
$this->codeMedicament = $un_mail['codeMedicament'];
|
|
$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;
|
|
$envoye = $this->envoye;
|
|
$dateSysteme = $this->dateSysteme;
|
|
$heureCourante = $this->heureCourante;
|
|
$numeroBonOptique = $this->numeroBonOptique;
|
|
$codeMedicament = $this->codeMedicament;
|
|
|
|
if ($typeMail == 'mailhospitalisation')
|
|
{
|
|
$this->mailhospitalisation($numeroBon, $numeroFeuilleMaladie, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailfacturationfeuillemaladie')
|
|
{
|
|
$this->mailfacturationfeuillemaladie($numeroFeuilleMaladie, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailpharmacie')
|
|
{
|
|
$this->mailpharmacie($numeroFeuilleMaladie, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'maillabo')
|
|
{
|
|
$this->maillabo($numeroFeuilleMaladie, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailoptique')
|
|
{
|
|
$this->mailoptique($numeroFeuilleMaladie, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailcommandebon')
|
|
{
|
|
$this->mailcommandebon($codeTypeBon, $quantite, $prestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailreceptionbon')
|
|
{
|
|
$this->mailreceptionbon($codeTypeBon, $noDepart, $noFin, $prestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'maildemandeannulationbon')
|
|
{
|
|
$this->maildemandeannulationbon($idBon, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'maildemandederogation')
|
|
{
|
|
$this->maildemandederogation($codeDerogation, $observations, $prestataire, $idBeneficiaire, $heureCourante);
|
|
}
|
|
|
|
|
|
if ($typeMail == 'mailfraudeidentite')
|
|
{
|
|
$this->mailfraudeidentite($idBeneficiaire, $prestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealable')
|
|
{
|
|
$this->mailententeprealable($numeroFeuilleMaladie, $codeActe, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailautorisation')
|
|
{
|
|
$this->mailautorisation($numeroFeuilleMaladie, $codeActe, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealableopt')
|
|
{
|
|
$this->mailententeprealableopt($numeroFeuilleMaladie, $numeroBonOptique, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealablepha')
|
|
{
|
|
$this->mailententeprealablepha($numeroFeuilleMaladie, $codePrestataire, $codeMedicament, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealablemont')
|
|
{
|
|
$this->mailententeprealablemont($idBeneficiaire, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
// sleep(3);
|
|
usleep(2000); // Stoppe pour 2 millisecondes
|
|
}
|
|
}
|
|
|
|
public function mailhospitalisation($numeroBon, $numeroFeuilleMaladie, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->emailDestination = $this->emailMedecinConseil;
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "HOSPITALZATION NOTIFICATION : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Hospitalization form No : ".$numeroBon."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "ALERTE HOSPITALISATION : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Bon Hospitalisation : ".$numeroBon."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailfacturationfeuillemaladie($numeroFeuilleMaladie, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->emailDestination = $this->emailAdherent;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
$this->objet = "ALERTE CONSOMMATION : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Bon Consultation : ".$this->numeroBonConsultation."
|
|
|
|
- Coût : ".format_N($this->cout)." ".$this->devise."
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." ".$this->devise."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailpharmacie($numeroFeuilleMaladie, $codePrestataire, $heureCourante)
|
|
{
|
|
$this->chargerfacture($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$this->emailDestination = $this->emailAdherent;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
$this->objet = "ALERTE CONSOMMATION PHARMACIE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Ordonnance Pharamacie : ".$this->numeroBonOrdonnance."
|
|
|
|
- Acte : Pharmacie
|
|
|
|
- Coût : ".format_N($this->cout)." ".$this->devise."
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." ".$this->devise."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function maillabo($numeroFeuilleMaladie, $codePrestataire, $heureCourante)
|
|
{
|
|
$this->chargerfacture($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$this->emailDestination = $this->emailAdherent;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
$this->objet = "ALERTE CONSOMMATION LABORATOIRE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Ordonnance EXamen : ".$this->numeroBonExamen."
|
|
|
|
- Acte : Pharmacie
|
|
|
|
- Coût : ".format_N($this->cout)." ".$this->devise."
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." ".$this->devise."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailoptique($numeroFeuilleMaladie, $codePrestataire, $heureCourante)
|
|
{
|
|
$this->chargerfacture($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$this->emailDestination = $this->emailAdherent;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
$this->objet = "ALERTE CONSOMMATION OPTIQUE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Ordonnance Optique : ".$this->numeroBonOptique."
|
|
|
|
- Acte : Optique
|
|
|
|
- Coût : ".format_N($this->cout)." ".$this->devise."
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." ".$this->devise."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailcommandebon($codeTypeBon, $quantite, $prestataire, $heureCourante)
|
|
{
|
|
// $this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailGestionBon;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
$this->chargerinfosbon($codeTypeBon);
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "REQUEST FOR CLAIMS FORMS : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$prestataire."
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Quantity : ".$quantite."
|
|
|
|
- Type of form : ".$this->libelletypebonEng."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "DEMANDE DE BONS DE PEC : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$prestataire."
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Quantité : ".$quantite."
|
|
|
|
- Type de bon : ".$this->libelletypebon."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailreceptionbon($codeTypeBon, $noDepart, $noFin, $prestataire, $heureCourante)
|
|
{
|
|
// $this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailGestionBon;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
$this->chargerinfosbon($codeTypeBon);
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "CONFIRMATION RECEPTION OF FORMS : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$prestataire."
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Range : ".$noDepart." - ".$noFin."
|
|
|
|
- Type of form : ".$this->libelletypebonEng."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "CONFIRMATION RECEPTION DE BONS DE PEC : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$prestataire."
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Plage : ".$noDepart." - ".$noFin."
|
|
|
|
- Type de bon : ".$this->libelletypebon."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function maildemandeannulationbon($idBon, $heureCourante)
|
|
{
|
|
// $this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailGestionBon;
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
$this->chargerbonpec($idBon);
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "CANCELLATION FORM REQUEST : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$this->prestataire."
|
|
|
|
Form to be canceled :
|
|
|
|
- Number : ".$this->numeroBon."
|
|
|
|
- Type : ".$this->libelleTypebonEng."
|
|
|
|
- Reason : ".$this->motifAnnulation."
|
|
|
|
- Date of request : ".$heureCourante."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "DEMANDE ANNULATION DE BON DE PEC : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
Bon à annuler :
|
|
|
|
- Numéro : ".$this->numeroBon."
|
|
|
|
- Type : ".$this->libelleTypebon."
|
|
|
|
- Motif : ".$this->motifAnnulation."
|
|
|
|
- Date Demande : ".$heureCourante."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function maildemandederogation($codeDerogation, $observations, $prestataire, $idBeneficiaire, $heureCourante)
|
|
{
|
|
// $this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailDerogation;
|
|
|
|
$this->chargerbeneficiaire($idBeneficiaire);
|
|
|
|
$this->chargerinfosderogation($codeDerogation);
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "REQUEST FOR EXEMPTION : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Exemption : ".$this->libellederogationEng."
|
|
|
|
- Motivations : ".$observations."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "DEMANDE DE DEROGATION : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Dérogation : ".$this->libellederogation."
|
|
|
|
- Motivations : ".$observations."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailfraudeidentite($idBeneficiaire, $prestataire, $heureCourante)
|
|
{
|
|
// $this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailFraudeFinger;
|
|
|
|
$this->chargerbeneficiaire($idBeneficiaire);
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->objet = "ALERTE PLUS DE 3 TENTATIVES D'IDENTIFICATION : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
Merci et bonne réception.";
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailententeprealable($numeroFeuilleMaladie, $codeActe, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->chargerinfosacte($codeActe);
|
|
|
|
$this->emailDestination = $this->emailAccordPrealable;
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "ALERT : PRIOR AGREEMENT : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Act : ".$this->libelleacte."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "ALERTE : ACCORD PREALABLE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Acte : ".$this->libelleacte."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
//
|
|
|
|
public function mailautorisation($numeroFeuilleMaladie, $codeActe, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->chargerinfosnewverres($numeroBonOptique, $codePrestataire);
|
|
|
|
$this->emailDestination = $this->emailAccordPrealable;
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->objet = "ALERTE ACCORD ACTE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Acte : ".$this->libelleacte."
|
|
|
|
|
|
Merci et bonne réception.";
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
|
|
public function mailententeprealableopt($numeroFeuilleMaladie, $numeroBonOptique, $codePrestataire, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->chargerinfosnewverres($numeroBonOptique, $codePrestataire);
|
|
|
|
$this->emailDestination = $this->emailAccordPrealable;
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "ALERT OPTICAL : PRIOR AGREEMENT : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$this->prestataireMail."
|
|
|
|
- Inseured : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Glasses : ".$this->libelleOptique."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "ALERTE : ACCORD PREALABLE OPTIQUE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataireMail."
|
|
|
|
- Assuré : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Verres : ".$this->libelleOptique."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailententeprealablepha($numeroFeuilleMaladie, $codePrestataire, $codeMedicament, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->chargerinfosnewmedicament($numeroFeuilleMaladie, $codePrestataire, $codeMedicament);
|
|
|
|
$this->emailDestination = $this->emailAccordPrealable;
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "ALERT PHARMACY : PRIOR AGREEMENT : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$this->prestataireMail."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Drug : ".$this->libelleMedicament."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "ALERTE PHARMACIE : ACCORD PREALABLE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataireMail."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Medicament : ".$this->libelleMedicament."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailententeprealablemont($idBeneficiaire, $codePrestataire, $heureCourante)
|
|
{
|
|
// $this->chargersociete();
|
|
|
|
$this->chargerinfosmonture($idBeneficiaire, $codePrestataire);
|
|
|
|
$this->emailDestination = $this->emailAccordPrealable;
|
|
|
|
if($this->emailAdherent>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->emailAdherent;
|
|
}
|
|
|
|
// $this->traiterdestinationmail();
|
|
|
|
if($this->codeLangueSociete=="en_US")
|
|
{
|
|
$this->objet = "ALERT OPTICAL FRAMES : PRIOR AGREEMENT : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Provider : ".$this->prestataireMail."
|
|
|
|
- Inseured : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Act : ".$this->libelleMontureEng."
|
|
|
|
Thank you and good reception.";
|
|
}
|
|
else
|
|
{
|
|
$this->objet = "ALERTE : ACCORD PREALABLE MONTURE : ".$this->nomProduitSante;
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataireMail."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Acte : ".$this->libelleMonture."
|
|
|
|
Merci et bonne réception.";
|
|
}
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
|
|
} |