900 lines
27 KiB
Bash
Executable File
900 lines
27 KiB
Bash
Executable File
#!/bin/bash
|
|
<?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'];
|
|
}
|
|
|
|
|
|
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'];
|
|
}
|
|
|
|
public function chargerinfosbon($codeTypeBon)
|
|
{
|
|
require_once 'Typebon.php';
|
|
|
|
$this->typebon = new Typebon();
|
|
$infoTypeBon = $this->typebon->getInfos($codeTypeBon);
|
|
$this->libelletypebon = $infoTypeBon['libelle'];
|
|
}
|
|
|
|
public function chargerinfosderogation($codeDerogation)
|
|
{
|
|
require_once 'Derogation.php';
|
|
|
|
$this->derogation = new Derogation();
|
|
$infoderogation = $this->derogation->getInfos($codeDerogation);
|
|
$this->libellederogation = $infoderogation['libelle'];
|
|
}
|
|
|
|
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->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 / Eyeglasses";
|
|
}
|
|
|
|
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'];
|
|
|
|
// echo "numeroFeuilleMaladie : ".$numeroFeuilleMaladie."codePrestataire : ".$codePrestataire."codeMedicament : ".$codeMedicament;
|
|
|
|
}
|
|
|
|
public function traiterdestinationmail()
|
|
{
|
|
require_once 'Ebenegmail.php';
|
|
$this->email = $mail;
|
|
|
|
// Pour les tests
|
|
if($this->email_standard>" ")
|
|
{
|
|
$this->emailDestination .= ";".$this->email_standard;
|
|
}
|
|
// Fin mails tests
|
|
|
|
// Pour empêcher les envois de mails
|
|
/*
|
|
$this->emailDestination = "lkane@ebene.info;kanelazeni@gmail.com";
|
|
$this->emailDestination = "lkane@ebene.info;ihabimana@radiant.rw;gmaniraguha@radiant.rw;bkwitonda@radiant.rw;jntakirutimana@radiant.rw;dnyirakanyambo@radiant.rw;imugabo@radiant.rw";
|
|
$this->emailDestination .= ";bndagijimana@radiant.rw;cumuhire@radiant.rw;dbahati@radiant.rw;fbarinda@radiant.rw;jvmushokambere@radiant.rw;auwera@radiant.rw;enkuriyingoma@radiant.rw;nuzamukunda@radiant.rw";
|
|
*/
|
|
// Fin Pour empêcher les envois de mails
|
|
// $this->emailDestination = "lkane@ebene.info;kanelazeni@gmail.com";
|
|
}
|
|
|
|
public function envoyerlemail()
|
|
{
|
|
$this->body = convertirc($this->body);
|
|
|
|
$addr = explode(';', $this->emailDestination);
|
|
foreach ($addr as $ad)
|
|
{
|
|
$this->email->AddAddress(trim($ad) );
|
|
}
|
|
|
|
$this->email->Subject = $this->obejt;
|
|
$this->email->Body = $this->body;
|
|
|
|
if(!$this->email->send())
|
|
{
|
|
$this->marquermail($this->idMail, "9");
|
|
}
|
|
else
|
|
{
|
|
$this->marquermail($this->idMail, "1");
|
|
}
|
|
}
|
|
|
|
public function mailhospitalisation($numeroBon, $numeroFeuilleMaladie, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->emailDestination = $this->emailMedecinConseil;
|
|
|
|
$this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
$this->obejt = "ALERTE HOSPITALISATION MEDICARE";
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Bon Hospitalisation : ".$numeroBon."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailfacturationfeuillemaladie($numeroFeuilleMaladie, $heureCourante)
|
|
{
|
|
$this->chargerfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$this->emailDestination = $this->emailAdherent;
|
|
|
|
$this->traiterdestinationmail();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
$this->obejt = "ALERTE CONSOMMATION MEDICARE";
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- N° Bon Consultation : ".$this->numeroBonConsultation."
|
|
|
|
- Coût : ".format_N($this->cout)." FRW
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." FRW
|
|
|
|
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->obejt = "ALERTE CONSOMMATION PHARMACIE MEDICARE";
|
|
|
|
$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)." FRW
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." FRW
|
|
|
|
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->obejt = "ALERTE CONSOMMATION LABORATOIRE MEDICARE";
|
|
|
|
$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)." FRW
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." FRW
|
|
|
|
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->obejt = "ALERTE CONSOMMATION OPTIQUE MEDICARE";
|
|
|
|
$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)." FRW
|
|
|
|
- Ticket Modérateur : ".format_N($this->montantTm)." FRW
|
|
|
|
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);
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "DEMANDE DE BONS DE PEC MEDICARE";
|
|
|
|
$this->body = "- Prestataire : ".$prestataire."
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Quantité : ".$quantite."
|
|
|
|
- Type de bon : ".$this->libelletypebon."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function mailreceptionbon($codeTypeBon, $noDepart, $noFin, $prestataire, $heureCourante)
|
|
{
|
|
$this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailGestionBon;
|
|
|
|
$this->traiterdestinationmail();
|
|
|
|
$this->chargerinfosbon($codeTypeBon);
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "CONFIRMATION RECEPTION DE BONS DE PEC MEDICARE";
|
|
|
|
$this->body = "- Prestataire : ".$prestataire."
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Plage : ".$noDepart." - ".$noFin."
|
|
|
|
- Type de bon : ".$this->libelletypebon."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
public function maildemandeannulationbon($idBon, $heureCourante)
|
|
{
|
|
$this->chargersociete();
|
|
|
|
$this->emailDestination = $this->emailGestionBon;
|
|
|
|
$this->traiterdestinationmail();
|
|
|
|
$this->chargerbonpec($idBon);
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "DEMANDE ANNULATION DE BON DE PEC MEDICARE";
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataire."
|
|
|
|
Bon à annuler :
|
|
|
|
- Numéro : ".$this->numeroBon."
|
|
|
|
- Type : ".$this->typebon."
|
|
|
|
- Motif : ".$this->motifAnnulation."
|
|
|
|
- Date Demande : ".$heureCourante."
|
|
|
|
Merci et bonne réception.";
|
|
// Fin Propre à ce mail
|
|
|
|
$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();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "DEMANDE DE DEROGATION MEDICARE";
|
|
|
|
$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->obejt = "ALERTE PLUS DE 3 TENTATIVES D'IDENTIFICATION";
|
|
|
|
$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();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "ALERTE ACCORD PREALABLE MEDICARE";
|
|
|
|
$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->obejt = "ALERTE ACCORD ACTE";
|
|
|
|
$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();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "ALERTE ACCORD PREALABLE OPTIQUE";
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataireMail."
|
|
|
|
- Patient : ".$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();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "ALERTE ACCORD PREALABLE MEDICAMENT";
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataireMail."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Medicament : ".$this->libelleMedicament."
|
|
|
|
Merci et bonne réception.";
|
|
|
|
$this->envoyerlemail();
|
|
|
|
// echo "libelleMedicament : ".$this->libelleMedicament;
|
|
}
|
|
|
|
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();
|
|
|
|
// Propre à ce mail => non fonctorisable
|
|
|
|
$this->obejt = "ALERTE ACCORD PREALABLE MONTURE";
|
|
|
|
$this->body = "- Prestataire : ".$this->prestataireMail."
|
|
|
|
- Patient : ".$this->beneficiaire." (".$this->numeroBeneficiaire.")
|
|
|
|
- Date : ".$heureCourante."
|
|
|
|
- Acte : ".$this->libelleMonture."
|
|
|
|
Merci et bonne réception.";
|
|
|
|
$this->envoyerlemail();
|
|
}
|
|
|
|
|
|
} // FIN CLASSE
|
|
|
|
// envoi des emails
|
|
|
|
$envoimaildivers = new Cronenvoimail();
|
|
|
|
$envoimaildivers->chargermail();
|
|
|
|
$typeMail = $envoimaildivers->typeMail;
|
|
$numeroFeuilleMaladie = $envoimaildivers->numeroFeuilleMaladie;
|
|
$idMail = $envoimaildivers->idMail;
|
|
$numeroBon = $envoimaildivers->numeroBon;
|
|
$codePrestataire = $envoimaildivers->codePrestataire;
|
|
$codeTypeBon = $envoimaildivers->codeTypeBon;
|
|
$quantite = $envoimaildivers->quantite;
|
|
$prestataire = $envoimaildivers->prestataire;
|
|
$noDepart = $envoimaildivers->noDepart;
|
|
$noFin = $envoimaildivers->noFin;
|
|
$idBon = $envoimaildivers->idBon;
|
|
$codeDerogation = $envoimaildivers->codeDerogation;
|
|
$observations = $envoimaildivers->observations;
|
|
$idBeneficiaire = $envoimaildivers->idBeneficiaire;
|
|
$codeActe = $envoimaildivers->codeActe;
|
|
$envoye = $envoimaildivers->envoye;
|
|
$dateSysteme = $envoimaildivers->dateSysteme;
|
|
$heureCourante = $envoimaildivers->heureCourante;
|
|
$numeroBonOptique = $envoimaildivers->numeroBonOptique;
|
|
$codeMedicament = $envoimaildivers->codeMedicament;
|
|
|
|
|
|
|
|
if ($typeMail == 'mailhospitalisation')
|
|
{
|
|
$envoimaildivers->mailhospitalisation($numeroBon, $numeroFeuilleMaladie, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailfacturationfeuillemaladie')
|
|
{
|
|
$envoimaildivers->mailfacturationfeuillemaladie($numeroFeuilleMaladie, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailpharmacie')
|
|
{
|
|
$envoimaildivers->mailpharmacie($numeroFeuilleMaladie, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'maillabo')
|
|
{
|
|
$envoimaildivers->maillabo($numeroFeuilleMaladie, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailoptique')
|
|
{
|
|
$envoimaildivers->mailoptique($numeroFeuilleMaladie, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailcommandebon')
|
|
{
|
|
$envoimaildivers->mailcommandebon($codeTypeBon, $quantite, $prestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailreceptionbon')
|
|
{
|
|
$envoimaildivers->mailreceptionbon($codeTypeBon, $noDepart, $noFin, $prestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'maildemandeannulationbon')
|
|
{
|
|
$envoimaildivers->maildemandeannulationbon($idBon, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'maildemandederogation')
|
|
{
|
|
$envoimaildivers->maildemandederogation($codeDerogation, $observations, $prestataire, $idBeneficiaire, $heureCourante);
|
|
}
|
|
|
|
|
|
if ($typeMail == 'mailfraudeidentite')
|
|
{
|
|
$envoimaildivers->mailfraudeidentite($idBeneficiaire, $prestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealable')
|
|
{
|
|
$envoimaildivers->mailententeprealable($numeroFeuilleMaladie, $codeActe, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailautorisation')
|
|
{
|
|
$envoimaildivers->mailautorisation($numeroFeuilleMaladie, $codeActe, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealableopt')
|
|
{
|
|
$envoimaildivers->mailententeprealableopt($numeroFeuilleMaladie, $numeroBonOptique, $codePrestataire, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealablepha')
|
|
{
|
|
$envoimaildivers->mailententeprealablepha($numeroFeuilleMaladie, $codePrestataire, $codeMedicament, $heureCourante);
|
|
}
|
|
|
|
if ($typeMail == 'mailententeprealablemont')
|
|
{
|
|
$envoimaildivers->mailententeprealablemont($idBeneficiaire, $codePrestataire, $heureCourante);
|
|
}
|