diff --git a/extranet/Controleur/ControleurAccueil.php b/extranet/Controleur/ControleurAccueil.php deleted file mode 100644 index 8e5ef43..0000000 --- a/extranet/Controleur/ControleurAccueil.php +++ /dev/null @@ -1,22 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Accueil"); - $this->billet = new Billet(); - } - - // Affiche la liste de tous les billets du blog - public function index() { - $billets = $this->billet->getBillets(); - $this->genererVue(array('billets' => $billets)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurActesmedicaux.php b/extranet/Controleur/ControleurActesmedicaux.php deleted file mode 100644 index bf0082b..0000000 --- a/extranet/Controleur/ControleurActesmedicaux.php +++ /dev/null @@ -1,24 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Actesmedicaux'); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypePrestation = "ACT"; - - $this->familleacte = (new Familleacte())->getListe($codeTypePrestation); - $this->acte = new Detailtarifacte(); - } - - public function index() { - $this->genererVue(array('familleacte' => $this->familleacte, 'acte' => $this->acte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAfficherbons.php b/extranet/Controleur/ControleurAfficherbons.php deleted file mode 100644 index 311a635..0000000 --- a/extranet/Controleur/ControleurAfficherbons.php +++ /dev/null @@ -1,66 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Afficherbons'); - - $this->bonpec = new Bonpec(); - //$this->typebon = (new Typebon())->getListe(); - $this->etatbon = (new Etatbon())->getListe(); - $this->prestataire = (new Prestataire())->getListeTypePrestataireBon(); - } - - public function index($codePrestataire="", $codeEtatBon="9", $noDepart=0, $noFin=0) - { - if($this->requete->existeParametre("id")) - { - $codeEtatBon = $this->requete->getParametreFormulaire("id"); - } - else - { - $codeEtatBon = "9"; - } - $codePrestataire = $_SESSION['p_codePrestataire_C']; - if (isset($_POST['codePrestataire'])) - { - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - $noDepart = $this->requete->getParametreFormulaire("noDepart"); - $noFin = $this->requete->getParametreFormulaire("noFin"); - $codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon"); - } - $bonpecs = $this->bonpec->afficherBonpecs($codePrestataire, $codeEtatBon, $noDepart, $noFin); - - $this->genererVue(array('bonpecs' => $bonpecs,'prestataire' => $this->prestataire, 'etatbon' => $this->etatbon, - 'codePrestataire' => $codePrestataire, 'codeEtatBon' => $codeEtatBon, 'noDepart' => $noDepart, 'noFin' => $noFin)); - } - - - public function annulerBon() { - if (isset($_POST['idBon_C'])) - { - $idBon = $this->requete->getParametreFormulaire("idBon_C"); - $motifAnnulation = $this->requete->getParametreFormulaire("motifAnnulation"); - $codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon_anl"); - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire_anl"); - - $this->bonpec->annulerBonId($idBon, $motifAnnulation); - - $this->rediriger("Afficherbons", $codeEtatBon); - - } else - { - $this->rediriger("/"); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAfficherged.php b/extranet/Controleur/ControleurAfficherged.php deleted file mode 100644 index 60e6880..0000000 --- a/extranet/Controleur/ControleurAfficherged.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Afficherged'); - - $this->ged = new Ged(); - } - - public function index($nomOrigine="", $codeSecret="") - { - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - if (isset($_POST['nomOrigine'])) - { - $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); - $codeSecret = $this->requete->getParametreFormulaire("codeSecret"); - } - $geds = $this->ged->afficherGeds($numeroBeneficiaire, $nomOrigine, $codeSecret); - - $this->genererVue(array('geds' => $geds, 'nomOrigine' => $nomOrigine, 'codeSecret' => $codeSecret)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxactesmedicauxselect.php b/extranet/Controleur/ControleurAjaxactesmedicauxselect.php deleted file mode 100644 index 66ac062..0000000 --- a/extranet/Controleur/ControleurAjaxactesmedicauxselect.php +++ /dev/null @@ -1,32 +0,0 @@ -prestation = new Prestationactes(); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $prestations = $this->prestation->getactesmedicauxfeuille($numeroFeuilleMaladie, $codePrestataire); - $prestations_total = $this->prestation->getactesmedicauxfeuille_total($numeroFeuilleMaladie, $codePrestataire); - - $this->genererVueAjax(array('prestations' => $prestations, 'prestations_total' => $prestations_total)); - } - - public function majquantite() - { - $idPrestationactes = $this->requete->getParametre("idPrestationactes"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->prestation->majquantite($idPrestationactes, $quantite); - - $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxactespossibles.php b/extranet/Controleur/ControleurAjaxactespossibles.php deleted file mode 100644 index 12c9cdf..0000000 --- a/extranet/Controleur/ControleurAjaxactespossibles.php +++ /dev/null @@ -1,21 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() - { - $codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe"); - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation"); - $acte = $this->acte->getactespossibles($codeTypePrestation, $codeFamilleActe); - $this->genererVueAjax(array('acte' => $acte, 'codeActe' => $codeActe)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxactespossiblesmed.php b/extranet/Controleur/ControleurAjaxactespossiblesmed.php deleted file mode 100644 index 09388f5..0000000 --- a/extranet/Controleur/ControleurAjaxactespossiblesmed.php +++ /dev/null @@ -1,20 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe"); - $codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation"); - - $acte = $this->acte->getactespossibles($codeTypePrestation, $codeFamilleActe); - $this->genererVueAjax(array('acte' => $acte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxactespossiblesselection.php b/extranet/Controleur/ControleurAjaxactespossiblesselection.php deleted file mode 100644 index d063c02..0000000 --- a/extranet/Controleur/ControleurAjaxactespossiblesselection.php +++ /dev/null @@ -1,20 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe"); - - $actes = $this->acte->geatactesexamensselection($codeFamilleActe); - - $this->genererVueAjax(array('actes' => $actes)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxaffectionspossibles.php b/extranet/Controleur/ControleurAjaxaffectionspossibles.php deleted file mode 100644 index 26af34a..0000000 --- a/extranet/Controleur/ControleurAjaxaffectionspossibles.php +++ /dev/null @@ -1,22 +0,0 @@ -affection = new Affection(); - } - - public function index() - { - $codeTypeAffection = $this->requete->getParametreFormulaire("codeTypeAffection"); - - $affections = $this->affection->getListe($codeTypeAffection) ; - - $this->genererVueAjax(array('affections' => $affections)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxafficherbons.php b/extranet/Controleur/ControleurAjaxafficherbons.php deleted file mode 100644 index 53d3e37..0000000 --- a/extranet/Controleur/ControleurAjaxafficherbons.php +++ /dev/null @@ -1,55 +0,0 @@ -bonpec = new Bonpec(); - $this->typebon = new Typebon(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - $codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon"); - $noDepart = $this->requete->getParametreFormulaire("noDepart"); - $noFin = $this->requete->getParametreFormulaire("noFin"); - - $bonpecs = $this->bonpec->afficherBonpecs($codePrestataire, $codeTypeBon, $codeEtatBon, $noDepart, $noFin); - - $this->genererVueAjax(array('bonpecs' => $bonpecs)); - } - - public function receptionnerBon() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - $noDepart = $this->requete->getParametreFormulaire("noDepart", "numerique"); - $noFin = $this->requete->getParametreFormulaire("noFin", "numerique"); - - $this->bonpec->receptionnerBon($codePrestataire, $codeTypeBon, $noDepart, $noFin); - - $this->executerAction("index"); - - } - - public function demanderAnnulationBon() - { - $idBon = $this->requete->getParametreFormulaire("idBon"); - $motifAnnulation = $this->requete->getParametreFormulaire("motifAnnulation"); - - $this->bonpec->demanderAnnulationBonId($idBon, $motifAnnulation); - - $this->executerAction("index"); - } - - public function vide() - { - $this->genererVueAjax(array()); - // $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxafficherconsommables.php b/extranet/Controleur/ControleurAjaxafficherconsommables.php deleted file mode 100644 index c94c05d..0000000 --- a/extranet/Controleur/ControleurAjaxafficherconsommables.php +++ /dev/null @@ -1,21 +0,0 @@ -consommable = new Consommable_temp(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $consommables = $this->consommable->getconsommablesfeuille($numeroFeuilleMaladie, $codePrestataire); - - $this->genererVueAjax(array('consommables' => $consommables)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxalistedemandebon.php b/extranet/Controleur/ControleurAjaxalistedemandebon.php deleted file mode 100644 index f32bcde..0000000 --- a/extranet/Controleur/ControleurAjaxalistedemandebon.php +++ /dev/null @@ -1,28 +0,0 @@ -demandesbons = new Demandebonpec(); - $this->typebon = new Typebon(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $demandesbons = $this->demandesbons->getDemandeBons($codePrestataire, $codeTypeBon, $d1, $d2); - - $this->genererVueAjax(array('demandesbons' => $demandesbons)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxalistegenererbons.php b/extranet/Controleur/ControleurAjaxalistegenererbons.php deleted file mode 100644 index 94a1c8d..0000000 --- a/extranet/Controleur/ControleurAjaxalistegenererbons.php +++ /dev/null @@ -1,28 +0,0 @@ -generartionbon = new Generartionbon(); - $this->typebon = new Typebon(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $generartionbons = $this->generartionbon->afficherListeGenererBonpecs($codePrestataire, $codeTypeBon, $d1, $d2); - - $this->genererVueAjax(array('generartionbons' => $generartionbons)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxbondisponible.php b/extranet/Controleur/ControleurAjaxbondisponible.php deleted file mode 100644 index d0c52c4..0000000 --- a/extranet/Controleur/ControleurAjaxbondisponible.php +++ /dev/null @@ -1,31 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() { - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - - $resultat = $this->bonpec->etatbon($codePrestataire, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerdureechambre.php b/extranet/Controleur/ControleurAjaxchangerdureechambre.php deleted file mode 100644 index c3a4a09..0000000 --- a/extranet/Controleur/ControleurAjaxchangerdureechambre.php +++ /dev/null @@ -1,36 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $numeroChambre = $this->requete->getParametreFormulaire("numeroChambre"); - - $infosActe = $this->acte->get_infos_acte($codeActe); - - $prixActe = $infosActe['prix']; - $prixTarif = $prixActe; - $ententePrealable = $infosActe['ententePrealable']; - $acteAlerte = $infosActe['alerte']; - $acteExclu = $infosActe['exclu']; - $acteChirurgie = $infosActe['chirurgie']; - - $valeurActe = round($prixActe*$quantite); - $montantTm = round(($valeurActe*$_SESSION['p_tm_C'])/100); - $aRembourser = $valeurActe-$montantTm; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'valeurActe' => $valeurActe, - 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'ententePrealable' => $ententePrealable, - 'acteExclu' => $acteExclu, 'acteChirurgie' => $acteChirurgie, 'prixTarif' => $prixTarif, 'acteAlerte' => $acteAlerte, - 'numeroChambre' => $numeroChambre)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerlangue.php b/extranet/Controleur/ControleurAjaxchangerlangue.php deleted file mode 100644 index 26f67c2..0000000 --- a/extranet/Controleur/ControleurAjaxchangerlangue.php +++ /dev/null @@ -1,21 +0,0 @@ -utilisateur = new Utilisateur(); - } - - public function index() - { - } - - public function changerlangue() - { - $this->utilisateur->changerlangueutilisateur(); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerordonnance.php b/extranet/Controleur/ControleurAjaxchangerordonnance.php deleted file mode 100644 index 7837e8d..0000000 --- a/extranet/Controleur/ControleurAjaxchangerordonnance.php +++ /dev/null @@ -1,27 +0,0 @@ -requete->getParametreFormulaire("numeroBonOrdonnance"); - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - } - - public function reinit() - { - viderContexte(); - - $_SESSION['p_numeroBonOrdonnance_C'] = "-1"; - $_SESSION['p_numeroBonExamen_C'] = "-1"; - $_SESSION['p_numeroBonOptique_C'] = "-1"; - $_SESSION['p_numeroBonKine_C'] = "-1"; - - $_SESSION['p_okId'] = "-1"; - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerordonnancelab.php b/extranet/Controleur/ControleurAjaxchangerordonnancelab.php deleted file mode 100644 index 2907ba8..0000000 --- a/extranet/Controleur/ControleurAjaxchangerordonnancelab.php +++ /dev/null @@ -1,14 +0,0 @@ -requete->getParametreFormulaire("numeroBonExamen"); - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerordonnanceopt.php b/extranet/Controleur/ControleurAjaxchangerordonnanceopt.php deleted file mode 100644 index 9dfdd0f..0000000 --- a/extranet/Controleur/ControleurAjaxchangerordonnanceopt.php +++ /dev/null @@ -1,27 +0,0 @@ -requete->getParametreFormulaire("numeroBonOptique"); - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - } - - public function reinit() - { - viderContexte(); - - $_SESSION['p_numeroBonOrdonnance_C'] = "-1"; - $_SESSION['p_numeroBonExamen_C'] = "-1"; - $_SESSION['p_numeroBonOptique_C'] = "-1"; - $_SESSION['p_numeroBonKine_C'] = "-1"; - - $_SESSION['p_okId'] = "-1"; - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerordonnancesea.php b/extranet/Controleur/ControleurAjaxchangerordonnancesea.php deleted file mode 100644 index 91fde40..0000000 --- a/extranet/Controleur/ControleurAjaxchangerordonnancesea.php +++ /dev/null @@ -1,28 +0,0 @@ -requete->getParametreFormulaire("numeroBonKine"); - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - } - - public function reinit() - { - viderContexte(); - - $_SESSION['p_numeroBonOrdonnance_C'] = "-1"; - $_SESSION['p_numeroBonExamen_C'] = "-1"; - $_SESSION['p_numeroBonOptique_C'] = "-1"; - $_SESSION['p_numeroBonKine_C'] = "-1"; - - $_SESSION['p_okId'] = "-1"; - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxchangerqteacte.php b/extranet/Controleur/ControleurAjaxchangerqteacte.php deleted file mode 100644 index 834f449..0000000 --- a/extranet/Controleur/ControleurAjaxchangerqteacte.php +++ /dev/null @@ -1,26 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $prixActe = $this->acte->getprixacte($codeActe); - $ententePrealable = $this->acte->getententePrealable($codeActe); - $acteExclu = $this->acte->getacteExclu($codeActe); - $valeurActe = round($prixActe*$quantite); - $montantTm = round(($valeurActe*$_SESSION['p_tm_C'])/100); - $aRembourser = $valeurActe-$montantTm; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'valeurActe' => $valeurActe, - 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'ententePrealable' => $ententePrealable, - 'acteExclu' => $acteExclu)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcommanderbons.php b/extranet/Controleur/ControleurAjaxcommanderbons.php deleted file mode 100644 index e2b51a7..0000000 --- a/extranet/Controleur/ControleurAjaxcommanderbons.php +++ /dev/null @@ -1,30 +0,0 @@ -typebon = new Typebon(); - } - - public function index() - { - $typebon = $this->typebon->getListe(); - - $this->genererVueAjax(array('typebon' => $typebon)); - } - - public function commanderBon() - { - $codeTypeBon = $this->requete->getParametreFormulaire("codeTypeBon"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $commentaire = ""; - - $this->typebon->commanderbon($codeTypeBon, $quantite, $commentaire); - - $this->executerAction("index"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconnexioncookie.php b/extranet/Controleur/ControleurAjaxconnexioncookie.php deleted file mode 100644 index 2fea2a8..0000000 --- a/extranet/Controleur/ControleurAjaxconnexioncookie.php +++ /dev/null @@ -1,19 +0,0 @@ -requete->getParametreFormulaire("msgErreur"); - - $this->genererVueAjax(array('msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationbencso.php b/extranet/Controleur/ControleurAjaxconsultationbencso.php deleted file mode 100644 index 08ffd39..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationbencso.php +++ /dev/null @@ -1,27 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $feuillemaladies = $this->feuillemaladie->getfeuillesmaladie($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVueAjax(array('feuillemaladies' => $feuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationbenlab.php b/extranet/Controleur/ControleurAjaxconsultationbenlab.php deleted file mode 100644 index 9d36432..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationbenlab.php +++ /dev/null @@ -1,27 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationbenopt.php b/extranet/Controleur/ControleurAjaxconsultationbenopt.php deleted file mode 100644 index 009e4b3..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationbenopt.php +++ /dev/null @@ -1,27 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationbenpha.php b/extranet/Controleur/ControleurAjaxconsultationbenpha.php deleted file mode 100644 index e9dd057..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationbenpha.php +++ /dev/null @@ -1,27 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationbensea.php b/extranet/Controleur/ControleurAjaxconsultationbensea.php deleted file mode 100644 index 507e3f7..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationbensea.php +++ /dev/null @@ -1,27 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationcso.php b/extranet/Controleur/ControleurAjaxconsultationcso.php deleted file mode 100644 index 1b49db6..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationcso.php +++ /dev/null @@ -1,26 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $feuillemaladies = $this->feuillemaladie->getfeuillesmaladiecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('feuillemaladies' => $feuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationcsoentete.php b/extranet/Controleur/ControleurAjaxconsultationcsoentete.php deleted file mode 100644 index 04d0c6e..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationcsoentete.php +++ /dev/null @@ -1,26 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $totalfeuillemaladies = $this->feuillemaladie->gettotalfeuillesmaladiecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('totalfeuillemaladies' => $totalfeuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationlab.php b/extranet/Controleur/ControleurAjaxconsultationlab.php deleted file mode 100644 index aa0cad9..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationlab.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationlabentete.php b/extranet/Controleur/ControleurAjaxconsultationlabentete.php deleted file mode 100644 index 7efa4d8..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationlabentete.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationopt.php b/extranet/Controleur/ControleurAjaxconsultationopt.php deleted file mode 100644 index 33d778f..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationopt.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationoptentete.php b/extranet/Controleur/ControleurAjaxconsultationoptentete.php deleted file mode 100644 index 8de1d93..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationoptentete.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationpha.php b/extranet/Controleur/ControleurAjaxconsultationpha.php deleted file mode 100644 index e3ffd9b..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationpha.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationphaentete.php b/extranet/Controleur/ControleurAjaxconsultationphaentete.php deleted file mode 100644 index 33ef61b..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationphaentete.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationsea.php b/extranet/Controleur/ControleurAjaxconsultationsea.php deleted file mode 100644 index d4ec753..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationsea.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultationseaentete.php b/extranet/Controleur/ControleurAjaxconsultationseaentete.php deleted file mode 100644 index c2fac8e..0000000 --- a/extranet/Controleur/ControleurAjaxconsultationseaentete.php +++ /dev/null @@ -1,26 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVueAjax(array('totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxconsultertableauprestation.php b/extranet/Controleur/ControleurAjaxconsultertableauprestation.php deleted file mode 100644 index 1584e55..0000000 --- a/extranet/Controleur/ControleurAjaxconsultertableauprestation.php +++ /dev/null @@ -1,19 +0,0 @@ -college_temp2 = new College_temp(); - } - - public function index() - { - $idCollegeTemp = $_SESSION['p_idCollegeTemp']; - $tableau_prestations = $this->college_temp2->getPrestation($idCollegeTemp); - - $this->genererVueAjax(array('tableau_prestations' => $tableau_prestations)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextbeneficiaire.php b/extranet/Controleur/ControleurAjaxcontextbeneficiaire.php deleted file mode 100644 index 516bde1..0000000 --- a/extranet/Controleur/ControleurAjaxcontextbeneficiaire.php +++ /dev/null @@ -1,39 +0,0 @@ -finger = new Finger(); - } - - public function index() { - $idBeneficiaire = $this->requete->getParametre("idBeneficiaire"); - - $idBeneficiaire_sav = $_SESSION['p_idBeneficiaire_sav']; - - if ($idBeneficiaire == $_SESSION['p_idBeneficiaire_sav']) - { - $_SESSION['p_okId'] = $this->requete->getParametre("okId"); - $_SESSION['p_okId_face'] = $this->requete->getParametre("okId_face"); - } - else - { - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - } - $_SESSION['p_idBeneficiaire_C'] = $idBeneficiaire; - $_SESSION['p_idBeneficiaire_sav'] = $_SESSION['p_idBeneficiaire_C']; - - $this->genererVueAjax(); - } - - public function saveenroleur() - { - $user_id = $this->requete->getParametreFormulaire("user_id"); - $this->finger->saveenroleur($user_id); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextclient.php b/extranet/Controleur/ControleurAjaxcontextclient.php deleted file mode 100644 index fd91380..0000000 --- a/extranet/Controleur/ControleurAjaxcontextclient.php +++ /dev/null @@ -1,16 +0,0 @@ -client = new Client(); - } - - public function index() { - $idClient = $this->requete->getParametre("idClient"); - $this->client->getContexteAjaxClient($idClient); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextfacturelab.php b/extranet/Controleur/ControleurAjaxcontextfacturelab.php deleted file mode 100644 index 9f94b6b..0000000 --- a/extranet/Controleur/ControleurAjaxcontextfacturelab.php +++ /dev/null @@ -1,14 +0,0 @@ -requete->getParametre("idFacture"); - $_SESSION['p_numeroBonExamen_C'] = $this->requete->getParametre("numeroBonExamen"); - $_SESSION['p_codePrestataireLivraison_C'] = $this->requete->getParametre("codePrestataireLivraison"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextfactureopt.php b/extranet/Controleur/ControleurAjaxcontextfactureopt.php deleted file mode 100644 index da36957..0000000 --- a/extranet/Controleur/ControleurAjaxcontextfactureopt.php +++ /dev/null @@ -1,15 +0,0 @@ -requete->getParametre("idFacture"); - $_SESSION['p_numeroBonOptique_C'] = $this->requete->getParametre("numeroBonOptique"); - $_SESSION['p_numeroOptique_C'] = $this->requete->getParametre("numeroOptique"); - $_SESSION['p_codePrestataireLivraison_C'] = $this->requete->getParametre("codePrestataireLivraison"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextfacturepha.php b/extranet/Controleur/ControleurAjaxcontextfacturepha.php deleted file mode 100644 index 07ab59e..0000000 --- a/extranet/Controleur/ControleurAjaxcontextfacturepha.php +++ /dev/null @@ -1,14 +0,0 @@ -requete->getParametre("idFacture"); - $_SESSION['p_numeroBonOrdonnance_C'] = $this->requete->getParametre("numeroBonOrdonnance"); - $_SESSION['p_codePrestataireLivraison_C'] = $this->requete->getParametre("codePrestataireLivraison"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextfacturesea.php b/extranet/Controleur/ControleurAjaxcontextfacturesea.php deleted file mode 100644 index 159dfee..0000000 --- a/extranet/Controleur/ControleurAjaxcontextfacturesea.php +++ /dev/null @@ -1,14 +0,0 @@ -requete->getParametre("idFacture"); - $_SESSION['p_numeroBonKine_C'] = $this->requete->getParametre("numeroBonKine"); - $_SESSION['p_codePrestataireLivraison_C'] = $this->requete->getParametre("codePrestataireLivraison"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextfeuillemaladie.php b/extranet/Controleur/ControleurAjaxcontextfeuillemaladie.php deleted file mode 100644 index 583b215..0000000 --- a/extranet/Controleur/ControleurAjaxcontextfeuillemaladie.php +++ /dev/null @@ -1,12 +0,0 @@ -requete->getParametre("numeroFeuilleMaladie"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextidentification.php b/extranet/Controleur/ControleurAjaxcontextidentification.php deleted file mode 100644 index 7649dfc..0000000 --- a/extranet/Controleur/ControleurAjaxcontextidentification.php +++ /dev/null @@ -1,14 +0,0 @@ -requete->getParametre("user_id_substitut"); - $_SESSION['p_okId'] = "1"; - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxcontextpolice.php b/extranet/Controleur/ControleurAjaxcontextpolice.php deleted file mode 100644 index a3dc6e8..0000000 --- a/extranet/Controleur/ControleurAjaxcontextpolice.php +++ /dev/null @@ -1,16 +0,0 @@ -police = new Police(); - } - - public function index() { - $idPolice = $this->requete->getParametre("idPolice"); - $this->police->getContexteAjaxPolice($idPolice); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdatefacturerelle.php b/extranet/Controleur/ControleurAjaxdatefacturerelle.php deleted file mode 100644 index 4ec35cf..0000000 --- a/extranet/Controleur/ControleurAjaxdatefacturerelle.php +++ /dev/null @@ -1,16 +0,0 @@ -requete->getParametreFormulaire("dateFactureReelle"); - $dateFactureReelle = $this->requete->getParametreDate("dateFactureReelle"); - - $_SESSION['p_dateFactureReellefr_C'] = $dateFactureReellefr; - $_SESSION['p_dateFactureReelle_C'] = $dateFactureReelle; - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdecompte.php b/extranet/Controleur/ControleurAjaxdecompte.php deleted file mode 100644 index 5c1a599..0000000 --- a/extranet/Controleur/ControleurAjaxdecompte.php +++ /dev/null @@ -1,25 +0,0 @@ -reglement = new Reglement(); - } - - public function index() { - } - - public function initierdecompte() - { - $idReglement = $this->requete->getParametreFormulaire("idReglement"); - $_SESSION['p_idReglement_C'] = $idReglement; - } - - public function validerdecompteprestataire() - { - $this->reglement->validerdecompteprestataire(); - } - -} diff --git a/extranet/Controleur/ControleurAjaxdeconnexion.php b/extranet/Controleur/ControleurAjaxdeconnexion.php deleted file mode 100644 index 39e150a..0000000 --- a/extranet/Controleur/ControleurAjaxdeconnexion.php +++ /dev/null @@ -1,17 +0,0 @@ -utilisateur = new Utilisateur(); - } - - public function index() { - $login = $this->requete->getSession()->getAttribut("p_login"); - $this->utilisateur->viderTablesTemporairesUser($login); - $this->requete->getSession()->detruire(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdelaicarencecaisonconsultation.php b/extranet/Controleur/ControleurAjaxdelaicarencecaisonconsultation.php deleted file mode 100644 index 498d010..0000000 --- a/extranet/Controleur/ControleurAjaxdelaicarencecaisonconsultation.php +++ /dev/null @@ -1,22 +0,0 @@ -raison = new Raisonconsultation(); - } - - public function index() - { - $codeRaisonConsultation = $this->requete->getParametreFormulaire("codeRaisonConsultation"); - - $delaiCarenceRaisonconsultation_info = $this->raison->getdelaicarencecaisonconsultation($codeRaisonConsultation); - $appliquerDelaiCarence_info = $this->raison->getappliquerdelaicarence($codeRaisonConsultation); - - $this->genererVueAjax(array('delaiCarenceRaisonconsultation_info' => $delaiCarenceRaisonconsultation_info, - 'appliquerDelaiCarence_info' => $appliquerDelaiCarence_info)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdelaicarencetypecontrat.php b/extranet/Controleur/ControleurAjaxdelaicarencetypecontrat.php deleted file mode 100644 index a7a7265..0000000 --- a/extranet/Controleur/ControleurAjaxdelaicarencetypecontrat.php +++ /dev/null @@ -1,19 +0,0 @@ -typecontrat = new Typecontrat(); - } - - public function index() { - $codeTypeContrat = $this->requete->getParametreFormulaire("codeTypeContrat"); - - $delaiCarencePolice_info = $this->typecontrat->getinfosdelaicarence($codeTypeContrat); - - $this->genererVueAjax(array('delaiCarencePolice_info' => $delaiCarencePolice_info)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdemandedecompte.php b/extranet/Controleur/ControleurAjaxdemandedecompte.php deleted file mode 100644 index 46ef523..0000000 --- a/extranet/Controleur/ControleurAjaxdemandedecompte.php +++ /dev/null @@ -1,64 +0,0 @@ -reglement = new Demandedecompte(); - } - - public function index() { - $this->genererVueAjax(array('regle' => $_SESSION['p_decompteRegle_C'])); - } - - public function initierdemandedecompte() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeExercice = $this->requete->getParametreFormulaire("codeExercice"); - $codeMois = $this->requete->getParametreFormulaire("codeMois"); - - $_SESSION['p_codePrestataire_Dec'] = $codePrestataire; - - $_SESSION['p_codeExercice_C'] = $codeExercice; - $_SESSION['p_codeMois_C'] = $codeMois; - - $idDemandeDecompte = $this->reglement->get_idDemandeDecompte($codePrestataire, $codeExercice, $codeMois) ; - - $_SESSION['p_idDemandeDecompte_C'] = $idDemandeDecompte; - - if($idDemandeDecompte==0) - { - // Créer la demande de décompte dans p_demandedecompte - // $this->reglement->initdecompteprestataire(); - $this->reglement->initdemandedecompte(); - - $idDemandeDecompte = $this->reglement->get_idDemandeDecompte($codePrestataire, $codeExercice, $codeMois); - - $_SESSION['p_idDemandeDecompte_C'] = $idDemandeDecompte; - } - - // Afficher le décompte - $idDemandeDecompte = $_SESSION['p_idDemandeDecompte_C']; - - $infosdemandedecompte = $this->reglement->getinfosdemandedecompte($idDemandeDecompte); - - $_SESSION['p_decompteRegle_C'] = $infosdemandedecompte['regle']; - $_SESSION['p_numeroDemandeDecompte_C'] = $infosdemandedecompte['numeroDemandeDecompte']; - - $this->executerAction("index"); - } - - public function rechargerdemandedecompte() - { - $idDemandeDecompte = $_SESSION['p_idDemandeDecompte_C']; - $numeroDemandeDecompte = $_SESSION['p_numeroDemandeDecompte_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeExercice = $_SESSION['p_codeExercice_C']; - $codeMois = $_SESSION['p_codeMois_C']; - - $this->reglement->rechargerdemandedecompte($idDemandeDecompte, $numeroDemandeDecompte, $codePrestataire, $codeExercice, $codeMois); - } - -} diff --git a/extranet/Controleur/ControleurAjaxdepassementlimitefeuillemaladie.php b/extranet/Controleur/ControleurAjaxdepassementlimitefeuillemaladie.php deleted file mode 100644 index 627a6e3..0000000 --- a/extranet/Controleur/ControleurAjaxdepassementlimitefeuillemaladie.php +++ /dev/null @@ -1,22 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $infosfeuillemaladie = $this->feuillemaladie->getinfosfeuillemaladie($numeroFeuilleMaladie); - - $fraisExclu = $infosfeuillemaladie['fraisExclu']; - - $this->genererVueAjax(array('fraisExclu' => $fraisExclu)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxderogation.php b/extranet/Controleur/ControleurAjaxderogation.php deleted file mode 100644 index a9119c6..0000000 --- a/extranet/Controleur/ControleurAjaxderogation.php +++ /dev/null @@ -1,26 +0,0 @@ -derogation = new Derogation(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $derogations = $this->derogation->getderogations($codePrestataire, $idBeneficiaire, $d1, $d2); - - $this->genererVueAjax(array('derogations' => $derogations)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailexamen.php b/extranet/Controleur/ControleurAjaxdetailexamen.php deleted file mode 100644 index c5c6771..0000000 --- a/extranet/Controleur/ControleurAjaxdetailexamen.php +++ /dev/null @@ -1,77 +0,0 @@ -prescription = new Examen_temp(); - $this->detailprescription = new Detailexamem(); - } - - public function index() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - - $prescription = $this->prescription->getexamentemp(); - - $detailprescriptions = $this->detailprescription->getdetailexamenfeuille(); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres)); - } - - public function ajouterexamen() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - - $this->prescription->ajouterexamen($idExamen); - - $this->executerAction("index"); - } - - public function ajouterexamentous() - { - $this->prescription->ajouterexamentous(); - - $this->executerAction("index"); - } - - public function retirerexamen() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - - $this->prescription->retirerexamen($idExamen); - - $this->executerAction("index"); - } - - public function retirerexamentous() - { - $this->prescription->retirerexamentous(); - - $this->executerAction("index"); - } - - public function enregistrerexamen() - { - $this->prescription->enregistrerexamen(); - } - - public function majquantiteexam() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailprescription->majquantiteexam($idExamen, $quantite); - - $this->executerAction("index"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailfacturesansboncso.php b/extranet/Controleur/ControleurAjaxdetailfacturesansboncso.php deleted file mode 100644 index b698580..0000000 --- a/extranet/Controleur/ControleurAjaxdetailfacturesansboncso.php +++ /dev/null @@ -1,80 +0,0 @@ -facture = new Facturesansbon(); - $this->ouinonhospit = (new Ouinon())->getListe(); - $this->prestation = new Prestationactes(); - $this->beneficiaire = new Beneficiaire(); - } - - public function index() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $facture = $this->facture->getfacture_sans_bon_temp(); - - $prestations = $this->facture->getprestations_sans_bon_temp(); - - $garantieadherent_temp = $this->facture->afficher_garantieadherent_temp(); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTempAssureur(); - - $this->genererVueAjax(array('facture' => $facture, 'prestations' => $prestations, 'garantieadherent_temp' => $garantieadherent_temp, - 'ouinonhospit' => $this->ouinonhospit, 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function majprix() - { - $idPrestation = $this->requete->getParametre("idPrestation"); - $valeurActe = $this->requete->getParametreFormulaire("valeurActe", "numerique"); - - $this->facture->majprix($idPrestation, $valeurActe); - - $this->executerAction("index"); - } - - public function majtm() - { - $tm = $this->requete->getParametreFormulaire("tm", "numerique"); - - $this->facture->majtm($tm); - - $this->executerAction("index"); - } - - public function enregistrerfacturetemp() - { - $dateFacture = $this->requete->getParametreDate("dateFacture"); - $hospitalisation = $this->requete->getParametreFormulaire("hospitalisation"); - $observations = $this->requete->getParametreFormulaire("observations"); - $tm = $this->requete->getParametreFormulaire("tm", "numerique"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $medecinManquant = $this->requete->getParametreFormulaire("medecinManquant"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $initialiserprestation = $this->requete->getParametreFormulaire("initialiserprestation"); - - $this->facture->enregistrerfacturetemp($dateFacture, $hospitalisation, $observations, $tm, $numeroBon, $medecinManquant, - $codeMedecin, $initialiserprestation); - - $this->executerAction("index"); - } - - public function validerfacturesansbon() - { - $this->facture->validerfacturesansbon(); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetaillaboratoire.php b/extranet/Controleur/ControleurAjaxdetaillaboratoire.php deleted file mode 100644 index 2a87ad9..0000000 --- a/extranet/Controleur/ControleurAjaxdetaillaboratoire.php +++ /dev/null @@ -1,118 +0,0 @@ -prescription = new Examen_temp(); - $this->detailprescription = new Detailexamem(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonExamen = $_SESSION['p_numeroBonExamen_C']; - $numeroExamen = $_SESSION['p_numeroExamen_C']; - - $prescription = $this->prescription->getprescription_lab($numeroBonExamen); - - $detailprescriptions = $this->detailprescription->getdetailprescription_lab($numeroBonExamen); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $garantieadherent_temp = $this->prestation->getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, - 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function ajouterexamen() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - - $this->prescription->ajouterexamen($idExamen); - - $this->executerAction("index"); - } - - public function ajouterexamentous() - { - $this->prescription->ajouterexamentous(); - - $this->executerAction("index"); - } - - public function retirerexamen() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - - $this->prescription->retirerexamen($idExamen); - - $this->executerAction("index"); - } - - public function retirerexamentous() - { - $this->prescription->retirerexamentous(); - - $this->executerAction("index"); - } - - public function enregistrerlaboratoire() - { - $user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut"); - $this->prescription->facturerlaboratoire($user_id_substitut); - } - - public function annulersubstitutionmedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->annulersubstitutionmedicament($idMedicament); - - $this->executerAction("index"); - } - - public function enregistrersubstitutionmedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - $prixSubstitut = $this->requete->getParametreFormulaire("prixSubstitut", "numerique"); - - $this->prescription->enregistrersubstitutionmedicament($idMedicament, $prixSubstitut); - - $this->executerAction("index"); - } - - public function ajouterexamenprescription() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - - $this->detailprescription->ajouterexamenlab($codeActe, $ententePrealable); - - $this->executerAction("index"); - } - - public function majquantiteexam() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailprescription->majquantiteexam($idExamen, $quantite); - - $this->executerAction("index"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailopticien.php b/extranet/Controleur/ControleurAjaxdetailopticien.php deleted file mode 100644 index 2bc3d16..0000000 --- a/extranet/Controleur/ControleurAjaxdetailopticien.php +++ /dev/null @@ -1,117 +0,0 @@ -prescription = new Optique_temp(); - $this->detailprescription = new Detailoptique(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonOptique = $_SESSION['p_numeroBonOptique_C']; - $numeroOptique = $_SESSION['p_numeroOptique_C']; - - $prescription = $this->prescription->getoptique_opt($numeroBonOptique); - - $detailprescriptions = $this->detailprescription->getdetailoptique_opt($numeroBonOptique); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $garantieadherent_temp = $this->prestation->getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, - 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function ajouterverre() - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - - $this->prescription->ajouterverre($idOptique); - - $this->executerAction("index"); - } - - public function ajouterverretous() - { - $this->prescription->ajouterverretous(); - $this->executerAction("index"); - } - - public function retirerverre() - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - - $this->prescription->retirerverre($idOptique); - - $this->executerAction("index"); - } - - public function retirerverretous() - { - $this->prescription->retirerverretous(); - $this->executerAction("index"); - } - - public function enregistreroptique() - { - $this->prescription->factureropotique(); - } - - public function majmonture() - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - $monture = $this->requete->getParametreFormulaire("monture"); - - $this->prescription->majmonturetemp($idOptique, $monture); - - $this->executerAction("index"); - } - - public function ajouterverreprescription() - { - $codeOptique = $this->requete->getParametreFormulaire("codeOptique"); - - $this->detailprescription->ajouterverreopt($codeOptique); - - $this->executerAction("index"); - } - - public function creerverre() - { - $libelleOptique = $this->requete->getParametreFormulaire("libelleOptique"); - $prixVerre = $this->requete->getParametreFormulaire("prixVerre", "numerique"); - - $this->prescription->creerverre($libelleOptique, $prixVerre); - - // $this->genererVueAjax(); - - $this->executerAction("index"); - } - - public function demanderaccordopt() - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - - $this->detailprescription->demanderaccordopt($idOptique); - - $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailoptique.php b/extranet/Controleur/ControleurAjaxdetailoptique.php deleted file mode 100644 index 392627a..0000000 --- a/extranet/Controleur/ControleurAjaxdetailoptique.php +++ /dev/null @@ -1,42 +0,0 @@ -prescription = new Prescription(); - $this->detailprescription = new Detailprescription(); - } - - public function index() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription($numeroPrescription); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions)); - } - - public function ajoutermedicament() - { - $codeMedicament = $this->requete->getParametreFormulaire("codeMedicament"); - - $this->detailprescription->ajoutermedicament($codeMedicament); - - // $this->executerAction("index"); - } - - public function supprimer() - { - $idOptique = $this->requete->getParametre("idOptique"); - - $this->detailoptique->supprimerverre($idOptique); - $this->executerAction("index"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailordonnance.php b/extranet/Controleur/ControleurAjaxdetailordonnance.php deleted file mode 100644 index f5e505a..0000000 --- a/extranet/Controleur/ControleurAjaxdetailordonnance.php +++ /dev/null @@ -1,28 +0,0 @@ -prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - } - - public function index() - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - - $prescription = $this->prescription->getprescription_pha($numeroBonOrdonnance); - - $detailprescriptions = $this->detailprescription->getdetailprescription_pha($numeroBonOrdonnance); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions)); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailpharmacie.php b/extranet/Controleur/ControleurAjaxdetailpharmacie.php deleted file mode 100644 index d1cfeae..0000000 --- a/extranet/Controleur/ControleurAjaxdetailpharmacie.php +++ /dev/null @@ -1,77 +0,0 @@ -prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - } - - public function index() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription(); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - // $detaillivres = $this->prescription->getdetaillivre(); - $detaillivres = $this->prescription->getdetaillivrecso(); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres)); - } - - public function ajoutermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->ajoutermedicamentcso($idMedicament); - - $this->executerAction("index"); - } - - public function ajoutermedicamenttous() - { - $this->prescription->ajoutermedicamenttouscso(); - $this->executerAction("index"); - } - - public function retirermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->retirermedicamentcso($idMedicament); - - $this->executerAction("index"); - } - - public function retirermedicamenttous() - { - $this->prescription->retirermedicamenttouscso(); - - $this->executerAction("index"); - } - - public function enregistrerpharmacie() - { - $this->prescription->enregistrerpharmacie(); - } - - public function demanderaccordpha() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->detailprescription->demanderaccordpha($idMedicament); - - $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailpharmacien.php b/extranet/Controleur/ControleurAjaxdetailpharmacien.php deleted file mode 100644 index 5f6169e..0000000 --- a/extranet/Controleur/ControleurAjaxdetailpharmacien.php +++ /dev/null @@ -1,134 +0,0 @@ -prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription_pha($numeroBonOrdonnance); - - $detailprescriptions = $this->detailprescription->getdetailprescription_pha($numeroBonOrdonnance); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivrepha(); - - $garantieadherent_temp = $this->prestation->getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, - 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function ajoutermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->ajoutermedicament($idMedicament); - - $this->executerAction("index"); - } - - public function ajoutermedicamenttous() - { - $this->prescription->ajoutermedicamenttous(); - $this->executerAction("index"); - } - - public function retirermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->retirermedicament($idMedicament); - - $this->executerAction("index"); - } - - public function retirermedicamenttous() - { - $this->prescription->retirermedicamenttous(); - $this->executerAction("index"); - } - - public function enregistrerpharmacie() - { - $this->prescription->facturerpharmacie(); - } - - public function annulersubstitutionmedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->annulersubstitutionmedicament($idMedicament); - - $this->executerAction("index"); - } - - public function enregistrersubstitutionmedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - $prixSubstitut = $this->requete->getParametreFormulaire("prixSubstitut", "numerique"); - - $this->prescription->enregistrersubstitutionmedicament($idMedicament, $prixSubstitut); - - $this->executerAction("index"); - } - - public function ajoutermedicamentprescription() - { - $codeMedicament = $this->requete->getParametreFormulaire("codeMedicament"); - - $this->detailprescription->ajoutermedicamentpha($codeMedicament); - - $this->executerAction("index"); - } - - public function majquantitepha() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailprescription->majquantitepha($idMedicament, $quantite); - - $this->executerAction("index"); - } - - public function demanderaccordpha() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->detailprescription->demanderaccordpha($idMedicament); - - $this->executerAction("index"); - } - - public function majprixpha() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - $prix = $this->requete->getParametreFormulaire("prix", "numerique"); - - // $this->detailprescription->majquantitepha($idMedicament, $quantite); - $this->detailprescription->majprixpha($idMedicament, $prix); - - $this->executerAction("index"); - } -} - diff --git a/extranet/Controleur/ControleurAjaxdetailprescription.php b/extranet/Controleur/ControleurAjaxdetailprescription.php deleted file mode 100644 index d6b14a4..0000000 --- a/extranet/Controleur/ControleurAjaxdetailprescription.php +++ /dev/null @@ -1,80 +0,0 @@ -prescription = new Prescription(); - $this->detailprescription = new Detailprescription(); - } - - public function index() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription($numeroPrescription); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions)); - } - - public function ajoutermedicament() - { - $codeMedicament = $this->requete->getParametreFormulaire("codeMedicament"); - - $this->detailprescription->ajoutermedicament($codeMedicament); - - // $this->executerAction("index"); - } - - public function majquantite() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailprescription->majquantite($idMedicament, $quantite); - - $this->executerAction("index"); - } - - public function supprimer() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - - $this->detailprescription->supprimer($idMedicament); - - // $this->executerAction("index"); - } - - public function initremplacement() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - - $_SESSION['p_idMedicament_a_remplacer'] = $idMedicament; - } - - public function consulterremplacement() - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - - $medicaments_remplaces = $this->detailprescription->getmedicamentsremplaces($numeroBonOrdonnance); - - $this->genererVueAjax(array('medicaments_remplaces' => $medicaments_remplaces)); - } - - public function remplacermedicament() - { - $codeMedicamentNouv = $this->requete->getParametreFormulaire("codeMedicamentNouv"); - - $this->detailprescription->remplacermedicament($codeMedicamentNouv); - - // $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailprescriptionexamen.php b/extranet/Controleur/ControleurAjaxdetailprescriptionexamen.php deleted file mode 100644 index da3ee7c..0000000 --- a/extranet/Controleur/ControleurAjaxdetailprescriptionexamen.php +++ /dev/null @@ -1,57 +0,0 @@ -examen = new Examen_temp(); - $this->detailexamen = new Detailexamem(); - } - - public function index() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - - $examen = $this->examen->getexamentemp(); - - $detailexamens = $this->detailexamen->getdetailexamenfeuille(); - $nbExamens_0 = count($detailexamens); - - $this->genererVueAjax(array('examen' => $examen, 'detailexamens' => $detailexamens, 'nbExamens_0' => $nbExamens_0)); - } - - public function ajouterexamen() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - - $this->detailexamen->ajouterexamen($codeActe, $ententePrealable); - - // $this->executerAction("index"); - } - - public function majquantite() - { - $idExamen = $this->requete->getParametre("idExamen"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailexamen->majquantite($idExamen, $quantite); - - $this->executerAction("index"); - } - - public function supprimer() - { - $idExamen = $this->requete->getParametre("idExamen"); - - $this->detailexamen->supprimerexamen($idExamen); - - // $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdetailseance.php b/extranet/Controleur/ControleurAjaxdetailseance.php deleted file mode 100644 index 86c6609..0000000 --- a/extranet/Controleur/ControleurAjaxdetailseance.php +++ /dev/null @@ -1,24 +0,0 @@ -seance = new Seance_temp(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerseance() - { - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->seance->enregistrerseance($codeGestionBon); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdiagnosticsbeneficiaire.php b/extranet/Controleur/ControleurAjaxdiagnosticsbeneficiaire.php deleted file mode 100644 index b507114..0000000 --- a/extranet/Controleur/ControleurAjaxdiagnosticsbeneficiaire.php +++ /dev/null @@ -1,22 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $diagnostics = $this->feuillemaladie->getDiagnosticsBeneficiaire($idBeneficiaire); - - $this->genererVueAjax(array('diagnostics' => $diagnostics)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdiagnosticscons.php b/extranet/Controleur/ControleurAjaxdiagnosticscons.php deleted file mode 100644 index e3597ee..0000000 --- a/extranet/Controleur/ControleurAjaxdiagnosticscons.php +++ /dev/null @@ -1,22 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $diagnostics = $this->feuillemaladie->getDiagnostics($numeroFeuilleMaladie); - - $this->genererVueAjax(array('diagnostics' => $diagnostics)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxdossiers.php b/extranet/Controleur/ControleurAjaxdossiers.php deleted file mode 100644 index 32a5e19..0000000 --- a/extranet/Controleur/ControleurAjaxdossiers.php +++ /dev/null @@ -1,26 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - - $_SESSION['p_d1_C'] = $d1; - $_SESSION['p_d2_C'] = $d2; - - $feuillemaladies = $this->feuillemaladie->getfeuillesmaladie($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVueAjax(array('feuillemaladies' => $feuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxecartdecomptecons.php b/extranet/Controleur/ControleurAjaxecartdecomptecons.php deleted file mode 100644 index 792ee0c..0000000 --- a/extranet/Controleur/ControleurAjaxecartdecomptecons.php +++ /dev/null @@ -1,46 +0,0 @@ -reglement = new Reglement(); - } - - public function index() - { - $idReglement = $_SESSION['p_idReglement_C']; - - $reglement = $this->reglement->getreglement($idReglement); - - $recapecartdecompte = $this->reglement->getrecapecartdecompte($idReglement); - - $this->genererVueAjax(array('reglement' => $reglement, 'recapecartdecompte' => $recapecartdecompte)); - } - - public function ecartfacture() - { - $ecartfactures = $this->reglement->getecartsdecompte("1"); - - $this->genererVueAjax(array('ecartfactures' => $ecartfactures)); - } - - public function ecartnonsaisi() - { - $ecartnonsaisis = $this->reglement->getecartsdecompte("0"); - - $this->genererVueAjax(array('ecartnonsaisis' => $ecartnonsaisis)); - } - - public function recapecratdecompte() - { - $idReglement = $_SESSION['p_idReglement_C']; - $this->reglement->recapecratdecompte($idReglement); - - $this->executerAction("index"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistreractemedical.php b/extranet/Controleur/ControleurAjaxenregistreractemedical.php deleted file mode 100644 index 65c812b..0000000 --- a/extranet/Controleur/ControleurAjaxenregistreractemedical.php +++ /dev/null @@ -1,43 +0,0 @@ -prestationacte = new Prestationactes(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistreractemedical() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $valeurActe = $this->requete->getParametreFormulaire("valeurActe", "numerique"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - $autorisation = $this->requete->getParametreFormulaire("autorisation"); - $prixTarif = $this->requete->getParametreFormulaire("prixTarif", "numerique"); - - $this->prestationacte->enregistreractemedical($codeActe, $codeMedecin, $quantite, $prixActe, $valeurActe, $montantTm, $aRembourser, - $ententePrealable, $autorisation, $prixTarif); - // $this->executerAction("index"); - } - - public function supprimeracte() - { - $idPrestationactes = $this->requete->getParametre("idPrestationactes"); - $codeTypePrestation = $this->requete->getParametre("codeTypePrestation"); - - $this->prestationacte->supprimeracte($idPrestationactes, $codeTypePrestation); - } -} diff --git a/extranet/Controleur/ControleurAjaxenregistreractemedicalsel.php b/extranet/Controleur/ControleurAjaxenregistreractemedicalsel.php deleted file mode 100644 index 6e41165..0000000 --- a/extranet/Controleur/ControleurAjaxenregistreractemedicalsel.php +++ /dev/null @@ -1,44 +0,0 @@ -prestationacte = new Prestationactes(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistreractemedical() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $valeurActe = $prixActe ; - // $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $quantite = "1"; - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - $autorisation = "0"; - $prixTarif = $prixActe ; - - $this->prestationacte->enregistreractemedical($codeActe, $codeMedecin, $quantite, $prixActe, $valeurActe, $montantTm, $aRembourser, - $ententePrealable, $autorisation, $prixTarif); - // $this->executerAction("index"); - } - - public function supprimeracte() - { - $idPrestationactes = $this->requete->getParametre("idPrestationactes"); - $codeTypePrestation = $this->requete->getParametre("codeTypePrestation"); - - $this->prestationacte->supprimeracte($idPrestationactes, $codeTypePrestation); - } -} diff --git a/extranet/Controleur/ControleurAjaxenregistreraffection.php b/extranet/Controleur/ControleurAjaxenregistreraffection.php deleted file mode 100644 index fc0b4a9..0000000 --- a/extranet/Controleur/ControleurAjaxenregistreraffection.php +++ /dev/null @@ -1,33 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistreraffection() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codeAffection = $this->requete->getParametreFormulaire("codeAffection"); - - $this->feuillemaladie->enregistreraffection($numeroFeuilleMaladie, $codeAffection) ; - - // $this->executerAction("index"); - } - - public function supprimeraffection() - { - $idAffection = $this->requete->getParametreFormulaire("idAffection"); - $this->feuillemaladie->supprimeraffection($idAffection); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerchambre.php b/extranet/Controleur/ControleurAjaxenregistrerchambre.php deleted file mode 100644 index 638f37a..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerchambre.php +++ /dev/null @@ -1,48 +0,0 @@ -prestationacte = new Prestationactes(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerchambre() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $valeurActe = $this->requete->getParametreFormulaire("valeurActe", "numerique"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - $debut = $this->requete->getParametreDate("debut"); - $fin = $this->requete->getParametreDate("fin"); - $numeroChambre = $this->requete->getParametreFormulaire("numeroChambre"); - - $autorisation = $this->requete->getParametreFormulaire("autorisation"); - $prixTarif = $this->requete->getParametreFormulaire("prixTarif", "numerique"); - - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - - $this->prestationacte->enregistrerchambre($codeActe, $quantite, $prixActe, $valeurActe, $montantTm, $aRembourser, $debut, $fin, - $numeroChambre, $autorisation, $prixTarif, $ententePrealable); - - // A mettre en commentaire - // $this->executerAction("index"); - } - - public function supprimerchambre() - { - $idChambre = $this->requete->getParametre("idChambre"); - - $this->prestationacte->supprimerchambre($idChambre); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerconsultation.php b/extranet/Controleur/ControleurAjaxenregistrerconsultation.php deleted file mode 100644 index 50a3286..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerconsultation.php +++ /dev/null @@ -1,141 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $this->genererVueAjax(array('numeroFeuilleMaladie' => $numeroFeuilleMaladie)); - } - - public function enregistrerconsultation() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $dateSurvenance = $this->requete->getParametreDate("dateSurvenance"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $observations = $this->requete->getParametreFormulaire("observations"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $numeroDerogation = $this->requete->getParametreFormulaire("numeroDerogation"); - $numeroDerogationFinger = $this->requete->getParametreFormulaire("numeroDerogationFinger"); - $codeRaisonConsultation = $this->requete->getParametreFormulaire("codeRaisonConsultation"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - $medecinManquant = $this->requete->getParametreFormulaire("medecinManquant"); - $codeSpecialiteManuel = $this->requete->getParametreFormulaire("codeSpecialiteManuel"); - - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $numeroFeuilleMaladie = $this->feuillemaladie->enregistrerconsultation($codeActe, $dateSurvenance, $numeroBon, - $observations, $prixActe, $montantTm, $aRembourser, $codeMedecin, $codeRaisonConsultation, $numeroDerogation, - $numeroDerogationFinger, $medecinManquant, $codeGestionBon, $codeSpecialiteManuel); - - // $this->executerAction("index"); - } - - public function mailconsultation() - { - $emailDestination = $_SESSION['p_emailAdherent_C']; - - /* Pour les tests */ - $email_standard = $_SESSION['p_email_standard']; - if($email_standard>" ") - { - $emailDestination .= ";".$email_standard ; - } - /* Fin mails tests */ - - /* Pour empêcher les envois de mails */ - $emailDestination = "lkane@ebene.info"; - /* Fin Pour empêcher les envois de mails */ - - if($emailDestination>" ") - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $dateSurvenance = $this->requete->getParametreDate("dateSurvenance"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $observations = $this->requete->getParametreFormulaire("observations"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - - // DEBUT ENVOI DU MAIL - - require_once 'Framework/Ebenegmail.php'; - - $obejt = "ALERTE CONSOMMATION"; - - $body = "- Prestataire : ".$_SESSION['p_prestataire_C']." - -- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].") - -- Date : ".heureCourante()." - -- Acte : Consultation - -- Coût : ".format_N($prixActe)." ".$_SESSION['p_devise_C']." - -- Ticket Modérateur : ".format_N($montantTm)." ".$_SESSION['p_devise_C']." - -Merci et bonne réception."; - - $body = convertirc($body); - - $addr = explode(';', $emailDestination); - foreach ($addr as $ad) - { - $mail->AddAddress(trim($ad) ); - } - - // $mail->AddBCC($destCC1, "Pour EBENE"); // Copie cachée BCC - - $mail->Subject = $obejt; - - $mail->Body=$body; - // $mail->AltBody=$body; - - // $mail->addAttachment($pj); - - $mail->send(); - } - } - - public function enregistrerinitconsultation() - { - $dateSurvenance = $this->requete->getParametreDate("dateSurvenance"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $numeroDerogation = $this->requete->getParametreFormulaire("numeroDerogation"); - $numeroDerogationFinger = $this->requete->getParametreFormulaire("numeroDerogationFinger"); - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $numeroFeuilleMaladie = $this->feuillemaladie->enregistrerinitconsultation($dateSurvenance, $numeroBon, $numeroDerogation, $numeroDerogationFinger, $codeGestionBon); - - // $this->executerAction("index"); - } - - public function completerconsultation() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - // $observations = $this->requete->getParametreFormulaire("observations"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $codeRaisonConsultation = $this->requete->getParametreFormulaire("codeRaisonConsultation"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - $medecinManquant = $this->requete->getParametreFormulaire("medecinManquant"); - $codeSpecialiteManuel = $this->requete->getParametreFormulaire("codeSpecialiteManuel"); - - $this->feuillemaladie->completerconsultation($codeActe, $prixActe, $montantTm, $aRembourser, - $codeMedecin, $codeRaisonConsultation, $medecinManquant, $codeSpecialiteManuel); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerdemandederogation.php b/extranet/Controleur/ControleurAjaxenregistrerdemandederogation.php deleted file mode 100644 index df092ed..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerdemandederogation.php +++ /dev/null @@ -1,83 +0,0 @@ -derogation = new Derogation(); - } - - public function index() - { - } - - public function enregistrerdemandederogation() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeDerogation = $this->requete->getParametreFormulaire("codeDerogation"); - $observations = $this->requete->getParametreFormulaire("observations"); - - $this->derogation->enregistrerdemandederogation($codeDerogation, $observations); - } - - public function maildemandederogation() - { - $emailDestination = $_SESSION['p_emailAdherent_C']; - - if($emailDestination>" ") - { - $emailDestination .= ";".$_SESSION['p_emailGestionBon_C']; - } - - /* Pour les tests */ - $email_standard = $_SESSION['p_email_standard']; - if($email_standard>" ") - { - $emailDestination .= ";".$email_standard ; - } - /* Fin mails tests */ - - /* Pour empêcher les envois de mails */ - $emailDestination = "lkane@ebene.info"; - /* Fin Pour empêcher les envois de mails */ - - if($emailDestination>" ") - { - $codeDerogation = $this->requete->getParametreFormulaire("codeDerogation"); - $libelleDerogation = $this->requete->getParametreFormulaire("libelleDerogation"); - $observations = $this->requete->getParametreFormulaire("observations"); - - // DEBUT ENVOI DU MAIL - - require_once 'Framework/Ebenegmail.php'; - - $obejt = "DEMANDE DE DEROGATION"; - - $body = "- Prestataire : ".$_SESSION['p_prestataire_C']." - -- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].") - -- Date : ".heureCourante()." - -- Dérogation : ".$libelleDerogation." - -- Motivations : ".$observations." - -Merci et bonne réception."; - - $body = convertirc($body); - - $addr = explode(';', $emailDestination); - foreach ($addr as $ad) - { - $mail->AddAddress(trim($ad) ); - } - $mail->Subject = $obejt; - $mail->Body=$body; - $mail->send(); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerhospitalisation.php b/extranet/Controleur/ControleurAjaxenregistrerhospitalisation.php deleted file mode 100644 index 1f6b30c..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerhospitalisation.php +++ /dev/null @@ -1,26 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerhospitalisation() - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->feuillemaladie->enregistrerhospitalisation($numeroBon, $codeGestionBon); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistreroptique.php b/extranet/Controleur/ControleurAjaxenregistreroptique.php deleted file mode 100644 index fd070cb..0000000 --- a/extranet/Controleur/ControleurAjaxenregistreroptique.php +++ /dev/null @@ -1,30 +0,0 @@ -optique = new Optique_temp(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistreroptique() - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->optique->enregistreroptique($numeroBon, $codeMedecin, $codeGestionBon); - } - - public function videroptiquetemp() - { - $this->optique->videroptiquetemp(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerprescription.php b/extranet/Controleur/ControleurAjaxenregistrerprescription.php deleted file mode 100644 index 91b6294..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerprescription.php +++ /dev/null @@ -1,32 +0,0 @@ -prescription = new Prescription(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerprescription() - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->prescription->enregistrerprescription($numeroBon, $codeMedecin, $codeGestionBon); - } - - public function noprescription() - { - $this->prescription->noprescription(); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerprescriptionexamen.php b/extranet/Controleur/ControleurAjaxenregistrerprescriptionexamen.php deleted file mode 100644 index e813524..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerprescriptionexamen.php +++ /dev/null @@ -1,31 +0,0 @@ -examen = new Examen_temp(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerprescriptionexamen() - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->examen->enregistrerprescriptionexamen($numeroBon, $codeMedecin, $codeGestionBon); - } - - public function videroptiquetemp() - { - $this->optique->videroptiquetemp(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerprescriptionseance.php b/extranet/Controleur/ControleurAjaxenregistrerprescriptionseance.php deleted file mode 100644 index 9e88b3f..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerprescriptionseance.php +++ /dev/null @@ -1,44 +0,0 @@ -seance = new Seance_temp(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerprescriptionseance() - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->seance->enregistrerprescriptionseance($numeroBon, $codeMedecin, $codeGestionBon); - } - - - public function modifierprescriptionseance() - { - $codeActePrescription = $this->requete->getParametreFormulaire("codeActePrescription"); - $quantite = $this->requete->getParametreFormulaire("quantite"); - - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $montantArembourser = $this->requete->getParametreFormulaire("montantArembourser", "numerique"); - $fraisReel = $this->requete->getParametreFormulaire("fraisReel", "numerique"); - - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - $autorisation = $this->requete->getParametreFormulaire("autorisation"); - - $this->seance->modifierprescriptionseance($codeActePrescription, $quantite, $prixActe, $montantTm, $montantArembourser, - $fraisReel, $ententePrealable); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenregistrerverre.php b/extranet/Controleur/ControleurAjaxenregistrerverre.php deleted file mode 100644 index d3207e4..0000000 --- a/extranet/Controleur/ControleurAjaxenregistrerverre.php +++ /dev/null @@ -1,30 +0,0 @@ -detailoptique = new Detailoptique(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function enregistrerverre() - { - $codeOptique = $this->requete->getParametreFormulaire("codeOptique"); - - $this->detailoptique->enregistrerverre($codeOptique); - } - - public function supprimerverre() - { - $idOptique = $this->requete->getParametre("idOptique"); - - $this->detailoptique->supprimerverre($idOptique); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxenvoimaildivers.php b/extranet/Controleur/ControleurAjaxenvoimaildivers.php deleted file mode 100644 index dd79d94..0000000 --- a/extranet/Controleur/ControleurAjaxenvoimaildivers.php +++ /dev/null @@ -1,118 +0,0 @@ -finger = new Finger(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function verifiertentativeidentitification() - { - $user_id = $this->requete->getParametreFormulaire("user_id"); - - $nbTentative = $this->finger->verifier_tentative_identification($user_id); - - $_SESSION['p_nbTentative'] = $nbTentative; - - // $this->executerAction("index"); - $this->genererVueAjax(array('nbTentative' => $nbTentative)); - } - - public function mailfraudeidentite() - { - require_once 'Framework/Ebenegmail.php'; - - $emailDestination = $_SESSION['p_emailGestionBon_C']; - - /* Pour les tests */ - $email_standard = $_SESSION['p_email_standard']; - if($email_standard>" ") - { - $emailDestination .= ";".$email_standard ; - } - /* Fin mails tests */ - - /* Pour empêcher les envois de mails */ - $emailDestination = "lkane@ebene.info"; - /* Fin Pour empêcher les envois de mails */ - - $obejt = "ALERTE PLUS DE 3 TENTATIVES D'IDENTIFICATION"; - - $body = "- Prestataire : ".$_SESSION['p_prestataire_C']." - -- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].") - -- Date : ".heureCourante()." - -Merci et bonne réception."; - - $body = convertirc($body); - - $addr = explode(';', $emailDestination); - foreach ($addr as $ad) - { - $mail->AddAddress(trim($ad) ); - } - - $mail->Subject = $obejt; - - $mail->Body=$body; - - $mail->send(); - } - - public function mailententeprealable() - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - - require_once 'Framework/Ebenegmail.php'; - - $emailDestination = $_SESSION['p_emailMedecinConseil_C']; - - /* Pour les tests */ - $email_standard = $_SESSION['p_email_standard']; - if($email_standard>" ") - { - $emailDestination .= ";".$email_standard ; - } - /* Fin mails tests */ - - /* Pour empêcher les envois de mails */ - $emailDestination = "lkane@ebene.info"; - /* Fin Pour empêcher les envois de mails */ - - $obejt = "ALERTE HOSPITALISATION"; - - $body = "- Prestataire : ".$_SESSION['p_prestataire_C']." - -- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].") - -- Date : ".heureCourante()." - -- No Bon Hospitalisation : ".$numeroBon." - -Merci et bonne réception."; - - $body = convertirc($body); - - $addr = explode(';', $emailDestination); - foreach ($addr as $ad) - { - $mail->AddAddress(trim($ad) ); - } - - $mail->Subject = $obejt; - - $mail->Body=$body; - - $mail->send(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxexamenspossiblesselection.php b/extranet/Controleur/ControleurAjaxexamenspossiblesselection.php deleted file mode 100644 index 4b9d792..0000000 --- a/extranet/Controleur/ControleurAjaxexamenspossiblesselection.php +++ /dev/null @@ -1,19 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe"); - - $actes = $this->acte->geatexamenspossiblesselection($codeFamilleActe); - $this->genererVueAjax(array('actes' => $actes)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxfacturatioseancecso.php b/extranet/Controleur/ControleurAjaxfacturatioseancecso.php deleted file mode 100644 index eb69b87..0000000 --- a/extranet/Controleur/ControleurAjaxfacturatioseancecso.php +++ /dev/null @@ -1,40 +0,0 @@ -prescription = new Seance_temp(); - } - - public function index() - { - /* - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - */ - $numeroBonKine = $_SESSION['p_numeroBonKine_C']; - - $prescription = $this->prescription->getprescription_sea($numeroBonKine); - - $this->genererVueAjax(array('prescription' => $prescription)); - } - - public function modifierseancecso() - { - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - - $fraisReel = round($prixActe*$quantite); - $montantTm = round(($fraisReel*$_SESSION['p_tm_C'])/100); - $aRembourser = $fraisReel-$montantTm; - - $this->prescription->modifierseancecso($quantite, $fraisReel, $montantTm, $aRembourser); - } - - public function facturerseance() - { - $this->prescription->facturerseance(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxfacturatioseancesea.php b/extranet/Controleur/ControleurAjaxfacturatioseancesea.php deleted file mode 100644 index 1008b54..0000000 --- a/extranet/Controleur/ControleurAjaxfacturatioseancesea.php +++ /dev/null @@ -1,41 +0,0 @@ -prescription = new Seance_temp(); - $this->prestation = new Prestationactes(); - $this->acte = new Detailtarifacte(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroBonKine = $_SESSION['p_numeroBonKine_C']; - - $prescription = $this->prescription->getprescription_sea($numeroBonKine); - - $garantieadherent_temp = $this->prestation->afficher_garantieadherent_temp(); - - $acte = $this->acte->getseancespossibles(); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - - $this->genererVueAjax(array('prescription' => $prescription, 'garantieadherent_temp' => $garantieadherent_temp, - 'acte' => $acte, 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function facturerseance() - { - $user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut"); - - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->prescription->facturerseance($user_id_substitut, $codeGestionBon); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxfacturecons.php b/extranet/Controleur/ControleurAjaxfacturecons.php deleted file mode 100644 index 229b3e6..0000000 --- a/extranet/Controleur/ControleurAjaxfacturecons.php +++ /dev/null @@ -1,140 +0,0 @@ -prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription_pha($numeroBonOrdonnance); - - $detailprescriptions = $this->detailprescription->getdetailprescription_pha($numeroBonOrdonnance); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - // $detaillivres = $this->prescription->getdetaillivre(); - $detaillivres = $this->prescription->getdetaillivrepha(); - - // $factures = $this->prescription->getfactures_ordonnance($numeroBonOrdonnance); - - $garantieadherent_temp = $this->prestation->getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - /* - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, - 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'factures' => $factures)); - */ - - $this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, - 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp)); - } - - public function ajoutermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->ajoutermedicament($idMedicament); - - $this->executerAction("index"); - } - - public function ajoutermedicamenttous() - { - $this->prescription->ajoutermedicamenttous(); - $this->executerAction("index"); - } - - public function retirermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->retirermedicament($idMedicament); - - $this->executerAction("index"); - } - - public function retirermedicamenttous() - { - $this->prescription->retirermedicamenttous(); - $this->executerAction("index"); - } - - public function enregistrerpharmacie() - { - $this->prescription->facturerpharmacie(); - } - - public function annulersubstitutionmedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->annulersubstitutionmedicament($idMedicament); - - $this->executerAction("index"); - } - - public function enregistrersubstitutionmedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - $prixSubstitut = $this->requete->getParametreFormulaire("prixSubstitut", "numerique"); - - $this->prescription->enregistrersubstitutionmedicament($idMedicament, $prixSubstitut); - - $this->executerAction("index"); - } - - public function ajoutermedicamentprescription() - { - $codeMedicament = $this->requete->getParametreFormulaire("codeMedicament"); - - $this->detailprescription->ajoutermedicamentpha($codeMedicament); - - $this->executerAction("index"); - } - - public function majquantitepha() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailprescription->majquantitepha($idMedicament, $quantite); - - $this->executerAction("index"); - } - - public function demanderaccordpha() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->detailprescription->demanderaccordpha($idMedicament); - - $this->executerAction("index"); - } - - public function majprixpha() - { - $idMedicament = $this->requete->getParametre("idMedicament"); - $prix = $this->requete->getParametreFormulaire("prix", "numerique"); - - // $this->detailprescription->majquantitepha($idMedicament, $quantite); - $this->detailprescription->majprixpha($idMedicament, $prix); - - $this->executerAction("index"); - } -} - diff --git a/extranet/Controleur/ControleurAjaxfactureconspop.php b/extranet/Controleur/ControleurAjaxfactureconspop.php deleted file mode 100644 index ce427fc..0000000 --- a/extranet/Controleur/ControleurAjaxfactureconspop.php +++ /dev/null @@ -1,72 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $_SESSION['p_idFacture_C'] = $idFacture; - - $facture = $this->facture->consulterfacturefacture($idFacture) ; - - $this->genererVueAjax(array('facture' => $facture)); - } - - public function feuillemaladie() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $feuillemaladie = $this->facture->consulterfacturefeuillemaladie($idFacture) ; - - $diagnostics = $this->facture->consulterfacturediagnostics($idFacture); - - $this->genererVueAjax(array('feuillemaladie' => $feuillemaladie, 'diagnostics' => $diagnostics)); - } - - public function prestationactes() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $prestations = $this->facture->consulterfactureprestationactes($idFacture) ; - - $this->genererVueAjax(array('prestations' => $prestations)); - } - - public function medicaments() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $medicaments = $this->facture->consulterfacturemedicaments($idFacture) ; - - $this->genererVueAjax(array('medicaments' => $medicaments)); - } - - public function verres() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $verres = $this->facture->consulterfactureverres($idFacture) ; - - $this->genererVueAjax(array('verres' => $verres)); - } - - public function geds() - { - unset($_FILES['fichier_upload']); - - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $geds = $this->facture->getgedfacture($idFacture); - - $this->genererVueAjax(array('geds' => $geds)); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxfactureconsprestataire.php b/extranet/Controleur/ControleurAjaxfactureconsprestataire.php deleted file mode 100644 index 1c284e4..0000000 --- a/extranet/Controleur/ControleurAjaxfactureconsprestataire.php +++ /dev/null @@ -1,72 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $_SESSION['p_idFacture_C'] = $idFacture; - - $facture = $this->facture->consulterfacturefacture($idFacture) ; - - $this->genererVueAjax(array('facture' => $facture)); - } - - public function feuillemaladie() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $feuillemaladie = $this->facture->consulterfacturefeuillemaladie($idFacture) ; - - $diagnostics = $this->facture->consulterfacturediagnostics($idFacture); - - $this->genererVueAjax(array('feuillemaladie' => $feuillemaladie, 'diagnostics' => $diagnostics)); - } - - public function prestationactes() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $prestations = $this->facture->consulterfactureprestationactes($idFacture) ; - - $this->genererVueAjax(array('prestations' => $prestations)); - } - - public function medicaments() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $medicaments = $this->facture->consulterfacturemedicaments($idFacture) ; - - $this->genererVueAjax(array('medicaments' => $medicaments)); - } - - public function verres() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $verres = $this->facture->consulterfactureverres($idFacture) ; - - $this->genererVueAjax(array('verres' => $verres)); - } - - public function geds() - { - unset($_FILES['fichier_upload']); - - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $geds = $this->facture->getgedfacture($idFacture); - - $this->genererVueAjax(array('geds' => $geds)); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxfacturerfeuillemaladie.php b/extranet/Controleur/ControleurAjaxfacturerfeuillemaladie.php deleted file mode 100644 index 405bd2f..0000000 --- a/extranet/Controleur/ControleurAjaxfacturerfeuillemaladie.php +++ /dev/null @@ -1,22 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - } - - public function facturer() - { - $user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut"); - - $this->feuillemaladie->facturer($user_id_substitut); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxfeuillemaladie.php b/extranet/Controleur/ControleurAjaxfeuillemaladie.php deleted file mode 100644 index 9a89a58..0000000 --- a/extranet/Controleur/ControleurAjaxfeuillemaladie.php +++ /dev/null @@ -1,196 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - $this->prestation = new Prestationactes(); - $this->typeaffection = new Typeaffection(); - $this->affection = new Affection(); - $this->beneficiaire = new Beneficiaire(); - $this->facture = new Facture(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $garantieadherent_temp = null; - - $infosfeuillemaladie = $this->feuillemaladie->getinfosfeuillemaladie($numeroFeuilleMaladie); - $facture = $infosfeuillemaladie['facture']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($facture==0) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - } - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); - - $prestations = $this->prestation->getprestationsfeuille($numeroFeuilleMaladie, $codePrestataire); - - $typeaffections = $this->typeaffection->getListe() ; - - $codeTypeAffection = $feuillemaladie['codeTypeAffection']; - - $affections = $this->affection->getListe($codeTypeAffection) ; - - $diagnostics = $this->feuillemaladie->getDiagnostics($numeroFeuilleMaladie); - - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - - $this->genererVueAjax(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations, - 'garantieadherent_temp' => $garantieadherent_temp, 'typeaffections' => $typeaffections, 'affections' => $affections, - 'diagnostics' => $diagnostics, 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function imprimerfacture() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladieimpression($numeroFeuilleMaladie); - - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - - $facture = $this->facture->consulterfacturefacture($idFacture) ; - - $prestations = $this->facture->consulterfactureprestationactes($idFacture) ; - - $pdf = new FPDF('L'); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=8; - - $pdf->SetMargins(15, 15, 15) ; - - $pdf->SetFont('Arial','BI', 10); - - $pdf->Cell(130,$ht,convertirc($_SESSION['p_nomSociete']),0,0,'L',false); - $pdf->Cell(130,$ht,convertirc(_("FACTURE"). " No ".$facture['idFacture']." => " . $facture['prestataire']),0,1,'R',false); - - $pdf->ln(5); - - $pdf->SetFont('Arial','', 10); - - $pdf->Cell(40,$ht,convertirc(_("Souscripteur")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['souscripteur']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Patient")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['beneficiaire'] . " ( " . $feuillemaladie['numeroBeneficiaire'] . " )"),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Adhérent")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['adherent']),0,0,'L',false); - - /* - $pdf->Cell(40,$ht,convertirc("E-mail"),0,0,'L',false); - $pdf->Cell(160,$ht,convertirc(" : ".$feuillemaladie['emailAdherent']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc("No Tel"),0,0,'L',false); - $pdf->Cell(160,$ht,convertirc(" : ".$feuillemaladie['telAdherent']),0,1,'L',false); - */ - - $pdf->Cell(25,$ht,convertirc(_("Systeme")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".dateheureFr($feuillemaladie['dateSysteme'])),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Médecin")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['medecinConsultation']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("No OM")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['noOrdreMedecin']),0,1,'L',false); - - /* - $pdf->Cell(40,$ht,convertirc("Consultation"),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".dateFr($feuillemaladie['dateConsultation'])),0,0,'L',false); - */ - - $pdf->Cell(40,$ht,convertirc(_("Raison Cons")),0,0,'L',false); - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['raisonconsultationEng']),0,0,'L',false); - } - else - { - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['raisonconsultation']),0,0,'L',false); - } - - $pdf->Cell(25,$ht,convertirc(_("No Bon")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonConsultation']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Ord Pharm")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonOrdonnance']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Ord Verres")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroBonOptique']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Bon Exam")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonExamen']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Bon KINE")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroBonKine']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Bon Hospit")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonHospitalisation']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Facturé par")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$facture['codeUtilisateur']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc("Date"),1,0,'C',false); - $pdf->Cell(117,$ht,convertirc(_("Acte")),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("Valeur")),1,0,'C',false); - $pdf->Cell(10,$ht,convertirc(_("Qté")),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("Frais")),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("T M")),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("A Remb")),1,1,'C',false); - - foreach ($prestations as $prestation) - { - $pdf->Cell(40,$ht,dateheureLang($prestation['dateSysteme']),1,0,'C',false); - $pdf->Cell(117,$ht,convertirc($prestation['libelleActe']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($prestation['valeurActe']),1,0,'C',false); - $pdf->Cell(10,$ht,format_N($prestation['quantite']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($prestation['fraisReel']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($prestation['montantTm']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($prestation['montantArembourser']),1,1,'C',false); - } - - $pdf->SetFont('Arial','B', 10); - - $pdf->Cell(187,$ht,convertirc("Total : "),1,0,'C',false); - - $pdf->Cell(20,$ht,format_N($facture['fraisReel']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($facture['montantTm']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($facture['montantArembourser']),1,1,'C',false); - - $fichier="Temp/facture"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
societeuser = new Societeuser(); - } - - public function index() - { - $this->genererVueAjax(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxged.php b/extranet/Controleur/ControleurAjaxged.php deleted file mode 100644 index a92b6fb..0000000 --- a/extranet/Controleur/ControleurAjaxged.php +++ /dev/null @@ -1,35 +0,0 @@ -ged = new Ged(); - } - - public function index() - { - // $this->genererVueAjax(array('reponse' => $reponse)); - $this->genererVueAjax(); - } - - public function verifierexistancefichier() - { - $cheminFichier = $this->requete->getParametreFormulaire("cheminFichier"); - - // modifié à cause de l'url distant chez le prestataire => remote_file_exists($url) - // if(file_exists($cheminFichier)) - if(remote_file_exists($cheminFichier)) - { - $reponse = "1"; - } else - { - $reponse = "0"; - } - - echo "$reponse"; - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaximprimerdemandedecompte.php b/extranet/Controleur/ControleurAjaximprimerdemandedecompte.php deleted file mode 100644 index 4a34dad..0000000 --- a/extranet/Controleur/ControleurAjaximprimerdemandedecompte.php +++ /dev/null @@ -1,151 +0,0 @@ -reglement = new Demandedecompte(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function imprimerdemandecompte() - { - $idDemandeDecompte = $_SESSION['p_idDemandeDecompte_C']; - $numeroDemandeDecompte = $_SESSION['p_numeroDemandeDecompte_C']; - $villeSignature = $_SESSION['p_villeSignature_C']; - - $reglement = $this->reglement->getdemandedecompte($idDemandeDecompte); - - $codeTypePrestataire = $reglement['codeTypePrestataire']; - - if($codeTypePrestataire=="CSO") - { - $factures = $this->reglement->getdetaildemandedecompteexportcso($numeroDemandeDecompte); - } - elseif($codeTypePrestataire=="PHA") - { - $factures = $this->reglement->getdetaildemandedecompteexportpha($numeroDemandeDecompte); - } - elseif($codeTypePrestataire=="OPT") - { - $factures = $this->reglement->getdetaildemandedecompteexportopt($numeroDemandeDecompte); - } - elseif($codeTypePrestataire=="LAB") - { - $factures = $this->reglement->getdetaildemandedecompteexportlab($numeroDemandeDecompte); - } - elseif($codeTypePrestataire=="SEA") - { - $factures = $this->reglement->getdetaildemandedecompteexportsea($numeroDemandeDecompte); - } - - // $nb = count($factures); - - $pdf = new FPDF('L'); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=4; - - $pdf->SetMargins(10, 10, 10) ; - - $pdf->SetFont('Arial','BI', 7); - - $pdf->Cell(0,$ht,convertirc($_SESSION['p_nomSociete']),0,0,'L',false); - $pdf->Cell(0,$ht,convertirc(_("BORDERAU DEMANDE DECOMPTE") . " No ".$reglement['numeroDemandeDecompte']." => " . _("PRESTATAIRE") . " => " . $reglement['prestataire']),0,1,'R',false); - - $pdf->SetFont('Arial','', 7); - - $pdf->Cell(0,$ht,convertirc(_('Edité par le prestataire le') . ' : '.heureCouranteLang($_SESSION['p_lang'])),0,0,'L',false); - - $pdf->Cell(0,$ht,convertirc(_("PERIODE") . " : " . $reglement['periode']),0,1,'R',false); - - $pdf->SetFont('Arial','', 6); - - $pdf->Cell(10,$ht,convertirc("No"),1,0,'C',false); - $pdf->Cell(10,$ht,convertirc("Dt"),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("Police")),1,0,'C',false); - $pdf->Cell(50,$ht,convertirc(_("Souscripteur")),1,0,'L',false); - $pdf->Cell(50,$ht,convertirc(_("Adhérent")),1,0,'L',false); - $pdf->Cell(15,$ht,convertirc(_("No Benef")),1,0,'C',false); - $pdf->Cell(50,$ht,convertirc(_("Bénéficiaire")),1,0,'L',false); - $pdf->Cell(15,$ht,convertirc(_("Bon")),1,0,'C',false); - - $pdf->Cell(20,$ht,convertirc(_("Coût")),1,0,'R',false); - $pdf->Cell(15,$ht,convertirc(_("T M")),1,0,'R',false); - $pdf->Cell(20,$ht,convertirc(_("Retenu")),1,1,'R',false); - - $ordre = "0"; - $fraisReel = "0"; - $montantTm = "0"; - $montantArembourser = "0"; - $fraisRetenu = "0"; - - - foreach ($factures as $facture) - { - $ordre++; - $pdf->Cell(10,$ht,$ordre,1,0,'C',false); - $pdf->Cell(10,$ht,$facture['jourFacture'],1,0,'C',false); - $pdf->Cell(20,$ht,convertirc($facture['numeroPolice']),1,0,'C',false); - $pdf->Cell(50,$ht,convertirc(substr($facture['souscripteur'], 0, 25)),1,0,'L',false); - $pdf->Cell(50,$ht,substr($facture['adherent'], 0, 30),1,0,'L',false); - $pdf->Cell(15,$ht,convertirc($facture['numeroBeneficiaire']),1,0,'C',false); - $pdf->Cell(50,$ht,substr($facture['beneficiaire'], 0, 30),1,0,'L',false); - $pdf->Cell(15,$ht,convertirc($facture['numeroBon']),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($facture['fraisReel']),1,0,'R',false); - $pdf->Cell(15,$ht,format_N($facture['montantTm']),1,0,'R',false); - $pdf->Cell(20,$ht,format_N($facture['fraisRetenu']),1,1,'R',false); - - $fraisReel += $facture['fraisReel']; - $montantTm += $facture['montantTm']; - $montantArembourser += $facture['montantArembourser']; - $fraisRetenu += $facture['fraisRetenu']; - } - - $pdf->SetFont('Arial','B', 6); - - $pdf->Cell(220,$ht,convertirc("TOTAUX : "),1,0,'C',false); - - $pdf->Cell(20,$ht,format_N($fraisReel),1,0,'R',false); - $pdf->Cell(15,$ht,format_N($montantTm),1,0,'R',false); - $pdf->Cell(20,$ht,format_N($fraisRetenu),1,1,'R',false); - - $pdf->SetFontSize(8); - $pdf->Cell(0,6,convertirc(_('Arrêté la présente demande de décompte à la somme de') . ' :'),0,1,'C',false); - $pdf->SetFont('','I'); - $pdf->SetFillColor(135,206,250); // bleu - - // $pdf->Cell(0,6,asLetters($fraisRetenu)." ".$_SESSION['p_devise_C'],0,1,'C',true); - $pdf->Cell(0,6, convetirEnLettre($fraisRetenu, $_SESSION['p_lang'])." ".$_SESSION['p_devise_C'],0,1,'C',true); - - $pdf->SetFont(''); - - // $pdf->SetY(-70); - - $pdf->Cell(0,6,convertirc(_('Fait à') . ' ' . $villeSignature.', ' . _('le') . ' ') . dateCouranteLang($_SESSION['p_lang']),0,1,'C',false); - - $pdf->Ln(10); - $pdf->SetFont('','U'); - $pdf->Cell(0,6,convertirc(_('Pour') . ' : '.$reglement['prestataire']),0,0,'C',false); - - - $fichier="Temp/borderau_decompte"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - - $t_html .='
reglement = new Reglement(); - } - - public function index() - { - $idReglement = $_SESSION['p_idReglement_C']; - $numeroDecompte = $_SESSION['p_numeroDecompte_C']; - - $reglement = $this->reglement->getreglement($idReglement); - - $pdf = new FPDF(); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=10; - - $lg=60; - - $pdf->SetMargins(10, 10, 10) ; - - $pdf->SetFont('Arial','B', 15); - - $pdf->SetY(30); - - $pdf->Cell(0,10,convertirc($_SESSION['p_nomSociete']),1,1,'C',false); - - $pdf->Ln(10); - - $pdf->SetFont('Arial','BU', 15); - - $pdf->SetFontSize(12); - - $pdf->Cell(0,10,convertirc(_("DEMANDE DE REGLEMENT POUR DECOMPTE") . " No ".$reglement['numeroDecompte']),0,1,'C',false); - - $pdf->Ln(10); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc(_("PRESTATAIRE")),0,0,'L',false); - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,convertirc(': '.$reglement['prestataire']),0,1,'L'); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc(_("MONTANT EN CHIFFRES")),0,0,'L',false); - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,": ".format_N($reglement['montantApayer'])." ".$_SESSION['p_devise_C'],0,1,'L'); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc(_("MONTANT EN LETTRES")),0,0,'L',false); - $pdf->SetFont('Arial','I',12); - // $pdf->Cell(0,10,": ".asLetters($reglement['montantApayer'])." ".$_SESSION['p_devise_C'],0,1,'L'); - $pdf->Cell(0,10,": ".convetirEnLettre($reglement['montantApayer'], $_SESSION['p_lang'])." ".$_SESSION['p_devise_C'],0,1,'L'); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc("SERVICE DEMANDEUR"),0,0,'L',false); - - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,convertirc(": DIRECTION SANTE"),0,1,'L'); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc("A VERSER AU COMPTE No"),0,0,'L',false); - - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,convertirc(":"),0,1,'L'); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc("SUR"),0,0,'L',false); - - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,convertirc(":"),0,1,'L'); - - $pdf->Ln(10); - - $pdf->Cell(0,10,convertirc('Fait à '.$_SESSION['p_villeSociete'].', le ').heureCourante(),0,1,'C',false); - - $pdf->Ln(10); - - $pdf->SetFont('Arial','B', 12); - $pdf->Cell($lg,10,convertirc("VISA DIRECTION SANTE"),0,0,'L',false); - $pdf->Cell(0,10,convertirc("VISA DAF"),0,1,'R'); - - $pdf->Ln(20); - - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,convertirc("Chèque No :"),0,1,'L'); - $pdf->Cell(0,10,convertirc("Sur :"),0,1,'L'); - - $pdf->SetFont('Arial','BU', 15); - - $pdf->SetFontSize(12); - - $pdf->Cell(0,20,convertirc("REMISE CHEQUE"),0,1,'C',false); - - $pdf->SetFont('Arial','I',12); - $pdf->Cell(0,10,convertirc("Nom et Prénoms :"),0,1,'L'); - $pdf->Cell(0,10,convertirc("Carte d'identité No :"),0,1,'L'); - $pdf->Cell(0,10,convertirc("Délivrée à :"),0,1,'L'); - $pdf->Cell(0,10,convertirc("Siganture :"),0,1,'L'); - - $fichier="Temp/demande_regelement"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
reglement->getreglement($idReglement); - - $codeTypePrestataire = $reglement['codeTypePrestataire']; - - if($codeTypePrestataire=="CSO") - { - $factures = $this->reglement->getdetaildecompteexportcso($numeroDecompte); - } - elseif($codeTypePrestataire=="PHA") - { - $factures = $this->reglement->getdetaildecompteexportpha($numeroDecompte); - } - elseif($codeTypePrestataire=="OPT") - { - $factures = $this->reglement->getdetaildecompteexportopt($numeroDecompte); - } - elseif($codeTypePrestataire=="LAB") - { - $factures = $this->reglement->getdetaildecompteexportlab($numeroDecompte); - } - elseif($codeTypePrestataire=="SEA") - { - $factures = $this->reglement->getdetaildecompteexportsea($numeroDecompte); - } - - $pdf = new FPDF('L'); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=4; - - $pdf->SetMargins(10, 10, 10) ; - - $pdf->SetFont('Arial','BI', 7); - - $pdf->Cell(0,$ht,convertirc($_SESSION['p_nomSociete']),0,0,'L',false); - $pdf->Cell(0,$ht,convertirc("BORDERAU POUR DECOMPTE No ".$reglement['numeroDecompte']." => "."PRESTATAIRE ".$reglement['prestataire']),0,1,'R',false); - - $pdf->SetFont('Arial','', 7); - - $pdf->Cell(60,$ht,convertirc('Edité le : '.heureCourante()),0,0,'L',false); - - $pdf->Cell(60,$ht,convertirc($reglement['etatdecompte']),0,0,'C',false); - - // $pdf->Cell(60,$ht,convertirc("PERIODE : ".$reglement['periode']),0,0,'C',false); - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $pdf->Cell(60,$ht,convertirc("PERIODE : ".$reglement['periodeEng']),0,0,'C',false); - } - else - { - $pdf->Cell(60,$ht,convertirc("PERIODE : ".$reglement['periode']),0,0,'C',false); - } - - $pdf->Cell(0,$ht,convertirc('No Lot : '.$reglement['numeroLotDecompte']),0,1,'R',false); - - $pdf->SetFont('Arial','', 6); - - $pdf->Cell(7,$ht,convertirc("No"),1,0,'C',false); - $pdf->Cell(7,$ht,convertirc("Dt"),1,0,'C',false); - $pdf->Cell(14,$ht,convertirc("Police"),1,0,'C',false); - $pdf->Cell(36,$ht,convertirc("Souscripteur"),1,0,'L',false); - $pdf->Cell(44,$ht,convertirc("Adhérent"),1,0,'L',false); - $pdf->Cell(14,$ht,convertirc("No Benef"),1,0,'C',false); - $pdf->Cell(44,$ht,convertirc("Bénéficiaire"),1,0,'L',false); - $pdf->Cell(14,$ht,convertirc("Bon"),1,0,'C',false); - $pdf->Cell(17,$ht,convertirc("Actes Méd"),1,0,'R',false); - $pdf->Cell(17,$ht,convertirc("Méd & cons"),1,0,'R',false); - $pdf->Cell(17,$ht,convertirc("Coût"),1,0,'R',false); - $pdf->Cell(12,$ht,convertirc("TM"),1,0,'R',false); - $pdf->Cell(17,$ht,convertirc("Charge"),1,0,'R',false); - $pdf->Cell(17,$ht,convertirc("Retenu"),1,1,'R',false); - - - $ordre = "0"; - $fraisReel_acte_med = "0"; - $fraisReel_phar_cons = "0"; - $fraisReel = "0"; - $montantTm = "0"; - $montantArembourser = "0"; - $montantApayer = "0"; - - foreach ($factures as $facture) - { - $ordre++; - - $pdf->Cell(7,$ht,$ordre,1,0,'C',false); - $pdf->Cell(7,$ht,$facture['jourFacture'],1,0,'C',false); - $pdf->Cell(14,$ht,convertirc($facture['numeroPolice']),1,0,'C',false); - $pdf->Cell(36,$ht,convertirc(substr($facture['souscripteur'], 0, 25)),1,0,'L',false); - // $pdf->Cell(44,$ht,convertirc(substr($facture['adherent'], 0, 30)),1,0,'L',false); - $pdf->Cell(44,$ht,substr($facture['adherent'], 0, 30),1,0,'L',false); - $pdf->Cell(14,$ht,convertirc($facture['numeroBeneficiaire']),1,0,'C',false); - // $pdf->Cell(44,$ht,convertirc(substr($facture['beneficiaire'], 0, 30)),1,0,'L',false); - $pdf->Cell(44,$ht,substr($facture['beneficiaire'], 0, 30),1,0,'L',false); - $pdf->Cell(14,$ht,convertirc($facture['numeroBon']),1,0,'C',false); - $pdf->Cell(17,$ht,format_N($facture['fraisReel_acte_med']),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($facture['fraisReel_phar_cons']),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($facture['fraisReel']),1,0,'R',false); - $pdf->Cell(12,$ht,format_N($facture['montantTm']),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($facture['montantArembourser']),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($facture['montantApayer']),1,1,'R',false); - - $fraisReel_acte_med += $facture['fraisReel_acte_med']; - $fraisReel_phar_cons += $facture['fraisReel_phar_cons']; - $fraisReel += $facture['fraisReel']; - $montantTm += $facture['montantTm']; - $montantArembourser += $facture['montantArembourser']; - $montantApayer += $facture['montantApayer']; - } - - $pdf->SetFont('Arial','B', 6); - - $pdf->Cell(180,$ht,convertirc("TOTAUX : "),1,0,'C',false); - - $pdf->Cell(17,$ht,format_N($fraisReel_acte_med),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($fraisReel_phar_cons),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($fraisReel),1,0,'R',false); - $pdf->Cell(12,$ht,format_N($montantTm),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($montantArembourser),1,0,'R',false); - $pdf->Cell(17,$ht,format_N($montantApayer),1,1,'R',false); - - $pdf->SetFontSize(8); - $pdf->Cell(0,6,convertirc('Imprimé par le prestataire / Printed by the provider'),0,1,'C',false); - - $fichier="Temp/borderau_decompte"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
reglement->getreglement($idReglement); - - // $pdf = new FPDF(); - // On va mettre en paysage - // $pdf = new FPDF('L'); - $pdf = new FPDF(); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=10; - - $lg=60; - - $pdf->SetMargins(10, 10, 10) ; - - $pdf->SetFont('Arial','B', 15); - - $pdf->SetY(25); - - $pdf->Cell(0,10,convertirc($_SESSION['p_nomSociete']),1,1,'C',false); - - $pdf->Ln(5); - - $pdf->SetFont('Arial','BU', 15); - - $pdf->SetFontSize(12); - - $pdf->Cell(0,10,convertirc("DECOMPTE DE REGLEMENT"),0,1,'C',false); - - $pdf->Ln(5); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell($lg,10,convertirc("PRESTATAIRE"),0,0,'L',false); - $pdf->SetFont('Arial','I',11); - $pdf->Cell(0,10,convertirc(': '.$reglement['prestataire']),0,1,'L'); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell($lg,10,convertirc("PERIODE"),0,0,'L',false); - - $pdf->SetFont('Arial','I',11); - $pdf->Cell(0,10,convertirc(': '.$reglement['periode']),0,1,'L'); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell($lg,10,convertirc("MONTANT FACTURE"),0,0,'L',false); - $pdf->SetFont('Arial','I',11); - $pdf->Cell(0,10,": ".format_N($reglement['montantPrestataire'])." ".$_SESSION['p_devise_C'],0,1,'L'); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell($lg,10,convertirc("MONTANT A PAYER"),0,0,'L',false); - - $pdf->SetFont('Arial','I',11); - $pdf->Cell(0,10,": ".format_N($reglement['montantApayer'])." ".$_SESSION['p_devise_C'],0,1,'L'); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell($lg,10,convertirc("DIFFERENCES"),0,0,'L',false); - - $pdf->SetFont('Arial','I',11); - $pdf->Cell(0,10,": ".format_N($reglement['difference'])." ".$_SESSION['p_devise_C'],0,1,'L'); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell($lg,10,convertirc("MONTANT PAYE"),0,0,'L',false); - - $pdf->SetFont('Arial','I',11); - $pdf->Cell(0,10,": ".format_N($reglement['montantPaye'])." ".$_SESSION['p_devise_C'],0,1,'L'); - - - $pdf->Ln(5); - - $pdf->Cell(0,10,convertirc('APPROUVE, LE ').dateheureFr($reglement['heureValidationDecompte'])." par ".$reglement['userValidationDecompte'],0,1,'C',false); - - - $pdf->Ln(5); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell(0,10,convertirc('Fait à '.$_SESSION['p_villeSociete'].', le ').heureCourante(),0,1,'C',false); - - $pdf->Ln(5); - - $pdf->SetFont('Arial','B', 11); - $pdf->Cell(0,10,convertirc("Accord du Prestataire"),0,1,'C'); - - $fichier="Temp/TMP_ACCORD_PREST_DECOMPTE"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
reglement = new Reglement(); - } - - public function index() - { - $idReglement = $_SESSION['p_idReglement_C']; - $reglement = $this->reglement->getreglement($idReglement); - $recapecartdecompte = $this->reglement->getrecapecartdecompte($idReglement); - $ecartfactures = $this->reglement->getecartsdecompte("1"); - $ecartnonsaisis = $this->reglement->getecartsdecompte("0"); - - $pdf = new FPDF(); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - // $_SESSION['p_nomSociete'] - - $ht=6; - - $lg1=35; - $lg2=75; - $lg3=40; - $lg4=40; - - $pdf->SetMargins(10, 10, 10) ; - - $pdf->SetFont('Arial','BI', 10); - - $pdf->Cell(0,$ht,convertirc($_SESSION['p_nomSociete']),0,1,'C',false); - - $pdf->Ln(5); - - $pdf->SetFont('Arial','BIU', 10); - - $pdf->Cell(0,$ht,convertirc(_("DECOMPTE DE REGLEMENT")),0,1,'C',false); - - $pdf->Ln(5); - - $pdf->SetFont('Arial','', 8); - - $pdf->Cell($lg1,$ht,convertirc(_("PRESTATAIRE")),0,0,'L',false); - $pdf->Cell($lg2,$ht,convertirc(" : ".$reglement['prestataire']),0,0,'L',false); - - $pdf->Cell($lg3,$ht,convertirc(_("MONTANT FACTURE")),0,0,'L',false); - $pdf->Cell($lg4,$ht,convertirc(" : ".format_N($reglement['montantPrestataire'])." ".$_SESSION['p_devise_C']),0,1,'L',false); - - $pdf->Cell($lg1,$ht,convertirc(_("PERIODE")),0,0,'L',false); - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $pdf->Cell($lg2,$ht,convertirc(" : ".$reglement['periodeEng']),0,0,'L',false); - } - else - { - $pdf->Cell($lg2,$ht,convertirc(" : ".$reglement['periode']),0,0,'L',false); - } - - $pdf->Cell($lg3,$ht,convertirc(_("No Lot")),0,0,'L',false); - $pdf->Cell($lg4,$ht,convertirc(" : ".$reglement['numeroLotDecompte']),0,1,'L',false); - - - $pdf->Cell($lg1,$ht,convertirc(_("MONTANT A PAYER")),0,0,'L',false); - $pdf->Cell($lg2,$ht,convertirc(" : ".format_N($reglement['montantApayer'])." ".$_SESSION['p_devise_C']),0,0,'L',false); - - $pdf->Cell($lg3,$ht,convertirc(_("MONTANT PAYE")),0,0,'L',false); - $pdf->Cell($lg4,$ht,convertirc(" : ".format_N($reglement['montantPaye'])." ".$_SESSION['p_devise_C']),0,1,'L',false); - - - $pdf->Cell($lg1,$ht,convertirc(_("DATE DE REGLEMENT")),0,0,'L',false); - $pdf->Cell($lg2,$ht,convertirc(" : ".dateLang($reglement['dateReglement'])),0,1,'L',false); - - // - $pdf->Cell($lg1,$ht,convertirc(_("EN NOTRE FAVEUR")),0,0,'L',false); - $pdf->Cell($lg2,$ht,convertirc(" : ".format_N($recapecartdecompte['montantEcartTotalEnFavAss'])." ".$_SESSION['p_devise_C']),0,0,'L',false); - - $pdf->Cell($lg3,$ht,convertirc(_("EN SA FAVEUR")),0,0,'L',false); - $pdf->Cell($lg4,$ht,convertirc(" : ".format_N($recapecartdecompte['montantEcartTotalEnFavPrest'])." ".$_SESSION['p_devise_C']),0,1,'L',false); - - // $pdf->Ln(5); - - $pdf->SetFont('Arial','BIU', 10); - - $pdf->Cell(0,$ht,convertirc(_("RAISONS DES DISCORDANCES")),0,1,'C',false); - - // $pdf->SetFont('Arial','B', 8); - $pdf->SetFont('Arial','', 8); - - $pdf->Cell(85,$ht,convertirc("Différences entre décompte et réclamation prestataire"),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc("Nb Factures"),1,0,'C',false); - $pdf->Cell(30,$ht,convertirc("Montants Prestataire"),1,0,'C',false); - $pdf->Cell(30,$ht,convertirc("Montants Assureur"),1,0,'C',false); - $pdf->Cell(25,$ht,convertirc("Différences"),1,1,'C',false); - - // $pdf->SetFont('Arial','', 8); - - $pdf->Cell(85,$ht,convertirc("Décompte Système"),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($reglement['ndFacture']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($reglement['montantPrestataire']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($reglement['montantApayer']),1,0,'C',false); - $pdf->Cell(25,$ht,format_N($reglement['montantRedresse']),1,1,'C',false); - - $pdf->Cell(85,$ht,convertirc("Total Différences"),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($recapecartdecompte['nbTotal']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantPrestataireTotal']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantAssureurTotal']),1,0,'C',false); - $pdf->Cell(25,$ht,format_N($recapecartdecompte['montantEcartTotal']),1,1,'C',false); - - $pdf->Cell(85,$ht,convertirc("Différences sur factures saisies dans le système"),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($recapecartdecompte['nbTotalFacture']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantPrestataireTotalFacture']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantAssureurTotalFacture']),1,0,'C',false); - $pdf->Cell(25,$ht,format_N($recapecartdecompte['montantEcartTotalFacture']),1,1,'C',false); - - $pdf->Cell(85,$ht,convertirc("Différences sur factures hors système"),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($recapecartdecompte['nbTotalNonsaisi']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantPrestataireTotalNonsaisi']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantAssureurTotalNonsaisi']),1,0,'C',false); - $pdf->Cell(25,$ht,format_N($recapecartdecompte['montantEcartTotalNonsaisi']),1,1,'C',false); - - $pdf->Cell(85,$ht,convertirc("En faveur du prestataire"),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($recapecartdecompte['nbTotalEnFavPrest']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantEcartTotalEnFavPrest']),1,1,'C',false); - - $pdf->Cell(85,$ht,convertirc("En faveur de l'assureur"),1,0,'C',false); - $pdf->Cell(20,$ht,format_N($recapecartdecompte['nbTotalEnFavAss']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($recapecartdecompte['montantEcartTotalEnFavAss']),1,1,'C',false); - - $pdf->Ln(5); - - $pdf->SetFont('Arial','BIU', 10); - $pdf->Cell(0,$ht,convertirc(_("DETAILS SAISIES DANS LE SYSTEME")),0,1,'C',false); - $pdf->SetFont('Arial','BI', 6); - - $pdf->Cell(15,$ht,convertirc("Date"),1,0,'C',false); - $pdf->Cell(50,$ht,convertirc(_("Bénéficiaire")),1,0,'C',false); - $pdf->Cell(15,$ht,convertirc(_("Prestataire")),1,0,'C',false); - $pdf->Cell(15,$ht,convertirc(_("Assureur")),1,0,'C',false); - $pdf->Cell(15,$ht,convertirc(_("Différence")),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("Sens")),1,0,'C',false); - $pdf->Cell(60,$ht,convertirc("Observations"),1,1,'C',false); - - $pdf->SetFont('Arial','', 6); - - foreach ($ecartfactures as $facture) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleEcart = $facture['libelleEcartEng']; - } - else - { - $libelleEcart = $facture['libelleEcart']; - } - $pdf->Cell(15,$ht,dateLang($facture['dateFacture']),1,0,'C',false); - $pdf->Cell(50,$ht,convertirc($facture['numeroBeneficiaire']." ".$facture['beneficiaire']),1,0,'L',false); - $pdf->Cell(15,$ht,format_N($facture['montantPrestataire']),1,0,'C',false); - $pdf->Cell(15,$ht,format_N($facture['montantAssureur']),1,0,'C',false); - $pdf->Cell(15,$ht,format_N($facture['montantEcart']),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc($libelleEcart),1,0,'C',false); - $pdf->Cell(60,$ht,convertirc($facture['observations']),1,1,'C',false); - } - - // HOSRS SYSTEME - $pdf->Ln(5); - - $pdf->SetFont('Arial','BIU', 10); - $pdf->Cell(0,$ht,convertirc(_("NON SAISIES DANS LE SYSTEME")),0,1,'C',false); - $pdf->SetFont('Arial','BI', 6); - - $pdf->Cell(20,$ht,convertirc("Date"),1,0,'C',false); - $pdf->Cell(60,$ht,convertirc(_("Bénéficiaire")),1,0,'C',false); - $pdf->Cell(20,$ht,convertirc(_("Montant")),1,0,'C',false); - $pdf->Cell(25,$ht,convertirc(_("Sens")),1,0,'C',false); - $pdf->Cell(65,$ht,convertirc("Observations"),1,1,'C',false); - - $pdf->SetFont('Arial','', 6); - - foreach ($ecartnonsaisis as $facture) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleEcart = $facture['libelleEcartEng']; - } - else - { - $libelleEcart = $facture['libelleEcart']; - } - $pdf->Cell(20,$ht,dateLang($facture['dateFacture']),1,0,'C',false); - $pdf->Cell(60,$ht,convertirc($facture['numeroBeneficiaire']." ".$facture['beneficiaire']),1,0,'L',false); - $pdf->Cell(20,$ht,format_N($facture['montantPrestataire']),1,0,'C',false); - $pdf->Cell(25,$ht,convertirc($libelleEcart),1,0,'C',false); - $pdf->Cell(65,$ht,convertirc($facture['observations']),1,1,'C',false); - } - - $fichier="Temp/TMP_differecnes_decompte"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladieimpression($numeroFeuilleMaladie); - - $pdf = new FPDF(); - // $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=10; - - // $pdf->SetMargins(15, 15, 15) ; - $pdf->SetMargins(15, 15) ; - - $pdf->SetFont('Arial','BI', 10); - - $pdf->SetY(30); - - $pdf->Cell(0,$ht,convertirc($_SESSION['p_nomSociete_C']),0,1,'C',false); - - $pdf->ln(10); - - $pdf->SetFont('Arial','BIU', 10); - - $pdf->Cell(0,$ht,convertirc(_("FEUILLE MALADIE") . " : " . $_SESSION['p_nomProduitSante']),0,1,'C',false); - - $pdf->ln(10); - - $pdf->SetFont('Arial','', 9); - - $pdf->Cell(40,$ht,convertirc(_("Souscripteur")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['souscripteur']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("No Police")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroPolice']),0,1,'L',false); - - - $pdf->Cell(40,$ht,convertirc(_("Patient")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['beneficiaire']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("No Patient")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroBeneficiaire']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Adhérent")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['adherent']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("No Adhérent")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroAdherent']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc("E-mail"),0,0,'L',false); - $pdf->Cell(160,$ht,convertirc(" : ".$feuillemaladie['emailAdherent']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc("No Tel"),0,0,'L',false); - $pdf->Cell(160,$ht,convertirc(" : ".$feuillemaladie['telAdherent']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Prestataire")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['prestataire']),0,0,'L',false); - - $pdf->Cell(12,$ht,convertirc(_("Systeme")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".dateheureFr($feuillemaladie['dateSysteme'])),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Médecin")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['medecinConsultation']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("No OM")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['noOrdreMedecin']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc("Consultation"),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".dateFr($feuillemaladie['dateConsultation'])),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("No Bon")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroBonConsultation']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Ord Pharm")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonOrdonnance']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Ord Verres")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroBonOptique']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Bon Exam")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonExamen']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Bon KINE")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroBonKine']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc(_("Bon Hospit")),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['numeroBonHospitalisation']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Chambre")),0,0,'L',false); - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['numeroChambre']),0,1,'L',false); - - $pdf->Cell(40,$ht,convertirc("Observ"),0,0,'L',false); - $pdf->Cell(95,$ht,convertirc(" : ".$feuillemaladie['observations']),0,0,'L',false); - - $pdf->Cell(25,$ht,convertirc(_("Raison Cons")),0,0,'L',false); - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['raisonconsultationEng']),0,1,'L',false); - } - else - { - $pdf->Cell(45,$ht,convertirc(" : ".$feuillemaladie['raisonconsultation']),0,1,'L',false); - } - - $fichier="Temp/TMP_feuille_maladie"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - - $t_html ='
'; - $t_html .=' ' . _("Télécharger") . ' '; - $t_html .='
adherent = new Adherent(); - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $idAdherent = $_SESSION['p_idAdherent_C']; - - $adherent = $this->adherent->getContexteAdherentId($idAdherent); - $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent); - $totalgarantieadherent = $this->garantieadherent->getTotalGarantieAdherent($idAdherent); - - $pdf = new FPDF(); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $ht=10; - - $pdf->SetMargins(10, 10, 10) ; - - $pdf->SetFont('Arial','BI', 9); - - $pdf->Cell(0,$ht,convertirc($_SESSION['p_nomSociete']),0,1,'C',false); - - $pdf->SetFont('Arial','BIU', 9); - - $pdf->Cell(0,$ht,convertirc("LILITES DE LA FAMILLE"),0,1,'C',false); - - $pdf->SetFont('Arial','BI', 9); - - $pdf->Cell(30,$ht,convertirc("Nom Adhérent"),0,0,'C',false); - $pdf->Cell(50,$ht,convertirc(" : ".$adherent['nom']),0,0,'L',false); - - $pdf->Cell(40,$ht,convertirc("Prénoms Adhérent"),0,0,'C',false); - $pdf->Cell(60,$ht,convertirc(" : ".$adherent['prenoms']),0,1,'L',false); - - $pdf->SetFont('Arial','', 9); - - $pdf->Cell(0,$ht,convertirc('Edité le : '.heureCourante()),0,1,'R',false); - - $pdf->SetFont('Arial','BI', 9); - - $pdf->Cell(55,$ht,convertirc("Garantie"),1,0,'C',false); - $pdf->Cell(30,$ht,convertirc("Annuelles"),1,0,'C',false); - $pdf->Cell(15,$ht,convertirc("Taux(%)"),1,0,'C',false); - $pdf->Cell(30,$ht,convertirc("En vigeur"),1,0,'C',false); - $pdf->Cell(30,$ht,convertirc("Consommations"),1,0,'C',false); - $pdf->Cell(30,$ht,convertirc("Solde"),1,1,'C',false); - - $pdf->SetFont('Arial','', 9); - - foreach ($garantieadherents as $garantieadherent) - { - $pdf->Cell(55,$ht,convertirc($garantieadherent['garantie']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($garantieadherent['plafondAnnuel']),1,0,'C',false); - $pdf->Cell(15,$ht,$garantieadherent['tauxAvenant'],1,0,'C',false); - $pdf->Cell(30,$ht,format_N($garantieadherent['plafond']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($garantieadherent['consommation']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($garantieadherent['solde']),1,1,'C',false); - } - - $pdf->SetFont('Arial','BI', 9); - - $pdf->Cell(55,$ht,convertirc("Totaux : "),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($totalgarantieadherent['plafondAnnuel']),1,0,'C',false); - $pdf->Cell(15,$ht,"",1,0,'C',false); - $pdf->Cell(30,$ht,format_N($totalgarantieadherent['plafond']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($totalgarantieadherent['consommation']),1,0,'C',false); - $pdf->Cell(30,$ht,format_N($totalgarantieadherent['solde']),1,1,'C',false); - - $fichier="Temp/limites_famille"."_".uniqid().".pdf"; - $pdf->Output($fichier,"F"); - echo 'Télécharger le résultat : LIMITES DE LA FAMILLE'; - exit(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosacte.php b/extranet/Controleur/ControleurAjaxinfosacte.php deleted file mode 100644 index b07f227..0000000 --- a/extranet/Controleur/ControleurAjaxinfosacte.php +++ /dev/null @@ -1,23 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - - $resultat = $this->acte->getInfosActe_bon($codePrestataire, $codeActe); - - $montantacte_info = $resultat['0']; - $tauxCouverture_info = $resultat['1']; - - $this->genererVueAjax(array('montantacte_info' => $montantacte_info, 'tauxCouverture_info' => $tauxCouverture_info)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonconsultation.php b/extranet/Controleur/ControleurAjaxinfosbonconsultation.php deleted file mode 100644 index a50f4d9..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonconsultation.php +++ /dev/null @@ -1,33 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "CONS"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonexamen.php b/extranet/Controleur/ControleurAjaxinfosbonexamen.php deleted file mode 100644 index 50232de..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonexamen.php +++ /dev/null @@ -1,33 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "EXAM"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonhospitalisation.php b/extranet/Controleur/ControleurAjaxinfosbonhospitalisation.php deleted file mode 100644 index b1dfdf9..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonhospitalisation.php +++ /dev/null @@ -1,33 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "HOSP"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonoptique.php b/extranet/Controleur/ControleurAjaxinfosbonoptique.php deleted file mode 100644 index 2136cff..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonoptique.php +++ /dev/null @@ -1,33 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "OPTQ"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonprescription.php b/extranet/Controleur/ControleurAjaxinfosbonprescription.php deleted file mode 100644 index 2c20574..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonprescription.php +++ /dev/null @@ -1,33 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "ORDO"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonseance.php b/extranet/Controleur/ControleurAjaxinfosbonseance.php deleted file mode 100644 index 38b50b5..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonseance.php +++ /dev/null @@ -1,33 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "KINE"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonseancekine.php b/extranet/Controleur/ControleurAjaxinfosbonseancekine.php deleted file mode 100644 index 1919cad..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonseancekine.php +++ /dev/null @@ -1,43 +0,0 @@ -bonpec = new Bonpec(); - $this->prescription = new Seance_temp(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "CONS"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } - - public function attributionbontemporaire() - { - $numeroBonSeance = $this->requete->getParametreFormulaire("numeroBon"); - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->prescription->attributionbontemporaire($numeroBonSeance, $codeGestionBon) ; - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosbonseancekinecso.php b/extranet/Controleur/ControleurAjaxinfosbonseancekinecso.php deleted file mode 100644 index 7e76dc1..0000000 --- a/extranet/Controleur/ControleurAjaxinfosbonseancekinecso.php +++ /dev/null @@ -1,43 +0,0 @@ -bonpec = new Bonpec(); - $this->prescription = new Seance_temp(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "CONS"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } - - public function attributionbontemporaire() - { - $numeroBonSeance = $this->requete->getParametreFormulaire("numeroBon"); - $codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon"); - - $this->prescription->attributionbontemporaire($numeroBonSeance, $codeGestionBon); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfoseancecso.php b/extranet/Controleur/ControleurAjaxinfoseancecso.php deleted file mode 100644 index 1b63462..0000000 --- a/extranet/Controleur/ControleurAjaxinfoseancecso.php +++ /dev/null @@ -1,24 +0,0 @@ -seance = new Seance_temp(); - } - - public function index() { - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - - $fraisReel = round($prixActe*$quantite); - $montantTm = round(($fraisReel*$_SESSION['p_tm_C'])/100); - $aRembourser = $fraisReel-$montantTm; - - $this->seance->modifierseancecso($quantite, $fraisReel, $montantTm, $aRembourser); - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'fraisReel' => $fraisReel, 'montantTm' => $montantTm, 'aRembourser' => $aRembourser)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosremplacerbonconsultation.php b/extranet/Controleur/ControleurAjaxinfosremplacerbonconsultation.php deleted file mode 100644 index c641003..0000000 --- a/extranet/Controleur/ControleurAjaxinfosremplacerbonconsultation.php +++ /dev/null @@ -1,44 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "CONS"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } - - public function enregistrerremplacementconsultation() - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $OldnumeroBon = $this->requete->getParametreFormulaire("OldnumeroBon"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $motifremplacement = $this->requete->getParametreFormulaire("motifremplacement"); - - $this->bonpec->enregistrerremplacementconsultation($numeroFeuilleMaladie, $OldnumeroBon, $numeroBon, $motifremplacement); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxinfosremplacerordonnence.php b/extranet/Controleur/ControleurAjaxinfosremplacerordonnence.php deleted file mode 100644 index 5dd9d80..0000000 --- a/extranet/Controleur/ControleurAjaxinfosremplacerordonnence.php +++ /dev/null @@ -1,44 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $codeTypeBon = "ORDO"; - - $resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon); - - $codeEtatBon = $resultat['0']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !'; - } - else - { - $msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !'; - } - - $this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur)); - } - - public function enregistrerremplacementordonnance() - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $OldnumeroBon = $this->requete->getParametreFormulaire("OldnumeroBon"); - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $motifremplacement = $this->requete->getParametreFormulaire("motifremplacement"); - - $this->bonpec->enregistrerremplacementordonnance($numeroFeuilleMaladie, $OldnumeroBon, $numeroBon, $motifremplacement); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteactescons.php b/extranet/Controleur/ControleurAjaxlisteactescons.php deleted file mode 100644 index 3439b96..0000000 --- a/extranet/Controleur/ControleurAjaxlisteactescons.php +++ /dev/null @@ -1,28 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codeTypePrestation = "CONS"; - $libelleActeSearch = $this->requete->getParametreFormulaire("libelleActeSearch"); - - $actes_pop = $this->acte->getactesspossibleslike($codeTarifActe, $codeTypePrestation, $libelleActeSearch) ; - } - else - { - $actes_pop = $this->acte->getactesvide(); - } - $this->genererVueAjax(array('actes_pop' => $actes_pop, 'libelleActeSearch' => $libelleActeSearch)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteactespossibles.php b/extranet/Controleur/ControleurAjaxlisteactespossibles.php deleted file mode 100644 index 0ef7e80..0000000 --- a/extranet/Controleur/ControleurAjaxlisteactespossibles.php +++ /dev/null @@ -1,28 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codeTypePrestation = "ACT"; - $libelleActeSearch = $this->requete->getParametreFormulaire("libelleActeSearch"); - - $actes_pop = $this->acte->getactesspossibleslike($codeTarifActe, $codeTypePrestation, $libelleActeSearch) ; - } - else - { - $actes_pop = $this->acte->getactesvide(); - } - $this->genererVueAjax(array('actes_pop' => $actes_pop, 'libelleActeSearch' => $libelleActeSearch)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteactespossiblesselect.php b/extranet/Controleur/ControleurAjaxlisteactespossiblesselect.php deleted file mode 100644 index d716621..0000000 --- a/extranet/Controleur/ControleurAjaxlisteactespossiblesselect.php +++ /dev/null @@ -1,28 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codeTypePrestation = "ACT"; - $libelleActeSearch = $this->requete->getParametreFormulaire("libelleActeSearch"); - - $actes_pop = $this->acte->getactesspossibleslikecomplet($codeTarifActe, $libelleActeSearch) ; - } - else - { - $actes_pop = $this->acte->getactesvide(); - } - $this->genererVueAjax(array('actes_pop' => $actes_pop, 'libelleActeSearch' => $libelleActeSearch)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteconsommables.php b/extranet/Controleur/ControleurAjaxlisteconsommables.php deleted file mode 100644 index 9b7db87..0000000 --- a/extranet/Controleur/ControleurAjaxlisteconsommables.php +++ /dev/null @@ -1,71 +0,0 @@ -consommable = new Consommable_temp(); - } - - public function index($nomConsommable="") - { - $nomConsommable = $this->requete->getParametreFormulaire("nomConsommable"); - $consommables = $this->consommable->getconsommablespossibles($nomConsommable); - $this->genererVueAjax(array('consommables' => $consommables)); - } - - public function ajouterconsommable() - { - $idConsommable = $this->requete->getParametre("idConsommable"); - $this->consommable->ajouterconsommable($idConsommable); - } - - public function majquantite() - { - $idConsommable = $this->requete->getParametre("idConsommable"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->consommable->majquantite($idConsommable, $quantite); - - // $this->genererVueAjax(); - - } - - public function majprix() - { - $idConsommable = $this->requete->getParametre("idConsommable"); - $valeurActe = $this->requete->getParametreFormulaire("valeurActe", "numerique"); - $this->consommable->majprix($idConsommable, $valeurActe); - - // $this->genererVueAjax(); - } - - public function creerconsommable() - { - $nomConsommable = $this->requete->getParametreFormulaire("libelleconsommable"); - $prixconsommable = $this->requete->getParametreFormulaire("prixconsommable", "numerique"); - $quantiteconsommable = $this->requete->getParametreFormulaire("quantiteconsommable", "numerique"); - - $this->consommable->creerconsommable($nomConsommable, $prixconsommable, $quantiteconsommable); - - // $this->genererVueAjax(); - } - - public function retirerconsommabletous() - { - $this->consommable->retirerconsommabletous(); - - // $this->genererVueAjax(); - } - - public function retirerconsommable() - { - $idConsommable = $this->requete->getParametreFormulaire("idConsommable"); - - $this->consommable->retirerconsommable($idConsommable); - - // $this->genererVueAjax(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistedecomptes.php b/extranet/Controleur/ControleurAjaxlistedecomptes.php deleted file mode 100644 index 5f6668c..0000000 --- a/extranet/Controleur/ControleurAjaxlistedecomptes.php +++ /dev/null @@ -1,24 +0,0 @@ -reglement = new Reglement(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeExercice = $this->requete->getParametreFormulaire("codeExercice"); - $codeEtatDecompte = $this->requete->getParametreFormulaire("codeEtatDecompte"); - - $_SESSION['p_codeExercice_C'] = $codeExercice; - - $decomptes = $this->reglement->getdecomptesexercice($codePrestataire, $codeExercice, $codeEtatDecompte); - - $this->genererVueAjax(array('decomptes' => $decomptes)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteexamenspossibles.php b/extranet/Controleur/ControleurAjaxlisteexamenspossibles.php deleted file mode 100644 index 14d84b0..0000000 --- a/extranet/Controleur/ControleurAjaxlisteexamenspossibles.php +++ /dev/null @@ -1,29 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codeTypePrestation = "EXAM"; - $libelleActeSearch = $this->requete->getParametreFormulaire("libelleActeSearch"); - - $actes_pop = $this->acte->getexamenspossibleslikeprescription($codeTarifActe, $libelleActeSearch) ; - } - else - { - $actes_pop = $this->acte->getactesvide(); - } - - $this->genererVueAjax(array('actes_pop' => $actes_pop, 'libelleActeSearch' => $libelleActeSearch)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteexamenspossibleslab.php b/extranet/Controleur/ControleurAjaxlisteexamenspossibleslab.php deleted file mode 100644 index b7df732..0000000 --- a/extranet/Controleur/ControleurAjaxlisteexamenspossibleslab.php +++ /dev/null @@ -1,31 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codeTypePrestation = "EXAM"; - $libelleActeSearch = $this->requete->getParametreFormulaire("libelleActeSearch"); - - $actes_pop = $this->acte->getactesspossibleslike($codeTarifActe, $codeTypePrestation, $libelleActeSearch) ; - } - else - { - $actes_pop = $this->acte->getactesvide(); - } - - // $actes_pop = $this->acte->getactesspossibleslike($codeTarifActe, $codeTypePrestation, $libelleActeSearch) ; - - $this->genererVueAjax(array('actes_pop' => $actes_pop, 'libelleActeSearch' => $libelleActeSearch)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlisteged.php b/extranet/Controleur/ControleurAjaxlisteged.php deleted file mode 100644 index ba56d23..0000000 --- a/extranet/Controleur/ControleurAjaxlisteged.php +++ /dev/null @@ -1,24 +0,0 @@ -ged = new Ged(); - } - - public function index() - { - // unset($_FILES['fichier_upload']); - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); - - $geds = $this->ged->getged($d1, $d2, $nomOrigine); - - $this->genererVueAjax(array('geds' => $geds)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistegedadherent.php b/extranet/Controleur/ControleurAjaxlistegedadherent.php deleted file mode 100644 index 72e131b..0000000 --- a/extranet/Controleur/ControleurAjaxlistegedadherent.php +++ /dev/null @@ -1,24 +0,0 @@ -ged = new Ged(); - } - - public function index() - { - unset($_FILES['fichier_upload']); - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); - - $geds = $this->ged->getgedadherent($d1, $d2, $nomOrigine); - - $this->genererVueAjax(array('geds' => $geds)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistegedbeneficiaireprest.php b/extranet/Controleur/ControleurAjaxlistegedbeneficiaireprest.php deleted file mode 100644 index d493a40..0000000 --- a/extranet/Controleur/ControleurAjaxlistegedbeneficiaireprest.php +++ /dev/null @@ -1,24 +0,0 @@ -ged = new Ged(); - } - - public function index() - { - unset($_FILES['fichier_upload']); - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); - - $geds = $this->ged->getgedbeneficiaireprest($d1, $d2, $nomOrigine); - - $this->genererVueAjax(array('geds' => $geds)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistegedfeuillemaladie.php b/extranet/Controleur/ControleurAjaxlistegedfeuillemaladie.php deleted file mode 100644 index 38d5286..0000000 --- a/extranet/Controleur/ControleurAjaxlistegedfeuillemaladie.php +++ /dev/null @@ -1,24 +0,0 @@ -ged = new Ged(); - } - - public function index() - { - unset($_FILES['fichier_upload']); - - $d1 = $this->requete->getParametreDate("d1"); - $d2 = $this->requete->getParametreDate("d2"); - $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); - - $geds = $this->ged->getgedfeuillemaladie($d1, $d2, $nomOrigine); - - $this->genererVueAjax(array('geds' => $geds)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistegedpharmacie.php b/extranet/Controleur/ControleurAjaxlistegedpharmacie.php deleted file mode 100644 index 123834d..0000000 --- a/extranet/Controleur/ControleurAjaxlistegedpharmacie.php +++ /dev/null @@ -1,116 +0,0 @@ -ged = new Ged(); - } - - public function index($msgErreur=null) - { - unset($_FILES['fichier_upload']); - $geds = $this->ged->getgedpharmacie(); - $this->genererVueAjax(array('geds' => $geds)); - } - - public function chargerged($msgErreur=null) - { - $message = ""; - - $nouveau_fichier = "rien"; - - if(!empty($_POST)) - { - define('TARGET', $_SESSION['p_cheminGed']); // Repertoire cible - define('MAX_SIZE', 10000000); // Taille max en octets du fichier - - // Tableaux de donnees - // ".avi", ".bmp", ".doc", ".docx", ".gif", ".jpeg", "jpg", "jpe", ".mkv", ".mp3", ".pdf", ".png", ".pps", ".xls", ".xlsx", ".wav" - // $tabExt = array('jpg','png','jpeg'); // Extensions autorisees - - $tabExt = array("avi", "bmp", "doc", "docx", "gif", "jpeg", "jpg", "jpe", "mkv", "mp3", "mp4", "pdf", "png", "pps", "xls", "xlsx", "wav"); // Extensions autorisees - - // Variables - $extension = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // On verifie si le champ est rempli - if( !empty($_FILES['fichier_upload']['name']) ) - { - // Recuperation de l'extension du fichier - - $extension = pathinfo($_FILES['fichier_upload']['name'], PATHINFO_EXTENSION); - - // On verifie l'extension du fichier - if(in_array(strtolower($extension), $tabExt)) - { - $message = $_FILES['fichier_upload']['size']; - - // On verifie les dimensions et taille du fichier - if($_FILES['fichier_upload']['size'] <= MAX_SIZE) - { - $taille = $_FILES['fichier_upload']['size']; - - // Parcours du tableau d'erreurs - if(isset($_FILES['fichier_upload']['error']) && UPLOAD_ERR_OK === $_FILES['fichier_upload']['error']) - { - // On renomme le fichier - $nomOrigine = $_FILES['fichier_upload']['name']; - $nouveau_fichier = dateJourSql()."_".uniqid().".".$extension; - - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nouveau_fichier)) - { - $message = 'Chargé avec succès / Uploaded successfully'; - - // on va envoyer dans la base de données - // $this->ged->enregistrergedfeuillemaladie($nomOrigine, $nouveau_fichier, $taille); - $this->ged->enregistrergedpharmacie($nomOrigine, $nouveau_fichier, $taille); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - $message .= $_FILES['fichier_upload']['size']." Erreur dans les dimensions du fichier !"; - // $message = 'Erreur dans les dimensions du fichier !'; - } - } - else - { - // Sinon on affiche une erreur pour l'extension - $message = 'Extension du fichier est incorrecte !'; - } - } - else - { - // Sinon on affiche une erreur pour le champ vide - $message = 'Veuillez sélectionner un fichier SVP! / Please select a file!'; - } - - // fin upload - } - - $msgErreur = $message; - $this->rediriger("Pharmacien"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistemedecins.php b/extranet/Controleur/ControleurAjaxlistemedecins.php deleted file mode 100644 index a8ed677..0000000 --- a/extranet/Controleur/ControleurAjaxlistemedecins.php +++ /dev/null @@ -1,28 +0,0 @@ -medecin = new Medecin(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $nomsearch = $this->requete->getParametreFormulaire("nomsearch"); - $noOrdreMedecin = $this->requete->getParametreFormulaire("noOrdreMedecin"); - - $mdedecins_pop = $this->medecin->getmedeconspossibles($codePrestataire, $nomsearch, $noOrdreMedecin); - } - else - { - $mdedecins_pop = $this->medecin->getmedecinsvide(); - } - $this->genererVueAjax(array('mdedecins_pop' => $mdedecins_pop, 'nomsearch' => $nomsearch, 'noOrdreMedecin' => $noOrdreMedecin)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistemedecinsrequete.php b/extranet/Controleur/ControleurAjaxlistemedecinsrequete.php deleted file mode 100644 index c4defb6..0000000 --- a/extranet/Controleur/ControleurAjaxlistemedecinsrequete.php +++ /dev/null @@ -1,28 +0,0 @@ -medecin = new Medecin(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $nomsearch = $this->requete->getParametreFormulaire("nomsearch"); - $noOrdreMedecin = $this->requete->getParametreFormulaire("noOrdreMedecin"); - - $mdedecins_pop = $this->medecin->getmedeconspossibles($codePrestataire, $nomsearch, $noOrdreMedecin); - } - else - { - $mdedecins_pop = $this->medecin->getmedecinsvide(); - } - $this->genererVueAjax(array('mdedecins_pop' => $mdedecins_pop, 'nomsearch' => $nomsearch, 'noOrdreMedecin' => $noOrdreMedecin)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistemedicaments.php b/extranet/Controleur/ControleurAjaxlistemedicaments.php deleted file mode 100644 index 812fed2..0000000 --- a/extranet/Controleur/ControleurAjaxlistemedicaments.php +++ /dev/null @@ -1,45 +0,0 @@ -medicament = new Detailtarifmedicament(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $nomsearch = $this->requete->getParametreFormulaire("nomsearch"); - - $mdedicaments_pop = $this->medicament->getmedicamentspossibles($nomsearch); - } - else - { - $mdedicaments_pop = $this->medicament->getmedicamentvide(); - } - - $this->genererVueAjax(array('mdedicaments_pop' => $mdedicaments_pop, 'nomsearch' => $nomsearch)); - } - - public function remplacement($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $nomsearch = $this->requete->getParametreFormulaire("nomsearch"); - - $mdedicaments_pop = $this->medicament->getmedicamentspossibles($nomsearch); - } - else - { - $mdedicaments_pop = $this->medicament->getmedicamentvide(); - } - - $this->genererVueAjax(array('mdedicaments_pop' => $mdedicaments_pop, 'nomsearch' => $nomsearch)); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistemedicamentspha.php b/extranet/Controleur/ControleurAjaxlistemedicamentspha.php deleted file mode 100644 index ff1ded4..0000000 --- a/extranet/Controleur/ControleurAjaxlistemedicamentspha.php +++ /dev/null @@ -1,41 +0,0 @@ -medicament = new Detailtarifmedicament(); - } - - public function index($nomsearch="") - { - if ($this->requete->existeParametre("valid")) - { - $nomsearch = $this->requete->getParametreFormulaire("nomsearch"); - - // $mdedicaments_pop = $this->medicament->getmedicamentspossibles($nomsearch); - $mdedicaments_pop = $this->medicament->getmedicamentspossiblespha($nomsearch); - } - else - { - $mdedicaments_pop = $this->medicament->getmedicamentvide(); - } - - $this->genererVueAjax(array('mdedicaments_pop' => $mdedicaments_pop, 'nomsearch' => $nomsearch)); - } - - public function creermedicament() - { - $nomMedicament = $this->requete->getParametreFormulaire("libelleMedicament"); - $prixMedicament = $this->requete->getParametreFormulaire("prixMedicament", "numerique"); - $qteMedicament = $this->requete->getParametreFormulaire("qteMedicament", "numerique"); - - $this->medicament->creermedicament($nomMedicament, $prixMedicament, $qteMedicament); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxlistemessagerie.php b/extranet/Controleur/ControleurAjaxlistemessagerie.php deleted file mode 100644 index e76eafc..0000000 --- a/extranet/Controleur/ControleurAjaxlistemessagerie.php +++ /dev/null @@ -1,45 +0,0 @@ -messagerie = new Messagerie(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $date1 = $this->requete->getParametreDate("date1"); - $date2 = $this->requete->getParametreDate("date2"); - - $messageLu = $this->requete->getParametreFormulaire("messageLu"); - $textMessage = $this->requete->getParametreFormulaire("textMessage"); - - $_SESSION['p_d1_C'] = $date1; - $_SESSION['p_d2_C'] = $date2; - - $messages = $this->messagerie->getmessages($codePrestataire, $date1, $date2, $messageLu, $textMessage) ; - - $messages_commun = $this->messagerie->getmessagescommun($date1, $date2); - - $this->genererVueAjax(array('messages' => $messages, 'messages_commun' => $messages_commun)); - - } - - public function repondremessage() - { - $idMessagerie = $this->requete->getParametreFormulaire("idMessagerie"); - $idParent = $this->requete->getParametreFormulaire("idParent"); - - $this->messagerie->repondremessage($idMessagerie, $idParent); - - // $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmailattente.php b/extranet/Controleur/ControleurAjaxmailattente.php deleted file mode 100644 index 8dc570f..0000000 --- a/extranet/Controleur/ControleurAjaxmailattente.php +++ /dev/null @@ -1,150 +0,0 @@ -envoimail = new Envoimail(); - } - - public function index() - { - } - - public function ajouter() - { - $typeMail = $this->requete->getParametreFormulaire("typeMail"); - - if ($typeMail == 'mailhospitalisation') - { - $numeroBon = $this->requete->getParametreFormulaire("numeroBon"); - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - - $this->envoimail->ajoutermailhospitalisation($typeMail, $numeroBon, $numeroFeuilleMaladie); - } - - if ($typeMail == 'mailfacturationfeuillemaladie') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - - $this->envoimail->ajoutermailfacturationfeuillemaladie($typeMail, $numeroFeuilleMaladie); - } - - if ($typeMail == 'mailpharmacie') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - - $this->envoimail->ajoutermailpharmacie($typeMail, $numeroFeuilleMaladie, $codePrestataire); - } - - if ($typeMail == 'maillabo') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - - $this->envoimail->ajoutermaillabo($typeMail, $numeroFeuilleMaladie, $codePrestataire); - } - - if ($typeMail == 'mailkine') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - - $this->envoimail->ajoutermailkine($typeMail, $numeroFeuilleMaladie, $codePrestataire); - } - - if ($typeMail == 'mailoptique') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - - $this->envoimail->ajoutermailoptique($typeMail, $numeroFeuilleMaladie, $codePrestataire); - } - - if ($typeMail == 'mailcommandebon') - { - $codeTypeBon = $this->requete->getParametreFormulaire("codeTypeBon"); - $quantite = $this->requete->getParametreFormulaire("quantite"); - $prestataire = $this->requete->getParametreFormulaire("prestataire"); - - $this->envoimail->ajoutermailcommandebon($typeMail, $codeTypeBon, $quantite, $prestataire); - } - - if ($typeMail == 'mailreceptionbon') - { - $codeTypeBon = $this->requete->getParametreFormulaire("codeTypeBon"); - $noDepart = $this->requete->getParametreFormulaire("noDepart"); - $noFin = $this->requete->getParametreFormulaire("noFin"); - $prestataire = $this->requete->getParametreFormulaire("prestataire"); - - $this->envoimail->ajoutermailreceptionbon($typeMail, $codeTypeBon, $noDepart, $noFin, $prestataire); - } - - if ($typeMail == 'maildemandeannulationbon') - { - $idBon = $this->requete->getParametreFormulaire("idBon"); - - $this->envoimail->ajoutermaildemandeannulationbon($typeMail, $idBon); - } - - if ($typeMail == 'maildemandederogation') - { - $codeDerogation = $this->requete->getParametreFormulaire("codeDerogation"); - $observations = $this->requete->getParametreFormulaire("observations"); - $prestataire = $this->requete->getParametreFormulaire("prestataire"); - $idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire"); - - $this->envoimail->ajoutermaildemandederogation($typeMail, $codeDerogation, $observations, $prestataire, $idBeneficiaire); - } - - - if ($typeMail == 'mailfraudeidentite') - { - $idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire"); - $prestataire = $this->requete->getParametreFormulaire("prestataire"); - - $this->envoimail->ajoutermailfraudeidentite($typeMail, $idBeneficiaire, $prestataire); - } - - if ($typeMail == 'mailententeprealable') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - - $this->envoimail->ajoutermailententeprealable($typeMail, $numeroFeuilleMaladie, $codeActe); - } - - if ($typeMail == 'mailautorisation') - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - - $this->envoimail->ajoutermailautorisation($typeMail, $numeroFeuilleMaladie, $codeActe); - } - - if ($typeMail == 'mailententeprealablepha') - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->envoimail->ajoutermailententeprealablepha($typeMail, $idMedicament); - } - - if ($typeMail == 'mailententeprealableopt') - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - - $this->envoimail->ajoutermailententeprealableopt($typeMail, $idOptique); - } - - if ($typeMail == 'mailententeprealablemont') - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - - $this->envoimail->ajoutermailententeprealablemont($typeMail, $idOptique); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmajprixactemed.php b/extranet/Controleur/ControleurAjaxmajprixactemed.php deleted file mode 100644 index bd9e25c..0000000 --- a/extranet/Controleur/ControleurAjaxmajprixactemed.php +++ /dev/null @@ -1,28 +0,0 @@ -requete->getParametreFormulaire("prixNew", "numerique"); - $prixActe = $prixNew; - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $prixTarif = $this->requete->getParametreFormulaire("prixTarif", "numerique"); - - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - $acteExclu = $this->requete->getParametreFormulaire("acteExclu"); - $acteChirurgie = $this->requete->getParametreFormulaire("acteChirurgie"); - - $valeurActe = round($prixActe*$quantite); - $montantTm = round(($valeurActe*$_SESSION['p_tm_C'])/100); - $aRembourser = $valeurActe-$montantTm; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'valeurActe' => $valeurActe, - 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'ententePrealable' => $ententePrealable, - 'acteExclu' => $acteExclu, 'acteChirurgie' => $acteChirurgie, 'prixTarif' => $prixTarif)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmessagerie.php b/extranet/Controleur/ControleurAjaxmessagerie.php deleted file mode 100644 index 1ac7b5c..0000000 --- a/extranet/Controleur/ControleurAjaxmessagerie.php +++ /dev/null @@ -1,47 +0,0 @@ -messagerie = new Messagerie(); - } - - public function index() - { - // $nbMessagesNonLus = $this->messagerie->countmessagesnonlus(); - - $nbMessagesNonLus = $this->messagerie->countmessagesnonlususer(); - - $this->genererVueAjax(array('nbMessagesNonLus' => $nbMessagesNonLus)); - } - - public function creermessage() - { - $textMessage = $this->requete->getParametreFormulaire("textMessage"); - $idParent = $this->requete->getParametreFormulaire("idParent"); - - $this->messagerie->creermessage($textMessage, $idParent); - } - - public function marquercommelu() - { - $idMessagerie = $this->requete->getParametreFormulaire("idMessagerie"); - - // $this->messagerie->marquercommelu($idMessagerie); - $this->messagerie->marquercommeluser($idMessagerie); - } - - - public function repondremessage() - { - $idMessagerie = $this->requete->getParametreFormulaire("idMessagerie"); - $idParent = $this->requete->getParametreFormulaire("idParent"); - $textMessage = $this->requete->getParametreFormulaire("textMessage"); - - $this->messagerie->repondremessage($idMessagerie, $idParent, $textMessage); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmessageriehistorique.php b/extranet/Controleur/ControleurAjaxmessageriehistorique.php deleted file mode 100644 index c433cc7..0000000 --- a/extranet/Controleur/ControleurAjaxmessageriehistorique.php +++ /dev/null @@ -1,21 +0,0 @@ -messagerie = new Messagerie(); - } - - public function index() - { - $idParent = $this->requete->getParametreFormulaire("idParent"); - - $messages = $this->messagerie->getmessageriehistorique($idParent) ; - - $this->genererVueAjax(array('messages' => $messages)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmessagerieliste.php b/extranet/Controleur/ControleurAjaxmessagerieliste.php deleted file mode 100644 index 3d92d97..0000000 --- a/extranet/Controleur/ControleurAjaxmessagerieliste.php +++ /dev/null @@ -1,33 +0,0 @@ -messagerie = new Messagerie(); - } - - public function index() - { - $messagesnonlus = $this->messagerie->getmessagesnonlus(); - - $this->genererVueAjax(array('messagesnonlus' => $messagesnonlus)); - } - - public function marquercommelu() - { - $idMessagerie = $this->requete->getParametreFormulaire("idMessagerie"); - - $this->messagerie->marquercommeluser($idMessagerie); - } - - public function derniermessage() - { - $derniermessage = $this->messagerie->getderniermessagenonluuser(); - - $this->genererVueAjax(array('derniermessage' => $derniermessage)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmessagerienew.php b/extranet/Controleur/ControleurAjaxmessagerienew.php deleted file mode 100644 index 1ce198c..0000000 --- a/extranet/Controleur/ControleurAjaxmessagerienew.php +++ /dev/null @@ -1,16 +0,0 @@ -genererVueAjax(); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmessageriereponse.php b/extranet/Controleur/ControleurAjaxmessageriereponse.php deleted file mode 100644 index 9004a33..0000000 --- a/extranet/Controleur/ControleurAjaxmessageriereponse.php +++ /dev/null @@ -1,24 +0,0 @@ -messagerie = new Messagerie(); - } - - public function index() - { - $idMessagerie = $this->requete->getParametreFormulaire("idMessagerie"); - $idParent = $this->requete->getParametreFormulaire("idParent"); - - $message_reponse = $this->messagerie->getmessageriesimple($idMessagerie, $idParent) ; - - $this->genererVueAjax(array('message_reponse' => $message_reponse)); - - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxmonture.php b/extranet/Controleur/ControleurAjaxmonture.php deleted file mode 100644 index 028e7e1..0000000 --- a/extranet/Controleur/ControleurAjaxmonture.php +++ /dev/null @@ -1,77 +0,0 @@ -prescription = new Optique_temp(); - $this->facture = new Facture(); - $this->beneficiaire = new Beneficiaire(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $_SESSION['p_nbActesVerres'] = "0"; - $_SESSION['p_nbActesMonture'] = "0"; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $prescription = $this->prescription->getmonture_temp(); - - $detaillivres = $this->prescription->getdetailmonture_temp(); - - $garantieadherent_temp = $this->prescription->afficher_garantieadherent_temp_monture(); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTempMonture(); - - $this->genererVueAjax(array('prescription' => $prescription, 'detaillivres' => $detaillivres, - 'garantieadherent_temp' => $garantieadherent_temp, 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function enregistrermonture() - { - $user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut"); - - $numeroFacture = $this->requete->getParametreFormulaire("numeroFacture"); - - $this->prescription->facturermonture($numeroFacture, $user_id_substitut); - - $idFacture = $_SESSION['p_idFactureMonture']; - - $facture = $this->facture->consulterfacturefacture($idFacture) ; - - $this->genererVueAjax(array('facture' => $facture)); - } - - public function majmonture() - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - $monture = $this->requete->getParametreFormulaire("monture"); - $numeroFacture = $this->requete->getParametreFormulaire("numeroFacture"); - - $this->prescription->majmonturetemp_monture($idOptique, $monture, $numeroFacture); - - $this->executerAction("index"); - } - - public function demanderaccordmont() - { - $idOptique = $this->requete->getParametreFormulaire("idOptique"); - $prixPrestataire = $this->requete->getParametreFormulaire("prixPrestataire", "numerique"); - - $this->prescription->demanderaccordmont($idOptique, $prixPrestataire); - - $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxnotesbeneficiaire.php b/extranet/Controleur/ControleurAjaxnotesbeneficiaire.php deleted file mode 100644 index df39358..0000000 --- a/extranet/Controleur/ControleurAjaxnotesbeneficiaire.php +++ /dev/null @@ -1,22 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $notesfeuillemaladie = $this->feuillemaladie->getnotesBeneficiaire($idBeneficiaire); - - $this->genererVueAjax(array('notesfeuillemaladie' => $notesfeuillemaladie)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxnotesfeuillemaladie.php b/extranet/Controleur/ControleurAjaxnotesfeuillemaladie.php deleted file mode 100644 index 9f15abe..0000000 --- a/extranet/Controleur/ControleurAjaxnotesfeuillemaladie.php +++ /dev/null @@ -1,36 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $notesfeuillemaladie = $this->feuillemaladie->getnotesfeuillemaladie($numeroFeuilleMaladie); - - $this->genererVueAjax(array('notesfeuillemaladie' => $notesfeuillemaladie)); - } - - public function nouvellenote() - { - $this->genererVueAjax(); - } - - public function creernote() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $notesNew = $this->requete->getParametreFormulaire("notesNew"); - - $this->feuillemaladie->creernote($numeroFeuilleMaladie, $notesNew); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxplafondavantfacturecdec.php b/extranet/Controleur/ControleurAjaxplafondavantfacturecdec.php deleted file mode 100644 index 49aa1ff..0000000 --- a/extranet/Controleur/ControleurAjaxplafondavantfacturecdec.php +++ /dev/null @@ -1,21 +0,0 @@ -garantieadherent = new Garantieadherent(); - } - - public function index() - { - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - $_SESSION['p_idFacture_C'] = $idFacture; - - $garantieadherents = $this->garantieadherent->getPlafondAvantFactureId($idFacture); - - $this->genererVueAjax(array('garantieadherents' => $garantieadherents)); - } -} diff --git a/extranet/Controleur/ControleurAjaxprixacte.php b/extranet/Controleur/ControleurAjaxprixacte.php deleted file mode 100644 index 50a556a..0000000 --- a/extranet/Controleur/ControleurAjaxprixacte.php +++ /dev/null @@ -1,26 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - - $tm = ($_SESSION['p_tm_TP']>"0") ? $_SESSION['p_tm_TP'] : $_SESSION['p_tm_C']; - - $prixActe = $this->acte->getprixacte($codeActe); - $montantTm = round(($prixActe*$tm)/100); - $aRembourser = $prixActe-$montantTm; - - $delaiCarenceActe = $this->acte->getdelaicarenceacte($codeActe) ; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, - 'delaiCarenceActe' => $delaiCarenceActe)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxprixactemed.php b/extranet/Controleur/ControleurAjaxprixactemed.php deleted file mode 100644 index 45d4f49..0000000 --- a/extranet/Controleur/ControleurAjaxprixactemed.php +++ /dev/null @@ -1,38 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $infosActe = $this->acte->get_infos_acte($codeActe); - - $prixActe = $infosActe['prix']; - $prixTarif = $prixActe; - $ententePrealable = $infosActe['ententePrealable']; - $acteAlerte = $infosActe['alerte']; - $acteExclu = $infosActe['exclu']; - $acteChirurgie = $infosActe['chirurgie']; - - if($_SESSION['p_chirurgie_C']=="1" && $acteChirurgie=="1") - { - $prixActe = round($prixActe/"2"); - } - - $valeurActe = round($prixActe*$quantite); - $montantTm = round(($valeurActe*$_SESSION['p_tm_C'])/100); - $aRembourser = $valeurActe-$montantTm; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'valeurActe' => $valeurActe, - 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'ententePrealable' => $ententePrealable, - 'acteExclu' => $acteExclu, 'acteChirurgie' => $acteChirurgie, 'prixTarif' => $prixTarif, 'acteAlerte' => $acteAlerte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxprixchambre.php b/extranet/Controleur/ControleurAjaxprixchambre.php deleted file mode 100644 index dbdd30b..0000000 --- a/extranet/Controleur/ControleurAjaxprixchambre.php +++ /dev/null @@ -1,34 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $infosActe = $this->acte->get_infos_acte($codeActe); - - $prixActe = $infosActe['prix']; - $prixTarif = $prixActe; - $ententePrealable = $infosActe['ententePrealable']; - $acteAlerte = $infosActe['alerte']; - $acteExclu = $infosActe['exclu']; - $acteChirurgie = $infosActe['chirurgie']; - - $valeurActe = round($prixActe*$quantite); - $montantTm = round(($valeurActe*$_SESSION['p_tm_C'])/100); - $aRembourser = $valeurActe-$montantTm; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'valeurActe' => $valeurActe, - 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'ententePrealable' => $ententePrealable, - 'acteExclu' => $acteExclu, 'acteChirurgie' => $acteChirurgie, 'prixTarif' => $prixTarif, 'acteAlerte' => $acteAlerte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxprixseance.php b/extranet/Controleur/ControleurAjaxprixseance.php deleted file mode 100644 index 95f86dd..0000000 --- a/extranet/Controleur/ControleurAjaxprixseance.php +++ /dev/null @@ -1,34 +0,0 @@ -acte = new Detailtarifacte(); - } - - public function index() { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $infosActe = $this->acte->get_infos_acte($codeActe); - - $prixActe = $infosActe['prix']; - $prixTarif = $prixActe; - $ententePrealable = $infosActe['ententePrealable']; - $acteAlerte = $infosActe['alerte']; - $acteExclu = $infosActe['exclu']; - $acteChirurgie = $infosActe['chirurgie']; - - $valeurActe = round($prixActe*$quantite); - $fraisReel = $valeurActe; - $montantTm = round(($valeurActe*$_SESSION['p_tm_C'])/100); - $aRembourser = $valeurActe-$montantTm; - - $this->genererVueAjax(array('prixActe' => $prixActe, 'quantite' => $quantite, 'valeurActe' => $valeurActe, 'codeActe' => $codeActe, - 'montantTm' => $montantTm, 'aRembourser' => $aRembourser, 'ententePrealable' => $ententePrealable, 'fraisReel' => $fraisReel, - 'acteExclu' => $acteExclu, 'acteChirurgie' => $acteChirurgie, 'prixTarif' => $prixTarif, 'acteAlerte' => $acteAlerte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxprixseancesea.php b/extranet/Controleur/ControleurAjaxprixseancesea.php deleted file mode 100644 index 304f74c..0000000 --- a/extranet/Controleur/ControleurAjaxprixseancesea.php +++ /dev/null @@ -1,32 +0,0 @@ -prescription = new Seance_temp(); - $this->prestation = new Prestationactes(); - } - - public function index() { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->prescription->modifierseancesea($codeActe, $quantite); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroBonKine = $_SESSION['p_numeroBonKine_C']; - - $prescription = $this->prescription->getprescription_sea($numeroBonKine); - - $garantieadherent_temp = $this->prestation->afficher_garantieadherent_temp(); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - - $this->genererVueAjax(array('prescription' => $prescription, 'garantieadherent_temp' => $garantieadherent_temp, - 'limite_beneficiaire' => $limite_beneficiaire)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxreposmedical.php b/extranet/Controleur/ControleurAjaxreposmedical.php deleted file mode 100644 index fdc7c01..0000000 --- a/extranet/Controleur/ControleurAjaxreposmedical.php +++ /dev/null @@ -1,37 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $reposmedicaux = $this->feuillemaladie->getreposmedicalfeuillemaladie($numeroFeuilleMaladie); - - $this->genererVueAjax(array('reposmedicaux' => $reposmedicaux)); - } - - public function nouveaureposmedical() - { - $this->genererVueAjax(); - } - - public function creerreposmedical() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $notesNew = $this->requete->getParametreFormulaire("notesNew"); - $nbJour = $this->requete->getParametreFormulaire("nbJour"); - - $this->feuillemaladie->creerreposmedical($numeroFeuilleMaladie, $notesNew, $nbJour); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteassure.php b/extranet/Controleur/ControleurAjaxrequeteassure.php deleted file mode 100644 index f8fc38c..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteassure.php +++ /dev/null @@ -1,50 +0,0 @@ -assures = new Beneficiairerequetes(); - } - - public function index() - { - - // Ligne 1 - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 2 - $numeroPolice = $this->requete->getParametreFormulaire("numeroPolice"); - $codeProduit = $this->requete->getParametreFormulaire("codeProduit"); - $codeEtatPolice = $this->requete->getParametreFormulaire("codeEtatPolice"); - $codeLienParente = $this->requete->getParametreFormulaire("codeLienParente"); - $telephonePortableAdherent = $this->requete->getParametreFormulaire("telephonePortableAdherent"); - $emailAdherent = $this->requete->getParametreFormulaire("emailAdherent"); - $sexe = $this->requete->getParametreFormulaire("sexe"); - - // Ligne 3 - $codeEtatBeneficiaire = $this->requete->getParametreFormulaire("codeEtatBeneficiaire"); - $decede = $this->requete->getParametreFormulaire("decede"); - - $numeroClient1 = $this->requete->getParametreFormulaire("numeroClient1"); - $numeroClient2 = $this->requete->getParametreFormulaire("numeroClient2"); - - $nomClient = $this->requete->getParametreFormulaire("nomClient"); - - // FIN Champs - - $assures = $this->assures->requetesassure($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient); - - $assures_total = $this->assures->requetesassuretotal($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient); - - $this->genererVueAjax(array('assures' => $assures, 'assures_total' => $assures_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteassureexport.php b/extranet/Controleur/ControleurAjaxrequeteassureexport.php deleted file mode 100644 index 94b07bf..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteassureexport.php +++ /dev/null @@ -1,97 +0,0 @@ -assures = new Beneficiairerequetes(); - } - - public function index() - { - - // Ligne 1 - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 2 - $numeroPolice = $this->requete->getParametreFormulaire("numeroPolice"); - $codeProduit = $this->requete->getParametreFormulaire("codeProduit"); - $codeEtatPolice = $this->requete->getParametreFormulaire("codeEtatPolice"); - $codeLienParente = $this->requete->getParametreFormulaire("codeLienParente"); - $telephonePortableAdherent = $this->requete->getParametreFormulaire("telephonePortableAdherent"); - $emailAdherent = $this->requete->getParametreFormulaire("emailAdherent"); - $sexe = $this->requete->getParametreFormulaire("sexe"); - - // Ligne 3 - $codeEtatBeneficiaire = $this->requete->getParametreFormulaire("codeEtatBeneficiaire"); - $decede = $this->requete->getParametreFormulaire("decede"); - - $numeroClient1 = $this->requete->getParametreFormulaire("numeroClient1"); - $numeroClient2 = $this->requete->getParametreFormulaire("numeroClient2"); - - $nomClient = $this->requete->getParametreFormulaire("nomClient"); - - // FIN Champs - - $assures = $this->assures->requetesassureexport($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient); - - // Excel - $headerXLS = array( - 'beneficiaire', - 'adherent', - 'numeroPolice', - 'codeProduit', - 'codeLienParente', - 'telephonePortableAdherent', - 'emailAdherent', - 'codeNaturePiece', - 'numeroPiece', - 'sexe', - 'codeGroupeSanguin', - 'dateNaissance', - 'codeEtatBeneficiaire', - 'dateEntreeBeneficiaire', - 'dateSortieBeneficiaire', - 'dateDeces', - 'codeEtatPolice', - 'nomClient', - 'emailClient'); - - $dataXLS = array(); - - - foreach ($assures as $assure) - { - $dataXLS[]=$assure; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('ASSURES SANTE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/ASSURES_SANTE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
bonpec = new Bonpec(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $codeTypeBon = $this->requete->getParametreFormulaire("codeTypeBon"); - $codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon"); - - // Ligne 2 - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - $numeroBon1 = $this->requete->getParametreFormulaire("numeroBon1"); - $numeroBon2 = $this->requete->getParametreFormulaire("numeroBon2"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $bonpecs = $this->bonpec->requetesbonpec($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) ; - - $bonpecs_total = $this->bonpec->requetesbonpectotal($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) ; - - $this->genererVueAjax(array('bonpecs' => $bonpecs, 'bonpecs_total' => $bonpecs_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequetebonpecexport.php b/extranet/Controleur/ControleurAjaxrequetebonpecexport.php deleted file mode 100644 index 4dab9c6..0000000 --- a/extranet/Controleur/ControleurAjaxrequetebonpecexport.php +++ /dev/null @@ -1,81 +0,0 @@ -bonpec = new Bonpec(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $codeTypeBon = $this->requete->getParametreFormulaire("codeTypeBon"); - $codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon"); - - // Ligne 2 - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - $numeroBon1 = $this->requete->getParametreFormulaire("numeroBon1"); - $numeroBon2 = $this->requete->getParametreFormulaire("numeroBon2"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $bonpecs = $this->bonpec->requetesbonpecexport($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) ; - - // Excel - $headerXLS = array( - 'prestataire', - 'codeTypeBon', - 'numeroBon', - 'dateGeneration', - 'dateReception', - 'numeroAdherent', - 'adherent', - 'numeroBeneficiaire', - 'beneficiaire', - 'dateUtilisation', - 'etatbon'); - - $dataXLS = array(); - - - foreach ($bonpecs as $bonpec) - { - $dataXLS[]=$bonpec; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('FACTURES SANTE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/BONS_PEC_SANTE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
produit = (new Produit())->getListe(); - $this->etatpolice = (new Etatpolice())->getListe(); - $this->lienparente = (new Lienparente())->getListe(); - $this->sexe = (new Sexe())->getListe(); - $this->etatbeneficiaire = (new Etatpersonne())->getListe(); - $this->ouinondecede = (new Ouinon())->getListe(); - } - - public function index() { - $this->genererVueAjax(array('produit' => $this->produit, 'etatpolice' => $this->etatpolice, 'lienparente' => $this->lienparente, - 'sexe' => $this->sexe, 'etatbeneficiaire' => $this->etatbeneficiaire, 'ouinondecede' => $this->ouinondecede)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteentetebonpec.php b/extranet/Controleur/ControleurAjaxrequeteentetebonpec.php deleted file mode 100644 index 404d145..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteentetebonpec.php +++ /dev/null @@ -1,20 +0,0 @@ -prestataire = (new Prestataire())->getListeTypePrestataireBon(); - $this->typebon = (new Typebon())->getListe(); - $this->etatbon = (new Etatbon())->getListe(); - } - - public function index() { - // $this->genererVueAjax(array('prestataire' => $this->prestataire, 'typebon' => $this->typebon, 'etatbon' => $this->etatbon)); - $this->genererVueAjax(array('typebon' => $this->typebon, 'etatbon' => $this->etatbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteentetefacture.php b/extranet/Controleur/ControleurAjaxrequeteentetefacture.php deleted file mode 100644 index 611481f..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteentetefacture.php +++ /dev/null @@ -1,17 +0,0 @@ -ouinonfacture = (new Ouinon())->getListe(); - $this->ouinonhospit = (new Ouinon())->getListe(); - $this->ouinonchirurgie = (new Ouinon())->getListe(); - } - - public function index() { - $this->genererVueAjax(array('ouinonhospit' => $this->ouinonhospit, 'ouinonchirurgie' => $this->ouinonchirurgie)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteentetefeuillemaladie.php b/extranet/Controleur/ControleurAjaxrequeteentetefeuillemaladie.php deleted file mode 100644 index 735ed0f..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteentetefeuillemaladie.php +++ /dev/null @@ -1,21 +0,0 @@ -raison = (new Raisonconsultation())->getListe(); - $this->ouinonfacture = (new Ouinon())->getListe(); - $this->ouinonhospit = (new Ouinon())->getListe(); - $this->ouinonchirurgie = (new Ouinon())->getListe(); - } - - public function index() { - $this->genererVueAjax(array('raison' => $this->raison, 'ouinonfacture' => $this->ouinonfacture, - 'ouinonhospit' => $this->ouinonhospit, 'ouinonchirurgie' => $this->ouinonchirurgie)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteenteteoptique.php b/extranet/Controleur/ControleurAjaxrequeteenteteoptique.php deleted file mode 100644 index 6380c87..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteenteteoptique.php +++ /dev/null @@ -1,15 +0,0 @@ -prestataireprescription = (new Prestataire())->getListeTypePrestataire("CSO"); - } - - public function index() { - $this->genererVueAjax(array('prestataireprescription' => $this->prestataireprescription)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteentetepharmacie.php b/extranet/Controleur/ControleurAjaxrequeteentetepharmacie.php deleted file mode 100644 index a7f0785..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteentetepharmacie.php +++ /dev/null @@ -1,15 +0,0 @@ -prestataireprescription = (new Prestataire())->getListeTypePrestataire("CSO"); - } - - public function index() { - $this->genererVueAjax(array('prestataireprescription' => $this->prestataireprescription)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteentetepharmacieb.php b/extranet/Controleur/ControleurAjaxrequeteentetepharmacieb.php deleted file mode 100644 index a4e4df3..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteentetepharmacieb.php +++ /dev/null @@ -1,15 +0,0 @@ -prestataireprescription = (new Prestataire())->getListeTypePrestataire("CSO"); - } - - public function index() { - $this->genererVueAjax(array('prestataireprescription' => $this->prestataireprescription)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteenteteprestationactes.php b/extranet/Controleur/ControleurAjaxrequeteenteteprestationactes.php deleted file mode 100644 index 23d906e..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteenteteprestationactes.php +++ /dev/null @@ -1,22 +0,0 @@ -typeprestation = (new Typeprestation())->getListe(); - $this->ouinonfacture = (new Ouinon())->getListe(); - $this->reponseententeprealable = (new Reponseententeprealable())->getListe(); - } - - public function index() { - $this->genererVueAjax(array('typeprestation' => $this->typeprestation, 'ouinonfacture' => $this->ouinonfacture, - 'reponseententeprealable' => $this->reponseententeprealable)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequetefacture.php b/extranet/Controleur/ControleurAjaxrequetefacture.php deleted file mode 100644 index 5288e93..0000000 --- a/extranet/Controleur/ControleurAjaxrequetefacture.php +++ /dev/null @@ -1,34 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $dateFacture1 = $this->requete->getParametreDate("dateFacture1"); - $dateFacture2 = $this->requete->getParametreDate("dateFacture2"); - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateFacture1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateFacture2"); - $chrono = "1"; - - $factures = $this->facture->requetesfacturenew($codePrestataire, $dateFacture1, $dateFacture2, $chrono); - - $factures_total = null; - - if(count($factures)>"0") - { - $factures_total = $factures['0']; - } - - $this->genererVueAjax(array('factures' => $factures, 'factures_total' => $factures_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequetefactureexport.php b/extranet/Controleur/ControleurAjaxrequetefactureexport.php deleted file mode 100644 index 035f566..0000000 --- a/extranet/Controleur/ControleurAjaxrequetefactureexport.php +++ /dev/null @@ -1,71 +0,0 @@ -facture = new Facture(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $dateFacture1 = $this->requete->getParametreDate("dateFacture1"); - $dateFacture2 = $this->requete->getParametreDate("dateFacture2"); - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateFacture1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateFacture2"); - $chrono = "1"; - - $factures = $this->facture->requetesfactureexportnew($codePrestataire, $dateFacture1, $dateFacture2) ; - - // Excel - - $headerXLS = array( - 'prestataire', - 'NoAdherent', - 'adherent', - 'NoBeneficiaire', - 'beneficiaire', - 'dateFacture', - 'NoBon', - 'fraisReel', - 'TM', - 'Arembourser', - 'Depass', - 'Retenu', - 'Facture'); - - $dataXLS = array(); - - foreach ($factures as $facture) - { - $dataXLS[]=$facture; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('FACTURES SANTE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/FACTURES_SANTE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateConsultation1 = $this->requete->getParametreDate("dateConsultation1"); - $dateConsultation2 = $this->requete->getParametreDate("dateConsultation2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); - $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); - - $numeroBonHospitalisation1 = $this->requete->getParametreFormulaire("numeroBonHospitalisation1"); - $numeroBonHospitalisation2 = $this->requete->getParametreFormulaire("numeroBonHospitalisation2"); - - $numeroBonOptique1 = $this->requete->getParametreFormulaire("numeroBonOptique1"); - $numeroBonOptique2 = $this->requete->getParametreFormulaire("numeroBonOptique2"); - - // Ligne 3 - $codeTypePrestataire = $this->requete->getParametreFormulaire("codeTypePrestataire"); - - $numeroDecompte1 = $this->requete->getParametreFormulaire("numeroDecompte1"); - $numeroDecompte2 = $this->requete->getParametreFormulaire("numeroDecompte2"); - - $codeRaisonConsultation = $this->requete->getParametreFormulaire("codeRaisonConsultation"); - $hospitalisation = $this->requete->getParametreFormulaire("hospitalisation"); - $numeroChambre = $this->requete->getParametreFormulaire("numeroChambre"); - $chirurgie = $this->requete->getParametreFormulaire("chirurgie"); - $facture = $this->requete->getParametreFormulaire("facture"); - - // Ligne 4 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateConsultation1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateConsultation2"); - - $feuillemaladies = $this->feuillemaladie->requetesfeuillesmaladie($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire) ; - - $feuillemaladies_total = $this->feuillemaladie->requetesfeuillesmaladietotal($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire) ; - - $this->genererVueAjax(array('feuillemaladies' => $feuillemaladies, 'feuillemaladies_total' => $feuillemaladies_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequetefeuillemaladieexport.php b/extranet/Controleur/ControleurAjaxrequetefeuillemaladieexport.php deleted file mode 100644 index 00f2e11..0000000 --- a/extranet/Controleur/ControleurAjaxrequetefeuillemaladieexport.php +++ /dev/null @@ -1,134 +0,0 @@ -feuillemaladie = new Feuillemaladie(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateConsultation1 = $this->requete->getParametreDate("dateConsultation1"); - $dateConsultation2 = $this->requete->getParametreDate("dateConsultation2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); - $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); - - $numeroBonHospitalisation1 = $this->requete->getParametreFormulaire("numeroBonHospitalisation1"); - $numeroBonHospitalisation2 = $this->requete->getParametreFormulaire("numeroBonHospitalisation2"); - - $numeroBonOptique1 = $this->requete->getParametreFormulaire("numeroBonOptique1"); - $numeroBonOptique2 = $this->requete->getParametreFormulaire("numeroBonOptique2"); - - // Ligne 3 - $codeTypePrestataire = $this->requete->getParametreFormulaire("codeTypePrestataire"); - - $numeroDecompte1 = $this->requete->getParametreFormulaire("numeroDecompte1"); - $numeroDecompte2 = $this->requete->getParametreFormulaire("numeroDecompte2"); - - $codeRaisonConsultation = $this->requete->getParametreFormulaire("codeRaisonConsultation"); - $hospitalisation = $this->requete->getParametreFormulaire("hospitalisation"); - $numeroChambre = $this->requete->getParametreFormulaire("numeroChambre"); - $chirurgie = $this->requete->getParametreFormulaire("chirurgie"); - $facture = $this->requete->getParametreFormulaire("facture"); - - // Ligne 4 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateConsultation1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateConsultation2"); - - $feuillemaladies = $this->feuillemaladie->requetesfeuillesmaladieexport($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire) ; - - // Excel - $headerXLS = array( - 'prestataire', - 'dateSysteme', - 'Medecin', - 'NoMedecin', - 'NoAdherent', - 'adherent', - 'NoBeneficiaire', - 'beneficiaire', - 'NoFeuille', - 'dateConsultation', - 'NoBonCons', - 'NoBonOrd', - 'NoBonHosp', - 'NoBonOpt', - 'fraisReel', - 'TxTM', - 'TM', - 'Arembourser', - 'Exclu', - 'Retenu', - 'MtForce', - 'Redresse', - 'Apayer', - 'Paye', - 'Rembourse', - 'facture', - 'NoDerog_Reseau', - 'NoDerog_Fing', - 'hospitalisation', - 'Hospit', - 'chirurgie', - 'raisonconsultation', - 'NoDecompte', - 'valide', - 'regle', - 'login'); - - $dataXLS = array(); - - - foreach ($feuillemaladies as $feuillemaladie) - { - $dataXLS[]=$feuillemaladie; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('FEUILLES MALADIE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/FEUILLES_MALADIE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
opticiens = new Opticiens(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); - $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOptique1 = $this->requete->getParametreFormulaire("numeroBonOptique1"); - $numeroBonOptique2 = $this->requete->getParametreFormulaire("numeroBonOptique2"); - - $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); - $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); - - $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 4 - $libelleOptique = $this->requete->getParametreFormulaire("libelleOptique"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); - - $opticiens = $this->opticiens->requetesoptique($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique); - - $opticiens_total = $this->opticiens->requetesoptiquetotal($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique); - - $this->genererVueAjax(array('opticiens' => $opticiens, 'opticiens_total' => $opticiens_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteoptiqueexport.php b/extranet/Controleur/ControleurAjaxrequeteoptiqueexport.php deleted file mode 100644 index 22b9d4e..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteoptiqueexport.php +++ /dev/null @@ -1,112 +0,0 @@ -opticiens = new Opticiens(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); - $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOptique1 = $this->requete->getParametreFormulaire("numeroBonOptique1"); - $numeroBonOptique2 = $this->requete->getParametreFormulaire("numeroBonOptique2"); - - $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); - $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); - - $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 4 - $libelleOptique = $this->requete->getParametreFormulaire("libelleOptique"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); - - $opticiens = $this->opticiens->requetesoptiqueexport($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique); - - // Excel - $headerXLS = array( - 'prestataire', - 'dateSysteme', - 'NoAdherent', - 'adherent', - 'NoBeneficiaire', - 'beneficiaire', - 'idPrestation', - 'NoBonOpt', - 'NoFeuille', - 'NoBonCons', - 'typeVerres', - 'verres', - 'monture', - 'fraisReel', - 'TM', - 'Arembourser', - 'Exclu', - 'Retenu', - 'MtForce', - 'Apayer', - 'valide', - 'Redresse', - 'prestatairePrescription', - 'medecinPrescription', - 'NoMedecin'); - - $dataXLS = array(); - - - foreach ($opticiens as $opticien) - { - $dataXLS[]=$opticien; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('ACTES OPTIQUES SANTE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/ACTES_OPTIQUES_SANTE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' ';; - $t_html .='
pharmacie = new Pharmacie(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); - $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); - $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); - - $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); - $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); - - $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 4 - $libelleMedicament = $this->requete->getParametreFormulaire("libelleMedicament"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); - - $pharmacies = $this->pharmacie->requetespharmacie($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); - - $pharmacies_total = $this->pharmacie->requetespharmacietotal($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); - - $this->genererVueAjax(array('pharmacies' => $pharmacies, 'pharmacies_total' => $pharmacies_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequetepharmacieb.php b/extranet/Controleur/ControleurAjaxrequetepharmacieb.php deleted file mode 100644 index c247502..0000000 --- a/extranet/Controleur/ControleurAjaxrequetepharmacieb.php +++ /dev/null @@ -1,60 +0,0 @@ -pharmacie = new Pharmacie(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); - $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); - $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); - - $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); - $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); - - $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 4 - $libelleMedicament = $this->requete->getParametreFormulaire("libelleMedicament"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); - - $pharmacies = $this->pharmacie->requetespharmacie($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); - - $pharmacies_total = $this->pharmacie->requetespharmacietotal($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); - - $this->genererVueAjax(array('pharmacies' => $pharmacies, 'pharmacies_total' => $pharmacies_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequetepharmaciebexport.php b/extranet/Controleur/ControleurAjaxrequetepharmaciebexport.php deleted file mode 100644 index a35f88e..0000000 --- a/extranet/Controleur/ControleurAjaxrequetepharmaciebexport.php +++ /dev/null @@ -1,110 +0,0 @@ -pharmacie = new Pharmacie(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); - $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); - $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); - - $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); - $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); - - $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 4 - $libelleMedicament = $this->requete->getParametreFormulaire("libelleMedicament"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); - - $pharmacies = $this->pharmacie->requetespharmacieexport($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); - - // Excel - $headerXLS = array( - 'prestataire', - 'dateSysteme', - 'NoAdherent', - 'adherent', - 'NoBeneficiaire', - 'beneficiaire', - 'idPrestation', - 'NoBonOrd', - 'NoFeuille', - 'NoBonCons', - 'Medicament', - 'Prix', - 'quantite', - 'fraisReel', - 'TM', - 'Arembourser', - 'Exclu', - 'Retenu', - 'MtForce', - 'Apayer', - 'valide', - 'Redresse', - 'prestatairePrescription', - 'medecinPrescription', - 'NoMedecin'); - - $dataXLS = array(); - - - foreach ($pharmacies as $pharmacie) - { - $dataXLS[]=$pharmacie; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('ACTES PHARAMACIE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/ACTES_PHARAMACIE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' ACTES PHARAMACIE AU FORMAT EXCEL / DONWLOAD RESULTS '; - $t_html .='
pharmacie = new Pharmacie(); - } - - public function index() - { - // Ligne 1 - $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); - $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); - $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); - - // Ligne 2 - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - - $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); - $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); - - $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); - $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); - - $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); - $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); - - $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); - - // Ligne 3 - $adherent = $this->requete->getParametreFormulaire("adherent"); - $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); - - // Ligne 4 - $libelleMedicament = $this->requete->getParametreFormulaire("libelleMedicament"); - - // FIN Champs - - $_SESSION['p_codePrestataire_C'] = $codePrestataire; - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); - - $pharmacies = $this->pharmacie->requetespharmacieexport($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); - - // Excel - $headerXLS = array( - 'prestataire', - 'dateSysteme', - 'NoAdherent', - 'adherent', - 'NoBeneficiaire', - 'beneficiaire', - 'idPrestation', - 'NoBonOrd', - 'NoFeuille', - 'NoBonCons', - 'Medicament', - 'Prix', - 'quantite', - 'fraisReel', - 'TM', - 'Arembourser', - 'Exclu', - 'Retenu', - 'MtForce', - 'Apayer', - 'valide', - 'Redresse', - 'prestatairePrescription', - 'medecinPrescription', - 'NoMedecin'); - - $dataXLS = array(); - - - foreach ($pharmacies as $pharmacie) - { - $dataXLS[]=$pharmacie; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('ACTES PHARAMACIE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/ACTES_PHARAMACIE_'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
prestationactes = new Prestationactes(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $datePrestation1 = $this->requete->getParametreDate("datePrestation1"); - $datePrestation2 = $this->requete->getParametreDate("datePrestation2"); - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("datePrestation1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("datePrestation2"); - $chrono = "1"; - - $prestationactes = $this->prestationactes->requetesprestationactesnew($codePrestataire, $datePrestation1, $datePrestation2); - - $prestationactes_total = null; - - if(count($prestationactes)>"0") - { - $prestationactes_total = $prestationactes['0']; - } - - $this->genererVueAjax(array('prestationactes' => $prestationactes, 'prestationactes_total' => $prestationactes_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxrequeteprestationactesexport.php b/extranet/Controleur/ControleurAjaxrequeteprestationactesexport.php deleted file mode 100644 index c399e90..0000000 --- a/extranet/Controleur/ControleurAjaxrequeteprestationactesexport.php +++ /dev/null @@ -1,77 +0,0 @@ -prestationactes = new Prestationactes(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $datePrestation1 = $this->requete->getParametreDate("datePrestation1"); - $datePrestation2 = $this->requete->getParametreDate("datePrestation2"); - - $_SESSION['p_debutRequeteFr_C'] = $this->requete->getParametreFormulaire("datePrestation1"); - $_SESSION['p_finRequeteFr_C'] = $this->requete->getParametreFormulaire("datePrestation2"); - $chrono = "1"; - - $prestationactes = $this->prestationactes->requetesprestationactesexportnew($codePrestataire, $datePrestation1, $datePrestation2); - - // Excel - $headerXLS = array( - "NoAdherent", - "adherent", - "NoBeneficiaire", - "beneficiaire", - "datePrestation", - "NoBon", - "codeTypePrestation", - "libelleActe", - "valeurActe", - "quantite", - "fraisReel", - "montantTm", - "montantArembourser", - "fraisExclu", - "fraisRetenu", - "idFacture", - "valide", - "login", - "ententePrealable"); - - $dataXLS = array(); - - - foreach ($prestationactes as $prestationacte) - { - $dataXLS[]=$prestationacte; - } - - - $classeur = new PHPExcel(); - $classeur->getProperties()->setCreator("INTER-SANTE"); - $classeur->setActiveSheetIndex(0); - $feuille=$classeur->getActiveSheet(); - $feuille->setTitle('PRESTATIONS SANTE'); - $feuille->fromArray($headerXLS, NULL, 'A1', true); - $feuille->fromArray($dataXLS, NULL, 'A2', true); - - //Forcer le téléchargement vers le navigateur; - $fichier = 'Temp/PRESTATIONS_SANTE'."_".uniqid().".xlsx"; - - $writer = new PHPExcel_Writer_Excel2007($classeur); - $writer->save($fichier); - - $t_html ='
'; - $t_html .=' '._("TELECHARGER").' '; - $t_html .='
acte = new Detailtarifacte(); - $this->prestation = new Prestationactes(); - } - - public function index() { - $codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe"); - - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $actes = $this->acte->geatactesexamensselection($codeFamilleActe); - - $prestations = $this->prestation->getactesmedicauxfeuille($numeroFeuilleMaladie, $codePrestataire); - $prestations_total = $this->prestation->getactesmedicauxfeuille_total($numeroFeuilleMaladie, $codePrestataire); - - $this->genererVueAjax(array('actes' => $actes, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } - - public function enregistreractemedical() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); - $prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique"); - $valeurActe = $prixActe ; - // $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - $quantite = "1"; - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique"); - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - $autorisation = "0"; - $prixTarif = $prixActe ; - - $this->prestation->enregistreractemedical($codeActe, $codeMedecin, $quantite, $prixActe, $valeurActe, $montantTm, $aRembourser, - $ententePrealable, $autorisation, $prixTarif); - - $this->executerAction("index"); - } - - public function supprimeracte() - { - $idPrestationactes = $this->requete->getParametre("idPrestationactes"); - $codeTypePrestation = $this->requete->getParametre("codeTypePrestation"); - - $this->prestation->supprimeracteselect($idPrestationactes, $codeTypePrestation); - - $this->executerAction("index"); - } - - public function majquantite() - { - $idPrestationactes = $this->requete->getParametre("idPrestationactes"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->prestation->majquantite($idPrestationactes, $quantite); - - $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxselectexamens.php b/extranet/Controleur/ControleurAjaxselectexamens.php deleted file mode 100644 index 1fb5879..0000000 --- a/extranet/Controleur/ControleurAjaxselectexamens.php +++ /dev/null @@ -1,79 +0,0 @@ -acte = new Detailtarifacte(); - - $this->detailprescription = new Detailexamem(); - - $this->prescription = new Examen_temp(); - - $codeTypePrestation = "EXAM"; - $this->familleacte = (new Familleacte())->getListe($codeTypePrestation); - - } - - public function index() { - $codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe"); - - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $actes = $this->acte->geatexamenspossiblesselection($codeFamilleActe); - - $prestations = $this->prescription->getdetaillivre(); - $prestations_total = $this->prescription->getdetaillivre_total(); - - $this->genererVueAjax(array('familleacte' => $this->familleacte, 'actes' => $actes, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } - - public function ajouterexamenprescription() - { - $codeActe = $this->requete->getParametreFormulaire("codeActe"); - $ententePrealable = $this->requete->getParametreFormulaire("ententePrealable"); - - $this->detailprescription->ajouterexamenlab($codeActe, $ententePrealable); - - $this->executerAction("index"); - } - - public function retirerexamen() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - - $this->prescription->retirerexamen($idExamen); - - $this->executerAction("index"); - } - - public function supprimeracte() - { - $idPrestationactes = $this->requete->getParametre("idPrestationactes"); - $codeTypePrestation = $this->requete->getParametre("codeTypePrestation"); - - $this->prestation->supprimeracteselect($idPrestationactes, $codeTypePrestation); - - $this->executerAction("index"); - } - - public function majquantiteexam() - { - $idExamen = $this->requete->getParametreFormulaire("idExamen"); - $quantite = $this->requete->getParametreFormulaire("quantite", "numerique"); - - $this->detailprescription->majquantiteexam($idExamen, $quantite); - - $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxsmailadhattente.php b/extranet/Controleur/ControleurAjaxsmailadhattente.php deleted file mode 100644 index b9c0a62..0000000 --- a/extranet/Controleur/ControleurAjaxsmailadhattente.php +++ /dev/null @@ -1,27 +0,0 @@ -envoimail = new Envoimail(); - } - - public function index() - { - } - - public function ajouter() - { - $email = $this->requete->getParametreFormulaire("email"); - $objet = $this->requete->getParametreFormulaire("objet"); - $message = $this->requete->getParametreFormulaire("message"); - - $this->envoimail->ajoutermailadherent($email, $objet, $message); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxsmsattente.php b/extranet/Controleur/ControleurAjaxsmsattente.php deleted file mode 100644 index 6f63cb0..0000000 --- a/extranet/Controleur/ControleurAjaxsmsattente.php +++ /dev/null @@ -1,26 +0,0 @@ -envoimail = new Envoimail(); - } - - public function index() - { - } - - public function ajouter() - { - $destinataires = $this->requete->getParametreFormulaire("destinataires"); - $message = $this->requete->getParametreFormulaire("message"); - - $this->envoimail->ajoutersms($destinataires, $message); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxsubstitutionmedicament.php b/extranet/Controleur/ControleurAjaxsubstitutionmedicament.php deleted file mode 100644 index f0c27c5..0000000 --- a/extranet/Controleur/ControleurAjaxsubstitutionmedicament.php +++ /dev/null @@ -1,30 +0,0 @@ -prescription = new Prescription_temp(); - } - - public function index() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $medicament = $this->prescription->getmedicament($idMedicament); - - $this->genererVueAjax(array('medicament' => $medicament)); - } - - public function substituermedicament() - { - $idMedicament = $this->requete->getParametreFormulaire("idMedicament"); - - $this->prescription->annulersubstitutionmedicament($idMedicament); - - // $this->executerAction("index"); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxtesterdisponiblitesms.php b/extranet/Controleur/ControleurAjaxtesterdisponiblitesms.php deleted file mode 100644 index 7727024..0000000 --- a/extranet/Controleur/ControleurAjaxtesterdisponiblitesms.php +++ /dev/null @@ -1,150 +0,0 @@ -requete->getParametreFormulaire("destinataires"); - $message = $this->requete->getParametreFormulaire("message"); - $fournisseurSms = $this->requete->getParametreFormulaire("fournisseurSms"); - - // var_dump($fournisseurSms); - - $dest = explode(',', $destinataires); - - // var_dump($dest); - - foreach ($dest as $tel) - { - if($fournisseurSms=="esicia") - { - $this->envoyersmsesicia($tel, $message); - } - elseif($fournisseurSms=="blive") - { - $this->envoyersmsbliive($tel, $message); - } - elseif($fournisseurSms=="hooza") - { - $this->envoyersmshooza($tel, $message); - } - } - } - - public function envoyersmsbliive($destinataires_c, $message_c) - { - // problème avec le https - // $url = "http://app.blive.bi/bridge-ws/ws/send"; - $url = "https://app.blive.bi/bridge-ws/ws/send"; - - $get = array - ( - 'id' =>'snd-4b3abf81d-21707', - 'from' =>'MEDICOR', - 'to' =>$destinataires_c, - 'text' =>$message_c - ); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_USERPWD, "BICOR-VIE:60cd7371a27c410484a1b485d273bef9"); - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - curl_setopt($ch, CURLOPT_POST, TRUE); - curl_setopt($ch, CURLOPT_POSTFIELDS, $get); - - $result = curl_exec($ch); - - if (curl_errno($ch)) - { - echo 'Error:' . curl_error($ch); - curl_close($ch); - exit(); - } - - $info = curl_getinfo($ch); - var_dump($result); - exit(); - - curl_close($ch); - - // A SUPPRIMER - var_dump($result); - } - - public function envoyersmsesicia($destinataires_c, $message_c) - { - // var_dump($destinataires_c); - - // problème avec le https - $url = "http://gateway.esicia.com/sendsms/?"; - - $postFields = array - ( - 'ohereza' =>'MEDICARE', - 'kuri' =>$destinataires_c, - 'ubutumwa' =>$message_c, - 'client' =>'radiant', - 'password' =>'umugozi', - 'msgid' =>'kanesin' - ); - - $post = http_build_query($postFields); - - $url .= $post; - - $result = file_get_contents($url); - - // A SUPPRIMER - var_dump($result); - } - - public function envoyersmshooza($destinataires_c, $message_c) - { - // var_dump($destinataires_c); - - $url = "http://rslr.connectbind.com/bulksms/bulksms"; - - $get = array - ( - 'username' =>'HoAj-radiant', - 'password' =>'radiant', - 'type' =>'0', - 'dlr' =>'1', - 'destination' =>$destinataires_c, - 'source' =>'MEDICARE', - 'message' =>$message_c - ); - - $defaults = array( - CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). http_build_query($get), - // CURLOPT_URL => $url, - CURLOPT_HEADER => 0, - CURLOPT_RETURNTRANSFER => TRUE, - CURLOPT_TIMEOUT => 10 - ); - - $ch = curl_init(); - - curl_setopt_array($ch, ($defaults)); - if( ! $result = curl_exec($ch)) - { - trigger_error(curl_error($ch)); - } - - curl_close($ch); - - // A SUPPRIMER - var_dump($result); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAjaxverifierfacturecons.php b/extranet/Controleur/ControleurAjaxverifierfacturecons.php deleted file mode 100644 index c688179..0000000 --- a/extranet/Controleur/ControleurAjaxverifierfacturecons.php +++ /dev/null @@ -1,29 +0,0 @@ -prestations = new Prestationactes_temp(); - } - - public function index() - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - $numeroDecompte = $this->requete->getParametreFormulaire("numeroDecompte"); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - $_SESSION['p_idFacture_C'] = $idFacture; - - $facture_pop = $this->prestations->get_facture_decompte(); - - $prestations = $this->prestations->getprestationsfeuille_temp($numeroDecompte, $idFacture); - - $prestations_total = $this->prestations->getprestationsfeuille_temp_total(); - - $this->genererVueAjax(array('facture_pop' => $facture_pop, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} diff --git a/extranet/Controleur/ControleurAjaxverifierfactureoptcons.php b/extranet/Controleur/ControleurAjaxverifierfactureoptcons.php deleted file mode 100644 index 8c08300..0000000 --- a/extranet/Controleur/ControleurAjaxverifierfactureoptcons.php +++ /dev/null @@ -1,29 +0,0 @@ -prestations = new Prestationactes_temp(); - } - - public function index() - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - $numeroDecompte = $this->requete->getParametreFormulaire("numeroDecompte"); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - $_SESSION['p_idFacture_C'] = $idFacture; - - $facture_pop = $this->prestations->get_facture_decompte(); - - $prestations = $this->prestations->getprestationsfeuille_temp_opt($numeroDecompte, $idFacture); - - $prestations_total = $this->prestations->getprestationsfeuille_temp_total(); - - $this->genererVueAjax(array('facture_pop' => $facture_pop, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} diff --git a/extranet/Controleur/ControleurAjaxverifierfacturephacons.php b/extranet/Controleur/ControleurAjaxverifierfacturephacons.php deleted file mode 100644 index 95275a8..0000000 --- a/extranet/Controleur/ControleurAjaxverifierfacturephacons.php +++ /dev/null @@ -1,29 +0,0 @@ -prestations = new Prestationactes_temp(); - } - - public function index() - { - $numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie"); - $idFacture = $this->requete->getParametreFormulaire("idFacture"); - $numeroDecompte = $this->requete->getParametreFormulaire("numeroDecompte"); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - $_SESSION['p_idFacture_C'] = $idFacture; - - $facture_pop = $this->prestations->get_facture_decompte(); - - $prestations = $this->prestations->getprestationsfeuille_temp_pha($numeroDecompte, $idFacture); - - $prestations_total = $this->prestations->getprestationsfeuille_temp_total(); - - $this->genererVueAjax(array('facture_pop' => $facture_pop, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} diff --git a/extranet/Controleur/ControleurAjaxvidermessagerie.php b/extranet/Controleur/ControleurAjaxvidermessagerie.php deleted file mode 100644 index 8365cf0..0000000 --- a/extranet/Controleur/ControleurAjaxvidermessagerie.php +++ /dev/null @@ -1,28 +0,0 @@ -messagerie = new Messagerie(); - } - - public function index() - { - $this->genererVueAjax(); - } - - public function vidermessagerie() - { - $dateLimite = $this->requete->getParametreDate("dateLimite"); - - $this->messagerie->vidermessagerie($dateLimite); - - // $this->genererVueAjax(); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAnteceentsmedicaux.php b/extranet/Controleur/ControleurAnteceentsmedicaux.php deleted file mode 100644 index 9260903..0000000 --- a/extranet/Controleur/ControleurAnteceentsmedicaux.php +++ /dev/null @@ -1,16 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Anteceentsmedicaux'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurArchiverfacture.php b/extranet/Controleur/ControleurArchiverfacture.php deleted file mode 100644 index 19f9cd9..0000000 --- a/extranet/Controleur/ControleurArchiverfacture.php +++ /dev/null @@ -1,82 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Archiverfacture'); - $this->ged = new Ged(); - } - - public function index($nomOrigine="") - { - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - if (isset($_POST['nomOrigine'])) - { - $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); - } - $geds = $this->ged->afficherFactures($numeroBeneficiaire, $nomOrigine); - - $this->genererVue(array('geds' => $geds, 'nomOrigine' => $nomOrigine)); - } - - public function enregistredossier() - { - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - // On va uploader les fichiers joints s'il y en a - $old_file_name =''; - if( !empty($_FILES['nomFichier']['name']) ) - { - $file_tmp_name = $_FILES['nomFichier']['tmp_name']; - $old_file_name = $_FILES['nomFichier']['name']; - $file_size = $_FILES['nomFichier']['size']; - $file_type = $_FILES['nomFichier']['type']; - $file_error = $_FILES['nomFichier']['error']; - - define('TARGET', 'Ged/'); // Repertoire cible - $extension = ''; - $nomFichier = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - //exit('Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'); - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // Recuperation de l'extension du fichier - $extension = pathinfo($_FILES['nomFichier']['name'], PATHINFO_EXTENSION); - - if(isset($_FILES['nomFichier']['error']) - && UPLOAD_ERR_OK === $_FILES['nomFichier']['error']) - { - // On renomme le fichier - $nomFichier = "Fact_".$_SESSION['p_numeroBeneficiaire_C']."_".uniqid().'.'. $extension; - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['nomFichier']['tmp_name'], TARGET.$nomFichier)) - { - $this->ged->ajouterFacture($numeroBeneficiaire, $nomFichier, $old_file_name, $accesAssure="0", - $accesPrestataire="0", $accesPartenaire="0", $accesMedecin="0", $accesCompagnie="0", $accesProducteur="0", - $accesGestionnaire="1", $nomFichier); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - // On réaffiche la page on est prêt à charger un autre document// - $this->rediriger("Archiverfacture"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurArchiverged.php b/extranet/Controleur/ControleurArchiverged.php deleted file mode 100644 index 34c678b..0000000 --- a/extranet/Controleur/ControleurArchiverged.php +++ /dev/null @@ -1,80 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Archiverged'); - $this->ged = new Ged(); - } - public function index() { - $this->genererVue(); - } - - public function enregistredossier() - { - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - // On va uploader les fichiers joints s'il y en a - $old_file_name =''; - if( !empty($_FILES['nomFichier']['name']) ) - { - $accesAssure = $this->requete->getParametre("accesAssure"); - $accesPrestataire = $this->requete->getParametre("accesPrestataire"); - $accesMedecin = $this->requete->getParametre("accesMedecin"); - $accesGestionnaire = $this->requete->getParametre("accesGestionnaire"); - - - $file_tmp_name = $_FILES['nomFichier']['tmp_name']; - $old_file_name = $_FILES['nomFichier']['name']; - $file_size = $_FILES['nomFichier']['size']; - $file_type = $_FILES['nomFichier']['type']; - $file_error = $_FILES['nomFichier']['error']; - - define('TARGET', 'Ged/'); // Repertoire cible - $extension = ''; - $nomFichier = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - //exit('Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'); - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // Recuperation de l'extension du fichier - $extension = pathinfo($_FILES['nomFichier']['name'], PATHINFO_EXTENSION); - - if(isset($_FILES['nomFichier']['error']) - && UPLOAD_ERR_OK === $_FILES['nomFichier']['error']) - { - // On renomme le fichier - $nomFichier = $_SESSION['p_numeroBeneficiaire_C']."_".uniqid().'.'. $extension; - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['nomFichier']['tmp_name'], TARGET.$nomFichier)) - { - $this->ged->ajouterGed($numeroBeneficiaire, $nomFichier, $old_file_name, $accesAssure, - $accesPrestataire, $accesPartenaire="0", $accesMedecin, $accesCompagnie="0", $accesProducteur="0", - $accesGestionnaire, $nomFichier); - } - - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - // On réaffiche la page on est prêt à charger un autre document// - $this->rediriger("Afficherged"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAutresfeuillemaladie.php b/extranet/Controleur/ControleurAutresfeuillemaladie.php deleted file mode 100644 index 8272d11..0000000 --- a/extranet/Controleur/ControleurAutresfeuillemaladie.php +++ /dev/null @@ -1,16 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Autresfeuillemaladie'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurAutresprestations.php b/extranet/Controleur/ControleurAutresprestations.php deleted file mode 100644 index ac9dc87..0000000 --- a/extranet/Controleur/ControleurAutresprestations.php +++ /dev/null @@ -1,18 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Autresprestations'); - } - - public function index() - { - $this->genererVue(); - } -} diff --git a/extranet/Controleur/ControleurChambre.php b/extranet/Controleur/ControleurChambre.php deleted file mode 100644 index cb1a6a8..0000000 --- a/extranet/Controleur/ControleurChambre.php +++ /dev/null @@ -1,50 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Chambre'); - - $this->feuillemaladie = new Feuillemaladie(); - $this->prestation = new Prestationactes(); - $this->acte = new Detailtarifacte(); - $this->bonpec = new Bonpec(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeTypeBon = "HOSP"; - - $nbBonsOrd = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); - - $chambres = $this->prestation->getchambresfeuille($numeroFeuilleMaladie); - - $totalchambres = $this->prestation->gettotalchambresfeuille($numeroFeuilleMaladie); - - $acte = $this->acte->getchambespossibles(); - - - $this->genererVue(array('feuillemaladie' => $feuillemaladie, 'chambres' => $chambres, - 'totalchambres' => $totalchambres, 'acte' => $acte, 'nbBonsOrd' => $nbBonsOrd, - 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurChambrecons.php b/extranet/Controleur/ControleurChambrecons.php deleted file mode 100644 index 29ee53d..0000000 --- a/extranet/Controleur/ControleurChambrecons.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Chambrecons'); - - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $chambres = $this->prestation->getchambresfeuille($numeroFeuilleMaladie); - - $totalchambres = $this->prestation->gettotalchambresfeuille($numeroFeuilleMaladie); - - $this->genererVue(array('chambres' => $chambres, 'totalchambres' => $totalchambres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurChambreconsben.php b/extranet/Controleur/ControleurChambreconsben.php deleted file mode 100644 index 03d4fab..0000000 --- a/extranet/Controleur/ControleurChambreconsben.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Chambreconsben'); - - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $chambres = $this->prestation->getchambresfeuille($numeroFeuilleMaladie); - - $totalchambres = $this->prestation->gettotalchambresfeuille($numeroFeuilleMaladie); - - $this->genererVue(array('chambres' => $chambres, 'totalchambres' => $totalchambres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurChangermotpass.php b/extranet/Controleur/ControleurChangermotpass.php deleted file mode 100644 index 5dbecd2..0000000 --- a/extranet/Controleur/ControleurChangermotpass.php +++ /dev/null @@ -1,52 +0,0 @@ -utilisateur = new Utilisateur(); - - $this->menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Changermotpass'); - } - - public function index() - { - $this->genererVue(); - } - - public function changerpass() - { - $login = $_SESSION['p_login']; - if ($this->requete->existeParametre("ancmdp") - && $this->requete->existeParametre("nvmdp") - && $this->requete->existeParametre("cfnvmdp")) - { - $ancmdp = $this->requete->getParametre("ancmdp"); - $nvmdp = $this->requete->getParametre("nvmdp"); - $cfnvmdp = $this->requete->getParametre("cfnvmdp"); - if ($nvmdp!=$cfnvmdp) - { - $this->genererVue(array('msgErreur' => 'Veuillez confirmer votre nouveau mot de passe! / Please confirm your password!'), "index"); - } - else if ($nvmdp==$ancmdp) - { - $this->genererVue(array('msgErreur' => 'Veuillez changer de mot de passe! / Please change the password!'), "index"); - } - else if ($this->utilisateur->connecter($login, $ancmdp)) - { - $this->utilisateur->changerpass($login, $ancmdp, $nvmdp); - $this->rediriger("Recherche"); - } else - $this->genererVue(array('msgErreur' => 'Ancien mot de passe incorrect! / Invalid old password'), "index"); - } - else - $this->genererVue(array('msgErreur' => 'Veuillez revoir votre saisie! / Please try again'), "index"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurCommanderbon.php b/extranet/Controleur/ControleurCommanderbon.php deleted file mode 100644 index d9691a9..0000000 --- a/extranet/Controleur/ControleurCommanderbon.php +++ /dev/null @@ -1,20 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Commanderbon'); - - $this->typebon = new Typebon(); - } - - public function index() - { - $typebon = $this->typebon->getListe(); - $this->genererVue(array('typebon' => $typebon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConnexion.php b/extranet/Controleur/ControleurConnexion.php deleted file mode 100644 index d7560a6..0000000 --- a/extranet/Controleur/ControleurConnexion.php +++ /dev/null @@ -1,598 +0,0 @@ -utilisateur = new Utilisateur(); - $this->menu = new Menu(); - $this->logconnexion = new Logconnexion(); - // date_default_timezone_set("UTC"); - // date_default_timezone_set("Africa/Kigali"); - - $this->moritio = new Moritio(); - } - - public function index() - { - $this->genererVue(); - } - - public function connecter() - { - if ($this->requete->existeParametre("login") && $this->requete->existeParametre("mdp")) { - $login = $this->requete->getParametre("login"); - $mdp = $this->requete->getParametre("mdp"); - - // logConnexion - $heureConnexion = date("Y-m-d H:i:s"); - $ipConnexion = $_SERVER['REMOTE_ADDR']; - - $idSaisie = uniqid(); - - // $this->logconnexion->ajouter($login, $heureConnexion, $ipConnexion, $idSaisie); - $idConnexion = $this->logconnexion->ajouter($login, $heureConnexion, $ipConnexion, $idSaisie); - - // Vidage Tables temporaires - - $_SESSION['p_idSaisie'] = $idSaisie; - $_SESSION['idSaisie'] = $idSaisie; - - - $this->utilisateur->viderTablesTemporairesUser($login); - - if ($this->utilisateur->connecter($login, $mdp)) { - $this->logconnexion->succesconnexion($idConnexion); - //On obtient le user à partir de son login - $utilisateur = $this->utilisateur->getUtilisateur($login); - - // Début test Licence - $codeSociete = $utilisateur['codeSociete']; - $nomSociete = $utilisateur['nomSociete']; - - $licensed = $this->moritio->getLicensed($codeSociete, $nomSociete); - - if(!$licensed ) - { - if ($_SESSION['p_lang']=="en_US") - { - $this->genererVue(array('msgErreur' => 'PLEASE CONTACT EBENE SOLUTIONS INFORMATIQUES AT lkane@ebene.info!'), "index"); - } - else - { - $this->genererVue(array('msgErreur' => 'VEUILLEZ CONTACTER EBENE SOLUTIONS INFORMATIQUES AU lkane@ebene.info!'), "index"); - } - - exit(); - } - // Fin test Licence - - if($utilisateur['prestataireActif']<>1) - { - if ($_SESSION['p_lang']=="en_US") - { - $this->genererVue(array('msgErreur' => 'Provider disabled!'), "index"); - } - else - { - $this->genererVue(array('msgErreur' => 'Prestataire désactivé!'), "index"); - } - exit(); - } - - if($utilisateur['actif']<>1) - { - if ($_SESSION['p_lang']=="en_US") - { - $this->genererVue(array('msgErreur' => 'User disabled!'), "index"); - } - else - { - $this->genererVue(array('msgErreur' => 'Utilisateur désactivé!'), "index"); - } - exit(); - } - - // Gestion limite usage - $dateLimiteUsage = $utilisateur['dateLimiteUsage']; - $dateLimiteUsage_0 = $this->moritio->getMoritio_0(); - $dateLimiteUsage_2 = $this->moritio->getMoritio_2(); - - if($dateLimiteUsage<$dateLimiteUsage_0) - { - if ($_SESSION['p_lang']=="en_US") - { - $this->genererVue(array('msgErreur' => 'PLEASE CONTACT EBENE SOLUTIONS INFORMATIQUES AT lkane@ebene.info!'), "index"); - } - else - { - $this->genererVue(array('msgErreur' => 'VEUILLEZ CONTACTER EBENE SOLUTIONS INFORMATIQUES AU lkane@ebene.info !'), "index"); - } - exit(); - } - - if($dateLimiteUsage_2<$dateLimiteUsage_0) - { - if ($_SESSION['p_lang']=="en_US") - { - $this->genererVue(array('msgErreur' => 'PLEASE CONTACT EBENE SOLUTIONS INFORMATIQUES AT lkane@ebene.info!'), "index"); - } - else - { - $this->genererVue(array('msgErreur' => 'VEUILLEZ CONTACTER EBENE SOLUTIONS INFORMATIQUES AU lkane@ebene.info !'), "index"); - } - exit(); - } - // FIN Gestion limite usage - - // Variables de session Utilisateur - $this->requete->getSession()->setAttribut("p_dateLimiteUsage", $dateLimiteUsage); - $this->requete->getSession()->setAttribut("p_idUtilisateur", $utilisateur['idUtilisateur']); - $this->requete->getSession()->setAttribut("p_idUtilisateur_C", $utilisateur['idUtilisateur']); - $this->requete->getSession()->setAttribut("p_login", $utilisateur['login']); - $this->requete->getSession()->setAttribut("p_login_C", $utilisateur['login']); - $this->requete->getSession()->setAttribut("p_codeSociete", $utilisateur['codeSociete']); - $this->requete->getSession()->setAttribut("p_codeSociete_C", $utilisateur['codeSociete']); - $this->requete->getSession()->setAttribut("p_codeUtilisateur", $utilisateur['codeUtilisateur']); - $this->requete->getSession()->setAttribut("p_codeUtilisateur_C", $utilisateur['codeUtilisateur']); - $this->requete->getSession()->setAttribut("p_nomUtilisateur_C", $utilisateur['nomUtilisateur']); - $this->requete->getSession()->setAttribut("p_prenomsUtilisateur_C", $utilisateur['prenomsUtilisateur']); - $this->requete->getSession()->setAttribut("p_utilisateur_C", $utilisateur['utilisateur']); - $this->requete->getSession()->setAttribut("p_telephoneUtilisateur_C", $utilisateur['telephoneUtilisateur']); - $this->requete->getSession()->setAttribut("p_emailUtilisateur_C", $utilisateur['emailUtilisateur']); - $this->requete->getSession()->setAttribut("p_codeProfil", $utilisateur['codeProfil']); - $this->requete->getSession()->setAttribut("p_codeProfil_C", $utilisateur['codeProfil']); - $this->requete->getSession()->setAttribut("p_codeTypeFacture_C", ""); - - $this->requete->getSession()->setAttribut("p_codePrestataire_C", $utilisateur['codePrestataire']); - - $this->requete->getSession()->setAttribut("p_codeMedecin_C", ""); - $this->requete->getSession()->setAttribut("p_medecinConsultation_C", ""); - - $this->requete->getSession()->setAttribut("p_codeTypeBon_C", ""); - $this->requete->getSession()->setAttribut("p_profil_C", $utilisateur['profil']); - $this->requete->getSession()->setAttribut("p_prestataire_C", $utilisateur['prestataire']); - $this->requete->getSession()->setAttribut("p_codeReseauPrestataire_C", $utilisateur['codeReseauPrestataire']); - $this->requete->getSession()->setAttribut("p_codeTypePrestataire_C", $utilisateur['codeTypePrestataire']); - $this->requete->getSession()->setAttribut("p_codeTypeDecompte_C", $utilisateur['codeTypeDecompte']); - $this->requete->getSession()->setAttribut("p_pharmacieInterne_C", $utilisateur['pharmacieInterne']); - $this->requete->getSession()->setAttribut("p_optiqueInterne_C", $utilisateur['optiqueInterne']); - $this->requete->getSession()->setAttribut("p_typeprestataire_C", $utilisateur['typeprestataire']); - $this->requete->getSession()->setAttribut("p_reseausoinPrestataire_C", $utilisateur['reseausoinPrestataire']); - $this->requete->getSession()->setAttribut("p_tmStandard_C", $utilisateur['tmStandard']); - $this->requete->getSession()->setAttribut("p_codePaysPrestataire_C", $utilisateur['codePaysPrestataire']); - $this->requete->getSession()->setAttribut("p_paysPrestataire_C", $utilisateur['paysPrestataire']); - $this->requete->getSession()->setAttribut("p_conventionne_C", $utilisateur['conventionne']); - $this->requete->getSession()->setAttribut("p_estconventionne_C", $utilisateur['estconventionne']); - $this->requete->getSession()->setAttribut("p_adresseGeoPrestataire_C", $utilisateur['adresseGeoPrestataire']); - $this->requete->getSession()->setAttribut("p_adressePostPrestataire_C", $utilisateur['adressePostPrestataire']); - $this->requete->getSession()->setAttribut("p_telephoneFixePrestataire_C", $utilisateur['telephoneFixePrestataire']); - $this->requete->getSession()->setAttribut("p_telephonePortablePrestataire_C", $utilisateur['telephonePortablePrestataire']); - $this->requete->getSession()->setAttribut("p_faxPrestatairePrestataire_C", $utilisateur['faxPrestatairePrestataire']); - $this->requete->getSession()->setAttribut("p_emailPrestataire_C", $utilisateur['emailPrestataire']); - $this->requete->getSession()->setAttribut("p_emailGestionPrestataire_C", $utilisateur['emailGestionPrestataire']); - $this->requete->getSession()->setAttribut("p_nomResponsablePrestataire_C", $utilisateur['nomResponsablePrestataire']); - $this->requete->getSession()->setAttribut("p_contactResponsablePrestataire_C", $utilisateur['contactResponsablePrestataire']); - $this->requete->getSession()->setAttribut("p_emailResponsablePrestataire_C", $utilisateur['emailResponsablePrestataire']); - $this->requete->getSession()->setAttribut("p_nomInterlocuteurPrestataire_C", $utilisateur['nomInterlocuteurPrestataire']); - $this->requete->getSession()->setAttribut("p_contactInterlocuteurPrestataire_C", $utilisateur['contactInterlocuteurPrestataire']); - $this->requete->getSession()->setAttribut("p_emailInterlocuteurPrestataire_C", $utilisateur['emailInterlocuteurPrestataire']); - $this->requete->getSession()->setAttribut("p_villeSignature_C", $utilisateur['villeSignature']); - - $this->requete->getSession()->setAttribut("p_nomSociete_C", $utilisateur['nomSociete']); - $this->requete->getSession()->setAttribut("p_nomSociete", $utilisateur['nomSociete']); - $this->requete->getSession()->setAttribut("p_nomProduitSante", $utilisateur['nomProduitSante']); - - $this->requete->getSession()->setAttribut("p_largeurPhoto", $utilisateur['largeurPhoto']); - $this->requete->getSession()->setAttribut("p_longueurPhoto", $utilisateur['longueurPhoto']); - - $this->requete->getSession()->setAttribut("p_villeSociete", $utilisateur['ville']); - $this->requete->getSession()->setAttribut("p_numCompteSociete_C", $utilisateur['numCompteSociete']); - $this->requete->getSession()->setAttribut("p_adresseGeoSociete_C", $utilisateur['adresseGeoSociete']); - $this->requete->getSession()->setAttribut("p_adressePostSociete_C", $utilisateur['adressePostSociete']); - $this->requete->getSession()->setAttribut("p_villeSociete_C", $utilisateur['villeSociete']); - $this->requete->getSession()->setAttribut("p_telephoneSociete_C", $utilisateur['telephoneSociete']); - $this->requete->getSession()->setAttribut("p_emailSociete_C", $utilisateur['emailSociete']); - $this->requete->getSession()->setAttribut("p_portableSociete_C", $utilisateur['portableSociete']); - $this->requete->getSession()->setAttribut("p_nomResponsableSociete_C", $utilisateur['nomResponsableSociete']); - $this->requete->getSession()->setAttribut("p_codePaysSociete_C", $utilisateur['codePaysSociete']); - $this->requete->getSession()->setAttribut("p_medecinConseil_C", $utilisateur['medecinConseil']); - $this->requete->getSession()->setAttribut("p_telephoneMedecinConseil_C", $utilisateur['telephoneMedecinConseil']); - $this->requete->getSession()->setAttribut("p_sigleSociete_C", $utilisateur['sigleSociete']); - - $this->requete->getSession()->setAttribut("p_emailMedecinConseil_C", $utilisateur['emailMedecinConseil']); - $this->requete->getSession()->setAttribut("p_emailGestionBon_C", $utilisateur['emailGestionBon']); - $this->requete->getSession()->setAttribut("p_emailCcomptabilite_C", $utilisateur['emailCcomptabilite']); - $this->requete->getSession()->setAttribut("p_emailDerogation_C", $utilisateur['emailDerogation']); - $this->requete->getSession()->setAttribut("p_emailAccordPrealable_C", $utilisateur['emailAccordPrealable']); - - $this->requete->getSession()->setAttribut("p_indicatifTelephone", $utilisateur['indicatifTelephone']); - - $this->requete->getSession()->setAttribut("p_smsMedecinConseil_C", $utilisateur['smsMedecinConseil']); - $this->requete->getSession()->setAttribut("p_smsGestionBon_C", $utilisateur['smsGestionBon']); - $this->requete->getSession()->setAttribut("p_smsDerogation_C", $utilisateur['smsDerogation']); - $this->requete->getSession()->setAttribut("p_smsAccordPrealable_C", $utilisateur['smsAccordPrealable']); - $this->requete->getSession()->setAttribut("p_sms_standard_C", $utilisateur['sms_standard']); - - $this->requete->getSession()->setAttribut("p_lienMail_C", $utilisateur['lienMail']); - $this->requete->getSession()->setAttribut("p_dossierPhoto_C", $utilisateur['dossierPhoto']); - - $this->requete->getSession()->setAttribut("p_codeTarifMedicament_C", $utilisateur['codeTarifMedicament']); - $this->requete->getSession()->setAttribut("p_codeTarifOptique_C", $utilisateur['codeTarifOptique']); - $this->requete->getSession()->setAttribut("p_codeTarifActe_C", $utilisateur['codeTarifActe']); - - $this->requete->getSession()->setAttribut("p_dUneSemaineAvant_C", $utilisateur['dUneSemaineAvant']); - $this->requete->getSession()->setAttribut("p_dUneSemaineAvantFr_C", $utilisateur['dUneSemaineAvantFr']); - - $this->requete->getSession()->setAttribut("p_codeExercice_C", $utilisateur['codeExercice']); - $this->requete->getSession()->setAttribut("p_codeMois_C", $utilisateur['codeMois']); - - $_SESSION['p_debutMoisDecompte'] = $_SESSION['p_codeExercice_C'].'-'.$_SESSION['p_codeMois_C'].'-01'; - - $this->requete->getSession()->setAttribut("p_debutExercice_C", $utilisateur['debutExercice']); - $this->requete->getSession()->setAttribut("p_debutExerciceFr_C", $utilisateur['debutExerciceFr']); - - $this->requete->getSession()->setAttribut("p_debutMois_C", $utilisateur['debutMois']); - $this->requete->getSession()->setAttribut("p_debutMoisFr_C", $utilisateur['debutMoisFr']); - - $this->requete->getSession()->setAttribut("p_debutRequete_C", $_SESSION['p_debutMois_C']); - $this->requete->getSession()->setAttribut("p_debutRequeteFr_C", $_SESSION['p_debutMoisFr_C']); - $this->requete->getSession()->setAttribut("p_finRequeteFr_C", date('d/m/Y')); - - $this->requete->getSession()->setAttribut("p_hier_C", $utilisateur['hier']); - $this->requete->getSession()->setAttribut("p_hierFr_C", $utilisateur['hierFr']); - - // On va déclarer les variable de session context - $this->requete->getSession()->setAttribut("p_idBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_idBeneficiaire_sav", ""); - - $this->requete->getSession()->setAttribut("p_user_id_C", "0"); - $this->requete->getSession()->setAttribut("p_finger_id_C", "0"); - - $this->requete->getSession()->setAttribut("p_idSubstitut_C", "0"); - $this->requete->getSession()->setAttribut("p_user_id_substitut", "0"); - - $this->requete->getSession()->setAttribut("p_substitutnonassure_C", ""); - $this->requete->getSession()->setAttribut("p_substitutenVigueur_C", "0"); - - $this->requete->getSession()->setAttribut("p_idClient_C", ""); - $this->requete->getSession()->setAttribut("p_numeroClient_C", ""); - $this->requete->getSession()->setAttribut("p_nomClient_C", ""); - $this->requete->getSession()->setAttribut("p_adresseGeoClient_C", ""); - $this->requete->getSession()->setAttribut("p_boitepostaleClient_C", ""); - $this->requete->getSession()->setAttribut("p_telephoneBureauClient_C", ""); - $this->requete->getSession()->setAttribut("p_telephonePortableClient_C", ""); - $this->requete->getSession()->setAttribut("p_faxClient_C", ""); - $this->requete->getSession()->setAttribut("p_emailClient_C", ""); - $this->requete->getSession()->setAttribut("p_idPolice_C", ""); - $this->requete->getSession()->setAttribut("p_numeroPolice_C", ""); - $this->requete->getSession()->setAttribut("p_dateEffetPolice_C", ""); - $this->requete->getSession()->setAttribut("p_dateFinPolice_C", ""); - $this->requete->getSession()->setAttribut("p_dateEcheancePolice_C", ""); - $this->requete->getSession()->setAttribut("p_codeEtatPolice_C", ""); - $this->requete->getSession()->setAttribut("p_idCollege_C", ""); - $this->requete->getSession()->setAttribut("p_codeProduit_C", ""); - $this->requete->getSession()->setAttribut("p_idAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_numeroAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_numeroBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_nomBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_prenomsBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_beneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_codeLienParente_C", ""); - $this->requete->getSession()->setAttribut("p_numeroPiece_C", ""); - $this->requete->getSession()->setAttribut("p_sexe_C", ""); - $this->requete->getSession()->setAttribut("p_codeGroupeSanguin_C", ""); - $this->requete->getSession()->setAttribut("p_dateNaissance_C", ""); - $this->requete->getSession()->setAttribut("p_telephonePortableBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_dateEntreeBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_dateSortieBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_codeMotifSortie_C", ""); - $this->requete->getSession()->setAttribut("p_codeEtatBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_lienPhoto_C", ""); - $this->requete->getSession()->setAttribut("p_dateEffetBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_enVigueur_C", ""); - - $this->requete->getSession()->setAttribut("p_decede_C", ""); - $this->requete->getSession()->setAttribut("p_dateDeces_C", ""); - $this->requete->getSession()->setAttribut("p_fraisFuneraireDemande_C", ""); - $this->requete->getSession()->setAttribut("p_fraisFuneraireDemande_C", ""); - - $this->requete->getSession()->setAttribut("p_nomAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_prenomsAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_adherent_C", ""); - $this->requete->getSession()->setAttribut("p_adresseGeoAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_adressePostaleAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_paysAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_telephonePortableAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_telephonFixeAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_emailAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_produit_C", ""); - $this->requete->getSession()->setAttribut("p_naturepiece_C", ""); - $this->requete->getSession()->setAttribut("p_lienparente_C", ""); - $this->requete->getSession()->setAttribut("p_motifsortie_C", ""); - $this->requete->getSession()->setAttribut("p_etatbeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_libelleCollege_C", ""); - $this->requete->getSession()->setAttribut("p_ageBeneficiaire_C", ""); - - $this->requete->getSession()->setAttribut("p_college_couvert_C", "0"); - $this->requete->getSession()->setAttribut("p_derogation_en_cours_C", "0"); - $this->requete->getSession()->setAttribut("p_tmDerogation_C", "0"); - $this->requete->getSession()->setAttribut("p_derogation_finger_en_cours_C", "0"); - $this->requete->getSession()->setAttribut("p_okId", "-1"); - - // $this->requete->getSession()->setAttribut("p_accesAjoutPh_C", "0"); - $this->requete->getSession()->setAttribut("p_accesAjoutPh_C", $utilisateur['accesAjoutPh']); - $this->requete->getSession()->setAttribut("p_accesAjoutPhClient", "0"); - - $this->requete->getSession()->setAttribut("p_ajoutPrescription_C", "0"); - $this->requete->getSession()->setAttribut("p_ajoutPrescriptionExam_C", "0"); - - $this->requete->getSession()->setAttribut("p_accesAjoutVerres_C", $utilisateur['accesAjoutVerres']); - $this->requete->getSession()->setAttribut("p_ajoutPrescriptionOptique_C", $utilisateur['ajoutPrescriptionOptique']); - $this->requete->getSession()->setAttribut("p_prescrireVerres_C", $utilisateur['prescrireVerres']); - - $this->requete->getSession()->setAttribut("p_tm_C", "0"); - $this->requete->getSession()->setAttribut("p_appliquerTmHospit_C", "0"); - - $this->requete->getSession()->setAttribut("p_numeroFeuilleMaladie_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroPrescription_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroOptique_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroExamen_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroPrescriptionKine_C", "0"); - $this->requete->getSession()->setAttribut("p_idFacture_C", "0"); - $this->requete->getSession()->setAttribut("p_idFactureMonture", "0"); - - $this->requete->getSession()->setAttribut("p_numeroBonConsultation_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonHospitalisation_C", "-1"); - $this->requete->getSession()->setAttribut("p_hospitalisation_C", "0"); - $this->requete->getSession()->setAttribut("p_chirurgie_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroBonOptique_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonOrdonnance_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonExamen_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonKine_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonSeance_C", "-1"); - - $this->requete->getSession()->setAttribut("p_codeFamilleActePharmacie_C", "000"); - $this->requete->getSession()->setAttribut("p_codeActePharmacie_C", "00000"); - - $this->requete->getSession()->setAttribut("p_codeFamilleActeOptique_C", "999"); - $this->requete->getSession()->setAttribut("p_codeActeOptique_C", "99999"); - $this->requete->getSession()->setAttribut("p_codeActeMonture_C", "99990"); - - // acte optique remboursement classique - $this->requete->getSession()->setAttribut("p_codeActeOptiqueCl_C", "RBCLOPT"); - $this->requete->getSession()->setAttribut("p_codeActeMontureCl_C", "RBCLMON"); - - $this->requete->getSession()->setAttribut("p_nbActesVerres", "0"); - $this->requete->getSession()->setAttribut("p_nbActesMonture", "0"); - - $this->requete->getSession()->setAttribut("p_adminBon", $utilisateur['adminBon']); - $this->requete->getSession()->setAttribut("p_adminDiv", $utilisateur['adminDiv']); - $this->requete->getSession()->setAttribut("p_ajoutConsommable", $utilisateur['ajoutConsommable']); - - $this->requete->getSession()->setAttribut("p_nbTentative", "0"); - - $_SESSION['p_d1_C'] = $_SESSION['p_dUneSemaineAvant_C']; - $_SESSION['p_d2_C'] = date('Y-m-d'); - - $_SESSION['p_dateFactureReellefr_C'] = date("d/m/Y"); - $_SESSION['p_dateFactureReelle_C'] = date('Y-m-d'); - - $_SESSION['p_controlerPlafondAdherent'] = "0"; - $_SESSION['p_controlerPlafondBeneficiaire'] = "0"; - $_SESSION['p_derogationFingerPermanent'] = "0"; - - $this->requete->getSession()->setAttribut("p_idReglement_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroDecompte_C", "-1"); - $this->requete->getSession()->setAttribut("p_idDemandeDecompte_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroDemandeDecompte_C", "-1"); - - $this->requete->getSession()->setAttribut("p_lienPrestation_C", $utilisateur['lienPrestation']); - $_SESSION['p_lienServeur'] = $_SESSION['p_lienPrestation_C']; - - $this->requete->getSession()->setAttribut("p_lienProduction_C", $utilisateur['lienProduction']); - $this->requete->getSession()->setAttribut("p_modeSaisieFacture", "0"); - - $this->requete->getSession()->setAttribut("p_exercieReference_C", $utilisateur['codeExercice']); - - $this->requete->getSession()->setAttribut("p_nbMessagesNonLus_C", "0"); - - $this->requete->getSession()->setAttribut("p_requete", "0"); - $this->requete->getSession()->setAttribut("p_nbActesMonture", "0"); - - /* FIN variable de session context */ - - $filename = 'Societes/'.$utilisateur['codeSociete']; - if (!file_exists($filename)) - { - mkdir($filename, 0700); - } - $this->requete->getSession()->setAttribut("p_dossierSociete", $filename); - - $this->requete->getSession()->setAttribut("p_dossierGed", $_SESSION['p_lienPrestation_C'].$_SESSION['p_dossierSociete'].'/Ged/'); - $this->requete->getSession()->setAttribut("p_cheminGed", $_SESSION['p_dossierSociete'].'/Ged/'); - - $fichierBon_C = ""; - - $this->requete->getSession()->setAttribut("p_codeLangueSociete", $utilisateur['codeLangueSociete']); - $this->requete->getSession()->setAttribut("p_codeLanguePrestataire", $utilisateur['codeLanguePrestataire']); - $this->requete->getSession()->setAttribut("p_codeLangueAdherent", "fr_FR"); - - $this->requete->getSession()->setAttribut("p_lang", $utilisateur['codeLangue']); - - $_SESSION['p_lang'] = (isset($_SESSION['p_lang'])) ? $_SESSION['p_lang'] : 'fr_FR'; - - $codeLangue = $_SESSION['p_lang']; - - if ($_SESSION['p_lang']=="en_US") - { - $_SESSION['p_libelleLang']="English"; - } - else - { - $_SESSION['p_libelleLang']="Français"; - } - - $this->requete->getSession()->setAttribut("p_actesHarmonises", $utilisateur['actesHarmonises']); - $this->requete->getSession()->setAttribut("p_fusionConsOrd", $utilisateur['fusionConsOrd']); - $this->requete->getSession()->setAttribut("p_fournisseurSms", $utilisateur['fournisseurSms']); - $this->requete->getSession()->setAttribut("p_smsmParFacture", $utilisateur['smsmParFacture']); - $this->requete->getSession()->setAttribut("p_emailParFacture", $utilisateur['emailParFacture']); - - $this->requete->getSession()->setAttribut("p_envoismsactif", $utilisateur['envoismsactif']); - $this->requete->getSession()->setAttribut("p_devise_C", $utilisateur['devise']); - $this->requete->getSession()->setAttribut("p_smsAssure", $utilisateur['smsAssure']); - $this->requete->getSession()->setAttribut("p_copieSmsPrestataireAssure", $utilisateur['copieSmsPrestataireAssure']); - $this->requete->getSession()->setAttribut("p_filtreMedecin", $utilisateur['filtreMedecin']); - $this->requete->getSession()->setAttribut("p_nbMedicamentMax", $utilisateur['nbMedicamentMax']); - $this->requete->getSession()->setAttribut("p_facturerConsommable", $utilisateur['facturerConsommable']); - $this->requete->getSession()->setAttribut("p_affectionObligatoire", $utilisateur['affectionObligatoire']); - $this->requete->getSession()->setAttribut("p_derogationFingerPrestataire", $utilisateur['derogationFingerPrestataire']); - $this->requete->getSession()->setAttribut("p_derogationFingerFacturation", $utilisateur['derogationFingerFacturation']); - - $this->requete->getSession()->setAttribut("p_actVisible", $utilisateur['actVisible']); - $this->requete->getSession()->setAttribut("p_AffectionVisible", $utilisateur['AffectionVisible']); - $this->requete->getSession()->setAttribut("p_estMedecin", $utilisateur['estMedecin']); - - $this->requete->getSession()->setAttribut("p_saisirFactureDecompte", $utilisateur['saisirFactureDecompte']); - - $this->requete->getSession()->setAttribut("p_menu", $this->menu->getMenu($utilisateur['codeProfil'])); - - $this->requete->getSession()->setAttribut("p_anciennete", 0); - $this->requete->getSession()->setAttribut("p_delaiCarenceBeneficiaire", 0); - - $codeProfil = $_SESSION['p_codeProfil_C']; - - $_SESSION['p_dateEffetCouvert'] = "0"; - $_SESSION['idEntetecontrat'] = "0"; - - // Avant de rediriger, on va remplir suivisaisies - $this->logconnexion->suivisaisies($login, $idSaisie, $codeLangue); - - setcookie('lang', $codeLangue, time()+365*24*3600, '/'); - setcookie('codeUtilisateur', $_SESSION['p_codeUtilisateur'], time()+365*24*3600, '/'); - - $_SESSION['p_vue'] = "INTER-SANTE"; - $_SESSION['p_tm_F'] = "0"; // Famille d'actes - $_SESSION['p_tm_TP'] = "0"; // Type Prestation - - $this->requete->getSession()->setAttribut("p_controlPlafondAdherent", $utilisateur['controlPlafondAdherent']); - $this->requete->getSession()->setAttribut("p_controlPlafondBeneficiaire", $utilisateur['controlPlafondBeneficiaire']); - - $this->requete->getSession()->setAttribut("p_changerMotPassDefaut", $utilisateur['changerMotPassDefaut']); - $this->requete->getSession()->setAttribut("p_verifierLongueurPass", $utilisateur['verifierLongueurPass']); - - $changerMotPassDefaut = ( ($_SESSION['p_changerMotPassDefaut']=="1") && ($this->utilisateur->verifiermotpassdefaut($codeSociete, $mdp)) ); - $motCourt = ( ($_SESSION['p_verifierLongueurPass']=="1") && (strlen($mdp)<6) ); - - $this->requete->getSession()->setAttribut("p_okId", "-1"); - $this->requete->getSession()->setAttribut("p_okId_face", "-1"); - - $this->requete->getSession()->setAttribut("p_codeModeBiometrie", $utilisateur['codeModeBiometrie']); - $this->requete->getSession()->setAttribut("p_codeModeBiometrieSociete", $utilisateur['codeModeBiometrieSociete']); - - $codeModeBiometrie = $utilisateur['codeModeBiometrie']; - if($codeModeBiometrie=='1' or $codeModeBiometrie=='3'){ - $_SESSION['p_fingerActif'] = '1'; - } - else{ - $_SESSION['p_fingerActif'] = '0'; - } - - if($codeModeBiometrie=='2' or $codeModeBiometrie=='3'){ - $_SESSION['p_faceActif'] = '1'; - } - else{ - $_SESSION['p_faceActif'] = '0'; - } - - $this->requete->getSession()->setAttribut("p_lienPhotoFace", $utilisateur['lienPhotoFace']); - - // if(strlen($mdp)<6 or ($changerMotPassDefaut===true)) - if(($motCourt===true) or ($changerMotPassDefaut===true)) - { - $this->rediriger("Changermotpass"); - exit(); - } - else - { - switch ($codeProfil) - { - case "PHA": - $this->rediriger("Pharmacien"); - break; - case "OPT": - $this->rediriger("Opticien"); - break; - case "LAB": - $this->rediriger("Laboratoire"); - break; - case "SEA": - $this->rediriger("Kine"); - break; - default: - $this->rediriger("Recherche"); - } - } - } - else - { - if ($_SESSION['p_lang']=="en_US") - { - $this->genererVue(array('msgErreur' => 'Incorrect login or password'), "index"); - } - else - { - $this->genererVue(array('msgErreur' => 'Login ou mot de passe incorrects'), "index"); - } - } - } - else - { - if ($_SESSION['p_lang']=="en_US") - { - throw new Exception("Login or password not defined!"); - } - else - { - throw new Exception("Login ou mot de passe non défini!"); - } - } - } - - public function deconnecter() - { - if($this->requete->getSession()->existeAttribut("login")) - { - $login = $this->requete->getSession()->getAttribut("p_login"); - $this->utilisateur->viderTablesTemporairesUser($login); - } - - $this->requete->getSession()->detruire(); - $this->rediriger("Connexion"); - } - - public function quitter() - { - $idSaisie = $_SESSION['p_idSaisie']; - $login = $this->requete->getSession()->getAttribut("p_login"); - $this->utilisateur->viderTablesTemporairesUser($login); - $this->requete->getSession()->detruire(); - } -} diff --git a/extranet/Controleur/ControleurConnexiondecompte.php b/extranet/Controleur/ControleurConnexiondecompte.php deleted file mode 100644 index 3aa440a..0000000 --- a/extranet/Controleur/ControleurConnexiondecompte.php +++ /dev/null @@ -1,483 +0,0 @@ -utilisateur = new Utilisateur(); - $this->menu = new Menu(); - $this->logconnexion = new Logconnexion(); - // date_default_timezone_set("UTC"); - // date_default_timezone_set("Africa/Kigali"); - } - - public function index() - { - if($this->requete->existeParametre("id")) - { - $idSaisie = $this->requete->getParametre("id"); - $this->requete->getSession()->setAttribut("p_idSaisie", $idSaisie); - - $_SESSION['p_idSaisie'] = $idSaisie; - $_SESSION['idSaisie'] = $idSaisie; - - $this->connecter(); - } - else - { - $this->rediriger("Connexion"); - } - } - - public function connecter() - { - $idSaisie = $_SESSION['p_idSaisie']; - $utilisateur = $this->utilisateur->getUtilisateurIdsaisie($idSaisie); - - // Gestion limite usage - $dateLimiteUsage = $utilisateur['dateLimiteUsage']; - - if($dateLimiteUsagerediriger("Connexion"); - $this->rediriger("Recconnexion"); - exit(); - } - - // Variables de session Utilisateur - $this->requete->getSession()->setAttribut("p_dateLimiteUsage", $dateLimiteUsage); - $this->requete->getSession()->setAttribut("p_idUtilisateur", $utilisateur['idUtilisateur']); - $this->requete->getSession()->setAttribut("p_idUtilisateur_C", $utilisateur['idUtilisateur']); - $this->requete->getSession()->setAttribut("p_login", $utilisateur['login']); - $this->requete->getSession()->setAttribut("p_login_C", $utilisateur['login']); - $this->requete->getSession()->setAttribut("p_codeSociete", $utilisateur['codeSociete']); - $this->requete->getSession()->setAttribut("p_codeSociete_C", $utilisateur['codeSociete']); - $this->requete->getSession()->setAttribut("p_codeUtilisateur", $utilisateur['codeUtilisateur']); - $this->requete->getSession()->setAttribut("p_codeUtilisateur_C", $utilisateur['codeUtilisateur']); - $this->requete->getSession()->setAttribut("p_nomUtilisateur_C", $utilisateur['nomUtilisateur']); - $this->requete->getSession()->setAttribut("p_prenomsUtilisateur_C", $utilisateur['prenomsUtilisateur']); - $this->requete->getSession()->setAttribut("p_utilisateur_C", $utilisateur['utilisateur']); - $this->requete->getSession()->setAttribut("p_telephoneUtilisateur_C", $utilisateur['telephoneUtilisateur']); - $this->requete->getSession()->setAttribut("p_emailUtilisateur_C", $utilisateur['emailUtilisateur']); - $this->requete->getSession()->setAttribut("p_codeProfil", $utilisateur['codeProfil']); - $this->requete->getSession()->setAttribut("p_codeProfil_C", $utilisateur['codeProfil']); - $this->requete->getSession()->setAttribut("p_codeTypeFacture_C", ""); - - $this->requete->getSession()->setAttribut("p_codePrestataire_C", $utilisateur['codePrestataire']); - - $this->requete->getSession()->setAttribut("p_codeMedecin_C", ""); - $this->requete->getSession()->setAttribut("p_medecinConsultation_C", ""); - - $this->requete->getSession()->setAttribut("p_codeTypeBon_C", ""); - $this->requete->getSession()->setAttribut("p_profil_C", $utilisateur['profil']); - $this->requete->getSession()->setAttribut("p_prestataire_C", $utilisateur['prestataire']); - $this->requete->getSession()->setAttribut("p_codeReseauPrestataire_C", $utilisateur['codeReseauPrestataire']); - $this->requete->getSession()->setAttribut("p_codeTypePrestataire_C", $utilisateur['codeTypePrestataire']); - $this->requete->getSession()->setAttribut("p_codeTypeDecompte_C", $utilisateur['codeTypeDecompte']); - $this->requete->getSession()->setAttribut("p_pharmacieInterne_C", $utilisateur['pharmacieInterne']); - $this->requete->getSession()->setAttribut("p_optiqueInterne_C", $utilisateur['optiqueInterne']); - $this->requete->getSession()->setAttribut("p_typeprestataire_C", $utilisateur['typeprestataire']); - $this->requete->getSession()->setAttribut("p_reseausoinPrestataire_C", $utilisateur['reseausoinPrestataire']); - $this->requete->getSession()->setAttribut("p_tmStandard_C", $utilisateur['tmStandard']); - $this->requete->getSession()->setAttribut("p_codePaysPrestataire_C", $utilisateur['codePaysPrestataire']); - $this->requete->getSession()->setAttribut("p_paysPrestataire_C", $utilisateur['paysPrestataire']); - $this->requete->getSession()->setAttribut("p_conventionne_C", $utilisateur['conventionne']); - $this->requete->getSession()->setAttribut("p_estconventionne_C", $utilisateur['estconventionne']); - $this->requete->getSession()->setAttribut("p_adresseGeoPrestataire_C", $utilisateur['adresseGeoPrestataire']); - $this->requete->getSession()->setAttribut("p_adressePostPrestataire_C", $utilisateur['adressePostPrestataire']); - $this->requete->getSession()->setAttribut("p_telephoneFixePrestataire_C", $utilisateur['telephoneFixePrestataire']); - $this->requete->getSession()->setAttribut("p_telephonePortablePrestataire_C", $utilisateur['telephonePortablePrestataire']); - $this->requete->getSession()->setAttribut("p_faxPrestatairePrestataire_C", $utilisateur['faxPrestatairePrestataire']); - $this->requete->getSession()->setAttribut("p_emailPrestataire_C", $utilisateur['emailPrestataire']); - $this->requete->getSession()->setAttribut("p_emailGestionPrestataire_C", $utilisateur['emailGestionPrestataire']); - $this->requete->getSession()->setAttribut("p_nomResponsablePrestataire_C", $utilisateur['nomResponsablePrestataire']); - $this->requete->getSession()->setAttribut("p_contactResponsablePrestataire_C", $utilisateur['contactResponsablePrestataire']); - $this->requete->getSession()->setAttribut("p_emailResponsablePrestataire_C", $utilisateur['emailResponsablePrestataire']); - $this->requete->getSession()->setAttribut("p_nomInterlocuteurPrestataire_C", $utilisateur['nomInterlocuteurPrestataire']); - $this->requete->getSession()->setAttribut("p_contactInterlocuteurPrestataire_C", $utilisateur['contactInterlocuteurPrestataire']); - $this->requete->getSession()->setAttribut("p_emailInterlocuteurPrestataire_C", $utilisateur['emailInterlocuteurPrestataire']); - $this->requete->getSession()->setAttribut("p_villeSignature_C", $utilisateur['villeSignature']); - - $this->requete->getSession()->setAttribut("p_nomSociete_C", $utilisateur['nomSociete']); - $this->requete->getSession()->setAttribut("p_nomSociete", $utilisateur['nomSociete']); - $this->requete->getSession()->setAttribut("p_nomProduitSante", $utilisateur['nomProduitSante']); - - $this->requete->getSession()->setAttribut("p_largeurPhoto", $utilisateur['largeurPhoto']); - $this->requete->getSession()->setAttribut("p_longueurPhoto", $utilisateur['longueurPhoto']); - - $this->requete->getSession()->setAttribut("p_villeSociete", $utilisateur['ville']); - $this->requete->getSession()->setAttribut("p_numCompteSociete_C", $utilisateur['numCompteSociete']); - $this->requete->getSession()->setAttribut("p_adresseGeoSociete_C", $utilisateur['adresseGeoSociete']); - $this->requete->getSession()->setAttribut("p_adressePostSociete_C", $utilisateur['adressePostSociete']); - $this->requete->getSession()->setAttribut("p_villeSociete_C", $utilisateur['villeSociete']); - $this->requete->getSession()->setAttribut("p_telephoneSociete_C", $utilisateur['telephoneSociete']); - $this->requete->getSession()->setAttribut("p_emailSociete_C", $utilisateur['emailSociete']); - $this->requete->getSession()->setAttribut("p_portableSociete_C", $utilisateur['portableSociete']); - $this->requete->getSession()->setAttribut("p_nomResponsableSociete_C", $utilisateur['nomResponsableSociete']); - $this->requete->getSession()->setAttribut("p_codePaysSociete_C", $utilisateur['codePaysSociete']); - $this->requete->getSession()->setAttribut("p_medecinConseil_C", $utilisateur['medecinConseil']); - $this->requete->getSession()->setAttribut("p_telephoneMedecinConseil_C", $utilisateur['telephoneMedecinConseil']); - $this->requete->getSession()->setAttribut("p_sigleSociete_C", $utilisateur['sigleSociete']); - - $this->requete->getSession()->setAttribut("p_emailMedecinConseil_C", $utilisateur['emailMedecinConseil']); - $this->requete->getSession()->setAttribut("p_emailGestionBon_C", $utilisateur['emailGestionBon']); - $this->requete->getSession()->setAttribut("p_emailCcomptabilite_C", $utilisateur['emailCcomptabilite']); - $this->requete->getSession()->setAttribut("p_emailDerogation_C", $utilisateur['emailDerogation']); - $this->requete->getSession()->setAttribut("p_emailAccordPrealable_C", $utilisateur['emailAccordPrealable']); - - $this->requete->getSession()->setAttribut("p_indicatifTelephone", $utilisateur['indicatifTelephone']); - - $this->requete->getSession()->setAttribut("p_smsMedecinConseil_C", $utilisateur['smsMedecinConseil']); - $this->requete->getSession()->setAttribut("p_smsGestionBon_C", $utilisateur['smsGestionBon']); - $this->requete->getSession()->setAttribut("p_smsDerogation_C", $utilisateur['smsDerogation']); - $this->requete->getSession()->setAttribut("p_smsAccordPrealable_C", $utilisateur['smsAccordPrealable']); - $this->requete->getSession()->setAttribut("p_sms_standard_C", $utilisateur['sms_standard']); - - $this->requete->getSession()->setAttribut("p_lienMail_C", $utilisateur['lienMail']); - $this->requete->getSession()->setAttribut("p_dossierPhoto_C", $utilisateur['dossierPhoto']); - - $this->requete->getSession()->setAttribut("p_codeTarifMedicament_C", $utilisateur['codeTarifMedicament']); - $this->requete->getSession()->setAttribut("p_codeTarifOptique_C", $utilisateur['codeTarifOptique']); - $this->requete->getSession()->setAttribut("p_codeTarifActe_C", $utilisateur['codeTarifActe']); - - $this->requete->getSession()->setAttribut("p_dUneSemaineAvant_C", $utilisateur['dUneSemaineAvant']); - $this->requete->getSession()->setAttribut("p_dUneSemaineAvantFr_C", $utilisateur['dUneSemaineAvantFr']); - - $this->requete->getSession()->setAttribut("p_codeExercice_C", $utilisateur['codeExercice']); - $this->requete->getSession()->setAttribut("p_codeMois_C", $utilisateur['codeMois']); - - $this->requete->getSession()->setAttribut("p_debutExercice_C", $utilisateur['debutExercice']); - $this->requete->getSession()->setAttribut("p_debutExerciceFr_C", $utilisateur['debutExerciceFr']); - - $this->requete->getSession()->setAttribut("p_debutMois_C", $utilisateur['debutMois']); - $this->requete->getSession()->setAttribut("p_debutMoisFr_C", $utilisateur['debutMoisFr']); - - $this->requete->getSession()->setAttribut("p_debutRequete_C", $_SESSION['p_debutMois_C']); - $this->requete->getSession()->setAttribut("p_debutRequeteFr_C", $_SESSION['p_debutMoisFr_C']); - $this->requete->getSession()->setAttribut("p_finRequeteFr_C", date('d/m/Y')); - - $this->requete->getSession()->setAttribut("p_hier_C", $utilisateur['hier']); - $this->requete->getSession()->setAttribut("p_hierFr_C", $utilisateur['hierFr']); - - // On va déclarer les variable de session context - $this->requete->getSession()->setAttribut("p_idBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_idBeneficiaire_sav", ""); - - $this->requete->getSession()->setAttribut("p_user_id_C", "0"); - $this->requete->getSession()->setAttribut("p_finger_id_C", "0"); - - $this->requete->getSession()->setAttribut("p_idSubstitut_C", "0"); - $this->requete->getSession()->setAttribut("p_user_id_substitut", "0"); - - $this->requete->getSession()->setAttribut("p_substitutnonassure_C", ""); - $this->requete->getSession()->setAttribut("p_substitutenVigueur_C", "0"); - - $this->requete->getSession()->setAttribut("p_idClient_C", ""); - $this->requete->getSession()->setAttribut("p_numeroClient_C", ""); - $this->requete->getSession()->setAttribut("p_nomClient_C", ""); - $this->requete->getSession()->setAttribut("p_adresseGeoClient_C", ""); - $this->requete->getSession()->setAttribut("p_boitepostaleClient_C", ""); - $this->requete->getSession()->setAttribut("p_telephoneBureauClient_C", ""); - $this->requete->getSession()->setAttribut("p_telephonePortableClient_C", ""); - $this->requete->getSession()->setAttribut("p_faxClient_C", ""); - $this->requete->getSession()->setAttribut("p_emailClient_C", ""); - $this->requete->getSession()->setAttribut("p_idPolice_C", ""); - $this->requete->getSession()->setAttribut("p_numeroPolice_C", ""); - $this->requete->getSession()->setAttribut("p_dateEffetPolice_C", ""); - $this->requete->getSession()->setAttribut("p_dateFinPolice_C", ""); - $this->requete->getSession()->setAttribut("p_dateEcheancePolice_C", ""); - $this->requete->getSession()->setAttribut("p_codeEtatPolice_C", ""); - $this->requete->getSession()->setAttribut("p_idCollege_C", ""); - $this->requete->getSession()->setAttribut("p_codeProduit_C", ""); - $this->requete->getSession()->setAttribut("p_idAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_numeroAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_numeroBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_nomBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_prenomsBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_beneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_codeLienParente_C", ""); - $this->requete->getSession()->setAttribut("p_numeroPiece_C", ""); - $this->requete->getSession()->setAttribut("p_sexe_C", ""); - $this->requete->getSession()->setAttribut("p_codeGroupeSanguin_C", ""); - $this->requete->getSession()->setAttribut("p_dateNaissance_C", ""); - $this->requete->getSession()->setAttribut("p_telephonePortableBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_dateEntreeBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_dateSortieBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_codeMotifSortie_C", ""); - $this->requete->getSession()->setAttribut("p_codeEtatBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_lienPhoto_C", ""); - $this->requete->getSession()->setAttribut("p_dateEffetBeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_enVigueur_C", ""); - - $this->requete->getSession()->setAttribut("p_decede_C", ""); - $this->requete->getSession()->setAttribut("p_dateDeces_C", ""); - $this->requete->getSession()->setAttribut("p_fraisFuneraireDemande_C", ""); - $this->requete->getSession()->setAttribut("p_fraisFuneraireDemande_C", ""); - - $this->requete->getSession()->setAttribut("p_nomAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_prenomsAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_adherent_C", ""); - $this->requete->getSession()->setAttribut("p_adresseGeoAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_adressePostaleAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_paysAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_telephonePortableAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_telephonFixeAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_emailAdherent_C", ""); - $this->requete->getSession()->setAttribut("p_produit_C", ""); - $this->requete->getSession()->setAttribut("p_naturepiece_C", ""); - $this->requete->getSession()->setAttribut("p_lienparente_C", ""); - $this->requete->getSession()->setAttribut("p_motifsortie_C", ""); - $this->requete->getSession()->setAttribut("p_etatbeneficiaire_C", ""); - $this->requete->getSession()->setAttribut("p_libelleCollege_C", ""); - $this->requete->getSession()->setAttribut("p_ageBeneficiaire_C", ""); - - $this->requete->getSession()->setAttribut("p_college_couvert_C", "0"); - $this->requete->getSession()->setAttribut("p_derogation_en_cours_C", "0"); - $this->requete->getSession()->setAttribut("p_tmDerogation_C", "0"); - $this->requete->getSession()->setAttribut("p_derogation_finger_en_cours_C", "0"); - $this->requete->getSession()->setAttribut("p_okId", "-1"); - - // $this->requete->getSession()->setAttribut("p_accesAjoutPh_C", "0"); - $this->requete->getSession()->setAttribut("p_accesAjoutPh_C", $utilisateur['accesAjoutPh']); - $this->requete->getSession()->setAttribut("p_accesAjoutPhClient", "0"); - - $this->requete->getSession()->setAttribut("p_ajoutPrescription_C", "0"); - $this->requete->getSession()->setAttribut("p_ajoutPrescriptionExam_C", "0"); - - $this->requete->getSession()->setAttribut("p_accesAjoutVerres_C", $utilisateur['accesAjoutVerres']); - $this->requete->getSession()->setAttribut("p_ajoutPrescriptionOptique_C", $utilisateur['ajoutPrescriptionOptique']); - $this->requete->getSession()->setAttribut("p_prescrireVerres_C", $utilisateur['prescrireVerres']); - - $this->requete->getSession()->setAttribut("p_tm_C", "0"); - $this->requete->getSession()->setAttribut("p_appliquerTmHospit_C", "0"); - - $this->requete->getSession()->setAttribut("p_numeroFeuilleMaladie_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroPrescription_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroOptique_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroExamen_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroPrescriptionKine_C", "0"); - $this->requete->getSession()->setAttribut("p_idFacture_C", "0"); - $this->requete->getSession()->setAttribut("p_idFactureMonture", "0"); - - $this->requete->getSession()->setAttribut("p_numeroBonConsultation_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonHospitalisation_C", "-1"); - $this->requete->getSession()->setAttribut("p_hospitalisation_C", "0"); - $this->requete->getSession()->setAttribut("p_chirurgie_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroBonOptique_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonOrdonnance_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonExamen_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonKine_C", "-1"); - $this->requete->getSession()->setAttribut("p_numeroBonSeance_C", "-1"); - - $this->requete->getSession()->setAttribut("p_codeFamilleActePharmacie_C", "000"); - $this->requete->getSession()->setAttribut("p_codeActePharmacie_C", "00000"); - - $this->requete->getSession()->setAttribut("p_codeFamilleActeOptique_C", "999"); - $this->requete->getSession()->setAttribut("p_codeActeOptique_C", "99999"); - $this->requete->getSession()->setAttribut("p_codeActeMonture_C", "99990"); - - // acte optique remboursement classique - $this->requete->getSession()->setAttribut("p_codeActeOptiqueCl_C", "RBCLOPT"); - $this->requete->getSession()->setAttribut("p_codeActeMontureCl_C", "RBCLMON"); - - $this->requete->getSession()->setAttribut("p_nbActesVerres", "0"); - $this->requete->getSession()->setAttribut("p_nbActesMonture", "0"); - - $this->requete->getSession()->setAttribut("p_adminBon", $utilisateur['adminBon']); - $this->requete->getSession()->setAttribut("p_adminDiv", $utilisateur['adminDiv']); - $this->requete->getSession()->setAttribut("p_ajoutConsommable", $utilisateur['ajoutConsommable']); - - $this->requete->getSession()->setAttribut("p_nbTentative", "0"); - - $_SESSION['p_d1_C'] = $_SESSION['p_dUneSemaineAvant_C']; - $_SESSION['p_d2_C'] = date('Y-m-d'); - - $_SESSION['p_dateFactureReellefr_C'] = date("d/m/Y"); - $_SESSION['p_dateFactureReelle_C'] = date('Y-m-d'); - - $_SESSION['p_controlerPlafondAdherent'] = "0"; - $_SESSION['p_controlerPlafondBeneficiaire'] = "0"; - $_SESSION['p_derogationFingerPermanent'] = "0"; - - $this->requete->getSession()->setAttribut("p_idReglement_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroDecompte_C", "-1"); - $this->requete->getSession()->setAttribut("p_idDemandeDecompte_C", "0"); - $this->requete->getSession()->setAttribut("p_numeroDemandeDecompte_C", "-1"); - - $this->requete->getSession()->setAttribut("p_lienPrestation_C", $utilisateur['lienPrestation']); - $_SESSION['p_lienServeur'] = $_SESSION['p_lienPrestation_C']; - - $this->requete->getSession()->setAttribut("p_lienProduction_C", $utilisateur['lienProduction']); - $this->requete->getSession()->setAttribut("p_modeSaisieFacture", "1"); - - $this->requete->getSession()->setAttribut("p_exercieReference_C", $utilisateur['codeExercice']); - - - /* FIN variable de session context */ - - // récupération des variable de cessions transmises 19/02/2018 - - $_SESSION['p_idReglement_C'] = $utilisateur['idReglementDecompte']; - $_SESSION['p_codePrestataire_C'] = $utilisateur['codePrestataireDecompte']; - $prestataire_courant = $utilisateur['prestataire']; - $_SESSION['p_codePrestataire_Dec'] = $utilisateur['codePrestataireDecompte']; - $_SESSION['p_codeExercice_C'] = $utilisateur['codeExerciceDecompte']; - $_SESSION['p_codeMois_C'] = $utilisateur['codeMoisDecompte']; - - $_SESSION['p_debutMoisDecompte'] = $_SESSION['p_codeExercice_C'].'-'.$_SESSION['p_codeMois_C'].'-01'; - - // $_SESSION['p_decompteRegle_C'] = $infosdecompte['regle']; - - $_SESSION['p_numeroDecompte_C'] = $utilisateur['numeroDecompte']; - $_SESSION['p_numeroLotDecompte_C'] = $utilisateur['numeroLotDecompte']; - - $this->requete->getSession()->setAttribut("p_nbMessagesNonLus_C", "0"); - $_SESSION['idEntetecontrat'] = "0"; - - - // $_SESSION['p_dateEffetPolice_C'] = ""; - - // throw new Exception("idReglement_C: ".$_SESSION['p_idReglement_C']); - - - // fin recupération - - $filename = 'Societes/'.$utilisateur['codeSociete']; - if (!file_exists($filename)) - { - mkdir($filename, 0700); - } - $this->requete->getSession()->setAttribut("p_dossierSociete", $filename); - $this->requete->getSession()->setAttribut("p_dossierGed", $_SESSION['p_lienPrestation_C'].$_SESSION['p_dossierSociete'].'/Ged/'); - $this->requete->getSession()->setAttribut("p_cheminGed", $_SESSION['p_dossierSociete'].'/Ged/'); - - $fichierBon_C = ""; - - $this->requete->getSession()->setAttribut("p_codeLangueSociete", $utilisateur['codeLangueSociete']); - $this->requete->getSession()->setAttribut("p_codeLanguePrestataire", $utilisateur['codeLanguePrestataire']); - $this->requete->getSession()->setAttribut("p_codeLangueAdherent", "fr_FR"); - - $this->requete->getSession()->setAttribut("p_lang", $utilisateur['codeLangue']); - - $_SESSION['p_lang'] = (isset($_SESSION['p_lang'])) ? $_SESSION['p_lang'] : 'fr_FR'; - - $codeLangue = $_SESSION['p_lang']; - $this->requete->getSession()->setAttribut("p_login", $utilisateur['login']); - $login = $_SESSION['p_login']; - - if ($_SESSION['p_lang']=="en_US") - { - $_SESSION['p_libelleLang']="English"; - } - else - { - $_SESSION['p_libelleLang']="Français"; - } - - $this->requete->getSession()->setAttribut("p_actesHarmonises", $utilisateur['actesHarmonises']); - $this->requete->getSession()->setAttribut("p_fusionConsOrd", $utilisateur['fusionConsOrd']); - $this->requete->getSession()->setAttribut("p_fournisseurSms", $utilisateur['fournisseurSms']); - $this->requete->getSession()->setAttribut("p_smsmParFacture", $utilisateur['smsmParFacture']); - $this->requete->getSession()->setAttribut("p_emailParFacture", $utilisateur['emailParFacture']); - - $this->requete->getSession()->setAttribut("p_envoismsactif", $utilisateur['envoismsactif']); - $this->requete->getSession()->setAttribut("p_devise_C", $utilisateur['devise']); - $this->requete->getSession()->setAttribut("p_smsAssure", $utilisateur['smsAssure']); - $this->requete->getSession()->setAttribut("p_copieSmsPrestataireAssure", $utilisateur['copieSmsPrestataireAssure']); - $this->requete->getSession()->setAttribut("p_filtreMedecin", $utilisateur['filtreMedecin']); - $this->requete->getSession()->setAttribut("p_nbMedicamentMax", $utilisateur['nbMedicamentMax']); - $this->requete->getSession()->setAttribut("p_facturerConsommable", $utilisateur['facturerConsommable']); - $this->requete->getSession()->setAttribut("p_affectionObligatoire", $utilisateur['affectionObligatoire']); - $this->requete->getSession()->setAttribut("p_derogationFingerPrestataire", $utilisateur['derogationFingerPrestataire']); - // $this->requete->getSession()->setAttribut("p_derogationFingerFacturation", $utilisateur['derogationFingerFacturation']); - $this->requete->getSession()->setAttribut("p_derogationFingerFacturation", "1"); - - $this->requete->getSession()->setAttribut("p_actVisible", $utilisateur['actVisible']); - $this->requete->getSession()->setAttribut("p_AffectionVisible", $utilisateur['AffectionVisible']); - $this->requete->getSession()->setAttribut("p_estMedecin", $utilisateur['estMedecin']); - - $this->requete->getSession()->setAttribut("p_saisirFactureDecompte", $utilisateur['saisirFactureDecompte']); - - $this->requete->getSession()->setAttribut("p_menu", $this->menu->getMenu($utilisateur['codeProfil'])); - - $this->requete->getSession()->setAttribut("p_anciennete", 0); - $this->requete->getSession()->setAttribut("p_delaiCarenceBeneficiaire", 0); - - $this->requete->getSession()->setAttribut("p_controlPlafondAdherent", $utilisateur['controlPlafondAdherent']); - $this->requete->getSession()->setAttribut("p_controlPlafondBeneficiaire", $utilisateur['controlPlafondBeneficiaire']); - - $codeProfil = $_SESSION['p_codeProfil_C']; - - // Avant de rediriger, on va remplir suivisaisies - $this->logconnexion->suivisaisies($login, $idSaisie, $codeLangue); - - setcookie('lang', $codeLangue, time()+365*24*3600, '/'); - setcookie('codeUtilisateur', $_SESSION['p_codeUtilisateur'], time()+365*24*3600, '/'); - - $_SESSION['p_vue'] = "INTER-SANTE"; - $_SESSION['p_tm_F'] = "0"; // Famille d'actes - $_SESSION['p_tm_TP'] = "0"; // Type Prestation - - $this->requete->getSession()->setAttribut("p_codeModeBiometrie", '0'); - $this->requete->getSession()->setAttribut("p_codeModeBiometrieSociete", '0'); - $this->requete->getSession()->setAttribut("p_fingerActif", '0'); - $this->requete->getSession()->setAttribut("p_faceActif", '0'); - - $this->requete->getSession()->setAttribut("p_lienPhotoFace", $utilisateur['lienPhotoFace']); - - /* - echo "codeProfil => $codeProfil"; - exit(); - */ - - switch ($codeProfil) - { - case "PHA": - $this->rediriger("Pharmacien"); - break; - case "OPT": - $this->rediriger("Opticien"); - break; - case "LAB": - $this->rediriger("Laboratoire"); - break; - case "SEA": - $this->rediriger("Kine"); - break; - default: - $this->rediriger("Recherche"); - } - } - - public function deconnecter() - { - if($this->requete->getSession()->existeAttribut("login")) - { - $login = $this->requete->getSession()->getAttribut("p_login"); - $this->utilisateur->viderTablesTemporairesUser($login); - } - - $this->requete->getSession()->detruire(); - $this->rediriger("Connexion"); - } - - public function quitter() - { - $idSaisie = $_SESSION['p_idSaisie']; - $login = $this->requete->getSession()->getAttribut("p_login"); - $this->utilisateur->viderTablesTemporairesUser($login); - $this->requete->getSession()->detruire(); - } -} diff --git a/extranet/Controleur/ControleurConsommables.php b/extranet/Controleur/ControleurConsommables.php deleted file mode 100644 index c09584a..0000000 --- a/extranet/Controleur/ControleurConsommables.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consommables'); - - $this->consommable = new Consommable_temp(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $consommables = $this->consommable->getconsommablesfeuille($numeroFeuilleMaladie, $codePrestataire); - - $this->genererVue(array('consommables' => $consommables)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultation.php b/extranet/Controleur/ControleurConsultation.php deleted file mode 100644 index adca547..0000000 --- a/extranet/Controleur/ControleurConsultation.php +++ /dev/null @@ -1,66 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultation'); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypePrestation = "CONS"; - - $this->feuillemaladie = new Feuillemaladie(); - $this->familleacte = (new Familleacte())->getListe($codeTypePrestation); - $this->acte = new Detailtarifacte(); - $this->raison = (new Raisonconsultation())->getListe(); - $this->bonpec = new Bonpec(); - $this->specialite = (new Specialite())->getListe(); - $this->prestation = new Prestationactes(); - } - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $codeTypePrestation = "CONS"; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "CONS"; - - $nbBonsCons = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $_SESSION['p_okId'] = "1"; - $_SESSION['p_okId_face'] = "1"; - - $this->acte->settmtypeprestation($codeTypePrestation); - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); - $acteconsultation = $this->prestation->getconsultationfeuille($numeroFeuilleMaladie, $codePrestataire); - - $codeFamilleActe = $acteconsultation['codeFamilleActe']; - - $acte = $this->acte->getactespossibles($codeTypePrestation, $codeFamilleActe); - - $this->genererVue(array('feuillemaladie' => $feuillemaladie, 'familleacte' => $this->familleacte, 'acte' => $acte, 'raison' => $this->raison, - 'nbBonsCons' => $nbBonsCons, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon, - 'specialite' => $this->specialite, 'acteconsultation' => $acteconsultation)); - } - - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationbencso.php b/extranet/Controleur/ControleurConsultationbencso.php deleted file mode 100644 index 7b26f39..0000000 --- a/extranet/Controleur/ControleurConsultationbencso.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationbencso'); - - $this->feuillemaladie = new Feuillemaladie(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $feuillemaladies = $this->feuillemaladie->getfeuillesmaladie($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVue(array('feuillemaladies' => $feuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationbenlab.php b/extranet/Controleur/ControleurConsultationbenlab.php deleted file mode 100644 index 21b945e..0000000 --- a/extranet/Controleur/ControleurConsultationbenlab.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationbenlab'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationbenopt.php b/extranet/Controleur/ControleurConsultationbenopt.php deleted file mode 100644 index e506276..0000000 --- a/extranet/Controleur/ControleurConsultationbenopt.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationbenopt'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationbenpha.php b/extranet/Controleur/ControleurConsultationbenpha.php deleted file mode 100644 index e19cc69..0000000 --- a/extranet/Controleur/ControleurConsultationbenpha.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationbenpha'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationbensea.php b/extranet/Controleur/ControleurConsultationbensea.php deleted file mode 100644 index ba625d0..0000000 --- a/extranet/Controleur/ControleurConsultationbensea.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationbensea'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationcso.php b/extranet/Controleur/ControleurConsultationcso.php deleted file mode 100644 index a3f6793..0000000 --- a/extranet/Controleur/ControleurConsultationcso.php +++ /dev/null @@ -1,32 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationcso'); - - $this->feuillemaladie = new Feuillemaladie(); - // $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $feuillemaladies = $this->feuillemaladie->getfeuillesmaladiecons($codePrestataire, $d1, $d2) ; - // $feuillemaladies = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $totalfeuillemaladies = $this->feuillemaladie->gettotalfeuillesmaladiecons($codePrestataire, $d1, $d2) ; - // $totalfeuillemaladies = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVue(array('feuillemaladies' => $feuillemaladies, 'totalfeuillemaladies' => $totalfeuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationlab.php b/extranet/Controleur/ControleurConsultationlab.php deleted file mode 100644 index 883307e..0000000 --- a/extranet/Controleur/ControleurConsultationlab.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationlab'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures, 'totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationopt.php b/extranet/Controleur/ControleurConsultationopt.php deleted file mode 100644 index ccd43b7..0000000 --- a/extranet/Controleur/ControleurConsultationopt.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationopt'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures, 'totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultationpha.php b/extranet/Controleur/ControleurConsultationpha.php deleted file mode 100644 index ed27cee..0000000 --- a/extranet/Controleur/ControleurConsultationpha.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationpha'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures, 'totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurConsultations.php b/extranet/Controleur/ControleurConsultations.php deleted file mode 100644 index bb79dd5..0000000 --- a/extranet/Controleur/ControleurConsultations.php +++ /dev/null @@ -1,18 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultations'); - } - - public function index() - { - $this->genererVue(); - } -} diff --git a/extranet/Controleur/ControleurConsultationsea.php b/extranet/Controleur/ControleurConsultationsea.php deleted file mode 100644 index 1258b3a..0000000 --- a/extranet/Controleur/ControleurConsultationsea.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Consultationsea'); - - $this->facture = new Facture(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $factures = $this->facture->getfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $totalfactures = $this->facture->gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) ; - - $this->genererVue(array('factures' => $factures, 'totalfactures' => $totalfactures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurContactsassureur.php b/extranet/Controleur/ControleurContactsassureur.php deleted file mode 100644 index b59a359..0000000 --- a/extranet/Controleur/ControleurContactsassureur.php +++ /dev/null @@ -1,24 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Contactsassureur"); - - $this->societeuser = new Societeuser(); - - $_SESSION['p_modeDevis'] = "0"; - } - public function index() { - $codeSociete = $_SESSION['p_codeSociete']; - - $contactsassureurs = $this->societeuser->getcontactsassureir($codeSociete); - - $this->genererVue(array('contactsassureurs' => $contactsassureurs)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurDecomptecons.php b/extranet/Controleur/ControleurDecomptecons.php deleted file mode 100644 index 848b556..0000000 --- a/extranet/Controleur/ControleurDecomptecons.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Decomptecons'); - - $this->reglement = new Reglement(); - } - - public function index() - { - $idReglement = $_SESSION['p_idReglement_C']; - - $reglement = $this->reglement->getreglement($idReglement); - - $numeroDecompte = $_SESSION['p_numeroDecompte_C']; - - $factures = $this->reglement->getdetaildecompte($numeroDecompte); - - $this->genererVue(array('reglement' => $reglement, 'factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurDemandedecompte.php b/extranet/Controleur/ControleurDemandedecompte.php deleted file mode 100644 index 26d3d03..0000000 --- a/extranet/Controleur/ControleurDemandedecompte.php +++ /dev/null @@ -1,28 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Demandedecompte'); - - $this->reglement = new Demandedecompte(); - } - - public function index() - { - $idDemandeDecompte = $_SESSION['p_idDemandeDecompte_C']; - - $reglement = $this->reglement->getdemandedecompte($idDemandeDecompte); - - $numeroDemandeDecompte = $_SESSION['p_numeroDemandeDecompte_C']; - - $factures = $this->reglement->getdetaildemandedecompte($numeroDemandeDecompte); - - $this->genererVue(array('reglement' => $reglement, 'factures' => $factures)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurDemandederogation.php b/extranet/Controleur/ControleurDemandederogation.php deleted file mode 100644 index 79e30a9..0000000 --- a/extranet/Controleur/ControleurDemandederogation.php +++ /dev/null @@ -1,18 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Demandederogation'); - - $this->derogation = (new Derogation())->getListe(); - } - public function index() { - $this->genererVue(array('derogation' => $this->derogation)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurDetailgenerationbon.php b/extranet/Controleur/ControleurDetailgenerationbon.php deleted file mode 100644 index 3e614c0..0000000 --- a/extranet/Controleur/ControleurDetailgenerationbon.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Detailgenerationbon"); - - $this->generartionbon = new Generartionbon(); - } - - public function index() - { - $idgenerationbon = $this->requete->getParametre("id"); - - $generartionbon = $this->generartionbon->unegenerationbon($idgenerationbon); - - $bonpecs = $this->generartionbon->detailgenerationbon($idgenerationbon); - - $this->genererVue(array('generartionbon' => $generartionbon, 'bonpecs' => $bonpecs)); - } -} diff --git a/extranet/Controleur/ControleurDiagnosticscons.php b/extranet/Controleur/ControleurDiagnosticscons.php deleted file mode 100644 index edf2b35..0000000 --- a/extranet/Controleur/ControleurDiagnosticscons.php +++ /dev/null @@ -1,16 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Diagnosticscons'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurDiagnosticsconsbeneficiaire.php b/extranet/Controleur/ControleurDiagnosticsconsbeneficiaire.php deleted file mode 100644 index 88cc4f3..0000000 --- a/extranet/Controleur/ControleurDiagnosticsconsbeneficiaire.php +++ /dev/null @@ -1,16 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Diagnosticsconsbeneficiaire'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurDossiers.php b/extranet/Controleur/ControleurDossiers.php deleted file mode 100644 index f51228b..0000000 --- a/extranet/Controleur/ControleurDossiers.php +++ /dev/null @@ -1,38 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Dossiers'); - - $this->feuillemaladie = new Feuillemaladie(); - $this->finger = new Finger(); - } - - public function index() { - // $_SESSION['p_okId'] = "1"; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - /* - $d1 = $_SESSION['p_dUneSemaineAvant_C']; - $d2 = date('Y-m-d'); - */ - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $feuillemaladies = $this->feuillemaladie->getfeuillesmaladie($codePrestataire, $idBeneficiaire, $d1, $d2) ; - - $this->genererVue(array('feuillemaladies' => $feuillemaladies)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurEcartdecomptecons.php b/extranet/Controleur/ControleurEcartdecomptecons.php deleted file mode 100644 index 4e330b6..0000000 --- a/extranet/Controleur/ControleurEcartdecomptecons.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Ecartdecomptecons'); - - $this->reglement = new Reglement(); - } - - public function index() - { - $idReglement = $_SESSION['p_idReglement_C']; - - $reglement = $this->reglement->getreglement($idReglement); - - $recapecartdecompte = $this->reglement->getrecapecartdecompte($idReglement); - - $this->genererVue(array('reglement' => $reglement, 'recapecartdecompte' => $recapecartdecompte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurErreur.php b/extranet/Controleur/ControleurErreur.php deleted file mode 100644 index 71cbcf5..0000000 --- a/extranet/Controleur/ControleurErreur.php +++ /dev/null @@ -1,18 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Erreur"); - } - - public function index() - { - $msgErreur = $this->requete->getParametre("id"); - $this->genererVue(array('msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurExamenententeprealable.php b/extranet/Controleur/ControleurExamenententeprealable.php deleted file mode 100644 index afc1b5c..0000000 --- a/extranet/Controleur/ControleurExamenententeprealable.php +++ /dev/null @@ -1,188 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Examenententeprealable'); - - $this->dossier = new Dossier(); - $this->demandepec = new Demandepec(); - $this->demandepec_pj = new Demandepec_pj(); - $this->ged = new Ged(); - - $this->codePrestataire = $_SESSION['p_codePrestataireUtilisateur']; - $this->acte = (new Acte_bonprestataire())->getListe($this->codePrestataire, 'EE'); - - } - public function index() { - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - $demandespecs = $this->demandepec->getDemandePecExamBeneficiaire($numeroBeneficiaire); - $this->genererVue(array('acte' => $this->acte, 'demandespecs' => $demandespecs)); - } - - public function enregistredossier() { - if (isset($_POST['codePrestataire'])) - { - $codePrestataire = $this->requete->getParametre("codePrestataire"); - $numeroBeneficiaire = $this->requete->getParametre("numeroBeneficiaire"); - $prescripteur = $this->requete->getParametreFormulaire("prescripteur"); - $centrePrescripteur = $this->requete->getParametreFormulaire("centrePrescripteur"); - $motifPec = $this->requete->getParametreFormulaire("motifPec"); - - $codeActe = $this->requete->getParametre("codeActe"); - - $numeroDossier = $this->dossier->ajouterdemandePecExam($codeActe); - - $numeroDemande = $this->demandepec->demanderPecExam($codeActe, $numeroDossier, $motifPec, $prescripteur, $centrePrescripteur); - - $demandepec = $this->demandepec->getDemandePecExam($numeroDemande); - - // on va maintenant aviser le médecin conseil par mail // - - $receipe = $_SESSION['p_emailMedecinConseil']; - - $mess = 'Bonjour AFRIK ASSUR, - -Nous sollicitons votre accord pour une prise en charge d\'examen dont vous trouverez les informations ci-dessous : - -Prestataire : -'.$demandepec['prestataire'].' - -Examen demandé : -'.$demandepec['acte'].' - -No Demande : -'.$demandepec['numeroDemande'].' - -No Assuré : -'.$demandepec['numeroAdherent'].' - -Assuré : -'.$demandepec['assure'].' - -No Bénéficiaire : -'.$demandepec['numeroBeneficiaire'].' - -Bénéficiaire : -'.$demandepec['beneficiaire'].' - -Date Demande : -'.dateFr($demandepec['dateDemande']).' '.$demandepec['heureDemande'].' - -Prescripteur : -'.$demandepec['prescripteur'].' - -Centre de prescription : -'.$demandepec['centrePrescripteur'].' - -Motif : -'.$demandepec['motifPec'].' - -Saisie par : -'.$demandepec['demandeur'].' - -'.$demandepec['prestataire'].' -Tél : '.$_SESSION['p_telephonePrestataire'].' -Fax : '.$_SESSION['p_faxPrestataire'].' -E-mail : '.$_SESSION['p_emailPrestataire'].' - -Merci. - -Vous pouvez répondre en suivant le lien : -http://sante.afrikassur.net/connexion/'.$demandepec['numeroDemande']; - - // Envoi du mail - // mail($receipe, convertirc("AFRIK ASSUR : DEMANDE DE PEC EXAMENS"), $mess, "From: SYSTEME DE GESTION MALADIE AFRIK ASSUR "); - - // On va uploader les fichiers joints s'il y en a - $filename = ''; - $old_file_name =''; - - if( !empty($_FILES['nomFichier']['name']) ) - { - $file_tmp_name = $_FILES['nomFichier']['tmp_name']; - $old_file_name = $_FILES['nomFichier']['name']; - $file_size = $_FILES['nomFichier']['size']; - $file_type = $_FILES['nomFichier']['type']; - $file_error = $_FILES['nomFichier']['error']; - - define('TARGET', 'Ged/'); // Repertoire cible - $extension = ''; - $nomFichier = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - //exit('Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'); - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // Recuperation de l'extension du fichier - $extension = pathinfo($_FILES['nomFichier']['name'], PATHINFO_EXTENSION); - - if(isset($_FILES['nomFichier']['error']) - && UPLOAD_ERR_OK === $_FILES['nomFichier']['error']) - { - // On renomme le fichier - $nomFichier = $_SESSION['p_numeroBeneficiaire_C']."_".uniqid().'.'. $extension; - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['nomFichier']['tmp_name'], TARGET.$nomFichier)) - { - $this->demandepec_pj->ajouterPjdemande($numeroDemande, $nomFichier, $old_file_name); - - $this->ged->ajouterGed($numeroBeneficiaire, $nomFichier, $old_file_name, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $nomFichier); - - $filename = TARGET.$nomFichier; - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - //send_email_simple($receipe, "AFRIK ASSUR : DEMANDE DE PEC EXAMENS SIPMLE", $mess); - } - envoyer_mail_pj($receipe, $demandepec['prestataire']." : DEMANDE DE PEC EXAMEN", $mess, $filename, $old_file_name); - // Fin uplod documents - - // On réaffiche la page avec la liste des demandes non clôturées // - $this->rediriger("Examenententeprealable"); - - } else - { - $this->rediriger("/"); - } - } - - public function cloturerdemandepec() { - $numeroDemande = $this->requete->getParametre("id"); - $this->demandepec->cloturerdemandepec($numeroDemande); - - //$this->executerAction("index"); - $this->rediriger("Examenententeprealable"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurExamensmedicaux.php b/extranet/Controleur/ControleurExamensmedicaux.php deleted file mode 100644 index 36c070e..0000000 --- a/extranet/Controleur/ControleurExamensmedicaux.php +++ /dev/null @@ -1,36 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Examensmedicaux'); - - $this->prescription = new Examen_temp(); - $this->detailprescription = new Detailexamem(); - } - - public function index() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - - $this->prescription->initexamensmedicaux_cso(); - - $prescription = $this->prescription->getexamentemp(); - - $detailprescriptions = $this->detailprescription->getdetailexamenfeuille(); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurExamenstandard.php b/extranet/Controleur/ControleurExamenstandard.php deleted file mode 100644 index a2f62c3..0000000 --- a/extranet/Controleur/ControleurExamenstandard.php +++ /dev/null @@ -1,297 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Examenstandard'); - - $this->dossier = new Dossier(); - $this->bonpec = new Bonpec(); - $this->ged = new Ged(); - - $this->codePrestataire = $_SESSION['p_codePrestataireUtilisateur']; - - $this->acte = (new Acte_bonprestataire())->getListe($this->codePrestataire, 'ES'); - - } - public function index() { - $msgErreur = ""; - $codeEtatBon = ""; - $montantacte = "0"; - $tauxCouverture = "100"; - //$montantTm = ($montantacte*(100-$tauxCouverture)/100); - $montantTm = "0"; - - $this->genererVue(array('acte' => $this->acte, 'msgErreur' => $msgErreur, - 'codeEtatBon' => $codeEtatBon, 'montantacte' => $montantacte, 'tauxCouverture' => $tauxCouverture, - 'montantTm' => $montantTm)); - } - - public function enregistredossier() { - if (isset($_POST['codePrestataire'])) - { - $codePrestataire = $this->requete->getParametre("codePrestataire"); - $numeroBeneficiaire = $this->requete->getParametre("numeroBeneficiaire"); - - $codeActe = $this->requete->getParametre("codeActe"); - - $montantacte = $this->requete->getParametreFormulaire("montantacte", "numerique"); - $tauxCouverture = $this->requete->getParametreFormulaire("tauxCouverture", "numerique"); - $montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique"); - $codeMedecin = ""; - - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - if($codeTypeBon=='1') // Bon pré-imprimé - { - $numeroBon = $this->requete->getParametre("numeroBon"); - - $this->dossier->ajouterBonPec($codeActe, $codeMedecin, $numeroBon, $montantacte , $tauxCouverture, $montantTm); - - $bonpec = $this->bonpec->imrimerBon($numeroBon); - - // Création du bon à imprimer avec Fpdf - $pdf = new FPDF(); - $pdf->SetFont('Arial','BI',9); - $pdf->AddPage(); - $pdf->SetXY(30,22); - $pdf->Cell(45,8.5,dateheureFr($bonpec['dateCourante']),0,0,'L'); - - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroPolice'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,convertirc($bonpec['souscripteur']),0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroAdherent'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,convertirc($bonpec['beneficiaire']),0,0,'L'); - $pdf->SetX(105); - $pdf->Cell(30,8.5,$bonpec['codeSexe'],0,1,'L'); - - $pdf->SetX(105); - $pdf->Cell(30,8.5,dateFr($bonpec['dateNaissance']),0,1,'L'); - - $pdf->SetXY(30,55); - $pdf->Cell(50,10,convertirc($bonpec['assure']),0,1,'L'); - - $pdf->SetXY(10,90); - //$pdf->Cell(10,10,$bonpec['codeActe'],0,0,'L'); - $pdf->Cell(10,10,$bonpec['codeActeVisible'],0,0,'L'); - - //$pdf->SetX(25); - //$pdf->Cell(20,10,format_N($bonpec['montantacte']),0,0,'L'); - - //$pdf->SetX(50); - //$pdf->Cell(20,10,format_N($bonpec['montantTm']),0,0,'L'); - - $pdf->SetXY(160,30); - $pdf->Cell(40,10,$bonpec['prestataire'],0,0,'C'); - - //$pdf->SetXY(160,47); - //$pdf->Cell(40,10,$bonpec['medecin'],0,0,'C'); - - $pdf->SetXY(165,70); - $pdf->Cell(22,5,'- Consultation ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Pharmacie ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Vaccins ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Soins ambul. ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Laboratoire ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Radio',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Hospit.',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - - // Fin bon PDF - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_EXAM_STD_NO_".$bonpec['numeroBon']."_".convertirc($bonpec['beneficiaire']).".pdf"; - $fichierBon=$bonpec['numeroBeneficiaire']."_".$bonpec['numeroBon']."_".$rand.".pdf"; - - $this->ged->ajouterBon($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret=""); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->bonpec->majfichierBon($numeroBon, $fichierBon); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - } - else // Bon sur feuille vierge - { - $numeroDossier = $this->dossier->ajouterdemandePecExam($codeActe); - - $bonpecvierge = $this->bonpec->imrimerBonVierge($numeroDossier, $montantacte, $tauxCouverture, $montantTm); - - $codeSecret = uniqid(); - - $pdf = new Pdfaa(); - $pdf->SetMargins(20, 25, 20) ; - $pdf->SetFont('Arial','',15); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $pdf->SetFont('Arial','',8); - $pdf->SetX(-50); - $pdf->Cell(35,7,convertirc('Numéro Dossier : '.$numeroDossier),1,1,'C',false); - $pdf->SetX(-50); - $pdf->Cell(30,7,$codeSecret,0,1,'C',false); - - $pdf->SetXY(63,20); - //$pdf->SetY(40); - $pdf->SetFont('Arial','B',10); - $pdf->Cell(88,15,'PRISE EN CHARGE EXAMENS PARACLINIQUES',1,1,'C',false); - - //$pdf->Cell($lgcol2,$ht,convertirc($bonpecvierge['souscripteur']),'LTR',1,'C',false); - - // début copie bon pré-imprimé - $pdf->SetXY(20,50); - - $pdf->SetFont('Arial','',8); - - $pdf->Cell(20,10,'Date :',0,0,'L'); - $pdf->Cell(70,10,dateheureFr($bonpecvierge['dateCourante']),0,0,'L'); - - $pdf->Cell(15,10,convertirc('No police :'),0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,10,$bonpecvierge['numeroPolice'],0,0,'L'); - - $pdf->SetX(150); - $pdf->Cell(50,10,convertirc('Prestataire'),1,1,'C'); - - $pdf->SetX(20); - $pdf->Cell(20,10,'Souscripteur :',0,0,'L'); - $pdf->Cell(70,10,convertirc($bonpecvierge['souscripteur']),0,0,'L'); - - $pdf->Cell(15,10,convertirc('Matricule :'),0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,10,$bonpecvierge['numeroAdherent'],0,0,'L'); - - $pdf->SetX(150); - $pdf->Cell(50,10,convertirc($bonpecvierge['prestataire']),1,1,'C'); - - $pdf->SetX(20); - $pdf->Cell(20,10,convertirc('Bénéficiaire :'),0,0,'L'); - $pdf->Cell(70,10,convertirc($bonpecvierge['beneficiaire']),0,0,'L'); - - $pdf->Cell(15,10,convertirc('Sexe :'),0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,10,$bonpecvierge['codeSexe'],0,0,'L'); - - $pdf->SetX(150); - $pdf->Cell(15,10,convertirc('Né(e) le :'),0,0,'L'); - $pdf->Cell(45,10,dateFr($bonpecvierge['dateNaissance']),0,1,'L'); - - $pdf->SetX(20); - $pdf->Cell(20,10,convertirc('Assuré :'),0,0,'L'); - $pdf->Cell(120,10,convertirc($bonpecvierge['assure']),0,0,'L'); - - $pdf->SetX(150); - $pdf->Cell(50,10,convertirc('Taux de couverture'),1,1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,7,'- Consultations','L','0','L'); - $pdf->Cell(20,7,' : 100%','R',1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,7,'- Pharmacie','L','0','L'); - $pdf->Cell(20,7,' : 80 %','R',1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,5,'- Vaccins','L','0','L'); - $pdf->Cell(20,5,' : 100%','R',1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,5,'- Soins ambulatoires','L','0','L'); - $pdf->Cell(20,5,' : 80 %','R',1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,5,'- Laboratoire','L','0','L'); - $pdf->Cell(20,5,' : 100%','R',1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,5,'- Imagerie et radio','L','0','L'); - $pdf->Cell(20,5,' : 100%','R',1,'C'); - - $pdf->SetX(150); - $pdf->Cell(30,5,'- Hospitalisation','LB','0','L'); - $pdf->Cell(20,5,' : 100%','RB',1,'C'); - - //$pdf->Ln(10); - $pdf->SetX(20); - $pdf->Cell(20,10,convertirc('Acte :'),0,0,'L'); - // $pdf->Cell(120,10,convertirc($bonpecvierge['codeActe'].' : '.$bonpecvierge['acte']),0,0,'L'); - $pdf->Cell(120,10,convertirc($bonpecvierge['codeActeVisible'].' : '.$bonpecvierge['acte']),0,0,'L'); - - - $pdf->SetY(-95); - $pdf->Cell(0,0,convertirc('NB : A joindre à la facture définitive pour le remboursement !'),'0',0,'C',false); - - $pdf->SetY(-70); - $pdf->Cell(80,6,'Signature patient',0,0,'C',false); - $pdf->Cell(80,6,'Pour le prestataire',0,1,'C',false); - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_EXAM_STD_VIERGE_".$numeroDossier."_".convertirc($bonpecvierge['beneficiaire']).".pdf"; - $fichierBon=$bonpecvierge['numeroBeneficiaire']."_EXAM_STD_VIERGE_".$rand.".pdf"; - - $this->ged->ajouterBonVierge($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - - // $this->executerAction("index"); - } - - } else - { - $this->rediriger("/"); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurExclusion.php b/extranet/Controleur/ControleurExclusion.php deleted file mode 100644 index 3353d4a..0000000 --- a/extranet/Controleur/ControleurExclusion.php +++ /dev/null @@ -1,24 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Exclusion'); - - $this->exclusion = new Exclusioncollege(); - } - - public function index() { - $idCollege = $_SESSION['p_idCollege_C']; - - $exclusions = $this->exclusion->getExclusionFamille($idCollege); - - $this->genererVue(array('exclusions' => $exclusions)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurExclusionfam.php b/extranet/Controleur/ControleurExclusionfam.php deleted file mode 100644 index 9143fb9..0000000 --- a/extranet/Controleur/ControleurExclusionfam.php +++ /dev/null @@ -1,24 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Exclusionfam'); - - $this->exclusion = new Exclusioncollege(); - } - - public function index() { - $idCollege = $_SESSION['p_idCollege_C']; - - $exclusions = $this->exclusion->getExclusionFamille($idCollege); - - $this->genererVue(array('exclusions' => $exclusions)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurExclusionstandards.php b/extranet/Controleur/ControleurExclusionstandards.php deleted file mode 100644 index bed4c2e..0000000 --- a/extranet/Controleur/ControleurExclusionstandards.php +++ /dev/null @@ -1,18 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Exclusionstandards'); - } - - public function index() - { - require_once $_SESSION['p_dossierSociete'].'/Controleur/Exclusionstandardsindex.php'; - } -} diff --git a/extranet/Controleur/ControleurFacturecons.php b/extranet/Controleur/ControleurFacturecons.php deleted file mode 100644 index d7aa10d..0000000 --- a/extranet/Controleur/ControleurFacturecons.php +++ /dev/null @@ -1,96 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Pharmacien'); - - $this->prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - $this->prestation = new Prestationactes(); - - $this->beneficiaire = new Beneficiaire(); - viderContexte(); - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "PHAR"; - - } - - public function index() - { - $garantieadherent_temp = null; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - - if($numeroBonOrdonnance=="-1") - { - // $this->genererVue(); - - $this->genererVue(); - - } - else - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnancePha($numeroBonOrdonnance); - - $idBeneficiaire = $resultat['idBeneficiaire']; - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $this->prescription->initpharmacie_pha($numeroBonOrdonnance); - - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription_pha($numeroBonOrdonnance); - - $detailprescriptions = $this->detailprescription->getdetailprescription_pha($numeroBonOrdonnance); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - // $detaillivres = $this->prescription->getdetaillivre(); - $detaillivres = $this->prescription->getdetaillivrepha(); - - $factures = $this->prescription->getfactures_ordonnance($numeroBonOrdonnance); - $factures_toal = $this->prescription->getfactures_total_ordonnance($numeroBonOrdonnance); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $idPrestationactes = $prescription['idPrestationactes']; - $remplace = $prescription['remplace']; - $numeroRemplace = $prescription['numeroRemplace']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - $numeroPrescription = $prescription['numeroPrescription']; - - $facturable=($numeroRemplace != $numeroBonOrdonnance); - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - // if($idPrestationactes==0) - // if($idPrestationactes==0 && $facturable) - if($facturable) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_pha($numeroFeuilleMaladie, $codePrestataire); - } - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, - 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'factures' => $factures, 'factures_toal' => $factures_toal)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurFactureconsprestataire.php b/extranet/Controleur/ControleurFactureconsprestataire.php deleted file mode 100644 index eaf5617..0000000 --- a/extranet/Controleur/ControleurFactureconsprestataire.php +++ /dev/null @@ -1,19 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Factureconsprestataire'); - - $_SESSION['p_idFacture_C'] = "0"; - - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurFacturesansboncso.php b/extranet/Controleur/ControleurFacturesansboncso.php deleted file mode 100644 index 08e1147..0000000 --- a/extranet/Controleur/ControleurFacturesansboncso.php +++ /dev/null @@ -1,34 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Facturesansboncso'); - - $this->facture = new Facturesansbon(); - $this->ouinonhospit = (new Ouinon())->getListe(); - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $this->facture->init_facture_sans_bon(); - - $facture = $this->facture->getfacture_sans_bon_temp(); - - $prestations = $this->facture->getprestations_sans_bon_temp(); - - $garantieadherent_temp = $this->facture->afficher_garantieadherent_temp(); - - $this->genererVue(array('facture' => $facture, 'prestations' => $prestations, - 'garantieadherent_temp' => $garantieadherent_temp, 'ouinonhospit' => $this->ouinonhospit)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurFeuillemaladie.php b/extranet/Controleur/ControleurFeuillemaladie.php deleted file mode 100644 index 8021b97..0000000 --- a/extranet/Controleur/ControleurFeuillemaladie.php +++ /dev/null @@ -1,182 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Feuillemaladie'); - - $this->feuillemaladie = new Feuillemaladie(); - $this->prestation = new Prestationactes(); - $this->typeaffection = new Typeaffection(); - $this->affection = new Affection(); - $this->beneficiaire = new Beneficiaire(); - - $_SESSION['p_codeTypeFacture_C'] = "CSO"; - } - - public function index() - { - $_SESSION['p_tm_TP'] = "0"; - - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $infosfeuillemaladie = $this->feuillemaladie->getinfosfeuillemaladie($numeroFeuilleMaladie); - $facture = $infosfeuillemaladie['facture']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($facture==0) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); - - $prestations = $this->prestation->getprestationsfeuille($numeroFeuilleMaladie, $codePrestataire); - - $typeaffections = $this->typeaffection->getListe() ; - - $codeTypeAffection = $feuillemaladie['codeTypeAffection']; - - $affections = $this->affection->getListe($codeTypeAffection) ; - - $diagnostics = $this->feuillemaladie->getDiagnostics($numeroFeuilleMaladie); - - $this->genererVue(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations, - 'garantieadherent_temp' => $garantieadherent_temp, 'typeaffections' => $typeaffections, 'affections' => $affections, - 'diagnostics' => $diagnostics, 'limite_beneficiaire' => $limite_beneficiaire)); - } - - public function confirmerface() - { - $_SESSION['p_messageFace'] = ""; - $compare_face = $_POST['compare_face']; - - if(isset($_POST['image_face'])) - { - $_SESSION['p_okId_face'] = "-1"; - $_SESSION['p_okId'] = "-1"; - - $path = "Temp/"; - $extension = "jpeg"; - - $data = $_POST['image_face']; - - $data = str_replace('data:image/jpeg;base64,', '', $data); - - $data = base64_decode($data); - - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $date = date('YmdHis'); - $file_name = "img_v_".$date.uniqid().".".$extension; - $chemin = $path.$file_name; - - file_put_contents($chemin, $data); - - $rand = rand(1,1000000); - $nomImage = $username."_".$rand.'.'. $extension; - - $this->beneficiaire->init_traiterlaface('2'); - - $arrgs = [ - 'credentials' => [ - 'key' => 'AKIA2O2PTXQ7XN5OATO3', - 'secret' => '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', - ], - 'version' => 'latest', - 'region' => 'us-west-2' - ]; - - $client = new RekognitionClient($arrgs); - - $sourceImage = $chemin; - $targetImage = $_SESSION['p_dossierPhoto_C'].$_SESSION['p_dossierSociete'].'/Photos/'.$_SESSION['p_lienPhoto_C']; - - try - { - $result = $client->compareFaces - ( - [ - 'SimilarityThreshold' => 80, - 'SourceImage' => [ - 'Bytes' => file_get_contents($sourceImage) - ], - 'TargetImage' => [ - 'Bytes' => file_get_contents($targetImage) - ], - ] - ); - - $faceMatches = count($result['FaceMatches']); - - if ($faceMatches==0) - { - $_SESSION['p_messageFace'] = "Les faces ne correspondent pas! / The faces do not match!"; - $this->beneficiaire->resultat_traitement_face($username, '0', $_SESSION['p_messageFace']); - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "0")); - } - else - { - $this->beneficiaire->resultat_traitement_face($username, '1', ''); - - $_SESSION['p_okId_face'] = "1"; - $_SESSION['p_messageFace'] = "Face confirmée! / Face confirmed!"; - - /* - var_dump - ( - array - ( - "p_okId_face" => $_SESSION['p_okId_face'], - "p_messageFace" => $_SESSION['p_messageFace'], - ) - ); - exit(); - */ - - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "1")); - } - } - catch (Exception $e) - { - // echo 'Message: ' .$e->getMessage(); - // exit(); - $msgErreur = $e->getMessage(); - $_SESSION['p_messageFace'] = "Un problème lors du traitement! / A problem during treatment!"; - - $this->beneficiaire->resultat_traitement_face($username, '9', $msgErreur); - - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "0")); - } - } - unlink($chemin); - } - -} - diff --git a/extranet/Controleur/ControleurFeuillemaladiecons.php b/extranet/Controleur/ControleurFeuillemaladiecons.php deleted file mode 100644 index cb5ba27..0000000 --- a/extranet/Controleur/ControleurFeuillemaladiecons.php +++ /dev/null @@ -1,30 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Feuillemaladiecons'); - - $this->feuillemaladie = new Feuillemaladie(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); - - $prestations = $this->prestation->getprestationsfeuille($numeroFeuilleMaladie, $codePrestataire); - - $this->genererVue(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurFeuillemaladieconsben.php b/extranet/Controleur/ControleurFeuillemaladieconsben.php deleted file mode 100644 index a4f8538..0000000 --- a/extranet/Controleur/ControleurFeuillemaladieconsben.php +++ /dev/null @@ -1,30 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Feuillemaladieconsben'); - - $this->feuillemaladie = new Feuillemaladie(); - $this->prestation = new Prestationactes(); - } - - public function index() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie); - - $prestations = $this->prestation->getprestationsfeuille($numeroFeuilleMaladie, $codePrestataire); - - $this->genererVue(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurFicheadherent.php b/extranet/Controleur/ControleurFicheadherent.php deleted file mode 100644 index 8ee70e9..0000000 --- a/extranet/Controleur/ControleurFicheadherent.php +++ /dev/null @@ -1,39 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Ficheadherent"); - - $this->adherent = new Adherent(); - $this->beneficiaire = new Beneficiaire(); - $this->garantieadherent = new Garantieadherent(); - } - public function index() { - - $idPolice = $_SESSION['p_idPolice_C']; - $idAdherent = $this->requete->getParametre("id"); - - $adherent = $this->adherent->getContexteAdherentId($idAdherent); - $beneficiaires = $this->beneficiaire->getBeneficiairesId($idAdherent); - $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent); - - $this->adherent->controlerplafondadherentannuel($idAdherent); - $_SESSION['p_controlerPlafondBeneficiaire'] = "0"; - - $limite_adherent = $this->garantieadherent->getLimitesAdherent($idAdherent); - - $this->genererVue(array('adherent' => $adherent, 'beneficiaires' => $beneficiaires, 'garantieadherents' => $garantieadherents, - 'limite_adherent' => $limite_adherent)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurFichebeneficiaire.php b/extranet/Controleur/ControleurFichebeneficiaire.php deleted file mode 100644 index b603735..0000000 --- a/extranet/Controleur/ControleurFichebeneficiaire.php +++ /dev/null @@ -1,262 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Fichebeneficiaire'); - - $this->beneficiaire = new Beneficiaire(); - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $codeSociete = $this->requete->getSession()->getAttribut('p_codeSociete'); - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $this->beneficiaire->getModeBiometrie(); - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $idAdherent = $_SESSION['p_idAdherent_C']; - - $garantieadherents = $this->garantieadherent->getGarantieBeneficiaire($idBeneficiaire); - - // A enlever après - $_SESSION['p_lienServeur'] = $_SESSION['p_lienPrestation_C']; - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->garantieadherent->getLimitesBeneficiaire($idBeneficiaire); - - $limite_adherent = $this->garantieadherent->getLimitesAdherent($idAdherent); - - $this->genererVue(array('beneficiaire' => $beneficiaire, 'garantieadherents' => $garantieadherents, - 'limite_beneficiaire' => $limite_beneficiaire, 'limite_adherent' => $limite_adherent)); - } - - public function ebeneenregistrerface() - { - $_SESSION['p_messageFace'] = ""; - $compare_face = $_POST['compare_face']; - $del_face = $_POST['del_face']; - - if(isset($_POST['image_face'])) - { - $_SESSION['p_okId_face'] = "-1"; - $_SESSION['p_okId'] = "-1"; - - $path = "Temp/"; - $extension = "jpeg"; - - $data = $_POST['image_face']; - - $data = str_replace('data:image/jpeg;base64,', '', $data); - - $data = base64_decode($data); - - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $date = date('YmdHis'); - $file_name = "img_v_".$date.uniqid().".".$extension; - $chemin = $path.$file_name; - - file_put_contents($chemin, $data); - - $rand = rand(1,1000000); - $nomImage = $username."_".$rand.'.'. $extension; - - if ($compare_face=="1") - { - if($del_face=="1") - { - $this->beneficiaire->init_traiterlaface('3'); - } - else - { - $this->beneficiaire->init_traiterlaface('2'); - } - - $arrgs = [ - 'credentials' => [ - /* - 'key' => 'AKIARKWWQN5L3CY26JXS', - 'secret' => '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', - */ - /* - 'key' => 'AKIARKWWQN5LZYQYF5HJ', - 'secret' => '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', - */ - 'key' => 'AKIA2O2PTXQ7XN5OATO3', - 'secret' => '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', - ], - 'version' => 'latest', - 'region' => 'us-west-2' - ]; - -/* -regions -us-east-2 -us-east-1 -us-west-1 -us-west-2 -af-south-1 -ap-east-1 -ap-south-2 -ap-southeast-3 -ap-southeast-4 -ap-south-1 -ap-northeast-3 -ap-northeast-2 -ap-southeast-1 -ap-southeast-2 -ap-northeast-1 -ca-central-1 -eu-central-1 -eu-west-1 -eu-west-2 -eu-south-1 -eu-west-3 -eu-south-2 -eu-north-1 -eu-central-2 -me-south-1 -me-central-1 -sa-east-1 -us-gov-east-1 -us-gov-west-1 -*/ - - $client = new RekognitionClient($arrgs); - - $sourceImage = $chemin; - $targetImage = $_SESSION['p_dossierPhoto_C'].$_SESSION['p_dossierSociete'].'/Photos/'.$_SESSION['p_lienPhoto_C']; - - try - { - $result = $client->compareFaces - ( - [ - 'SimilarityThreshold' => 80, - 'SourceImage' => [ - 'Bytes' => file_get_contents($sourceImage) - ], - 'TargetImage' => [ - 'Bytes' => file_get_contents($targetImage) - ], - ] - ); - - $faceMatches = count($result['FaceMatches']); - if ($faceMatches==0) - { - $_SESSION['p_messageFace'] = "Les faces ne correspondent pas! / The faces do not match!"; - $this->beneficiaire->resultat_traitement_face($username, '0', $_SESSION['p_messageFace']); - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "0")); - } - elseif ($del_face=="1") - { - $motif = $_POST['motif']; - - $this->beneficiaire->resultat_traitement_face($username, '1', $motif); - - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $this->beneficiaire->supprimerPhoto($idBeneficiaire); - $this->beneficiaire->unregisterface($username, $motif); - $_SESSION['p_messageFace'] = "Face supprimée pour motif : $motif / Face removed for reason : $motif"; - - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'photo_succes' => "1")); - $_SESSION['p_lienPhoto_C']=""; - } - else - { - $this->beneficiaire->resultat_traitement_face($username, '1', ''); - - $_SESSION['p_okId_face'] = "1"; - $_SESSION['p_messageFace'] = "Face confirmée! / Face confirmed!"; - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "1")); - } - } - catch (Exception $e) - { - // echo 'Message: ' .$e->getMessage(); - // exit(); - $msgErreur = $e->getMessage(); - $_SESSION['p_messageFace'] = "Un problème lors du traitement! / A problem during treatment!"; - - $this->beneficiaire->resultat_traitement_face($username, '9', $msgErreur); - - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "0")); - } - } - else - { - $this->beneficiaire->init_traiterlaface('1'); - - $cheminNew = $_SESSION['p_lienPhotoFace'] . $nomImage; - - // echo "chemin=>$chemin ; cheminNew=>$cheminNew"; - // exit(); - - $_SESSION['p_okId_face'] = "1"; - - // réduction de la taille de l'immage - $infosImg = getimagesize($chemin); - $src = $chemin; - $imgtype = image_type_to_mime_type($infosImg[2]); - - switch ($imgtype) - { - case 'image/jpeg': - $source_image = imagecreatefromjpeg($src); - break; - case 'image/jpg': - $source_image = imagecreatefromjpeg($src); - break; - case 'image/png': - $source_image = imagecreatefrompng($src); - break; - } - - $width = imagesx($source_image); - $desired_width = $width; - if ($desired_width > $_SESSION['p_largeurPhoto']) - { - $desired_width = $_SESSION['p_largeurPhoto']; - } - $height = imagesy($source_image); - - $desired_height = floor($height * ($desired_width / $width)); - - $virtual_image = imagecreatetruecolor($desired_width, $desired_height); - - imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height); - - if (imagejpeg($virtual_image, $cheminNew, -1)) - // if (imagejpeg($virtual_image, $cheminNew, 60)) - { - $this->beneficiaire->registerface($username); - - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $this->beneficiaire->changerPhoto($idBeneficiaire, $nomImage); - - $_SESSION['p_messageFace'] = "Enrôlement effectué avec succès! / Enrollment completed successfully!!"; - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "1")); - } - $this->beneficiaire->resultat_traitement_face($username, '1', ''); - } - unlink($chemin); - } - } - -} diff --git a/extranet/Controleur/ControleurFichepolice.php b/extranet/Controleur/ControleurFichepolice.php deleted file mode 100644 index 565491a..0000000 --- a/extranet/Controleur/ControleurFichepolice.php +++ /dev/null @@ -1,67 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Fichepolice"); - - $this->police = new Police(); - $this->quittance = new Quittance(); - - $_SESSION['p_modeDevis'] = "0"; - } - public function index() { - $id = $_SESSION['p_idPoliceAjax']; - - $this->police->getContextePoliceId($id); - $police = $this->police->getPoliceId($id); - $quittances = $this->quittance->getQuittancesId($id); - $totalquittance = $this->quittance->getTotalQuittance($id); - - $this->genererVue(array('police' => $police, 'quittances' => $quittances, 'totalquittance' => $totalquittance)); - } - - public function supprimer() { - $id = $_SESSION['p_idPoliceAjax']; - - if($this->police->supprimer($id)) - { - $this->rediriger("Ficheclient"); - } - else - { - $this->rediriger("Fichepolice"); - } - } - - public function imprimerquittance() { - $IdQuittance = $this->requete->getParametre("id"); - require_once 'Societes/'.$_SESSION['p_codeSociete'].'/Etats/Etquittance.php'; - $this->etat = new Etquittance(); - $this->etat->imprimer($IdQuittance); - } - - /* - public function archivergarantie() { - $id = $_SESSION['p_idPoliceAjax']; - $this->police->archivergarantie($id); - $this->rediriger("Fichepolice"); - } - - public function archivercollege() { - $id = $_SESSION['p_idPoliceAjax']; - $this->police->archivercollege($id); - // $this->rediriger("Fichepolice"); - } - */ -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurGed.php b/extranet/Controleur/ControleurGed.php deleted file mode 100644 index 91ca283..0000000 --- a/extranet/Controleur/ControleurGed.php +++ /dev/null @@ -1,119 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Ged'); - - $this->ged = new Ged(); - } - - public function index($msgErreur=null) - { - $message = ""; - - $nouveau_fichier = "rien"; - - if(!empty($_POST)) - { - define('TARGET', $_SESSION['p_cheminGed']); // Repertoire cible - define('MAX_SIZE', 10000000); // Taille max en octets du fichier - - // Tableaux de donnees - // ".avi", ".bmp", ".doc", ".docx", ".gif", ".jpeg", "jpg", "jpe", ".mkv", ".mp3", ".pdf", ".png", ".pps", ".xls", ".xlsx", ".wav" - // $tabExt = array('jpg','png','jpeg'); // Extensions autorisees - - $tabExt = array("avi", "bmp", "doc", "docx", "gif", "jpeg", "jpg", "jpe", "mkv", "mp3", "mp4", "pdf", "png", "pps", "xls", "xlsx", "wav"); // Extensions autorisees - - // Variables - $extension = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // On verifie si le champ est rempli - if( !empty($_FILES['fichier_upload']['name']) ) - { - // Recuperation de l'extension du fichier - - $extension = pathinfo($_FILES['fichier_upload']['name'], PATHINFO_EXTENSION); - - // On verifie l'extension du fichier - if(in_array(strtolower($extension), $tabExt)) - { - $message = $_FILES['fichier_upload']['size']; - - // On verifie les dimensions et taille du fichier - if($_FILES['fichier_upload']['size'] <= MAX_SIZE) - { - $taille = $_FILES['fichier_upload']['size']; - - // Parcours du tableau d'erreurs - if(isset($_FILES['fichier_upload']['error']) && UPLOAD_ERR_OK === $_FILES['fichier_upload']['error']) - { - // On renomme le fichier - $nomOrigine = $_FILES['fichier_upload']['name']; - $nouveau_fichier = dateJourSql()."_".uniqid().".".$extension; - - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nouveau_fichier)) - { - $message = 'Chargé avec succès / Uploaded successfully'; - - // on va envoyer dans la base de données - $this->ged->enregistrerged($nomOrigine, $nouveau_fichier, $taille); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - $message .= $_FILES['fichier_upload']['size']." Erreur dans les dimensions du fichier !"; - // $message = 'Erreur dans les dimensions du fichier !'; - } - } - else - { - // Sinon on affiche une erreur pour l'extension - $message = 'Extension du fichier est incorrecte !'; - } - } - else - { - // Sinon on affiche une erreur pour le champ vide - $message = 'Veuillez sélectionner un fichier SVP! / Please select a file!'; - } - - // fin upload - } - - $msgErreur = $message; - - $d1 = $_SESSION['p_dUneSemaineAvant_C']; - $d2 = date('Y-m-d'); - - $geds = $this->ged->getged($d1, $d2, ""); - - unset($_FILES['fichier_upload']); - - $this->genererVue(array('geds' => $geds, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurGedadherent.php b/extranet/Controleur/ControleurGedadherent.php deleted file mode 100644 index 25a7566..0000000 --- a/extranet/Controleur/ControleurGedadherent.php +++ /dev/null @@ -1,119 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Gedadherent'); - - $this->ged = new Ged(); - } - - public function index($msgErreur=null) - { - $message = ""; - - $nouveau_fichier = "rien"; - - if(!empty($_POST)) - { - define('TARGET', $_SESSION['p_cheminGed']); // Repertoire cible - define('MAX_SIZE', 10000000); // Taille max en octets du fichier - - // Tableaux de donnees - // ".avi", ".bmp", ".doc", ".docx", ".gif", ".jpeg", "jpg", "jpe", ".mkv", ".mp3", ".pdf", ".png", ".pps", ".xls", ".xlsx", ".wav" - // $tabExt = array('jpg','png','jpeg'); // Extensions autorisees - - $tabExt = array("avi", "bmp", "doc", "docx", "gif", "jpeg", "jpg", "jpe", "mkv", "mp3", "mp4", "pdf", "png", "pps", "xls", "xlsx", "wav"); // Extensions autorisees - - // Variables - $extension = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // On verifie si le champ est rempli - if( !empty($_FILES['fichier_upload']['name']) ) - { - // Recuperation de l'extension du fichier - - $extension = pathinfo($_FILES['fichier_upload']['name'], PATHINFO_EXTENSION); - - // On verifie l'extension du fichier - if(in_array(strtolower($extension), $tabExt)) - { - $message = $_FILES['fichier_upload']['size']; - - // On verifie les dimensions et taille du fichier - if($_FILES['fichier_upload']['size'] <= MAX_SIZE) - { - $taille = $_FILES['fichier_upload']['size']; - - // Parcours du tableau d'erreurs - if(isset($_FILES['fichier_upload']['error']) && UPLOAD_ERR_OK === $_FILES['fichier_upload']['error']) - { - // On renomme le fichier - $nomOrigine = $_FILES['fichier_upload']['name']; - $nouveau_fichier = dateJourSql()."_".uniqid().".".$extension; - - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nouveau_fichier)) - { - $message = 'Chargé avec succès / Uploaded successfully'; - - // on va envoyer dans la base de données - $this->ged->enregistrergedadherent($nomOrigine, $nouveau_fichier, $taille); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - $message .= $_FILES['fichier_upload']['size']." Erreur dans les dimensions du fichier !"; - // $message = 'Erreur dans les dimensions du fichier !'; - } - } - else - { - // Sinon on affiche une erreur pour l'extension - $message = 'Extension du fichier est incorrecte !'; - } - } - else - { - // Sinon on affiche une erreur pour le champ vide - $message = 'Veuillez sélectionner un fichier SVP! / Please select a file!'; - } - - // fin upload - } - - $msgErreur = $message; - - $d1 = $_SESSION['p_dUneSemaineAvant_C']; - $d2 = date('Y-m-d'); - - $geds = $this->ged->getgedadherent($d1, $d2, ""); - - unset($_FILES['fichier_upload']); - - $this->genererVue(array('geds' => $geds, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurGedbeneficiaireprest.php b/extranet/Controleur/ControleurGedbeneficiaireprest.php deleted file mode 100644 index 2675b7d..0000000 --- a/extranet/Controleur/ControleurGedbeneficiaireprest.php +++ /dev/null @@ -1,120 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Gedbeneficiaireprest'); - - $this->ged = new Ged(); - } - - public function index($msgErreur=null) - { - - $message = ""; - - $nouveau_fichier = "Rien"; - - if(!empty($_POST)) - { - define('TARGET', $_SESSION['p_cheminGed']); // Repertoire cible - define('MAX_SIZE', 10000000); // Taille max en octets du fichier - - // Tableaux de donnees - // ".avi", ".bmp", ".doc", ".docx", ".gif", ".jpeg", "jpg", "jpe", ".mkv", ".mp3", ".pdf", ".png", ".pps", ".xls", ".xlsx", ".wav" - // $tabExt = array('jpg','png','jpeg'); // Extensions autorisees - - $tabExt = array("avi", "bmp", "doc", "docx", "gif", "jpeg", "jpg", "jpe", "mkv", "mp3", "mp4", "pdf", "png", "pps", "xls", "xlsx", "wav"); // Extensions autorisees - - // Variables - $extension = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // On verifie si le champ est rempli - if( !empty($_FILES['fichier_upload']['name']) ) - { - // Recuperation de l'extension du fichier - - $extension = pathinfo($_FILES['fichier_upload']['name'], PATHINFO_EXTENSION); - - // On verifie l'extension du fichier - if(in_array(strtolower($extension), $tabExt)) - { - $message = $_FILES['fichier_upload']['size']; - - // On verifie les dimensions et taille du fichier - if($_FILES['fichier_upload']['size'] <= MAX_SIZE) - { - $taille = $_FILES['fichier_upload']['size']; - - // Parcours du tableau d'erreurs - if(isset($_FILES['fichier_upload']['error']) && UPLOAD_ERR_OK === $_FILES['fichier_upload']['error']) - { - // On renomme le fichier - $nomOrigine = $_FILES['fichier_upload']['name']; - $nouveau_fichier = dateJourSql()."_".uniqid().".".$extension; - - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nouveau_fichier)) - { - $message = 'Chargé avec succès / Uploaded successfully'; - - // on va envoyer dans la base de données - $this->ged->enregistrergedbeneficiaireprest($nomOrigine, $nouveau_fichier, $taille); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - $message .= $_FILES['fichier_upload']['size']." Erreur dans les dimensions du fichier !"; - // $message = 'Erreur dans les dimensions du fichier !'; - } - } - else - { - // Sinon on affiche une erreur pour l'extension - $message = 'Extension du fichier est incorrecte !'; - } - } - else - { - // Sinon on affiche une erreur pour le champ vide - $message = 'Veuillez sélectionner un fichier SVP! / Please select a file!'; - } - - // fin upload - } - - $msgErreur = $message; - - $d1 = $_SESSION['p_dUneSemaineAvant_C']; - $d2 = date('Y-m-d'); - - $geds = $this->ged->getgedbeneficiaireprest($d1, $d2, ""); - - unset($_FILES['fichier_upload']); - - $this->genererVue(array('geds' => $geds, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurGedfeuillemaladie.php b/extranet/Controleur/ControleurGedfeuillemaladie.php deleted file mode 100644 index 441d2ea..0000000 --- a/extranet/Controleur/ControleurGedfeuillemaladie.php +++ /dev/null @@ -1,120 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Gedfeuillemaladie'); - - $this->ged = new Ged(); - } - - public function index($msgErreur=null) - { - - $message = ""; - - $nouveau_fichier = "rien"; - - if(!empty($_POST)) - { - define('TARGET', $_SESSION['p_cheminGed']); // Repertoire cible - define('MAX_SIZE', 10000000); // Taille max en octets du fichier - - // Tableaux de donnees - // ".avi", ".bmp", ".doc", ".docx", ".gif", ".jpeg", "jpg", "jpe", ".mkv", ".mp3", ".pdf", ".png", ".pps", ".xls", ".xlsx", ".wav" - // $tabExt = array('jpg','png','jpeg'); // Extensions autorisees - - $tabExt = array("avi", "bmp", "doc", "docx", "gif", "jpeg", "jpg", "jpe", "mkv", "mp3", "mp4", "pdf", "png", "pps", "xls", "xlsx", "wav"); // Extensions autorisees - - // Variables - $extension = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // On verifie si le champ est rempli - if( !empty($_FILES['fichier_upload']['name']) ) - { - // Recuperation de l'extension du fichier - - $extension = pathinfo($_FILES['fichier_upload']['name'], PATHINFO_EXTENSION); - - // On verifie l'extension du fichier - if(in_array(strtolower($extension), $tabExt)) - { - $message = $_FILES['fichier_upload']['size']; - - // On verifie les dimensions et taille du fichier - if($_FILES['fichier_upload']['size'] <= MAX_SIZE) - { - $taille = $_FILES['fichier_upload']['size']; - - // Parcours du tableau d'erreurs - if(isset($_FILES['fichier_upload']['error']) && UPLOAD_ERR_OK === $_FILES['fichier_upload']['error']) - { - // On renomme le fichier - $nomOrigine = $_FILES['fichier_upload']['name']; - $nouveau_fichier = dateJourSql()."_".uniqid().".".$extension; - - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nouveau_fichier)) - { - $message = 'Chargé avec succès / Uploaded successfully'; - - // on va envoyer dans la base de données - $this->ged->enregistrergedfeuillemaladie($nomOrigine, $nouveau_fichier, $taille); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - $message .= $_FILES['fichier_upload']['size']." Erreur dans les dimensions du fichier !"; - // $message = 'Erreur dans les dimensions du fichier !'; - } - } - else - { - // Sinon on affiche une erreur pour l'extension - $message = 'Extension du fichier est incorrecte !'; - } - } - else - { - // Sinon on affiche une erreur pour le champ vide - $message = 'Veuillez sélectionner un fichier SVP! / Please select a file!'; - } - - // fin upload - } - - $msgErreur = $message; - - $d1 = $_SESSION['p_dUneSemaineAvant_C']; - $d2 = date('Y-m-d'); - - $geds = $this->ged->getgedfeuillemaladie($d1, $d2, ""); - - unset($_FILES['fichier_upload']); - - $this->genererVue(array('geds' => $geds, 'msgErreur' => $msgErreur)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurGenererbon.php b/extranet/Controleur/ControleurGenererbon.php deleted file mode 100644 index c829637..0000000 --- a/extranet/Controleur/ControleurGenererbon.php +++ /dev/null @@ -1,63 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Genererbon'); - - $this->bonpec = new Bonpec(); - //$this->typebon = (new Typebon())->getListe(); - //$this->prestataire = (new Prestataire())->getListeTypePrestataire('CSO'); - $this->prestataire = (new Prestataire())->getListeTypePrestataireBon(); - - $this->denierNumeroBon = $this->bonpec->getDenierNumeroBon(); - } - public function index() { - $msgErreur = ""; - $this->genererVue(array('prestataire' => $this->prestataire, 'denierNumeroBon' => $this->denierNumeroBon, 'msgErreur' => $msgErreur)); - } - - public function genererBon() { - if (isset($_POST['codePrestataire'])) - { - $codePrestataire = $this->requete->getParametre("codePrestataire"); - $noDepart = $this->requete->getParametre("noDepart"); - $noFin = $this->requete->getParametre("noFin"); - - $denierNumeroBon = $this->bonpec->getDenierNumeroBon(); - - if ($noFin<$noDepart) - { - $msgErreur = 'Veuillez revoir vos bornes !'; - $this->genererVue(array('prestataire' => $this->prestataire, 'denierNumeroBon' => $denierNumeroBon, 'msgErreur' => $msgErreur), "index"); - } - else - // Vérifier que la plage est libre - if ($this->bonpec->plageLibre($noDepart, $noFin)) - { - $this->bonpec->genererBon($codePrestataire, $noDepart, $noFin); - - $denierNumeroBon = $this->bonpec->getDenierNumeroBon(); - $msgErreur = 'Génération terminée avec succès!'; - $this->genererVue(array('prestataire' => $this->prestataire, 'denierNumeroBon' => $denierNumeroBon, 'msgErreur' => $msgErreur), "index"); - } - else - { - $msgErreur = 'Cette plage est déjà occupée!'; - $this->genererVue(array('prestataire' => $this->prestataire, 'denierNumeroBon' => $denierNumeroBon, 'msgErreur' => $msgErreur), "index"); - } - } else - { - $this->rediriger("/"); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurGestionbons.php b/extranet/Controleur/ControleurGestionbons.php deleted file mode 100644 index dd1d8ce..0000000 --- a/extranet/Controleur/ControleurGestionbons.php +++ /dev/null @@ -1,18 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Gestionbons'); - } - - public function index() - { - $this->genererVue(); - } -} diff --git a/extranet/Controleur/ControleurImprimerbonpecexam.php b/extranet/Controleur/ControleurImprimerbonpecexam.php deleted file mode 100644 index babf2d1..0000000 --- a/extranet/Controleur/ControleurImprimerbonpecexam.php +++ /dev/null @@ -1,254 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Imprimerbonpecexam'); - $this->bonpec = new Bonpec(); - $this->ged = new Ged(); - $this->demandepec = new Demandepec(); - $this->codePrestataire = $_SESSION['p_codePrestataireUtilisateur']; - } - public function index() { - $numeroDemande = $this->requete->getParametre("id"); - $msgErreur = ""; - $codeEtatBon = ""; - $montantTm = "0"; - - $demandepec = $this->demandepec->getDemandePecExam($numeroDemande); - $this->genererVue(array('demandepec' => $demandepec, 'msgErreur' => $msgErreur, 'codeEtatBon' => $codeEtatBon)); - } - - public function enregistredossier() { - if (isset($_POST['codePrestataire'])) - { - $numeroDemande = $this->requete->getParametre("numeroDemande"); - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - if($codeTypeBon=='1') // Bon pré-imprimé - { - $numeroBon = $this->requete->getParametre("numeroBon"); - - $this->bonpec->majBonAImprimer($numeroDemande, $numeroBon); - - $bonpec = $this->bonpec->imrimerBon($numeroBon); - $numeroBeneficiaire = $bonpec['numeroBeneficiaire']; - - // Création du bon à imprimer avec Fpdf - $pdf = new FPDF(); - $pdf->SetFont('Arial','BI',9); - $pdf->AddPage(); - $pdf->SetXY(30,22); - $pdf->Cell(45,8.5,dateheureFr($bonpec['dateCourante']),0,0,'L'); - - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroPolice'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,convertirc($bonpec['souscripteur']),0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,8.5,convertirc($bonpec['numeroAdherent']),0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,convertirc($bonpec['beneficiaire']),0,0,'L'); - $pdf->SetX(105); - $pdf->Cell(30,8.5,$bonpec['codeSexe'],0,1,'L'); - - $pdf->SetX(105); - $pdf->Cell(30,8.5,dateFr($bonpec['dateNaissance']),0,1,'L'); - - $pdf->SetXY(30,55); - $pdf->Cell(50,10,convertirc($bonpec['assure']),0,1,'L'); - - $pdf->SetXY(10,90); - // $pdf->Cell(10,10,$bonpec['codeActe'],0,0,'L'); - $pdf->Cell(10,10,$bonpec['codeActeVisible'],0,0,'L'); - - //$pdf->SetX(25); - //$pdf->Cell(20,10,format_N($bonpec['montantacte']),0,0,'L'); - - //$pdf->SetX(50); - //$pdf->Cell(20,10,format_N($bonpec['montantTm']),0,0,'L'); - - $pdf->SetXY(160,30); - $pdf->Cell(40,10,convertirc($bonpec['prestataire']),0,0,'C'); - - //$pdf->SetXY(160,47); - //$pdf->Cell(40,10,$bonpec['medecin'],0,0,'C'); - - $pdf->SetXY(165,70); - $pdf->Cell(22,5,'- Consultation ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Pharmacie ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Vaccins ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Soins ambul. ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Laboratoire ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Radio',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Hospit.',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - // Fin bon PDF - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_EXAM_SEP_NO_".$bonpec['numeroBon']."_".convertirc($bonpec['beneficiaire']).".pdf"; - $fichierBon=$bonpec['numeroBeneficiaire']."_".$bonpec['numeroBon']."_".$rand.".pdf"; - - $this->ged->ajouterBon($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret=""); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->bonpec->majfichierBon($numeroBon, $fichierBon); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - } - else // Bon sur feuille vierge - { - $demandepec = $this->demandepec->getDemandePecBonVierge($numeroDemande); - $numeroBeneficiaire = $demandepec['numeroBeneficiaire']; - - $codeSecret = uniqid(); - - $pdf = new Pdfaa(); - $pdf->SetMargins(25, 25, 25) ; - $pdf->SetFont('Arial','',15); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $pdf->SetFontSize(8); - $pdf->SetX(-50); - $pdf->Cell(30,7,convertirc('Numéro Dossier : '.$numeroDemande),1,1,'C',false); - $pdf->SetX(-50); - $pdf->Cell(30,7,$codeSecret,0,1,'C',false); - - //$pdf->SetXY(80,40); - //$pdf->SetY(40); - $pdf->SetFont('Arial','B',10); - $pdf->Cell(0,6,'CERTIFICAT DE PRISE EN CHARGE POUR EXAMENS SOUMIS A ENTENTE PREALABLE - ',0,1,'C',false); - - $pdf->SetFontSize(8); - - $pdf->Cell(0,6,'Date Prescription : '.dateFr($demandepec['dateDemande'])." ".$demandepec['heureDemande'],0,1,'C',false); - - $pdf->Ln(5); - - $lgcol1 = 60; - $lgcol2 = 100; - $ht=7; - - $pdf->SetFont(''); - - $pdf->Cell($lgcol1,$ht,'Souscripteur','LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['souscripteur']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,'Contrat','LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroPolice'],'LRB',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Assuré'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['assure']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Matricule'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroAdherent'],'LRB',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Patient'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['beneficiaire']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Matricule'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroBeneficiaire'],'LR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Né(e) le'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,dateFr($demandepec['dateNaissance']),'LR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Sexe'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['codeSexe'],'LRB',1,'C',false); - - $pdf->Ln(10); - - $pdf->Cell($lgcol1,$ht,convertirc('Etatblissement destinataire'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['prestataire']),'LTR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Médecin prescripteur'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['prescripteur']),'LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Examen demandé'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['acte']),'LRB',1,'C',false); - - $pdf->Ln(10); - - $pdf->Cell($lgcol1,$ht,convertirc('Montant négocié'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,"",'LTR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Taux de PEC'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,"100%",'LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Date de la PEC'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,dateFr($demandepec['dateReponse'])." ".$demandepec['heureReponse'],'LRB',1,'C',false); - - $pdf->Ln(5); - $pdf->Cell(0,0,convertirc('NB : A joindre à la facture définitive pour le remboursement !'),'0',0,'C',false); - - $pdf->SetY(-65); - $pdf->Cell(50,6,'Pour Afrik Assur',0,0,'L',false); - $pdf->Cell(50,6,'Signature patient',0,0,'C',false); - $pdf->Cell(50,6,'Pour le prestataire',0,1,'R',false); - - // $pdf->Image('Bootstrap/images/tempon_medecin.jpg',25,25,30,0,'','http://www.afrikassur.com'); - $pdf->Image('Bootstrap/images/tempon_medecin.jpg'); - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_EXAM_SEP_VIERGE_".$numeroDemande."_".convertirc($demandepec['beneficiaire']).".pdf"; - $fichierBon=$demandepec['numeroBeneficiaire']."_EXAM_VIERGE_".$rand.".pdf"; - - $this->ged->ajouterBonVierge($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->demandepec->majfichierBonVierge($numeroDemande, $fichierBon, $codeSecret); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - - // $this->executerAction("index"); - } - } - else - { - $this->rediriger("/"); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurImprimerbonpechosp.php b/extranet/Controleur/ControleurImprimerbonpechosp.php deleted file mode 100644 index b003e4f..0000000 --- a/extranet/Controleur/ControleurImprimerbonpechosp.php +++ /dev/null @@ -1,255 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Imprimerbonpechosp'); - $this->bonpec = new Bonpec(); - $this->ged = new Ged(); - $this->demandepec = new Demandepec(); - $this->codePrestataire = $_SESSION['p_codePrestataireUtilisateur']; - } - public function index() { - $numeroDemande = $this->requete->getParametre("id"); - $msgErreur = ""; - $codeEtatBon = ""; - $montantTm = "0"; - - $demandepec = $this->demandepec->getDemandePecExam($numeroDemande); - $this->genererVue(array('demandepec' => $demandepec, 'msgErreur' => $msgErreur, 'codeEtatBon' => $codeEtatBon)); - } - - public function enregistredossier() { - if (isset($_POST['codePrestataire'])) - { - $numeroDemande = $this->requete->getParametre("numeroDemande"); - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - if($codeTypeBon=='1') // Bon pré-imprimé - { - $numeroBon = $this->requete->getParametre("numeroBon"); - - $this->bonpec->majBonAImprimer($numeroDemande, $numeroBon); - - $bonpec = $this->bonpec->imrimerBon($numeroBon); - $numeroBeneficiaire = $bonpec['numeroBeneficiaire']; - - // Création du bon à imprimer avec Fpdf - $pdf = new FPDF(); - $pdf->SetFont('Arial','BI',9); - $pdf->AddPage(); - $pdf->SetXY(30,22); - $pdf->Cell(45,8.5,dateheureFr($bonpec['dateCourante']),0,0,'L'); - - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroPolice'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,convertirc($bonpec['souscripteur']),0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroAdherent'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,convertirc($bonpec['beneficiaire']),0,0,'L'); - $pdf->SetX(105); - $pdf->Cell(30,8.5,$bonpec['codeSexe'],0,1,'L'); - - $pdf->SetX(105); - $pdf->Cell(30,8.5,dateFr($bonpec['dateNaissance']),0,1,'L'); - - $pdf->SetXY(30,55); - $pdf->Cell(50,10,convertirc($bonpec['assure']),0,1,'L'); - - $pdf->SetXY(10,90); - //$pdf->Cell(10,10,$bonpec['codeActe'],0,0,'L'); - $pdf->Cell(10,10,$bonpec['codeActeVisible'],0,0,'L'); - - $pdf->Cell(20,10,$bonpec['dureeHospitAccordee'].' Jours',0,0,'L'); - - //$pdf->SetX(50); - //$pdf->Cell(20,10,format_N($bonpec['montantTm']),0,0,'L'); - - $pdf->SetXY(160,30); - $pdf->Cell(40,10,convertirc($bonpec['prestataire']),0,0,'C'); - - //$pdf->SetXY(160,47); - //$pdf->Cell(40,10,$bonpec['medecin'],0,0,'C'); - - $pdf->SetXY(165,70); - $pdf->Cell(22,5,'- Consultation ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Pharmacie ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Vaccins ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Soins ambul. ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Laboratoire ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Radio',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Hospit.',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - // Fin bon PDF - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_HOSPIT_NO_".$bonpec['numeroBon']."_".convertirc($bonpec['beneficiaire']).".pdf"; - $fichierBon=$bonpec['numeroBeneficiaire']."_".$bonpec['numeroBon']."_".$rand.".pdf"; - - $this->ged->ajouterBon($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret=""); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->bonpec->majfichierBon($numeroBon, $fichierBon); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - } - else // Bon sur feuille vierge - { - $demandepec = $this->demandepec->getDemandePecBonVierge($numeroDemande); - $numeroBeneficiaire = $demandepec['numeroBeneficiaire']; - - $codeSecret = uniqid(); - - $pdf = new Pdfaa(); - $pdf->SetMargins(25, 25, 25) ; - $pdf->SetFont('Arial','',15); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $pdf->SetFontSize(8); - $pdf->SetX(-50); - $pdf->Cell(30,7,convertirc('Numéro Dossier : '.$numeroDemande),1,1,'C',false); - $pdf->SetX(-50); - $pdf->Cell(30,7,$codeSecret,0,1,'C',false); - - //$pdf->SetXY(80,40); - //$pdf->SetY(40); - $pdf->SetFont('Arial','B',10); - $pdf->Cell(0,6,'CERTIFICAT DE PRISE EN CHARGE HOSPITALISATION',0,1,'C',false); - - $pdf->SetFontSize(8); - - $pdf->Cell(0,6,'Date Prescription : '.dateFr($demandepec['dateDemande'])." ".$demandepec['heureDemande'],0,1,'C',false); - - $pdf->Ln(5); - - $lgcol1 = 60; - $lgcol2 = 100; - $ht=7; - - $pdf->SetFont(''); - - $pdf->Cell($lgcol1,$ht,'Souscripteur','LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['souscripteur']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,'Contrat','LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroPolice'],'LRB',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Assuré'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['assure']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Matricule'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroAdherent'],'LRB',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Patient'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['beneficiaire']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Matricule'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroBeneficiaire'],'LR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Né(e) le'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,dateFr($demandepec['dateNaissance']),'LR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Sexe'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['codeSexe'],'LRB',1,'C',false); - - $pdf->Ln(10); - - $pdf->Cell($lgcol1,$ht,convertirc('Etatblissement destinataire'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['prestataire']),'LTR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Médecin prescripteur'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['prescripteur']),'LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Durée demandée'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['dureeHospitDemandee'].' jours','LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Durée accordée'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['dureeHospitAccordee'].' jours','LRB',1,'C',false); - - $pdf->Ln(10); - - $pdf->Cell($lgcol1,$ht,convertirc('Montant négocié'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,"",'LTR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Taux de PEC'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,"100%",'LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Date de la PEC'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,dateFr($demandepec['dateReponse'])." ".$demandepec['heureReponse'],'LRB',1,'C',false); - - $pdf->Ln(5); - $pdf->Cell(0,0,convertirc('NB : A joindre à la facture définitive pour le remboursement !'),'0',0,'C',false); - - $pdf->SetY(-65); - $pdf->Cell(50,6,'Pour Afrik Assur',0,0,'L',false); - $pdf->Cell(50,6,'Signature patient',0,0,'C',false); - $pdf->Cell(50,6,'Pour le prestataire',0,1,'R',false); - - // $pdf->Image('Bootstrap/images/tempon_medecin.jpg',25,25,30,0,'','http://www.afrikassur.com'); - $pdf->Image('Bootstrap/images/tempon_medecin.jpg'); - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_HOSPIT_VIERGE_".$numeroDemande."_".convertirc($demandepec['beneficiaire']).".pdf"; - $fichierBon=$demandepec['numeroBeneficiaire']."_HOSPIT_VIERGE_".$rand.".pdf"; - - $this->ged->ajouterBonVierge($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->demandepec->majfichierBonVierge($numeroDemande, $fichierBon, $codeSecret); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - - // $this->executerAction("index"); - } - } - else - { - $this->rediriger("/"); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurImprimprolonghosp.php b/extranet/Controleur/ControleurImprimprolonghosp.php deleted file mode 100644 index 6d00e06..0000000 --- a/extranet/Controleur/ControleurImprimprolonghosp.php +++ /dev/null @@ -1,255 +0,0 @@ -menuvue = new Menuvueprofil(); - $this->menuvue->getMenuVue('Imprimprolonghosp'); - $this->bonpec = new Bonpec(); - $this->ged = new Ged(); - $this->demandepec = new Demandepec(); - $this->codePrestataire = $_SESSION['p_codePrestataireUtilisateur']; - } - public function index() { - $numeroDemande = $this->requete->getParametre("id"); - $msgErreur = ""; - $codeEtatBon = ""; - $montantTm = "0"; - - $demandepec = $this->demandepec->getDemandePecExam($numeroDemande); - $this->genererVue(array('demandepec' => $demandepec, 'msgErreur' => $msgErreur, 'codeEtatBon' => $codeEtatBon)); - } - - public function enregistredossier() { - if (isset($_POST['codePrestataire'])) - { - $numeroDemande = $this->requete->getParametre("numeroDemande"); - $codeTypeBon = $this->requete->getParametre("codeTypeBon"); - if($codeTypeBon=='1') // Bon pré-imprimé - { - $numeroBon = $this->requete->getParametre("numeroBon"); - - $this->bonpec->majBonAImprimer($numeroDemande, $numeroBon); - - $bonpec = $this->bonpec->imrimerBon($numeroBon); - $numeroBeneficiaire = $bonpec['numeroBeneficiaire']; - - // Création du bon à imprimer avec Fpdf - $pdf = new FPDF(); - $pdf->SetFont('Arial','BI',9); - $pdf->AddPage(); - $pdf->SetXY(30,22); - $pdf->Cell(45,8.5,dateheureFr($bonpec['dateCourante']),0,0,'L'); - - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroPolice'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,$bonpec['souscripteur'],0,0,'L'); - $pdf->SetX(125); - $pdf->Cell(45,8.5,$bonpec['numeroAdherent'],0,1,'L'); - - $pdf->SetX(30); - $pdf->Cell(40,8.5,$bonpec['beneficiaire'],0,0,'L'); - $pdf->SetX(105); - $pdf->Cell(30,8.5,$bonpec['codeSexe'],0,1,'L'); - - $pdf->SetX(105); - $pdf->Cell(30,8.5,dateFr($bonpec['dateNaissance']),0,1,'L'); - - $pdf->SetXY(30,55); - $pdf->Cell(50,10,$bonpec['assure'],0,1,'L'); - - $pdf->SetXY(10,90); - // $pdf->Cell(10,10,$bonpec['codeActe'],0,0,'L'); - $pdf->Cell(10,10,$bonpec['codeActeVisible'],0,0,'L'); - - $pdf->Cell(20,10,$bonpec['dureeHospitAccordee'].' Jours',0,0,'L'); - - //$pdf->SetX(50); - //$pdf->Cell(20,10,format_N($bonpec['montantTm']),0,0,'L'); - - $pdf->SetXY(160,30); - $pdf->Cell(40,10,$bonpec['prestataire'],0,0,'C'); - - //$pdf->SetXY(160,47); - //$pdf->Cell(40,10,$bonpec['medecin'],0,0,'C'); - - $pdf->SetXY(165,70); - $pdf->Cell(22,5,'- Consultation ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Pharmacie ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Vaccins ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Soins ambul. ',0,0,'L'); - $pdf->Cell(10,5,' : 80 %',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Laboratoire ',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Radio',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - $pdf->SetX(165); - $pdf->Cell(22,5,'- Hospit.',0,0,'L'); - $pdf->Cell(10,5,' : 100%',0,1,'L'); - - // Fin bon PDF - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "BON_PEC_PROL_HOSP_NO_".$bonpec['numeroBon']."_".$bonpec['beneficiaire'].".pdf"; - $fichierBon=$bonpec['numeroBeneficiaire']."_".$bonpec['numeroBon']."_".$rand.".pdf"; - - $this->ged->ajouterBon($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret=""); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->bonpec->majfichierBon($numeroBon, $fichierBon); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - } - else // Bon sur feuille vierge - { - $demandepec = $this->demandepec->getDemandePecBonVierge($numeroDemande); - $numeroBeneficiaire = $demandepec['numeroBeneficiaire']; - - $codeSecret = uniqid(); - - $pdf = new Pdfaa(); - $pdf->SetMargins(25, 25, 25) ; - $pdf->SetFont('Arial','',15); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $pdf->SetFontSize(8); - $pdf->SetX(-50); - $pdf->Cell(30,7,convertirc('Numéro Dossier : '.$numeroDemande),1,1,'C',false); - $pdf->SetX(-50); - $pdf->Cell(30,7,$codeSecret,0,1,'C',false); - - //$pdf->SetXY(80,40); - //$pdf->SetY(40); - $pdf->SetFont('Arial','B',10); - $pdf->Cell(0,6,'CERTIFICAT DE PROLONGATION D\'HOSPITALISATION',0,1,'C',false); - - $pdf->SetFontSize(8); - - $pdf->Cell(0,6,'Date Prescription : '.dateFr($demandepec['dateDemande'])." ".$demandepec['heureDemande'],0,1,'C',false); - - $pdf->Ln(5); - - $lgcol1 = 60; - $lgcol2 = 100; - $ht=7; - - $pdf->SetFont(''); - - $pdf->Cell($lgcol1,$ht,'Souscripteur','LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['souscripteur']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,'Contrat','LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['numeroPolice'],'LRB',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Assuré'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['assure']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Matricule'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['numeroAdherent']),'LRB',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Patient'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['beneficiaire']),'LTR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Matricule'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['numeroBeneficiaire']),'LR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Né(e) le'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,dateFr($demandepec['dateNaissance']),'LR',1,'C',false); - $pdf->Cell($lgcol1,$ht,convertirc('Sexe'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['codeSexe'],'LRB',1,'C',false); - - $pdf->Ln(10); - - $pdf->Cell($lgcol1,$ht,convertirc('Etatblissement destinataire'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['prestataire']),'LTR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Médecin prescripteur'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,convertirc($demandepec['prescripteur']),'LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Durée demandée'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['dureeHospitDemandee'].' jours','LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Durée accordée'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,$demandepec['dureeHospitAccordee'].' jours','LRB',1,'C',false); - - $pdf->Ln(10); - - $pdf->Cell($lgcol1,$ht,convertirc('Montant négocié'),'LTR',0,'C',false); - $pdf->Cell($lgcol2,$ht,"",'LTR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Taux de PEC'),'LR',0,'C',false); - $pdf->Cell($lgcol2,$ht,"100%",'LR',1,'C',false); - - $pdf->Cell($lgcol1,$ht,convertirc('Date de la PEC'),'LRB',0,'C',false); - $pdf->Cell($lgcol2,$ht,dateFr($demandepec['dateReponse'])." ".$demandepec['heureReponse'],'LRB',1,'C',false); - - $pdf->Ln(5); - $pdf->Cell(0,0,convertirc('NB : A joindre à la facture définitive pour le remboursement !'),'0',0,'C',false); - - $pdf->SetY(-65); - $pdf->Cell(50,6,'Pour Afrik Assur',0,0,'L',false); - $pdf->Cell(50,6,'Signature patient',0,0,'C',false); - $pdf->Cell(50,6,'Pour le prestataire',0,1,'R',false); - - // $pdf->Image('Bootstrap/images/tempon_medecin.jpg',25,25,30,0,'','http://www.afrikassur.com'); - $pdf->Image('Bootstrap/images/tempon_medecin.jpg'); - - $fichierBon_C = ""; - $rand = rand(1,1000000); - $downloaded = "PROLONG_HOSPIT_VIERGE_".$numeroDemande."_".$demandepec['beneficiaire'].".pdf"; - $fichierBon=$demandepec['numeroBeneficiaire']."_PROLONG_HOSPIT_VIERGE_".$rand.".pdf"; - - $this->ged->ajouterBonVierge($numeroBeneficiaire, $fichierBon, $downloaded, $accesAssure="1", - $accesPrestataire="1", $accesPartenaire="1", $accesMedecin="1", $accesCompagnie="1", $accesProducteur="1", - $accesGestionnaire="1", $fichierBon, $codeSecret); - - $fichierBon="Bons/".$fichierBon; - $pdf->Output($fichierBon,"F"); - $fichierBon_C = $fichierBon; - - $this->demandepec->majfichierBonVierge($numeroDemande, $fichierBon, $codeSecret); - - header("Content-type:application/pdf"); - header("Content-Disposition:attachment;filename=".$downloaded.""); - readfile($fichierBon); - - // $this->executerAction("index"); - } - } - else - { - $this->rediriger("/"); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurInfossassureur.php b/extranet/Controleur/ControleurInfossassureur.php deleted file mode 100644 index 3164efd..0000000 --- a/extranet/Controleur/ControleurInfossassureur.php +++ /dev/null @@ -1,25 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Infossassureur'); - - $this->societeuser = new Societeuser(); - } - - public function index() - { - $codeSociete = $_SESSION['p_codeSociete']; - - $infossassureurs = $this->societeuser->getinfossassureurs($codeSociete); - - $this->genererVue(array('infossassureurs' => $infossassureurs)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurInitconsultation.php b/extranet/Controleur/ControleurInitconsultation.php deleted file mode 100644 index 0f8193f..0000000 --- a/extranet/Controleur/ControleurInitconsultation.php +++ /dev/null @@ -1,40 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Initconsultation'); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypePrestation = "CONS"; - - $this->acte = new Detailtarifacte(); - $this->bonpec = new Bonpec(); - } - public function index() - { - $codeTypePrestation = "CONS"; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "CONS"; - - $nbBonsCons = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $_SESSION['p_okId'] = "1"; - $_SESSION['p_okId_face'] = "1"; - - $this->acte->settmtypeprestation($codeTypePrestation); - - $this->genererVue(array('nbBonsCons' => $nbBonsCons, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } - - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurInitdemandedecompte.php b/extranet/Controleur/ControleurInitdemandedecompte.php deleted file mode 100644 index 471ed08..0000000 --- a/extranet/Controleur/ControleurInitdemandedecompte.php +++ /dev/null @@ -1,22 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Initdemandedecompte'); - - $this->periode = (new Periode)->getListe(); - $this->exercice = (new Exercice())->getListe(); - } - public function index() { - $this->genererVue(array('periode' => $this->periode, 'exercice' => $this->exercice)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurKine.php b/extranet/Controleur/ControleurKine.php deleted file mode 100644 index f863ffc..0000000 --- a/extranet/Controleur/ControleurKine.php +++ /dev/null @@ -1,101 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Kine'); - - $this->prescription = new Seance_temp(); - $this->detailprescription = new Detailseance(); - - $this->prestation = new Prestationactes(); - - $this->beneficiaire = new Beneficiaire(); - $this->bonpec = new Bonpec(); - - viderContexte(); - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "SEA"; - } - - public function index() - { - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeTypeBon = "CONS"; - - $nbBonsCons = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $numeroBonKine = $_SESSION['p_numeroBonKine_C']; - $_SESSION['p_numeroBonSeance_C'] = "-1"; - - if($numeroBonKine=="-1") - { - $this->genererVue(array('nbBonsCons' => $nbBonsCons, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } - else - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceSea($numeroBonKine); - $_SESSION['p_hospitalisation_C'] = $resultat['hospitalisation']; - $idBeneficiaire = $resultat['idBeneficiaire']; - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $this->prescription->initseancekine_sea($codeGestionBon); - - $prescription = $this->prescription->getprescription_sea($numeroBonKine); - - $detailseances = $this->detailprescription->getdetailseancefeuille(); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $facture = $prescription['facture']; - $nbRestantOld = $prescription['nbRestantOld']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($nbRestantOld>0) - { - $this->prestation->init_garantieadherent_temp_simple($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - $this->genererVue(array('prescription' => $prescription, 'detailseances' => $detailseances, - 'nbBonsCons' => $nbBonsCons, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon, - 'limite_beneficiaire' => $limite_beneficiaire)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurKinecons.php b/extranet/Controleur/ControleurKinecons.php deleted file mode 100644 index 1d6589f..0000000 --- a/extranet/Controleur/ControleurKinecons.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Kinecons'); - - $this->facture_kine = new Seance(); - } - - public function index() - { - $idFacture = $_SESSION['p_idFacture_C']; - - $prescription = $this->facture_kine->getprescription_sea($idFacture); - - $detaillivres = $this->facture_kine->getdetailprescription_sea($idFacture); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurKineconsben.php b/extranet/Controleur/ControleurKineconsben.php deleted file mode 100644 index aa7c1d5..0000000 --- a/extranet/Controleur/ControleurKineconsben.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Kineconsben'); - - $this->facture_kine = new Seance(); - } - - public function index() - { - $idFacture = $_SESSION['p_idFacture_C']; - - $prescription = $this->facture_kine->getprescription_sea($idFacture); - - $detaillivres = $this->facture_kine->getdetailprescription_sea($idFacture); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurKinecso.php b/extranet/Controleur/ControleurKinecso.php deleted file mode 100644 index 5fcb14d..0000000 --- a/extranet/Controleur/ControleurKinecso.php +++ /dev/null @@ -1,219 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Kinecso'); - - $this->prescription = new Seance_temp(); - $this->detailprescription = new Detailseance(); - $this->prestation = new Prestationactes(); - - $this->beneficiaire = new Beneficiaire(); - $this->bonpec = new Bonpec(); - - viderContexte(); - - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "SEACSO"; - } - - public function index() - { - $faceRegistered = '0'; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeTypeBon = "CONS"; - - $nbBonsCons = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $numeroBonKine = $_SESSION['p_numeroBonKine_C']; - $numeroBonKineSearch = $numeroBonKine; - - $_SESSION['p_numeroBonSeance_C'] = "-1"; - - if($numeroBonKine=="-1") - { - $this->genererVue(array('numeroBonKineSearch' => $numeroBonKineSearch, - 'nbBonsCons' => $nbBonsCons, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } - else - { - $numeroBonKineSearch = $numeroBonKine; - - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceSea($numeroBonKine); - $_SESSION['p_hospitalisation_C'] = $resultat['hospitalisation']; - $idBeneficiaire = $resultat['idBeneficiaire']; - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - $faceRegistered = $beneficiaire['faceRegistered']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $this->prescription->initseancekine_sea($codeGestionBon); - - $prescription = $this->prescription->getprescription_sea($numeroBonKine); - - $detailseances = $this->detailprescription->getdetailseancefeuille(); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $facture = $prescription['facture']; - $nbRestantOld = $prescription['nbRestantOld']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($nbRestantOld>0) - { - $this->prestation->init_garantieadherent_temp_simple($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - $this->genererVue(array('prescription' => $prescription, 'detailseances' => $detailseances, - 'numeroBonKineSearch' => $numeroBonKineSearch, 'nbBonsCons' => $nbBonsCons, - 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon, - 'limite_beneficiaire' => $limite_beneficiaire, 'faceRegistered' => $faceRegistered)); - } - } - - public function confirmerface() - { - $_SESSION['p_messageFace'] = ""; - $compare_face = $_POST['compare_face']; - - if(isset($_POST['image_face'])) - { - $_SESSION['p_okId_face'] = "-1"; - $_SESSION['p_okId'] = "-1"; - - $path = "Temp/"; - $extension = "jpeg"; - - $data = $_POST['image_face']; - - $data = str_replace('data:image/jpeg;base64,', '', $data); - - $data = base64_decode($data); - - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $date = date('YmdHis'); - $file_name = "img_v_".$date.uniqid().".".$extension; - $chemin = $path.$file_name; - - file_put_contents($chemin, $data); - - $rand = rand(1,1000000); - $nomImage = $username."_".$rand.'.'. $extension; - - $this->beneficiaire->init_traiterlaface('2'); - - $arrgs = [ - 'credentials' => [ - 'key' => 'AKIA2O2PTXQ7XN5OATO3', - 'secret' => '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', - ], - 'version' => 'latest', - 'region' => 'us-west-2' - ]; - - $client = new RekognitionClient($arrgs); - - $sourceImage = $chemin; - $targetImage = $_SESSION['p_dossierPhoto_C'].$_SESSION['p_dossierSociete'].'/Photos/'.$_SESSION['p_lienPhoto_C']; - - try - { - $result = $client->compareFaces - ( - [ - 'SimilarityThreshold' => 80, - 'SourceImage' => [ - 'Bytes' => file_get_contents($sourceImage) - ], - 'TargetImage' => [ - 'Bytes' => file_get_contents($targetImage) - ], - ] - ); - - $faceMatches = count($result['FaceMatches']); - - if ($faceMatches==0) - { - $_SESSION['p_messageFace'] = "Les faces ne correspondent pas! / The faces do not match!"; - $this->beneficiaire->resultat_traitement_face($username, '0', $_SESSION['p_messageFace']); - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "0")); - } - else - { - $this->beneficiaire->resultat_traitement_face($username, '1', ''); - - $_SESSION['p_okId_face'] = "1"; - $_SESSION['p_messageFace'] = "Face confirmée! / Face confirmed!"; - - /* - var_dump - ( - array - ( - "p_okId_face" => $_SESSION['p_okId_face'], - "p_messageFace" => $_SESSION['p_messageFace'], - ) - ); - exit(); - */ - - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "1")); - } - } - catch (Exception $e) - { - // echo 'Message: ' .$e->getMessage(); - // exit(); - $msgErreur = $e->getMessage(); - $_SESSION['p_messageFace'] = "Un problème lors du traitement! / A problem during treatment!"; - - $this->beneficiaire->resultat_traitement_face($username, '9', $msgErreur); - - $this->genererVueAjax(array('messageFace' => $_SESSION['p_messageFace'], 'msgErreur' => $_SESSION['p_messageFace'], 'photo_succes' => "0")); - } - } - unlink($chemin); - } - -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurLaboratoire.php b/extranet/Controleur/ControleurLaboratoire.php deleted file mode 100644 index 555dda9..0000000 --- a/extranet/Controleur/ControleurLaboratoire.php +++ /dev/null @@ -1,97 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Laboratoire'); - - $this->prescription = new Examen_temp(); - $this->detailprescription = new Detailexamem(); - $this->prestation = new Prestationactes(); - - $this->beneficiaire = new Beneficiaire(); - viderContexte(); - - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "LAB"; - } - - public function index() - { - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonExamen = $_SESSION['p_numeroBonExamen_C']; - - if($numeroBonExamen=="-1") - { - $this->genererVue(); - } - else - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceLab($numeroBonExamen); - $_SESSION['p_hospitalisation_C'] = $resultat['hospitalisation']; - $idBeneficiaire = $resultat['idBeneficiaire']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $this->prescription->initexamen_lab($numeroBonExamen); - - $numeroExamen = $_SESSION['p_numeroExamen_C']; - - $prescription = $this->prescription->getprescription_lab($numeroBonExamen); - - $detailprescriptions = $this->detailprescription->getdetailprescription_lab($numeroBonExamen); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $facture = $prescription['facture']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - $numeroExamen = $prescription['numeroExamen']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($facture==0) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_lab($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - $factures = $this->prescription->getfactures_examen($numeroBonExamen); - $factures_toal = $this->prescription->getfactures_total_examen($numeroBonExamen); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, - 'factures' => $factures, 'factures_toal' => $factures_toal, 'limite_beneficiaire' => $limite_beneficiaire)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurLaboratoirecons.php b/extranet/Controleur/ControleurLaboratoirecons.php deleted file mode 100644 index 34cf1fc..0000000 --- a/extranet/Controleur/ControleurLaboratoirecons.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Laboratoirecons'); - - $this->facture_labo = new Examen(); - } - - public function index() - { - $numeroBonExamen = $_SESSION['p_numeroBonExamen_C']; - $codePrestataireLivraison = $_SESSION['p_codePrestataireLivraison_C']; - - $prescription = $this->facture_labo->getprescription_lab($numeroBonExamen, $codePrestataireLivraison); - - $detaillivres = $this->facture_labo->getdetailprescription_lab($numeroBonExamen, $codePrestataireLivraison); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurLaboratoireconsben.php b/extranet/Controleur/ControleurLaboratoireconsben.php deleted file mode 100644 index d72356a..0000000 --- a/extranet/Controleur/ControleurLaboratoireconsben.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Laboratoireconsben'); - - $this->facture_labo = new Examen(); - } - - public function index() - { - $numeroBonExamen = $_SESSION['p_numeroBonExamen_C']; - $codePrestataireLivraison = $_SESSION['p_codePrestataireLivraison_C']; - - $prescription = $this->facture_labo->getprescription_lab($numeroBonExamen, $codePrestataireLivraison); - - $detaillivres = $this->facture_labo->getdetailprescription_lab($numeroBonExamen, $codePrestataireLivraison); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurLaboratoirecso.php b/extranet/Controleur/ControleurLaboratoirecso.php deleted file mode 100644 index 092ce4c..0000000 --- a/extranet/Controleur/ControleurLaboratoirecso.php +++ /dev/null @@ -1,98 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Laboratoirecso'); - - $this->prescription = new Examen_temp(); - $this->detailprescription = new Detailexamem(); - $this->prestation = new Prestationactes(); - - $this->beneficiaire = new Beneficiaire(); - viderContexte(); - - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "LABCSO"; - } - - public function index() - { - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonExamen = $_SESSION['p_numeroBonExamen_C']; - - if($numeroBonExamen=="-1") - { - $this->genererVue(); - } - else - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceLabCsoExt($numeroBonExamen); - $_SESSION['p_hospitalisation_C'] = $resultat['hospitalisation']; - $idBeneficiaire = $resultat['idBeneficiaire']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $this->prescription->initexamen_lab_cso_ext($numeroBonExamen); - - $numeroExamen = $_SESSION['p_numeroExamen_C']; - - $prescription = $this->prescription->getprescription_lab($numeroBonExamen); - - $detailprescriptions = $this->detailprescription->getdetailprescription_lab($numeroBonExamen); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $facture = $prescription['facture']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - $numeroExamen = $prescription['numeroExamen']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($facture==0) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_lab($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - $factures = $this->prescription->getfactures_examen($numeroBonExamen); - $factures_toal = $this->prescription->getfactures_total_examen($numeroBonExamen); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, - 'factures' => $factures, 'factures_toal' => $factures_toal, 'limite_beneficiaire' => $limite_beneficiaire)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurListedecomptes.php b/extranet/Controleur/ControleurListedecomptes.php deleted file mode 100644 index fa227df..0000000 --- a/extranet/Controleur/ControleurListedecomptes.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Listedecomptes'); - - $this->periode = (new Periode)->getListe(); - $this->exercice = (new Exercice())->getListe(); - $this->etatdecompte = (new Etatdecompte())->getListe(); - } - - public function index() - { - $this->genererVue(array('periode' => $this->periode, 'exercice' => $this->exercice, 'etatdecompte' => $this->etatdecompte)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurListedemandebon.php b/extranet/Controleur/ControleurListedemandebon.php deleted file mode 100644 index 75c3f2c..0000000 --- a/extranet/Controleur/ControleurListedemandebon.php +++ /dev/null @@ -1,19 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Listedemandebon"); - - $this->typebon = (new Typebon())->getListe(); - } - - public function index() - { - $this->genererVue(array('typebon' => $this->typebon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurListederogations.php b/extranet/Controleur/ControleurListederogations.php deleted file mode 100644 index d3bfeeb..0000000 --- a/extranet/Controleur/ControleurListederogations.php +++ /dev/null @@ -1,30 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Listederogations'); - - $this->derogation = new Derogation(); - } - - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - /* - $d1 = $_SESSION['p_dUneSemaineAvant_C']; - $d2 = date('Y-m-d'); - */ - $d1 = $_SESSION['p_d1_C']; - $d2 = $_SESSION['p_d2_C']; - - $derogations = $this->derogation->getderogations($codePrestataire, $idBeneficiaire, $d1, $d2); - - $this->genererVue(array('derogations' => $derogations)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurListeententeprealables.php b/extranet/Controleur/ControleurListeententeprealables.php deleted file mode 100644 index 32e502f..0000000 --- a/extranet/Controleur/ControleurListeententeprealables.php +++ /dev/null @@ -1,23 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Listeententeprealables'); - - $this->ententeprealable = new Ententeprealable(); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $ententeprealables = $this->ententeprealable->getEntenteprealablesFeuilleMaladie($numeroFeuilleMaladie); - - $this->genererVue(array('ententeprealables' => $ententeprealables)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurListeexclusions.php b/extranet/Controleur/ControleurListeexclusions.php deleted file mode 100644 index d605943..0000000 --- a/extranet/Controleur/ControleurListeexclusions.php +++ /dev/null @@ -1,23 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Listeexclusions'); - - $this->ententeprealable = new Ententeprealable(); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $ententeprealables = $this->ententeprealable->getActesExclusFeuilleMaladie($numeroFeuilleMaladie); - - $this->genererVue(array('ententeprealables' => $ententeprealables)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurListegenererbon.php b/extranet/Controleur/ControleurListegenererbon.php deleted file mode 100644 index bf4c29c..0000000 --- a/extranet/Controleur/ControleurListegenererbon.php +++ /dev/null @@ -1,19 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Listegenererbon'); - - $this->typebon = (new Typebon())->getListe(); - } - - public function index() - { - $this->genererVue(array('typebon' => $this->typebon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurMedecinsprestataire.php b/extranet/Controleur/ControleurMedecinsprestataire.php deleted file mode 100644 index c0e0b57..0000000 --- a/extranet/Controleur/ControleurMedecinsprestataire.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Medecinsprestataire"); - - $this->prestataire = new Prestataire(); - - $_SESSION['p_modeDevis'] = "0"; - } - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $prestataire = $this->prestataire->getunprestatairebycode($codePrestataire); - - $medecins = $this->prestataire->getmedecinsprestataire($codePrestataire); - - $this->genererVue(array('prestataire' => $prestataire, 'medecins' => $medecins)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurMessagerie.php b/extranet/Controleur/ControleurMessagerie.php deleted file mode 100644 index 6dd12a3..0000000 --- a/extranet/Controleur/ControleurMessagerie.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Messagerie'); - - $this->ouinonlu = (new Ouinon())->getListe(); - } - - public function index() - { - $this->genererVue(array('ouinonlu' => $this->ouinonlu)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurModifierpolice.php b/extranet/Controleur/ControleurModifierpolice.php deleted file mode 100644 index f615942..0000000 --- a/extranet/Controleur/ControleurModifierpolice.php +++ /dev/null @@ -1,50 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Modifierpolice"); - - $this->police = new Police(); - $this->apporteur = (new Apporteur())->getListe(); - $this->rachattm = (new Rachattm())->getListe(); - - } - public function index() { - // $id = $this->requete->getParametre("id"); - $id = $_SESSION['p_idPolice_C']; - $this->police->getContextePoliceId($id); - $police = $this->police->getPoliceId($id); - - $this->genererVue(array('police' => $police, 'apporteur' => $this->apporteur, 'rachattm' => $this->rachattm)); - } - - public function modifier() - { - // $id = $this->requete->getParametre("id"); - $id = $_SESSION['p_idPolice_C']; - $tauxCommission = $this->requete->getParametreFormulaire("tauxCommission","numerique"); - $primeFamille = $this->requete->getParametreFormulaire("primeFamille","numerique"); - $primeBeneficiaire = $this->requete->getParametreFormulaire("primeBeneficiaire","numerique"); - - $codeApporteur = $this->requete->getParametreFormulaire("codeApporteur"); - $rachatTm = $this->requete->getParametreFormulaire("rachatTm"); - - $this->police->modifier($id, $tauxCommission, $primeFamille, $primeBeneficiaire, $codeApporteur, $rachatTm); - - $idPolice = $id; - $this->police->getContexteAjaxPolice($idPolice); - - $this->rediriger("Fichepolice"); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurMonture.php b/extranet/Controleur/ControleurMonture.php deleted file mode 100644 index 37583d5..0000000 --- a/extranet/Controleur/ControleurMonture.php +++ /dev/null @@ -1,57 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Monture'); - - $this->prescription = new Optique_temp(); - - $this->beneficiaire = new Beneficiaire(); - $this->prestation = new Prestationactes(); - - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "MON"; - } - - public function index() - { - $_SESSION['p_nbActesVerres'] = "0"; - $_SESSION['p_nbActesMonture'] = "0"; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $this->prescription->initmonture(); - - $prescription = $this->prescription->getmonture_temp(); - - $detaillivres = $this->prescription->getdetailmonture_temp(); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $garantieadherent_temp = $this->prescription->afficher_garantieadherent_temp_monture(); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTempMonture(); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres, - 'garantieadherent_temp' => $garantieadherent_temp, 'limite_beneficiaire' => $limite_beneficiaire)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurMoritio.php b/extranet/Controleur/ControleurMoritio.php deleted file mode 100644 index 1e51a50..0000000 --- a/extranet/Controleur/ControleurMoritio.php +++ /dev/null @@ -1,50 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Notesbeneficiaire'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurNotesfeuillemaladie.php b/extranet/Controleur/ControleurNotesfeuillemaladie.php deleted file mode 100644 index cb5b887..0000000 --- a/extranet/Controleur/ControleurNotesfeuillemaladie.php +++ /dev/null @@ -1,16 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Notesfeuillemaladie'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurOpticien.php b/extranet/Controleur/ControleurOpticien.php deleted file mode 100644 index 9503bb6..0000000 --- a/extranet/Controleur/ControleurOpticien.php +++ /dev/null @@ -1,116 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Opticien'); - - $this->prescription = new Optique_temp(); - $this->detailprescription = new Detailoptique(); - $this->prestation = new Prestationactes(); - $this->acte = new Detailtarifoptique(); - - $this->beneficiaire = new Beneficiaire(); - - if ($_SESSION['p_codeProfil_C']=="OPT") - { - viderContexte(); - } - - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "OPT"; - } - - public function index() - { - $_SESSION['p_nbActesVerres'] = "0"; - $_SESSION['p_nbActesMonture'] = "0"; - - /* - // $id0 = $this->requete->getParametre("id"); - // $id0 = $this->requete->getParametreFormulaire("id", "numerique"); - - if($id0=="0") - { - // throw new Exception("id0 : ".$id0); - $_SESSION['p_numeroBonOptique_C'] = "-1"; - } - */ - - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonOptique = $_SESSION['p_numeroBonOptique_C']; - - if($numeroBonOptique=="-1" or $numeroBonOptique=="0") - { - $this->genererVue(array('nbActesVerres' => 0)); - } - else - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceOpt($numeroBonOptique); - $idBeneficiaire = $resultat['idBeneficiaire']; - $_SESSION['p_hospitalisation_C'] = $resultat['hospitalisation']; - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $this->prescription->initoptique_opt(); - - $numeroOptique = $_SESSION['p_numeroOptique_C']; - - $prescription = $this->prescription->getoptique_opt($numeroBonOptique); - - $detailprescriptions = $this->detailprescription->getdetailoptique_opt($numeroBonOptique); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivre(); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $idPrestationactes = $prescription['idPrestationactes']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - $numeroOptique = $prescription['numeroOptique']; - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($idPrestationactes==0) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_opt($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - $acte = $this->acte->getverrespossibles(); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, - 'acte' => $acte, 'limite_beneficiaire' => $limite_beneficiaire)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurOpticiencons.php b/extranet/Controleur/ControleurOpticiencons.php deleted file mode 100644 index 01214d0..0000000 --- a/extranet/Controleur/ControleurOpticiencons.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Opticiencons'); - - $this->facture_optique = new Optique(); - } - - public function index() - { - $idFacture = $_SESSION['p_idFacture_C']; - - $prescription = $this->facture_optique->get_facture_optique($idFacture); - - $detaillivres = $this->facture_optique->getdetail_facture_optique($idFacture); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurOpticienconsben.php b/extranet/Controleur/ControleurOpticienconsben.php deleted file mode 100644 index b71b9a1..0000000 --- a/extranet/Controleur/ControleurOpticienconsben.php +++ /dev/null @@ -1,26 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Opticienconsben'); - - $this->facture_optique = new Optique(); - } - - public function index() - { - $idFacture = $_SESSION['p_idFacture_C']; - - $prescription = $this->facture_optique->get_facture_optique($idFacture); - - $detaillivres = $this->facture_optique->getdetail_facture_optique($idFacture); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurOptique.php b/extranet/Controleur/ControleurOptique.php deleted file mode 100644 index cdc8a33..0000000 --- a/extranet/Controleur/ControleurOptique.php +++ /dev/null @@ -1,49 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Optique'); - - $this->optique = new Optique_temp(); - $this->detailoptique = new Detailoptique(); - - $this->acte = new Detailtarifoptique(); - $this->bonpec = new Bonpec(); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "OPTQ"; - - $nbBonsOrd = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $this->optique->initoptique_cso(); - $optique = $this->optique->getoptiquetemp(); - - $acte = $this->acte->getverrespossiblesprescription(); - - $detailoptiques = $this->detailoptique->getdetailoptiquefeuille(); - $nbVerres_0 = count($detailoptiques); - - $this->genererVue(array('optique' => $optique, 'detailoptiques' => $detailoptiques, 'acte' => $acte, 'nbVerres_0' => $nbVerres_0, - 'nbBonsOrd' => $nbBonsOrd, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurOptiquecons.php b/extranet/Controleur/ControleurOptiquecons.php deleted file mode 100644 index c0349bc..0000000 --- a/extranet/Controleur/ControleurOptiquecons.php +++ /dev/null @@ -1,29 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Optiquecons'); - - $this->optique = new Optique(); - $this->detailoptique = new Detailoptique(); - } - - public function index() - { - $numeroOptique = $_SESSION['p_numeroOptique_C']; - - $optique = $this->optique->getoptique($numeroOptique); - - $detailoptiques = $this->detailoptique->getdetailoptique($numeroOptique); - - $this->genererVue(array('optique' => $optique, 'detailoptiques' => $detailoptiques)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurOptiqueconsben.php b/extranet/Controleur/ControleurOptiqueconsben.php deleted file mode 100644 index 847dce0..0000000 --- a/extranet/Controleur/ControleurOptiqueconsben.php +++ /dev/null @@ -1,29 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Optiqueconsben'); - - $this->optique = new Optique(); - $this->detailoptique = new Detailoptique(); - } - - public function index() - { - $numeroOptique = $_SESSION['p_numeroOptique_C']; - - $optique = $this->optique->getoptique($numeroOptique); - - $detailoptiques = $this->detailoptique->getdetailoptique($numeroOptique); - - $this->genererVue(array('optique' => $optique, 'detailoptiques' => $detailoptiques)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurParambons.php b/extranet/Controleur/ControleurParambons.php deleted file mode 100644 index a58a107..0000000 --- a/extranet/Controleur/ControleurParambons.php +++ /dev/null @@ -1,22 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Parambons'); - - $this->typebon = new Typebon(); - } - public function index() - { - $typebons = $this->typebon->getTypebonParam(); - - $this->genererVue(array('typebons' => $typebons)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPharmacie.php b/extranet/Controleur/ControleurPharmacie.php deleted file mode 100644 index 0837816..0000000 --- a/extranet/Controleur/ControleurPharmacie.php +++ /dev/null @@ -1,37 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Pharmacie'); - - $this->prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - } - - public function index() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $this->prescription->initpharmacie_cso(); - - $prescription = $this->prescription->getprescription(); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - // $detaillivres = $this->prescription->getdetaillivre(); - $detaillivres = $this->prescription->getdetaillivrecso(); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPharmacien.php b/extranet/Controleur/ControleurPharmacien.php deleted file mode 100644 index 9f71206..0000000 --- a/extranet/Controleur/ControleurPharmacien.php +++ /dev/null @@ -1,113 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Pharmacien'); - - $this->prescription = new Prescription_temp(); - $this->detailprescription = new Detailprescription(); - $this->prestation = new Prestationactes(); - $this->ged = new Ged(); - - $this->beneficiaire = new Beneficiaire(); - - if ($_SESSION['p_codeProfil_C']=="PHA") - { - viderContexte(); - } - - $_SESSION['p_okId'] = "-1"; - - $this->finger = new Finger(); - - $_SESSION['p_codeTypeFacture_C'] = "PHAR"; - } - - public function index() - { - $garantieadherent_temp = null; - $limite_beneficiaire = null; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - - if($numeroBonOrdonnance=="-1" or $numeroBonOrdonnance=="0") - { - $this->genererVue(); - } - else - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnancePha($numeroBonOrdonnance); - - $_SESSION['p_hospitalisation_C'] = $resultat['hospitalisation']; - - $idBeneficiaire = $resultat['idBeneficiaire']; - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $this->prescription->initpharmacie_pha($numeroBonOrdonnance); - - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription_pha($numeroBonOrdonnance); - - $detailprescriptions = $this->detailprescription->getdetailprescription_pha($numeroBonOrdonnance); - - $detailnonlivres = $this->prescription->getdetailnonlivre(); - - $detaillivres = $this->prescription->getdetaillivrepha(); - - $factures = $this->prescription->getfactures_ordonnance($numeroBonOrdonnance); - $factures_toal = $this->prescription->getfactures_total_ordonnance($numeroBonOrdonnance); - - $user_id = $_SESSION['p_user_id_C']; - $this->finger->vider_finger_temp($user_id); - - $idPrestationactes = $prescription['idPrestationactes']; - $remplace = $prescription['remplace']; - $numeroRemplace = $prescription['numeroRemplace']; - $numeroFeuilleMaladie = $prescription['numeroFeuilleMaladie']; - $numeroPrescription = $prescription['numeroPrescription']; - - $facturable=($numeroRemplace != $numeroBonOrdonnance); - - $this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire); - - if($facturable) - { - $garantieadherent_temp = $this->prestation->init_garantieadherent_temp_pha($numeroFeuilleMaladie, $codePrestataire); - - $this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire); - - $limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp(); - } - - unset($_FILES['fichier_upload']); - $geds = $this->ged->getgedpharmacie(); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, 'detailnonlivres' => $detailnonlivres, - 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp, 'factures' => $factures, 'factures_toal' => $factures_toal, - 'geds' => $geds, 'limite_beneficiaire' => $limite_beneficiaire)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPharmaciencons.php b/extranet/Controleur/ControleurPharmaciencons.php deleted file mode 100644 index 0e4fccf..0000000 --- a/extranet/Controleur/ControleurPharmaciencons.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Pharmaciencons'); - - $this->facture_pharmacie = new Prescription(); - } - - public function index() - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - $codePrestataireLivraison = $_SESSION['p_codePrestataireLivraison_C']; - - $prescription = $this->facture_pharmacie->getprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison); - - $detaillivres = $this->facture_pharmacie->getdetailprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPharmacienconsben.php b/extranet/Controleur/ControleurPharmacienconsben.php deleted file mode 100644 index 3989b98..0000000 --- a/extranet/Controleur/ControleurPharmacienconsben.php +++ /dev/null @@ -1,27 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Pharmacienconsben'); - - $this->facture_pharmacie = new Prescription(); - } - - public function index() - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - $codePrestataireLivraison = $_SESSION['p_codePrestataireLivraison_C']; - - $prescription = $this->facture_pharmacie->getprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison); - - $detaillivres = $this->facture_pharmacie->getdetailprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison); - - $this->genererVue(array('prescription' => $prescription, 'detaillivres' => $detaillivres)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondadherent.php b/extranet/Controleur/ControleurPlafondadherent.php deleted file mode 100644 index 7488bf1..0000000 --- a/extranet/Controleur/ControleurPlafondadherent.php +++ /dev/null @@ -1,33 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Plafondadherent"); - - $this->adherent = new Adherent(); - $this->garantieadherent = new Garantieadherent(); - - } - public function index() { - - $idAdherent = $_SESSION['p_idAdherent_C']; - - $adherent = $this->adherent->getContexteAdherentId($idAdherent); - $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent); - // $totalgarantieadherent = $this->garantieadherent->getTotalGarantieAdherent($idAdherent); - - /* - $this->genererVue(array('adherent' => $adherent, 'garantieadherents' => $garantieadherents, - 'totalgarantieadherent' => $totalgarantieadherent)); - */ - $this->genererVue(array('adherent' => $adherent, 'garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacture.php b/extranet/Controleur/ControleurPlafondavantfacture.php deleted file mode 100644 index a8426f8..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacture.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacture'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturecdec.php b/extranet/Controleur/ControleurPlafondavantfacturecdec.php deleted file mode 100644 index 46b2ddf..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturecdec.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturecdec'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturecons.php b/extranet/Controleur/ControleurPlafondavantfacturecons.php deleted file mode 100644 index 0c2ec68..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturecons.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturecons'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfactureconsben.php b/extranet/Controleur/ControleurPlafondavantfactureconsben.php deleted file mode 100644 index 3ff7769..0000000 --- a/extranet/Controleur/ControleurPlafondavantfactureconsben.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfactureconsben'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturekine.php b/extranet/Controleur/ControleurPlafondavantfacturekine.php deleted file mode 100644 index eedab08..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturekine.php +++ /dev/null @@ -1,25 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturekine'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $idFacture = $this->requete->getParametreFormulaire("id"); - $_SESSION['p_idFacture_C'] = $idFacture; - - $garantieadherents = $this->garantieadherent->getPlafondAvantFactureId($idFacture); - - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturekinecso.php b/extranet/Controleur/ControleurPlafondavantfacturekinecso.php deleted file mode 100644 index dd4cf17..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturekinecso.php +++ /dev/null @@ -1,25 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturekinecso'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $idFacture = $this->requete->getParametreFormulaire("id"); - $_SESSION['p_idFacture_C'] = $idFacture; - - $garantieadherents = $this->garantieadherent->getPlafondAvantFactureId($idFacture); - - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturelab.php b/extranet/Controleur/ControleurPlafondavantfacturelab.php deleted file mode 100644 index 577ba57..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturelab.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturelab'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturelabcons.php b/extranet/Controleur/ControleurPlafondavantfacturelabcons.php deleted file mode 100644 index c3d23ad..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturelabcons.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturelabcons'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturelabconsben.php b/extranet/Controleur/ControleurPlafondavantfacturelabconsben.php deleted file mode 100644 index 7ce5ae8..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturelabconsben.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturelabconsben'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturelabcso.php b/extranet/Controleur/ControleurPlafondavantfacturelabcso.php deleted file mode 100644 index 9ea2056..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturelabcso.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturelabcso'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfactureopt.php b/extranet/Controleur/ControleurPlafondavantfactureopt.php deleted file mode 100644 index ccbee7a..0000000 --- a/extranet/Controleur/ControleurPlafondavantfactureopt.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfactureopt'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfactureoptcons.php b/extranet/Controleur/ControleurPlafondavantfactureoptcons.php deleted file mode 100644 index 6f7b440..0000000 --- a/extranet/Controleur/ControleurPlafondavantfactureoptcons.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfactureoptcons'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfactureoptconsben.php b/extranet/Controleur/ControleurPlafondavantfactureoptconsben.php deleted file mode 100644 index 7c00810..0000000 --- a/extranet/Controleur/ControleurPlafondavantfactureoptconsben.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfactureoptconsben'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturepha.php b/extranet/Controleur/ControleurPlafondavantfacturepha.php deleted file mode 100644 index 1309598..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturepha.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturepha'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturephacons.php b/extranet/Controleur/ControleurPlafondavantfacturephacons.php deleted file mode 100644 index af6f16a..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturephacons.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturephacons'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfacturephaconsben.php b/extranet/Controleur/ControleurPlafondavantfacturephaconsben.php deleted file mode 100644 index c018100..0000000 --- a/extranet/Controleur/ControleurPlafondavantfacturephaconsben.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfacturephaconsben'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfactureseacons.php b/extranet/Controleur/ControleurPlafondavantfactureseacons.php deleted file mode 100644 index 72d59f2..0000000 --- a/extranet/Controleur/ControleurPlafondavantfactureseacons.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfactureseacons'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPlafondavantfactureseaconsben.php b/extranet/Controleur/ControleurPlafondavantfactureseaconsben.php deleted file mode 100644 index ccf8050..0000000 --- a/extranet/Controleur/ControleurPlafondavantfactureseaconsben.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Plafondavantfactureseaconsben'); - - $this->garantieadherent = new Garantieadherent(); - } - - public function index() - { - $garantieadherents = $this->garantieadherent->getPlafondAvantFacture(); - $this->genererVue(array('garantieadherents' => $garantieadherents)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPrescription.php b/extranet/Controleur/ControleurPrescription.php deleted file mode 100644 index 302c25f..0000000 --- a/extranet/Controleur/ControleurPrescription.php +++ /dev/null @@ -1,144 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Prescription'); - - $this->prescription = new Prescription(); - $this->detailprescription = new Detailprescription(); - $this->ged = new Ged(); - $this->bonpec = new Bonpec(); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - } - - public function index($msgErreur=null) - - { - $message = ""; - - $nouveau_fichier = "Rien"; - - if(!empty($_POST)) - { - define('TARGET', $_SESSION['p_cheminGed']); // Repertoire cible - define('MAX_SIZE', 10000000); // Taille max en octets du fichier - - // Tableaux de donnees - // ".avi", ".bmp", ".doc", ".docx", ".gif", ".jpeg", "jpg", "jpe", ".mkv", ".mp3", ".pdf", ".png", ".pps", ".xls", ".xlsx", ".wav" - // $tabExt = array('jpg','png','jpeg'); // Extensions autorisees - - $tabExt = array("avi", "bmp", "doc", "docx", "gif", "jpeg", "jpg", "jpe", "mkv", "mp3", "mp4", "pdf", "png", "pps", "xls", "xlsx", "wav"); // Extensions autorisees - - // Variables - $extension = ''; - - if( !is_dir(TARGET) ) - { - if( !mkdir(TARGET, 0755) ) - { - $message = 'Erreur : le répertoire cible ne peut-être créé ! Vérifiez que vous diposiez des droits suffisants pour le faire ou créez le manuellement !'; - } - } - - // On verifie si le champ est rempli - if( !empty($_FILES['fichier_upload']['name']) ) - { - // Recuperation de l'extension du fichier - - $extension = pathinfo($_FILES['fichier_upload']['name'], PATHINFO_EXTENSION); - - // On verifie l'extension du fichier - if(in_array(strtolower($extension), $tabExt)) - { - $message = $_FILES['fichier_upload']['size']; - - // On verifie les dimensions et taille du fichier - if($_FILES['fichier_upload']['size'] <= MAX_SIZE) - { - $taille = $_FILES['fichier_upload']['size']; - - // Parcours du tableau d'erreurs - if(isset($_FILES['fichier_upload']['error']) && UPLOAD_ERR_OK === $_FILES['fichier_upload']['error']) - { - // On renomme le fichier - $nomOrigine = $_FILES['fichier_upload']['name']; - $nouveau_fichier = dateJourSql()."_".uniqid().".".$extension; - - // Si c'est OK, on teste l'upload - if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nouveau_fichier)) - { - $message = 'Chargé avec succès / Uploaded successfully'; - - // on va envoyer dans la base de données - $this->ged->enregistrergedprescription($nomOrigine, $nouveau_fichier, $taille); - } - else - { - // Sinon on affiche une erreur systeme - $message = 'Problème lors du chargement !'; - } - } - else - { - $message = 'Une erreur interne a empêché le chargement'; - } - } - else - { - $message .= $_FILES['fichier_upload']['size']." Erreur dans les dimensions du fichier !"; - // $message = 'Erreur dans les dimensions du fichier !'; - } - } - else - { - // Sinon on affiche une erreur pour l'extension - $message = 'Extension du fichier est incorrecte !'; - } - } - else - { - // Sinon on affiche une erreur pour le champ vide - $message = 'Veuillez sélectionner un fichier SVP! / Please select a file!'; - } - - // fin upload - } - - $msgErreurGed = $message; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "ORDO"; - - $nbBonsOrd = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription($numeroPrescription); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - // $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - unset($_FILES['fichier_upload']); - $geds = $this->ged->getgedpharmacie(); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions, - 'geds' => $geds, 'msgErreurGed' => $msgErreurGed, 'nbBonsOrd' => $nbBonsOrd, - 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPrescriptioncons.php b/extranet/Controleur/ControleurPrescriptioncons.php deleted file mode 100644 index 86751cb..0000000 --- a/extranet/Controleur/ControleurPrescriptioncons.php +++ /dev/null @@ -1,32 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Prescriptioncons'); - - $this->prescription = new Prescription(); - $this->detailprescription = new Detailprescription(); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - } - - public function index() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription($numeroPrescription); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPrescriptionconsben.php b/extranet/Controleur/ControleurPrescriptionconsben.php deleted file mode 100644 index e1cbcc5..0000000 --- a/extranet/Controleur/ControleurPrescriptionconsben.php +++ /dev/null @@ -1,31 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Prescriptionconsben'); - - $this->prescription = new Prescription(); - $this->detailprescription = new Detailprescription(); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - } - - public function index() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $prescription = $this->prescription->getprescription($numeroPrescription); - - $detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription); - - $this->genererVue(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPrescriptionexamen.php b/extranet/Controleur/ControleurPrescriptionexamen.php deleted file mode 100644 index 51f67d7..0000000 --- a/extranet/Controleur/ControleurPrescriptionexamen.php +++ /dev/null @@ -1,44 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Prescriptionexamen'); - - $this->examen = new Examen_temp(); - $this->detailexamen = new Detailexamem(); - $this->bonpec = new Bonpec(); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "EXAM"; - - $nbBonsOrd = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $this->examen->initexamen_cso(); - $examen = $this->examen->getexamentemp(); - - $detailexamens = $this->detailexamen->getdetailexamenfeuille(); - $nbExamens_0 = count($detailexamens); - - $this->genererVue(array('examen' => $examen, 'detailexamens' => $detailexamens, 'nbExamens_0' => $nbExamens_0, - 'nbBonsOrd' => $nbBonsOrd, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurPrescriptionseance.php b/extranet/Controleur/ControleurPrescriptionseance.php deleted file mode 100644 index 75c4b05..0000000 --- a/extranet/Controleur/ControleurPrescriptionseance.php +++ /dev/null @@ -1,50 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Prescriptionseance'); - - $this->seance = new Seance_temp(); - $this->detailseance = new Detailseance(); - $this->acte = new Detailtarifacte(); - $this->bonpec = new Bonpec(); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - } - - public function index() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "KINE"; - - $nbBonsOrd = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $this->seance->initseance_cso(); - - $seance = $this->seance->getseancetemp(); - - $detailseances = $this->detailseance->getdetailseancefeuille(); - $nbSeance_0 = count($detailseances); - - // $acte = $this->acte->getseancespossibles(); - $acte = $this->acte->getseancespossiblesprescription(); - - $this->genererVue(array('seance' => $seance, 'detailseances' => $detailseances, 'nbSeance_0' => $nbSeance_0, 'acte' => $acte, - 'nbBonsOrd' => $nbBonsOrd, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurQuitter.php b/extranet/Controleur/ControleurQuitter.php deleted file mode 100644 index 982890e..0000000 --- a/extranet/Controleur/ControleurQuitter.php +++ /dev/null @@ -1,20 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Quitter"); - - session_destroy(); - } - - public function index() - { - $this->genererVue(); - } -} diff --git a/extranet/Controleur/ControleurRecconnexion.php b/extranet/Controleur/ControleurRecconnexion.php deleted file mode 100644 index e1fd581..0000000 --- a/extranet/Controleur/ControleurRecconnexion.php +++ /dev/null @@ -1,8 +0,0 @@ -rediriger("connexion","deconnecter"); - } -} diff --git a/extranet/Controleur/ControleurReceptionbons.php b/extranet/Controleur/ControleurReceptionbons.php deleted file mode 100644 index 737b6f8..0000000 --- a/extranet/Controleur/ControleurReceptionbons.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Receptionbons'); - - $this->typebon = (new Typebon())->getListe(); - $this->etatbon = (new Etatbon())->getListe(); - } - - public function index() - { - $this->genererVue(array('typebon' => $this->typebon, 'etatbon' => $this->etatbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurRecherche - copie.php b/extranet/Controleur/ControleurRecherche - copie.php deleted file mode 100644 index f2c9163..0000000 --- a/extranet/Controleur/ControleurRecherche - copie.php +++ /dev/null @@ -1,565 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Recherche"); - - $this->beneficiaire = new Beneficiaire(); - - viderContexte(); - - $_SESSION['p_numeroBonOrdonnance_C'] = "-1"; - $_SESSION['p_numeroBonExamen_C'] = "-1"; - $_SESSION['p_numeroBonOptique_C'] = "-1"; - $_SESSION['p_numeroBonKine_C'] = "-1"; - - $_SESSION['p_okId'] = "-1"; - } - - public function index($numeroBeneficiaire="", $numeroAdherent="", $nomBeneficiaire="", - $prenomsBeneficiaire="", $telephonePortable="", $email="", $numeroBonConsultation="", - $numeroBonOrdonnance="", $numeroBonHospitalisation="", $numeroBonOptique="", - $numeroBonExamen="", $numeroBonKine="", $numeroBonSeance="") - { - if (isset($_POST['numeroBeneficiaire'])) - { - $numeroBeneficiaire=trim($_POST['numeroBeneficiaire']); - $numeroAdherent=trim($_POST['numeroAdherent']); - $nomBeneficiaire=trim($_POST['nomBeneficiaire']); - $prenomsBeneficiaire=trim($_POST['prenomsBeneficiaire']); - $telephonePortable=trim($_POST['telephonePortable']); - $email=trim($_POST['email']); - $numeroBonConsultation=trim($_POST['numeroBonConsultation']); - $numeroBonOrdonnance=trim($_POST['numeroBonOrdonnance']); - $numeroBonHospitalisation=trim($_POST['numeroBonHospitalisation']); - $numeroBonOptique=trim($_POST['numeroBonOptique']); - $numeroBonExamen=trim($_POST['numeroBonExamen']); - $numeroBonKine=trim($_POST['numeroBonKine']); - $numeroBonSeance=trim($_POST['numeroBonSeance']); - - if ($numeroBonConsultation=="0") - { - $numeroBonConsultation=""; - } - - if ($numeroBonOrdonnance=="0") - { - $numeroBonOrdonnance=""; - } - - if ($numeroBonHospitalisation=="0") - { - $numeroBonHospitalisation=""; - } - - if ($numeroBonOptique=="0") - { - $numeroBonOptique=""; - } - - if ($numeroBonExamen=="0") - { - $numeroBonExamen=""; - } - - if ($numeroBonKine=="0") - { - $numeroBonKine=""; - } - - if ($numeroBonSeance=="0") - { - $numeroBonSeance=""; - } - - if ($numeroBeneficiaire<=" " && $numeroAdherent<=" " && $numeroBeneficiaire<=" " && - $nomBeneficiaire<=" " && $prenomsBeneficiaire<=" " && $telephonePortable<=" " && $email<=" "&& - $numeroBonConsultation<=" " && $numeroBonOrdonnance<=" " && $numeroBonHospitalisation<=" " && $numeroBonOptique<=" "&& - $numeroBonExamen<=" " && $numeroBonKine<=" " && $numeroBonSeance<=" ") - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - else - if ($numeroBeneficiaire>" ") - { - $beneficiaires = $this->beneficiaire->getBeneficiaire($numeroBeneficiaire); - } - else - if ($numeroAdherent>" ") - { - $beneficiaires = $this->beneficiaire->getBeneficiairesAdh($numeroAdherent); - } - else - if ($numeroBonConsultation>" ") - { - if ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireConsultationCso($numeroBonConsultation); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $idBeneficiaire = $resultat['idBeneficiaire']; - - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireConsultation($numeroBonConsultation); - } - - } - else - if ($numeroBonOrdonnance>" ") - { - if ($_SESSION['p_codeProfil_C']=="PHA") - { - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $this->rediriger("Pharmacien"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceCso($numeroBonOrdonnance); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $idBeneficiaire = $resultat['idBeneficiaire']; - - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - // $this->rediriger("Pharmacie"); - // changement du 23/11/2017 - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireOrdonnance($numeroBonOrdonnance); - } - } - // Optique - else - if ($numeroBonOptique>" ") - { - if ($_SESSION['p_codeProfil_C']=="OPT") - { - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $this->rediriger("Opticien"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireOptiqueCso($numeroBonOptique); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - // $this->rediriger("Optique"); - // Changment du 23/11/2017 - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireOptique($numeroBonOptique); - } - } - // Fin Optique - else - if ($numeroBonHospitalisation>" ") - { - $resultat = $this->beneficiaire->getBeneficiaireHospit($numeroBonHospitalisation); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - // $this->rediriger("Chambre"); - // Changment du 23/11/2017 - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - - // Examen - else - if ($numeroBonExamen>" ") - { - if ($_SESSION['p_codeProfil_C']=="LAB") - { - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $this->rediriger("Laboratoire"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireExamenCso($numeroBonExamen); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - // $beneficiaires = $this->beneficiaire->getBeneficiaireOptique($numeroBonOptique); - $beneficiaires = $this->beneficiaire->getBeneficiaireExamen($numeroBonExamen); - } - } - // Fin Examen - - // Kine Prescription - else - if ($numeroBonKine>" ") - { - if ($_SESSION['p_codeProfil_C']=="SEA") - { - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - $this->rediriger("Kine"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - // throw new Exception("numeroBonKine : ".$numeroBonKine); - - $resultat = $this->beneficiaire->getBeneficiaireKineCso($numeroBonKine); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - // $beneficiaires = $this->beneficiaire->getBeneficiaireOptique($numeroBonOptique); - $beneficiaires = $this->beneficiaire->getBeneficiaireExamen($numeroBonExamen); - } - } - // Fin Kine Prescription - - // Kine Séances - else - if ($numeroBonSeance>" ") - { - if ($_SESSION['p_codeProfil_C']=="SEA") - { - $_SESSION['p_numeroBonSeance_C'] = $numeroBonSeance; - // $this->rediriger("Kine"); - - // throw new Exception("numeroBonSeance : ".$numeroBonSeance); - - $resultat = $this->beneficiaire->getBeneficiaireSeanceKine($numeroBonSeance); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroBonKine = $resultat['numeroBonKine']; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - $this->rediriger("Kine"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - // throw new Exception("numeroBonSeance : ".$numeroBonSeance); - - $resultat = $this->beneficiaire->getBeneficiaireSeanceKine($numeroBonSeance); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - $numeroBonSeance = $resultat['numeroBonSeance']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - $_SESSION['p_numeroBonSeance_C'] = $numeroBonSeance; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Kinecso"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - // $beneficiaires = $this->beneficiaire->getBeneficiaireOptique($numeroBonOptique); - $beneficiaires = $this->beneficiaire->getBeneficiaireExamen($numeroBonExamen); - } - } - // Fin Kine Séances - - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaires($nomBeneficiaire, $prenomsBeneficiaire, $telephonePortable, $email); - } - } else - { - - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - - if ($beneficiaires->rowCount() == 1) - { - $beneficiaire = $beneficiaires->fetch(); - $_SESSION['p_idBeneficiaire_C'] = $beneficiaire['idBeneficiaire']; - $_SESSION['p_idBeneficiaire_sav'] = $_SESSION['p_idBeneficiaire_C']; - $this->rediriger("Fichebeneficiaire"); - } else - { - $nbligne = $beneficiaires->rowCount(); - $this->genererVue(array('beneficiaires' => $beneficiaires, 'nbligne' => $nbligne)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurRecherche.php b/extranet/Controleur/ControleurRecherche.php deleted file mode 100644 index 5da0847..0000000 --- a/extranet/Controleur/ControleurRecherche.php +++ /dev/null @@ -1,572 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Recherche"); - - $this->beneficiaire = new Beneficiaire(); - - viderContexte(); - - $_SESSION['p_numeroBonOrdonnance_C'] = "-1"; - $_SESSION['p_numeroBonExamen_C'] = "-1"; - $_SESSION['p_numeroBonOptique_C'] = "-1"; - $_SESSION['p_numeroBonKine_C'] = "-1"; - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - } - - public function index($numeroBeneficiaire="", $numeroAdherent="", $nomBeneficiaire="", - $prenomsBeneficiaire="", $telephonePortable="", $email="", $numeroBonConsultation="", - $numeroBonOrdonnance="", $numeroBonHospitalisation="", $numeroBonOptique="", - $numeroBonExamen="", $numeroBonKine="", $numeroBonSeance="") - { - $this->beneficiaire->getModeBiometrie(); - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - - if (isset($_POST['numeroBeneficiaire'])) - { - $numeroBeneficiaire=trim($_POST['numeroBeneficiaire']); - $numeroAdherent=trim($_POST['numeroAdherent']); - $nomBeneficiaire=trim($_POST['nomBeneficiaire']); - $prenomsBeneficiaire=trim($_POST['prenomsBeneficiaire']); - $telephonePortable=trim($_POST['telephonePortable']); - $email=trim($_POST['email']); - $numeroBonConsultation=trim($_POST['numeroBonConsultation']); - $numeroBonOrdonnance=trim($_POST['numeroBonOrdonnance']); - $numeroBonHospitalisation=trim($_POST['numeroBonHospitalisation']); - $numeroBonOptique=trim($_POST['numeroBonOptique']); - $numeroBonExamen=trim($_POST['numeroBonExamen']); - $numeroBonKine=trim($_POST['numeroBonKine']); - $numeroBonSeance=trim($_POST['numeroBonSeance']); - - if ($numeroBonConsultation=="0") - { - $numeroBonConsultation=""; - } - - if ($numeroBonOrdonnance=="0") - { - $numeroBonOrdonnance=""; - } - - if ($numeroBonHospitalisation=="0") - { - $numeroBonHospitalisation=""; - } - - if ($numeroBonOptique=="0") - { - $numeroBonOptique=""; - } - - if ($numeroBonExamen=="0") - { - $numeroBonExamen=""; - } - - if ($numeroBonKine=="0") - { - $numeroBonKine=""; - } - - if ($numeroBonSeance=="0") - { - $numeroBonSeance=""; - } - - if ($numeroBeneficiaire<=" " && $numeroAdherent<=" " && $numeroBeneficiaire<=" " && - $nomBeneficiaire<=" " && $prenomsBeneficiaire<=" " && $telephonePortable<=" " && $email<=" "&& - $numeroBonConsultation<=" " && $numeroBonOrdonnance<=" " && $numeroBonHospitalisation<=" " && $numeroBonOptique<=" "&& - $numeroBonExamen<=" " && $numeroBonKine<=" " && $numeroBonSeance<=" ") - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - else - if ($numeroBeneficiaire>" ") - { - $beneficiaires = $this->beneficiaire->getBeneficiaire($numeroBeneficiaire); - } - else - if ($numeroAdherent>" ") - { - $beneficiaires = $this->beneficiaire->getBeneficiairesAdh($numeroAdherent); - } - else - if ($numeroBonConsultation>" ") - { - if ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireConsultationCso($numeroBonConsultation); - $idBeneficiaire = $resultat['idBeneficiaire']; - - // var_dump($resultat); - // exit(); - - if ($idBeneficiaire > "0") - { - $idBeneficiaire = $resultat['idBeneficiaire']; - - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireConsultation($numeroBonConsultation); - } - - } - else - if ($numeroBonOrdonnance>" ") - { - if ($_SESSION['p_codeProfil_C']=="PHA") - { - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $this->rediriger("Pharmacien"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireOrdonnanceCso($numeroBonOrdonnance); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $idBeneficiaire = $resultat['idBeneficiaire']; - - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - // $this->rediriger("Pharmacie"); - // changement du 23/11/2017 - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireOrdonnance($numeroBonOrdonnance); - } - } - // Optique - else - if ($numeroBonOptique>" ") - { - if ($_SESSION['p_codeProfil_C']=="OPT") - { - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $this->rediriger("Opticien"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireOptiqueCso($numeroBonOptique); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - // $this->rediriger("Optique"); - // Changment du 23/11/2017 - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireOptique($numeroBonOptique); - } - } - // Fin Optique - else - if ($numeroBonHospitalisation>" ") - { - $resultat = $this->beneficiaire->getBeneficiaireHospit($numeroBonHospitalisation); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - // $this->rediriger("Chambre"); - // Changment du 23/11/2017 - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - - // Examen - else - if ($numeroBonExamen>" ") - { - if ($_SESSION['p_codeProfil_C']=="LAB") - { - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $this->rediriger("Laboratoire"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - $resultat = $this->beneficiaire->getBeneficiaireExamenCso($numeroBonExamen); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireExamen($numeroBonExamen); - } - } - // Fin Examen - - // Kine Prescription - else - if ($numeroBonKine>" ") - { - if ($_SESSION['p_codeProfil_C']=="SEA") - { - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - $this->rediriger("Kine"); - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - // throw new Exception("numeroBonKine : ".$numeroBonKine); - - $resultat = $this->beneficiaire->getBeneficiaireKineCso($numeroBonKine); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Feuillemaladie"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireExamen($numeroBonExamen); - } - } - // Fin Kine Prescription - - // Kine Séances - else - if ($numeroBonSeance>" ") - { - if ($_SESSION['p_codeProfil_C']=="SEA") - { - $_SESSION['p_numeroBonSeance_C'] = $numeroBonSeance; - // $this->rediriger("Kine"); - - // throw new Exception("numeroBonSeance : ".$numeroBonSeance); - - $resultat = $this->beneficiaire->getBeneficiaireSeanceKine($numeroBonSeance); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroBonKine = $resultat['numeroBonKine']; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - $this->rediriger("Kine"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - - } - elseif ($_SESSION['p_codeProfil_C']=="CSO") - { - // throw new Exception("numeroBonSeance : ".$numeroBonSeance); - - $resultat = $this->beneficiaire->getBeneficiaireSeanceKine($numeroBonSeance); - $idBeneficiaire = $resultat['idBeneficiaire']; - - if ($idBeneficiaire > "0") - { - $numeroFeuilleMaladie = $resultat['numeroFeuilleMaladie']; - - $numeroBonConsultation = $resultat['numeroBonConsultation']; - $numeroBonHospitalisation = $resultat['numeroBonHospitalisation']; - - $numeroBonOrdonnance = $resultat['numeroBonOrdonnance']; - $numeroBonOptique = $resultat['numeroBonOptique']; - $numeroBonExamen = $resultat['numeroBonExamen']; - $numeroBonKine = $resultat['numeroBonKine']; - $numeroBonSeance = $resultat['numeroBonSeance']; - - $numeroPrescription = $resultat['numeroPrescription']; - $numeroOptique = $resultat['numeroOptique']; - $numeroExamen = $resultat['numeroExamen']; - $numeroPrescriptionKine = $resultat['numeroPrescriptionKine']; - - $beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBonConsultation; - $_SESSION['p_numeroBonHospitalisation_C'] = $numeroBonHospitalisation; - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $_SESSION['p_numeroBonOptique_C'] = $numeroBonOptique; - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $_SESSION['p_numeroBonKine_C'] = $numeroBonKine; - $_SESSION['p_numeroBonSeance_C'] = $numeroBonSeance; - - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - $_SESSION['p_numeroPrescriptionKine_C'] = $numeroPrescriptionKine; - - $this->rediriger("Kinecso"); - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - } - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaireExamen($numeroBonExamen); - } - } - // Fin Kine Séances - - else - { - $beneficiaires = $this->beneficiaire->getBeneficiaires($nomBeneficiaire, $prenomsBeneficiaire, $telephonePortable, $email); - } - } else - { - $_SESSION['p_okId_face'] = "-1"; - - $beneficiaires = $this->beneficiaire->getBeneficiaireVide(); - } - - if ($beneficiaires->rowCount() == 1) - { - $beneficiaire = $beneficiaires->fetch(); - $_SESSION['p_idBeneficiaire_C'] = $beneficiaire['idBeneficiaire']; - $_SESSION['p_idBeneficiaire_sav'] = $_SESSION['p_idBeneficiaire_C']; - $this->rediriger("Fichebeneficiaire"); - } else - { - $nbligne = $beneficiaires->rowCount(); - $this->genererVue(array('beneficiaires' => $beneficiaires, 'nbligne' => $nbligne)); - } - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurRemplacerfeuille.php b/extranet/Controleur/ControleurRemplacerfeuille.php deleted file mode 100644 index 2567b95..0000000 --- a/extranet/Controleur/ControleurRemplacerfeuille.php +++ /dev/null @@ -1,14 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Remplacerfeuille'); - } - public function index() { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurRemplacerordonnance.php b/extranet/Controleur/ControleurRemplacerordonnance.php deleted file mode 100644 index 55b445e..0000000 --- a/extranet/Controleur/ControleurRemplacerordonnance.php +++ /dev/null @@ -1,14 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Remplacerordonnance'); - } - public function index() { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurReposmedical.php b/extranet/Controleur/ControleurReposmedical.php deleted file mode 100644 index 9ba3d4c..0000000 --- a/extranet/Controleur/ControleurReposmedical.php +++ /dev/null @@ -1,16 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Reposmedical'); - } - - public function index() - { - $this->genererVue(); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurRequetes.php b/extranet/Controleur/ControleurRequetes.php deleted file mode 100644 index 0857d8c..0000000 --- a/extranet/Controleur/ControleurRequetes.php +++ /dev/null @@ -1,20 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Requetes'); - - $this->requetes = (new Requetes())->getListe(); - } - - public function index() { - $this->genererVue(array('requetes' => $this->requetes)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSeances.php b/extranet/Controleur/ControleurSeances.php deleted file mode 100644 index b455aa9..0000000 --- a/extranet/Controleur/ControleurSeances.php +++ /dev/null @@ -1,46 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Seances'); - - $this->prescription = new Seance_temp(); - $this->detailprescription = new Detailseance(); - $this->bonpec = new Bonpec(); - } - - public function index() - { - // $_SESSION['p_numeroBonSeance_C'] = "-1"; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypeBon = "CONS"; - - $nbBonsCons = $this->bonpec->getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon); - // $codeGestionBon = $this->bonpec->getCodeGestionBon($codeTypeBon); - $codeGestionBon = $this->bonpec->getCodeGestionBonPrestataire(); - $typeGestionbon = $this->bonpec->getGestionBon($codeGestionBon); - - $numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C']; - - $this->prescription->initseancekine_cso($codeGestionBon); - - $prescription = $this->prescription->getseancetemp(); - - $_SESSION['p_numeroBonSeance_C'] = $prescription['numeroBonSeance']; - - $detailseances = $this->detailprescription->getdetailseancefeuille(); - - $this->genererVue(array('prescription' => $prescription, 'detailseances' => $detailseances, - 'nbBonsCons' => $nbBonsCons, 'codeGestionBon' => $codeGestionBon, 'typeGestionbon' => $typeGestionbon)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSelectactesmedicaux.php b/extranet/Controleur/ControleurSelectactesmedicaux.php deleted file mode 100644 index 817de00..0000000 --- a/extranet/Controleur/ControleurSelectactesmedicaux.php +++ /dev/null @@ -1,30 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Selectactesmedicaux'); - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeTypePrestation = "ACT"; - - $this->familleacte = (new Familleacte())->getListeComplet(); - $this->prestation = new Prestationactes(); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $prestations = $this->prestation->getactesmedicauxfeuille($numeroFeuilleMaladie, $codePrestataire); - $prestations_total = $this->prestation->getactesmedicauxfeuille_total($numeroFeuilleMaladie, $codePrestataire); - $this->genererVue(array('familleacte' => $this->familleacte, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSelectexaemens.php b/extranet/Controleur/ControleurSelectexaemens.php deleted file mode 100644 index 8bc28d5..0000000 --- a/extranet/Controleur/ControleurSelectexaemens.php +++ /dev/null @@ -1,31 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Selectexaemens'); - - $this->prescription = new Examen_temp(); - - $codeTypePrestation = "EXAM"; - $this->familleacte = (new Familleacte())->getListe($codeTypePrestation); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - - $prestations = $this->prescription->getdetaillivre(); - $prestations_total = $this->prescription->getdetaillivre_total(); - - $this->genererVue(array('familleacte' => $this->familleacte, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSelectexaemenscso.php b/extranet/Controleur/ControleurSelectexaemenscso.php deleted file mode 100644 index c40b422..0000000 --- a/extranet/Controleur/ControleurSelectexaemenscso.php +++ /dev/null @@ -1,31 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Selectexaemenscso'); - - $this->prescription = new Examen_temp(); - - $codeTypePrestation = "EXAM"; - $this->familleacte = (new Familleacte())->getListe($codeTypePrestation); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - - $prestations = $this->prescription->getdetaillivre(); - $prestations_total = $this->prescription->getdetaillivre_total(); - - $this->genererVue(array('familleacte' => $this->familleacte, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSelectexaemenslab.php b/extranet/Controleur/ControleurSelectexaemenslab.php deleted file mode 100644 index c5f4868..0000000 --- a/extranet/Controleur/ControleurSelectexaemenslab.php +++ /dev/null @@ -1,31 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue('Selectexaemenslab'); - - $this->prescription = new Examen_temp(); - - $codeTypePrestation = "EXAM"; - $this->familleacte = (new Familleacte())->getListe($codeTypePrestation); - } - - public function index() { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - - $prestations = $this->prescription->getdetaillivre(); - $prestations_total = $this->prescription->getdetaillivre_total(); - - $this->genererVue(array('familleacte' => $this->familleacte, 'prestations' => $prestations, 'prestations_total' => $prestations_total)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSpadherent.php b/extranet/Controleur/ControleurSpadherent.php deleted file mode 100644 index 34e0ed8..0000000 --- a/extranet/Controleur/ControleurSpadherent.php +++ /dev/null @@ -1,21 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Spadherent"); - - $this->spadherent = new Adherent(); - } - public function index() { - $idAdherent = $_SESSION['p_idAdherent_C']; - $spadherent = $this->spadherent->getRapportSpAdherent($idAdherent); - $this->genererVue(array('spadherent' => $spadherent)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSpcollege.php b/extranet/Controleur/ControleurSpcollege.php deleted file mode 100644 index 901add0..0000000 --- a/extranet/Controleur/ControleurSpcollege.php +++ /dev/null @@ -1,22 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Spcollege"); - - $this->spcollege = new Collegepolice(); - } - public function index() { - $idCollege = $_SESSION['p_idCollege']; - - $spcollege = $this->spcollege->getRapportSpCollege($idCollege); - $this->genererVue(array('spcollege' => $spcollege)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurSppolice.php b/extranet/Controleur/ControleurSppolice.php deleted file mode 100644 index d978faf..0000000 --- a/extranet/Controleur/ControleurSppolice.php +++ /dev/null @@ -1,22 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Sppolice"); - - $this->sppolice = new Police(); - } - public function index() { - $idPolice = $_SESSION['p_idPolice_C']; - $dj = date("Y-m-d"); - $sppolice = $this->sppolice->getRapportSpPolice($idPolice, $dj); - $this->genererVue(array('sppolice' => $sppolice)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/ControleurUsersprestaire.php b/extranet/Controleur/ControleurUsersprestaire.php deleted file mode 100644 index 21be248..0000000 --- a/extranet/Controleur/ControleurUsersprestaire.php +++ /dev/null @@ -1,25 +0,0 @@ -menuvue = new Menuvueutilisateur(); - $this->menuvue->getMenuVue("Usersprestaire"); - - $this->prestataire = new Prestataire(); - - $_SESSION['p_modeDevis'] = "0"; - } - public function index() { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $prestataire = $this->prestataire->getunprestatairebycode($codePrestataire); - $users = $this->prestataire->getusersprestataire($codePrestataire); - - $this->genererVue(array('prestataire' => $prestataire, 'users' => $users)); - } -} \ No newline at end of file diff --git a/extranet/Controleur/Ebenegmail.php b/extranet/Controleur/Ebenegmail.php deleted file mode 100644 index 7dc12cf..0000000 --- a/extranet/Controleur/Ebenegmail.php +++ /dev/null @@ -1,38 +0,0 @@ -isSMTP(); - -//Enable SMTP debugging -// 0 = off (for production use) -// 1 = client messages -// 2 = client and server messages -$mail->SMTPDebug = 0; - -// $mail->Debugoutput = 'html'; - -$mail->Host = 'smtp.gmail.com'; -// $mail->Host = gethostbyname('smtp.gmail.com'); -// if your network does not support SMTP over IPv6 - -$mail->Port = 587; - -$mail->SMTPSecure = 'tls'; - -$mail->SMTPAuth = true; - -$mail->Username = "intersanteebene@gmail.com"; -// $mail->Password = "Moritio1973"; -$mail->Password = "hftebsmxzqviinuh"; - -// $mail->setFrom('intersanteebene@gmail.com', 'INTER-SANTE : MEDICARE'); -$mail->setFrom('intersanteebene@gmail.com', 'RADIANT INSURANCE COMPANY'); -$mail->addReplyTo('verification@radiant.rw', 'RADIANT INSURANCE COMPANY'); - -// à activer en cas de besoin -// $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); - diff --git a/extranet/Js/datepicker-eng.js b/extranet/Js/datepicker-eng.js deleted file mode 100644 index dd2b2e1..0000000 --- a/extranet/Js/datepicker-eng.js +++ /dev/null @@ -1,35 +0,0 @@ -( function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "../widgets/datepicker" ], factory ); - } else { - - // Browser globals - factory( jQuery.datepicker ); - } -}( function( datepicker ) { - -datepicker.regional.eng = { - closeText: "Close", - prevText: "Previous", - nextText: "Next", - currentText: "Today'hui", - monthNames: [ "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" ], - monthNamesShort: [ "jan.", "febr.", "march", "April.", "mai", "June", - "July.", "August", "sept.", "oct.", "nov.", "dec." ], - dayNames: [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "Saturday" ], - dayNamesShort: [ "sun.", "mon.", "tues.", "wed.", "thur", "fri.", "Sat." ], - dayNamesMin: [ "S","M","T","W","T","F","S" ], - weekHeader: "Week", - dateFormat: "dd/mm/yy", - firstDay: 0, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: "" }; -datepicker.setDefaults( datepicker.regional.eng ); - -return datepicker.regional.eng; - -} ) ); \ No newline at end of file diff --git a/extranet/Js/datepicker-fr.js b/extranet/Js/datepicker-fr.js deleted file mode 100644 index e125fac..0000000 --- a/extranet/Js/datepicker-fr.js +++ /dev/null @@ -1,39 +0,0 @@ -/* French initialisation for the jQuery UI date picker plugin. */ -/* Written by Keith Wood (kbwood{at}iinet.com.au), - Stéphane Nahmani (sholby@sholby.net), - Stéphane Raimbault */ -( function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "../widgets/datepicker" ], factory ); - } else { - - // Browser globals - factory( jQuery.datepicker ); - } -}( function( datepicker ) { - -datepicker.regional.fr = { - closeText: "Fermer", - prevText: "Precedent", - nextText: "Suivant", - currentText: "Aujourd'hui", - monthNames: [ "janvier", "fevrier", "mars", "avril", "mai", "juin", - "juillet", "aout", "septembre", "octobre", "novembre", "decembre" ], - monthNamesShort: [ "janv.", "fevr.", "mars", "avr.", "mai", "juin", - "juil.", "aout", "sept.", "oct.", "nov.", "dec." ], - dayNames: [ "dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi" ], - dayNamesShort: [ "dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam." ], - dayNamesMin: [ "D","L","M","M","J","V","S" ], - weekHeader: "Sem.", - dateFormat: "dd/mm/yy", - firstDay: 1, - isRTL: false, - showMonthAfterYear: false, - yearSuffix: "" }; -datepicker.setDefaults( datepicker.regional.fr ); - -return datepicker.regional.fr; - -} ) ); \ No newline at end of file diff --git a/extranet/Js/fonctions.js b/extranet/Js/fonctions.js deleted file mode 100644 index f4dd8bf..0000000 --- a/extranet/Js/fonctions.js +++ /dev/null @@ -1,18468 +0,0 @@ -function alert_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function alert_ebene_ajax(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function confirm_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return confirm(p_msg_eng); - } - else - { - return confirm(p_msg); - } -} - -function prompt_ebene(p_msg, p_msg_eng, p_retour) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return prompt(p_msg_eng, p_retour); - } - else - { - return prompt(p_msg, p_retour); - } -} - -var p_destinataires=""; -var p_message=""; - -function adherents_police() -{ - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Listeadherent/"); - } -} - -$.prototype.enable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('disabled'); - }); -} - -$.prototype.disable = function () { - $.each(this, function (index, el) { - $(el).attr('disabled', 'disabled'); - }); -} - -$.prototype.unreadable = function () { - $.each(this, function (index, el) { - $(el).attr('READONLY', 'READONLY'); - }); -} - -$.prototype.readable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('READONLY'); - }); -} - -Date.estAnneeBissextile = function (annee) { - return (((annee % 4 === 0) && (annee % 100 !== 0)) || (annee % 400 === 0)); -}; - -Date.getDaysInMonth = function (annee, month) { - return [31, (Date.estAnneeBissextile(annee) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; -}; - -Date.prototype.estAnneeBissextile = function () { - return Date.estAnneeBissextile(this.getFullYear()); -}; - -Date.prototype.getDaysInMonth = function () { - return Date.getDaysInMonth(this.getFullYear(), this.getMonth()); -}; - -Date.prototype.addMonths = function (value) { - var n = this.getDate(); - this.setDate(1); - this.setMonth(this.getMonth() + value); - this.setDate(Math.min(n, this.getDaysInMonth())); - this.setDate(this.getDate()-1); - return this; -}; - -$( ".datepicker" ).datepicker({ - inline: true, - changeMonth: true, - changeYear: true, - yearRange: "c-60:c+20" - -}); - -/*les fonctions courantes et globales */ - -function get_age(dater) -{ - var td2 = $("#datejourfr_C").datepicker("getDate"); - return age = td2.getFullYear()-dater.getFullYear(); -} - -// function controle_age(dater, codeLienParente, controle) -function controle_age(dater, codeLienParente) -{ - age = get_age(dater); - $("#agepersonne").val("Âge : "+age); - - if (age>65) - { - v_msg="Âge "+age+" supérieur à 65 ans!"; - v_msgEng="Age "+age+" over 65!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="E")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="O")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - return true; -} - -/* Début JS client */ -function selectionner_client(id,no) -{ - $("#idClient_C").val(id); - $("#numeroClient_C").val(no); - $("#nomClient_C").val(""); -} - -function selectionner_client_d(id,no) -{ - $("#idClient_d_C").val(id); - $("#numeroClient_d_C").val(no); - $("#nomClient_d_C").val(""); -} - -function afficher_client_id() -{ - idClient=$("#idClient_C" ).val(); - - if (idClient>"") - { - ajax_context_client_afficher(idClient); - } -} - -function afficher_client_d_id() -{ - idClient=$("#idClient_d_C" ).val(); - - if (idClient>"") - { - ajax_context_client_d_afficher(idClient); - } -} - - -/* Fin JS client */ - -/* Début JS police */ -function selectionner_police(id,no) -{ - $("#idPolice_C" ).val(id); - $("#numeroPolice_C" ).val(no); -} - -function selectionner_police_d(id,no) -{ - $("#idPolice_d_C" ).val(id); - $("#numeroPolice_d_C" ).val(no); -} - -function afficher_police_id() -{ - idPolice=$("#idPolice_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_afficher(idPolice); - } -} - -function afficher_police_d_id() -{ - idPolice=$("#idPolice_d_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_d_afficher(idPolice); - } -} - - -/* Fin JS client */ - -/* Début JS adherent */ -function selectionner_adherent(id,no) -{ - $("#idAdherent_C" ).val(id); - $("#numeroAdherent_C" ).val(no); -} - -function afficher_adherent() -{ - if ($("#numeroAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#numeroAdherent_C" ).val()+"/"); - } -} - -function afficher_adherent_id() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/"); - } -} -/* Fin JS adherent */ - -/* Début JS bénéficiare */ -function selectionner_beneficiaire(id,no) -{ - $("#idBeneficiaire_C").val(id); - $("#numeroBeneficiaire_C" ).val(no); -} - -function afficher_beneficiaire_id() -{ - idBeneficiaire=$("#idBeneficiaire_C").val(); - okId=$("#okId").val(); - okId_face=$("#okId_face").val(); - - - if (idBeneficiaire>"") - { - ajax_context_beneficiaire_afficher(idBeneficiaire, okId, okId_face); - } -} - -function afficher_adherent_assure() -{ - if ($("#idAdherent_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"); -} - -function afficher_assure() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"+$("#idAdherent_C" ).val()+"/"); - } -} - -/* Fin JS beneficiaire */ - -function fermerFenetre() -{ - v_msg="Etes-vous sur de vouloir quitter?"; - v_msgEng="Are you sure you want to exit?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - ajax_deconnexion(); - } -} - -function ChangerPass() -{ - if ($("#ancmdp" ).val()<=' ') - { - v_msg="Veuillez saisir l\'ancien mot de passe!"; - v_msgEng="Please enter the old password!"; - alert_ebene(v_msg, v_msgEng); - - $("#ancmdp").focus(); - return false; - } - - if ($("#nvmdp" ).val()<=' ') - { - v_msg="Veuillez saisir un mot de passe!"; - v_msgEng="Please enter a password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#nvmdp").val()=='0000' || $("#nvmdp").val()=='radiant') - { - v_msg="Veuillez changer de mot de passe!"; - v_msgEng="Please change password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - longueur = $("#nvmdp").val().length; - - if(longueur>0 && longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minimum required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val()) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } -} - -function afficher_image(fichier) -{ - window.open(fichier); -} - - -function selectionner_bon(id,no, codeEtatBon, motifAnnulation) -{ - $("#idBon_C").val(id); - $("#numeroBon_C").val(no); - $("#motifAnnulation_C").val(motifAnnulation); - $("#codeEtatBon_C").val(codeEtatBon); -} - - -function imprimerbon() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - - alert_ebene(v_msg, v_msgEng); - - return; - } - - var codeEtatBon = $("input[name='codeEtatBon']").val(); - - if (codeEtatBon!="1") - { - return; - } - - $("#frmconsultation").submit(); -} - -function imprimerbonVierge() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $("#codeTypeBon").val('2'); - $("#frmconsultation").submit(); - $("#codeTypeBon").val('1'); -} - -function calculer_Tm() -{ - $("#montantTm").val( ($("#montantacte").val() * (100-$("#tauxCouverture").val() )) / 100 ); - if ($("#codeMedecin").val()>" ") - $("#numeroBon").focus(); - else - $("#codeMedecin").focus(); - return true; -} - -function controlefocusconsultationMd() -{ - if ($("#codeActe").val()>" ") - $("#numeroBon").focus(); - else - $("#codeActe").focus(); - return true; -} - -function ajaxinfosacteexamen() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - } - }); -} - -function ajaxbonexamendisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - $("#codeTypeBon").val('1'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function ajaxbonhospitdisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function accueil() -{ - if($("#codeProfil_C" ).val()=="MEC") - { - window.location.assign($("#racineWeb").val()+"Accueilmedecin/"); - } - else - { - window.location.assign($("#racineWeb").val()+"Accueil/"); - } -} - - -function forceDownload(fileURL, fileName) -{ -} - - -function ged() -{ - if ($("#numeroBeneficiaire_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Ged/"); -} - - -function tachesadherent() -{ - if ($("#numeroAdherent_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - return; - } - window.location.assign($("#racineWeb").val()+"Tacheadherent/"); -} - -function afficherged(cheminFichier) -{ - if (cheminFichier<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - return; - } - //window.open(cheminFichier); - window.open(cheminFichier, '_blank'); -} - -function archiverged() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un document!"; - v_msgEng="Please select a document"; - alert_ebene(v_msg, v_msgEng); - return; - } - if( $("#accesAssure").val()=="0" && $("#accesPrestataire").val()=="0" - && $("#accesMedecin").val()=="0" && $("#accesGestionnaire").val()=="0") - { - v_msg="Le document doit être visible par au moins un des acteurs!"; - v_msgEng="The document must be seen by at least one of the persons in charge!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function archiverfacture() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function ajaxinfosdestinatairetache() -{ - if ($("#codeDestinataire").val()<=" ") - { - v_msg="Veuillez sélectionner un destinataire!"; - v_msgEng="Please select a recipient!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeDestinataire").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosdestinatairetache/", - type : 'post', - data: "codeDestinataire="+$("#codeDestinataire").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosdestinatairetache").html(data); - }, - complete: function() { - $("#emailtache").val( $("#emailActeurtache_info").val()); - } - }); -} - -function selectionner_tache(id) -{ - $("#idTache").val(id); -} - -function afficher_tache() -{ - if ($("#idTache" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - } else - window.location.assign($("#racineWeb" ).val()+"Affichertache/"+$("#idTache").val()+"/"); -} - -function reinitialiserrecherche() -{ - // window.location.assign($("#racineWeb").val()+"Tache/"); -} - - -function selectionner_Rq(lienrequete) -{ - $("#lienrequete" ).val(lienrequete); -} - - -function parametre_Rq() -{ - if ($("#lienrequete" ).val()<="") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query (request)!"; - alert_ebene(v_msg, v_msgEng); - } - { - window.location.assign($("#racineWeb" ).val()+$("#lienrequete" ).val()); - } -} - -function imprimer_pdf() -{ - $("#sortie").val('1'); - $("#frmrequete").submit(); -} - -function export_xls() -{ - $("#sortie").val('2'); - $("#frmrequete").submit(); - $("#sortie").val('1'); -} - -function affichermanuel() -{ - codeProfil = $("#codeProfil_C").val(); - - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - - switch(codeProfil) - { - case "AAA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_AGENT_AFRIK_ASSUR.pdf"; - break; - case "ADM": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ADMINISTRATEUR_SYSTEME.pdf"; - break; - case "ASS": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ASSURE.pdf"; - break; - case "CSO": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - break; - case "DIR": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_DIRECTION_AFRIK_ASSUR.pdf"; - break; - case "LAB": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_LABORATOIRES.pdf"; - break; - case "MEC": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_MEDECINS_CONSEIL.pdf"; - break; - case "PHA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_PHARMACIES.pdf"; - break; - } - window.open('Docs/'+cheminFichier, '_blank'); -} - -function ajaxListerequetesProfil() -{ - $("#listerequete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrequetesprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listerequete").html(data); - } - }); -} - -function compta() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - window.location.assign($("#racineWeb").val()+"Compta/"+idClient+"/"); -} - -function selectionner_client_pop(id,no,nom) -{ - $("#nocli").val(no); - $("#nomcli").val(nom); - selectionner_client(id,no); -} - -function controle_numerique(controle) -{ - if(isNaN(controle.value)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } - return true; -} - -function ajax_context_client(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - -function ajax_context_client_afficher(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Ficheclient/"); - } - }); -} - -function ajax_context_police(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - - -function ajax_context_police_afficher(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -/* 24/03/2019 -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/" - }); -} -*/ - -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/", - complete: function() - { - window.open('about:blank','_parent',''); - close(); - window.close(); - } - }); -} - - -function ajax_flexcode() -{ - // donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxflexcode/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#content").html(data); - }, - complete: function() { - // window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -function controle_champ_obligatoire(controle) -{ - if (controle.value<=" ") - { - v_msg="Valeur exigée!"; - v_msgEng="Value required!"; - alert_ebene(v_msg, v_msgEng); - controle.focus(); - return false; - } - return true; -} - -function exporter_liste_assures() -{ - $('#div_liste').html(''); - - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterlisteassure/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function imprimer_liste_assures() -{ - $('#div_liste').html(''); - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlisteassure/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_limites() -{ - $('#div_liste').html(''); - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlimite/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function pop_tableau_prestation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtableauprestation/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_tableau_prestation").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function selectionner_tout_limite(p_idCollegeTemp, p_choix) -{ - donnees = 'idCollegeTemp='+p_idCollegeTemp; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionnertout/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college_simple(); - pop_afficher_selection_limite(p_idCollegeTemp); - } - }); -} - -function prestation_possible() -{ - enVigueur=$("#enVigueur_C").val(); - codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire=$("#etatbeneficiaire_C").val(); - college_couvert=$("#college_couvert_C").val(); - derogation_en_cours=$("#derogation_en_cours_C").val(); - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - - datejour = $("#datejour_C").val(); - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - dateEffetCouvert = $("#dateEffetCouvert").val(); - /* - if (dateEffetCouvert!="1") - { - v_msg="Attention! Non renouvelé"; - v_msgEng="Warning! Not renewed"; - alert_ebene(v_msg, v_msgEng); - return false; - } - */ - - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (college_couvert<1 && derogation_en_cours<1) - { - v_msg="Attention! Cette personne n\'a pas accès à ce centre"; - v_msgEng="Warning! This person does not have access to this center"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire = $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = new Date(datejour); - var td2 = new Date(dateEcheancePolice); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - // if (dt1>dt2) - if (dt1>dt2 || dt1"2000-01-01") - { - var tdd = new Date(dateSortieBeneficiaire); - dtd=Math.round(Date.parse(tdd)/(1000*3600*24)); - - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - } - - - dateDeces_C=$("#dateDeces_C").val(); - - if(dateDeces_C>"2000-01-01") - { - v_msg="Attention! personne décédée!"; - v_msgEng="Warning! Deceased!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - return true; -} - -// consultation originale -/* -function consultation() -{ - dateEffetCouvert = $("#dateEffetCouvert").val(); - - if (dateEffetCouvert!="1") - { - v_msg="Attention! Non renouvelé"; - v_msgEng="Warning! Not renewed"; - alert_ebene(v_msg, v_msgEng); - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - $("#btn_popdate_reelle").click(); - return; - } - - if (prestation_possible()) - { - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - $("#okId" ).val("1"); - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - } -} -*/ - -function consultation() -{ - dateEffetCouvert = $("#dateEffetCouvert").val(); - - if (dateEffetCouvert!="1") - { - v_msg="Attention! Non renouvelé"; - v_msgEng="Warning! Not renewed"; - alert_ebene(v_msg, v_msgEng); - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - $("#btn_popdate_reelle").click(); - return; - } - - if (prestation_possible()) - { - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if(okId=="1" || okId_face=="1") - { - // window.location.assign($("#racineWeb" ).val()+"Initconsultation/"); - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - // window.location.assign($("#racineWeb" ).val()+"Initconsultation/"); - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - // window.location.assign($("#racineWeb" ).val()+"Initconsultation/"); - } -} - -function gestionbon() -{ - adminBon = $("#adminBon" ).val(); - - if (adminBon!="1") - { - v_msg="Accès refusé!"; - v_msgEng="Access denied!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - window.location.assign($("#racineWeb").val()+"Receptionbons/"); -} - -function afficherbon() -{ - codeTypeBon=$("#codeTypeBon").val(); - codeEtatBon=$("#codeEtatBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() - { - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : "+$("#nbligne_info").val()); - } - else - { - $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - - // $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - }); -} - -function demander_annulation_bon() -{ - var codeEtatBon = $("#codeEtatBon_C").val(); - var motifAnnulation = $("#motifAnnulation_C").val(); - var numeroBon = $("#numeroBon_C").val(); - var idBon = $("#idBon_C").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeEtatBon=="3") - { - v_msg="Anullé pour motif : "+motifAnnulation; - v_msgEng="Canceled for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBon=="4") - { - v_msg="Remplacé pour motif : "+motifAnnulation; - v_msgEng="Replaced for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeEtatBon=="9") - { - v_msg="Demande anullation pour motif : "+motifAnnulation; - v_msgEng="Cancellation request for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la demande d\'annulation du bon No "+numeroBon+"?"; - v_msgEng="Do you confirm the request for cancellation of the prescription No "+numeroBon+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - v_msg="Raison de l\'annulation?"; - v_msgEng="Reason for cancellation?"; - - motifAnnulation = prompt_ebene(v_msg, v_msgEng, motifAnnulation); - if (motifAnnulation<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - $("#motifAnnulation_C").val(motifAnnulation); - - donnees = 'idBon='+idBon+'&motifAnnulation='+motifAnnulation; - donnees_sav = 'idBon='+idBon+'&typeMail=maildemandeannulationbon'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/demanderAnnulationBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - - v_msg="Demande envoyée avec succès!"; - v_msgEng="Request sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficherbon(); - } - }); - } -} - -function enregistrer_commande_bon() -{ - codeTypeBon=$("#codeTypeBon").val(); - - if ($("#codeTypeBon").val()<" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - quantite =$("#quantite").val(); - - if (quantite<" ") - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - $("#quantite").focus(); - return; - } - - quantite = parseInt(quantite); - - if(quantite<1) - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - $("#quantite").focus(); - return; - } - - /* - commentaire=$("#commentaire").val(); - - if ($("#commentaire").val()<" ") - { - v_msg="Veuillez saisir une note!"; - v_msgEng="Please enter a note/comment!"; - alert_ebene(v_msg, v_msgEng); - $("#commentaire").focus(); - return; - } - */ - - var codehtml = ""; - - v_msg="Confirmez-vous cette commande?"; - v_msgEng="Do you confirm this order?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - prestataire = $("#prestataire_C").val(); - donnees = 'codeTypeBon='+codeTypeBon+'&quantite='+quantite; - donnees_sav = donnees+'&prestataire='+prestataire+'&typeMail=mailcommandebon'; - - lst_libelleBon = document.getElementById("codeTypeBon"); - libelleBon = lst_libelleBon.options[lst_libelleBon.selectedIndex].text.trim(); - typeSms = "commandebon"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcommanderbons/commanderBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - codehtml = data; - preparesms(typeSms); - }, - complete: function() { - mettremailattente(donnees_sav); - - v_msg="commande envoyée avec succès!"; - v_msgEng="Order sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_page_entiere").html(codehtml); - } - }); - } -} - -function receptionner_bon() -{ - nbligne_info=$("#nbligne_info").val(); - nbligne_info = parseInt(nbligne_info); - - if (nbligne_info==0) - { - v_msg="Veuillez actualiser la liste avant!"; - v_msgEng="Please refresh before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeTypeBon=$("#codeTypeBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistegenererbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - $("#nbligne").val("Nombre de lignes affichées : "+$("#nbligne_info").val()); - } - }); -} - - -function listerdemandebon() -{ - codeTypeBon=$("#codeTypeBon").val(); - d1=$("#d1").val(); - d2=$("#d2").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - donnees = 'codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2; - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistedemandebon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - } - }); -} - -function ajaxactespossibles() -{ - codeGestionBon = $("#codeGestionBon").val(); - - codeFamilleActe=$("#codeFamilleActe").val(); - codeTypePrestation=$("#codeTypePrestation").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - $("#numeroBon").val(""); - // $("#btn_enreg").disable(); - // $("#codeEtatBon").val(""); - $("#msgErreur").html(""); - - if (codeGestionBon=="0") - { - $("#btn_enreg").disable(); - $("#codeEtatBon").val(""); - } - } - }); -} - -function ajaxactespossibles_med() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - codeTypePrestation=$("#codeTypePrestation").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesmed/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - }, - complete: function() { - } - }); -} - -function ajaxinfosacte() -{ - if ($("#codeActe").val()<=" ") - { - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#montantacte").val( $("#montantacte_info").val()); - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - // calculer_Tm(); - } - }); -} - - -function ajaxprixacte() -{ - codeGestionBon = $("#codeGestionBon").val(); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - donnees = 'codeActe='+codeActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - - $("#numeroBon").val(""); - $("#codeRaisonConsultation").focus(); - $("#msgErreur").html(""); - - if (codeGestionBon=="0") - { - $("#btn_enreg").disable(); - $("#codeEtatBon").val(""); - } - }, - complete: function() { - } - }); -} - - -function ajaxbondisponible() -{ - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - - $("#numeroBon").val(""); - - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - - $("#numeroBon").val(""); - - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - $("#codeRaisonConsultation").focus(); - - $("#numeroBon").val(""); - - return; - } - - numeroBon = $("#numeroBon").val(); - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function ajaxinfosbonconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - $("#btn_pop_medecin").click(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#codeActe").focus(); - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#codeRaisonConsultation").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerconsultation() -{ - /* - dateSurvenance = $("#dateSurvenance").val(); - alert("dateSurvenance => "+dateSurvenance); - return; - */ - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - /* - delaiCarenceBeneficiaire = $("#delaiCarenceBeneficiaire").val(); - delaiCarenceBeneficiaire = parseInt(delaiCarenceBeneficiaire); - - if (delaiCarenceBeneficiaire>0) - { - if (anciennete"+delaiCarenceBeneficiaire); - // alert("appliquerDelaiCarence =>"+appliquerDelaiCarence); - // return; - - if (delaiCarenceBeneficiaire>0 && appliquerDelaiCarence=="1") - { - if (anciennete  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossiers/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function selectionner_feuille_maladie(no) -{ - $("#numeroFeuilleMaladie_C" ).val(no); -} - -function afficher_feuille_maladie() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - feuillemaladie(); - } - }); -} - - - -function enregistrerprescription() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - //$("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescription/enregistrerprescription/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - } - }); - } -} - -function ajaxinfosbonprescription() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - if (numeroBonOrdonnance>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function afficher_pop_recherche_medicament() -{ - nomsearch = $("#nomsearch").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - $("#div_listemedicament").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicaments/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament").html(data); - } - }); - } -} - -function ctrlkeypress(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament(); - } -} - -function selectionner_medicament_pop(codeMedicament, libelleMedicament) -{ - $("#codeMedicament_pop").val(codeMedicament); - $("#libelleMedicament_pop").val(libelleMedicament); -} - -function ajouter_medicament() -{ - codeMedicament = $("#codeMedicament_pop").val(); - libelleMedicament = $("#libelleMedicament_pop").val(); - - if (codeMedicament<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Prescrire : "+libelleMedicament+"?"; - v_msgEng="Prescribe : "+libelleMedicament+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeMedicament='+codeMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/ajoutermedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - prescription_medicament(); - }, - complete: function() { - } - }); - } -} - -function ajax_maj_qte_medicament(idMedicament, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - $("#medicaments").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function supprimer_medicament(idMedicament) -{ - v_msg="Confirmez-vous la suppression de ce médicament?"; - v_msgEng="Do you confirm the removal of this medicine/drug?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/supprimer/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - prescription_medicament(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function ajoutermedicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/ajoutermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ajoutermedicament_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - // raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function ajoutermedicament_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/ajoutermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function ajoutermedicament_pha_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - // raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirermedicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/retirermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirermedicament_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/retirermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirermedicament_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/retirermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirermedicament_pha_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/retirermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - // actualiser_pharmacien(); - } - }); -} - -function valider_pharmacie_cso() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à enregitrer! Confirmez-vous cette situation?"; - v_msgEng="Nothing to save! Do you confirm this situation?"; - } - else - { - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - } - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/enregistrerpharmacie/", - type: 'POST', - success: function(data) { - maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } -} - -function chercher_ordonnance(numeroBonOrdonnance) -{ - donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnance/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function chercher_ordonnance_opt(numeroBonOptique) -{ - if(numeroBonOptique<="0") - { - // actualiser_opticien(); - reinitialiser_opticien(); - return; - } - - donnees = 'numeroBonOptique='+numeroBonOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function chercher_ordonnance_lab(numeroBonExamen) -{ - donnees = 'numeroBonExamen='+numeroBonExamen; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressord(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonOrdonnance=$("#numeroBonOrdonnance").val(); - $("#numeroBonOrdonnance").blur(); - } -} - -function rechercherbonordonnance() -{ - numeroBonOrdonnance=$("#numeroBonOrdonnance").val(); - - if (numeroBonOrdonnance>" ") - { - chercher_ordonnance(numeroBonOrdonnance); - } -} - - -function ctrlkeypressordopt(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonOptique=$("#numeroBonOptique").val(); - $("#numeroBonOptique").blur(); - } -} - - -function ctrlkeypressordlab(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonExamen=$("#numeroBonExamen").val(); - $("#numeroBonExamen").blur(); - } -} - -function rechercherbonoptique() -{ - numeroBonOptique=$("#numeroBonOptique").val(); - - if (numeroBonOptique>" ") - { - chercher_ordonnance_opt(numeroBonOptique); - } -} - -function valider_presciption() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - if (numeroBonOrdonnance<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette ordonnance ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function ajaxchanger_type_bon() -{ - $("#msgErreur").html(""); -} - -function ajaxprixactemed() -{ - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter quantity!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantite").focus(); - - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixactemed/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function enregistreractemedical() -{ - acteExclu = $("#acteExclu").val(); - - autorisation = "0"; - - if(acteExclu==1) - { - autorisation = "2"; - - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - donnees="" - donnees_sav=""; - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - $("#nomMedecin").focus(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - prixTarif = $("#prixTarif").val(); - - if(prixActe==0 || parseFloat(prixActe)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - quantite = parseInt(quantite); - div_quantite.val(quantite); - - if(quantite==0) - { - div_quantite.focus(); - - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please neter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet acte?"; - v_msgEng="Do you confirm this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - prixActe = $("#prixActe").val(); - valeurActe = $("#valeurActe").val(); - - montantTm = $("#montantTm").val(); - aRembourser = $("#aRembourser").val(); - - ententePrealable = $("#ententePrealable").val(); - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&quantite='+quantite+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&valeurActe='+valeurActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/enregistreractemedical/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - feuillemaladie(); - } - }); - } -} - -function ajax_changer_qte_acte() -{ - codeActe = $("#codeActe").val(); - prixActe = $("#prixActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please neter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerqteacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_acte_medical(idPrestationactes, codeTypePrestation) -{ - v_msg="Confirmez-vous la suppression de cet acte?"; - v_msgEng="Do you confirm the removal of this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - feuillemaladie_ajax(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function supprimer_chambre(idChambre) -{ - v_msg="Confirmez-vous la suppression de cette chambre?"; - v_msgEng="Do you confirm the removal of this room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPrestationactes='+idChambre+'&codeTypePrestation=HOSP'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - attribution_chambre(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function ajaxinfosbonhospitalisation() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonHospitalisation = $("#numeroBonHospitalisation").val(); - numeroBonHospitalisation = parseInt(numeroBonHospitalisation); - if (numeroBonHospitalisation>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon Hospitalisation!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonhospitalisation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerhospitalisation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&numeroFeuilleMaladie='+numeroFeuilleMaladie; - donnees_sav = donnees+'&typeMail=mailhospitalisation'; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - typeSms="hospitalisation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerhospitalisation/enregistrerhospitalisation/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - - /* - mise en commentaire le 04/07/2019 - => pour les attributions automatiques, on ne connait - pas encore le No de bon - preparesms(typeSms); - */ - }, - complete: function() - { - /* - mise en commentaire le 04/07/2019 - => pour les attributions automatiques, on ne connait - pas encore le No de bon - mettremailattente(donnees_sav); - */ - - v_msg="Avis hospitalisation envoyé, souhaitez-vous ajouter une chambre?"; - v_msgEng="Hospitalization notice sent, would you like to add a room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - attribution_chambre(); - } - else - { - feuillemaladie(); - } - } - }); - } -} - -function ajaxprixchambre() -{ - $("#btn_enreg").disable(); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $("#infosacte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixchambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - - -function ajax_changer_duree_chambre() -{ - $("#btn_enreg").disable(); - - codeActe = $("#codeActe").val(); - prixActe = $("#prixActe").val(); - numeroChambre = $("#numeroChambre").val(); - - /* - alert("numeroChambre => "+numeroChambre); - return; - */ - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter duration!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - claculerfinchambre(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&numeroChambre='+numeroChambre; - - $("#infosacte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerdureechambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - - -function claculerfinchambre() -{ - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - var typdate = $("#debut").datepicker("getDate"); - typdate.setDate(typdate.getDate() + quantite -1); - - $( "#fin" ).datepicker( "setDate", typdate ); - - // contrôle du cheveauchement des dates - /* - var td1 = new Date($("#dateFinHospit").val()); - var td2 = $("#debut").datepicker("getDate"); - - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - $("#btn_enreg").disable(); - $("#debut").focus(); - - v_msg="Veuillez revoir vos dates!"; - v_msgEng="Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#btn_enreg").enable(); - */ -} - -function enregistrerchambre() -{ - acteExclu = $("#acteExclu").val(); - ententePrealable = $("#ententePrealable").val(); - - /* - alert('ententePrealable = '+ententePrealable); - return; - */ - - autorisation = "0"; - - if(acteExclu==1) - { - autorisation = "2"; - v_msg="Non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - prixTarif = prixActe; - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - quantite = parseInt(quantite); - div_quantite.val(quantite); - - if(quantite==0) - { - div_quantite.focus(); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // contrôle du cheveauchement des dates - - // mis en commentaire le 31/10/2018 BONA - /* - var td1 = new Date($("#dateFinHospit").val()); - var td2 = $("#debut").datepicker("getDate"); - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - $("#btn_enreg").disable(); - $("#debut").focus(); - - v_msg="Veuillez revoir vos dates!"; - v_msgEng="Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return; - } - // $("#btn_enreg").enable(); - */ - - numeroChambre = $("#numeroChambre").val(); - if (numeroChambre<=" ") - { - v_msg="Veuillez saisir le No de chambre!"; - v_msgEng="Please enter room number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroChambre").focus(); - return; - } - - v_msg="Confirmez-vous cette chambre?"; - v_msgEng="Do you confirm this room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees="" - donnees_sav=""; - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - prixActe = $("#prixActe").val(); - valeurActe = $("#valeurActe").val(); - - montantTm = $("#montantTm").val(); - aRembourser = $("#aRembourser").val(); - - debut = $("#debut").val(); - // $("#fin").enable(); - fin = $("#fin").val(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&valeurActe='+valeurActe; - donnees += '&montantTm='+montantTm+'&aRembourser='+aRembourser+'&debut='+debut+'&fin='+fin +'&numeroChambre='+numeroChambre; - donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif; - donnees += '&ententePrealable='+ententePrealable; - - // alert("donnees => "+donnees); - // return; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $("#btn_enreg_chambre").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerchambre/enregistrerchambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - v_msg="Enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - attribution_chambre(); - } - }); - } -} - -function actesmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Actesmedicaux/"); -} - -function optique() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - prescription_optique(); -} - -function pharmacien() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } -} - -function dossiers(okId) -{ - codeProfil = $("#codeProfil_C" ).val(); - - if(codeProfil=="PHA") - { - pharmacien(); - return; - } - - if(codeProfil=="OPT") - { - monture = $("#monture").val(); - - if(monture=="1") - { - window.location.assign($("#racineWeb" ).val()+"Monture/"); - return; - } - - opticien(); - return; - } - - if(codeProfil=="LAB") - { - laboratoire(); - return; - } - - if(codeProfil=="SEA") - { - seancekine(); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - - /* - else - { - // finger_id = $("#finger_id_C" ).val(); - finger_id = $("#okId" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - return; - } - - - if (prestation_possible()) - { - if (okId==1) - { - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - return; - } - else - { - okId=$("#okId" ).val(); - } - - if (okId==1) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextidentification/", - type : 'post', - error: function(errorData) { - }, - complete: function() { - if (prestation_possible()) - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - } - } - }); - } - else - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - } - } -} - -function afficher_beneficiaire_id_okId() -{ - idBeneficiaire=$("#idBeneficiaire_C").val(); - okId=$("#okId").val(); - okId_face=$("#okId_face").val(); - - if (idBeneficiaire>"") - { - ajax_context_beneficiaire_afficher(idBeneficiaire, okId, okId_face); - } -} - - -function ajax_context_beneficiaire_afficher(idBeneficiaire, okId, okId_face) -{ - donnees = 'idBeneficiaire='+idBeneficiaire+'&okId='+okId+'&okId_face='+okId_face; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/", - type : 'post', - data: donnees, - success: function(data) - { - $('#div_ok_face_info').html(data); - }, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - -function ajax_context_beneficiaire_afficher(idBeneficiaire, okId) -{ - donnees = 'idBeneficiaire='+idBeneficiaire+'&okId='+okId; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - -function facturer_cso(user_id) -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // verifier depasement - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite, souhaitez-vous continuer?"; - v_msgEng="Warning ! Overflow, Would you like to continue?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - } - // Fin verification depassement - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face").val("1"); - } - else - { - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailfacturationfeuillemaladie'; - - typeSms = "facturer_cso"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerfeuillemaladie/facturer/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - feuillemaladie(); - } - }); - -} - -function facturer_feuillemaladie() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numOrd = $("#numOrd").val(); - noPrescription = $("#noPrescription").val(); - - if (numOrd==0 && noPrescription==0) - { - v_msg="Attention, pas de presciption de médicaments!?"; - v_msgEng="Warning, no presciption of drugs!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - affectionObligatoire=$("#affectionObligatoire").val(); - codeAffection=$("#codeAffection").val(); - - if (affectionObligatoire=="1" && codeAffection<="0000") - { - v_msg="Diagnostique exigé!"; - v_msgEng="Diagnosis required!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleAffection").focus(); - $("#btn_pop_affection").click(); - - return; - } - - v_msg="Confirmez-vous la facturation?"; - v_msgEng="Do you confirm billing?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - - // alert("modeSaisieFacture="+modeSaisieFacture+" ; derogationFingerFacturation="+derogationFingerFacturation); - // return; - - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_cso(user_id_0); - return; - } - - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - - // alert("derogation_finger_en_cours="+derogation_finger_en_cours); - // return; - - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_cso(user_id_0); - return; - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id = $("#user_id_C").val(); - finger_id = $("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - // load("flexcode/user.php?"+data); - load("flexcode/user_facturation.php?"+data); - - } - } -} - -function facturer_pha() -{ - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - /* mis en commentaire le 31/07/2018 => permettre la multi-facturation - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailpharmacie'; - - typeSms = "facturer_pha"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrerpharmacie/", - type: 'POST', - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function valider_pharmacie_pha() -{ - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - estRempalace=$("#estRempalace").val(); - - if (estRempalace=="1") - { - v_msg="Remplacée!"; - v_msgEng="Replaced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroPrescription=$("#numeroPrescription_C").val(); - - if (numeroPrescription<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - /* mis en commentaire le 31/07/2018 => permettre la multi-facturation - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en pharmacie - /* - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_pha(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - - facturer_pha(); - } -} - -function valider_optique() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - nbVerres=$("#nbVerres").val(); - nbVerres = parseInt(nbVerres); - - if (nbVerres<1) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - numeroBonOptique=$("#numeroBonOptique").val(); - if (numeroBonOptique<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette ordonnance ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - feuillemaladie(); - }, - complete: function() { - } - }); - } -} - -function separateur_millier(montant) -{ - montant = parseInt(montant); - montant.toLocaleString(); - return montant.toLocaleString(); -} - -function ajaxinfosbonoptique() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonOptique = $("#numeroBonOptique").val(); - numeroBonOptique = parseInt(numeroBonOptique); - if (numeroBonOptique>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonoptique/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - - -function supprimer_optique(idOptique) -{ - v_msg="Confirmez-vous la suppression de ce verre?"; - v_msgEng="Do you confirm the removal of this glass?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerverre/supprimerverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#medicaments").html(data); - }, - error: function(data) { - }, - complete: function() { - prescription_optique(); - } - }); - } -} - - -function enregistreroptique() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreroptique/enregistreroptique/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_optique(); - } - }); - } -} - -function enregistrerverre() -{ - codeOptique = $("#codeOptique").val(); - if (codeOptique<=" ") - { - v_msg="Veuillez sélectionner un verre!"; - v_msgEng="Please select a glass!"; - alert_ebene(v_msg, v_msgEng); - $("#codeOptique").focus(); - return; - } - - v_msg="Confirmez-vous ces verres?"; - v_msgEng="Do you confirm these glasses?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'codeOptique='+codeOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerverre/enregistrerverre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - prescription_optique(); - }, - complete: function() { - } - }); - } -} - - -function valider_chambre() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette hospitalisation ?"; - v_msgEng="Do you confirm this hospitalization?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - - -function valider_opticien() -{ - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroOptique=$("#numeroOptique_C").val(); - - if (numeroOptique<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (idPrestationactes==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en magasin optique - /* - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_opt(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - facturer_opt(); - } -} - -function opticien() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - $("#okId_face" ).val("1"); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } -} - - -function envoyer_alert_tentative_fraude(user_id) -{ - /* - donnees = 'user_id='+user_id; - - idBeneficiaire = $("#idBeneficiaire_C").val(); - prestataire = $("#prestataire_C").val(); - - donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=mailfraudeidentite'; - - mettremailattente(donnees_sav); - */ -} - - -function ajouterverre_opt_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverretous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function ajouterverre_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirerverre_opt_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverretous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirerverre_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function facturer_opt() -{ - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (idPrestationactes==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailoptique'; - - typeSms = "facturer_opt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/enregistreroptique/", - type: 'POST', - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } - }); - -} - -function afficher_detail_generartionbon(idgenerationbon) -{ - if (idgenerationbon>"") - { - window.location.assign($("#racineWeb" ).val()+"Detailgenerationbon/"+idgenerationbon+"/"); - } -} - - -function maj_monture_temp(idOptique, monture) -{ - donnees = 'idOptique='+idOptique+"&monture="+monture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/majmonture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function supprimer_espace_nombre(nombre) -{ - nombre = nombre.replace(" ", ""); - - if(isNaN(nombre)) - { - v_msg = nombre+" n'est pas un nombre!"; - v_msgEng = nombre+" is not a number!"; - alert_ebene(v_msg, v_msgEng); - return '0'; - } - nombre = parseInt(nombre); - return nombre; -} - -function demander_derogation() -{ - window.location.assign($("#racineWeb" ).val()+"Demandederogation/"); -} - -function enregistrerdemandederogation() -{ - codeDerogation = $("#codeDerogation").val(); - - lst_libelleDerogation = document.getElementById("codeDerogation"); - libelleDerogation = lst_libelleDerogation.options[lst_libelleDerogation.selectedIndex].text.trim(); - - college_couvert=$("#college_couvert_C").val(); - if (college_couvert>0 && codeDerogation=="01") - { - v_msg="Attention! Cette personne a déjà accès à ce centre"; - v_msgEng="Warning! This person all ready have access to this center"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeDerogation<=" ") - { - v_msg="Veuillez sélectionner une dérogation!"; - v_msgEng="Please select an exemption!"; - alert_ebene(v_msg, v_msgEng); - $("#codeDerogation").focus(); - return; - } - - observations = $("#observations").val(); - if (observations<=" ") - { - v_msg="Veuillez saisir la motivation!"; - v_msgEng="Please select the motivation!"; - alert_ebene(v_msg, v_msgEng); - $("#observations").focus(); - return; - } - - v_msg="Confirmez-vous cette demande de dérogation?"; - v_msgEng="Do you confirm this request?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeDerogation='+codeDerogation+'&observations='+observations+'&libelleDerogation='+libelleDerogation; - - idBeneficiaire = $("#idBeneficiaire_C").val(); - prestataire = $("#prestataire_C").val(); - - - donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=maildemandederogation'; - - typeSms = "demandederogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandederogation/enregistrerdemandederogation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - preparesms(typeSms); - }, - complete: function() - { - mettremailattente(donnees_sav); - - v_msg="Demande envoyée avec succès!"; - v_msgEng="Request sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - liste_derogation(); - } - }); - } -} - -function liste_derogation() -{ - window.location.assign($("#racineWeb" ).val()+"Listederogations/"); -} - -function listerderogation() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function afficher_div_wait() -{ - // $("#div_page_complet").disable(); - // $("#div_wait").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); -} - -function effacer_div_wait() -{ - $("#div_wait").html(""); -} - -function consultationpha() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationpha/"); -} - -function consultationlab() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationlab/"); -} - -function consultationopt() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationopt/"); -} - -function consultationcso() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationcso/"); -} - -function consultationbenpha() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenpha/"); -} - -function consultationbenopt() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenopt/"); -} - -function consultationbencso() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbencso/"); -} - -function listerdossiercons_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbencso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function listerdossiercons() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationcsoentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationcso/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function afficher_feuille_maladie_cons() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_feuillemaladie(); - } - }); -} - -function afficher_feuille_maladie_cons_ben() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_feuillemaladie_ben(); - } - }); -} - -function consulter_prescription_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Prescriptionconsben/"); -} - -function consulter_chambre_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Chambreconsben/"); -} - -function consulter_optique_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Optiqueconsben/"); -} - -function consulter_feuillemaladie_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladieconsben/"); -} - -function consulter_prescription() -{ - window.location.assign($("#racineWeb" ).val()+"Prescriptioncons/"); -} - -function consulter_chambre() -{ - window.location.assign($("#racineWeb" ).val()+"Chambrecons/"); -} - -function consulter_optique() -{ - window.location.assign($("#racineWeb" ).val()+"Optiquecons/"); -} - -function consulter_feuillemaladie() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/"); -} - -// - -function prescription_medicament() -{ - actVisible=$("#actVisible").val(); - modeSaisieFacture=$("#modeSaisieFacture").val(); - saisirFactureDecompte=$("#saisirFactureDecompte").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (modeSaisieFacture="1" && saisirFactureDecompte!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescription/"); -} - -function livraison_pharmacie() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance=$("#numeroBonOrdonnance_C").val(); - - if (numeroBonOrdonnance==0) - { - v_msg="Aucune prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Pharmacie/"); -} - -function prescription_optique() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - saisirFactureDecompte=$("#saisirFactureDecompte").val(); - - if (modeSaisieFacture="1" && saisirFactureDecompte!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Optique/"); -} - -function attribution_chambre() -{ - window.location.assign($("#racineWeb" ).val()+"Chambre/"); -} - -function feuillemaladie() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladie/"); -} - -function feuillemaladie_ajax() -{ - $("#div_feuillemaladie").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfeuillemaladie/", - type: 'POST', - success: function(data) { - $("#div_feuillemaladie").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function recherche() -{ - window.location.assign($("#racineWeb" ).val()+"Recherche/"); -} - -function requetes() -{ - codeProfil = $("#codeProfil_C" ).val(); - - if(codeProfil=="PHA") - { - consultationpha(); - return; - } - - if(codeProfil=="OPT") - { - consultationopt(); - return; - } - - if(codeProfil=="CSO") - { - consultationcso(); - return; - } - - if(codeProfil=="LAB") - { - consultationlab(); - return; - } - - if(codeProfil=="SEA") - { - consultationsea(); - return; - } -} - -// - -function lister_factures_pha_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenpha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function lister_factures_opt_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_pha_ben(idFacture, numeroBonOrdonnance, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_pha_ben(); - } - }); - } -} - -function afficher_facture_cons_pha(idFacture, numeroBonOrdonnance, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_pha(); - } - }); - } -} - -function consulter_facture_pha_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Pharmacienconsben/"); -} - -function consulter_facture_pha() -{ - window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/"); -} - -function afficher_facture_cons_opt_ben(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique; - donnees += '&codePrestataireLivraison='+codePrestataireLivraison; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfactureopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_opt_ben(); - } - }); - } -} - -function consulter_facture_opt_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Opticienconsben/"); -} - -function consultations() -{ - window.location.assign($("#racineWeb" ).val()+"Consultations/"); -} - - -function listerdossiercons_pha() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationphaentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationpha/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function listerdossiercons_opt() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationoptentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationopt/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_opt(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique; - donnees += '&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfactureopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_opt(); - } - }); - } -} - -function consulter_facture_opt() -{ - window.location.assign($("#racineWeb" ).val()+"Opticiencons/"); -} - -function liste_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Listedecomptes/"); -} - -function listerdecomptes() -{ - codeExercice = $("#codeExercice").val(); - // codeMois = $("#codeMois").val(); - codeEtatDecompte = $("#codeEtatDecompte").val(); - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - $("#codeExercice").focus(); - return; - } - - donnees = 'codeExercice='+codeExercice+'&codeEtatDecompte='+codeEtatDecompte; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistedecomptes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - } - }); -} - -function consulterdecompte(idReglement) -{ - donnees = 'idReglement='+idReglement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_decompte(); - } - }); -} - -function afficher_decompte() -{ - // $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - - -function sortirdexclusionstandards() -{ - idBeneficiaire = $("#idBeneficiaire_C").val(); - idAdherent_C = $("#idAdherent_C" ).val(); - - - if (idBeneficiaire>"0") - { - afficher_beneficiaire_id(); - } - if (idAdherent_C>"0") - { - afficher_adherent_id(); - } - else - { - recherche(); - } -} - -function exclusionstandards() -{ - window.location.assign($("#racineWeb" ).val()+"Exclusionstandards/"); -} - - -function envoimaildivers(datamail) -{ - // var url_mail = "http://testprestation.medicare.rw/Cron/Ajaxenvoimaildivers.php?"+datamail; - - lienMail = $("#lienMail_C").val(); - var url_mail = lienMail+"/Cron/Ajaxenvoimaildivers.php?"+datamail; - - $.ajax({ - url : url_mail, - type : "GET", - error : function(errorData) { - }, - success :function(data) - { - } - }); -} - -function mettremailattente(datamail) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmailattente/ajouter/", - type: 'POST', - data: datamail, - success: function(data) - { - }, - error: function(errorData) - { - }, - complete: function() - { - } - }); -} - - -function preparesms(typeSms) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - codeLangueSociete = $("#codeLangueSociete").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "1"; - - if (typeSms=="demandederogation") - { - p_destinataires = $("#smsDerogation_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Request for exemption : " : "Demande derogation pour : "; - p_message += libelleDerogation; - - } - - if (typeSms=="ententeprealable") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement" : "Alerte : Accord prealable"; - } - - if (typeSms=="hospitalisation") - { - p_destinataires = $("#smsMedecinConseil_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Hospit. form No : " : "No Bon Hospit. : "; - p_message += numeroBon; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Hospitalization notification" : "Avis Hospitalisation"; - } - - if (typeSms=="autorisation") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert : Request authorization for excluded act" : "Alerte : Demande autorisation pour acte exclu"; - } - - if (typeSms=="commandebon") - { - p_destinataires = $("#smsGestionBon_C").val(); - - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Order of claims form " : "Commande de bons de PEC"; - p_message += "\n"; - p_message += "Quantit. : "+quantite+" "; - p_message += "\n"; - p_message += "Type : "+libelleBon+"."; - } - - if (typeSms=="ententeprealablepha") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for pharmacy" : "Alerte : Accord prealable pharmacie"; - } - - if (typeSms=="accident") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Circulation accident" : "Alerte : Accident de la circulation"; - } - - if (typeSms=="ententeprealableopt") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for glasses" : "Alerte : Accord prealable verres"; - } - - if (typeSms=="ententeprealablemont") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for optical frames" : "Alerte : Accord prealable monture"; - } - - envoyersms(p_destinataires, p_message, creation_message); -} - - -function liste_ententeprealable() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/"); -} - -function liste_exclusions() -{ - window.location.assign($("#racineWeb" ).val()+"Listeexclusions/"); -} - -function alerter_depassement_limite() -{ - fraisExcluLivre=$("#fraisExcluLivre").val(); - fraisExcluLivre = parseInt(fraisExcluLivre); - - if (fraisExcluLivre>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function alerter_depassement_limite_cso() -{ - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function maj_fraisexclu_cso() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdepassementlimitefeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - $("#div_fraisExclu").html(data); - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function consommables() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facturerConsommable=$("#facturerConsommable").val(); - if (facturerConsommable!="1") - { - v_msg="Consommables non facturés!"; - v_msgEng="Consumables not invoiced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - ajoutConsommable = $("#ajoutConsommable").val(); - - if (ajoutConsommable!="1") - { - v_msg="Déjà inclu dans les actes ! Souhaitez-vous continuer?"; - v_msgEng="Already included in the acts ! Would you like to continue?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Consommables/"); - return; - } - else - { - return; - } - } - window.location.assign($("#racineWeb" ).val()+"Consommables/"); -} - - -function afficher_recherche_consommable() -{ - nomConsommable = $("#nomConsommable").val(); - - if (nomConsommable > " ") - { - donnees = "nomConsommable="+nomConsommable; - - $("#div_listeconsommable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listeconsommable").html(data); - } - }); - } -} - -function ajouter_consommable(idConsommable, libelleConsommable) -{ - if (libelleConsommable<=" ") - { - v_msg="Veuillez sélectionner un consommable!"; - v_msgEng="Please select a consumable!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Ajouter : "+libelleConsommable+"?"; - v_msgEng="Add : "+libelleConsommable+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idConsommable='+idConsommable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/ajouterconsommable/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - }, - complete: function() { - // afficher_consommable(); - feuillemaladie(); - } - }); - } -} - -function ajax_maj_qte_consommable(idConsommable, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idConsommable='+idConsommable+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function ctrlkeypressconsommable(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_recherche_consommable(); - } -} - -function afficher_consommable() -{ - $("#div_listeconsommable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherconsommables/", - error: function(errorData) { - }, - success: function(data) { - $("#div_listeconsommable").html(data); - $("#libelleconsommable").focus(); - } - }); -} - -function changer_type_bon() -{ - $("#nbligne_info").val("0"); - afficherbon_vide(); -} - -function afficher_pop_recherche_medecin() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecins/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - }, - complete: function() { - } - }); -} - - - -function afficher_pop_recherche_actes_possibles() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactespossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - - -function ctrlkeypress_medecin(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin(); - } -} - - -function ctrlkeypress_actes_cons(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_cons(); - } -} - - -function ctrlkeypress_actes_possibles(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_possibles(); - } -} - - -function selectionner_medecin(codeMedecin, nomMedecin, noOrdreMedecin) -{ - if(noOrdreMedecin+codeMedecin<=" ") - return; - - v_msg="Confirmez-vous ce Médecin : "+nomMedecin+"?"; - v_msgEng="Do you confirm this Doctor : "+nomMedecin+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - - if(codeMedecin=="ZZZZ") - { - $("#medecinManquant").readable(); - $("#codeSpecialiteManuel").enable(); - - } - else - { - $("#medecinManquant").unreadable(); - $("#codeSpecialiteManuel").disable(); - } - - $("#close_pop").click(); - } -} - -function maj_prix_actemedical() -{ - prixTarif = $("#prixTarif").val(); - prixNew = $("#prixNew").val(); - - if(prixNew==0 || parseFloat(prixNew)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixNew").focus(); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter quantity!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantite").focus(); - - return; - } - - ententePrealable = $("#ententePrealable").val(); - acteExclu = $("#acteExclu").val(); - acteChirurgie = $("#acteChirurgie").val(); - - donnees = 'prixNew='+prixNew+'&quantite='+quantite+'&prixTarif='+prixTarif; - donnees += '&ententePrealable='+ententePrealable+'&acteExclu='+acteExclu+'&acteChirurgie='+acteChirurgie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajprixactemed/", - type : 'post', - data : donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#btn_close_pop_tarif").click(); - } - }); -} - -function afficher_pop_tarif() -{ - prixActe = $("#prixActe").val(); - $("#prixNew").val(prixActe); - $("#btn_pop_tarif").click(); -} - -function demanderaccordacteexclu() -{ - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - -} - -function demanderaccordchambreexclu() -{ - - v_msg="Attention! Chambre exclue. Demander un accord?"; - v_msgEng="Warning! Non covered room. Request Agreement?"; - alert_ebene(v_msg, v_msgEng); - return; -} - -function substituer_medicament(idMedicament) -{ - v_msg="Substituer ce médicament?"; - v_msgEng="Substitute this drug?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsubstitutionmedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_substitution").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); - } -} - - -function annuler_substitution_medicament(idMedicament) -{ - v_msg="Annuler cette substitution?"; - v_msgEng="Cancel this substitution?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/annulersubstitutionmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -} - - -function enregistrersubstituion_medicament() -{ - idMedicament = $("#idMedicament").val(); - prixTarif = $("#prixTarif").val(); - prixSubstitut = $("#prixSubstitut").val(); - - if(prixSubstitut==0 || parseFloat(prixSubstitut)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette substitution ?"; - v_msgEng="Do you confirm this substitution?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament+'&prixSubstitut='+prixSubstitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrersubstitutionmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#btn_close_pop").click(); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -} - -function selectionner_acte_cons(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - ajaxactespossibles(); - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeActe").val(codeActe); - ajaxprixacte(); - - $("#libelleActe").val(libelleActe); - $("#close_pop_acte").click(); - } -} - -function afficher_pop_recherche_actes_cons() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_cons").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactescons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_cons").html(data); - } - }); -} - -function selectionner_acte_possibles(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - // ajaxactespossibles(); - ajaxactespossibles_med(); - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeActe").val(codeActe); - ajaxprixactemed(); - - $("#libelleActe").val(libelleActe); - $("#close_pop_acte").click(); - } -} - -function ctrlkeypress_pha(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament_pha(); - } -} - -function afficher_pop_recherche_medicament_pha() -{ - nomsearch = $("#nomsearch").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - $("#div_listemedicament").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament").html(data); - } - }); - } -} - - -function prescrire_medicament_pha() -{ -// Ajout à la prescription - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - codeMedicament = $("#codeMedicament_pop").val(); - - - libelleMedicament = $("#libelleMedicament_pop").val(); - - if (codeMedicament<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'codeMedicament='+codeMedicament; - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // alert(donnees); - // return; - - v_msg="Prescrire : "+libelleMedicament+"?"; - v_msgEng="Prescribe : "+libelleMedicament+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamentprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_medicament").click(); - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -// Fin Ajout à l aprescription -} - -function raffraichier_detail_prescription() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailordonnance/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#ordonnance").html(data); - }, - complete: function() { - } - }); -} - -function actualiser_pharmacien() -{ - /* modif du 15/11/2018 - // window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - actualiser_saisie_pharmacien(); - */ - - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); -} - -function ajax_maj_qte_medicament_pha(idMedicament, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majquantitepha/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function prescription_examen() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescriptionexamen/"); -} - -function valider_presciption_examens() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbExamens=$("#nbExamens").val(); - nbExamens = parseInt(nbExamens); - - /* On peut saisir juste le No de bon - sans saisir le détail de la prescription - - if (nbExamens<1) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - numeroBonExamen=$("#numeroBonExamen").val(); - if (numeroBonExamen<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - /* - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/", - url: $("#racineWeb").val()+"Ajaxenregistrerexamen/viderexamentemp/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - feuillemaladie(); - }, - complete: function() { - } - }); - */ - } -} - -function ajaxinfosbonprescriptionexamen() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonExamen = $("#numeroBonExamen").val(); - numeroBonExamen = parseInt(numeroBonExamen); - if (numeroBonExamen>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_examen(idExamen) -{ - v_msg="Confirmez-vous la suppression de cet examen?"; - v_msgEng="Do you confirm the removal of this exam?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/supprimer/", - type: 'POST', - data: donnees, - success: function(data) { - $("#examens").html(data); - }, - error: function(data) { - }, - complete: function() { - prescription_examen(); - } - }); - } -} - -function enregistrerprescriptionexamen() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionexamen/enregistrerprescriptionexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_examen(); - } - }); - } -} - -function ctrlkeypress_examens_possibles(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_examens_possibles(); - } -} - -function afficher_pop_recherche_examens_possibles() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteexamenspossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function ajouter_examen_possible(codeActe, libelleActe, acteExclu, ententePrealable) -{ - typeSms="ententeprealable"; - - if(libelleActeSearch<=" ") - { - return; - } - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - if (ententePrealable==1) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/ajouterexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - if(ententePrealable==1) - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - // prescription_examen(); - - }, - complete: function() { - if(ententePrealable==1) - { - mettremailattente(donnees_sav); - } - - prescription_examen(); - - } - }); - } -} - -function ajax_maj_qte_examen(idExamen, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - $("#examens").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function examensmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen==0) - { - v_msg="Aucun examen prescrit!"; - v_msgEng="No prescribed exam!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/"); -} - - -function valider_examen_cso() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (nbLivre<1) - { - v_msg="Rien à enregitrer!"; - v_msgEng="Nothing to save!"; - - alert_ebene(v_msg, v_msgEng); - feuillemaladie(); - } - else - { - v_msg="Confirmez-vous ces examens?"; - v_msgEng="Do you confirm these exams?"; - } - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/enregistrerexamen/", - type: 'POST', - success: function(data) { - maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } -} - -function ajouterexamen_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function ajouterexamen(idExamen, ententePrealable, codeActe) -{ - donnees = 'idExamen='+idExamen+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - typeSms="ententeprealable"; - - if (ententePrealable==9) - { - v_msg="Acte refusé!"; - v_msgEng="Act refused!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (ententePrealable==2) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - error: function(data) { - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - } - }); -} - -function retirerexamen_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirerexamen(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_limite_avant_facturation_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecons/"); - */ -} - -function consulter_limite_avant_facturation() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacture/"); - */ -} - - - -function consulter_limite_avant_facturation_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureconsben/"); - */ -} - -function consulter_limite_avant_facturation_pha() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturepha/"); - */ -} - -function consulter_limite_avant_facturation_pha_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephacons/"); - */ -} - -function consulter_limite_avant_facturation_pha_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephaconsben/"); - */ -} - -function actualiser_opticien() -{ - window.location.assign($("#racineWeb" ).val()+"Opticien/"); -} - -function reinitialiser_opticien() -{ - window.location.assign($("#racineWeb" ).val()+"Opticien/0"); -} - - -function consulter_limite_avant_facturation_opt() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureopt/"); - */ -} - -function consulter_limite_avant_facturation_opt_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptcons/"); - */ -} - -function consulter_limite_avant_facturation_opt_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptconsben/"); - */ -} - -function ajouterexamen_lab_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function ajouterexamen_lab(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function retirerexamen_lab(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function ctrlkeypress_examens_possibles_lab(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_examens_possibles_lab(); - } -} - -function afficher_pop_recherche_examens_possibles_lab() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteexamenspossibleslab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function consulter_limite_avant_facturation_lab() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelab/"); - */ -} - -function actualiser_laboratoire() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); -} - -function valider_examen_lab() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces actes?"; - v_msgEng="Do you confirm those acts?"; - // alert_ebene(v_msg, v_msgEng); - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function retirerexamen_lab_tous() -{ - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - // actualiser_pharmacien(); - } - }); -} - -function facturer_lab(user_id) -{ - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo'; - - typeSms = "facturer_lab"; - - donnees_retour =""; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - } - }); -} - -function prescrire_examen_lab(codeActe, libelleActe, acteExclu, ententePrealable) -{ - typeSms="ententeprealable"; - - if(libelleActeSearch<=" ") - { - return; - } - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - if (ententePrealable==1) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamenprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_acte").click(); - $("#livraison").html(data); - - if(ententePrealable==1) - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable==1) - { - mettremailattente(donnees_sav); - } - alerter_depassement_limite(); - } - }); - } -} - -function enregistrer_nv_consommables() -{ - libelleconsommable = $("#libelleconsommable").val(); - - if (libelleconsommable<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter tyhe name!"; - alert_ebene(v_msg, v_msgEng); - $("#libelleconsommable").focus(); - return; - } - - quantiteconsommable=$("#quantiteconsommable").val(); - quantiteconsommable=quantiteconsommable.replace(",","."); - $("#quantiteconsommable").val(quantiteconsommable); - - if(isNaN(quantiteconsommable)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantiteconsommable").val("0"); - $("#quantiteconsommable").focus(); - return; - } - - if(quantiteconsommable==0) - { - $("#quantiteconsommable").focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - prixconsommable=$("#prixconsommable").val(); - prixconsommable=prixconsommable.replace(",","."); - $("#prixconsommable").val(prixconsommable); - - if(isNaN(prixconsommable)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixconsommable").val("0"); - $("#prixconsommable").focus(); - return; - } - - if(prixconsommable==0) - { - $("#prixconsommable").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'libelleconsommable='+libelleconsommable+'&prixconsommable='+prixconsommable+'&quantiteconsommable='+quantiteconsommable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/creerconsommable/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); -} - -function ajax_maj_prix_consommable(idConsommable, valeurActe, controle) -{ - valeurActe=valeurActe.replace(",","."); - controle.value=valeurActe; - - if(controle_numerique(controle)) - { - if(valeurActe==0) - { - controle.focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idConsommable='+idConsommable+"&valeurActe="+valeurActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/majprix/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function remplacer_feuillemaladie() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Remplacerfeuille/"); -} - -function ajaxinfosremplacerbonconsultation() -{ - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerremplacementconsultation() -{ - numeroBonSave = $("#numeroBonSave").val(); - - motifremplacement = $("#motifremplacement").val(); - - if (motifremplacement<=" ") - { - v_msg="Veuillez saisir le otif du remplacement!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifremplacement").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - OldnumeroBon = $("#OldnumeroBon").val(); - - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement; - - // donnees += '&dateSurvenance='+dateSurvenance+'&observations='+observations+'&prixActe='+prixActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/enregistrerremplacementconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - v_msg="Feuille remplacée avec succès!"; - v_msgEng="Replaced successfully!"; - alert_ebene(v_msg, v_msgEng); - - feuillemaladie(); - } - }); - } -} - -function remplacer_ordonnance() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturé, vous pouvez modifier l\'ordonnance!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - /* - if (numeroBonOrdonnance<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - fiche_remplacer_ordonnance(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#remplacerordonnance").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&remplacerordonnance=1"; - - load("flexcode/user.php?"+data); - } -} - -function fiche_remplacer_ordonnance() -{ - window.location.assign($("#racineWeb" ).val()+"Remplacerordonnance/"); -} - -function ajaxinfosremplacerordonnance() -{ - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerremplacementordonnance() -{ - numeroBonSave = $("#numeroBonSave").val(); - - motifremplacement = $("#motifremplacement").val(); - - if (motifremplacement<=" ") - { - v_msg="Veuillez saisir le otif du remplacement!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - $("#motifremplacement").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - OldnumeroBon = $("#OldnumeroBon").val(); - - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/enregistrerremplacementordonnance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - v_msg="Ordonnance remplacée avec succès!"; - v_msgEng="Replaced successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - } - }); - } -} - -function afficher_laboratoire_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoirecso/"); -} - - -function afficher_seance_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Kinecso/"); -} - -function consulter_limite_avant_facturation_lab_cso() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcso/"); - */ -} - -function rechercherbonexamen_lab() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab(numeroBonExamen); - } -} - -function rechercherbonexamen_lab_cso() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab_cso(numeroBonExamen); - } -} - -function chercher_ordonnance_lab_cso(numeroBonExamen) -{ - donnees = 'numeroBonExamen='+numeroBonExamen; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_laboratoire_cso(); - } - }); -} - -function valider_examen_lab_cso() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // alert("nbLivre => "+nbLivre); - // return; - - // if (facture==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces actes?"; - v_msgEng="Do you confirm those acts?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab_cso(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id = $("#user_id_C").val(); - finger_id = $("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_lab_cso(user_id) -{ - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo'; - - typeSms = "facturer_lab"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_laboratoire_cso(); - - } - }); -} - -function prescription_seance() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescriptionseance/"); -} - - -function seances() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroPrescriptionKine=$("#numeroPrescriptionKine_C").val(); - - if (numeroPrescriptionKine==0) - { - v_msg="Aucune séance prescrite!"; - v_msgEng="No prescribed session!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Seances/"); -} - -function ajaxinfosbonprescriptionseance() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonKine = $("#numeroBonKine").val(); - numeroBonKine = parseInt(numeroBonKine); - if (numeroBonKine>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerprescriptionseance() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/enregistrerprescriptionseance/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_seance(); - } - }); - } -} - -function modifierprescriptionseance() -{ - acteExclu = $("#acteExclu").val(); - ententePrealable = $("#ententePrealableSea").val(); - autorisation = "0"; - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeActePrescription = $("#codeActe").val(); - - if (codeActePrescription<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeActePrescription").focus(); - return; - } - - quantite =$("#quantite").val(); - - quantite = parseInt(quantite); - - if(quantite<1) - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - // $("#quantite").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - /* - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - montantTm =$("#montantTm").val(); - montantArembourser =$("#aRembourser").val(); - fraisReel =$("#totalActe").val(); - - donnees = 'codeActePrescription='+codeActePrescription +'&quantite='+quantite +'&prixActe='+prixActe; - donnees += '&montantTm='+montantTm +'&montantArembourser='+montantArembourser +'&fraisReel='+fraisReel; - donnees += '&ententePrealable='+ententePrealable; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActePrescription+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActePrescription+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $("#btn_enreg_seance").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/modifierprescriptionseance/", - type : 'post', - data: donnees, - error: function(errorData) { - $("#msgErreur").html(errorData); - }, - success: function(data) { - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() - { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_seance(); - } - }); - } -} - -function ajaxprixseance() -{ - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - // $("#quantite_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // on va griser le bouton btn_enreg_seance - $("#btn_enreg_seance").disable(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixseance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function valider_presciption_seances() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonKine=$("#numeroBonKine").val(); - if (numeroBonKine<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - codeActePrescription = $("#codeActePrescription").val(); - - if (codeActePrescription<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_prescrire").click(); - - return; - } - - nbSeance=$("#nbSeance").val(); - nbSeance = parseInt(nbSeance); - - if (nbSeance<1) - { - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_prescrire").click(); - - return; - } - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function valider_seance_cso() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Veuillez sélectionner un bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_InitSession").click(); - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - // div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm these sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees = 'codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailseance/enregistrerseance/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - - maj_fraisexclu_cso(); - }, - error: function(data) - { - }, - complete: function() - { - feuillemaladie(); - } - }); - } -} - -function actualiser_seance() -{ - window.location.assign($("#racineWeb" ).val()+"Seances/"); -} - -// SEANCES KINE -function valider_seance_sea_cso() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - quantiteSeance=$("#quantiteSeance").val(); - - if (quantiteSeance<=0) - { - v_msg="Veuillez revoir la quantité!"; - v_msgEng="Please review the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - fraisRetenuSeance=$("#fraisRetenuSeance").val(); - - if (fraisRetenuSeance<=0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm those sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea_cso(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - // load("flexcode/user.php?"+data); - load("flexcode/user_facturation.php?"+data); - } - } -} - -function facturer_sea_cso(user_id) -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - cout = $("#cout").val(); - - if (cout==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine'; - - typeSms = "facturer_sea"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - // donnees += '&codeGestionBon='+codeGestionBon; - donnees_substitut += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/", - type: 'POST', - data: donnees_substitut, - success: function(data) - { - // $('#div_test_gabarit').html(data); - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_seance_cso(); - } - }); - -} - -function rechercherbonkine_sea() -{ - numeroBonKine=$("#numeroBonKine").val(); - - if (numeroBonKine>" ") - { - chercher_ordonnance_sea(numeroBonKine); - } -} - -function chercher_ordonnance_sea(numeroBonKine) -{ - $("#numeroBonSeance_C").val("-1"); - donnees = 'numeroBonKine='+numeroBonKine; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Kine/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressordsea(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonKine=$("#numeroBonKine").val(); - $("#numeroBonKine").blur(); - } -} - -function rechercherbonkine_sea_cso() -{ - numeroBonKine=$("#numeroBonKine").val(); - - if (numeroBonKine>" ") - { - chercher_ordonnance_sea_cso(numeroBonKine); - } -} - -function chercher_ordonnance_sea_cso(numeroBonKine) -{ - $("#numeroBonSeance_C").val("-1"); - donnees = 'numeroBonKine='+numeroBonKine; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Kinecso/"); - }, - error: function(data) { - }, - complete: function() { - } - }); - -} - - -function ajaxinfosbonseancekine() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg_bon_kine").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerbonsseancekine() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - if (codeGestionBon=="0") - { - numeroBonSave = $("#numeroBonSave").val(); - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - } - else - { - // numeroBon = "-1"; - numeroBon = "1"; - v_msg="Confirmez-vous ce dossier?"; - v_msgEng="Do you confirm this claim?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = "numeroBon="+numeroBon; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/attributionbontemporaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - afficher_facturation_seance(); - } - }); - } -} - - -function afficher_facturation_seance() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_session").click(); - $("#div_facturation_seance").html(data); - }, - complete: function(data) { - $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val()); - } - }); -} - -function ajaxprixseancesea() -{ - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - $("#prixActe_info").val("0"); - $("#totalActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.val(1); - - quantite = 1; - /* - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - */ - } - - div_nbRestant = $("#nbRestant"); - nbRestant = div_nbRestant.val(); - nbRestant = parseInt(nbRestant); - - if(quantite>nbRestant) - { - // div_quantite.focus(); - v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!"; - v_msgEng="Only "+nbRestant+" sessions are possible!"; - alert_ebene(v_msg, v_msgEng); - - // return; - quantite = 0; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixseancesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -// Facturation SEANCE KINE - -function valider_seance_sea() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - fraisRetenuSeance=$("#fraisRetenuSeance").val(); - - if (fraisRetenuSeance<=0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm those sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_sea(user_id) -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - cout = $("#cout").val(); - - if (cout==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine'; - - typeSms = "facturer_sea"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees_substitut += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/", - type: 'POST', - data: donnees_substitut, - success: function(data) - { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - // window.location.assign($("#racineWeb" ).val()+"Kine/"); - afficher_seance_kine(); - } - }); -} - -/* -function rechercherbonexamen_lab_cso() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab_cso(numeroBonExamen); - } -} -*/ - -// 19/11/2017 - -function enregistrerbonsseancekinecso() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - if (codeGestionBon=="0") - { - numeroBonSave = $("#numeroBonSave").val(); - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - } - else - { - // numeroBon = "-1"; - numeroBon = "1"; - v_msg="Confirmez-vous ce dossier?"; - v_msgEng="Do you confirm this claim?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "numeroBon="+numeroBon; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/attributionbontemporaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - afficher_facturation_seance_cso(); - } - }); - } -} - - -function afficher_facturation_seance_cso() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/", - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_session").click(); - $("#div_facturation_seance").html(data); - }, - complete: function(data) { - $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val()); - } - }); -} - - -function ajaxinfosbonseancekinecso() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg_bon_kine").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function ajaxmajquteseancecso() -{ - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_nbRestant = $("#nbRestant"); - nbRestant = div_nbRestant.val(); - nbRestant = parseInt(nbRestant); - - if(quantite>nbRestant) - { - div_quantite.focus(); - v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!"; - v_msgEng="Only "+nbRestant+" sessions are possible!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#btn_enreg_seance").disable(); - - donnees = 'prixActe='+prixActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/modifierseancecso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $("#infoseance").html(data); - }, - complete: function() { - afficher_facturation_seance_cso(); - } - }); -} - - - -function consulter_limite_avant_facturation_kinecso(idFacture) -{ - /* - if (idFacture<=0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekinecso/"+idFacture+"/"); - */ -} - - -function consulter_limite_avant_facturation_kine(idFacture) -{ - /* - if (idFacture<=0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekine/"+idFacture+"/"); - */ -} - -function afficher_seance_kine() -{ - window.location.assign($("#racineWeb" ).val()+"Kine/"); -} - -// consulatation_ben - -function consultationbenlab() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenlab/"); -} - -function consultationbensea() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbensea/"); -} - -function laboratoire() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && (okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - } -} - - -function seancekine() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - if (okId!=1 && okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Kine/"); - } -} - -function afficher_facture_cons_lab(idFacture, numeroBonExamen, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturelab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_lab(); - } - }); - } -} - -function consulter_facture_lab() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoirecons/"); -} - -function consulter_limite_avant_facturation_lab_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcons/"); - */ -} - -function afficher_facture_cons_lab_ben(idFacture, numeroBonExamen, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturelab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_lab_ben(); - } - }); - } -} - -function consulter_facture_lab_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoireconsben/"); -} - -function consulter_limite_avant_facturation_lab_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabconsben/"); - */ -} - -function listerdossiercons_lab() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationlabentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationlab/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function lister_factures_lab_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenlab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function consultationsea() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationsea/"); -} - -function listerdossiercons_sea() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationseaentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationsea/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function consulter_facture_sea() -{ - window.location.assign($("#racineWeb" ).val()+"Kinecons/"); -} - -function consulter_limite_avant_facturation_sea_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseacons/"); - */ -} - -function lister_factures_sea_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxconsultationbenlab/", - url: $("#racineWeb").val()+"Ajaxconsultationbensea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_sea(idFacture, numeroBonKine, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_sea(); - } - }); - } -} - - -function afficher_facture_cons_sea_ben(idFacture, numeroBonKine, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_sea_ben(); - } - }); - } -} - -function consulter_facture_sea_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Kineconsben/"); -} - -function consulter_limite_avant_facturation_sea_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseaconsben/"); - */ -} - -function ctrlkeypress_numeroBon(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroBon").blur(); - } -} - -function verifier_feuille_maladie_dec_cons(numeroFeuilleMaladie, idFacture) -{ - $("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie); - numeroDecompte = $("#numeroDecompte").val(); - - // if (numeroFeuilleMaladie>"") - if (idFacture>"") - { - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture; - - codeTypePrestataire = $("#codeTypePrestataire_C").val(); - - if(codeTypePrestataire=="CSO" || codeTypePrestataire=="LAB" || codeTypePrestataire=="SEA") - { - - verifier_feuille_maladie_dec_cso_cons(donnees); - } - else - if(codeTypePrestataire=="PHA") - { - verifier_feuille_maladie_dec_pha_cons(donnees); - } - else - if(codeTypePrestataire=="OPT") - { - verifier_feuille_maladie_dec_opt_cons(donnees); - } - } -} - - -function imprimerbordereaudecompte() -{ - idReglement = $("#idReglement").val(); - - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerbordereaudecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function verifier_feuille_maladie_dec_cso_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturecons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_pha_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturephacons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_opt_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfactureoptcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function limite_avant_facture_dec(idFacture) -{ - donnees = 'idFacture='+idFacture; - $.ajax({ - url: $("#racineWeb").val()+"AjaxPlafondavantfacturecdec/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_limites").html(data); - }, - complete: function() { - } - }); -} - -function demander_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Initdemandedecompte/"); -} - -function initierdemandedecompte() -{ - codeExercice=$("#codeExercice").val(); - codeMois=$("#codeMois").val(); - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice").focus(); - - return; - } - - if (codeMois<=" ") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois").focus(); - return; - } - - donnees = 'codeExercice='+codeExercice+'&codeMois='+codeMois; - - // $("#div_dossiers").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdemandedecompte/initierdemandedecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#inforegle").html(data); - }, - complete: function() { - regle=$("#regle").val(); - - if(regle==-1) - { - v_msg="Problème lors de l\'initialisation!"; - v_msgEng="Problem during initialization!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - else - { - afficher_demande_decompte(); - } - } - }); -} - -function afficher_demande_decompte() -{ - $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - window.location.assign($("#racineWeb" ).val()+"Demandedecompte/"); -} - - -function imprimerbordereaudemandedecompte() -{ - idDemandeDecompte = $("#idDemandeDecompte").val(); - - if (idDemandeDecompte>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandedecompte/imprimerdemandecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function rechargerdemandedecompte() -{ - $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdemandedecompte/rechargerdemandedecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - afficher_demande_decompte(); - }, - complete: function() { - } - }); -} - -function actualiser_decompte() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - -function monture() -{ - $("#monture").val("1"); - - if (prestation_possible()) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - - /* MAJ du 06/06/2019 => proposition de Pascal => les magasins d'optique n'ont pas de lecteurs d'empriente - modeSaisieFacture=$("#modeSaisieFacture").val(); - if(modeSaisieFacture=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - */ - } -} - -function actualiser_monture() -{ - window.location.assign($("#racineWeb" ).val()+"Monture/"); -} - -function valider_monture() -{ - dejaFacture=$("#dejaFacture").val(); - - // alert("dejaFacture =>" +dejaFacture); - // return; - - if (dejaFacture=="1") - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - ententePrealableMont=$("#ententePrealableMont").val(); - - nbActesMonture=$("#nbActesMonture").val(); - - if (nbActesMonture>0 && ententePrealableMont!=1) - { - /* - v_msg="Montures déjà livrées une fois!"; - v_msgEng="Frames already delivered once!"; - */ - v_msg="Veuillez demander une autorisation!"; - v_msgEng="Please ask for an authorization!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroFacture=$("#numeroFacture").val(); - - if (numeroFacture<=" ") - { - v_msg="Veuillez saisir le No de la facture!"; - v_msgEng="Please enter the Invoice No!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroFacture").focus(); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - facturer_monture(user_id_0); - - /* MAJ du 06/06/2019 => proposition de Pascal => les magasins d'optique n'ont pas de lecteurs d'empriente - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_monture(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_monture(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - } -} - -function maj_monture_temp_monture(idOptique, monture) -{ - numeroFacture=$("#numeroFacture").val(); - - donnees = 'idOptique='+idOptique+"&monture="+monture+"&numeroFacture="+numeroFacture; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/majmonture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_monture").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function facturer_monture(user_id) -{ - dejaFacture=$("#dejaFacture").val(); - - if (dejaFacture=="1") - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroFacture=$("#numeroFacture").val(); - - if (numeroFacture<=" ") - { - v_msg="Veuillez saisir le No de la facture!"; - v_msgEng="Please enter the Invoice No!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroFacture").focus(); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - donnees += '&numeroFacture='+numeroFacture; - - - // numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'codePrestataire='+codePrestataire+'&typeMail=mailoptique'; - - typeSms = "facturer_mont"; - - donnees_retour =""; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees += '&user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/enregistrermonture/", - type: 'POST', - data: donnees, - success: function(data) - { - donnees_retour = data; - preparesms_adherent(typeSms); - }, - error: function(data) - { - - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_monture").html(donnees_retour); - // window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - - -function requetes_prestaire() -{ - window.location.assign($("#racineWeb" ).val()+"Requetes/"); -} - -function ajaxenteterequete() -{ - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - donnees = 'codeRequete='+codeRequete; - - v_url = $("#racineWeb").val()+"Ajaxrequeteentete"+codeRequete+"/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function requetes_feuilles_maladie() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateConsultation1 = $("#dateConsultation1").val(); - dateConsultation2 = $("#dateConsultation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val(); - numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - // Ligne 3 - codeTypePrestataire = $("#codeTypePrestataire").val(); - numeroDecompte1 = $("#numeroDecompte1").val(); - numeroDecompte2 = $("#numeroDecompte2").val(); - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - hospitalisation = $("#hospitalisation").val(); - numeroChambre = $("#numeroChambre").val(); - chirurgie = $("#chirurgie").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1); - numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateConsultation1=' + dateConsultation1; - donnees += '&dateConsultation2=' + dateConsultation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1; - donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - // Ligne 3 - donnees += '&codeTypePrestataire=' + codeTypePrestataire; - - donnees += '&numeroDecompte1=' + numeroDecompte1; - donnees += '&numeroDecompte2=' + numeroDecompte2; - - donnees += '&codeRaisonConsultation=' + codeRaisonConsultation; - donnees += '&hospitalisation=' + hospitalisation; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&chirurgie=' + chirurgie; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_feuilles_maladie_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateConsultation1 = $("#dateConsultation1").val(); - dateConsultation2 = $("#dateConsultation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val(); - numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - // Ligne 3 - codeTypePrestataire = $("#codeTypePrestataire").val(); - numeroDecompte1 = $("#numeroDecompte1").val(); - numeroDecompte2 = $("#numeroDecompte2").val(); - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - hospitalisation = $("#hospitalisation").val(); - numeroChambre = $("#numeroChambre").val(); - chirurgie = $("#chirurgie").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1); - numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateConsultation1=' + dateConsultation1; - donnees += '&dateConsultation2=' + dateConsultation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1; - donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - // Ligne 3 - donnees += '&codeTypePrestataire=' + codeTypePrestataire; - - donnees += '&numeroDecompte1=' + numeroDecompte1; - donnees += '&numeroDecompte2=' + numeroDecompte2; - - donnees += '&codeRaisonConsultation=' + codeRaisonConsultation; - donnees += '&hospitalisation=' + hospitalisation; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&chirurgie=' + chirurgie; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function selectionner_medecin_requete(codeMedecin, nomMedecin, noOrdreMedecin) -{ - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - $("#close_pop").click(); -} - -function afficher_pop_recherche_medecin_requete() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecinsrequete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - } - }); -} - -function ctrlkeypress_medecin_requete(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin_requete(); - } -} - -function reinitialiser_medecin() -{ - $("#codeMedecin").val(""); - $("#nomMedecin").html("Rechercher Médecin..."); - $("#close_pop").click(); -} - -function requetes_factures() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_factures_export() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_bonpoec() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_bonpoec_export() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function requetes_prestationactes() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - codePrestataire = $("#codePrestataire").val(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_prestationactes_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - codePrestataire = $("#codePrestataire").val(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_pharmacie() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_pharmacie_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_optique() -{ - $('#div_export').html(""); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleOptique = $("#libelleOptique").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleOptique=' + libelleOptique; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_optique_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleOptique = $("#libelleOptique").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleOptique=' + libelleOptique; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function requetes_assure() -{ - $('#div_export').html(""); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 2 - numeroPolice = $("#numeroPolice").val(); - codeProduit = $("#codeProduit").val(); - codeEtatPolice = $("#codeEtatPolice").val(); - codeLienParente = $("#codeLienParente").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val(); - sexe = $("#sexe").val(); - - // Ligne 3 - numeroClient1 = $("#numeroClient1").val(); - numeroClient2 = $("#numeroClient2").val(); - telephonePortableAdherent = $("#telephonePortableAdherent").val(); - emailAdherent = $("#emailAdherent").val(); - decede = $("#decede").val(); - nomClient = $("#nomClient").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroClient1 = convertir_en_entier(numeroClient1); - numeroClient2 = convertir_en_entier(numeroClient2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 2 - donnees += '&numeroPolice=' + numeroPolice; - donnees += '&codeProduit=' + codeProduit; - donnees += '&codeEtatPolice=' + codeEtatPolice; - donnees += '&codeLienParente=' + codeLienParente; - donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire; - donnees += '&sexe=' + sexe; - - // Ligne 3 - donnees += '&numeroClient1=' + numeroClient1; - donnees += '&numeroClient2=' + numeroClient2; - donnees += '&telephonePortableAdherent=' + telephonePortableAdherent; - donnees += '&emailAdherent=' + emailAdherent; - donnees += '&decede=' + decede; - donnees += '&nomClient=' + nomClient; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_assure_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 2 - numeroPolice = $("#numeroPolice").val(); - codeProduit = $("#codeProduit").val(); - codeEtatPolice = $("#codeEtatPolice").val(); - codeLienParente = $("#codeLienParente").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val(); - sexe = $("#sexe").val(); - - // Ligne 3 - numeroClient1 = $("#numeroClient1").val(); - numeroClient2 = $("#numeroClient2").val(); - telephonePortableAdherent = $("#telephonePortableAdherent").val(); - emailAdherent = $("#emailAdherent").val(); - decede = $("#decede").val(); - nomClient = $("#nomClient").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroClient1 = convertir_en_entier(numeroClient1); - numeroClient2 = convertir_en_entier(numeroClient2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 2 - donnees += '&numeroPolice=' + numeroPolice; - donnees += '&codeProduit=' + codeProduit; - donnees += '&codeEtatPolice=' + codeEtatPolice; - donnees += '&codeLienParente=' + codeLienParente; - donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire; - donnees += '&sexe=' + sexe; - - // Ligne 3 - donnees += '&numeroClient1=' + numeroClient1; - donnees += '&numeroClient2=' + numeroClient2; - donnees += '&telephonePortableAdherent=' + telephonePortableAdherent; - donnees += '&emailAdherent=' + emailAdherent; - donnees += '&decede=' + decede; - donnees += '&nomClient=' + nomClient; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function convertir_en_entier(valeur) -{ - if(isNaN(valeur)) - { - valeur = "0"; - } - - if (valeur=="") - { - valeur="0"; - } - - valeur = parseInt(valeur); - - return valeur; -} - -function selectionactesmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Selectactesmedicaux/"); -} - -function ajaxactespossibles_selection() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesselection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - $("#listeacte").html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_acte_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet acte?"; - v_msgEng="Do you confirm this act?"; - - // if(confirm_ebene(v_msg, v_msgEng)) - // { - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - // donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - // typeSms2="autorisation"; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/enregistreractemedical/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - } - donnee_a_affciher = data; - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - $("#totam_donnees").html(donnee_a_affciher); - } - }); - // } -} - -function supprimer_acte_medical_selection(idPrestationactes, codeTypePrestation) -{ - donnee_a_affciher = ""; - - /* - v_msg="Confirmez-vous la suppression de cet acte?"; - v_msgEng="Do you confirm the removal of this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - */ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - // maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - } - }); - // } -} - -function valider_selection_acte() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - - -function ajax_maj_qte_acte(idPrestationactes, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite; - - donnee_a_affciher = ""; - - donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite;; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactesmedicauxselect/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - }, - error: function(data) { - }, - complete: function() { - $("#div_prestations").html(donnee_a_affciher); - controle.focus(); - } - }); - } -} - - -function selectionner_acte_possibles_select(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - $("#libelleActe").val(libelleActe); - - ajaxactespossibles_selection(); - - $("#close_pop_acte").click(); -} - -function afficher_pop_recherche_actes_possibles_select() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactespossiblesselect/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function ctrlkeypress_actes_possibles_select(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_possibles_select(); - } -} - -function selectionexamens() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Selectexaemens/"); -} - -function ajaxexamenpossibles_selection() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexamenspossiblesselection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_examen_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - - typeSms="ententeprealable"; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/ajouterexamenprescription/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - } - donnee_a_affciher = data; - }, - complete: function() - { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - $("#totam_donnees").html(donnee_a_affciher); - } - }); -} - -function retirerexamen_lab_selection(idExamen) -{ - - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&idExamen='+idExamen; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - alerter_depassement_limite(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - } - }); -} - -function valider_selection_examen() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - afficher_laboratoire_cso(); - } -} - -function selectionexamens_lab() -{ - window.location.assign($("#racineWeb" ).val()+"Selectexaemenslab/"); -} - -function valider_selection_examen_lab() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - actualiser_laboratoire(); - } -} - -function afficher_examensmedicaux() -{ - window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/"); -} - -function selectionexamens_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Selectexaemenscso/"); -} - -function valider_selection_examen_cso() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - afficher_examensmedicaux(); - } -} - -function no_presciption() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numOrd = $("#numOrd").val(); - noPrescription = $("#noPrescription").val(); - - if (numOrd==0 && noPrescription==0) - { - v_msg="Confirmez-vous qu\'il n\'y a pas de prescription de médicaments?"; - v_msgEng="Do you confirm that there is no drugs prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescription/noprescription/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } - return; - } - feuillemaladie(); -} - -function prescrire_verre_opt() -{ -// Ajout à la prescription - /* - nbActesVerres = $("#nbActesVerres").val(); - - if (nbActesVerres>0) - { - v_msg="Veuillez sélectionner un verre!"; - v_msgEng="Please select a glass!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeOptique").focus(); - return; - } - */ - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - codeOptique = $("#codeOptique").val(); - - if (codeOptique<=" ") - { - v_msg="Veuillez sélectionner les verres!"; - v_msgEng="Please select the glasses!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeOptique").focus(); - return; - } - - donnees = 'codeOptique='+codeOptique; - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverreprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_verre").click(); - // $("#livraison").html(data); - }, - complete: function() { - // alerter_depassement_limite(); - actualiser_opticien(); - } - }); - - //} - -// Fin Ajout à la prescription -} - -function validerdecompte_prestataire() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==0) - { - v_msg="Veuillez attendre la 1ère validation de l\'assureur!"; - v_msgEng="Please wait for the first validation of the insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==3) - { - v_msg="Déjà validé!"; - v_msgEng="Already validated!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==8) - { - v_msg="Pas besoin de validation prestataire!"; - v_msgEng="Provider validation not needed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==9) - { - v_msg="En attente de paiement!"; - v_msgEng="Waiting for payment!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==2) - { - - v_msg="Confirmez-vous la validation?"; - v_msgEng="Do you confirm the validation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/validerdecompteprestataire", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - // $("#div_detail").html(""); - v_msg="Décompte validé avec succès!"; - v_msgEng="validated successfully!"; - alert_ebene(v_msg, v_msgEng); - - }, - complete: function() { - // actualiser_decompte(); - afficher_decompte(); - } - }); - } - } -} - -function retourdecompte() -{ - idSaisieDecompte = $("#idSaisieDecompte").val(); - lienPrestation_C = $("#lienPrestation_C").val(); - lienProduction_C = $("#lienProduction_C").val(); - - v_url = lienProduction_C+"/Connexiondecompte/"+idSaisieDecompte; - - if (idSaisieDecompte>"") - { - window.location.assign(v_url); - } -} - -function enregistrer_nv_medicament() -{ - libelleMedicament = $("#libelleMedicament").val(); - - if (libelleMedicament<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - prixMedicament=$("#prixMedicament").val(); - prixMedicament=prixMedicament.replace(",","."); - $("#prixMedicament").val(prixMedicament); - - if(isNaN(prixMedicament)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixMedicament").val("0"); - $("#prixMedicament").focus(); - return; - } - - if(prixMedicament==0) - { - $("#prixMedicament").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - qteMedicament=$("#qteMedicament").val(); - qteMedicament=qteMedicament.replace(",","."); - $("#qteMedicament").val(qteMedicament); - - if(isNaN(qteMedicament)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#qteMedicament").val("0"); - $("#qteMedicament").focus(); - return; - } - - if(qteMedicament==0) - { - $("#qteMedicament").focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'libelleMedicament='+libelleMedicament+'&prixMedicament='+prixMedicament+'&qteMedicament='+qteMedicament; - - typeSms="ententeprealablepha"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/creermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - // alert("error => "+data); - // $("#div_new_medicament_test").html(data); - - $("#btn_close_pop_new_med").click(); - $("#btn_close_pop_medicament").click(); - }, - error: function(data) { - alert("error => "+data); - $("#div_new_medicament_test").html(data); - }, - complete: function() { - actualiser_saisie_pharmacien(); - } - }); -} - -function demander_accord_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - typeSms="ententeprealablepha"; - - donnees_sav = 'idMedicament='+idMedicament+'&typeMail=mailententeprealablepha'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/demanderaccordpha/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function controle_longeur_passe(controle) -{ - longueur = controle.value.length; - - if(longueur==0) - { - return false; - } - - if(longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minmum required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } -} - -function ajax_maj_prix_medicament_pha(idMedicament, prix, controle) -{ - prix=prix.replace(",","."); - controle.value=prix; - - if(controle_numerique(controle)) - { - if(prix==0) - { - controle.focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majprixpha/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function facture_sans_bon() -{ - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - if (numeroBeneficiaire<="0") - { - v_msg="Veuillez sélectionner un bénéficiaire!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Facturesansboncso/"); -} - -function nouvelle_sans_bon() -{ - window.location.assign($("#racineWeb").val()+"Facturesansboncso/"); -} - -// js_facture_san_sbon -function enregistrerfacture_sans_bon_temp(v_initialiser) -{ - dateFacture=$("#dateFacture").val(); - debutMoisDecompte = $("#debutMoisDecompte").val(); - - codeMedecin = $("#codeMedecin").val(); - medecinManquant = $("#medecinManquant").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeMedecin=="ZZZZ" && medecinManquant<=" ") - { - v_msg="Veuillez saisir le nom du médecin non enregistré!"; - v_msgEng="Please enter the name of the non-registered doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez saisir le No de Bons!"; - v_msgEng="Please enter the first number of form!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - - if (dateFacture<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - /* - medecinManquant = $("#medecinManquant").val(); - - if (medecinManquant<=" ") - { - v_msg="Veuillez saisir le Médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - */ - - // vérifier que le gars est couvert - // modifié le 09/07/2019 - $("#dateFactureReelle").val(dateFacture); - if (prestation_possible_assureur()) - { - observations = $("#observations").val(); - hospitalisation = $("#hospitalisation").val(); - tm = $("#tmFacture").val(); - - donnees = 'observations='+observations+'&dateFacture='+dateFacture+'&hospitalisation='+hospitalisation+'&tm='+tm+'&numeroBon='+numeroBon+'&medecinManquant='+medecinManquant+'&codeMedecin='+codeMedecin; - donnees += '&initialiserprestation='+v_initialiser; - - $("#div_prestations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/enregistrerfacturetemp/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_facture").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() { - alerter_depassement_limite_sans_bon(); - } - }); - } -} - -function enregistrerfacture_sans_bon() -{ - enregistrerfacture_sans_bon_temp("0"); - - medecinManquant = $("#medecinManquant").val(); - - if (medecinManquant<=" ") - { - v_msg="Veuillez saisir le Médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - - dateFacture=$("#dateFacture").val(); - - if (dateFacture<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à enregistrer!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#dateFactureReelle").val(dateFacture); - if (prestation_possible_assureur()) - { - v_msg="Confirmez-vous cette facture?"; - v_msgEng="Do you confirm this invoice?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/validerfacturesansbon/", - error: function(errorData) { - }, - success: function(data) { - // maj_fraisexclu_cso(); - $(".datepicker" ).datepicker(); - }, - complete: function() { - v_msg="Validation effectuée avec succès!"; - v_msgEng="Validation done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_beneficiaire_id(); - } - }); - } - } -} - -function ajax_maj_tm_facture(tm, controle) -{ - donnees = 'tm='+tm; - - tm=tm.replace(",","."); - controle.value=tm; - - if(controle_numerique(controle)) - { - // enregistrerfacture_sans_bon_temp(); - enregistrerfacture_sans_bon_temp("0"); - } -} - -function ajax_maj_prix_acte(idPrestation, valeurActe, controle) -{ - donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe; - - valeurActe=valeurActe.replace(",","."); - controle.value=valeurActe; - - if(controle_numerique(controle)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/majprix/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture").html(data); - $(".datepicker" ).datepicker(); - }, - error: function(data) { - }, - complete: function(data) { - alerter_depassement_limite_sans_bon(); - } - }); - } -} - - -function valider_facture_sans_bon_temp() -{ - enregistrerfacture_sans_bon_temp("1"); -} - -function alerter_depassement_limite_sans_bon() -{ - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function consulter_limite_avant_facturation_classique() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureclassique/"); - */ -} - -function pop_messagerie() -{ - nbMessagesNonLus = $("#timer").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/", - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_messagerie").click(); - } - }); -} - -function marquer_message_comme_lu(idMessagerie, controle) -{ - donnees = 'idMessagerie='+idMessagerie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - controle.parentElement.removeChild(controle); - } - }); -} - - -function envoyer_messagerie(textMessage, idParent) -{ - donnees = 'textMessage='+textMessage+"&idParent="+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - } - }); -} - -function repondre_message(idMessagerie, idParent, controle) -{ - donnees = 'idMessagerie='+idMessagerie+'&idParent='+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessageriereponse/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_reponse").html(data); - }, - complete: function() { - repondu = $("#repondu").val(); - if(repondu=="1") - { - v_msg="Déjà répondu!"; - v_msgEng="Already answered!"; - alert_ebene(v_msg, v_msgEng); - - controle.parentElement.removeChild(controle); - return; - } - else - {$("#btn_pop_messagerie_reponse").click(); - } - } - }); -} - -function gerer_messagerie() -{ - window.location.assign($("#racineWeb").val()+"Messagerie/"); -} - -function afficher_lite_messagerie() -{ - donnees = ""; - donnees_retour = ""; - - date1 = $("#date1").val(); - date2 = $("#date2").val(); - - messageLu = $("#messageLu").val(); - textMessage = $("#textMessage").val(); - - donnees += 'date1=' + date1; - donnees += '&date2=' + date2; - donnees += '&messageLu=' + messageLu; - donnees += '&textMessage=' + textMessage; - - $("#div_messagerie_gestion").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemessagerie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_messagerie_gestion").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - - -function enregistrer_repondre_message() -{ - idMessagerie = $("#idMessagerie").val(); - idParent = $("#idParentReponse").val(); - - textMessage = $("#textMessageReponse").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir la réponse!"; - v_msgEng="Please enter the answer!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageReponse").focus(); - return; - } - - donnees = 'idMessagerie='+idMessagerie+"&idParent="+idParent+"&textMessage="+textMessage; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_pop_messagerie_reponse_quit").click(); - } - }); -} - -function historique_message(idParent) -{ - donnees = 'idParent='+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessageriehistorique/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_historique").html(data); - }, - complete: function() { - $("#btn_pop_messagerie_historique").click(); - } - }); -} - -function initiermessage() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerienew/", - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_new").html(data); - }, - complete: function() { - $("#btn_pop_messagerie_new").click(); - } - }); -} - -function enregistrer_new_message() -{ - textMessage = $("#textMessageNew").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir le message!"; - v_msgEng="Please enter the message!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageNew").focus(); - return; - } - - donnees = 'textMessage='+textMessage+"&idParent=0"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_pop_messagerie_new_quit").click(); - } - }); -} - -function consultation_assureur() -{ - dateFactureReelle = $("#dateFactureReelle").val(); - - if (dateFactureReelle<=" ") - { - v_msg="Veuillez saisir la date de la consultation!"; - v_msgEng="Please enter the date of the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFactureReelle").focus(); - return; - } - - if (prestation_possible_assureur()) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - ajax_context_datefacture_reelle(dateFactureReelle); - } -} - -function prestation_possible_assureur() -{ - enVigueur = $("#enVigueur_C").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire = $("#etatbeneficiaire_C").val(); - college_couvert = $("#college_couvert_C").val(); - derogation_en_cours = $("#derogation_en_cours_C").val(); - derogation_finger_en_cours = $("#derogation_finger_en_cours_C").val(); - - datejour = $("#datejour_C").val(); - - dateSortieBeneficiaire = $("#dateSortieBeneficiaire_C").val(); - var tdd = new Date(dateSortieBeneficiaire); - dtd = Math.round(Date.parse(tdd)/(1000*3600*24)); - - - dateFactureReelle = $("#dateFactureReelle").val(); - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - dateEntreeBeneficiaire = $("#dateEntreeBeneficiaire_C").val(); - - libelledebutMoisDecompte = $("#debutMoisDecompte").val(); - debutMoisDecompte = $("#debutMoisDecompte").datepicker("getDate"); - var tddebut = new Date(debutMoisDecompte); - dddebut = Math.round(Date.parse(tddebut)/(1000*3600*24)); - - CalculerFinMoisDecompte(); - - libellefinMoisDecompte = $("#finMoisDecompte").val(); - finMoisDecompte = $("#finMoisDecompte").datepicker("getDate"); - var tfin = new Date(finMoisDecompte); - ddfin = Math.round(Date.parse(tfin)/(1000*3600*24)); - - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = $("#dateFactureReelle").datepicker("getDate"); - var td2 = new Date(dateEcheancePolice); - var tdj = new Date(datejour); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - dtj=Math.round(Date.parse(tdj)/(1000*3600*24)); - - if ( (dt1ddfin) ) - { - v_msg="Attention! date hors du mois! => "+libelledebutMoisDecompte+" - "+libellefinMoisDecompte; - v_msgEng="Warning! date out of the month!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if(dateSortieBeneficiaire>"2000-01-01") - { - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - else - { - // A désactivé peut-être pour RADIANT - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - // Fin désactivation peut-être pour RADIANT - - if (college_couvert<1 && derogation_en_cours<1) - { - v_msg="Attention! Cette personne n\'a pas accès à ce centre"; - v_msgEng="Warning! This person does not have access to this center"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dtj) - { - v_msg="Attention! Revoir la date!"; - v_msgEng="Warning! Review the date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dt2 || dt1"2000-01-01") - { - v_msg="Attention! personne décédée!"; - v_msgEng="Warning! Deceased!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - return true; -} - -function ajax_context_datefacture_reelle(dateFactureReelle) -{ - donnees = 'dateFactureReelle='+dateFactureReelle; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdatefacturerelle/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - aller_a_la_consultatio(); - } - }); -} - -function aller_a_la_consultatio() -{ - window.location.assign($("#racineWeb" ).val()+"Consultation/"); -} - -function ajax_maj_qte_examen_lab(idExamen, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function ajax_maj_qte_examen_lab_select(idExamen, quantite, controle) -{ - donnee_a_affciher = ""; - - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#livraison").html(data); - donnee_a_affciher = data; - alerter_depassement_limite(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - controle.focus(); - } - }); - } -} - -function ajax_maj_qte_examen_cso(idExamen, quantite, controle) -{ - donnee_a_affciher = ""; - - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - controle.focus(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function actualiser_saisie_pharmacien() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function lister_ged() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteged/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function ctrlkeypress_lister_ged(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - lister_ged();; - } -} - -function check_ged(idGed, cheminFichier, controle) -{ - donnees = "idGed="+idGed+"&cheminFichier="+cheminFichier; - - // var cible_ged = $('#cible_ged'); - var ctrl_btn_ged = $("#btn_ged"+idGed); - var ctrl_mess_not_found= $("#mess_not_found"+idGed); - var ctrl_check = $("#ctrl_check"+idGed); - - // document.getElementById('bouton_'+id).innerHTML='Afficher le texte'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxged/verifierexistancefichier/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - - donnees_retour = data; - - if(donnees_retour=="1") - { - ctrl_btn_ged.show(); - } - else - { - ctrl_mess_not_found.html("Not found"); - } - }, - complete: function() - { - controle.style.display = 'none'; - ctrl_check.show(); - } - }); -} - -function lister_ged_adherent() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedadherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function lister_ged_beneficiaire_prest() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprest/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - - -function lister_ged_feuille_maladie() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function pop_ged_pharmacie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedpharmacie/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_ged").html(data); - }, - complete: function() { - $("#btn_pop_ged_pharmacie").click(); - } - }); -} - -function save_enroleur(user_id) -{ - if (user_id>"") - { - donnees = 'user_id='+user_id; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/saveenroleur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - } - }); - } -} - - -/* ACTIVATION POPUP -function imprimer_liste_assures() -{ - $('#div_export_assures').html(''); - - $("#btn_liste_assures").click(); - popalertmessagerie -} -*/ - -function pop_dernier_messagerie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/derniermessage/", - error: function(errorData) { - }, - success: function(data) { - $("#div_dernier_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_dernier_messagerie").click(); - } - }); -} - -function marquer_dernier_message_comme_lu(idMessagerie, controle) -{ - donnees = 'idMessagerie='+idMessagerie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - // controle.parentElement.removeChild(controle); - $("#btn_close_pop_dernier_messagerie").click(); - } - }); -} - -function isNumeric(num){ - return !isNaN(num) -} - -function retirer_consommable(idConsommable) -{ - donnees = 'idConsommable='+idConsommable; - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you Confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommable/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function retirer_consommable_tous() -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you Confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommabletous/", - type: 'POST', - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function valider_consommables() -{ - facturerConsommable=$("#facturerConsommable").val(); - if (facturerConsommable!="1") - { - v_msg="Consommables non facturés!"; - v_msgEng="Consumables not invoiced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function imprimerdecompteprestataireaccord() -{ - regle=$("#regle").val(); - - if( (regle!=1) && (regle!=9) ) - { - v_msg="Pas encore validé par l\'asssureur"; - v_msgEng="Not yet validates by insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idReglement = $("#idReglement").val(); - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerdecompteprestataireaccord", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - - -function consulter_une_factures() -{ - window.location.assign($("#racineWeb" ).val()+"Factureconsprestataire/"); -} - -function ctrlkeypressfacture(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#idFacture").blur(); - } -} - -function chercher_facture(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturefeuillemaladie() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_facture_pop(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture_pop").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture_pop").html(data); - }, - error: function(data) { - }, - complete: function() { - $('#btn_pop_consulter_facture').click(); - } - }); -} - -function consulterfacturefeuillemaladie_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureverres_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureged_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function reafficher_ged_facture(idFacture) -{ - if (idFacture>"0") - { - donnees = 'idFacture='+idFacture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgedfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); - } -} - -function valider_ged_facture() -{ - idFacture = $("#idFactureGed").val(); - v_url = $("#racineWeb").val()+"Ajaxgedfacture/chargerged"; - - donnees = ""; - - donnees = new FormData($("#ajax_form_upload")[0]); - - $.ajax({ - type: "POST", - url: v_url, - data: donnees, - contentType: false, - cache: false, - processData :false, - - success: function(message){ - alert_ebene(message); - }, - error: function(errorData){ - }, - complete: function() { - // reafficher_ged_facture(idFacture); - } - }); -} - -function consulterfactureged() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function enregistrer_nv_verres() -{ - libelleOptique = $("#libelleOptique").val(); - - if (libelleOptique<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleOptique").focus(); - return; - } - - prixVerre=$("#prixVerre").val(); - prixVerre=prixVerre.replace(",","."); - $("#prixVerre").val(prixVerre); - - if(isNaN(prixVerre)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixVerre").val("0"); - $("#prixVerre").focus(); - return; - } - - if(prixVerre==0) - { - $("#prixVerre").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'libelleOptique='+libelleOptique+'&prixVerre='+prixVerre; - - // typeSms="ententeprealableopt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/creerverre/", - type: 'POST', - data: donnees, - success: function(data) { - - $("#btn_close_pop_new_verre").click(); - $("#btn_close_pop_verre").click(); - - // $("#div_test_gabarit").html(data); - - }, - error: function(data) { - }, - complete: function() { - actualiser_opticien(); - } - }); -} - -function demander_accord_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - typeSms="ententeprealableopt"; - - donnees_sav = 'idOptique='+idOptique+'&typeMail=mailententeprealableopt'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/demanderaccordopt/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function demander_accord_mont(idOptique) -{ - - prixPrestataire = $("#prixPrestataire").val(); - - prixPrestataire=prixPrestataire.replace(",","."); - $("#prixPrestataire").val(prixPrestataire); - - if(isNaN(prixPrestataire)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixPrestataire").val("0"); - $("#prixPrestataire").focus(); - return; - } - - if(prixPrestataire==0) - { - $("#prixPrestataire").focus(); - - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idOptique='+idOptique+'&prixPrestataire='+prixPrestataire; - - typeSms="ententeprealablemont"; - - donnees_sav = donnees+'&typeMail=mailententeprealablemont'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/demanderaccordmont/", - - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_monture").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -// 06/04/2019 -function changer_langue() -{ - codeLangue = $("#codeLangue").val(); - - v_msg="Confirmez-vous le changement de langue?"; - v_msgEng="Do you confirm the language change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/", - type : 'post', - // data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/"); - } - }); - } -} - -function envoyersms(p_destinataires, p_message, creation_message) -{ - if(creation_message=="1") - { - envoyer_messagerie(p_message, "0"); - } - - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - if(p_destinataires.length<5) - { - /* - v_msg="SMS => Pas de destintaire!"; - v_msgEng="SMS => No recipient!"; - - alert_ebene(v_msg, v_msgEng); - */ - - return; - } - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="blive") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="hooza") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function preparesms_adherent(typeSms) -{ - // ajout du 09/04/2025 => empêcher l'nevoi des messages de Facturation - return; - - /* - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return; - } - - smsmParFacture = $("#smsmParFacture").val(); - - if(smsmParFacture=="0") - { - return; - } - - codeLangueAdherent = $("#codeLangueAdherent").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "0"; - - devise = $("#devise_C").val(); - - if (typeSms=="facturer_cso") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonConsultation = $("#numeroBonConsultation_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Consultation form No :" : "Bon consultation No : "; - p_message += numeroBonConsultation+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Consumptions : " : "Consommations : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_pha") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Prescription No : " : "Ordonnance No : "; - p_message += numeroBonOrdonnance+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Pharmacy Consumptions : " : "Consommations Pharmacie : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - - } - - if (typeSms=="facturer_lab") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonExamen = $("#numeroBonExamen_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Exam form No : " : "Bon Examens No : "; - p_message += numeroBonExamen+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Laboratory consumptions : " : "Consommations Labo : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_opt") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOptique = $("#numeroBonOptique_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical foem No : " : "Bon Optique No : "; - p_message += numeroBonOptique+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical consumptions : " : "Consommations Optiques : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_mont") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical frames Consumptions : " : "Consommations Montures : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_sea") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonKine = $("#numeroBonKine_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "KINE form No : " : "Bon KINE No : "; - p_message += numeroBonKine+" "; - - p_message += (codeLangueAdherent=="en_US") ? "KINE Consumptions : " : "Consommations KINE : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - envoyersms(p_destinataires, p_message, creation_message); - */ -} - -function ajouter_sms_attente(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_sms_attente_singleton(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - var addr = p_destinataires.split(","); - - addr.forEach(function(element) - { - p_dest = element; - - if(p_dest.length>4) - { - donnees = "destinataires="+p_dest+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } - else - { - v_msg=p_dest+" => Mauvais format!"; - v_msgEng=p_dest+" => wrong phone format!"; - alert_ebene(v_msg, v_msgEng); - } - }); -} - -function tester_disponibiliter_sms() -{ - p_message = ""; - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - p_message = "Fournisseur : esicia "; - } - else - if(fournisseurSms=="blive") - { - p_message = "Fournisseur : blive "; - } - else - if(fournisseurSms=="hooza") - { - p_message = "Fournisseur : hooza "; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - p_destinataires = "25761198584"; - // p_destinataires = "25761198584,25761198584"; - - donnees = "destinataires="+p_destinataires+"&message="+p_message+"&fournisseurSms="+fournisseurSms; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtesterdisponiblitesms/envoyerlesms/", - type: 'POST', - data: donnees, - success: function(data) - { - $('#div_test_gabarit').html(data); - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_destinataire_sms_adherent(p_destinataires) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return p_destinataires; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return p_destinataires; - } - - tel_adh = $("#telephonePortableAdherent_C").val(); - - if(tel_adh.length>4) - { - return p_destinataires+","+tel_adh; - } - - return p_destinataires; -} - -function tester_ajouter_destinataire_sms_adherent() -{ - p_destinataires = "22506802339"; -} - -function preparemail_adherent(typeSms) -{ - emailParFacture = $("#emailParFacture").val(); - - if(emailParFacture=="0") - { - return; - } - - emailAdherent = $("#emailAdherent_C").val(); - - if(emailAdherent.length<5) - { - return; - } - - codeLangueAdherent = $("#codeLangueAdherent").val(); - - p_objet_email_adh = (codeLangueAdherent=="en_US") ? "ALERT CONSUMPTION" : "ALERT CONSOMMATIONS"; - - p_messageemail_adh = ""; - - devise = $("#devise_C").val(); - - cout = parseInt(cout); - cout = cout.toLocaleString(); - - if (typeSms=="facturer_cso") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonConsultation = $("#numeroBonConsultation_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+")"; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Consultation form No : " : "Bon consultation No : "; - p_messageemail_adh += numeroBonConsultation; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Consumptions : " : "Consommations : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_pha") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Prescription No : " : "Ordonnance No : "; - p_messageemail_adh += numeroBonOrdonnance; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Pharmacy Consumptions : " : "Consommations Pharmacie : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - - } - - if (typeSms=="facturer_lab") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonExamen = $("#numeroBonExamen_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Exam form No : " : "Bon Examens No : "; - p_messageemail_adh += numeroBonExamen; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Laboratory consumptions : " : "Consommations Labo : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_opt") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOptique = $("#numeroBonOptique_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical form No : " : "Bon Optique No : "; - p_messageemail_adh += numeroBonOptique; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical consumptions : " : "Consommations Optiques : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_mont") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical frames Consumptions : " : "Consommations Montures : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_sea") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonKine = $("#numeroBonKine_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "KINE form No : " : "Bon KINE No : "; - p_messageemail_adh += numeroBonKine; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "KINE Consumptions : " : "Consommations KINE : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh); -} - -function ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh) -{ - donnees = "email="+emailAdherent+"&objet="+p_objet_email_adh+"&message="+p_messageemail_adh; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmailadhattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function verifiertentativeidentitification(user_id) -{ - /* - donnees = 'user_id='+user_id; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenvoimaildivers/verifiertentativeidentitification/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() { - } - }); - */ -} - -function afficherbon_vide() -{ - $("#div_bonpecs").html(""); - - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : 0"); - } - else - { - $("#nbligne").val("Nombre de bons affichés : 0"); - } - - codeTypeBon=$("#codeTypeBon").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/vide/", - error: function(errorData) - { - }, - success: function(data) - { - $("#div_bonpecs").html(data); - }, - complete: function() - { - } - }); -} - -function demander_accord_pha_cso(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - typeSms="ententeprealablepha"; - - donnees_sav = 'idMedicament='+idMedicament+'&typeMail=mailententeprealablepha'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/demanderaccordpha/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function desactiver_click_droit() -{ - if (document.addEventListener) { - document.addEventListener('contextmenu', function (e) { - e.preventDefault(); - }, false); - } else { - document.attachEvent('oncontextmenu', function () { - window.event.returnValue = false; - }); - } -} - -function enregistrer_new_notes() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - donnees = 'notesNew='+notesNew; - - v_msg="Confirmez-vous cette note?"; - v_msgEng="Do you confirm this note?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/creernote/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_notes_feuille(); - } - }); - } -} - -function afficher_notes_feuille() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initiernotesfeuille() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/nouvellenote/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function click_btn_add_drug() -{ - hospitalisation = $("#hospitalisation_C").val(); - - nbMedicamentMax = parseInt($("#nbMedicamentMax").val()); - nbMedicamentSaisie = parseInt($("#nbMedicamentSaisie").val()); - - if (nbMedicamentSaisie>=nbMedicamentMax && hospitalisation!="1") - { - v_msg="Attention! Maximum de médicaments atteint!"; - v_msgEng="Warning! Maximum drugs reached!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#btn_add_drug").click(); -} - -function imprimer_feuille_maladie() -{ - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees_retour = ""; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_export_a").html(donnees_retour); - $("#btn_imprimer_feuille_maladie").click(); - } - }); -} - -function controle_numerique_new(idControle, oldValue) -{ - controle = document.getElementById(idControle); - - valeur = controle.value; - - if(isNaN(valeur)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=oldValue; - controle.focus(); - return false; - } - - return true; -} - -function reinitrechercherbonordonnance() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnance/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function reinit_chercher_ordonnance_opt() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - // window.location.assign($("#racineWeb" ).val()+"Opticien/"); - }, - error: function(data) { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } - }); -} - -// - -function reinitrechercherbonkine() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Kine/"); - } - }); -} - -function supprimer_espace_string(p_mot) -{ - p_mot = p_mot.trim(); - p_mot = p_mot.replace(" ", ""); - return p_mot; -} - -function notesfeuillemaladie() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesfeuillemaladie/"); -} - -function raffraichier_gabarit() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgabarit/", - success: function(data) - { - $("#div_ajaxgabarit").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - $(".datepicker" ).datepicker(); - - raffraichier_messagerie(); - } - }); -} - -function connexion_cookie() -{ - msgErreur=$("#msgErreur").val(); - - donnees = 'msgErreur='+msgErreur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconnexioncookie/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_ajaxconnexion").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - var login = document.getElementById("login").value; - if (login>" ") - { - $("#mdp").focus(); - } - else - { - $("#login").focus(); - } - } - }); -} - - -function ajaxaffectionspossibles() -{ - codeTypeAffection=$("#codeTypeAffection").val(); - - donnees = 'codeTypeAffection='+codeTypeAffection; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxaffectionspossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeaffections").html(data); - } - }); -} - - -function enregistreraffection() -{ - affectionObligatoire=$("#affectionObligatoire").val(); - codeAffection=$("#codeAffectionPop").val(); - codeAffectionOld=$("#codeAffection").val(); - - if (affectionObligatoire=="1" && codeAffection<="0000") - { - v_msg="Diagnostique exigé!"; - v_msgEng="Diagnosis required!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeAffectionPop").focus(); - - return; - } - - if (codeAffection==codeAffectionOld) - { - v_msg="Déjà saisi!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeAffectionPop").focus(); - - return; - } - - v_msg="Confirmez-vous cette affection?"; - v_msgEng="Do you confirm this affection?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeAffection='+codeAffection; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreraffection/enregistreraffection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - $("#close_pop_affection").click(); - feuillemaladie(); - } - }); - } -} - -function diagnosticsfeuillemaladie() -{ - /* - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - window.location.assign($("#racineWeb" ).val()+"Diagnosticscons/"); -} - -function afficher_diagnostics_feuille() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticscons/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - - -function imprimer_ecarts_decompte() -{ - var div_export = $('#div_export_ecart_decompte'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_imprimer_ecart_decompte").click(); - - // alert("Ajaximprimerecartdecompte"); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerecartdecompte/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - // $("#btn_imprimer_ecart_decompte").click(); - } - }); - -} - -function afficher_ecarts_facture_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartfacture/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function ecarts_facture_non_saisies_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartnonsaisi/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function initvidermessagerie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvidermessagerie/", - error: function(errorData) { - }, - success: function(data) { - $("#div_vider_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_vider_messagerie").click(); - $(".datepicker" ).datepicker(); - } - }); -} - -function vidermessagerie() -{ - dateLimite = $("#dateLimite").val(); - - v_msg="Confirmez-vous le vidage de tous les messages générés avant le "+dateLimite+" ?"; - v_msgEng="Do you confirm the emptying of all messages generated before the "+dateLimite+" ?"; - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'dateLimite=' + dateLimite; - - $("#btn_pop_vider_messagerie").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvidermessagerie/vidermessagerie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - v_msg="Vidage effectué avec succès!"; - v_msgEng="Emptying done successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_pop_vider_messagerie_quit").click(); - gerer_messagerie(); - // Messagerie/ - } - }); - } -} - -function afficher_contacts_assureur() -{ - window.location.assign($("#racineWeb" ).val()+"Infossassureur/"); -} - -function ajaxdelaicarencecaisonconsultation() -{ - codeRaisonConsultation=$("#codeRaisonConsultation").val(); - - donnees = 'codeRaisonConsultation='+codeRaisonConsultation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdelaicarencecaisonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infodelaicarence").html(data); - }, - complete: function() { - $("#delaiCarenceRaisonconsultation").val( $("#delaiCarenceRaisonconsultation_info").val()); - $("#appliquerDelaiCarence").val( $("#appliquerDelaiCarence_info").val()); - } - }); -} - -function CalculerFinMoisDecompte() -{ - var typdate = $("#debutMoisDecompte").datepicker("getDate"); - typdate.addMonths(1); - $("#finMoisDecompte").datepicker( "setDate", typdate ); -} - -function reposmedical() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Reposmedical/"); -} - -function afficher_repos_medical() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initier_repos_medical() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/nouveaureposmedical/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function enregistrer_new_repos_medical() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - nbJour = $("#nbJour").val(); - - if(isNaN(nbJour)) - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - if (nbJour<="0") - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - donnees = 'notesNew='+notesNew+"&nbJour="+nbJour; - - v_msg="Confirmez-vous ce repos médical?"; - v_msgEng="Do you confirm this medical rest?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/creerreposmedical/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_repos_medical(); - } - }); - } -} - -function supprimer_affections(idAffection) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreraffection/supprimeraffection/", - type : 'post', - data: "idAffection="+idAffection, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#close_pop_affection").click(); - feuillemaladie(); - } - }); - } -} - -function anteceentsmedicaux() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Anteceentsmedicaux/"); -} - -function diagnosticsbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Diagnosticsconsbeneficiaire/"); -} - -function notesbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesbeneficiaire/"); -} - -function afficher_diagnostics_beneficiaire() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticsbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - -function afficher_notes_beneficiaire() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function test_online() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - v_msg="Connexion OK!"; - v_msgEng="Connection OK"; - alert_ebene(v_msg, v_msgEng); - - } - else - { - $("#test_connexion").css('background-color', 'red'); - v_msg="Problème de Connexion!"; - v_msgEng="Connection Problem!"; - alert_ebene(v_msg, v_msgEng); - } - return; -} - -function raffraichier_messagerie() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - c_html = ""; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/", - success: function(data) { - c_html = data; - }, - error: function(errorData) { - }, - complete: function() { - $("#nbMessagesNonLus").html(c_html); - msgNonLus=$("#msgNonLus").val(); - - if(msgNonLus>0) - { - pop_dernier_messagerie(); - } - } - }); - } - else - { - $("#test_connexion").css('background-color', 'red'); - return; - } -} - - -function consulterfactureverres() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function init_remplacer_medicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/initremplacement/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() - { - $("#btn_remplacer_medicament").click(); - } - }); -} - -function consulter_remplacer_medicament() -{ - $("#div_liste_medicaments_remplaces").html('
  ' + 'Veuillez patienter...' + '
'); - - $('#btn_medicaments_remplaces').click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/consulterremplacement/", - type: 'POST', - success: function(data) { - $("#div_liste_medicaments_remplaces").html(data); - }, - error: function(data) { - }, - complete: function() - { - // $('#btn_medicaments_remplaces').click(); - } - }); -} - -function ctrlkeypress_medicament_remplacement(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament_remplacement(); - } -} - -function afficher_pop_recherche_medicament_remplacement() -{ - nomsearch = $("#nomsearchrempl").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - // alert(donnees); - // return; - - $("#div_listemedicament_rempl").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicaments/remplacement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament_rempl").html(data); - } - }); - } -} - -function selectionner_medicament_pop_rempl(codeMedicament, libelleMedicament) -{ - $("#codeMedicament_pop_rempl").val(codeMedicament); - $("#libelleMedicament_pop_rempl").val(libelleMedicament); -} - -function remplacer_medicament() -{ - codeMedicamentNouv = $("#codeMedicament_pop_rempl").val(); - libelleMedicamentNouv = $("#libelleMedicament_pop_rempl").val(); - - if (codeMedicamentNouv<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Prescrire : "+libelleMedicamentNouv+"?"; - v_msgEng="Prescribe : "+libelleMedicamentNouv+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeMedicamentNouv='+codeMedicamentNouv; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/remplacermedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - // $("#btn_close_pop_rempl").click(); - prescription_medicament(); - }, - complete: function() { - } - }); - } -} - -function imprimer_facture_feuille_maladie(idFactureFeuille) -{ - donnees = 'idFacture='+idFactureFeuille; - - // alert("imprimer_facture_feuille_maladie => "+donnees); - // return; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfeuillemaladie/imprimerfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#div_imprimer_facture").html(data); - }, - complete: function() { - $("#btn_pop_imprimer_facture").click(); - } - }); -} - -function appliquerDataTable(){ - - var sc = $(window).scrollTop(), - dh = $(document).height(), - ch = $(window).height(); - scrollPercent = (sc / (dh-ch)) * 100; - - try{ - var oTable = $('.tabliste').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "75vh", - "pagingType": "full_numbers", - "autoWidth": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "fixedColumns": true, - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - /* - $(window).bind('resize', function () { - oTable.fnAdjustColumnSizing(false); - }); - */ - } - catch(err){ - return false; - } - -} - -function appliquerDataTableMini(){ - try{ - $('.tablistemini').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "34vh", - "pagingType": "full_numbers", - "autoWidth": false, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -function dataTableSpeciale(){ - try{ - $('.tabspeciale').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "75vh", - "pagingType": "full_numbers", - "autoWidth": false, - "bFilter": false, - "bLengthChange": false, - "orderMulti": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -function dataTableSpecialeMini(){ - try{ - $('.tabspecialemini').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "34vh", - "pagingType": "full_numbers", - "autoWidth": false, - "bFilter": false, - "bLengthChange": false, - "orderMulti": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -$(function(){ - appliquerDataTable(); - dataTableSpeciale(); - $('.js-example-basic-single').select2(); - $('.selectpicker').selectpicker(); -}); - - -function ajaxinfosboninitconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerinitconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - appliquerDelaiCarence = $("#appliquerDelaiCarence").val(); - - - anciennete = $("#anciennete").val(); - anciennete = parseInt(anciennete); - - delaiCarenceRaisonconsultation = $("#delaiCarenceRaisonconsultation").val(); - delaiCarenceRaisonconsultation = parseInt(delaiCarenceRaisonconsultation); - - delaiCarenceBeneficiaire = $("#delaiCarenceBeneficiaire").val(); - delaiCarenceBeneficiaire = parseInt(delaiCarenceBeneficiaire); - - - // if (delaiCarenceBeneficiaire>0 && appliquerDelaiCarence=="1") - if (delaiCarenceBeneficiaire>0) - { - if (anciennete  ' + 'Veuillez patienter... / Please wait...' + ''); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"}, - success: function(data) { - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - v_msg="Enrôlement effectué avec succès!"; - v_msgEng="Enrollment completed successfully!!"; - // alert_ebene(v_msg, v_msgEng); - setTimeout(() => { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - }, 1000) - } - }, - error: function(data) { - }, - complete: function(data) { - $("#div_wait_face_ebene").html(''); - } - }); -} - -function ebene_confirmer_photo_face() // OK -{ - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_supprimer_photo_face").disable(); - $("#ebene_take_photo_face").disable(); - $("#motif").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_supprimer_photo_face").prop('disabled', true); - $("ebene_take_photo_face").prop('disabled', true); - $("motif").prop('disabled', true); - - $('#message_face').html(""); - $("#div_wait_face_ebene").html(''); - - $("#del_face").val("0"); - faceRegistered = $("#faceRegistered").val(); - if(faceRegistered!="1") - { - v_msg="Cette personne n'a pas encore de photo dans le système!"; - v_msgEng="This person does not have a photo in the system yet!"; - alert_ebene(v_msg, v_msgEng); - $('#message_face').html(""); - return; - } - - image_face = $("#image_face").val(); - if(image_face<=" ") - { - v_msg="Veuillez prendre une photo!"; - v_msgEng="Please take a photo!"; - alert_ebene(v_msg, v_msgEng); - $('#message_face').html(""); - return; - } - - $("#div_wait_face_ebene").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"}, - success: function(data) { - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - $("#okId_face").val("1"); - v_msg="Face confirmée!"; - v_msgEng="Face confirmed!"; - // alert_ebene(v_msg, v_msgEng); - setTimeout(() => { - consultation(); - }, 1000) - } - else - { - $("#okId").val("-1"); - $("#okId_face").val("-1"); - } - }, - error: function(data) { - }, - complete: function(data) { - $("#div_wait_face_ebene").html(''); - } - }); -} - -function ebene_supprimer_photo_face() // OK -{ - $('#message_face').html(""); - $("#div_wait_face_ebene").html(''); - - motif=$("#motif").val(); - motif= motif.trim(); - $("#motif").val(motif); - - if (motif<=" ") - { - v_msg="Veuillez saisir un motif!"; - v_msgEng="Please enter a reaon!"; - alert_ebene(v_msg, v_msgEng); - - $("#motif").focus(); - return; - } - - $("#del_face").val("1"); - - faceRegistered = $("#faceRegistered").val(); - if(faceRegistered!="1") - { - v_msg="Cette personne n'a pas encore de photo dans le système!"; - v_msgEng="This person does not have a photo in the system yet!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - image_face = $("#image_face").val(); - if(image_face<=" ") - { - v_msg="Veuillez prendre une photo!"; - v_msgEng="Please take a photo!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_supprimer_photo_face").disable(); - $("#ebene_take_photo_face").disable(); - $("#motif").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_supprimer_photo_face").prop('disabled', true); - $("ebene_take_photo_face").prop('disabled', true); - $("motif").prop('disabled', true); - - $("#div_wait_face_ebene").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face, 'del_face' : "1", 'motif' : motif}, - success: function(data) { - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - $("#okId").val("-1"); - $("#okId_face").val("-1"); - - document.getElementById('photo_face').setAttribute('src', ""); - - $("#faceRegistered").val("0"); - - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_supprimer_photo_face").disable(); - $("#motif").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_supprimer_photo_face").prop('disabled', true); - $("motif").prop('disabled', true); - - v_msg="Face supprimée avec succès!"; - v_msgEng="Face removed successfully!"; - // alert_ebene(v_msg, v_msgEng); - setTimeout(() => { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - }, 1000) - } - }, - error: function(data) { - }, - complete: function(data) { - $("#div_wait_face_ebene").html(''); - } - }); - } -} - -function fiche_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); -} - -function ebene_confirmer_photo_face_facturation() // OK -{ - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_take_photo_face").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_take_photo_face").prop('disabled', true); - - $('#message_face').html(""); - $("#div_wait_face_ebene").html(''); - - image_face = $("#image_face").val(); - if(image_face<=" ") - { - v_msg="Veuillez prendre une photo!"; - v_msgEng="Please take a photo!"; - alert_ebene(v_msg, v_msgEng); - $('#message_face').html(""); - return; - } - - $("#div_wait_face_ebene").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Feuillemaladie/confirmerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"}, - - success: function(data) { - // $('#div_test_gabarit').html(data); - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - $("#close_poprec_faciane").click(); - $("#okId_face").val("1"); - /* - v_msg="Face confirmée!"; - v_msgEng="Face confirmed!"; - alert_ebene(v_msg, v_msgEng); - */ - user_id_0 = $("#user_id_C").val(); - - codeTypeFacture = $("#codeTypeFacture_C" ).val(); - // alert("codeTypeFacture = "+codeTypeFacture); - // return; - if(codeTypeFacture=="PHAR") - { - facturer_pha(); - } - else if(codeTypeFacture=="CSO") - { - facturer_cso(user_id); - } - else if(codeTypeFacture=="OPT") - { - facturer_opt(); - } - else if(codeTypeFacture=="MON") - { - facturer_monture(user_id); - } - else if(codeTypeFacture=="LAB") - { - facturer_lab(user_id); - } - else if(codeTypeFacture=="LABCSO") - { - facturer_lab_cso(user_id); - } - else if(codeTypeFacture=="SEA") - { - facturer_sea(user_id); - } - else if(codeTypeFacture=="SEACSO") - { - facturer_sea_cso(user_id); - } - } - else - { - $("#okId").val("-1"); - $("#okId_face").val("-1"); - } - }, - error: function(data) { - $('#div_test_gabarit').html(data); - }, - complete: function() { - $("#div_wait_face_ebene").html(''); - } - }); -} - -function facturation_reconnaissance_faciale() -{ - faceRegistered = $("#faceRegistered").val(); - if(faceRegistered!="1") - { - v_msg="Cettte personne n'a pas encore de face dans le système!"; - v_msgEng="This person doesn't have a face in the system yet!"; - alert_ebene(v_msg, v_msgEng); - $('#message_face').html(""); - return; - } - - re_init_photo_face(); - $("#btn_pop_confirm_face").click(); - -} diff --git a/extranet/Js/fonctions_2025_07_08.js b/extranet/Js/fonctions_2025_07_08.js deleted file mode 100644 index ad7547a..0000000 --- a/extranet/Js/fonctions_2025_07_08.js +++ /dev/null @@ -1,17516 +0,0 @@ -function alert_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function alert_ebene_ajax(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function confirm_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return confirm(p_msg_eng); - } - else - { - return confirm(p_msg); - } -} - -function prompt_ebene(p_msg, p_msg_eng, p_retour) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return prompt(p_msg_eng, p_retour); - } - else - { - return prompt(p_msg, p_retour); - } -} - -var p_destinataires=""; -var p_message=""; - -function adherents_police() -{ - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Listeadherent/"); - } -} - -$.prototype.enable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('disabled'); - }); -} - -$.prototype.disable = function () { - $.each(this, function (index, el) { - $(el).attr('disabled', 'disabled'); - }); -} - -$.prototype.unreadable = function () { - $.each(this, function (index, el) { - $(el).attr('READONLY', 'READONLY'); - }); -} - -$.prototype.readable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('READONLY'); - }); -} - -Date.estAnneeBissextile = function (annee) { - return (((annee % 4 === 0) && (annee % 100 !== 0)) || (annee % 400 === 0)); -}; - -Date.getDaysInMonth = function (annee, month) { - return [31, (Date.estAnneeBissextile(annee) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; -}; - -Date.prototype.estAnneeBissextile = function () { - return Date.estAnneeBissextile(this.getFullYear()); -}; - -Date.prototype.getDaysInMonth = function () { - return Date.getDaysInMonth(this.getFullYear(), this.getMonth()); -}; - -Date.prototype.addMonths = function (value) { - var n = this.getDate(); - this.setDate(1); - this.setMonth(this.getMonth() + value); - this.setDate(Math.min(n, this.getDaysInMonth())); - this.setDate(this.getDate()-1); - return this; -}; - -$( ".datepicker" ).datepicker({ - inline: true, - changeMonth: true, - changeYear: true, - yearRange: "c-60:c+20" - -}); - -/*les fonctions courantes et globales */ - -function get_age(dater) -{ - var td2 = $("#datejourfr_C").datepicker("getDate"); - return age = td2.getFullYear()-dater.getFullYear(); -} - -// function controle_age(dater, codeLienParente, controle) -function controle_age(dater, codeLienParente) -{ - age = get_age(dater); - $("#agepersonne").val("Âge : "+age); - - if (age>65) - { - v_msg="Âge "+age+" supérieur à 65 ans!"; - v_msgEng="Age "+age+" over 65!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="E")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="O")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - return true; -} - -/* Début JS client */ -function selectionner_client(id,no) -{ - $("#idClient_C").val(id); - $("#numeroClient_C").val(no); - $("#nomClient_C").val(""); -} - -function selectionner_client_d(id,no) -{ - $("#idClient_d_C").val(id); - $("#numeroClient_d_C").val(no); - $("#nomClient_d_C").val(""); -} - -function afficher_client_id() -{ - idClient=$("#idClient_C" ).val(); - - if (idClient>"") - { - ajax_context_client_afficher(idClient); - } -} - -function afficher_client_d_id() -{ - idClient=$("#idClient_d_C" ).val(); - - if (idClient>"") - { - ajax_context_client_d_afficher(idClient); - } -} - - -/* Fin JS client */ - -/* Début JS police */ -function selectionner_police(id,no) -{ - $("#idPolice_C" ).val(id); - $("#numeroPolice_C" ).val(no); -} - -function selectionner_police_d(id,no) -{ - $("#idPolice_d_C" ).val(id); - $("#numeroPolice_d_C" ).val(no); -} - -function afficher_police_id() -{ - idPolice=$("#idPolice_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_afficher(idPolice); - } -} - -function afficher_police_d_id() -{ - idPolice=$("#idPolice_d_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_d_afficher(idPolice); - } -} - - -/* Fin JS client */ - -/* Début JS adherent */ -function selectionner_adherent(id,no) -{ - $("#idAdherent_C" ).val(id); - $("#numeroAdherent_C" ).val(no); -} - -function afficher_adherent() -{ - if ($("#numeroAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#numeroAdherent_C" ).val()+"/"); - } -} - -function afficher_adherent_id() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/"); - } -} -/* Fin JS adherent */ - -/* Début JS bénéficiare */ -function selectionner_beneficiaire(id,no) -{ - $("#idBeneficiaire_C").val(id); - $("#numeroBeneficiaire_C" ).val(no); -} - -function afficher_beneficiaire_id() -{ - idBeneficiaire=$("#idBeneficiaire_C").val(); - okId=$("#okId").val(); - - if (idBeneficiaire>"") - { - ajax_context_beneficiaire_afficher(idBeneficiaire, okId); - } -} - -function afficher_adherent_assure() -{ - if ($("#idAdherent_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"); -} - -function afficher_assure() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"+$("#idAdherent_C" ).val()+"/"); - } -} - -/* Fin JS beneficiaire */ - -function fermerFenetre() -{ - v_msg="Etes-vous sur de vouloir quitter?"; - v_msgEng="Are you sure you want to exit?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - ajax_deconnexion(); - } -} - -function ChangerPass() -{ - if ($("#ancmdp" ).val()<=' ') - { - v_msg="Veuillez saisir l\'ancien mot de passe!"; - v_msgEng="Please enter the old password!"; - alert_ebene(v_msg, v_msgEng); - - $("#ancmdp").focus(); - return false; - } - - if ($("#nvmdp" ).val()<=' ') - { - v_msg="Veuillez saisir un mot de passe!"; - v_msgEng="Please enter a password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#nvmdp").val()=='0000' || $("#nvmdp").val()=='radiant') - { - v_msg="Veuillez changer de mot de passe!"; - v_msgEng="Please change password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - longueur = $("#nvmdp").val().length; - - if(longueur>0 && longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minimum required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val()) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } -} - -function afficher_image(fichier) -{ - window.open(fichier); -} - - -function selectionner_bon(id,no, codeEtatBon, motifAnnulation) -{ - $("#idBon_C").val(id); - $("#numeroBon_C").val(no); - $("#motifAnnulation_C").val(motifAnnulation); - $("#codeEtatBon_C").val(codeEtatBon); -} - - -function imprimerbon() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - - alert_ebene(v_msg, v_msgEng); - - return; - } - - var codeEtatBon = $("input[name='codeEtatBon']").val(); - - if (codeEtatBon!="1") - { - return; - } - - $("#frmconsultation").submit(); -} - -function imprimerbonVierge() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $("#codeTypeBon").val('2'); - $("#frmconsultation").submit(); - $("#codeTypeBon").val('1'); -} - -function calculer_Tm() -{ - $("#montantTm").val( ($("#montantacte").val() * (100-$("#tauxCouverture").val() )) / 100 ); - if ($("#codeMedecin").val()>" ") - $("#numeroBon").focus(); - else - $("#codeMedecin").focus(); - return true; -} - -function controlefocusconsultationMd() -{ - if ($("#codeActe").val()>" ") - $("#numeroBon").focus(); - else - $("#codeActe").focus(); - return true; -} - -function ajaxinfosacteexamen() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - } - }); -} - -function ajaxbonexamendisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - $("#codeTypeBon").val('1'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function ajaxbonhospitdisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function accueil() -{ - if($("#codeProfil_C" ).val()=="MEC") - { - window.location.assign($("#racineWeb").val()+"Accueilmedecin/"); - } - else - { - window.location.assign($("#racineWeb").val()+"Accueil/"); - } -} - - -function forceDownload(fileURL, fileName) -{ -} - - -function ged() -{ - if ($("#numeroBeneficiaire_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Ged/"); -} - - -function tachesadherent() -{ - if ($("#numeroAdherent_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - return; - } - window.location.assign($("#racineWeb").val()+"Tacheadherent/"); -} - -function afficherged(cheminFichier) -{ - if (cheminFichier<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - return; - } - //window.open(cheminFichier); - window.open(cheminFichier, '_blank'); -} - -function archiverged() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un document!"; - v_msgEng="Please select a document"; - alert_ebene(v_msg, v_msgEng); - return; - } - if( $("#accesAssure").val()=="0" && $("#accesPrestataire").val()=="0" - && $("#accesMedecin").val()=="0" && $("#accesGestionnaire").val()=="0") - { - v_msg="Le document doit être visible par au moins un des acteurs!"; - v_msgEng="The document must be seen by at least one of the persons in charge!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function archiverfacture() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function ajaxinfosdestinatairetache() -{ - if ($("#codeDestinataire").val()<=" ") - { - v_msg="Veuillez sélectionner un destinataire!"; - v_msgEng="Please select a recipient!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeDestinataire").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosdestinatairetache/", - type : 'post', - data: "codeDestinataire="+$("#codeDestinataire").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosdestinatairetache").html(data); - }, - complete: function() { - $("#emailtache").val( $("#emailActeurtache_info").val()); - } - }); -} - -function selectionner_tache(id) -{ - $("#idTache").val(id); -} - -function afficher_tache() -{ - if ($("#idTache" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - } else - window.location.assign($("#racineWeb" ).val()+"Affichertache/"+$("#idTache").val()+"/"); -} - -function reinitialiserrecherche() -{ - // window.location.assign($("#racineWeb").val()+"Tache/"); -} - - -function selectionner_Rq(lienrequete) -{ - $("#lienrequete" ).val(lienrequete); -} - - -function parametre_Rq() -{ - if ($("#lienrequete" ).val()<="") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query (request)!"; - alert_ebene(v_msg, v_msgEng); - } - { - window.location.assign($("#racineWeb" ).val()+$("#lienrequete" ).val()); - } -} - -function imprimer_pdf() -{ - $("#sortie").val('1'); - $("#frmrequete").submit(); -} - -function export_xls() -{ - $("#sortie").val('2'); - $("#frmrequete").submit(); - $("#sortie").val('1'); -} - -function affichermanuel() -{ - codeProfil = $("#codeProfil_C").val(); - - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - - switch(codeProfil) - { - case "AAA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_AGENT_AFRIK_ASSUR.pdf"; - break; - case "ADM": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ADMINISTRATEUR_SYSTEME.pdf"; - break; - case "ASS": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ASSURE.pdf"; - break; - case "CSO": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - break; - case "DIR": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_DIRECTION_AFRIK_ASSUR.pdf"; - break; - case "LAB": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_LABORATOIRES.pdf"; - break; - case "MEC": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_MEDECINS_CONSEIL.pdf"; - break; - case "PHA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_PHARMACIES.pdf"; - break; - } - window.open('Docs/'+cheminFichier, '_blank'); -} - -function ajaxListerequetesProfil() -{ - $("#listerequete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrequetesprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listerequete").html(data); - } - }); -} - -function compta() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - window.location.assign($("#racineWeb").val()+"Compta/"+idClient+"/"); -} - -function selectionner_client_pop(id,no,nom) -{ - $("#nocli").val(no); - $("#nomcli").val(nom); - selectionner_client(id,no); -} - -function controle_numerique(controle) -{ - if(isNaN(controle.value)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } - return true; -} - -function ajax_context_client(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - -function ajax_context_client_afficher(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Ficheclient/"); - } - }); -} - -function ajax_context_police(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - - -function ajax_context_police_afficher(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -/* 24/03/2019 -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/" - }); -} -*/ - -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/", - complete: function() - { - window.open('about:blank','_parent',''); - close(); - window.close(); - } - }); -} - - -function ajax_flexcode() -{ - // donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxflexcode/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#content").html(data); - }, - complete: function() { - // window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -function controle_champ_obligatoire(controle) -{ - if (controle.value<=" ") - { - v_msg="Valeur exigée!"; - v_msgEng="Value required!"; - alert_ebene(v_msg, v_msgEng); - controle.focus(); - return false; - } - return true; -} - -function exporter_liste_assures() -{ - $('#div_liste').html(''); - - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterlisteassure/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function imprimer_liste_assures() -{ - $('#div_liste').html(''); - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlisteassure/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_limites() -{ - $('#div_liste').html(''); - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlimite/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function pop_tableau_prestation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtableauprestation/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_tableau_prestation").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function selectionner_tout_limite(p_idCollegeTemp, p_choix) -{ - donnees = 'idCollegeTemp='+p_idCollegeTemp; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionnertout/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college_simple(); - pop_afficher_selection_limite(p_idCollegeTemp); - } - }); -} - -function prestation_possible() -{ - enVigueur=$("#enVigueur_C").val(); - codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire=$("#etatbeneficiaire_C").val(); - college_couvert=$("#college_couvert_C").val(); - derogation_en_cours=$("#derogation_en_cours_C").val(); - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - - datejour = $("#datejour_C").val(); - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - dateEffetCouvert = $("#dateEffetCouvert").val(); - /* - if (dateEffetCouvert!="1") - { - v_msg="Attention! Non renouvelé"; - v_msgEng="Warning! Not renewed"; - alert_ebene(v_msg, v_msgEng); - return false; - } - */ - - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (college_couvert<1 && derogation_en_cours<1) - { - v_msg="Attention! Cette personne n\'a pas accès à ce centre"; - v_msgEng="Warning! This person does not have access to this center"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire = $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = new Date(datejour); - var td2 = new Date(dateEcheancePolice); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - // if (dt1>dt2) - if (dt1>dt2 || dt1"2000-01-01") - { - var tdd = new Date(dateSortieBeneficiaire); - dtd=Math.round(Date.parse(tdd)/(1000*3600*24)); - - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - } - - - dateDeces_C=$("#dateDeces_C").val(); - - if(dateDeces_C>"2000-01-01") - { - v_msg="Attention! personne décédée!"; - v_msgEng="Warning! Deceased!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - return true; -} - -function consultation() -{ - /* Laisser la possibilité de gérer les cas d'accident */ - - /* - anciennete = $("#anciennete").val(); - delaiCarenceBeneficiaire = $("#delaiCarenceBeneficiaire").val(); - - anciennete = parseInt(anciennete); - delaiCarenceBeneficiaire = parseInt(delaiCarenceBeneficiaire); - - if (delaiCarenceBeneficiaire>0) - { - if (anciennete0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - } -} - -function gestionbon() -{ - adminBon = $("#adminBon" ).val(); - - if (adminBon!="1") - { - v_msg="Accès refusé!"; - v_msgEng="Access denied!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - window.location.assign($("#racineWeb").val()+"Receptionbons/"); -} - -function afficherbon() -{ - codeTypeBon=$("#codeTypeBon").val(); - codeEtatBon=$("#codeEtatBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() - { - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : "+$("#nbligne_info").val()); - } - else - { - $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - - // $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - }); -} - -function demander_annulation_bon() -{ - var codeEtatBon = $("#codeEtatBon_C").val(); - var motifAnnulation = $("#motifAnnulation_C").val(); - var numeroBon = $("#numeroBon_C").val(); - var idBon = $("#idBon_C").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeEtatBon=="3") - { - v_msg="Anullé pour motif : "+motifAnnulation; - v_msgEng="Canceled for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBon=="4") - { - v_msg="Remplacé pour motif : "+motifAnnulation; - v_msgEng="Replaced for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeEtatBon=="9") - { - v_msg="Demande anullation pour motif : "+motifAnnulation; - v_msgEng="Cancellation request for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la demande d\'annulation du bon No "+numeroBon+"?"; - v_msgEng="Do you confirm the request for cancellation of the prescription No "+numeroBon+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - v_msg="Raison de l\'annulation?"; - v_msgEng="Reason for cancellation?"; - - motifAnnulation = prompt_ebene(v_msg, v_msgEng, motifAnnulation); - if (motifAnnulation<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - $("#motifAnnulation_C").val(motifAnnulation); - - donnees = 'idBon='+idBon+'&motifAnnulation='+motifAnnulation; - donnees_sav = 'idBon='+idBon+'&typeMail=maildemandeannulationbon'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/demanderAnnulationBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - - v_msg="Demande envoyée avec succès!"; - v_msgEng="Request sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficherbon(); - } - }); - } -} - -function enregistrer_commande_bon() -{ - codeTypeBon=$("#codeTypeBon").val(); - - if ($("#codeTypeBon").val()<" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - quantite =$("#quantite").val(); - - if (quantite<" ") - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - $("#quantite").focus(); - return; - } - - quantite = parseInt(quantite); - - if(quantite<1) - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - $("#quantite").focus(); - return; - } - - /* - commentaire=$("#commentaire").val(); - - if ($("#commentaire").val()<" ") - { - v_msg="Veuillez saisir une note!"; - v_msgEng="Please enter a note/comment!"; - alert_ebene(v_msg, v_msgEng); - $("#commentaire").focus(); - return; - } - */ - - var codehtml = ""; - - v_msg="Confirmez-vous cette commande?"; - v_msgEng="Do you confirm this order?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - prestataire = $("#prestataire_C").val(); - donnees = 'codeTypeBon='+codeTypeBon+'&quantite='+quantite; - donnees_sav = donnees+'&prestataire='+prestataire+'&typeMail=mailcommandebon'; - - lst_libelleBon = document.getElementById("codeTypeBon"); - libelleBon = lst_libelleBon.options[lst_libelleBon.selectedIndex].text.trim(); - typeSms = "commandebon"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcommanderbons/commanderBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - codehtml = data; - preparesms(typeSms); - }, - complete: function() { - mettremailattente(donnees_sav); - - v_msg="commande envoyée avec succès!"; - v_msgEng="Order sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_page_entiere").html(codehtml); - } - }); - } -} - -function receptionner_bon() -{ - nbligne_info=$("#nbligne_info").val(); - nbligne_info = parseInt(nbligne_info); - - if (nbligne_info==0) - { - v_msg="Veuillez actualiser la liste avant!"; - v_msgEng="Please refresh before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeTypeBon=$("#codeTypeBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistegenererbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - $("#nbligne").val("Nombre de lignes affichées : "+$("#nbligne_info").val()); - } - }); -} - - -function listerdemandebon() -{ - codeTypeBon=$("#codeTypeBon").val(); - d1=$("#d1").val(); - d2=$("#d2").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - donnees = 'codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2; - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistedemandebon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - } - }); -} - -function ajaxactespossibles() -{ - codeGestionBon = $("#codeGestionBon").val(); - - codeFamilleActe=$("#codeFamilleActe").val(); - codeTypePrestation=$("#codeTypePrestation").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - $("#numeroBon").val(""); - // $("#btn_enreg").disable(); - // $("#codeEtatBon").val(""); - $("#msgErreur").html(""); - - if (codeGestionBon=="0") - { - $("#btn_enreg").disable(); - $("#codeEtatBon").val(""); - } - } - }); -} - -function ajaxactespossibles_med() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - codeTypePrestation=$("#codeTypePrestation").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesmed/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - }, - complete: function() { - } - }); -} - -function ajaxinfosacte() -{ - if ($("#codeActe").val()<=" ") - { - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#montantacte").val( $("#montantacte_info").val()); - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - // calculer_Tm(); - } - }); -} - - -function ajaxprixacte() -{ - codeGestionBon = $("#codeGestionBon").val(); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - donnees = 'codeActe='+codeActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - - $("#numeroBon").val(""); - $("#codeRaisonConsultation").focus(); - $("#msgErreur").html(""); - - if (codeGestionBon=="0") - { - $("#btn_enreg").disable(); - $("#codeEtatBon").val(""); - } - }, - complete: function() { - } - }); -} - - -function ajaxbondisponible() -{ - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - - $("#numeroBon").val(""); - - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - - $("#numeroBon").val(""); - - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - $("#codeRaisonConsultation").focus(); - - $("#numeroBon").val(""); - - return; - } - - numeroBon = $("#numeroBon").val(); - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function ajaxinfosbonconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - $("#btn_pop_medecin").click(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#codeActe").focus(); - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#codeRaisonConsultation").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerconsultation() -{ - /* - dateSurvenance = $("#dateSurvenance").val(); - alert("dateSurvenance => "+dateSurvenance); - return; - */ - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - /* - delaiCarenceBeneficiaire = $("#delaiCarenceBeneficiaire").val(); - delaiCarenceBeneficiaire = parseInt(delaiCarenceBeneficiaire); - - if (delaiCarenceBeneficiaire>0) - { - if (anciennete"+delaiCarenceBeneficiaire); - // alert("appliquerDelaiCarence =>"+appliquerDelaiCarence); - // return; - - if (delaiCarenceBeneficiaire>0 && appliquerDelaiCarence=="1") - { - if (anciennete  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossiers/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function selectionner_feuille_maladie(no) -{ - $("#numeroFeuilleMaladie_C" ).val(no); -} - -function afficher_feuille_maladie() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - feuillemaladie(); - } - }); -} - - - -function enregistrerprescription() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - //$("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescription/enregistrerprescription/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - } - }); - } -} - -function ajaxinfosbonprescription() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - if (numeroBonOrdonnance>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function afficher_pop_recherche_medicament() -{ - nomsearch = $("#nomsearch").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - $("#div_listemedicament").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicaments/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament").html(data); - } - }); - } -} - -function ctrlkeypress(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament(); - } -} - -function selectionner_medicament_pop(codeMedicament, libelleMedicament) -{ - $("#codeMedicament_pop").val(codeMedicament); - $("#libelleMedicament_pop").val(libelleMedicament); -} - -function ajouter_medicament() -{ - codeMedicament = $("#codeMedicament_pop").val(); - libelleMedicament = $("#libelleMedicament_pop").val(); - - if (codeMedicament<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Prescrire : "+libelleMedicament+"?"; - v_msgEng="Prescribe : "+libelleMedicament+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeMedicament='+codeMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/ajoutermedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - prescription_medicament(); - }, - complete: function() { - } - }); - } -} - -function ajax_maj_qte_medicament(idMedicament, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - $("#medicaments").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function supprimer_medicament(idMedicament) -{ - v_msg="Confirmez-vous la suppression de ce médicament?"; - v_msgEng="Do you confirm the removal of this medicine/drug?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/supprimer/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - prescription_medicament(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function ajoutermedicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/ajoutermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ajoutermedicament_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - // raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function ajoutermedicament_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/ajoutermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function ajoutermedicament_pha_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - // raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirermedicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/retirermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirermedicament_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/retirermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirermedicament_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/retirermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirermedicament_pha_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/retirermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - // actualiser_pharmacien(); - } - }); -} - -function valider_pharmacie_cso() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à enregitrer! Confirmez-vous cette situation?"; - v_msgEng="Nothing to save! Do you confirm this situation?"; - } - else - { - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - } - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/enregistrerpharmacie/", - type: 'POST', - success: function(data) { - maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } -} - -function chercher_ordonnance(numeroBonOrdonnance) -{ - donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnance/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function chercher_ordonnance_opt(numeroBonOptique) -{ - if(numeroBonOptique<="0") - { - // actualiser_opticien(); - reinitialiser_opticien(); - return; - } - - donnees = 'numeroBonOptique='+numeroBonOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function chercher_ordonnance_lab(numeroBonExamen) -{ - donnees = 'numeroBonExamen='+numeroBonExamen; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressord(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonOrdonnance=$("#numeroBonOrdonnance").val(); - $("#numeroBonOrdonnance").blur(); - } -} - -function rechercherbonordonnance() -{ - numeroBonOrdonnance=$("#numeroBonOrdonnance").val(); - - if (numeroBonOrdonnance>" ") - { - chercher_ordonnance(numeroBonOrdonnance); - } -} - - -function ctrlkeypressordopt(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonOptique=$("#numeroBonOptique").val(); - $("#numeroBonOptique").blur(); - } -} - - -function ctrlkeypressordlab(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonExamen=$("#numeroBonExamen").val(); - $("#numeroBonExamen").blur(); - } -} - -function rechercherbonoptique() -{ - numeroBonOptique=$("#numeroBonOptique").val(); - - if (numeroBonOptique>" ") - { - chercher_ordonnance_opt(numeroBonOptique); - } -} - -function valider_presciption() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - if (numeroBonOrdonnance<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette ordonnance ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function ajaxchanger_type_bon() -{ - $("#msgErreur").html(""); -} - -function ajaxprixactemed() -{ - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter quantity!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantite").focus(); - - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixactemed/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function enregistreractemedical() -{ - acteExclu = $("#acteExclu").val(); - - autorisation = "0"; - - if(acteExclu==1) - { - autorisation = "2"; - - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - donnees="" - donnees_sav=""; - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - $("#nomMedecin").focus(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - prixTarif = $("#prixTarif").val(); - - if(prixActe==0 || parseFloat(prixActe)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - quantite = parseInt(quantite); - div_quantite.val(quantite); - - if(quantite==0) - { - div_quantite.focus(); - - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please neter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet acte?"; - v_msgEng="Do you confirm this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - prixActe = $("#prixActe").val(); - valeurActe = $("#valeurActe").val(); - - montantTm = $("#montantTm").val(); - aRembourser = $("#aRembourser").val(); - - ententePrealable = $("#ententePrealable").val(); - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&quantite='+quantite+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&valeurActe='+valeurActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/enregistreractemedical/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - feuillemaladie(); - } - }); - } -} - -function ajax_changer_qte_acte() -{ - codeActe = $("#codeActe").val(); - prixActe = $("#prixActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please neter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerqteacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_acte_medical(idPrestationactes, codeTypePrestation) -{ - v_msg="Confirmez-vous la suppression de cet acte?"; - v_msgEng="Do you confirm the removal of this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - feuillemaladie_ajax(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function supprimer_chambre(idChambre) -{ - v_msg="Confirmez-vous la suppression de cette chambre?"; - v_msgEng="Do you confirm the removal of this room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPrestationactes='+idChambre+'&codeTypePrestation=HOSP'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - attribution_chambre(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function ajaxinfosbonhospitalisation() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonHospitalisation = $("#numeroBonHospitalisation").val(); - numeroBonHospitalisation = parseInt(numeroBonHospitalisation); - if (numeroBonHospitalisation>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon Hospitalisation!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonhospitalisation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerhospitalisation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&numeroFeuilleMaladie='+numeroFeuilleMaladie; - donnees_sav = donnees+'&typeMail=mailhospitalisation'; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - typeSms="hospitalisation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerhospitalisation/enregistrerhospitalisation/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - - /* - mise en commentaire le 04/07/2019 - => pour les attributions automatiques, on ne connait - pas encore le No de bon - preparesms(typeSms); - */ - }, - complete: function() - { - /* - mise en commentaire le 04/07/2019 - => pour les attributions automatiques, on ne connait - pas encore le No de bon - mettremailattente(donnees_sav); - */ - - v_msg="Avis hospitalisation envoyé, souhaitez-vous ajouter une chambre?"; - v_msgEng="Hospitalization notice sent, would you like to add a room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - attribution_chambre(); - } - else - { - feuillemaladie(); - } - } - }); - } -} - -function ajaxprixchambre() -{ - $("#btn_enreg").disable(); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $("#infosacte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixchambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - - -function ajax_changer_duree_chambre() -{ - $("#btn_enreg").disable(); - - codeActe = $("#codeActe").val(); - prixActe = $("#prixActe").val(); - numeroChambre = $("#numeroChambre").val(); - - /* - alert("numeroChambre => "+numeroChambre); - return; - */ - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter duration!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - claculerfinchambre(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&numeroChambre='+numeroChambre; - - $("#infosacte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerdureechambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - - -function claculerfinchambre() -{ - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - var typdate = $("#debut").datepicker("getDate"); - typdate.setDate(typdate.getDate() + quantite -1); - - $( "#fin" ).datepicker( "setDate", typdate ); - - // contrôle du cheveauchement des dates - /* - var td1 = new Date($("#dateFinHospit").val()); - var td2 = $("#debut").datepicker("getDate"); - - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - $("#btn_enreg").disable(); - $("#debut").focus(); - - v_msg="Veuillez revoir vos dates!"; - v_msgEng="Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#btn_enreg").enable(); - */ -} - -function enregistrerchambre() -{ - acteExclu = $("#acteExclu").val(); - ententePrealable = $("#ententePrealable").val(); - - /* - alert('ententePrealable = '+ententePrealable); - return; - */ - - autorisation = "0"; - - if(acteExclu==1) - { - autorisation = "2"; - v_msg="Non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - prixTarif = prixActe; - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - quantite = parseInt(quantite); - div_quantite.val(quantite); - - if(quantite==0) - { - div_quantite.focus(); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // contrôle du cheveauchement des dates - - // mis en commentaire le 31/10/2018 BONA - /* - var td1 = new Date($("#dateFinHospit").val()); - var td2 = $("#debut").datepicker("getDate"); - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - $("#btn_enreg").disable(); - $("#debut").focus(); - - v_msg="Veuillez revoir vos dates!"; - v_msgEng="Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return; - } - // $("#btn_enreg").enable(); - */ - - numeroChambre = $("#numeroChambre").val(); - if (numeroChambre<=" ") - { - v_msg="Veuillez saisir le No de chambre!"; - v_msgEng="Please enter room number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroChambre").focus(); - return; - } - - v_msg="Confirmez-vous cette chambre?"; - v_msgEng="Do you confirm this room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees="" - donnees_sav=""; - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - prixActe = $("#prixActe").val(); - valeurActe = $("#valeurActe").val(); - - montantTm = $("#montantTm").val(); - aRembourser = $("#aRembourser").val(); - - debut = $("#debut").val(); - // $("#fin").enable(); - fin = $("#fin").val(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&valeurActe='+valeurActe; - donnees += '&montantTm='+montantTm+'&aRembourser='+aRembourser+'&debut='+debut+'&fin='+fin +'&numeroChambre='+numeroChambre; - donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif; - donnees += '&ententePrealable='+ententePrealable; - - // alert("donnees => "+donnees); - // return; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $("#btn_enreg_chambre").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerchambre/enregistrerchambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - v_msg="Enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - attribution_chambre(); - } - }); - } -} - -function actesmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Actesmedicaux/"); -} - -function optique() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - prescription_optique(); -} - -function pharmacien() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } -} - -function dossiers(okId) -{ - codeProfil = $("#codeProfil_C" ).val(); - - if(codeProfil=="PHA") - { - pharmacien(); - return; - } - - if(codeProfil=="OPT") - { - monture = $("#monture").val(); - - if(monture=="1") - { - window.location.assign($("#racineWeb" ).val()+"Monture/"); - return; - } - - opticien(); - return; - } - - if(codeProfil=="LAB") - { - laboratoire(); - return; - } - - if(codeProfil=="SEA") - { - seancekine(); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - - /* - else - { - // finger_id = $("#finger_id_C" ).val(); - finger_id = $("#okId" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - return; - } - - - if (prestation_possible()) - { - if (okId==1) - { - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - return; - } - else - { - okId=$("#okId" ).val(); - } - - if (okId==1) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextidentification/", - type : 'post', - error: function(errorData) { - }, - complete: function() { - if (prestation_possible()) - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - } - } - }); - } - else - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - } - } -} - -function afficher_beneficiaire_id_okId() -{ - idBeneficiaire=$("#idBeneficiaire_C").val(); - okId=$("#okId").val(); - - if (idBeneficiaire>"") - { - ajax_context_beneficiaire_afficher(idBeneficiaire, okId); - } -} - -function ajax_context_beneficiaire_afficher(idBeneficiaire, okId) -{ - donnees = 'idBeneficiaire='+idBeneficiaire+'&okId='+okId; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - -function facturer_cso(user_id) -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // verifier depasement - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite, souhaitez-vous continuer?"; - v_msgEng="Warning ! Overflow, Would you like to continue?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - } - // Fin verification depassement - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailfacturationfeuillemaladie'; - - typeSms = "facturer_cso"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerfeuillemaladie/facturer/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - feuillemaladie(); - } - }); - -} - -function facturer_feuillemaladie() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numOrd = $("#numOrd").val(); - noPrescription = $("#noPrescription").val(); - - if (numOrd==0 && noPrescription==0) - { - v_msg="Attention, pas de presciption de médicaments!?"; - v_msgEng="Warning, no presciption of drugs!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - affectionObligatoire=$("#affectionObligatoire").val(); - codeAffection=$("#codeAffection").val(); - - if (affectionObligatoire=="1" && codeAffection<="0000") - { - v_msg="Diagnostique exigé!"; - v_msgEng="Diagnosis required!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleAffection").focus(); - $("#btn_pop_affection").click(); - - return; - } - - v_msg="Confirmez-vous la facturation?"; - v_msgEng="Do you confirm billing?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - facturer_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_cso(user_id_0); - return; - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id = $("#user_id_C").val(); - finger_id = $("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_pha() -{ - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - /* mis en commentaire le 31/07/2018 => permettre la multi-facturation - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailpharmacie'; - - typeSms = "facturer_pha"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrerpharmacie/", - type: 'POST', - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function valider_pharmacie_pha() -{ - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - estRempalace=$("#estRempalace").val(); - - if (estRempalace=="1") - { - v_msg="Remplacée!"; - v_msgEng="Replaced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroPrescription=$("#numeroPrescription_C").val(); - - if (numeroPrescription<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - /* mis en commentaire le 31/07/2018 => permettre la multi-facturation - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en pharmacie - /* - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_pha(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - - facturer_pha(); - } -} - -function valider_optique() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - nbVerres=$("#nbVerres").val(); - nbVerres = parseInt(nbVerres); - - if (nbVerres<1) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - numeroBonOptique=$("#numeroBonOptique").val(); - if (numeroBonOptique<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette ordonnance ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - feuillemaladie(); - }, - complete: function() { - } - }); - } -} - -function separateur_millier(montant) -{ - montant = parseInt(montant); - montant.toLocaleString(); - return montant.toLocaleString(); -} - -function ajaxinfosbonoptique() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonOptique = $("#numeroBonOptique").val(); - numeroBonOptique = parseInt(numeroBonOptique); - if (numeroBonOptique>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonoptique/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - - -function supprimer_optique(idOptique) -{ - v_msg="Confirmez-vous la suppression de ce verre?"; - v_msgEng="Do you confirm the removal of this glass?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerverre/supprimerverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#medicaments").html(data); - }, - error: function(data) { - }, - complete: function() { - prescription_optique(); - } - }); - } -} - - -function enregistreroptique() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreroptique/enregistreroptique/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_optique(); - } - }); - } -} - -function enregistrerverre() -{ - codeOptique = $("#codeOptique").val(); - if (codeOptique<=" ") - { - v_msg="Veuillez sélectionner un verre!"; - v_msgEng="Please select a glass!"; - alert_ebene(v_msg, v_msgEng); - $("#codeOptique").focus(); - return; - } - - v_msg="Confirmez-vous ces verres?"; - v_msgEng="Do you confirm these glasses?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'codeOptique='+codeOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerverre/enregistrerverre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - prescription_optique(); - }, - complete: function() { - } - }); - } -} - - -function valider_chambre() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette hospitalisation ?"; - v_msgEng="Do you confirm this hospitalization?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - - -function valider_opticien() -{ - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroOptique=$("#numeroOptique_C").val(); - - if (numeroOptique<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (idPrestationactes==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en magasin optique - /* - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_opt(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - facturer_opt(); - } -} - -function opticien() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } -} - - -function envoyer_alert_tentative_fraude(user_id) -{ - /* - donnees = 'user_id='+user_id; - - idBeneficiaire = $("#idBeneficiaire_C").val(); - prestataire = $("#prestataire_C").val(); - - donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=mailfraudeidentite'; - - mettremailattente(donnees_sav); - */ -} - - -function ajouterverre_opt_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverretous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function ajouterverre_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirerverre_opt_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverretous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirerverre_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function facturer_opt() -{ - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (idPrestationactes==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailoptique'; - - typeSms = "facturer_opt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/enregistreroptique/", - type: 'POST', - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } - }); - -} - -function afficher_detail_generartionbon(idgenerationbon) -{ - if (idgenerationbon>"") - { - window.location.assign($("#racineWeb" ).val()+"Detailgenerationbon/"+idgenerationbon+"/"); - } -} - - -function maj_monture_temp(idOptique, monture) -{ - donnees = 'idOptique='+idOptique+"&monture="+monture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/majmonture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function supprimer_espace_nombre(nombre) -{ - nombre = nombre.replace(" ", ""); - - if(isNaN(nombre)) - { - v_msg = nombre+" n'est pas un nombre!"; - v_msgEng = nombre+" is not a number!"; - alert_ebene(v_msg, v_msgEng); - return '0'; - } - nombre = parseInt(nombre); - return nombre; -} - -function demander_derogation() -{ - window.location.assign($("#racineWeb" ).val()+"Demandederogation/"); -} - -function enregistrerdemandederogation() -{ - codeDerogation = $("#codeDerogation").val(); - - lst_libelleDerogation = document.getElementById("codeDerogation"); - libelleDerogation = lst_libelleDerogation.options[lst_libelleDerogation.selectedIndex].text.trim(); - - college_couvert=$("#college_couvert_C").val(); - if (college_couvert>0 && codeDerogation=="01") - { - v_msg="Attention! Cette personne a déjà accès à ce centre"; - v_msgEng="Warning! This person all ready have access to this center"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeDerogation<=" ") - { - v_msg="Veuillez sélectionner une dérogation!"; - v_msgEng="Please select an exemption!"; - alert_ebene(v_msg, v_msgEng); - $("#codeDerogation").focus(); - return; - } - - observations = $("#observations").val(); - if (observations<=" ") - { - v_msg="Veuillez saisir la motivation!"; - v_msgEng="Please select the motivation!"; - alert_ebene(v_msg, v_msgEng); - $("#observations").focus(); - return; - } - - v_msg="Confirmez-vous cette demande de dérogation?"; - v_msgEng="Do you confirm this request?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeDerogation='+codeDerogation+'&observations='+observations+'&libelleDerogation='+libelleDerogation; - - idBeneficiaire = $("#idBeneficiaire_C").val(); - prestataire = $("#prestataire_C").val(); - - - donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=maildemandederogation'; - - typeSms = "demandederogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandederogation/enregistrerdemandederogation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - preparesms(typeSms); - }, - complete: function() - { - mettremailattente(donnees_sav); - - v_msg="Demande envoyée avec succès!"; - v_msgEng="Request sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - liste_derogation(); - } - }); - } -} - -function liste_derogation() -{ - window.location.assign($("#racineWeb" ).val()+"Listederogations/"); -} - -function listerderogation() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function afficher_div_wait() -{ - // $("#div_page_complet").disable(); - // $("#div_wait").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); -} - -function effacer_div_wait() -{ - $("#div_wait").html(""); -} - -function consultationpha() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationpha/"); -} - -function consultationlab() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationlab/"); -} - -function consultationopt() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationopt/"); -} - -function consultationcso() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationcso/"); -} - -function consultationbenpha() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenpha/"); -} - -function consultationbenopt() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenopt/"); -} - -function consultationbencso() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbencso/"); -} - -function listerdossiercons_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbencso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function listerdossiercons() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationcsoentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationcso/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function afficher_feuille_maladie_cons() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_feuillemaladie(); - } - }); -} - -function afficher_feuille_maladie_cons_ben() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_feuillemaladie_ben(); - } - }); -} - -function consulter_prescription_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Prescriptionconsben/"); -} - -function consulter_chambre_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Chambreconsben/"); -} - -function consulter_optique_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Optiqueconsben/"); -} - -function consulter_feuillemaladie_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladieconsben/"); -} - -function consulter_prescription() -{ - window.location.assign($("#racineWeb" ).val()+"Prescriptioncons/"); -} - -function consulter_chambre() -{ - window.location.assign($("#racineWeb" ).val()+"Chambrecons/"); -} - -function consulter_optique() -{ - window.location.assign($("#racineWeb" ).val()+"Optiquecons/"); -} - -function consulter_feuillemaladie() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/"); -} - -// - -function prescription_medicament() -{ - actVisible=$("#actVisible").val(); - modeSaisieFacture=$("#modeSaisieFacture").val(); - saisirFactureDecompte=$("#saisirFactureDecompte").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (modeSaisieFacture="1" && saisirFactureDecompte!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescription/"); -} - -function livraison_pharmacie() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance=$("#numeroBonOrdonnance_C").val(); - - if (numeroBonOrdonnance==0) - { - v_msg="Aucune prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Pharmacie/"); -} - -function prescription_optique() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - saisirFactureDecompte=$("#saisirFactureDecompte").val(); - - if (modeSaisieFacture="1" && saisirFactureDecompte!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Optique/"); -} - -function attribution_chambre() -{ - window.location.assign($("#racineWeb" ).val()+"Chambre/"); -} - -function feuillemaladie() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladie/"); -} - -function feuillemaladie_ajax() -{ - $("#div_feuillemaladie").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfeuillemaladie/", - type: 'POST', - success: function(data) { - $("#div_feuillemaladie").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function recherche() -{ - window.location.assign($("#racineWeb" ).val()+"Recherche/"); -} - -function requetes() -{ - codeProfil = $("#codeProfil_C" ).val(); - - if(codeProfil=="PHA") - { - consultationpha(); - return; - } - - if(codeProfil=="OPT") - { - consultationopt(); - return; - } - - if(codeProfil=="CSO") - { - consultationcso(); - return; - } - - if(codeProfil=="LAB") - { - consultationlab(); - return; - } - - if(codeProfil=="SEA") - { - consultationsea(); - return; - } -} - -// - -function lister_factures_pha_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenpha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function lister_factures_opt_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_pha_ben(idFacture, numeroBonOrdonnance, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_pha_ben(); - } - }); - } -} - -function afficher_facture_cons_pha(idFacture, numeroBonOrdonnance, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_pha(); - } - }); - } -} - -function consulter_facture_pha_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Pharmacienconsben/"); -} - -function consulter_facture_pha() -{ - window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/"); -} - -function afficher_facture_cons_opt_ben(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique; - donnees += '&codePrestataireLivraison='+codePrestataireLivraison; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfactureopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_opt_ben(); - } - }); - } -} - -function consulter_facture_opt_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Opticienconsben/"); -} - -function consultations() -{ - window.location.assign($("#racineWeb" ).val()+"Consultations/"); -} - - -function listerdossiercons_pha() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationphaentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationpha/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function listerdossiercons_opt() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationoptentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationopt/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_opt(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique; - donnees += '&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfactureopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_opt(); - } - }); - } -} - -function consulter_facture_opt() -{ - window.location.assign($("#racineWeb" ).val()+"Opticiencons/"); -} - -function liste_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Listedecomptes/"); -} - -function listerdecomptes() -{ - codeExercice = $("#codeExercice").val(); - // codeMois = $("#codeMois").val(); - codeEtatDecompte = $("#codeEtatDecompte").val(); - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - $("#codeExercice").focus(); - return; - } - - donnees = 'codeExercice='+codeExercice+'&codeEtatDecompte='+codeEtatDecompte; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistedecomptes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - } - }); -} - -function consulterdecompte(idReglement) -{ - donnees = 'idReglement='+idReglement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_decompte(); - } - }); -} - -function afficher_decompte() -{ - // $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - - -function sortirdexclusionstandards() -{ - idBeneficiaire = $("#idBeneficiaire_C").val(); - idAdherent_C = $("#idAdherent_C" ).val(); - - - if (idBeneficiaire>"0") - { - afficher_beneficiaire_id(); - } - if (idAdherent_C>"0") - { - afficher_adherent_id(); - } - else - { - recherche(); - } -} - -function exclusionstandards() -{ - window.location.assign($("#racineWeb" ).val()+"Exclusionstandards/"); -} - - -function envoimaildivers(datamail) -{ - // var url_mail = "http://testprestation.medicare.rw/Cron/Ajaxenvoimaildivers.php?"+datamail; - - lienMail = $("#lienMail_C").val(); - var url_mail = lienMail+"/Cron/Ajaxenvoimaildivers.php?"+datamail; - - $.ajax({ - url : url_mail, - type : "GET", - error : function(errorData) { - }, - success :function(data) - { - } - }); -} - -function mettremailattente(datamail) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmailattente/ajouter/", - type: 'POST', - data: datamail, - success: function(data) - { - }, - error: function(errorData) - { - }, - complete: function() - { - } - }); -} - - -function preparesms(typeSms) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - codeLangueSociete = $("#codeLangueSociete").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "1"; - - if (typeSms=="demandederogation") - { - p_destinataires = $("#smsDerogation_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Request for exemption : " : "Demande derogation pour : "; - p_message += libelleDerogation; - - } - - if (typeSms=="ententeprealable") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement" : "Alerte : Accord prealable"; - } - - if (typeSms=="hospitalisation") - { - p_destinataires = $("#smsMedecinConseil_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Hospit. form No : " : "No Bon Hospit. : "; - p_message += numeroBon; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Hospitalization notification" : "Avis Hospitalisation"; - } - - if (typeSms=="autorisation") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert : Request authorization for excluded act" : "Alerte : Demande autorisation pour acte exclu"; - } - - if (typeSms=="commandebon") - { - p_destinataires = $("#smsGestionBon_C").val(); - - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Order of claims form " : "Commande de bons de PEC"; - p_message += "\n"; - p_message += "Quantit. : "+quantite+" "; - p_message += "\n"; - p_message += "Type : "+libelleBon+"."; - } - - if (typeSms=="ententeprealablepha") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for pharmacy" : "Alerte : Accord prealable pharmacie"; - } - - if (typeSms=="accident") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Circulation accident" : "Alerte : Accident de la circulation"; - } - - if (typeSms=="ententeprealableopt") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for glasses" : "Alerte : Accord prealable verres"; - } - - if (typeSms=="ententeprealablemont") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for optical frames" : "Alerte : Accord prealable monture"; - } - - envoyersms(p_destinataires, p_message, creation_message); -} - - -function liste_ententeprealable() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/"); -} - -function liste_exclusions() -{ - window.location.assign($("#racineWeb" ).val()+"Listeexclusions/"); -} - -function alerter_depassement_limite() -{ - fraisExcluLivre=$("#fraisExcluLivre").val(); - fraisExcluLivre = parseInt(fraisExcluLivre); - - if (fraisExcluLivre>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function alerter_depassement_limite_cso() -{ - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function maj_fraisexclu_cso() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdepassementlimitefeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - $("#div_fraisExclu").html(data); - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function consommables() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facturerConsommable=$("#facturerConsommable").val(); - if (facturerConsommable!="1") - { - v_msg="Consommables non facturés!"; - v_msgEng="Consumables not invoiced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - ajoutConsommable = $("#ajoutConsommable").val(); - - if (ajoutConsommable!="1") - { - v_msg="Déjà inclu dans les actes ! Souhaitez-vous continuer?"; - v_msgEng="Already included in the acts ! Would you like to continue?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Consommables/"); - return; - } - else - { - return; - } - } - window.location.assign($("#racineWeb" ).val()+"Consommables/"); -} - - -function afficher_recherche_consommable() -{ - nomConsommable = $("#nomConsommable").val(); - - if (nomConsommable > " ") - { - donnees = "nomConsommable="+nomConsommable; - - $("#div_listeconsommable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listeconsommable").html(data); - } - }); - } -} - -function ajouter_consommable(idConsommable, libelleConsommable) -{ - if (libelleConsommable<=" ") - { - v_msg="Veuillez sélectionner un consommable!"; - v_msgEng="Please select a consumable!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Ajouter : "+libelleConsommable+"?"; - v_msgEng="Add : "+libelleConsommable+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idConsommable='+idConsommable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/ajouterconsommable/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - }, - complete: function() { - // afficher_consommable(); - feuillemaladie(); - } - }); - } -} - -function ajax_maj_qte_consommable(idConsommable, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idConsommable='+idConsommable+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function ctrlkeypressconsommable(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_recherche_consommable(); - } -} - -function afficher_consommable() -{ - $("#div_listeconsommable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherconsommables/", - error: function(errorData) { - }, - success: function(data) { - $("#div_listeconsommable").html(data); - $("#libelleconsommable").focus(); - } - }); -} - -function changer_type_bon() -{ - $("#nbligne_info").val("0"); - afficherbon_vide(); -} - -function afficher_pop_recherche_medecin() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecins/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - }, - complete: function() { - } - }); -} - - - -function afficher_pop_recherche_actes_possibles() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactespossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - - -function ctrlkeypress_medecin(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin(); - } -} - - -function ctrlkeypress_actes_cons(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_cons(); - } -} - - -function ctrlkeypress_actes_possibles(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_possibles(); - } -} - - -function selectionner_medecin(codeMedecin, nomMedecin, noOrdreMedecin) -{ - if(noOrdreMedecin+codeMedecin<=" ") - return; - - v_msg="Confirmez-vous ce Médecin : "+nomMedecin+"?"; - v_msgEng="Do you confirm this Doctor : "+nomMedecin+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - - if(codeMedecin=="ZZZZ") - { - $("#medecinManquant").readable(); - $("#codeSpecialiteManuel").enable(); - - } - else - { - $("#medecinManquant").unreadable(); - $("#codeSpecialiteManuel").disable(); - } - - $("#close_pop").click(); - } -} - -function maj_prix_actemedical() -{ - prixTarif = $("#prixTarif").val(); - prixNew = $("#prixNew").val(); - - if(prixNew==0 || parseFloat(prixNew)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixNew").focus(); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter quantity!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantite").focus(); - - return; - } - - ententePrealable = $("#ententePrealable").val(); - acteExclu = $("#acteExclu").val(); - acteChirurgie = $("#acteChirurgie").val(); - - donnees = 'prixNew='+prixNew+'&quantite='+quantite+'&prixTarif='+prixTarif; - donnees += '&ententePrealable='+ententePrealable+'&acteExclu='+acteExclu+'&acteChirurgie='+acteChirurgie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajprixactemed/", - type : 'post', - data : donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#btn_close_pop_tarif").click(); - } - }); -} - -function afficher_pop_tarif() -{ - prixActe = $("#prixActe").val(); - $("#prixNew").val(prixActe); - $("#btn_pop_tarif").click(); -} - -function demanderaccordacteexclu() -{ - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - -} - -function demanderaccordchambreexclu() -{ - - v_msg="Attention! Chambre exclue. Demander un accord?"; - v_msgEng="Warning! Non covered room. Request Agreement?"; - alert_ebene(v_msg, v_msgEng); - return; -} - -function substituer_medicament(idMedicament) -{ - v_msg="Substituer ce médicament?"; - v_msgEng="Substitute this drug?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsubstitutionmedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_substitution").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); - } -} - - -function annuler_substitution_medicament(idMedicament) -{ - v_msg="Annuler cette substitution?"; - v_msgEng="Cancel this substitution?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/annulersubstitutionmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -} - - -function enregistrersubstituion_medicament() -{ - idMedicament = $("#idMedicament").val(); - prixTarif = $("#prixTarif").val(); - prixSubstitut = $("#prixSubstitut").val(); - - if(prixSubstitut==0 || parseFloat(prixSubstitut)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette substitution ?"; - v_msgEng="Do you confirm this substitution?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament+'&prixSubstitut='+prixSubstitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrersubstitutionmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#btn_close_pop").click(); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -} - -function selectionner_acte_cons(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - ajaxactespossibles(); - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeActe").val(codeActe); - ajaxprixacte(); - - $("#libelleActe").val(libelleActe); - $("#close_pop_acte").click(); - } -} - -function afficher_pop_recherche_actes_cons() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_cons").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactescons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_cons").html(data); - } - }); -} - -function selectionner_acte_possibles(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - // ajaxactespossibles(); - ajaxactespossibles_med(); - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeActe").val(codeActe); - ajaxprixactemed(); - - $("#libelleActe").val(libelleActe); - $("#close_pop_acte").click(); - } -} - -function ctrlkeypress_pha(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament_pha(); - } -} - -function afficher_pop_recherche_medicament_pha() -{ - nomsearch = $("#nomsearch").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - $("#div_listemedicament").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament").html(data); - } - }); - } -} - - -function prescrire_medicament_pha() -{ -// Ajout à la prescription - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - codeMedicament = $("#codeMedicament_pop").val(); - - - libelleMedicament = $("#libelleMedicament_pop").val(); - - if (codeMedicament<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'codeMedicament='+codeMedicament; - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // alert(donnees); - // return; - - v_msg="Prescrire : "+libelleMedicament+"?"; - v_msgEng="Prescribe : "+libelleMedicament+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamentprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_medicament").click(); - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -// Fin Ajout à l aprescription -} - -function raffraichier_detail_prescription() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailordonnance/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#ordonnance").html(data); - }, - complete: function() { - } - }); -} - -function actualiser_pharmacien() -{ - /* modif du 15/11/2018 - // window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - actualiser_saisie_pharmacien(); - */ - - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); -} - -function ajax_maj_qte_medicament_pha(idMedicament, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majquantitepha/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function prescription_examen() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescriptionexamen/"); -} - -function valider_presciption_examens() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbExamens=$("#nbExamens").val(); - nbExamens = parseInt(nbExamens); - - /* On peut saisir juste le No de bon - sans saisir le détail de la prescription - - if (nbExamens<1) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - numeroBonExamen=$("#numeroBonExamen").val(); - if (numeroBonExamen<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - /* - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/", - url: $("#racineWeb").val()+"Ajaxenregistrerexamen/viderexamentemp/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - feuillemaladie(); - }, - complete: function() { - } - }); - */ - } -} - -function ajaxinfosbonprescriptionexamen() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonExamen = $("#numeroBonExamen").val(); - numeroBonExamen = parseInt(numeroBonExamen); - if (numeroBonExamen>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_examen(idExamen) -{ - v_msg="Confirmez-vous la suppression de cet examen?"; - v_msgEng="Do you confirm the removal of this exam?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/supprimer/", - type: 'POST', - data: donnees, - success: function(data) { - $("#examens").html(data); - }, - error: function(data) { - }, - complete: function() { - prescription_examen(); - } - }); - } -} - -function enregistrerprescriptionexamen() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionexamen/enregistrerprescriptionexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_examen(); - } - }); - } -} - -function ctrlkeypress_examens_possibles(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_examens_possibles(); - } -} - -function afficher_pop_recherche_examens_possibles() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteexamenspossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function ajouter_examen_possible(codeActe, libelleActe, acteExclu, ententePrealable) -{ - typeSms="ententeprealable"; - - if(libelleActeSearch<=" ") - { - return; - } - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - if (ententePrealable==1) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/ajouterexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - if(ententePrealable==1) - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - // prescription_examen(); - - }, - complete: function() { - if(ententePrealable==1) - { - mettremailattente(donnees_sav); - } - - prescription_examen(); - - } - }); - } -} - -function ajax_maj_qte_examen(idExamen, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - $("#examens").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function examensmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen==0) - { - v_msg="Aucun examen prescrit!"; - v_msgEng="No prescribed exam!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/"); -} - - -function valider_examen_cso() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (nbLivre<1) - { - v_msg="Rien à enregitrer!"; - v_msgEng="Nothing to save!"; - - alert_ebene(v_msg, v_msgEng); - feuillemaladie(); - } - else - { - v_msg="Confirmez-vous ces examens?"; - v_msgEng="Do you confirm these exams?"; - } - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/enregistrerexamen/", - type: 'POST', - success: function(data) { - maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } -} - -function ajouterexamen_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function ajouterexamen(idExamen, ententePrealable, codeActe) -{ - donnees = 'idExamen='+idExamen+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - typeSms="ententeprealable"; - - if (ententePrealable==9) - { - v_msg="Acte refusé!"; - v_msgEng="Act refused!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (ententePrealable==2) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - error: function(data) { - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - } - }); -} - -function retirerexamen_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirerexamen(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_limite_avant_facturation_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecons/"); - */ -} - -function consulter_limite_avant_facturation() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacture/"); - */ -} - - - -function consulter_limite_avant_facturation_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureconsben/"); - */ -} - -function consulter_limite_avant_facturation_pha() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturepha/"); - */ -} - -function consulter_limite_avant_facturation_pha_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephacons/"); - */ -} - -function consulter_limite_avant_facturation_pha_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephaconsben/"); - */ -} - -function actualiser_opticien() -{ - window.location.assign($("#racineWeb" ).val()+"Opticien/"); -} - -function reinitialiser_opticien() -{ - window.location.assign($("#racineWeb" ).val()+"Opticien/0"); -} - - -function consulter_limite_avant_facturation_opt() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureopt/"); - */ -} - -function consulter_limite_avant_facturation_opt_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptcons/"); - */ -} - -function consulter_limite_avant_facturation_opt_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptconsben/"); - */ -} - -function ajouterexamen_lab_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function ajouterexamen_lab(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function retirerexamen_lab(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function ctrlkeypress_examens_possibles_lab(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_examens_possibles_lab(); - } -} - -function afficher_pop_recherche_examens_possibles_lab() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteexamenspossibleslab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function consulter_limite_avant_facturation_lab() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelab/"); - */ -} - -function actualiser_laboratoire() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); -} - -function valider_examen_lab() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces actes?"; - v_msgEng="Do you confirm those acts?"; - // alert_ebene(v_msg, v_msgEng); - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - facturer_lab(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_lab(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function retirerexamen_lab_tous() -{ - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - // actualiser_pharmacien(); - } - }); -} - -function facturer_lab(user_id) -{ - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo'; - - typeSms = "facturer_lab"; - - donnees_retour =""; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - } - }); -} - -function prescrire_examen_lab(codeActe, libelleActe, acteExclu, ententePrealable) -{ - typeSms="ententeprealable"; - - if(libelleActeSearch<=" ") - { - return; - } - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - if (ententePrealable==1) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamenprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_acte").click(); - $("#livraison").html(data); - - if(ententePrealable==1) - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable==1) - { - mettremailattente(donnees_sav); - } - alerter_depassement_limite(); - } - }); - } -} - -function enregistrer_nv_consommables() -{ - libelleconsommable = $("#libelleconsommable").val(); - - if (libelleconsommable<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter tyhe name!"; - alert_ebene(v_msg, v_msgEng); - $("#libelleconsommable").focus(); - return; - } - - quantiteconsommable=$("#quantiteconsommable").val(); - quantiteconsommable=quantiteconsommable.replace(",","."); - $("#quantiteconsommable").val(quantiteconsommable); - - if(isNaN(quantiteconsommable)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantiteconsommable").val("0"); - $("#quantiteconsommable").focus(); - return; - } - - if(quantiteconsommable==0) - { - $("#quantiteconsommable").focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - prixconsommable=$("#prixconsommable").val(); - prixconsommable=prixconsommable.replace(",","."); - $("#prixconsommable").val(prixconsommable); - - if(isNaN(prixconsommable)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixconsommable").val("0"); - $("#prixconsommable").focus(); - return; - } - - if(prixconsommable==0) - { - $("#prixconsommable").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'libelleconsommable='+libelleconsommable+'&prixconsommable='+prixconsommable+'&quantiteconsommable='+quantiteconsommable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/creerconsommable/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); -} - -function ajax_maj_prix_consommable(idConsommable, valeurActe, controle) -{ - valeurActe=valeurActe.replace(",","."); - controle.value=valeurActe; - - if(controle_numerique(controle)) - { - if(valeurActe==0) - { - controle.focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idConsommable='+idConsommable+"&valeurActe="+valeurActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/majprix/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function remplacer_feuillemaladie() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Remplacerfeuille/"); -} - -function ajaxinfosremplacerbonconsultation() -{ - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerremplacementconsultation() -{ - numeroBonSave = $("#numeroBonSave").val(); - - motifremplacement = $("#motifremplacement").val(); - - if (motifremplacement<=" ") - { - v_msg="Veuillez saisir le otif du remplacement!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifremplacement").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - OldnumeroBon = $("#OldnumeroBon").val(); - - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement; - - // donnees += '&dateSurvenance='+dateSurvenance+'&observations='+observations+'&prixActe='+prixActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/enregistrerremplacementconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - v_msg="Feuille remplacée avec succès!"; - v_msgEng="Replaced successfully!"; - alert_ebene(v_msg, v_msgEng); - - feuillemaladie(); - } - }); - } -} - -function remplacer_ordonnance() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturé, vous pouvez modifier l\'ordonnance!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - /* - if (numeroBonOrdonnance<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - fiche_remplacer_ordonnance(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#remplacerordonnance").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&remplacerordonnance=1"; - - load("flexcode/user.php?"+data); - } -} - -function fiche_remplacer_ordonnance() -{ - window.location.assign($("#racineWeb" ).val()+"Remplacerordonnance/"); -} - -function ajaxinfosremplacerordonnance() -{ - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerremplacementordonnance() -{ - numeroBonSave = $("#numeroBonSave").val(); - - motifremplacement = $("#motifremplacement").val(); - - if (motifremplacement<=" ") - { - v_msg="Veuillez saisir le otif du remplacement!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - $("#motifremplacement").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - OldnumeroBon = $("#OldnumeroBon").val(); - - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/enregistrerremplacementordonnance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - v_msg="Ordonnance remplacée avec succès!"; - v_msgEng="Replaced successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - } - }); - } -} - -function afficher_laboratoire_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoirecso/"); -} - - -function afficher_seance_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Kinecso/"); -} - -function consulter_limite_avant_facturation_lab_cso() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcso/"); - */ -} - -function rechercherbonexamen_lab() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab(numeroBonExamen); - } -} - -function rechercherbonexamen_lab_cso() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab_cso(numeroBonExamen); - } -} - -function chercher_ordonnance_lab_cso(numeroBonExamen) -{ - donnees = 'numeroBonExamen='+numeroBonExamen; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_laboratoire_cso(); - } - }); -} - -function valider_examen_lab_cso() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // alert("nbLivre => "+nbLivre); - // return; - - // if (facture==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces actes?"; - v_msgEng="Do you confirm those acts?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - facturer_lab_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_lab_cso(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id = $("#user_id_C").val(); - finger_id = $("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_lab_cso(user_id) -{ - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo'; - - typeSms = "facturer_lab"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_laboratoire_cso(); - - } - }); -} - -function prescription_seance() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescriptionseance/"); -} - - -function seances() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroPrescriptionKine=$("#numeroPrescriptionKine_C").val(); - - if (numeroPrescriptionKine==0) - { - v_msg="Aucune séance prescrite!"; - v_msgEng="No prescribed session!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Seances/"); -} - -function ajaxinfosbonprescriptionseance() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonKine = $("#numeroBonKine").val(); - numeroBonKine = parseInt(numeroBonKine); - if (numeroBonKine>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerprescriptionseance() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/enregistrerprescriptionseance/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_seance(); - } - }); - } -} - -function modifierprescriptionseance() -{ - acteExclu = $("#acteExclu").val(); - ententePrealable = $("#ententePrealableSea").val(); - autorisation = "0"; - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeActePrescription = $("#codeActe").val(); - - if (codeActePrescription<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeActePrescription").focus(); - return; - } - - quantite =$("#quantite").val(); - - quantite = parseInt(quantite); - - if(quantite<1) - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - // $("#quantite").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - /* - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - montantTm =$("#montantTm").val(); - montantArembourser =$("#aRembourser").val(); - fraisReel =$("#totalActe").val(); - - donnees = 'codeActePrescription='+codeActePrescription +'&quantite='+quantite +'&prixActe='+prixActe; - donnees += '&montantTm='+montantTm +'&montantArembourser='+montantArembourser +'&fraisReel='+fraisReel; - donnees += '&ententePrealable='+ententePrealable; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActePrescription+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActePrescription+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $("#btn_enreg_seance").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/modifierprescriptionseance/", - type : 'post', - data: donnees, - error: function(errorData) { - $("#msgErreur").html(errorData); - }, - success: function(data) { - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() - { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_seance(); - } - }); - } -} - -function ajaxprixseance() -{ - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - // $("#quantite_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // on va griser le bouton btn_enreg_seance - $("#btn_enreg_seance").disable(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixseance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function valider_presciption_seances() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonKine=$("#numeroBonKine").val(); - if (numeroBonKine<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - codeActePrescription = $("#codeActePrescription").val(); - - if (codeActePrescription<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_prescrire").click(); - - return; - } - - nbSeance=$("#nbSeance").val(); - nbSeance = parseInt(nbSeance); - - if (nbSeance<1) - { - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_prescrire").click(); - - return; - } - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function valider_seance_cso() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Veuillez sélectionner un bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_InitSession").click(); - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - // div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm these sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees = 'codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailseance/enregistrerseance/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - - maj_fraisexclu_cso(); - }, - error: function(data) - { - }, - complete: function() - { - feuillemaladie(); - } - }); - } -} - -function actualiser_seance() -{ - window.location.assign($("#racineWeb" ).val()+"Seances/"); -} - -// SEANCES KINE -function valider_seance_sea_cso() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - quantiteSeance=$("#quantiteSeance").val(); - - if (quantiteSeance<=0) - { - v_msg="Veuillez revoir la quantité!"; - v_msgEng="Please review the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - fraisRetenuSeance=$("#fraisRetenuSeance").val(); - - if (fraisRetenuSeance<=0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm those sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - facturer_sea_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_sea_cso(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_sea_cso(user_id) -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - cout = $("#cout").val(); - - if (cout==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine'; - - typeSms = "facturer_sea"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - // donnees += '&codeGestionBon='+codeGestionBon; - donnees_substitut += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/", - type: 'POST', - data: donnees_substitut, - success: function(data) - { - // $('#div_test_gabarit').html(data); - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_seance_cso(); - } - }); - -} - -function rechercherbonkine_sea() -{ - numeroBonKine=$("#numeroBonKine").val(); - - if (numeroBonKine>" ") - { - chercher_ordonnance_sea(numeroBonKine); - } -} - -function chercher_ordonnance_sea(numeroBonKine) -{ - $("#numeroBonSeance_C").val("-1"); - donnees = 'numeroBonKine='+numeroBonKine; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Kine/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressordsea(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonKine=$("#numeroBonKine").val(); - $("#numeroBonKine").blur(); - } -} - -function rechercherbonkine_sea_cso() -{ - numeroBonKine=$("#numeroBonKine").val(); - - if (numeroBonKine>" ") - { - chercher_ordonnance_sea_cso(numeroBonKine); - } -} - -function chercher_ordonnance_sea_cso(numeroBonKine) -{ - $("#numeroBonSeance_C").val("-1"); - donnees = 'numeroBonKine='+numeroBonKine; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Kinecso/"); - }, - error: function(data) { - }, - complete: function() { - } - }); - -} - - -function ajaxinfosbonseancekine() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg_bon_kine").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerbonsseancekine() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - if (codeGestionBon=="0") - { - numeroBonSave = $("#numeroBonSave").val(); - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - } - else - { - // numeroBon = "-1"; - numeroBon = "1"; - v_msg="Confirmez-vous ce dossier?"; - v_msgEng="Do you confirm this claim?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = "numeroBon="+numeroBon; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/attributionbontemporaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - afficher_facturation_seance(); - } - }); - } -} - - -function afficher_facturation_seance() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_session").click(); - $("#div_facturation_seance").html(data); - }, - complete: function(data) { - $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val()); - } - }); -} - -function ajaxprixseancesea() -{ - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - $("#prixActe_info").val("0"); - $("#totalActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.val(1); - - quantite = 1; - /* - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - */ - } - - div_nbRestant = $("#nbRestant"); - nbRestant = div_nbRestant.val(); - nbRestant = parseInt(nbRestant); - - if(quantite>nbRestant) - { - // div_quantite.focus(); - v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!"; - v_msgEng="Only "+nbRestant+" sessions are possible!"; - alert_ebene(v_msg, v_msgEng); - - // return; - quantite = 0; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixseancesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -// Facturation SEANCE KINE - -function valider_seance_sea() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - fraisRetenuSeance=$("#fraisRetenuSeance").val(); - - if (fraisRetenuSeance<=0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm those sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - facturer_sea(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_sea(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_sea(user_id) -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - cout = $("#cout").val(); - - if (cout==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine'; - - typeSms = "facturer_sea"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees_substitut += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/", - type: 'POST', - data: donnees_substitut, - success: function(data) - { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - // window.location.assign($("#racineWeb" ).val()+"Kine/"); - afficher_seance_kine(); - } - }); -} - -/* -function rechercherbonexamen_lab_cso() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab_cso(numeroBonExamen); - } -} -*/ - -// 19/11/2017 - -function enregistrerbonsseancekinecso() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - if (codeGestionBon=="0") - { - numeroBonSave = $("#numeroBonSave").val(); - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - } - else - { - // numeroBon = "-1"; - numeroBon = "1"; - v_msg="Confirmez-vous ce dossier?"; - v_msgEng="Do you confirm this claim?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "numeroBon="+numeroBon; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/attributionbontemporaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - afficher_facturation_seance_cso(); - } - }); - } -} - - -function afficher_facturation_seance_cso() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/", - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_session").click(); - $("#div_facturation_seance").html(data); - }, - complete: function(data) { - $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val()); - } - }); -} - - -function ajaxinfosbonseancekinecso() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg_bon_kine").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function ajaxmajquteseancecso() -{ - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_nbRestant = $("#nbRestant"); - nbRestant = div_nbRestant.val(); - nbRestant = parseInt(nbRestant); - - if(quantite>nbRestant) - { - div_quantite.focus(); - v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!"; - v_msgEng="Only "+nbRestant+" sessions are possible!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#btn_enreg_seance").disable(); - - donnees = 'prixActe='+prixActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/modifierseancecso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $("#infoseance").html(data); - }, - complete: function() { - afficher_facturation_seance_cso(); - } - }); -} - - - -function consulter_limite_avant_facturation_kinecso(idFacture) -{ - /* - if (idFacture<=0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekinecso/"+idFacture+"/"); - */ -} - - -function consulter_limite_avant_facturation_kine(idFacture) -{ - /* - if (idFacture<=0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekine/"+idFacture+"/"); - */ -} - -function afficher_seance_kine() -{ - window.location.assign($("#racineWeb" ).val()+"Kine/"); -} - -// consulatation_ben - -function consultationbenlab() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenlab/"); -} - -function consultationbensea() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbensea/"); -} - -function laboratoire() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - } -} - - -function seancekine() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Kine/"); - } -} - -function afficher_facture_cons_lab(idFacture, numeroBonExamen, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturelab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_lab(); - } - }); - } -} - -function consulter_facture_lab() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoirecons/"); -} - -function consulter_limite_avant_facturation_lab_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcons/"); - */ -} - -function afficher_facture_cons_lab_ben(idFacture, numeroBonExamen, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturelab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_lab_ben(); - } - }); - } -} - -function consulter_facture_lab_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoireconsben/"); -} - -function consulter_limite_avant_facturation_lab_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabconsben/"); - */ -} - -function listerdossiercons_lab() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationlabentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationlab/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function lister_factures_lab_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenlab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function consultationsea() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationsea/"); -} - -function listerdossiercons_sea() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationseaentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationsea/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function consulter_facture_sea() -{ - window.location.assign($("#racineWeb" ).val()+"Kinecons/"); -} - -function consulter_limite_avant_facturation_sea_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseacons/"); - */ -} - -function lister_factures_sea_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxconsultationbenlab/", - url: $("#racineWeb").val()+"Ajaxconsultationbensea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_sea(idFacture, numeroBonKine, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_sea(); - } - }); - } -} - - -function afficher_facture_cons_sea_ben(idFacture, numeroBonKine, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_sea_ben(); - } - }); - } -} - -function consulter_facture_sea_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Kineconsben/"); -} - -function consulter_limite_avant_facturation_sea_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseaconsben/"); - */ -} - -function ctrlkeypress_numeroBon(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroBon").blur(); - } -} - -function verifier_feuille_maladie_dec_cons(numeroFeuilleMaladie, idFacture) -{ - $("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie); - numeroDecompte = $("#numeroDecompte").val(); - - // if (numeroFeuilleMaladie>"") - if (idFacture>"") - { - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture; - - codeTypePrestataire = $("#codeTypePrestataire_C").val(); - - if(codeTypePrestataire=="CSO" || codeTypePrestataire=="LAB" || codeTypePrestataire=="SEA") - { - - verifier_feuille_maladie_dec_cso_cons(donnees); - } - else - if(codeTypePrestataire=="PHA") - { - verifier_feuille_maladie_dec_pha_cons(donnees); - } - else - if(codeTypePrestataire=="OPT") - { - verifier_feuille_maladie_dec_opt_cons(donnees); - } - } -} - - -function imprimerbordereaudecompte() -{ - idReglement = $("#idReglement").val(); - - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerbordereaudecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function verifier_feuille_maladie_dec_cso_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturecons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_pha_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturephacons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_opt_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfactureoptcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function limite_avant_facture_dec(idFacture) -{ - donnees = 'idFacture='+idFacture; - $.ajax({ - url: $("#racineWeb").val()+"AjaxPlafondavantfacturecdec/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_limites").html(data); - }, - complete: function() { - } - }); -} - -function demander_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Initdemandedecompte/"); -} - -function initierdemandedecompte() -{ - codeExercice=$("#codeExercice").val(); - codeMois=$("#codeMois").val(); - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice").focus(); - - return; - } - - if (codeMois<=" ") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois").focus(); - return; - } - - donnees = 'codeExercice='+codeExercice+'&codeMois='+codeMois; - - // $("#div_dossiers").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdemandedecompte/initierdemandedecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#inforegle").html(data); - }, - complete: function() { - regle=$("#regle").val(); - - if(regle==-1) - { - v_msg="Problème lors de l\'initialisation!"; - v_msgEng="Problem during initialization!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - else - { - afficher_demande_decompte(); - } - } - }); -} - -function afficher_demande_decompte() -{ - $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - window.location.assign($("#racineWeb" ).val()+"Demandedecompte/"); -} - - -function imprimerbordereaudemandedecompte() -{ - idDemandeDecompte = $("#idDemandeDecompte").val(); - - if (idDemandeDecompte>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandedecompte/imprimerdemandecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function rechargerdemandedecompte() -{ - $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdemandedecompte/rechargerdemandedecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - afficher_demande_decompte(); - }, - complete: function() { - } - }); -} - -function actualiser_decompte() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - -function monture() -{ - $("#monture").val("1"); - - if (prestation_possible()) - { - $("#okId" ).val("1"); - window.location.assign($("#racineWeb" ).val()+"Monture/"); - - /* MAJ du 06/06/2019 => proposition de Pascal => les magasins d'optique n'ont pas de lecteurs d'empriente - modeSaisieFacture=$("#modeSaisieFacture").val(); - if(modeSaisieFacture=="1") - { - $("#okId" ).val("1"); - window.location.assign($("#racineWeb" ).val()+"Monture/"); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - */ - } -} - -function actualiser_monture() -{ - window.location.assign($("#racineWeb" ).val()+"Monture/"); -} - -function valider_monture() -{ - dejaFacture=$("#dejaFacture").val(); - - // alert("dejaFacture =>" +dejaFacture); - // return; - - if (dejaFacture=="1") - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - ententePrealableMont=$("#ententePrealableMont").val(); - - nbActesMonture=$("#nbActesMonture").val(); - - if (nbActesMonture>0 && ententePrealableMont!=1) - { - /* - v_msg="Montures déjà livrées une fois!"; - v_msgEng="Frames already delivered once!"; - */ - v_msg="Veuillez demander une autorisation!"; - v_msgEng="Please ask for an authorization!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroFacture=$("#numeroFacture").val(); - - if (numeroFacture<=" ") - { - v_msg="Veuillez saisir le No de la facture!"; - v_msgEng="Please enter the Invoice No!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroFacture").focus(); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - $("#okId" ).val("1"); - facturer_monture(user_id_0); - - /* MAJ du 06/06/2019 => proposition de Pascal => les magasins d'optique n'ont pas de lecteurs d'empriente - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - facturer_monture(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - facturer_monture(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - } -} - -function maj_monture_temp_monture(idOptique, monture) -{ - numeroFacture=$("#numeroFacture").val(); - - donnees = 'idOptique='+idOptique+"&monture="+monture+"&numeroFacture="+numeroFacture; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/majmonture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_monture").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function facturer_monture(user_id) -{ - dejaFacture=$("#dejaFacture").val(); - - if (dejaFacture=="1") - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroFacture=$("#numeroFacture").val(); - - if (numeroFacture<=" ") - { - v_msg="Veuillez saisir le No de la facture!"; - v_msgEng="Please enter the Invoice No!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroFacture").focus(); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - donnees += '&numeroFacture='+numeroFacture; - - - // numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'codePrestataire='+codePrestataire+'&typeMail=mailoptique'; - - typeSms = "facturer_mont"; - - donnees_retour =""; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees += '&user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/enregistrermonture/", - type: 'POST', - data: donnees, - success: function(data) - { - donnees_retour = data; - preparesms_adherent(typeSms); - }, - error: function(data) - { - - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_monture").html(donnees_retour); - // window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - - -function requetes_prestaire() -{ - window.location.assign($("#racineWeb" ).val()+"Requetes/"); -} - -function ajaxenteterequete() -{ - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - donnees = 'codeRequete='+codeRequete; - - v_url = $("#racineWeb").val()+"Ajaxrequeteentete"+codeRequete+"/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function requetes_feuilles_maladie() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateConsultation1 = $("#dateConsultation1").val(); - dateConsultation2 = $("#dateConsultation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val(); - numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - // Ligne 3 - codeTypePrestataire = $("#codeTypePrestataire").val(); - numeroDecompte1 = $("#numeroDecompte1").val(); - numeroDecompte2 = $("#numeroDecompte2").val(); - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - hospitalisation = $("#hospitalisation").val(); - numeroChambre = $("#numeroChambre").val(); - chirurgie = $("#chirurgie").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1); - numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateConsultation1=' + dateConsultation1; - donnees += '&dateConsultation2=' + dateConsultation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1; - donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - // Ligne 3 - donnees += '&codeTypePrestataire=' + codeTypePrestataire; - - donnees += '&numeroDecompte1=' + numeroDecompte1; - donnees += '&numeroDecompte2=' + numeroDecompte2; - - donnees += '&codeRaisonConsultation=' + codeRaisonConsultation; - donnees += '&hospitalisation=' + hospitalisation; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&chirurgie=' + chirurgie; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_feuilles_maladie_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateConsultation1 = $("#dateConsultation1").val(); - dateConsultation2 = $("#dateConsultation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val(); - numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - // Ligne 3 - codeTypePrestataire = $("#codeTypePrestataire").val(); - numeroDecompte1 = $("#numeroDecompte1").val(); - numeroDecompte2 = $("#numeroDecompte2").val(); - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - hospitalisation = $("#hospitalisation").val(); - numeroChambre = $("#numeroChambre").val(); - chirurgie = $("#chirurgie").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1); - numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateConsultation1=' + dateConsultation1; - donnees += '&dateConsultation2=' + dateConsultation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1; - donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - // Ligne 3 - donnees += '&codeTypePrestataire=' + codeTypePrestataire; - - donnees += '&numeroDecompte1=' + numeroDecompte1; - donnees += '&numeroDecompte2=' + numeroDecompte2; - - donnees += '&codeRaisonConsultation=' + codeRaisonConsultation; - donnees += '&hospitalisation=' + hospitalisation; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&chirurgie=' + chirurgie; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function selectionner_medecin_requete(codeMedecin, nomMedecin, noOrdreMedecin) -{ - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - $("#close_pop").click(); -} - -function afficher_pop_recherche_medecin_requete() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecinsrequete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - } - }); -} - -function ctrlkeypress_medecin_requete(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin_requete(); - } -} - -function reinitialiser_medecin() -{ - $("#codeMedecin").val(""); - $("#nomMedecin").html("Rechercher Médecin..."); - $("#close_pop").click(); -} - -function requetes_factures() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_factures_export() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_bonpoec() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_bonpoec_export() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function requetes_prestationactes() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - codePrestataire = $("#codePrestataire").val(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_prestationactes_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - codePrestataire = $("#codePrestataire").val(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_pharmacie() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_pharmacie_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_optique() -{ - $('#div_export').html(""); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleOptique = $("#libelleOptique").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleOptique=' + libelleOptique; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_optique_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleOptique = $("#libelleOptique").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleOptique=' + libelleOptique; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function requetes_assure() -{ - $('#div_export').html(""); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 2 - numeroPolice = $("#numeroPolice").val(); - codeProduit = $("#codeProduit").val(); - codeEtatPolice = $("#codeEtatPolice").val(); - codeLienParente = $("#codeLienParente").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val(); - sexe = $("#sexe").val(); - - // Ligne 3 - numeroClient1 = $("#numeroClient1").val(); - numeroClient2 = $("#numeroClient2").val(); - telephonePortableAdherent = $("#telephonePortableAdherent").val(); - emailAdherent = $("#emailAdherent").val(); - decede = $("#decede").val(); - nomClient = $("#nomClient").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroClient1 = convertir_en_entier(numeroClient1); - numeroClient2 = convertir_en_entier(numeroClient2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 2 - donnees += '&numeroPolice=' + numeroPolice; - donnees += '&codeProduit=' + codeProduit; - donnees += '&codeEtatPolice=' + codeEtatPolice; - donnees += '&codeLienParente=' + codeLienParente; - donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire; - donnees += '&sexe=' + sexe; - - // Ligne 3 - donnees += '&numeroClient1=' + numeroClient1; - donnees += '&numeroClient2=' + numeroClient2; - donnees += '&telephonePortableAdherent=' + telephonePortableAdherent; - donnees += '&emailAdherent=' + emailAdherent; - donnees += '&decede=' + decede; - donnees += '&nomClient=' + nomClient; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_assure_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 2 - numeroPolice = $("#numeroPolice").val(); - codeProduit = $("#codeProduit").val(); - codeEtatPolice = $("#codeEtatPolice").val(); - codeLienParente = $("#codeLienParente").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val(); - sexe = $("#sexe").val(); - - // Ligne 3 - numeroClient1 = $("#numeroClient1").val(); - numeroClient2 = $("#numeroClient2").val(); - telephonePortableAdherent = $("#telephonePortableAdherent").val(); - emailAdherent = $("#emailAdherent").val(); - decede = $("#decede").val(); - nomClient = $("#nomClient").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroClient1 = convertir_en_entier(numeroClient1); - numeroClient2 = convertir_en_entier(numeroClient2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 2 - donnees += '&numeroPolice=' + numeroPolice; - donnees += '&codeProduit=' + codeProduit; - donnees += '&codeEtatPolice=' + codeEtatPolice; - donnees += '&codeLienParente=' + codeLienParente; - donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire; - donnees += '&sexe=' + sexe; - - // Ligne 3 - donnees += '&numeroClient1=' + numeroClient1; - donnees += '&numeroClient2=' + numeroClient2; - donnees += '&telephonePortableAdherent=' + telephonePortableAdherent; - donnees += '&emailAdherent=' + emailAdherent; - donnees += '&decede=' + decede; - donnees += '&nomClient=' + nomClient; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function convertir_en_entier(valeur) -{ - if(isNaN(valeur)) - { - valeur = "0"; - } - - if (valeur=="") - { - valeur="0"; - } - - valeur = parseInt(valeur); - - return valeur; -} - -function selectionactesmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Selectactesmedicaux/"); -} - -function ajaxactespossibles_selection() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesselection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - $("#listeacte").html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_acte_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet acte?"; - v_msgEng="Do you confirm this act?"; - - // if(confirm_ebene(v_msg, v_msgEng)) - // { - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - // donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - // typeSms2="autorisation"; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/enregistreractemedical/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - } - donnee_a_affciher = data; - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - $("#totam_donnees").html(donnee_a_affciher); - } - }); - // } -} - -function supprimer_acte_medical_selection(idPrestationactes, codeTypePrestation) -{ - donnee_a_affciher = ""; - - /* - v_msg="Confirmez-vous la suppression de cet acte?"; - v_msgEng="Do you confirm the removal of this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - */ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - // maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - } - }); - // } -} - -function valider_selection_acte() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - - -function ajax_maj_qte_acte(idPrestationactes, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite; - - donnee_a_affciher = ""; - - donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite;; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactesmedicauxselect/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - }, - error: function(data) { - }, - complete: function() { - $("#div_prestations").html(donnee_a_affciher); - controle.focus(); - } - }); - } -} - - -function selectionner_acte_possibles_select(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - $("#libelleActe").val(libelleActe); - - ajaxactespossibles_selection(); - - $("#close_pop_acte").click(); -} - -function afficher_pop_recherche_actes_possibles_select() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactespossiblesselect/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function ctrlkeypress_actes_possibles_select(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_possibles_select(); - } -} - -function selectionexamens() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Selectexaemens/"); -} - -function ajaxexamenpossibles_selection() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexamenspossiblesselection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_examen_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - - typeSms="ententeprealable"; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/ajouterexamenprescription/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - } - donnee_a_affciher = data; - }, - complete: function() - { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - $("#totam_donnees").html(donnee_a_affciher); - } - }); -} - -function retirerexamen_lab_selection(idExamen) -{ - - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&idExamen='+idExamen; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - alerter_depassement_limite(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - } - }); -} - -function valider_selection_examen() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - afficher_laboratoire_cso(); - } -} - -function selectionexamens_lab() -{ - window.location.assign($("#racineWeb" ).val()+"Selectexaemenslab/"); -} - -function valider_selection_examen_lab() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - actualiser_laboratoire(); - } -} - -function afficher_examensmedicaux() -{ - window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/"); -} - -function selectionexamens_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Selectexaemenscso/"); -} - -function valider_selection_examen_cso() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - afficher_examensmedicaux(); - } -} - -function no_presciption() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numOrd = $("#numOrd").val(); - noPrescription = $("#noPrescription").val(); - - if (numOrd==0 && noPrescription==0) - { - v_msg="Confirmez-vous qu\'il n\'y a pas de prescription de médicaments?"; - v_msgEng="Do you confirm that there is no drugs prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescription/noprescription/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } - return; - } - feuillemaladie(); -} - -function prescrire_verre_opt() -{ -// Ajout à la prescription - /* - nbActesVerres = $("#nbActesVerres").val(); - - if (nbActesVerres>0) - { - v_msg="Veuillez sélectionner un verre!"; - v_msgEng="Please select a glass!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeOptique").focus(); - return; - } - */ - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - codeOptique = $("#codeOptique").val(); - - if (codeOptique<=" ") - { - v_msg="Veuillez sélectionner les verres!"; - v_msgEng="Please select the glasses!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeOptique").focus(); - return; - } - - donnees = 'codeOptique='+codeOptique; - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverreprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_verre").click(); - // $("#livraison").html(data); - }, - complete: function() { - // alerter_depassement_limite(); - actualiser_opticien(); - } - }); - - //} - -// Fin Ajout à la prescription -} - -function validerdecompte_prestataire() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==0) - { - v_msg="Veuillez attendre la 1ère validation de l\'assureur!"; - v_msgEng="Please wait for the first validation of the insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==3) - { - v_msg="Déjà validé!"; - v_msgEng="Already validated!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==8) - { - v_msg="Pas besoin de validation prestataire!"; - v_msgEng="Provider validation not needed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==9) - { - v_msg="En attente de paiement!"; - v_msgEng="Waiting for payment!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==2) - { - - v_msg="Confirmez-vous la validation?"; - v_msgEng="Do you confirm the validation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/validerdecompteprestataire", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - // $("#div_detail").html(""); - v_msg="Décompte validé avec succès!"; - v_msgEng="validated successfully!"; - alert_ebene(v_msg, v_msgEng); - - }, - complete: function() { - // actualiser_decompte(); - afficher_decompte(); - } - }); - } - } -} - -function retourdecompte() -{ - idSaisieDecompte = $("#idSaisieDecompte").val(); - lienPrestation_C = $("#lienPrestation_C").val(); - lienProduction_C = $("#lienProduction_C").val(); - - v_url = lienProduction_C+"/Connexiondecompte/"+idSaisieDecompte; - - if (idSaisieDecompte>"") - { - window.location.assign(v_url); - } -} - -function enregistrer_nv_medicament() -{ - libelleMedicament = $("#libelleMedicament").val(); - - if (libelleMedicament<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - prixMedicament=$("#prixMedicament").val(); - prixMedicament=prixMedicament.replace(",","."); - $("#prixMedicament").val(prixMedicament); - - if(isNaN(prixMedicament)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixMedicament").val("0"); - $("#prixMedicament").focus(); - return; - } - - if(prixMedicament==0) - { - $("#prixMedicament").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - qteMedicament=$("#qteMedicament").val(); - qteMedicament=qteMedicament.replace(",","."); - $("#qteMedicament").val(qteMedicament); - - if(isNaN(qteMedicament)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#qteMedicament").val("0"); - $("#qteMedicament").focus(); - return; - } - - if(qteMedicament==0) - { - $("#qteMedicament").focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'libelleMedicament='+libelleMedicament+'&prixMedicament='+prixMedicament+'&qteMedicament='+qteMedicament; - - typeSms="ententeprealablepha"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/creermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - // alert("error => "+data); - // $("#div_new_medicament_test").html(data); - - $("#btn_close_pop_new_med").click(); - $("#btn_close_pop_medicament").click(); - }, - error: function(data) { - alert("error => "+data); - $("#div_new_medicament_test").html(data); - }, - complete: function() { - actualiser_saisie_pharmacien(); - } - }); -} - -function demander_accord_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - typeSms="ententeprealablepha"; - - donnees_sav = 'idMedicament='+idMedicament+'&typeMail=mailententeprealablepha'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/demanderaccordpha/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function controle_longeur_passe(controle) -{ - longueur = controle.value.length; - - if(longueur==0) - { - return false; - } - - if(longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minmum required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } -} - -function ajax_maj_prix_medicament_pha(idMedicament, prix, controle) -{ - prix=prix.replace(",","."); - controle.value=prix; - - if(controle_numerique(controle)) - { - if(prix==0) - { - controle.focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majprixpha/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function facture_sans_bon() -{ - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - if (numeroBeneficiaire<="0") - { - v_msg="Veuillez sélectionner un bénéficiaire!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Facturesansboncso/"); -} - -function nouvelle_sans_bon() -{ - window.location.assign($("#racineWeb").val()+"Facturesansboncso/"); -} - -// js_facture_san_sbon -function enregistrerfacture_sans_bon_temp(v_initialiser) -{ - dateFacture=$("#dateFacture").val(); - debutMoisDecompte = $("#debutMoisDecompte").val(); - - codeMedecin = $("#codeMedecin").val(); - medecinManquant = $("#medecinManquant").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeMedecin=="ZZZZ" && medecinManquant<=" ") - { - v_msg="Veuillez saisir le nom du médecin non enregistré!"; - v_msgEng="Please enter the name of the non-registered doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez saisir le No de Bons!"; - v_msgEng="Please enter the first number of form!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - - if (dateFacture<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - /* - medecinManquant = $("#medecinManquant").val(); - - if (medecinManquant<=" ") - { - v_msg="Veuillez saisir le Médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - */ - - // vérifier que le gars est couvert - // modifié le 09/07/2019 - $("#dateFactureReelle").val(dateFacture); - if (prestation_possible_assureur()) - { - observations = $("#observations").val(); - hospitalisation = $("#hospitalisation").val(); - tm = $("#tmFacture").val(); - - donnees = 'observations='+observations+'&dateFacture='+dateFacture+'&hospitalisation='+hospitalisation+'&tm='+tm+'&numeroBon='+numeroBon+'&medecinManquant='+medecinManquant+'&codeMedecin='+codeMedecin; - donnees += '&initialiserprestation='+v_initialiser; - - $("#div_prestations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/enregistrerfacturetemp/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_facture").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() { - alerter_depassement_limite_sans_bon(); - } - }); - } -} - -function enregistrerfacture_sans_bon() -{ - enregistrerfacture_sans_bon_temp("0"); - - medecinManquant = $("#medecinManquant").val(); - - if (medecinManquant<=" ") - { - v_msg="Veuillez saisir le Médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - - dateFacture=$("#dateFacture").val(); - - if (dateFacture<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à enregistrer!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#dateFactureReelle").val(dateFacture); - if (prestation_possible_assureur()) - { - v_msg="Confirmez-vous cette facture?"; - v_msgEng="Do you confirm this invoice?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/validerfacturesansbon/", - error: function(errorData) { - }, - success: function(data) { - // maj_fraisexclu_cso(); - $(".datepicker" ).datepicker(); - }, - complete: function() { - v_msg="Validation effectuée avec succès!"; - v_msgEng="Validation done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_beneficiaire_id(); - } - }); - } - } -} - -function ajax_maj_tm_facture(tm, controle) -{ - donnees = 'tm='+tm; - - tm=tm.replace(",","."); - controle.value=tm; - - if(controle_numerique(controle)) - { - // enregistrerfacture_sans_bon_temp(); - enregistrerfacture_sans_bon_temp("0"); - } -} - -function ajax_maj_prix_acte(idPrestation, valeurActe, controle) -{ - donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe; - - valeurActe=valeurActe.replace(",","."); - controle.value=valeurActe; - - if(controle_numerique(controle)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/majprix/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture").html(data); - $(".datepicker" ).datepicker(); - }, - error: function(data) { - }, - complete: function(data) { - alerter_depassement_limite_sans_bon(); - } - }); - } -} - - -function valider_facture_sans_bon_temp() -{ - enregistrerfacture_sans_bon_temp("1"); -} - -function alerter_depassement_limite_sans_bon() -{ - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function consulter_limite_avant_facturation_classique() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureclassique/"); - */ -} - -function pop_messagerie() -{ - nbMessagesNonLus = $("#timer").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/", - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_messagerie").click(); - } - }); -} - -function marquer_message_comme_lu(idMessagerie, controle) -{ - donnees = 'idMessagerie='+idMessagerie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - controle.parentElement.removeChild(controle); - } - }); -} - - -function envoyer_messagerie(textMessage, idParent) -{ - donnees = 'textMessage='+textMessage+"&idParent="+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - } - }); -} - -function repondre_message(idMessagerie, idParent, controle) -{ - donnees = 'idMessagerie='+idMessagerie+'&idParent='+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessageriereponse/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_reponse").html(data); - }, - complete: function() { - repondu = $("#repondu").val(); - if(repondu=="1") - { - v_msg="Déjà répondu!"; - v_msgEng="Already answered!"; - alert_ebene(v_msg, v_msgEng); - - controle.parentElement.removeChild(controle); - return; - } - else - {$("#btn_pop_messagerie_reponse").click(); - } - } - }); -} - -function gerer_messagerie() -{ - window.location.assign($("#racineWeb").val()+"Messagerie/"); -} - -function afficher_lite_messagerie() -{ - donnees = ""; - donnees_retour = ""; - - date1 = $("#date1").val(); - date2 = $("#date2").val(); - - messageLu = $("#messageLu").val(); - textMessage = $("#textMessage").val(); - - donnees += 'date1=' + date1; - donnees += '&date2=' + date2; - donnees += '&messageLu=' + messageLu; - donnees += '&textMessage=' + textMessage; - - $("#div_messagerie_gestion").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemessagerie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_messagerie_gestion").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - - -function enregistrer_repondre_message() -{ - idMessagerie = $("#idMessagerie").val(); - idParent = $("#idParentReponse").val(); - - textMessage = $("#textMessageReponse").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir la réponse!"; - v_msgEng="Please enter the answer!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageReponse").focus(); - return; - } - - donnees = 'idMessagerie='+idMessagerie+"&idParent="+idParent+"&textMessage="+textMessage; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_pop_messagerie_reponse_quit").click(); - } - }); -} - -function historique_message(idParent) -{ - donnees = 'idParent='+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessageriehistorique/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_historique").html(data); - }, - complete: function() { - $("#btn_pop_messagerie_historique").click(); - } - }); -} - -function initiermessage() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerienew/", - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_new").html(data); - }, - complete: function() { - $("#btn_pop_messagerie_new").click(); - } - }); -} - -function enregistrer_new_message() -{ - textMessage = $("#textMessageNew").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir le message!"; - v_msgEng="Please enter the message!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageNew").focus(); - return; - } - - donnees = 'textMessage='+textMessage+"&idParent=0"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_pop_messagerie_new_quit").click(); - } - }); -} - -function consultation_assureur() -{ - dateFactureReelle = $("#dateFactureReelle").val(); - - if (dateFactureReelle<=" ") - { - v_msg="Veuillez saisir la date de la consultation!"; - v_msgEng="Please enter the date of the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFactureReelle").focus(); - return; - } - - if (prestation_possible_assureur()) - { - $("#okId" ).val("1"); - - ajax_context_datefacture_reelle(dateFactureReelle); - } -} - -function prestation_possible_assureur() -{ - enVigueur = $("#enVigueur_C").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire = $("#etatbeneficiaire_C").val(); - college_couvert = $("#college_couvert_C").val(); - derogation_en_cours = $("#derogation_en_cours_C").val(); - derogation_finger_en_cours = $("#derogation_finger_en_cours_C").val(); - - datejour = $("#datejour_C").val(); - - dateSortieBeneficiaire = $("#dateSortieBeneficiaire_C").val(); - var tdd = new Date(dateSortieBeneficiaire); - dtd = Math.round(Date.parse(tdd)/(1000*3600*24)); - - - dateFactureReelle = $("#dateFactureReelle").val(); - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - dateEntreeBeneficiaire = $("#dateEntreeBeneficiaire_C").val(); - - libelledebutMoisDecompte = $("#debutMoisDecompte").val(); - debutMoisDecompte = $("#debutMoisDecompte").datepicker("getDate"); - var tddebut = new Date(debutMoisDecompte); - dddebut = Math.round(Date.parse(tddebut)/(1000*3600*24)); - - CalculerFinMoisDecompte(); - - libellefinMoisDecompte = $("#finMoisDecompte").val(); - finMoisDecompte = $("#finMoisDecompte").datepicker("getDate"); - var tfin = new Date(finMoisDecompte); - ddfin = Math.round(Date.parse(tfin)/(1000*3600*24)); - - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = $("#dateFactureReelle").datepicker("getDate"); - var td2 = new Date(dateEcheancePolice); - var tdj = new Date(datejour); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - dtj=Math.round(Date.parse(tdj)/(1000*3600*24)); - - if ( (dt1ddfin) ) - { - v_msg="Attention! date hors du mois! => "+libelledebutMoisDecompte+" - "+libellefinMoisDecompte; - v_msgEng="Warning! date out of the month!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if(dateSortieBeneficiaire>"2000-01-01") - { - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - else - { - // A désactivé peut-être pour RADIANT - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - // Fin désactivation peut-être pour RADIANT - - if (college_couvert<1 && derogation_en_cours<1) - { - v_msg="Attention! Cette personne n\'a pas accès à ce centre"; - v_msgEng="Warning! This person does not have access to this center"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dtj) - { - v_msg="Attention! Revoir la date!"; - v_msgEng="Warning! Review the date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dt2 || dt1"2000-01-01") - { - v_msg="Attention! personne décédée!"; - v_msgEng="Warning! Deceased!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - return true; -} - -function ajax_context_datefacture_reelle(dateFactureReelle) -{ - donnees = 'dateFactureReelle='+dateFactureReelle; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdatefacturerelle/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - aller_a_la_consultatio(); - } - }); -} - -function aller_a_la_consultatio() -{ - window.location.assign($("#racineWeb" ).val()+"Consultation/"); -} - -function ajax_maj_qte_examen_lab(idExamen, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function ajax_maj_qte_examen_lab_select(idExamen, quantite, controle) -{ - donnee_a_affciher = ""; - - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#livraison").html(data); - donnee_a_affciher = data; - alerter_depassement_limite(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - controle.focus(); - } - }); - } -} - -function ajax_maj_qte_examen_cso(idExamen, quantite, controle) -{ - donnee_a_affciher = ""; - - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - controle.focus(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function actualiser_saisie_pharmacien() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function lister_ged() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteged/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function ctrlkeypress_lister_ged(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - lister_ged();; - } -} - -function check_ged(idGed, cheminFichier, controle) -{ - donnees = "idGed="+idGed+"&cheminFichier="+cheminFichier; - - // var cible_ged = $('#cible_ged'); - var ctrl_btn_ged = $("#btn_ged"+idGed); - var ctrl_mess_not_found= $("#mess_not_found"+idGed); - var ctrl_check = $("#ctrl_check"+idGed); - - // document.getElementById('bouton_'+id).innerHTML='Afficher le texte'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxged/verifierexistancefichier/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - - donnees_retour = data; - - if(donnees_retour=="1") - { - ctrl_btn_ged.show(); - } - else - { - ctrl_mess_not_found.html("Not found"); - } - }, - complete: function() - { - controle.style.display = 'none'; - ctrl_check.show(); - } - }); -} - -function lister_ged_adherent() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedadherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function lister_ged_beneficiaire_prest() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprest/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - - -function lister_ged_feuille_maladie() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function pop_ged_pharmacie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedpharmacie/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_ged").html(data); - }, - complete: function() { - $("#btn_pop_ged_pharmacie").click(); - } - }); -} - -function save_enroleur(user_id) -{ - if (user_id>"") - { - donnees = 'user_id='+user_id; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/saveenroleur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - } - }); - } -} - - -/* ACTIVATION POPUP -function imprimer_liste_assures() -{ - $('#div_export_assures').html(''); - - $("#btn_liste_assures").click(); - popalertmessagerie -} -*/ - -function pop_dernier_messagerie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/derniermessage/", - error: function(errorData) { - }, - success: function(data) { - $("#div_dernier_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_dernier_messagerie").click(); - } - }); -} - -function marquer_dernier_message_comme_lu(idMessagerie, controle) -{ - donnees = 'idMessagerie='+idMessagerie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - // controle.parentElement.removeChild(controle); - $("#btn_close_pop_dernier_messagerie").click(); - } - }); -} - -function isNumeric(num){ - return !isNaN(num) -} - -function retirer_consommable(idConsommable) -{ - donnees = 'idConsommable='+idConsommable; - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you Confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommable/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function retirer_consommable_tous() -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you Confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommabletous/", - type: 'POST', - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function valider_consommables() -{ - facturerConsommable=$("#facturerConsommable").val(); - if (facturerConsommable!="1") - { - v_msg="Consommables non facturés!"; - v_msgEng="Consumables not invoiced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function imprimerdecompteprestataireaccord() -{ - regle=$("#regle").val(); - - if( (regle!=1) && (regle!=9) ) - { - v_msg="Pas encore validé par l\'asssureur"; - v_msgEng="Not yet validates by insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idReglement = $("#idReglement").val(); - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerdecompteprestataireaccord", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - - -function consulter_une_factures() -{ - window.location.assign($("#racineWeb" ).val()+"Factureconsprestataire/"); -} - -function ctrlkeypressfacture(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#idFacture").blur(); - } -} - -function chercher_facture(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturefeuillemaladie() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_facture_pop(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture_pop").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture_pop").html(data); - }, - error: function(data) { - }, - complete: function() { - $('#btn_pop_consulter_facture').click(); - } - }); -} - -function consulterfacturefeuillemaladie_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureverres_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureged_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function reafficher_ged_facture(idFacture) -{ - if (idFacture>"0") - { - donnees = 'idFacture='+idFacture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgedfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); - } -} - -function valider_ged_facture() -{ - idFacture = $("#idFactureGed").val(); - v_url = $("#racineWeb").val()+"Ajaxgedfacture/chargerged"; - - donnees = ""; - - donnees = new FormData($("#ajax_form_upload")[0]); - - $.ajax({ - type: "POST", - url: v_url, - data: donnees, - contentType: false, - cache: false, - processData :false, - - success: function(message){ - alert_ebene(message); - }, - error: function(errorData){ - }, - complete: function() { - // reafficher_ged_facture(idFacture); - } - }); -} - -function consulterfactureged() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function enregistrer_nv_verres() -{ - libelleOptique = $("#libelleOptique").val(); - - if (libelleOptique<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleOptique").focus(); - return; - } - - prixVerre=$("#prixVerre").val(); - prixVerre=prixVerre.replace(",","."); - $("#prixVerre").val(prixVerre); - - if(isNaN(prixVerre)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixVerre").val("0"); - $("#prixVerre").focus(); - return; - } - - if(prixVerre==0) - { - $("#prixVerre").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'libelleOptique='+libelleOptique+'&prixVerre='+prixVerre; - - // typeSms="ententeprealableopt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/creerverre/", - type: 'POST', - data: donnees, - success: function(data) { - - $("#btn_close_pop_new_verre").click(); - $("#btn_close_pop_verre").click(); - - // $("#div_test_gabarit").html(data); - - }, - error: function(data) { - }, - complete: function() { - actualiser_opticien(); - } - }); -} - -function demander_accord_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - typeSms="ententeprealableopt"; - - donnees_sav = 'idOptique='+idOptique+'&typeMail=mailententeprealableopt'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/demanderaccordopt/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function demander_accord_mont(idOptique) -{ - - prixPrestataire = $("#prixPrestataire").val(); - - prixPrestataire=prixPrestataire.replace(",","."); - $("#prixPrestataire").val(prixPrestataire); - - if(isNaN(prixPrestataire)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixPrestataire").val("0"); - $("#prixPrestataire").focus(); - return; - } - - if(prixPrestataire==0) - { - $("#prixPrestataire").focus(); - - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idOptique='+idOptique+'&prixPrestataire='+prixPrestataire; - - typeSms="ententeprealablemont"; - - donnees_sav = donnees+'&typeMail=mailententeprealablemont'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/demanderaccordmont/", - - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_monture").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -// 06/04/2019 -function changer_langue() -{ - codeLangue = $("#codeLangue").val(); - - v_msg="Confirmez-vous le changement de langue?"; - v_msgEng="Do you confirm the language change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/", - type : 'post', - // data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/"); - } - }); - } -} - -function envoyersms(p_destinataires, p_message, creation_message) -{ - if(creation_message=="1") - { - envoyer_messagerie(p_message, "0"); - } - - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - if(p_destinataires.length<5) - { - /* - v_msg="SMS => Pas de destintaire!"; - v_msgEng="SMS => No recipient!"; - - alert_ebene(v_msg, v_msgEng); - */ - - return; - } - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="blive") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="hooza") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function preparesms_adherent(typeSms) -{ - // ajout du 09/04/2025 => empêcher l'nevoi des messages de Facturation - return; - - /* - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return; - } - - smsmParFacture = $("#smsmParFacture").val(); - - if(smsmParFacture=="0") - { - return; - } - - codeLangueAdherent = $("#codeLangueAdherent").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "0"; - - devise = $("#devise_C").val(); - - if (typeSms=="facturer_cso") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonConsultation = $("#numeroBonConsultation_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Consultation form No :" : "Bon consultation No : "; - p_message += numeroBonConsultation+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Consumptions : " : "Consommations : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_pha") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Prescription No : " : "Ordonnance No : "; - p_message += numeroBonOrdonnance+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Pharmacy Consumptions : " : "Consommations Pharmacie : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - - } - - if (typeSms=="facturer_lab") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonExamen = $("#numeroBonExamen_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Exam form No : " : "Bon Examens No : "; - p_message += numeroBonExamen+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Laboratory consumptions : " : "Consommations Labo : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_opt") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOptique = $("#numeroBonOptique_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical foem No : " : "Bon Optique No : "; - p_message += numeroBonOptique+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical consumptions : " : "Consommations Optiques : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_mont") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical frames Consumptions : " : "Consommations Montures : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_sea") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonKine = $("#numeroBonKine_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "KINE form No : " : "Bon KINE No : "; - p_message += numeroBonKine+" "; - - p_message += (codeLangueAdherent=="en_US") ? "KINE Consumptions : " : "Consommations KINE : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - envoyersms(p_destinataires, p_message, creation_message); - */ -} - -function ajouter_sms_attente(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_sms_attente_singleton(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - var addr = p_destinataires.split(","); - - addr.forEach(function(element) - { - p_dest = element; - - if(p_dest.length>4) - { - donnees = "destinataires="+p_dest+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } - else - { - v_msg=p_dest+" => Mauvais format!"; - v_msgEng=p_dest+" => wrong phone format!"; - alert_ebene(v_msg, v_msgEng); - } - }); -} - -function tester_disponibiliter_sms() -{ - p_message = ""; - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - p_message = "Fournisseur : esicia "; - } - else - if(fournisseurSms=="blive") - { - p_message = "Fournisseur : blive "; - } - else - if(fournisseurSms=="hooza") - { - p_message = "Fournisseur : hooza "; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - p_destinataires = "25761198584"; - // p_destinataires = "25761198584,25761198584"; - - donnees = "destinataires="+p_destinataires+"&message="+p_message+"&fournisseurSms="+fournisseurSms; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtesterdisponiblitesms/envoyerlesms/", - type: 'POST', - data: donnees, - success: function(data) - { - $('#div_test_gabarit').html(data); - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_destinataire_sms_adherent(p_destinataires) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return p_destinataires; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return p_destinataires; - } - - tel_adh = $("#telephonePortableAdherent_C").val(); - - if(tel_adh.length>4) - { - return p_destinataires+","+tel_adh; - } - - return p_destinataires; -} - -function tester_ajouter_destinataire_sms_adherent() -{ - p_destinataires = "22506802339"; -} - -function preparemail_adherent(typeSms) -{ - emailParFacture = $("#emailParFacture").val(); - - if(emailParFacture=="0") - { - return; - } - - emailAdherent = $("#emailAdherent_C").val(); - - if(emailAdherent.length<5) - { - return; - } - - codeLangueAdherent = $("#codeLangueAdherent").val(); - - p_objet_email_adh = (codeLangueAdherent=="en_US") ? "ALERT CONSUMPTION" : "ALERT CONSOMMATIONS"; - - p_messageemail_adh = ""; - - devise = $("#devise_C").val(); - - cout = parseInt(cout); - cout = cout.toLocaleString(); - - if (typeSms=="facturer_cso") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonConsultation = $("#numeroBonConsultation_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+")"; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Consultation form No : " : "Bon consultation No : "; - p_messageemail_adh += numeroBonConsultation; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Consumptions : " : "Consommations : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_pha") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Prescription No : " : "Ordonnance No : "; - p_messageemail_adh += numeroBonOrdonnance; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Pharmacy Consumptions : " : "Consommations Pharmacie : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - - } - - if (typeSms=="facturer_lab") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonExamen = $("#numeroBonExamen_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Exam form No : " : "Bon Examens No : "; - p_messageemail_adh += numeroBonExamen; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Laboratory consumptions : " : "Consommations Labo : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_opt") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOptique = $("#numeroBonOptique_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical form No : " : "Bon Optique No : "; - p_messageemail_adh += numeroBonOptique; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical consumptions : " : "Consommations Optiques : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_mont") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical frames Consumptions : " : "Consommations Montures : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_sea") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonKine = $("#numeroBonKine_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "KINE form No : " : "Bon KINE No : "; - p_messageemail_adh += numeroBonKine; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "KINE Consumptions : " : "Consommations KINE : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh); -} - -function ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh) -{ - donnees = "email="+emailAdherent+"&objet="+p_objet_email_adh+"&message="+p_messageemail_adh; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmailadhattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function verifiertentativeidentitification(user_id) -{ - /* - donnees = 'user_id='+user_id; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenvoimaildivers/verifiertentativeidentitification/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() { - } - }); - */ -} - -function afficherbon_vide() -{ - $("#div_bonpecs").html(""); - - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : 0"); - } - else - { - $("#nbligne").val("Nombre de bons affichés : 0"); - } - - codeTypeBon=$("#codeTypeBon").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/vide/", - error: function(errorData) - { - }, - success: function(data) - { - $("#div_bonpecs").html(data); - }, - complete: function() - { - } - }); -} - -function demander_accord_pha_cso(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - typeSms="ententeprealablepha"; - - donnees_sav = 'idMedicament='+idMedicament+'&typeMail=mailententeprealablepha'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/demanderaccordpha/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function desactiver_click_droit() -{ - if (document.addEventListener) { - document.addEventListener('contextmenu', function (e) { - e.preventDefault(); - }, false); - } else { - document.attachEvent('oncontextmenu', function () { - window.event.returnValue = false; - }); - } -} - -function enregistrer_new_notes() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - donnees = 'notesNew='+notesNew; - - v_msg="Confirmez-vous cette note?"; - v_msgEng="Do you confirm this note?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/creernote/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_notes_feuille(); - } - }); - } -} - -function afficher_notes_feuille() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initiernotesfeuille() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/nouvellenote/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function click_btn_add_drug() -{ - hospitalisation = $("#hospitalisation_C").val(); - - nbMedicamentMax = parseInt($("#nbMedicamentMax").val()); - nbMedicamentSaisie = parseInt($("#nbMedicamentSaisie").val()); - - if (nbMedicamentSaisie>=nbMedicamentMax && hospitalisation!="1") - { - v_msg="Attention! Maximum de médicaments atteint!"; - v_msgEng="Warning! Maximum drugs reached!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#btn_add_drug").click(); -} - -function imprimer_feuille_maladie() -{ - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees_retour = ""; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_export_a").html(donnees_retour); - $("#btn_imprimer_feuille_maladie").click(); - } - }); -} - -function controle_numerique_new(idControle, oldValue) -{ - controle = document.getElementById(idControle); - - valeur = controle.value; - - if(isNaN(valeur)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=oldValue; - controle.focus(); - return false; - } - - return true; -} - -function reinitrechercherbonordonnance() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnance/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function reinit_chercher_ordonnance_opt() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - // window.location.assign($("#racineWeb" ).val()+"Opticien/"); - }, - error: function(data) { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } - }); -} - -// - -function reinitrechercherbonkine() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Kine/"); - } - }); -} - -function supprimer_espace_string(p_mot) -{ - p_mot = p_mot.trim(); - p_mot = p_mot.replace(" ", ""); - return p_mot; -} - -function notesfeuillemaladie() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesfeuillemaladie/"); -} - -function raffraichier_gabarit() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgabarit/", - success: function(data) - { - $("#div_ajaxgabarit").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - $(".datepicker" ).datepicker(); - - raffraichier_messagerie(); - } - }); -} - -function connexion_cookie() -{ - msgErreur=$("#msgErreur").val(); - - donnees = 'msgErreur='+msgErreur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconnexioncookie/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_ajaxconnexion").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - var login = document.getElementById("login").value; - if (login>" ") - { - $("#mdp").focus(); - } - else - { - $("#login").focus(); - } - } - }); -} - - -function ajaxaffectionspossibles() -{ - codeTypeAffection=$("#codeTypeAffection").val(); - - donnees = 'codeTypeAffection='+codeTypeAffection; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxaffectionspossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeaffections").html(data); - } - }); -} - - -function enregistreraffection() -{ - affectionObligatoire=$("#affectionObligatoire").val(); - codeAffection=$("#codeAffectionPop").val(); - codeAffectionOld=$("#codeAffection").val(); - - if (affectionObligatoire=="1" && codeAffection<="0000") - { - v_msg="Diagnostique exigé!"; - v_msgEng="Diagnosis required!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeAffectionPop").focus(); - - return; - } - - if (codeAffection==codeAffectionOld) - { - v_msg="Déjà saisi!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeAffectionPop").focus(); - - return; - } - - v_msg="Confirmez-vous cette affection?"; - v_msgEng="Do you confirm this affection?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeAffection='+codeAffection; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreraffection/enregistreraffection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - $("#close_pop_affection").click(); - feuillemaladie(); - } - }); - } -} - -function diagnosticsfeuillemaladie() -{ - /* - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - window.location.assign($("#racineWeb" ).val()+"Diagnosticscons/"); -} - -function afficher_diagnostics_feuille() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticscons/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - - -function imprimer_ecarts_decompte() -{ - var div_export = $('#div_export_ecart_decompte'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_imprimer_ecart_decompte").click(); - - // alert("Ajaximprimerecartdecompte"); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerecartdecompte/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - // $("#btn_imprimer_ecart_decompte").click(); - } - }); - -} - -function afficher_ecarts_facture_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartfacture/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function ecarts_facture_non_saisies_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartnonsaisi/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function initvidermessagerie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvidermessagerie/", - error: function(errorData) { - }, - success: function(data) { - $("#div_vider_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_vider_messagerie").click(); - $(".datepicker" ).datepicker(); - } - }); -} - -function vidermessagerie() -{ - dateLimite = $("#dateLimite").val(); - - v_msg="Confirmez-vous le vidage de tous les messages générés avant le "+dateLimite+" ?"; - v_msgEng="Do you confirm the emptying of all messages generated before the "+dateLimite+" ?"; - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'dateLimite=' + dateLimite; - - $("#btn_pop_vider_messagerie").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvidermessagerie/vidermessagerie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - v_msg="Vidage effectué avec succès!"; - v_msgEng="Emptying done successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_pop_vider_messagerie_quit").click(); - gerer_messagerie(); - // Messagerie/ - } - }); - } -} - -function afficher_contacts_assureur() -{ - window.location.assign($("#racineWeb" ).val()+"Infossassureur/"); -} - -function ajaxdelaicarencecaisonconsultation() -{ - codeRaisonConsultation=$("#codeRaisonConsultation").val(); - - donnees = 'codeRaisonConsultation='+codeRaisonConsultation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdelaicarencecaisonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infodelaicarence").html(data); - }, - complete: function() { - $("#delaiCarenceRaisonconsultation").val( $("#delaiCarenceRaisonconsultation_info").val()); - $("#appliquerDelaiCarence").val( $("#appliquerDelaiCarence_info").val()); - } - }); -} - -function CalculerFinMoisDecompte() -{ - var typdate = $("#debutMoisDecompte").datepicker("getDate"); - typdate.addMonths(1); - $("#finMoisDecompte").datepicker( "setDate", typdate ); -} - -function reposmedical() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Reposmedical/"); -} - -function afficher_repos_medical() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initier_repos_medical() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/nouveaureposmedical/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function enregistrer_new_repos_medical() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - nbJour = $("#nbJour").val(); - - if(isNaN(nbJour)) - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - if (nbJour<="0") - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - donnees = 'notesNew='+notesNew+"&nbJour="+nbJour; - - v_msg="Confirmez-vous ce repos médical?"; - v_msgEng="Do you confirm this medical rest?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/creerreposmedical/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_repos_medical(); - } - }); - } -} - -function supprimer_affections(idAffection) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreraffection/supprimeraffection/", - type : 'post', - data: "idAffection="+idAffection, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#close_pop_affection").click(); - feuillemaladie(); - } - }); - } -} - -function anteceentsmedicaux() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Anteceentsmedicaux/"); -} - -function diagnosticsbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Diagnosticsconsbeneficiaire/"); -} - -function notesbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesbeneficiaire/"); -} - -function afficher_diagnostics_beneficiaire() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticsbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - -function afficher_notes_beneficiaire() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function test_online() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - v_msg="Connexion OK!"; - v_msgEng="Connection OK"; - alert_ebene(v_msg, v_msgEng); - - } - else - { - $("#test_connexion").css('background-color', 'red'); - v_msg="Problème de Connexion!"; - v_msgEng="Connection Problem!"; - alert_ebene(v_msg, v_msgEng); - } - return; -} - -function raffraichier_messagerie() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - c_html = ""; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/", - success: function(data) { - c_html = data; - }, - error: function(errorData) { - }, - complete: function() { - $("#nbMessagesNonLus").html(c_html); - msgNonLus=$("#msgNonLus").val(); - - if(msgNonLus>0) - { - pop_dernier_messagerie(); - } - } - }); - } - else - { - $("#test_connexion").css('background-color', 'red'); - return; - } -} - - -function consulterfactureverres() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function init_remplacer_medicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/initremplacement/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() - { - $("#btn_remplacer_medicament").click(); - } - }); -} - -function consulter_remplacer_medicament() -{ - $("#div_liste_medicaments_remplaces").html('
  ' + 'Veuillez patienter...' + '
'); - - $('#btn_medicaments_remplaces').click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/consulterremplacement/", - type: 'POST', - success: function(data) { - $("#div_liste_medicaments_remplaces").html(data); - }, - error: function(data) { - }, - complete: function() - { - // $('#btn_medicaments_remplaces').click(); - } - }); -} - -function ctrlkeypress_medicament_remplacement(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament_remplacement(); - } -} - -function afficher_pop_recherche_medicament_remplacement() -{ - nomsearch = $("#nomsearchrempl").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - // alert(donnees); - // return; - - $("#div_listemedicament_rempl").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicaments/remplacement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament_rempl").html(data); - } - }); - } -} - -function selectionner_medicament_pop_rempl(codeMedicament, libelleMedicament) -{ - $("#codeMedicament_pop_rempl").val(codeMedicament); - $("#libelleMedicament_pop_rempl").val(libelleMedicament); -} - -function remplacer_medicament() -{ - codeMedicamentNouv = $("#codeMedicament_pop_rempl").val(); - libelleMedicamentNouv = $("#libelleMedicament_pop_rempl").val(); - - if (codeMedicamentNouv<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Prescrire : "+libelleMedicamentNouv+"?"; - v_msgEng="Prescribe : "+libelleMedicamentNouv+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeMedicamentNouv='+codeMedicamentNouv; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/remplacermedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - // $("#btn_close_pop_rempl").click(); - prescription_medicament(); - }, - complete: function() { - } - }); - } -} - -function imprimer_facture_feuille_maladie(idFactureFeuille) -{ - donnees = 'idFacture='+idFactureFeuille; - - // alert("imprimer_facture_feuille_maladie => "+donnees); - // return; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfeuillemaladie/imprimerfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#div_imprimer_facture").html(data); - }, - complete: function() { - $("#btn_pop_imprimer_facture").click(); - } - }); -} - -function appliquerDataTable(){ - - var sc = $(window).scrollTop(), - dh = $(document).height(), - ch = $(window).height(); - scrollPercent = (sc / (dh-ch)) * 100; - - try{ - var oTable = $('.tabliste').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "75vh", - "pagingType": "full_numbers", - "autoWidth": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "fixedColumns": true, - "paginate": { - "next": "►", - "previous": "◄", - "first": "|◄", - "last": "►|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - /* - $(window).bind('resize', function () { - oTable.fnAdjustColumnSizing(false); - }); - */ - } - catch(err){ - return false; - } - -} - -function appliquerDataTableMini(){ - try{ - $('.tablistemini').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "34vh", - "pagingType": "full_numbers", - "autoWidth": false, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "►", - "previous": "◄", - "first": "|◄", - "last": "►|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -function dataTableSpeciale(){ - try{ - $('.tabspeciale').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "75vh", - "pagingType": "full_numbers", - "autoWidth": false, - "bFilter": false, - "bLengthChange": false, - "orderMulti": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "►", - "previous": "◄", - "first": "|◄", - "last": "►|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -function dataTableSpecialeMini(){ - try{ - $('.tabspecialemini').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "34vh", - "pagingType": "full_numbers", - "autoWidth": false, - "bFilter": false, - "bLengthChange": false, - "orderMulti": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "►", - "previous": "◄", - "first": "|◄", - "last": "►|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -$(function(){ - appliquerDataTable(); - dataTableSpeciale(); - $('.js-example-basic-single').select2(); - $('.selectpicker').selectpicker(); -}); diff --git a/extranet/Js/fonctions_2025_07_09.js b/extranet/Js/fonctions_2025_07_09.js deleted file mode 100644 index da830f8..0000000 --- a/extranet/Js/fonctions_2025_07_09.js +++ /dev/null @@ -1,18267 +0,0 @@ -function alert_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function alert_ebene_ajax(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function confirm_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return confirm(p_msg_eng); - } - else - { - return confirm(p_msg); - } -} - -function prompt_ebene(p_msg, p_msg_eng, p_retour) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return prompt(p_msg_eng, p_retour); - } - else - { - return prompt(p_msg, p_retour); - } -} - -var p_destinataires=""; -var p_message=""; - -function adherents_police() -{ - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Listeadherent/"); - } -} - -$.prototype.enable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('disabled'); - }); -} - -$.prototype.disable = function () { - $.each(this, function (index, el) { - $(el).attr('disabled', 'disabled'); - }); -} - -$.prototype.unreadable = function () { - $.each(this, function (index, el) { - $(el).attr('READONLY', 'READONLY'); - }); -} - -$.prototype.readable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('READONLY'); - }); -} - -Date.estAnneeBissextile = function (annee) { - return (((annee % 4 === 0) && (annee % 100 !== 0)) || (annee % 400 === 0)); -}; - -Date.getDaysInMonth = function (annee, month) { - return [31, (Date.estAnneeBissextile(annee) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; -}; - -Date.prototype.estAnneeBissextile = function () { - return Date.estAnneeBissextile(this.getFullYear()); -}; - -Date.prototype.getDaysInMonth = function () { - return Date.getDaysInMonth(this.getFullYear(), this.getMonth()); -}; - -Date.prototype.addMonths = function (value) { - var n = this.getDate(); - this.setDate(1); - this.setMonth(this.getMonth() + value); - this.setDate(Math.min(n, this.getDaysInMonth())); - this.setDate(this.getDate()-1); - return this; -}; - -$( ".datepicker" ).datepicker({ - inline: true, - changeMonth: true, - changeYear: true, - yearRange: "c-60:c+20" - -}); - -/*les fonctions courantes et globales */ - -function get_age(dater) -{ - var td2 = $("#datejourfr_C").datepicker("getDate"); - return age = td2.getFullYear()-dater.getFullYear(); -} - -// function controle_age(dater, codeLienParente, controle) -function controle_age(dater, codeLienParente) -{ - age = get_age(dater); - $("#agepersonne").val("Âge : "+age); - - if (age>65) - { - v_msg="Âge "+age+" supérieur à 65 ans!"; - v_msgEng="Age "+age+" over 65!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="E")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="O")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - return true; -} - -/* Début JS client */ -function selectionner_client(id,no) -{ - $("#idClient_C").val(id); - $("#numeroClient_C").val(no); - $("#nomClient_C").val(""); -} - -function selectionner_client_d(id,no) -{ - $("#idClient_d_C").val(id); - $("#numeroClient_d_C").val(no); - $("#nomClient_d_C").val(""); -} - -function afficher_client_id() -{ - idClient=$("#idClient_C" ).val(); - - if (idClient>"") - { - ajax_context_client_afficher(idClient); - } -} - -function afficher_client_d_id() -{ - idClient=$("#idClient_d_C" ).val(); - - if (idClient>"") - { - ajax_context_client_d_afficher(idClient); - } -} - - -/* Fin JS client */ - -/* Début JS police */ -function selectionner_police(id,no) -{ - $("#idPolice_C" ).val(id); - $("#numeroPolice_C" ).val(no); -} - -function selectionner_police_d(id,no) -{ - $("#idPolice_d_C" ).val(id); - $("#numeroPolice_d_C" ).val(no); -} - -function afficher_police_id() -{ - idPolice=$("#idPolice_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_afficher(idPolice); - } -} - -function afficher_police_d_id() -{ - idPolice=$("#idPolice_d_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_d_afficher(idPolice); - } -} - - -/* Fin JS client */ - -/* Début JS adherent */ -function selectionner_adherent(id,no) -{ - $("#idAdherent_C" ).val(id); - $("#numeroAdherent_C" ).val(no); -} - -function afficher_adherent() -{ - if ($("#numeroAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#numeroAdherent_C" ).val()+"/"); - } -} - -function afficher_adherent_id() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/"); - } -} -/* Fin JS adherent */ - -/* Début JS bénéficiare */ -function selectionner_beneficiaire(id,no) -{ - $("#idBeneficiaire_C").val(id); - $("#numeroBeneficiaire_C" ).val(no); -} - -function afficher_beneficiaire_id() -{ - idBeneficiaire=$("#idBeneficiaire_C").val(); - okId=$("#okId").val(); - okId_face=$("#okId_face").val(); - - - if (idBeneficiaire>"") - { - ajax_context_beneficiaire_afficher(idBeneficiaire, okId, okId_face); - } - } -} - -function afficher_adherent_assure() -{ - if ($("#idAdherent_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"); -} - -function afficher_assure() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"+$("#idAdherent_C" ).val()+"/"); - } -} - -/* Fin JS beneficiaire */ - -function fermerFenetre() -{ - v_msg="Etes-vous sur de vouloir quitter?"; - v_msgEng="Are you sure you want to exit?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - ajax_deconnexion(); - } -} - -function ChangerPass() -{ - if ($("#ancmdp" ).val()<=' ') - { - v_msg="Veuillez saisir l\'ancien mot de passe!"; - v_msgEng="Please enter the old password!"; - alert_ebene(v_msg, v_msgEng); - - $("#ancmdp").focus(); - return false; - } - - if ($("#nvmdp" ).val()<=' ') - { - v_msg="Veuillez saisir un mot de passe!"; - v_msgEng="Please enter a password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#nvmdp").val()=='0000' || $("#nvmdp").val()=='radiant') - { - v_msg="Veuillez changer de mot de passe!"; - v_msgEng="Please change password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - longueur = $("#nvmdp").val().length; - - if(longueur>0 && longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minimum required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val()) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } -} - -function afficher_image(fichier) -{ - window.open(fichier); -} - - -function selectionner_bon(id,no, codeEtatBon, motifAnnulation) -{ - $("#idBon_C").val(id); - $("#numeroBon_C").val(no); - $("#motifAnnulation_C").val(motifAnnulation); - $("#codeEtatBon_C").val(codeEtatBon); -} - - -function imprimerbon() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - - alert_ebene(v_msg, v_msgEng); - - return; - } - - var codeEtatBon = $("input[name='codeEtatBon']").val(); - - if (codeEtatBon!="1") - { - return; - } - - $("#frmconsultation").submit(); -} - -function imprimerbonVierge() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $("#codeTypeBon").val('2'); - $("#frmconsultation").submit(); - $("#codeTypeBon").val('1'); -} - -function calculer_Tm() -{ - $("#montantTm").val( ($("#montantacte").val() * (100-$("#tauxCouverture").val() )) / 100 ); - if ($("#codeMedecin").val()>" ") - $("#numeroBon").focus(); - else - $("#codeMedecin").focus(); - return true; -} - -function controlefocusconsultationMd() -{ - if ($("#codeActe").val()>" ") - $("#numeroBon").focus(); - else - $("#codeActe").focus(); - return true; -} - -function ajaxinfosacteexamen() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - } - }); -} - -function ajaxbonexamendisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - $("#codeTypeBon").val('1'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function ajaxbonhospitdisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function accueil() -{ - if($("#codeProfil_C" ).val()=="MEC") - { - window.location.assign($("#racineWeb").val()+"Accueilmedecin/"); - } - else - { - window.location.assign($("#racineWeb").val()+"Accueil/"); - } -} - - -function forceDownload(fileURL, fileName) -{ -} - - -function ged() -{ - if ($("#numeroBeneficiaire_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Ged/"); -} - - -function tachesadherent() -{ - if ($("#numeroAdherent_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - return; - } - window.location.assign($("#racineWeb").val()+"Tacheadherent/"); -} - -function afficherged(cheminFichier) -{ - if (cheminFichier<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - return; - } - //window.open(cheminFichier); - window.open(cheminFichier, '_blank'); -} - -function archiverged() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un document!"; - v_msgEng="Please select a document"; - alert_ebene(v_msg, v_msgEng); - return; - } - if( $("#accesAssure").val()=="0" && $("#accesPrestataire").val()=="0" - && $("#accesMedecin").val()=="0" && $("#accesGestionnaire").val()=="0") - { - v_msg="Le document doit être visible par au moins un des acteurs!"; - v_msgEng="The document must be seen by at least one of the persons in charge!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function archiverfacture() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function ajaxinfosdestinatairetache() -{ - if ($("#codeDestinataire").val()<=" ") - { - v_msg="Veuillez sélectionner un destinataire!"; - v_msgEng="Please select a recipient!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeDestinataire").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosdestinatairetache/", - type : 'post', - data: "codeDestinataire="+$("#codeDestinataire").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosdestinatairetache").html(data); - }, - complete: function() { - $("#emailtache").val( $("#emailActeurtache_info").val()); - } - }); -} - -function selectionner_tache(id) -{ - $("#idTache").val(id); -} - -function afficher_tache() -{ - if ($("#idTache" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - } else - window.location.assign($("#racineWeb" ).val()+"Affichertache/"+$("#idTache").val()+"/"); -} - -function reinitialiserrecherche() -{ - // window.location.assign($("#racineWeb").val()+"Tache/"); -} - - -function selectionner_Rq(lienrequete) -{ - $("#lienrequete" ).val(lienrequete); -} - - -function parametre_Rq() -{ - if ($("#lienrequete" ).val()<="") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query (request)!"; - alert_ebene(v_msg, v_msgEng); - } - { - window.location.assign($("#racineWeb" ).val()+$("#lienrequete" ).val()); - } -} - -function imprimer_pdf() -{ - $("#sortie").val('1'); - $("#frmrequete").submit(); -} - -function export_xls() -{ - $("#sortie").val('2'); - $("#frmrequete").submit(); - $("#sortie").val('1'); -} - -function affichermanuel() -{ - codeProfil = $("#codeProfil_C").val(); - - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - - switch(codeProfil) - { - case "AAA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_AGENT_AFRIK_ASSUR.pdf"; - break; - case "ADM": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ADMINISTRATEUR_SYSTEME.pdf"; - break; - case "ASS": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ASSURE.pdf"; - break; - case "CSO": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - break; - case "DIR": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_DIRECTION_AFRIK_ASSUR.pdf"; - break; - case "LAB": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_LABORATOIRES.pdf"; - break; - case "MEC": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_MEDECINS_CONSEIL.pdf"; - break; - case "PHA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_PHARMACIES.pdf"; - break; - } - window.open('Docs/'+cheminFichier, '_blank'); -} - -function ajaxListerequetesProfil() -{ - $("#listerequete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrequetesprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listerequete").html(data); - } - }); -} - -function compta() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - window.location.assign($("#racineWeb").val()+"Compta/"+idClient+"/"); -} - -function selectionner_client_pop(id,no,nom) -{ - $("#nocli").val(no); - $("#nomcli").val(nom); - selectionner_client(id,no); -} - -function controle_numerique(controle) -{ - if(isNaN(controle.value)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } - return true; -} - -function ajax_context_client(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - -function ajax_context_client_afficher(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Ficheclient/"); - } - }); -} - -function ajax_context_police(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - - -function ajax_context_police_afficher(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -/* 24/03/2019 -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/" - }); -} -*/ - -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/", - complete: function() - { - window.open('about:blank','_parent',''); - close(); - window.close(); - } - }); -} - - -function ajax_flexcode() -{ - // donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxflexcode/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#content").html(data); - }, - complete: function() { - // window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -function controle_champ_obligatoire(controle) -{ - if (controle.value<=" ") - { - v_msg="Valeur exigée!"; - v_msgEng="Value required!"; - alert_ebene(v_msg, v_msgEng); - controle.focus(); - return false; - } - return true; -} - -function exporter_liste_assures() -{ - $('#div_liste').html(''); - - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterlisteassure/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function imprimer_liste_assures() -{ - $('#div_liste').html(''); - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlisteassure/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_limites() -{ - $('#div_liste').html(''); - - var div_export = $('#div_export'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlimite/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function pop_tableau_prestation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtableauprestation/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_tableau_prestation").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function selectionner_tout_limite(p_idCollegeTemp, p_choix) -{ - donnees = 'idCollegeTemp='+p_idCollegeTemp; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionnertout/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college_simple(); - pop_afficher_selection_limite(p_idCollegeTemp); - } - }); -} - -function prestation_possible() -{ - enVigueur=$("#enVigueur_C").val(); - codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire=$("#etatbeneficiaire_C").val(); - college_couvert=$("#college_couvert_C").val(); - derogation_en_cours=$("#derogation_en_cours_C").val(); - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - - datejour = $("#datejour_C").val(); - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - dateEffetCouvert = $("#dateEffetCouvert").val(); - /* - if (dateEffetCouvert!="1") - { - v_msg="Attention! Non renouvelé"; - v_msgEng="Warning! Not renewed"; - alert_ebene(v_msg, v_msgEng); - return false; - } - */ - - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (college_couvert<1 && derogation_en_cours<1) - { - v_msg="Attention! Cette personne n\'a pas accès à ce centre"; - v_msgEng="Warning! This person does not have access to this center"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire = $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = new Date(datejour); - var td2 = new Date(dateEcheancePolice); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - // if (dt1>dt2) - if (dt1>dt2 || dt1"2000-01-01") - { - var tdd = new Date(dateSortieBeneficiaire); - dtd=Math.round(Date.parse(tdd)/(1000*3600*24)); - - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - } - - - dateDeces_C=$("#dateDeces_C").val(); - - if(dateDeces_C>"2000-01-01") - { - v_msg="Attention! personne décédée!"; - v_msgEng="Warning! Deceased!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - return true; -} - -function consultation() -{ - dateEffetCouvert = $("#dateEffetCouvert").val(); - - if (dateEffetCouvert!="1") - { - v_msg="Attention! Non renouvelé"; - v_msgEng="Warning! Not renewed"; - alert_ebene(v_msg, v_msgEng); - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - $("#btn_popdate_reelle").click(); - return; - } - - if (prestation_possible()) - { - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if(okId=="1" || okId_face=="1") - { - window.location.assign($("#racineWeb" ).val()+"Initconsultation/"); - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - window.location.assign($("#racineWeb" ).val()+"Initconsultation/"); - - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - // window.location.assign($("#racineWeb" ).val()+"Consultation/"); - window.location.assign($("#racineWeb" ).val()+"Initconsultation/"); - } -} - -function gestionbon() -{ - adminBon = $("#adminBon" ).val(); - - if (adminBon!="1") - { - v_msg="Accès refusé!"; - v_msgEng="Access denied!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - window.location.assign($("#racineWeb").val()+"Receptionbons/"); -} - -function afficherbon() -{ - codeTypeBon=$("#codeTypeBon").val(); - codeEtatBon=$("#codeEtatBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() - { - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : "+$("#nbligne_info").val()); - } - else - { - $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - - // $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - }); -} - -function demander_annulation_bon() -{ - var codeEtatBon = $("#codeEtatBon_C").val(); - var motifAnnulation = $("#motifAnnulation_C").val(); - var numeroBon = $("#numeroBon_C").val(); - var idBon = $("#idBon_C").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeEtatBon=="3") - { - v_msg="Anullé pour motif : "+motifAnnulation; - v_msgEng="Canceled for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBon=="4") - { - v_msg="Remplacé pour motif : "+motifAnnulation; - v_msgEng="Replaced for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeEtatBon=="9") - { - v_msg="Demande anullation pour motif : "+motifAnnulation; - v_msgEng="Cancellation request for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la demande d\'annulation du bon No "+numeroBon+"?"; - v_msgEng="Do you confirm the request for cancellation of the prescription No "+numeroBon+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - v_msg="Raison de l\'annulation?"; - v_msgEng="Reason for cancellation?"; - - motifAnnulation = prompt_ebene(v_msg, v_msgEng, motifAnnulation); - if (motifAnnulation<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - $("#motifAnnulation_C").val(motifAnnulation); - - donnees = 'idBon='+idBon+'&motifAnnulation='+motifAnnulation; - donnees_sav = 'idBon='+idBon+'&typeMail=maildemandeannulationbon'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/demanderAnnulationBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - - v_msg="Demande envoyée avec succès!"; - v_msgEng="Request sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficherbon(); - } - }); - } -} - -function enregistrer_commande_bon() -{ - codeTypeBon=$("#codeTypeBon").val(); - - if ($("#codeTypeBon").val()<" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - quantite =$("#quantite").val(); - - if (quantite<" ") - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - $("#quantite").focus(); - return; - } - - quantite = parseInt(quantite); - - if(quantite<1) - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - $("#quantite").focus(); - return; - } - - /* - commentaire=$("#commentaire").val(); - - if ($("#commentaire").val()<" ") - { - v_msg="Veuillez saisir une note!"; - v_msgEng="Please enter a note/comment!"; - alert_ebene(v_msg, v_msgEng); - $("#commentaire").focus(); - return; - } - */ - - var codehtml = ""; - - v_msg="Confirmez-vous cette commande?"; - v_msgEng="Do you confirm this order?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - prestataire = $("#prestataire_C").val(); - donnees = 'codeTypeBon='+codeTypeBon+'&quantite='+quantite; - donnees_sav = donnees+'&prestataire='+prestataire+'&typeMail=mailcommandebon'; - - lst_libelleBon = document.getElementById("codeTypeBon"); - libelleBon = lst_libelleBon.options[lst_libelleBon.selectedIndex].text.trim(); - typeSms = "commandebon"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcommanderbons/commanderBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - codehtml = data; - preparesms(typeSms); - }, - complete: function() { - mettremailattente(donnees_sav); - - v_msg="commande envoyée avec succès!"; - v_msgEng="Order sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_page_entiere").html(codehtml); - } - }); - } -} - -function receptionner_bon() -{ - nbligne_info=$("#nbligne_info").val(); - nbligne_info = parseInt(nbligne_info); - - if (nbligne_info==0) - { - v_msg="Veuillez actualiser la liste avant!"; - v_msgEng="Please refresh before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeTypeBon=$("#codeTypeBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistegenererbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - $("#nbligne").val("Nombre de lignes affichées : "+$("#nbligne_info").val()); - } - }); -} - - -function listerdemandebon() -{ - codeTypeBon=$("#codeTypeBon").val(); - d1=$("#d1").val(); - d2=$("#d2").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - donnees = 'codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2; - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistedemandebon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - } - }); -} - -function ajaxactespossibles() -{ - codeGestionBon = $("#codeGestionBon").val(); - - codeFamilleActe=$("#codeFamilleActe").val(); - codeTypePrestation=$("#codeTypePrestation").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - $("#numeroBon").val(""); - // $("#btn_enreg").disable(); - // $("#codeEtatBon").val(""); - $("#msgErreur").html(""); - - if (codeGestionBon=="0") - { - $("#btn_enreg").disable(); - $("#codeEtatBon").val(""); - } - } - }); -} - -function ajaxactespossibles_med() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - codeTypePrestation=$("#codeTypePrestation").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesmed/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - }, - complete: function() { - } - }); -} - -function ajaxinfosacte() -{ - if ($("#codeActe").val()<=" ") - { - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#montantacte").val( $("#montantacte_info").val()); - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - // calculer_Tm(); - } - }); -} - - -function ajaxprixacte() -{ - codeGestionBon = $("#codeGestionBon").val(); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - donnees = 'codeActe='+codeActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - - $("#numeroBon").val(""); - $("#codeRaisonConsultation").focus(); - $("#msgErreur").html(""); - - if (codeGestionBon=="0") - { - $("#btn_enreg").disable(); - $("#codeEtatBon").val(""); - } - }, - complete: function() { - } - }); -} - - -function ajaxbondisponible() -{ - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - - $("#numeroBon").val(""); - - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - - $("#numeroBon").val(""); - - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - $("#codeRaisonConsultation").focus(); - - $("#numeroBon").val(""); - - return; - } - - numeroBon = $("#numeroBon").val(); - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function ajaxinfosbonconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - $("#btn_pop_medecin").click(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#codeActe").focus(); - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#codeRaisonConsultation").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerconsultation() -{ - /* - dateSurvenance = $("#dateSurvenance").val(); - alert("dateSurvenance => "+dateSurvenance); - return; - */ - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - /* - delaiCarenceBeneficiaire = $("#delaiCarenceBeneficiaire").val(); - delaiCarenceBeneficiaire = parseInt(delaiCarenceBeneficiaire); - - if (delaiCarenceBeneficiaire>0) - { - if (anciennete"+delaiCarenceBeneficiaire); - // alert("appliquerDelaiCarence =>"+appliquerDelaiCarence); - // return; - - if (delaiCarenceBeneficiaire>0 && appliquerDelaiCarence=="1") - { - if (anciennete  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossiers/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function selectionner_feuille_maladie(no) -{ - $("#numeroFeuilleMaladie_C" ).val(no); -} - -function afficher_feuille_maladie() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - feuillemaladie(); - } - }); -} - - - -function enregistrerprescription() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - //$("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescription/enregistrerprescription/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - } - }); - } -} - -function ajaxinfosbonprescription() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - if (numeroBonOrdonnance>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function afficher_pop_recherche_medicament() -{ - nomsearch = $("#nomsearch").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - $("#div_listemedicament").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicaments/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament").html(data); - } - }); - } -} - -function ctrlkeypress(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament(); - } -} - -function selectionner_medicament_pop(codeMedicament, libelleMedicament) -{ - $("#codeMedicament_pop").val(codeMedicament); - $("#libelleMedicament_pop").val(libelleMedicament); -} - -function ajouter_medicament() -{ - codeMedicament = $("#codeMedicament_pop").val(); - libelleMedicament = $("#libelleMedicament_pop").val(); - - if (codeMedicament<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Prescrire : "+libelleMedicament+"?"; - v_msgEng="Prescribe : "+libelleMedicament+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeMedicament='+codeMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/ajoutermedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - prescription_medicament(); - }, - complete: function() { - } - }); - } -} - -function ajax_maj_qte_medicament(idMedicament, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - $("#medicaments").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function supprimer_medicament(idMedicament) -{ - v_msg="Confirmez-vous la suppression de ce médicament?"; - v_msgEng="Do you confirm the removal of this medicine/drug?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/supprimer/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - prescription_medicament(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function ajoutermedicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/ajoutermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ajoutermedicament_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - // raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function ajoutermedicament_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/ajoutermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function ajoutermedicament_pha_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - // raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirermedicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/retirermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirermedicament_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/retirermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirermedicament_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/retirermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirermedicament_pha_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/retirermedicamenttous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - // actualiser_pharmacien(); - } - }); -} - -function valider_pharmacie_cso() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à enregitrer! Confirmez-vous cette situation?"; - v_msgEng="Nothing to save! Do you confirm this situation?"; - } - else - { - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - } - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/enregistrerpharmacie/", - type: 'POST', - success: function(data) { - maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } -} - -function chercher_ordonnance(numeroBonOrdonnance) -{ - donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnance/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function chercher_ordonnance_opt(numeroBonOptique) -{ - if(numeroBonOptique<="0") - { - // actualiser_opticien(); - reinitialiser_opticien(); - return; - } - - donnees = 'numeroBonOptique='+numeroBonOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function chercher_ordonnance_lab(numeroBonExamen) -{ - donnees = 'numeroBonExamen='+numeroBonExamen; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressord(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonOrdonnance=$("#numeroBonOrdonnance").val(); - $("#numeroBonOrdonnance").blur(); - } -} - -function rechercherbonordonnance() -{ - numeroBonOrdonnance=$("#numeroBonOrdonnance").val(); - - if (numeroBonOrdonnance>" ") - { - chercher_ordonnance(numeroBonOrdonnance); - } -} - - -function ctrlkeypressordopt(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonOptique=$("#numeroBonOptique").val(); - $("#numeroBonOptique").blur(); - } -} - - -function ctrlkeypressordlab(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonExamen=$("#numeroBonExamen").val(); - $("#numeroBonExamen").blur(); - } -} - -function rechercherbonoptique() -{ - numeroBonOptique=$("#numeroBonOptique").val(); - - if (numeroBonOptique>" ") - { - chercher_ordonnance_opt(numeroBonOptique); - } -} - -function valider_presciption() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - if (numeroBonOrdonnance<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette ordonnance ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function ajaxchanger_type_bon() -{ - $("#msgErreur").html(""); -} - -function ajaxprixactemed() -{ - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter quantity!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantite").focus(); - - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixactemed/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function enregistreractemedical() -{ - acteExclu = $("#acteExclu").val(); - - autorisation = "0"; - - if(acteExclu==1) - { - autorisation = "2"; - - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - donnees="" - donnees_sav=""; - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - $("#nomMedecin").focus(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - prixTarif = $("#prixTarif").val(); - - if(prixActe==0 || parseFloat(prixActe)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - quantite = parseInt(quantite); - div_quantite.val(quantite); - - if(quantite==0) - { - div_quantite.focus(); - - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please neter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet acte?"; - v_msgEng="Do you confirm this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - prixActe = $("#prixActe").val(); - valeurActe = $("#valeurActe").val(); - - montantTm = $("#montantTm").val(); - aRembourser = $("#aRembourser").val(); - - ententePrealable = $("#ententePrealable").val(); - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&quantite='+quantite+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&valeurActe='+valeurActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/enregistreractemedical/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - feuillemaladie(); - } - }); - } -} - -function ajax_changer_qte_acte() -{ - codeActe = $("#codeActe").val(); - prixActe = $("#prixActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please neter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerqteacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_acte_medical(idPrestationactes, codeTypePrestation) -{ - v_msg="Confirmez-vous la suppression de cet acte?"; - v_msgEng="Do you confirm the removal of this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - feuillemaladie_ajax(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function supprimer_chambre(idChambre) -{ - v_msg="Confirmez-vous la suppression de cette chambre?"; - v_msgEng="Do you confirm the removal of this room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPrestationactes='+idChambre+'&codeTypePrestation=HOSP'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - attribution_chambre(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function ajaxinfosbonhospitalisation() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonHospitalisation = $("#numeroBonHospitalisation").val(); - numeroBonHospitalisation = parseInt(numeroBonHospitalisation); - if (numeroBonHospitalisation>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon Hospitalisation!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonhospitalisation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerhospitalisation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&numeroFeuilleMaladie='+numeroFeuilleMaladie; - donnees_sav = donnees+'&typeMail=mailhospitalisation'; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - typeSms="hospitalisation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerhospitalisation/enregistrerhospitalisation/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - - /* - mise en commentaire le 04/07/2019 - => pour les attributions automatiques, on ne connait - pas encore le No de bon - preparesms(typeSms); - */ - }, - complete: function() - { - /* - mise en commentaire le 04/07/2019 - => pour les attributions automatiques, on ne connait - pas encore le No de bon - mettremailattente(donnees_sav); - */ - - v_msg="Avis hospitalisation envoyé, souhaitez-vous ajouter une chambre?"; - v_msgEng="Hospitalization notice sent, would you like to add a room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - attribution_chambre(); - } - else - { - feuillemaladie(); - } - } - }); - } -} - -function ajaxprixchambre() -{ - $("#btn_enreg").disable(); - - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $("#infosacte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixchambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - - -function ajax_changer_duree_chambre() -{ - $("#btn_enreg").disable(); - - codeActe = $("#codeActe").val(); - prixActe = $("#prixActe").val(); - numeroChambre = $("#numeroChambre").val(); - - /* - alert("numeroChambre => "+numeroChambre); - return; - */ - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter duration!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - claculerfinchambre(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&numeroChambre='+numeroChambre; - - $("#infosacte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerdureechambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - - -function claculerfinchambre() -{ - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - div_quantite.val(""); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - var typdate = $("#debut").datepicker("getDate"); - typdate.setDate(typdate.getDate() + quantite -1); - - $( "#fin" ).datepicker( "setDate", typdate ); - - // contrôle du cheveauchement des dates - /* - var td1 = new Date($("#dateFinHospit").val()); - var td2 = $("#debut").datepicker("getDate"); - - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - $("#btn_enreg").disable(); - $("#debut").focus(); - - v_msg="Veuillez revoir vos dates!"; - v_msgEng="Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#btn_enreg").enable(); - */ -} - -function enregistrerchambre() -{ - acteExclu = $("#acteExclu").val(); - ententePrealable = $("#ententePrealable").val(); - - /* - alert('ententePrealable = '+ententePrealable); - return; - */ - - autorisation = "0"; - - if(acteExclu==1) - { - autorisation = "2"; - v_msg="Non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - codeActe = $("#codeActe").val(); - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un type de chambre!"; - v_msgEng="Please select a category of room!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - prixTarif = prixActe; - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - quantite = parseInt(quantite); - div_quantite.val(quantite); - - if(quantite==0) - { - div_quantite.focus(); - - v_msg="Veuillez saisir la durée!"; - v_msgEng="Please enter the duration!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // contrôle du cheveauchement des dates - - // mis en commentaire le 31/10/2018 BONA - /* - var td1 = new Date($("#dateFinHospit").val()); - var td2 = $("#debut").datepicker("getDate"); - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - $("#btn_enreg").disable(); - $("#debut").focus(); - - v_msg="Veuillez revoir vos dates!"; - v_msgEng="Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return; - } - // $("#btn_enreg").enable(); - */ - - numeroChambre = $("#numeroChambre").val(); - if (numeroChambre<=" ") - { - v_msg="Veuillez saisir le No de chambre!"; - v_msgEng="Please enter room number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroChambre").focus(); - return; - } - - v_msg="Confirmez-vous cette chambre?"; - v_msgEng="Do you confirm this room?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees="" - donnees_sav=""; - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - prixActe = $("#prixActe").val(); - valeurActe = $("#valeurActe").val(); - - montantTm = $("#montantTm").val(); - aRembourser = $("#aRembourser").val(); - - debut = $("#debut").val(); - // $("#fin").enable(); - fin = $("#fin").val(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&valeurActe='+valeurActe; - donnees += '&montantTm='+montantTm+'&aRembourser='+aRembourser+'&debut='+debut+'&fin='+fin +'&numeroChambre='+numeroChambre; - donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif; - donnees += '&ententePrealable='+ententePrealable; - - // alert("donnees => "+donnees); - // return; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $("#btn_enreg_chambre").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerchambre/enregistrerchambre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - v_msg="Enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - attribution_chambre(); - } - }); - } -} - -function actesmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Actesmedicaux/"); -} - -function optique() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - prescription_optique(); -} - -function pharmacien() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - - if (okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } -} - -function dossiers(okId) -{ - codeProfil = $("#codeProfil_C" ).val(); - - if(codeProfil=="PHA") - { - pharmacien(); - return; - } - - if(codeProfil=="OPT") - { - monture = $("#monture").val(); - - if(monture=="1") - { - window.location.assign($("#racineWeb" ).val()+"Monture/"); - return; - } - - opticien(); - return; - } - - if(codeProfil=="LAB") - { - laboratoire(); - return; - } - - if(codeProfil=="SEA") - { - seancekine(); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - } - - /* - else - { - // finger_id = $("#finger_id_C" ).val(); - finger_id = $("#okId" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - if(modeSaisieFacture=="1") - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - return; - } - - - if (prestation_possible()) - { - if (okId==1) - { - window.location.assign($("#racineWeb" ).val()+"Consultation/"); - return; - } - else - { - okId=$("#okId" ).val(); - } - - if (okId==1) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextidentification/", - type : 'post', - error: function(errorData) { - }, - complete: function() { - if (prestation_possible()) - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - } - } - }); - } - else - { - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); - } - } -} - -function afficher_beneficiaire_id_okId() -{ - idBeneficiaire=$("#idBeneficiaire_C").val(); - okId=$("#okId").val(); - okId_face=$("#okId_face").val(); - - if (idBeneficiaire>"") - { - ajax_context_beneficiaire_afficher(idBeneficiaire, okId, okId_face); - } -} - - -function ajax_context_beneficiaire_afficher(idBeneficiaire, okId, okId_face) -{ - donnees = 'idBeneficiaire='+idBeneficiaire+'&okId='+okId+'&okId_face='+okId_face; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/", - type : 'post', - data: donnees, - success: function(data) - { - $('#div_ok_face_info').html(data); - }, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - -function ajax_context_beneficiaire_afficher(idBeneficiaire, okId) -{ - donnees = 'idBeneficiaire='+idBeneficiaire+'&okId='+okId; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - -function facturer_cso(user_id) -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // verifier depasement - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite, souhaitez-vous continuer?"; - v_msgEng="Warning ! Overflow, Would you like to continue?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - } - // Fin verification depassement - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face").val("1"); - } - else - { - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailfacturationfeuillemaladie'; - - typeSms = "facturer_cso"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerfeuillemaladie/facturer/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - feuillemaladie(); - } - }); - -} - -function facturer_feuillemaladie() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numOrd = $("#numOrd").val(); - noPrescription = $("#noPrescription").val(); - - if (numOrd==0 && noPrescription==0) - { - v_msg="Attention, pas de presciption de médicaments!?"; - v_msgEng="Warning, no presciption of drugs!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - affectionObligatoire=$("#affectionObligatoire").val(); - codeAffection=$("#codeAffection").val(); - - if (affectionObligatoire=="1" && codeAffection<="0000") - { - v_msg="Diagnostique exigé!"; - v_msgEng="Diagnosis required!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleAffection").focus(); - $("#btn_pop_affection").click(); - - return; - } - - v_msg="Confirmez-vous la facturation?"; - v_msgEng="Do you confirm billing?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_cso(user_id_0); - return; - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id = $("#user_id_C").val(); - finger_id = $("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_pha() -{ - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - /* mis en commentaire le 31/07/2018 => permettre la multi-facturation - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailpharmacie'; - - typeSms = "facturer_pha"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrerpharmacie/", - type: 'POST', - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function valider_pharmacie_pha() -{ - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - estRempalace=$("#estRempalace").val(); - - if (estRempalace=="1") - { - v_msg="Remplacée!"; - v_msgEng="Replaced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroPrescription=$("#numeroPrescription_C").val(); - - if (numeroPrescription<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - /* mis en commentaire le 31/07/2018 => permettre la multi-facturation - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // if (idPrestationactes==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en pharmacie - /* - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_pha(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - - facturer_pha(); - } -} - -function valider_optique() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - nbVerres=$("#nbVerres").val(); - nbVerres = parseInt(nbVerres); - - if (nbVerres<1) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - numeroBonOptique=$("#numeroBonOptique").val(); - if (numeroBonOptique<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette ordonnance ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - feuillemaladie(); - }, - complete: function() { - } - }); - } -} - -function separateur_millier(montant) -{ - montant = parseInt(montant); - montant.toLocaleString(); - return montant.toLocaleString(); -} - -function ajaxinfosbonoptique() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonOptique = $("#numeroBonOptique").val(); - numeroBonOptique = parseInt(numeroBonOptique); - if (numeroBonOptique>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonoptique/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - - -function supprimer_optique(idOptique) -{ - v_msg="Confirmez-vous la suppression de ce verre?"; - v_msgEng="Do you confirm the removal of this glass?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerverre/supprimerverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#medicaments").html(data); - }, - error: function(data) { - }, - complete: function() { - prescription_optique(); - } - }); - } -} - - -function enregistreroptique() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreroptique/enregistreroptique/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_optique(); - } - }); - } -} - -function enregistrerverre() -{ - codeOptique = $("#codeOptique").val(); - if (codeOptique<=" ") - { - v_msg="Veuillez sélectionner un verre!"; - v_msgEng="Please select a glass!"; - alert_ebene(v_msg, v_msgEng); - $("#codeOptique").focus(); - return; - } - - v_msg="Confirmez-vous ces verres?"; - v_msgEng="Do you confirm these glasses?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'codeOptique='+codeOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerverre/enregistrerverre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - prescription_optique(); - }, - complete: function() { - } - }); - } -} - - -function valider_chambre() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette hospitalisation ?"; - v_msgEng="Do you confirm this hospitalization?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - - -function valider_opticien() -{ - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroOptique=$("#numeroOptique_C").val(); - - if (numeroOptique<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (idPrestationactes==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en magasin optique - /* - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_opt(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - facturer_opt(); - } -} - -function opticien() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - okId=$("#okId" ).val(); - $("#okId_face" ).val("1"); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } -} - - -function envoyer_alert_tentative_fraude(user_id) -{ - /* - donnees = 'user_id='+user_id; - - idBeneficiaire = $("#idBeneficiaire_C").val(); - prestataire = $("#prestataire_C").val(); - - donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=mailfraudeidentite'; - - mettremailattente(donnees_sav); - */ -} - - -function ajouterverre_opt_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverretous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function ajouterverre_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function retirerverre_opt_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverretous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirerverre_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverre/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function facturer_opt() -{ - idPrestationactes=$("#idPrestationactes").val(); - idPrestationactes = parseInt(idPrestationactes); - - if (idPrestationactes>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (idPrestationactes==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailoptique'; - - typeSms = "facturer_opt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/enregistreroptique/", - type: 'POST', - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } - }); - -} - -function afficher_detail_generartionbon(idgenerationbon) -{ - if (idgenerationbon>"") - { - window.location.assign($("#racineWeb" ).val()+"Detailgenerationbon/"+idgenerationbon+"/"); - } -} - - -function maj_monture_temp(idOptique, monture) -{ - donnees = 'idOptique='+idOptique+"&monture="+monture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/majmonture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function supprimer_espace_nombre(nombre) -{ - nombre = nombre.replace(" ", ""); - - if(isNaN(nombre)) - { - v_msg = nombre+" n'est pas un nombre!"; - v_msgEng = nombre+" is not a number!"; - alert_ebene(v_msg, v_msgEng); - return '0'; - } - nombre = parseInt(nombre); - return nombre; -} - -function demander_derogation() -{ - window.location.assign($("#racineWeb" ).val()+"Demandederogation/"); -} - -function enregistrerdemandederogation() -{ - codeDerogation = $("#codeDerogation").val(); - - lst_libelleDerogation = document.getElementById("codeDerogation"); - libelleDerogation = lst_libelleDerogation.options[lst_libelleDerogation.selectedIndex].text.trim(); - - college_couvert=$("#college_couvert_C").val(); - if (college_couvert>0 && codeDerogation=="01") - { - v_msg="Attention! Cette personne a déjà accès à ce centre"; - v_msgEng="Warning! This person all ready have access to this center"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if (codeDerogation<=" ") - { - v_msg="Veuillez sélectionner une dérogation!"; - v_msgEng="Please select an exemption!"; - alert_ebene(v_msg, v_msgEng); - $("#codeDerogation").focus(); - return; - } - - observations = $("#observations").val(); - if (observations<=" ") - { - v_msg="Veuillez saisir la motivation!"; - v_msgEng="Please select the motivation!"; - alert_ebene(v_msg, v_msgEng); - $("#observations").focus(); - return; - } - - v_msg="Confirmez-vous cette demande de dérogation?"; - v_msgEng="Do you confirm this request?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeDerogation='+codeDerogation+'&observations='+observations+'&libelleDerogation='+libelleDerogation; - - idBeneficiaire = $("#idBeneficiaire_C").val(); - prestataire = $("#prestataire_C").val(); - - - donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=maildemandederogation'; - - typeSms = "demandederogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandederogation/enregistrerdemandederogation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - preparesms(typeSms); - }, - complete: function() - { - mettremailattente(donnees_sav); - - v_msg="Demande envoyée avec succès!"; - v_msgEng="Request sent successfully!"; - alert_ebene(v_msg, v_msgEng); - - liste_derogation(); - } - }); - } -} - -function liste_derogation() -{ - window.location.assign($("#racineWeb" ).val()+"Listederogations/"); -} - -function listerderogation() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function afficher_div_wait() -{ - // $("#div_page_complet").disable(); - // $("#div_wait").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); -} - -function effacer_div_wait() -{ - $("#div_wait").html(""); -} - -function consultationpha() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationpha/"); -} - -function consultationlab() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationlab/"); -} - -function consultationopt() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationopt/"); -} - -function consultationcso() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationcso/"); -} - -function consultationbenpha() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenpha/"); -} - -function consultationbenopt() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenopt/"); -} - -function consultationbencso() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbencso/"); -} - -function listerdossiercons_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbencso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function listerdossiercons() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationcsoentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationcso/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function afficher_feuille_maladie_cons() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_feuillemaladie(); - } - }); -} - -function afficher_feuille_maladie_cons_ben() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_feuillemaladie_ben(); - } - }); -} - -function consulter_prescription_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Prescriptionconsben/"); -} - -function consulter_chambre_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Chambreconsben/"); -} - -function consulter_optique_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Optiqueconsben/"); -} - -function consulter_feuillemaladie_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladieconsben/"); -} - -function consulter_prescription() -{ - window.location.assign($("#racineWeb" ).val()+"Prescriptioncons/"); -} - -function consulter_chambre() -{ - window.location.assign($("#racineWeb" ).val()+"Chambrecons/"); -} - -function consulter_optique() -{ - window.location.assign($("#racineWeb" ).val()+"Optiquecons/"); -} - -function consulter_feuillemaladie() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/"); -} - -// - -function prescription_medicament() -{ - actVisible=$("#actVisible").val(); - modeSaisieFacture=$("#modeSaisieFacture").val(); - saisirFactureDecompte=$("#saisirFactureDecompte").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (modeSaisieFacture="1" && saisirFactureDecompte!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescription/"); -} - -function livraison_pharmacie() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance=$("#numeroBonOrdonnance_C").val(); - - if (numeroBonOrdonnance==0) - { - v_msg="Aucune prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Pharmacie/"); -} - -function prescription_optique() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - saisirFactureDecompte=$("#saisirFactureDecompte").val(); - - if (modeSaisieFacture="1" && saisirFactureDecompte!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Optique/"); -} - -function attribution_chambre() -{ - window.location.assign($("#racineWeb" ).val()+"Chambre/"); -} - -function feuillemaladie() -{ - window.location.assign($("#racineWeb" ).val()+"Feuillemaladie/"); -} - -function feuillemaladie_ajax() -{ - $("#div_feuillemaladie").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfeuillemaladie/", - type: 'POST', - success: function(data) { - $("#div_feuillemaladie").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function recherche() -{ - window.location.assign($("#racineWeb" ).val()+"Recherche/"); -} - -function requetes() -{ - codeProfil = $("#codeProfil_C" ).val(); - - if(codeProfil=="PHA") - { - consultationpha(); - return; - } - - if(codeProfil=="OPT") - { - consultationopt(); - return; - } - - if(codeProfil=="CSO") - { - consultationcso(); - return; - } - - if(codeProfil=="LAB") - { - consultationlab(); - return; - } - - if(codeProfil=="SEA") - { - consultationsea(); - return; - } -} - -// - -function lister_factures_pha_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenpha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function lister_factures_opt_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_pha_ben(idFacture, numeroBonOrdonnance, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_pha_ben(); - } - }); - } -} - -function afficher_facture_cons_pha(idFacture, numeroBonOrdonnance, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_pha(); - } - }); - } -} - -function consulter_facture_pha_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Pharmacienconsben/"); -} - -function consulter_facture_pha() -{ - window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/"); -} - -function afficher_facture_cons_opt_ben(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique; - donnees += '&codePrestataireLivraison='+codePrestataireLivraison; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfactureopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_opt_ben(); - } - }); - } -} - -function consulter_facture_opt_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Opticienconsben/"); -} - -function consultations() -{ - window.location.assign($("#racineWeb" ).val()+"Consultations/"); -} - - -function listerdossiercons_pha() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationphaentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationpha/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function listerdossiercons_opt() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationoptentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationopt/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_opt(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique; - donnees += '&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfactureopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_opt(); - } - }); - } -} - -function consulter_facture_opt() -{ - window.location.assign($("#racineWeb" ).val()+"Opticiencons/"); -} - -function liste_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Listedecomptes/"); -} - -function listerdecomptes() -{ - codeExercice = $("#codeExercice").val(); - // codeMois = $("#codeMois").val(); - codeEtatDecompte = $("#codeEtatDecompte").val(); - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - $("#codeExercice").focus(); - return; - } - - donnees = 'codeExercice='+codeExercice+'&codeEtatDecompte='+codeEtatDecompte; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistedecomptes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - } - }); -} - -function consulterdecompte(idReglement) -{ - donnees = 'idReglement='+idReglement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_decompte(); - } - }); -} - -function afficher_decompte() -{ - // $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - - -function sortirdexclusionstandards() -{ - idBeneficiaire = $("#idBeneficiaire_C").val(); - idAdherent_C = $("#idAdherent_C" ).val(); - - - if (idBeneficiaire>"0") - { - afficher_beneficiaire_id(); - } - if (idAdherent_C>"0") - { - afficher_adherent_id(); - } - else - { - recherche(); - } -} - -function exclusionstandards() -{ - window.location.assign($("#racineWeb" ).val()+"Exclusionstandards/"); -} - - -function envoimaildivers(datamail) -{ - // var url_mail = "http://testprestation.medicare.rw/Cron/Ajaxenvoimaildivers.php?"+datamail; - - lienMail = $("#lienMail_C").val(); - var url_mail = lienMail+"/Cron/Ajaxenvoimaildivers.php?"+datamail; - - $.ajax({ - url : url_mail, - type : "GET", - error : function(errorData) { - }, - success :function(data) - { - } - }); -} - -function mettremailattente(datamail) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmailattente/ajouter/", - type: 'POST', - data: datamail, - success: function(data) - { - }, - error: function(errorData) - { - }, - complete: function() - { - } - }); -} - - -function preparesms(typeSms) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - codeLangueSociete = $("#codeLangueSociete").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "1"; - - if (typeSms=="demandederogation") - { - p_destinataires = $("#smsDerogation_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Request for exemption : " : "Demande derogation pour : "; - p_message += libelleDerogation; - - } - - if (typeSms=="ententeprealable") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement" : "Alerte : Accord prealable"; - } - - if (typeSms=="hospitalisation") - { - p_destinataires = $("#smsMedecinConseil_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Hospit. form No : " : "No Bon Hospit. : "; - p_message += numeroBon; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Hospitalization notification" : "Avis Hospitalisation"; - } - - if (typeSms=="autorisation") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert : Request authorization for excluded act" : "Alerte : Demande autorisation pour acte exclu"; - } - - if (typeSms=="commandebon") - { - p_destinataires = $("#smsGestionBon_C").val(); - - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Order of claims form " : "Commande de bons de PEC"; - p_message += "\n"; - p_message += "Quantit. : "+quantite+" "; - p_message += "\n"; - p_message += "Type : "+libelleBon+"."; - } - - if (typeSms=="ententeprealablepha") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for pharmacy" : "Alerte : Accord prealable pharmacie"; - } - - if (typeSms=="accident") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Circulation accident" : "Alerte : Accident de la circulation"; - } - - if (typeSms=="ententeprealableopt") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for glasses" : "Alerte : Accord prealable verres"; - } - - if (typeSms=="ententeprealablemont") - { - p_destinataires = $("#smsAccordPrealable_C").val(); - - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - prestataire = $("#prestataire_C").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += (codeLangueSociete=="en_US") ? "Alert: Prior agreement for optical frames" : "Alerte : Accord prealable monture"; - } - - envoyersms(p_destinataires, p_message, creation_message); -} - - -function liste_ententeprealable() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/"); -} - -function liste_exclusions() -{ - window.location.assign($("#racineWeb" ).val()+"Listeexclusions/"); -} - -function alerter_depassement_limite() -{ - fraisExcluLivre=$("#fraisExcluLivre").val(); - fraisExcluLivre = parseInt(fraisExcluLivre); - - if (fraisExcluLivre>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function alerter_depassement_limite_cso() -{ - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function maj_fraisexclu_cso() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdepassementlimitefeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - $("#div_fraisExclu").html(data); - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function consommables() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facturerConsommable=$("#facturerConsommable").val(); - if (facturerConsommable!="1") - { - v_msg="Consommables non facturés!"; - v_msgEng="Consumables not invoiced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - ajoutConsommable = $("#ajoutConsommable").val(); - - if (ajoutConsommable!="1") - { - v_msg="Déjà inclu dans les actes ! Souhaitez-vous continuer?"; - v_msgEng="Already included in the acts ! Would you like to continue?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Consommables/"); - return; - } - else - { - return; - } - } - window.location.assign($("#racineWeb" ).val()+"Consommables/"); -} - - -function afficher_recherche_consommable() -{ - nomConsommable = $("#nomConsommable").val(); - - if (nomConsommable > " ") - { - donnees = "nomConsommable="+nomConsommable; - - $("#div_listeconsommable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listeconsommable").html(data); - } - }); - } -} - -function ajouter_consommable(idConsommable, libelleConsommable) -{ - if (libelleConsommable<=" ") - { - v_msg="Veuillez sélectionner un consommable!"; - v_msgEng="Please select a consumable!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Ajouter : "+libelleConsommable+"?"; - v_msgEng="Add : "+libelleConsommable+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idConsommable='+idConsommable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/ajouterconsommable/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - }, - complete: function() { - // afficher_consommable(); - feuillemaladie(); - } - }); - } -} - -function ajax_maj_qte_consommable(idConsommable, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idConsommable='+idConsommable+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function ctrlkeypressconsommable(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_recherche_consommable(); - } -} - -function afficher_consommable() -{ - $("#div_listeconsommable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherconsommables/", - error: function(errorData) { - }, - success: function(data) { - $("#div_listeconsommable").html(data); - $("#libelleconsommable").focus(); - } - }); -} - -function changer_type_bon() -{ - $("#nbligne_info").val("0"); - afficherbon_vide(); -} - -function afficher_pop_recherche_medecin() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecins/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - }, - complete: function() { - } - }); -} - - - -function afficher_pop_recherche_actes_possibles() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactespossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - - -function ctrlkeypress_medecin(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin(); - } -} - - -function ctrlkeypress_actes_cons(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_cons(); - } -} - - -function ctrlkeypress_actes_possibles(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_possibles(); - } -} - - -function selectionner_medecin(codeMedecin, nomMedecin, noOrdreMedecin) -{ - if(noOrdreMedecin+codeMedecin<=" ") - return; - - v_msg="Confirmez-vous ce Médecin : "+nomMedecin+"?"; - v_msgEng="Do you confirm this Doctor : "+nomMedecin+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - - if(codeMedecin=="ZZZZ") - { - $("#medecinManquant").readable(); - $("#codeSpecialiteManuel").enable(); - - } - else - { - $("#medecinManquant").unreadable(); - $("#codeSpecialiteManuel").disable(); - } - - $("#close_pop").click(); - } -} - -function maj_prix_actemedical() -{ - prixTarif = $("#prixTarif").val(); - prixNew = $("#prixNew").val(); - - if(prixNew==0 || parseFloat(prixNew)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixNew").focus(); - - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter quantity!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantite").focus(); - - return; - } - - ententePrealable = $("#ententePrealable").val(); - acteExclu = $("#acteExclu").val(); - acteChirurgie = $("#acteChirurgie").val(); - - donnees = 'prixNew='+prixNew+'&quantite='+quantite+'&prixTarif='+prixTarif; - donnees += '&ententePrealable='+ententePrealable+'&acteExclu='+acteExclu+'&acteChirurgie='+acteChirurgie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajprixactemed/", - type : 'post', - data : donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#btn_close_pop_tarif").click(); - } - }); -} - -function afficher_pop_tarif() -{ - prixActe = $("#prixActe").val(); - $("#prixNew").val(prixActe); - $("#btn_pop_tarif").click(); -} - -function demanderaccordacteexclu() -{ - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - -} - -function demanderaccordchambreexclu() -{ - - v_msg="Attention! Chambre exclue. Demander un accord?"; - v_msgEng="Warning! Non covered room. Request Agreement?"; - alert_ebene(v_msg, v_msgEng); - return; -} - -function substituer_medicament(idMedicament) -{ - v_msg="Substituer ce médicament?"; - v_msgEng="Substitute this drug?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsubstitutionmedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_substitution").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); - } -} - - -function annuler_substitution_medicament(idMedicament) -{ - v_msg="Annuler cette substitution?"; - v_msgEng="Cancel this substitution?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/annulersubstitutionmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -} - - -function enregistrersubstituion_medicament() -{ - idMedicament = $("#idMedicament").val(); - prixTarif = $("#prixTarif").val(); - prixSubstitut = $("#prixSubstitut").val(); - - if(prixSubstitut==0 || parseFloat(prixSubstitut)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette substitution ?"; - v_msgEng="Do you confirm this substitution?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idMedicament='+idMedicament+'&prixSubstitut='+prixSubstitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrersubstitutionmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#btn_close_pop").click(); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -} - -function selectionner_acte_cons(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - ajaxactespossibles(); - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeActe").val(codeActe); - ajaxprixacte(); - - $("#libelleActe").val(libelleActe); - $("#close_pop_acte").click(); - } -} - -function afficher_pop_recherche_actes_cons() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_cons").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactescons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_cons").html(data); - } - }); -} - -function selectionner_acte_possibles(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - // ajaxactespossibles(); - ajaxactespossibles_med(); - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#codeActe").val(codeActe); - ajaxprixactemed(); - - $("#libelleActe").val(libelleActe); - $("#close_pop_acte").click(); - } -} - -function ctrlkeypress_pha(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament_pha(); - } -} - -function afficher_pop_recherche_medicament_pha() -{ - nomsearch = $("#nomsearch").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - $("#div_listemedicament").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament").html(data); - } - }); - } -} - - -function prescrire_medicament_pha() -{ -// Ajout à la prescription - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - codeMedicament = $("#codeMedicament_pop").val(); - - - libelleMedicament = $("#libelleMedicament_pop").val(); - - if (codeMedicament<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'codeMedicament='+codeMedicament; - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // alert(donnees); - // return; - - v_msg="Prescrire : "+libelleMedicament+"?"; - v_msgEng="Prescribe : "+libelleMedicament+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamentprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_medicament").click(); - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - complete: function() { - alerter_depassement_limite(); - } - }); - } -// Fin Ajout à l aprescription -} - -function raffraichier_detail_prescription() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailordonnance/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#ordonnance").html(data); - }, - complete: function() { - } - }); -} - -function actualiser_pharmacien() -{ - /* modif du 15/11/2018 - // window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - actualiser_saisie_pharmacien(); - */ - - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); -} - -function ajax_maj_qte_medicament_pha(idMedicament, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majquantitepha/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function prescription_examen() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescriptionexamen/"); -} - -function valider_presciption_examens() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbExamens=$("#nbExamens").val(); - nbExamens = parseInt(nbExamens); - - /* On peut saisir juste le No de bon - sans saisir le détail de la prescription - - if (nbExamens<1) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - numeroBonExamen=$("#numeroBonExamen").val(); - if (numeroBonExamen<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - /* - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/", - url: $("#racineWeb").val()+"Ajaxenregistrerexamen/viderexamentemp/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - feuillemaladie(); - }, - complete: function() { - } - }); - */ - } -} - -function ajaxinfosbonprescriptionexamen() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonExamen = $("#numeroBonExamen").val(); - numeroBonExamen = parseInt(numeroBonExamen); - if (numeroBonExamen>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_examen(idExamen) -{ - v_msg="Confirmez-vous la suppression de cet examen?"; - v_msgEng="Do you confirm the removal of this exam?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/supprimer/", - type: 'POST', - data: donnees, - success: function(data) { - $("#examens").html(data); - }, - error: function(data) { - }, - complete: function() { - prescription_examen(); - } - }); - } -} - -function enregistrerprescriptionexamen() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionexamen/enregistrerprescriptionexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_examen(); - } - }); - } -} - -function ctrlkeypress_examens_possibles(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_examens_possibles(); - } -} - -function afficher_pop_recherche_examens_possibles() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteexamenspossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function ajouter_examen_possible(codeActe, libelleActe, acteExclu, ententePrealable) -{ - typeSms="ententeprealable"; - - if(libelleActeSearch<=" ") - { - return; - } - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - if (ententePrealable==1) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/ajouterexamen/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - if(ententePrealable==1) - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - // prescription_examen(); - - }, - complete: function() { - if(ententePrealable==1) - { - mettremailattente(donnees_sav); - } - - prescription_examen(); - - } - }); - } -} - -function ajax_maj_qte_examen(idExamen, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - $("#examens").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function examensmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen==0) - { - v_msg="Aucun examen prescrit!"; - v_msgEng="No prescribed exam!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/"); -} - - -function valider_examen_cso() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (nbLivre<1) - { - v_msg="Rien à enregitrer!"; - v_msgEng="Nothing to save!"; - - alert_ebene(v_msg, v_msgEng); - feuillemaladie(); - } - else - { - v_msg="Confirmez-vous ces examens?"; - v_msgEng="Do you confirm these exams?"; - } - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/enregistrerexamen/", - type: 'POST', - success: function(data) { - maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } -} - -function ajouterexamen_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite_cso(); - } - }); -} - -function ajouterexamen(idExamen, ententePrealable, codeActe) -{ - donnees = 'idExamen='+idExamen+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - typeSms="ententeprealable"; - - if (ententePrealable==9) - { - v_msg="Acte refusé!"; - v_msgEng="Act refused!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (ententePrealable==2) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - error: function(data) { - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - } - }); -} - -function retirerexamen_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function retirerexamen(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_limite_avant_facturation_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecons/"); - */ -} - -function consulter_limite_avant_facturation() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacture/"); - */ -} - - - -function consulter_limite_avant_facturation_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureconsben/"); - */ -} - -function consulter_limite_avant_facturation_pha() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturepha/"); - */ -} - -function consulter_limite_avant_facturation_pha_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephacons/"); - */ -} - -function consulter_limite_avant_facturation_pha_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephaconsben/"); - */ -} - -function actualiser_opticien() -{ - window.location.assign($("#racineWeb" ).val()+"Opticien/"); -} - -function reinitialiser_opticien() -{ - window.location.assign($("#racineWeb" ).val()+"Opticien/0"); -} - - -function consulter_limite_avant_facturation_opt() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureopt/"); - */ -} - -function consulter_limite_avant_facturation_opt_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptcons/"); - */ -} - -function consulter_limite_avant_facturation_opt_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptconsben/"); - */ -} - -function ajouterexamen_lab_tous() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function ajouterexamen_lab(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - - -function retirerexamen_lab(idExamen) -{ - donnees = 'idExamen='+idExamen; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function ctrlkeypress_examens_possibles_lab(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_examens_possibles_lab(); - } -} - -function afficher_pop_recherche_examens_possibles_lab() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteexamenspossibleslab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function consulter_limite_avant_facturation_lab() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelab/"); - */ -} - -function actualiser_laboratoire() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); -} - -function valider_examen_lab() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces actes?"; - v_msgEng="Do you confirm those acts?"; - // alert_ebene(v_msg, v_msgEng); - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function retirerexamen_lab_tous() -{ - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamentous/", - type: 'POST', - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - // actualiser_pharmacien(); - } - }); -} - -function facturer_lab(user_id) -{ - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo'; - - typeSms = "facturer_lab"; - - donnees_retour =""; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - } - }); -} - -function prescrire_examen_lab(codeActe, libelleActe, acteExclu, ententePrealable) -{ - typeSms="ententeprealable"; - - if(libelleActeSearch<=" ") - { - return; - } - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cet acte : "+libelleActe+"?"; - v_msgEng="Do you confirm this act : "+libelleActe+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable; - - if (ententePrealable==1) - { - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamenprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_acte").click(); - $("#livraison").html(data); - - if(ententePrealable==1) - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() { - if(ententePrealable==1) - { - mettremailattente(donnees_sav); - } - alerter_depassement_limite(); - } - }); - } -} - -function enregistrer_nv_consommables() -{ - libelleconsommable = $("#libelleconsommable").val(); - - if (libelleconsommable<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter tyhe name!"; - alert_ebene(v_msg, v_msgEng); - $("#libelleconsommable").focus(); - return; - } - - quantiteconsommable=$("#quantiteconsommable").val(); - quantiteconsommable=quantiteconsommable.replace(",","."); - $("#quantiteconsommable").val(quantiteconsommable); - - if(isNaN(quantiteconsommable)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#quantiteconsommable").val("0"); - $("#quantiteconsommable").focus(); - return; - } - - if(quantiteconsommable==0) - { - $("#quantiteconsommable").focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - prixconsommable=$("#prixconsommable").val(); - prixconsommable=prixconsommable.replace(",","."); - $("#prixconsommable").val(prixconsommable); - - if(isNaN(prixconsommable)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixconsommable").val("0"); - $("#prixconsommable").focus(); - return; - } - - if(prixconsommable==0) - { - $("#prixconsommable").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - donnees = 'libelleconsommable='+libelleconsommable+'&prixconsommable='+prixconsommable+'&quantiteconsommable='+quantiteconsommable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/creerconsommable/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); -} - -function ajax_maj_prix_consommable(idConsommable, valeurActe, controle) -{ - valeurActe=valeurActe.replace(",","."); - controle.value=valeurActe; - - if(controle_numerique(controle)) - { - if(valeurActe==0) - { - controle.focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idConsommable='+idConsommable+"&valeurActe="+valeurActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/majprix/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function remplacer_feuillemaladie() -{ - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Remplacerfeuille/"); -} - -function ajaxinfosremplacerbonconsultation() -{ - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerremplacementconsultation() -{ - numeroBonSave = $("#numeroBonSave").val(); - - motifremplacement = $("#motifremplacement").val(); - - if (motifremplacement<=" ") - { - v_msg="Veuillez saisir le otif du remplacement!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifremplacement").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - OldnumeroBon = $("#OldnumeroBon").val(); - - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement; - - // donnees += '&dateSurvenance='+dateSurvenance+'&observations='+observations+'&prixActe='+prixActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/enregistrerremplacementconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - v_msg="Feuille remplacée avec succès!"; - v_msgEng="Replaced successfully!"; - alert_ebene(v_msg, v_msgEng); - - feuillemaladie(); - } - }); - } -} - -function remplacer_ordonnance() -{ - bonCaduc=$("#bonCaduc").val(); - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturé, vous pouvez modifier l\'ordonnance!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonOrdonnance = $("#numeroBonOrdonnance").val(); - numeroBonOrdonnance = parseInt(numeroBonOrdonnance); - - /* - if (numeroBonOrdonnance<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - fiche_remplacer_ordonnance(); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#remplacerordonnance").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&remplacerordonnance=1"; - - load("flexcode/user.php?"+data); - } -} - -function fiche_remplacer_ordonnance() -{ - window.location.assign($("#racineWeb" ).val()+"Remplacerordonnance/"); -} - -function ajaxinfosremplacerordonnance() -{ - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerremplacementordonnance() -{ - numeroBonSave = $("#numeroBonSave").val(); - - motifremplacement = $("#motifremplacement").val(); - - if (motifremplacement<=" ") - { - v_msg="Veuillez saisir le otif du remplacement!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - $("#motifremplacement").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - OldnumeroBon = $("#OldnumeroBon").val(); - - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/enregistrerremplacementordonnance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - v_msg="Ordonnance remplacée avec succès!"; - v_msgEng="Replaced successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_medicament(); - } - }); - } -} - -function afficher_laboratoire_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoirecso/"); -} - - -function afficher_seance_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Kinecso/"); -} - -function consulter_limite_avant_facturation_lab_cso() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcso/"); - */ -} - -function rechercherbonexamen_lab() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab(numeroBonExamen); - } -} - -function rechercherbonexamen_lab_cso() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab_cso(numeroBonExamen); - } -} - -function chercher_ordonnance_lab_cso(numeroBonExamen) -{ - donnees = 'numeroBonExamen='+numeroBonExamen; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_laboratoire_cso(); - } - }); -} - -function valider_examen_lab_cso() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroExamen=$("#numeroExamen_C").val(); - - if (numeroExamen<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - // alert("nbLivre => "+nbLivre); - // return; - - // if (facture==0 && nbLivre<1) - if (nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces actes?"; - v_msgEng="Do you confirm those acts?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_lab_cso(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id = $("#user_id_C").val(); - finger_id = $("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_lab_cso(user_id) -{ - facture=$("#facture").val(); - facture = parseInt(facture); - - if (facture>0) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbLivre=$("#nbLivre").val(); - nbLivre = parseInt(nbLivre); - - if (facture==0 && nbLivre<1) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo'; - - typeSms = "facturer_lab"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/", - type: 'POST', - data: donnees_substitut, - success: function(data) { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_laboratoire_cso(); - - } - }); -} - -function prescription_seance() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Prescriptionseance/"); -} - - -function seances() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroPrescriptionKine=$("#numeroPrescriptionKine_C").val(); - - if (numeroPrescriptionKine==0) - { - v_msg="Aucune séance prescrite!"; - v_msgEng="No prescribed session!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Seances/"); -} - -function ajaxinfosbonprescriptionseance() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBonKine = $("#numeroBonKine").val(); - numeroBonKine = parseInt(numeroBonKine); - if (numeroBonKine>0) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeMedecin = $("#codeMedecin").val(); - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").val(""); - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerprescriptionseance() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsOrd = $("#nbBonsOrd").val(); - - numeroBonSave = $("#numeroBonSave").val(); - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - if (codeGestionBon=="0") - { - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - } - else - { - numeroBon = "-1"; - v_msg="Confirmez-vous cette prescription?"; - v_msgEng="Do you confirm this prescription?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of prescription?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $("#btn_enreg").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/enregistrerprescriptionseance/", - type : 'post', - data: donnees, - error: function(errorData) { - // $("#msgErreur").html(errorData); - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_seance(); - } - }); - } -} - -function modifierprescriptionseance() -{ - acteExclu = $("#acteExclu").val(); - ententePrealable = $("#ententePrealableSea").val(); - autorisation = "0"; - - if(acteExclu==1) - { - v_msg="Acte non couvert!"; - v_msgEng="Not covered!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeMedecin").focus(); - $("#nomMedecin").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - $("#numeroBon").focus(); - return; - } - - codeActePrescription = $("#codeActe").val(); - - if (codeActePrescription<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - // $("#codeActePrescription").focus(); - return; - } - - quantite =$("#quantite").val(); - - quantite = parseInt(quantite); - - if(quantite<1) - { - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - // $("#quantite").focus(); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - /* - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - montantTm =$("#montantTm").val(); - montantArembourser =$("#aRembourser").val(); - fraisReel =$("#totalActe").val(); - - donnees = 'codeActePrescription='+codeActePrescription +'&quantite='+quantite +'&prixActe='+prixActe; - donnees += '&montantTm='+montantTm +'&montantArembourser='+montantArembourser +'&fraisReel='+fraisReel; - donnees += '&ententePrealable='+ententePrealable; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActePrescription+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - donnees_sav2 = 'codeActe='+codeActePrescription+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - typeSms2="autorisation"; - - $("#btn_enreg_seance").disable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/modifierprescriptionseance/", - type : 'post', - data: donnees, - error: function(errorData) { - $("#msgErreur").html(errorData); - }, - success: function(data) { - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - } - - if(autorisation=="2") - { - preparesms(typeSms2); - - v_msg="Demande autorisation envoyée!"; - v_msgEng="Request for authorization sent!"; - alert_ebene(v_msg, v_msgEng); - } - }, - complete: function() - { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - - if(autorisation=="2") - { - mettremailattente(donnees_sav2); - } - - v_msg="Prescription enregistrée avec succès"; - v_msgEng="Saved successfully!"; - alert_ebene(v_msg, v_msgEng); - - prescription_seance(); - } - }); - } -} - -function ajaxprixseance() -{ - $("#prixActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - // $("#quantite_info").val("0"); - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantite"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // on va griser le bouton btn_enreg_seance - $("#btn_enreg_seance").disable(); - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixseance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -function valider_presciption_seances() -{ - bonCaduc=$("#bonCaduc").val(); - // alert("bonCaduc => "+bonCaduc); - // return; - - if (bonCaduc==1) - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonKine=$("#numeroBonKine").val(); - if (numeroBonKine<=0) - { - v_msg="Pas de prescription!"; - v_msgEng="No prescription!"; - alert_ebene(v_msg, v_msgEng); - - // feuillemaladie(); - return; - } - - codeActePrescription = $("#codeActePrescription").val(); - - if (codeActePrescription<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_prescrire").click(); - - return; - } - - nbSeance=$("#nbSeance").val(); - nbSeance = parseInt(nbSeance); - - if (nbSeance<1) - { - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_prescrire").click(); - - return; - } - - v_msg="Confirmez-vous cette presciption ?"; - v_msgEng="Do you confirm this prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function valider_seance_cso() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Veuillez sélectionner un bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_InitSession").click(); - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - // div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm these sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees = 'codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailseance/enregistrerseance/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - - maj_fraisexclu_cso(); - }, - error: function(data) - { - }, - complete: function() - { - feuillemaladie(); - } - }); - } -} - -function actualiser_seance() -{ - window.location.assign($("#racineWeb" ).val()+"Seances/"); -} - -// SEANCES KINE -function valider_seance_sea_cso() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - quantiteSeance=$("#quantiteSeance").val(); - - if (quantiteSeance<=0) - { - v_msg="Veuillez revoir la quantité!"; - v_msgEng="Please review the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - fraisRetenuSeance=$("#fraisRetenuSeance").val(); - - if (fraisRetenuSeance<=0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm those sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea_cso(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea_cso(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_sea_cso(user_id) -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - cout = $("#cout").val(); - - if (cout==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine'; - - typeSms = "facturer_sea"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - // donnees += '&codeGestionBon='+codeGestionBon; - donnees_substitut += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/", - type: 'POST', - data: donnees_substitut, - success: function(data) - { - // $('#div_test_gabarit').html(data); - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_seance_cso(); - } - }); - -} - -function rechercherbonkine_sea() -{ - numeroBonKine=$("#numeroBonKine").val(); - - if (numeroBonKine>" ") - { - chercher_ordonnance_sea(numeroBonKine); - } -} - -function chercher_ordonnance_sea(numeroBonKine) -{ - $("#numeroBonSeance_C").val("-1"); - donnees = 'numeroBonKine='+numeroBonKine; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Kine/"); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressordsea(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - numeroBonKine=$("#numeroBonKine").val(); - $("#numeroBonKine").blur(); - } -} - -function rechercherbonkine_sea_cso() -{ - numeroBonKine=$("#numeroBonKine").val(); - - if (numeroBonKine>" ") - { - chercher_ordonnance_sea_cso(numeroBonKine); - } -} - -function chercher_ordonnance_sea_cso(numeroBonKine) -{ - $("#numeroBonSeance_C").val("-1"); - donnees = 'numeroBonKine='+numeroBonKine; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/", - type: 'POST', - data: donnees, - success: function(data) { - window.location.assign($("#racineWeb" ).val()+"Kinecso/"); - }, - error: function(data) { - }, - complete: function() { - } - }); - -} - - -function ajaxinfosbonseancekine() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg_bon_kine").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerbonsseancekine() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - if (codeGestionBon=="0") - { - numeroBonSave = $("#numeroBonSave").val(); - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - } - else - { - // numeroBon = "-1"; - numeroBon = "1"; - v_msg="Confirmez-vous ce dossier?"; - v_msgEng="Do you confirm this claim?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = "numeroBon="+numeroBon; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/attributionbontemporaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - afficher_facturation_seance(); - } - }); - } -} - - -function afficher_facturation_seance() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_session").click(); - $("#div_facturation_seance").html(data); - }, - complete: function(data) { - $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val()); - } - }); -} - -function ajaxprixseancesea() -{ - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - $("#prixActe_info").val("0"); - $("#totalActe_info").val("0"); - $("#montantTm_info").val("0"); - $("#aRembourser_info").val("0"); - - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.val(1); - - quantite = 1; - /* - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - */ - } - - div_nbRestant = $("#nbRestant"); - nbRestant = div_nbRestant.val(); - nbRestant = parseInt(nbRestant); - - if(quantite>nbRestant) - { - // div_quantite.focus(); - v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!"; - v_msgEng="Only "+nbRestant+" sessions are possible!"; - alert_ebene(v_msg, v_msgEng); - - // return; - quantite = 0; - } - - donnees = 'codeActe='+codeActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprixseancesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - } - }); -} - -// Facturation SEANCE KINE - -function valider_seance_sea() -{ - ententePrealableSea=$("#ententePrealableSea").val(); - - if (ententePrealableSea>1) - { - v_msg="Entente préalable!"; - v_msgEng="Prior agreement!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroBonSeance=$("#numeroBonSeance_C").val(); - - if (numeroBonSeance<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeActe = $("#codeActe").val(); - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un act!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - fraisRetenuSeance=$("#fraisRetenuSeance").val(); - - if (fraisRetenuSeance<=0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces séances?"; - v_msgEng="Do you confirm those sessions?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_sea(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - } -} - -function facturer_sea(user_id) -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - cout = $("#cout").val(); - - if (cout==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - prixActe = $("#prixActe").val(); - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - - numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine'; - - typeSms = "facturer_sea"; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees_substitut = 'user_id_substitut='+user_id_substitut; - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees_substitut += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/", - type: 'POST', - data: donnees_substitut, - success: function(data) - { - preparesms_adherent(typeSms); - }, - error: function(data) { - }, - complete: function() - { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - // window.location.assign($("#racineWeb" ).val()+"Kine/"); - afficher_seance_kine(); - } - }); -} - -/* -function rechercherbonexamen_lab_cso() -{ - numeroBonExamen=$("#numeroBonExamen").val(); - - if (numeroBonExamen>" ") - { - chercher_ordonnance_lab_cso(numeroBonExamen); - } -} -*/ - -// 19/11/2017 - -function enregistrerbonsseancekinecso() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - - codeGestionBon = $("#codeGestionBon").val(); - nbBonsCons = $("#nbBonsCons").val(); - - if (codeGestionBon=="0") - { - numeroBonSave = $("#numeroBonSave").val(); - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - codeEtatBon = $("#codeEtatBon").val(); - - if (codeEtatBon!="1") - { - v_msg="Veuillez saisir un No de bon disponible!"; - v_msgEng="Please enter a prescription number available!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - if(numeroBonSave!=numeroBon) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - } - else - { - // numeroBon = "-1"; - numeroBon = "1"; - v_msg="Confirmez-vous ce dossier?"; - v_msgEng="Do you confirm this claim?"; - } - - /* - v_msg="Confirmez-vous ce No de bon?"; - v_msgEng="Do you confirm this number of presciption?"; - */ - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "numeroBon="+numeroBon; - - // ajout du 27/06/2019 => prise en compte de la gestion paperless - donnees += '&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/attributionbontemporaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - afficher_facturation_seance_cso(); - } - }); - } -} - - -function afficher_facturation_seance_cso() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/", - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_session").click(); - $("#div_facturation_seance").html(data); - }, - complete: function(data) { - $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val()); - } - }); -} - - -function ajaxinfosbonseancekinecso() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg_bon_kine").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function ajaxmajquteseancecso() -{ - div_prix = $("#prixActe"); - prixActe = div_prix.val(); - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_quantite = $("#quantiteSeance"); - quantite = div_quantite.val(); - - if(quantite=="") - { - quantite = "0"; - } - - div_quantite.val(quantite); - - quantite = parseInt(quantite); - - if(quantite==0) - { - div_quantite.focus(); - v_msg="Veuillez saisir le nombre de séances!"; - v_msgEng="Please enter the number of sessions!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - div_nbRestant = $("#nbRestant"); - nbRestant = div_nbRestant.val(); - nbRestant = parseInt(nbRestant); - - if(quantite>nbRestant) - { - div_quantite.focus(); - v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!"; - v_msgEng="Only "+nbRestant+" sessions are possible!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#btn_enreg_seance").disable(); - - donnees = 'prixActe='+prixActe+'&quantite='+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/modifierseancecso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $("#infoseance").html(data); - }, - complete: function() { - afficher_facturation_seance_cso(); - } - }); -} - - - -function consulter_limite_avant_facturation_kinecso(idFacture) -{ - /* - if (idFacture<=0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekinecso/"+idFacture+"/"); - */ -} - - -function consulter_limite_avant_facturation_kine(idFacture) -{ - /* - if (idFacture<=0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekine/"+idFacture+"/"); - */ -} - -function afficher_seance_kine() -{ - window.location.assign($("#racineWeb" ).val()+"Kine/"); -} - -// consulatation_ben - -function consultationbenlab() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbenlab/"); -} - -function consultationbensea() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationbensea/"); -} - -function laboratoire() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && (okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Laboratoire/"); - } -} - - -function seancekine() -{ - if (prestation_possible()) - { - /* mis en commentaire le 28/11/2017 - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - if (okId!=1 && okId!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - */ - - window.location.assign($("#racineWeb" ).val()+"Kine/"); - } -} - -function afficher_facture_cons_lab(idFacture, numeroBonExamen, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturelab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_lab(); - } - }); - } -} - -function consulter_facture_lab() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoirecons/"); -} - -function consulter_limite_avant_facturation_lab_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcons/"); - */ -} - -function afficher_facture_cons_lab_ben(idFacture, numeroBonExamen, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturelab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_lab_ben(); - } - }); - } -} - -function consulter_facture_lab_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Laboratoireconsben/"); -} - -function consulter_limite_avant_facturation_lab_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabconsben/"); - */ -} - -function listerdossiercons_lab() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationlabentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationlab/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function lister_factures_lab_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationbenlab/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function consultationsea() -{ - window.location.assign($("#racineWeb" ).val()+"Consultationsea/"); -} - -function listerdossiercons_sea() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - donnees_sav = donnees; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationseaentete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement").html(data); - }, - complete: function() { - } - }); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultationsea/", - type : 'post', - data: donnees_sav, - error: function(errorData) { - }, - success: function(data) { - $("#detail_reglement").html(data); - $("#detail_reglement").css("padding-top", "0px"); - }, - complete: function() { - } - }); -} - -function consulter_facture_sea() -{ - window.location.assign($("#racineWeb" ).val()+"Kinecons/"); -} - -function consulter_limite_avant_facturation_sea_cons() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseacons/"); - */ -} - -function lister_factures_sea_ben() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxconsultationbenlab/", - url: $("#racineWeb").val()+"Ajaxconsultationbensea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_facture_cons_sea(idFacture, numeroBonKine, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_sea(); - } - }); - } -} - - -function afficher_facture_cons_sea_ben(idFacture, numeroBonKine, codePrestataireLivraison) -{ - if (idFacture>"") - { - donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacturesea/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - consulter_facture_sea_ben(); - } - }); - } -} - -function consulter_facture_sea_ben() -{ - window.location.assign($("#racineWeb" ).val()+"Kineconsben/"); -} - -function consulter_limite_avant_facturation_sea_cons_ben() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseaconsben/"); - */ -} - -function ctrlkeypress_numeroBon(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroBon").blur(); - } -} - -function verifier_feuille_maladie_dec_cons(numeroFeuilleMaladie, idFacture) -{ - $("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie); - numeroDecompte = $("#numeroDecompte").val(); - - // if (numeroFeuilleMaladie>"") - if (idFacture>"") - { - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture; - - codeTypePrestataire = $("#codeTypePrestataire_C").val(); - - if(codeTypePrestataire=="CSO" || codeTypePrestataire=="LAB" || codeTypePrestataire=="SEA") - { - - verifier_feuille_maladie_dec_cso_cons(donnees); - } - else - if(codeTypePrestataire=="PHA") - { - verifier_feuille_maladie_dec_pha_cons(donnees); - } - else - if(codeTypePrestataire=="OPT") - { - verifier_feuille_maladie_dec_opt_cons(donnees); - } - } -} - - -function imprimerbordereaudecompte() -{ - idReglement = $("#idReglement").val(); - - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerbordereaudecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function verifier_feuille_maladie_dec_cso_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturecons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_pha_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturephacons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_opt_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfactureoptcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function limite_avant_facture_dec(idFacture) -{ - donnees = 'idFacture='+idFacture; - $.ajax({ - url: $("#racineWeb").val()+"AjaxPlafondavantfacturecdec/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_limites").html(data); - }, - complete: function() { - } - }); -} - -function demander_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Initdemandedecompte/"); -} - -function initierdemandedecompte() -{ - codeExercice=$("#codeExercice").val(); - codeMois=$("#codeMois").val(); - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice").focus(); - - return; - } - - if (codeMois<=" ") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois").focus(); - return; - } - - donnees = 'codeExercice='+codeExercice+'&codeMois='+codeMois; - - // $("#div_dossiers").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdemandedecompte/initierdemandedecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#inforegle").html(data); - }, - complete: function() { - regle=$("#regle").val(); - - if(regle==-1) - { - v_msg="Problème lors de l\'initialisation!"; - v_msgEng="Problem during initialization!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - else - { - afficher_demande_decompte(); - } - } - }); -} - -function afficher_demande_decompte() -{ - $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - window.location.assign($("#racineWeb" ).val()+"Demandedecompte/"); -} - - -function imprimerbordereaudemandedecompte() -{ - idDemandeDecompte = $("#idDemandeDecompte").val(); - - if (idDemandeDecompte>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandedecompte/imprimerdemandecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function rechargerdemandedecompte() -{ - $("#detail_demande_decompte").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdemandedecompte/rechargerdemandedecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - afficher_demande_decompte(); - }, - complete: function() { - } - }); -} - -function actualiser_decompte() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - -function monture() -{ - $("#monture").val("1"); - - if (prestation_possible()) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - - /* MAJ du 06/06/2019 => proposition de Pascal => les magasins d'optique n'ont pas de lecteurs d'empriente - modeSaisieFacture=$("#modeSaisieFacture").val(); - if(modeSaisieFacture=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - } - else - { - finger_id = $("#finger_id_C" ).val(); - - if (finger_id==0) - { - v_msg="Veuillez procéder à l\'enrôlement avant!"; - v_msgEng="Please enroll before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - okId=$("#okId" ).val(); - okId_face=$("#okId_face" ).val(); - - if (okId!=1 && okId_face!=1) - { - v_msg="Veuillez procéder à l\'identification avant!"; - v_msgEng="Please check identity before!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - - window.location.assign($("#racineWeb" ).val()+"Monture/"); - */ - } -} - -function actualiser_monture() -{ - window.location.assign($("#racineWeb" ).val()+"Monture/"); -} - -function valider_monture() -{ - dejaFacture=$("#dejaFacture").val(); - - // alert("dejaFacture =>" +dejaFacture); - // return; - - if (dejaFacture=="1") - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - ententePrealableMont=$("#ententePrealableMont").val(); - - nbActesMonture=$("#nbActesMonture").val(); - - if (nbActesMonture>0 && ententePrealableMont!=1) - { - /* - v_msg="Montures déjà livrées une fois!"; - v_msgEng="Frames already delivered once!"; - */ - v_msg="Veuillez demander une autorisation!"; - v_msgEng="Please ask for an authorization!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroFacture=$("#numeroFacture").val(); - - if (numeroFacture<=" ") - { - v_msg="Veuillez saisir le No de la facture!"; - v_msgEng="Please enter the Invoice No!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroFacture").focus(); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette livraison?"; - v_msgEng="Do you confirm this delivery?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - user_id_0 = $("#user_id_C").val(); - - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - facturer_monture(user_id_0); - - /* MAJ du 06/06/2019 => proposition de Pascal => les magasins d'optique n'ont pas de lecteurs d'empriente - modeSaisieFacture=$("#modeSaisieFacture").val(); - derogationFingerFacturation=$("#derogationFingerFacturation").val(); - if(modeSaisieFacture=="1" || derogationFingerFacturation=="1") - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_monture(user_id_0); - return; - } - - derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val(); - if(derogation_finger_en_cours>0) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - facturer_monture(user_id_0); - } - else - { - beneficiaire = $("#beneficiaire_C").val(); - user_id =$("#user_id_C").val(); - finger_id =$("#finger_id_C").val(); - - $("#facturation").val("1"); - - data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1"; - - load("flexcode/user.php?"+data); - } - */ - } -} - -function maj_monture_temp_monture(idOptique, monture) -{ - numeroFacture=$("#numeroFacture").val(); - - donnees = 'idOptique='+idOptique+"&monture="+monture+"&numeroFacture="+numeroFacture; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/majmonture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_monture").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function facturer_monture(user_id) -{ - dejaFacture=$("#dejaFacture").val(); - - if (dejaFacture=="1") - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numeroFacture=$("#numeroFacture").val(); - - if (numeroFacture<=" ") - { - v_msg="Veuillez saisir le No de la facture!"; - v_msgEng="Please enter the Invoice No!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroFacture").focus(); - - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montantTm = $("#montantTm").val(); - cout = $("#cout").val(); - - montantTm_f = $("#montantTm_f").val(); - cout_f = $("#cout_f").val(); - - donnees = 'prixActe='+prixActe; - donnees += '&montantTm='+montantTm; - donnees += '&cout='+cout; - donnees += '&numeroFacture='+numeroFacture; - - - // numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); - codePrestataire = $("#codePrestataire_C").val(); - - donnees_sav = 'codePrestataire='+codePrestataire+'&typeMail=mailoptique'; - - typeSms = "facturer_mont"; - - donnees_retour =""; - - user_id_0 = $("#user_id_C").val(); - user_id_substitut = "0"; - if (user_id_0!=user_id) - { - user_id_substitut = user_id; - } - - donnees += '&user_id_substitut='+user_id_substitut; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/enregistrermonture/", - type: 'POST', - data: donnees, - success: function(data) - { - donnees_retour = data; - preparesms_adherent(typeSms); - }, - error: function(data) - { - - }, - complete: function() { - preparemail_adherent(typeSms); - - v_msg="Facturation effectuée avec succès!"; - v_msgEng="Billing done successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_monture").html(donnees_retour); - // window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - } - }); -} - - -function requetes_prestaire() -{ - window.location.assign($("#racineWeb" ).val()+"Requetes/"); -} - -function ajaxenteterequete() -{ - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - donnees = 'codeRequete='+codeRequete; - - v_url = $("#racineWeb").val()+"Ajaxrequeteentete"+codeRequete+"/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function requetes_feuilles_maladie() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateConsultation1 = $("#dateConsultation1").val(); - dateConsultation2 = $("#dateConsultation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val(); - numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - // Ligne 3 - codeTypePrestataire = $("#codeTypePrestataire").val(); - numeroDecompte1 = $("#numeroDecompte1").val(); - numeroDecompte2 = $("#numeroDecompte2").val(); - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - hospitalisation = $("#hospitalisation").val(); - numeroChambre = $("#numeroChambre").val(); - chirurgie = $("#chirurgie").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1); - numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateConsultation1=' + dateConsultation1; - donnees += '&dateConsultation2=' + dateConsultation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1; - donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - // Ligne 3 - donnees += '&codeTypePrestataire=' + codeTypePrestataire; - - donnees += '&numeroDecompte1=' + numeroDecompte1; - donnees += '&numeroDecompte2=' + numeroDecompte2; - - donnees += '&codeRaisonConsultation=' + codeRaisonConsultation; - donnees += '&hospitalisation=' + hospitalisation; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&chirurgie=' + chirurgie; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_feuilles_maladie_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateConsultation1 = $("#dateConsultation1").val(); - dateConsultation2 = $("#dateConsultation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val(); - numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - // Ligne 3 - codeTypePrestataire = $("#codeTypePrestataire").val(); - numeroDecompte1 = $("#numeroDecompte1").val(); - numeroDecompte2 = $("#numeroDecompte2").val(); - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - hospitalisation = $("#hospitalisation").val(); - numeroChambre = $("#numeroChambre").val(); - chirurgie = $("#chirurgie").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1); - numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateConsultation1=' + dateConsultation1; - donnees += '&dateConsultation2=' + dateConsultation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1; - donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - // Ligne 3 - donnees += '&codeTypePrestataire=' + codeTypePrestataire; - - donnees += '&numeroDecompte1=' + numeroDecompte1; - donnees += '&numeroDecompte2=' + numeroDecompte2; - - donnees += '&codeRaisonConsultation=' + codeRaisonConsultation; - donnees += '&hospitalisation=' + hospitalisation; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&chirurgie=' + chirurgie; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function selectionner_medecin_requete(codeMedecin, nomMedecin, noOrdreMedecin) -{ - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - $("#close_pop").click(); -} - -function afficher_pop_recherche_medecin_requete() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecinsrequete/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - } - }); -} - -function ctrlkeypress_medecin_requete(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin_requete(); - } -} - -function reinitialiser_medecin() -{ - $("#codeMedecin").val(""); - $("#nomMedecin").html("Rechercher Médecin..."); - $("#close_pop").click(); -} - -function requetes_factures() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_factures_export() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_bonpoec() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_bonpoec_export() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function requetes_prestationactes() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - codePrestataire = $("#codePrestataire").val(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_prestationactes_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - codePrestataire = $("#codePrestataire").val(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_pharmacie() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_pharmacie_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1); - numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function requetes_optique() -{ - $('#div_export').html(""); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleOptique = $("#libelleOptique").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleOptique=' + libelleOptique; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_optique_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - codePrestataire = $("#codePrestataire").val(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOptique1 = $("#numeroBonOptique1").val(); - numeroBonOptique2 = $("#numeroBonOptique2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleOptique = $("#libelleOptique").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1); - numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2); - - numeroBonOptique1 = convertir_en_entier(numeroBonOptique1); - numeroBonOptique2 = convertir_en_entier(numeroBonOptique2); - - numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1); - numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateLivraison1=' + dateLivraison1; - donnees += '&dateLivraison2=' + dateLivraison2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - donnees += '&numeroBonConsultation1=' + numeroBonConsultation1; - donnees += '&numeroBonConsultation2=' + numeroBonConsultation2; - - donnees += '&numeroBonOptique1=' + numeroBonOptique1; - donnees += '&numeroBonOptique2=' + numeroBonOptique2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleOptique=' + libelleOptique; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function requetes_assure() -{ - $('#div_export').html(""); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/"; - - // Ligne 1 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 2 - numeroPolice = $("#numeroPolice").val(); - codeProduit = $("#codeProduit").val(); - codeEtatPolice = $("#codeEtatPolice").val(); - codeLienParente = $("#codeLienParente").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val(); - sexe = $("#sexe").val(); - - // Ligne 3 - numeroClient1 = $("#numeroClient1").val(); - numeroClient2 = $("#numeroClient2").val(); - telephonePortableAdherent = $("#telephonePortableAdherent").val(); - emailAdherent = $("#emailAdherent").val(); - decede = $("#decede").val(); - nomClient = $("#nomClient").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroClient1 = convertir_en_entier(numeroClient1); - numeroClient2 = convertir_en_entier(numeroClient2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 2 - donnees += '&numeroPolice=' + numeroPolice; - donnees += '&codeProduit=' + codeProduit; - donnees += '&codeEtatPolice=' + codeEtatPolice; - donnees += '&codeLienParente=' + codeLienParente; - donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire; - donnees += '&sexe=' + sexe; - - // Ligne 3 - donnees += '&numeroClient1=' + numeroClient1; - donnees += '&numeroClient2=' + numeroClient2; - donnees += '&telephonePortableAdherent=' + telephonePortableAdherent; - donnees += '&emailAdherent=' + emailAdherent; - donnees += '&decede=' + decede; - donnees += '&nomClient=' + nomClient; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - //$("#div_detail_requete").html(data); - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Result : "+$("#nbligne_info").val()); - } - }); -} - -function requetes_assure_export() -{ - $('#div_detail_requete').html(''); - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeRequete=$("#codeRequete").val(); - - if (codeRequete<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRequete").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/"; - - // Ligne 1 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 2 - numeroPolice = $("#numeroPolice").val(); - codeProduit = $("#codeProduit").val(); - codeEtatPolice = $("#codeEtatPolice").val(); - codeLienParente = $("#codeLienParente").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val(); - sexe = $("#sexe").val(); - - // Ligne 3 - numeroClient1 = $("#numeroClient1").val(); - numeroClient2 = $("#numeroClient2").val(); - telephonePortableAdherent = $("#telephonePortableAdherent").val(); - emailAdherent = $("#emailAdherent").val(); - decede = $("#decede").val(); - nomClient = $("#nomClient").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroClient1 = convertir_en_entier(numeroClient1); - numeroClient2 = convertir_en_entier(numeroClient2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 2 - donnees += '&numeroPolice=' + numeroPolice; - donnees += '&codeProduit=' + codeProduit; - donnees += '&codeEtatPolice=' + codeEtatPolice; - donnees += '&codeLienParente=' + codeLienParente; - donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire; - donnees += '&sexe=' + sexe; - - // Ligne 3 - donnees += '&numeroClient1=' + numeroClient1; - donnees += '&numeroClient2=' + numeroClient2; - donnees += '&telephonePortableAdherent=' + telephonePortableAdherent; - donnees += '&emailAdherent=' + emailAdherent; - donnees += '&decede=' + decede; - donnees += '&nomClient=' + nomClient; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - // $('#div_detail_requete').html(""); - // $('#div_export_a').html(data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function convertir_en_entier(valeur) -{ - if(isNaN(valeur)) - { - valeur = "0"; - } - - if (valeur=="") - { - valeur="0"; - } - - valeur = parseInt(valeur); - - return valeur; -} - -function selectionactesmedicaux() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - modeSaisieFacture=$("#modeSaisieFacture").val(); - - bonCaduc=$("#bonCaduc").val(); - - if (bonCaduc==1 && modeSaisieFacture!="1") - { - v_msg="Bon caduc!"; - v_msgEng="Obsolete!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Selectactesmedicaux/"); -} - -function ajaxactespossibles_selection() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesselection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - $("#listeacte").html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_acte_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - codeMedecin = $("#codeMedecin").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet acte?"; - v_msgEng="Do you confirm this act?"; - - // if(confirm_ebene(v_msg, v_msgEng)) - // { - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - // donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation'; - - typeSms="ententeprealable"; - // typeSms2="autorisation"; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/enregistreractemedical/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - maj_fraisexclu_cso(); - - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - } - donnee_a_affciher = data; - }, - complete: function() { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - $("#totam_donnees").html(donnee_a_affciher); - } - }); - // } -} - -function supprimer_acte_medical_selection(idPrestationactes, codeTypePrestation) -{ - donnee_a_affciher = ""; - - /* - v_msg="Confirmez-vous la suppression de cet acte?"; - v_msgEng="Do you confirm the removal of this act?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - */ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/supprimeracte/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - // maj_fraisexclu_cso(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - } - }); - // } -} - -function valider_selection_acte() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - - -function ajax_maj_qte_acte(idPrestationactes, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite; - - donnee_a_affciher = ""; - - donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite;; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactesmedicauxselect/majquantite/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - }, - error: function(data) { - }, - complete: function() { - $("#div_prestations").html(donnee_a_affciher); - controle.focus(); - } - }); - } -} - - -function selectionner_acte_possibles_select(codeFamilleActe, codeActe, familleActe, libelleActe) -{ - if(libelleActe<=" ") - return; - - $("#codeFamilleActe").val(codeFamilleActe); - $("#libelleActe").val(libelleActe); - - ajaxactespossibles_selection(); - - $("#close_pop_acte").click(); -} - -function afficher_pop_recherche_actes_possibles_select() -{ - libelleActeSearch = $("#libelleActeSearch").val(); - - if(libelleActeSearch<=" ") - { - return; - } - - donnees = "valid=1&libelleActeSearch="+libelleActeSearch; - - $("#div_liste_actes_possibles").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteactespossiblesselect/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_actes_possibles").html(data); - } - }); -} - -function ctrlkeypress_actes_possibles_select(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_actes_possibles_select(); - } -} - -function selectionexamens() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Selectexaemens/"); -} - -function ajaxexamenpossibles_selection() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexamenspossiblesselection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_examen_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(prixActe==0) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - - typeSms="ententeprealable"; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/ajouterexamenprescription/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - if(ententePrealable=="2") - { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - } - donnee_a_affciher = data; - }, - complete: function() - { - if(ententePrealable=="2") - { - mettremailattente(donnees_sav); - } - $("#totam_donnees").html(donnee_a_affciher); - } - }); -} - -function retirerexamen_lab_selection(idExamen) -{ - - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe+'&idExamen='+idExamen; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/retirerexamen/", - type: 'POST', - data: donnees, - success: function(data) { - donnee_a_affciher = data; - alerter_depassement_limite(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - } - }); -} - -function valider_selection_examen() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - afficher_laboratoire_cso(); - } -} - -function selectionexamens_lab() -{ - window.location.assign($("#racineWeb" ).val()+"Selectexaemenslab/"); -} - -function valider_selection_examen_lab() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - actualiser_laboratoire(); - } -} - -function afficher_examensmedicaux() -{ - window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/"); -} - -function selectionexamens_cso() -{ - window.location.assign($("#racineWeb" ).val()+"Selectexaemenscso/"); -} - -function valider_selection_examen_cso() -{ - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - afficher_examensmedicaux(); - } -} - -function no_presciption() -{ - facture=$("#facture").val(); - - if (facture==1) - { - v_msg="Déjà facturé!"; - v_msgEng="Already charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - numOrd = $("#numOrd").val(); - noPrescription = $("#noPrescription").val(); - - if (numOrd==0 && noPrescription==0) - { - v_msg="Confirmez-vous qu\'il n\'y a pas de prescription de médicaments?"; - v_msgEng="Do you confirm that there is no drugs prescription?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerprescription/noprescription/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - feuillemaladie(); - } - }); - } - return; - } - feuillemaladie(); -} - -function prescrire_verre_opt() -{ -// Ajout à la prescription - /* - nbActesVerres = $("#nbActesVerres").val(); - - if (nbActesVerres>0) - { - v_msg="Veuillez sélectionner un verre!"; - v_msgEng="Please select a glass!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeOptique").focus(); - return; - } - */ - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - codeOptique = $("#codeOptique").val(); - - if (codeOptique<=" ") - { - v_msg="Veuillez sélectionner les verres!"; - v_msgEng="Please select the glasses!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeOptique").focus(); - return; - } - - donnees = 'codeOptique='+codeOptique; - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverreprescription/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_verre").click(); - // $("#livraison").html(data); - }, - complete: function() { - // alerter_depassement_limite(); - actualiser_opticien(); - } - }); - - //} - -// Fin Ajout à la prescription -} - -function validerdecompte_prestataire() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==0) - { - v_msg="Veuillez attendre la 1ère validation de l\'assureur!"; - v_msgEng="Please wait for the first validation of the insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==3) - { - v_msg="Déjà validé!"; - v_msgEng="Already validated!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==8) - { - v_msg="Pas besoin de validation prestataire!"; - v_msgEng="Provider validation not needed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==9) - { - v_msg="En attente de paiement!"; - v_msgEng="Waiting for payment!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==2) - { - - v_msg="Confirmez-vous la validation?"; - v_msgEng="Do you confirm the validation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/validerdecompteprestataire", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - // $("#div_detail").html(""); - v_msg="Décompte validé avec succès!"; - v_msgEng="validated successfully!"; - alert_ebene(v_msg, v_msgEng); - - }, - complete: function() { - // actualiser_decompte(); - afficher_decompte(); - } - }); - } - } -} - -function retourdecompte() -{ - idSaisieDecompte = $("#idSaisieDecompte").val(); - lienPrestation_C = $("#lienPrestation_C").val(); - lienProduction_C = $("#lienProduction_C").val(); - - v_url = lienProduction_C+"/Connexiondecompte/"+idSaisieDecompte; - - if (idSaisieDecompte>"") - { - window.location.assign(v_url); - } -} - -function enregistrer_nv_medicament() -{ - libelleMedicament = $("#libelleMedicament").val(); - - if (libelleMedicament<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - prixMedicament=$("#prixMedicament").val(); - prixMedicament=prixMedicament.replace(",","."); - $("#prixMedicament").val(prixMedicament); - - if(isNaN(prixMedicament)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixMedicament").val("0"); - $("#prixMedicament").focus(); - return; - } - - if(prixMedicament==0) - { - $("#prixMedicament").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - qteMedicament=$("#qteMedicament").val(); - qteMedicament=qteMedicament.replace(",","."); - $("#qteMedicament").val(qteMedicament); - - if(isNaN(qteMedicament)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#qteMedicament").val("0"); - $("#qteMedicament").focus(); - return; - } - - if(qteMedicament==0) - { - $("#qteMedicament").focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'libelleMedicament='+libelleMedicament+'&prixMedicament='+prixMedicament+'&qteMedicament='+qteMedicament; - - typeSms="ententeprealablepha"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/creermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - // alert("error => "+data); - // $("#div_new_medicament_test").html(data); - - $("#btn_close_pop_new_med").click(); - $("#btn_close_pop_medicament").click(); - }, - error: function(data) { - alert("error => "+data); - $("#div_new_medicament_test").html(data); - }, - complete: function() { - actualiser_saisie_pharmacien(); - } - }); -} - -function demander_accord_pha(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - typeSms="ententeprealablepha"; - - donnees_sav = 'idMedicament='+idMedicament+'&typeMail=mailententeprealablepha'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/demanderaccordpha/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function controle_longeur_passe(controle) -{ - longueur = controle.value.length; - - if(longueur==0) - { - return false; - } - - if(longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minmum required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } -} - -function ajax_maj_prix_medicament_pha(idMedicament, prix, controle) -{ - prix=prix.replace(",","."); - controle.value=prix; - - if(controle_numerique(controle)) - { - if(prix==0) - { - controle.focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idMedicament='+idMedicament+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majprixpha/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#medicaments").html(data); - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function facture_sans_bon() -{ - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - if (numeroBeneficiaire<="0") - { - v_msg="Veuillez sélectionner un bénéficiaire!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Facturesansboncso/"); -} - -function nouvelle_sans_bon() -{ - window.location.assign($("#racineWeb").val()+"Facturesansboncso/"); -} - -// js_facture_san_sbon -function enregistrerfacture_sans_bon_temp(v_initialiser) -{ - dateFacture=$("#dateFacture").val(); - debutMoisDecompte = $("#debutMoisDecompte").val(); - - codeMedecin = $("#codeMedecin").val(); - medecinManquant = $("#medecinManquant").val(); - - if (codeMedecin<=" ") - { - v_msg="Veuillez sélectionner un médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomMedecin").focus(); - return; - } - - if (codeMedecin=="ZZZZ" && medecinManquant<=" ") - { - v_msg="Veuillez saisir le nom du médecin non enregistré!"; - v_msgEng="Please enter the name of the non-registered doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - - numeroBon = $("#numeroBon").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez saisir le No de Bons!"; - v_msgEng="Please enter the first number of form!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - - if (dateFacture<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - /* - medecinManquant = $("#medecinManquant").val(); - - if (medecinManquant<=" ") - { - v_msg="Veuillez saisir le Médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - */ - - // vérifier que le gars est couvert - // modifié le 09/07/2019 - $("#dateFactureReelle").val(dateFacture); - if (prestation_possible_assureur()) - { - observations = $("#observations").val(); - hospitalisation = $("#hospitalisation").val(); - tm = $("#tmFacture").val(); - - donnees = 'observations='+observations+'&dateFacture='+dateFacture+'&hospitalisation='+hospitalisation+'&tm='+tm+'&numeroBon='+numeroBon+'&medecinManquant='+medecinManquant+'&codeMedecin='+codeMedecin; - donnees += '&initialiserprestation='+v_initialiser; - - $("#div_prestations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/enregistrerfacturetemp/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_facture").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() { - alerter_depassement_limite_sans_bon(); - } - }); - } -} - -function enregistrerfacture_sans_bon() -{ - enregistrerfacture_sans_bon_temp("0"); - - medecinManquant = $("#medecinManquant").val(); - - if (medecinManquant<=" ") - { - v_msg="Veuillez saisir le Médecin!"; - v_msgEng="Please select a doctor!"; - alert_ebene(v_msg, v_msgEng); - - $("#medecinManquant").focus(); - return; - } - - dateFacture=$("#dateFacture").val(); - - if (dateFacture<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - prixActe = $("#prixActe").val(); - if (prixActe==0) - { - v_msg="Rien à enregistrer!"; - v_msgEng="Nothing to save!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#dateFactureReelle").val(dateFacture); - if (prestation_possible_assureur()) - { - v_msg="Confirmez-vous cette facture?"; - v_msgEng="Do you confirm this invoice?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/validerfacturesansbon/", - error: function(errorData) { - }, - success: function(data) { - // maj_fraisexclu_cso(); - $(".datepicker" ).datepicker(); - }, - complete: function() { - v_msg="Validation effectuée avec succès!"; - v_msgEng="Validation done successfully!"; - alert_ebene(v_msg, v_msgEng); - - afficher_beneficiaire_id(); - } - }); - } - } -} - -function ajax_maj_tm_facture(tm, controle) -{ - donnees = 'tm='+tm; - - tm=tm.replace(",","."); - controle.value=tm; - - if(controle_numerique(controle)) - { - // enregistrerfacture_sans_bon_temp(); - enregistrerfacture_sans_bon_temp("0"); - } -} - -function ajax_maj_prix_acte(idPrestation, valeurActe, controle) -{ - donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe; - - valeurActe=valeurActe.replace(",","."); - controle.value=valeurActe; - - if(controle_numerique(controle)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/majprix/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture").html(data); - $(".datepicker" ).datepicker(); - }, - error: function(data) { - }, - complete: function(data) { - alerter_depassement_limite_sans_bon(); - } - }); - } -} - - -function valider_facture_sans_bon_temp() -{ - enregistrerfacture_sans_bon_temp("1"); -} - -function alerter_depassement_limite_sans_bon() -{ - fraisExclu=$("#fraisExclu").val(); - fraisExclu = parseInt(fraisExclu); - - if (fraisExclu>0) - { - v_msg="Attention ! Dépassement de limite"; - v_msgEng="Warning ! Overflow"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function consulter_limite_avant_facturation_classique() -{ - /* - idFacture=$("#idFacture_C").val(); - - if (idFacture==0) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureclassique/"); - */ -} - -function pop_messagerie() -{ - nbMessagesNonLus = $("#timer").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/", - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_messagerie").click(); - } - }); -} - -function marquer_message_comme_lu(idMessagerie, controle) -{ - donnees = 'idMessagerie='+idMessagerie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - controle.parentElement.removeChild(controle); - } - }); -} - - -function envoyer_messagerie(textMessage, idParent) -{ - donnees = 'textMessage='+textMessage+"&idParent="+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - } - }); -} - -function repondre_message(idMessagerie, idParent, controle) -{ - donnees = 'idMessagerie='+idMessagerie+'&idParent='+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessageriereponse/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_reponse").html(data); - }, - complete: function() { - repondu = $("#repondu").val(); - if(repondu=="1") - { - v_msg="Déjà répondu!"; - v_msgEng="Already answered!"; - alert_ebene(v_msg, v_msgEng); - - controle.parentElement.removeChild(controle); - return; - } - else - {$("#btn_pop_messagerie_reponse").click(); - } - } - }); -} - -function gerer_messagerie() -{ - window.location.assign($("#racineWeb").val()+"Messagerie/"); -} - -function afficher_lite_messagerie() -{ - donnees = ""; - donnees_retour = ""; - - date1 = $("#date1").val(); - date2 = $("#date2").val(); - - messageLu = $("#messageLu").val(); - textMessage = $("#textMessage").val(); - - donnees += 'date1=' + date1; - donnees += '&date2=' + date2; - donnees += '&messageLu=' + messageLu; - donnees += '&textMessage=' + textMessage; - - $("#div_messagerie_gestion").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemessagerie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_messagerie_gestion").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - - -function enregistrer_repondre_message() -{ - idMessagerie = $("#idMessagerie").val(); - idParent = $("#idParentReponse").val(); - - textMessage = $("#textMessageReponse").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir la réponse!"; - v_msgEng="Please enter the answer!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageReponse").focus(); - return; - } - - donnees = 'idMessagerie='+idMessagerie+"&idParent="+idParent+"&textMessage="+textMessage; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_pop_messagerie_reponse_quit").click(); - } - }); -} - -function historique_message(idParent) -{ - donnees = 'idParent='+idParent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessageriehistorique/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_historique").html(data); - }, - complete: function() { - $("#btn_pop_messagerie_historique").click(); - } - }); -} - -function initiermessage() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerienew/", - error: function(errorData) { - }, - success: function(data) { - $("#div_messagerie_new").html(data); - }, - complete: function() { - $("#btn_pop_messagerie_new").click(); - } - }); -} - -function enregistrer_new_message() -{ - textMessage = $("#textMessageNew").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir le message!"; - v_msgEng="Please enter the message!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageNew").focus(); - return; - } - - donnees = 'textMessage='+textMessage+"&idParent=0"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_pop_messagerie_new_quit").click(); - } - }); -} - -function consultation_assureur() -{ - dateFactureReelle = $("#dateFactureReelle").val(); - - if (dateFactureReelle<=" ") - { - v_msg="Veuillez saisir la date de la consultation!"; - v_msgEng="Please enter the date of the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFactureReelle").focus(); - return; - } - - if (prestation_possible_assureur()) - { - $("#okId" ).val("1"); - $("#okId_face" ).val("1"); - - ajax_context_datefacture_reelle(dateFactureReelle); - } -} - -function prestation_possible_assureur() -{ - enVigueur = $("#enVigueur_C").val(); - codeEtatBeneficiaire = $("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire = $("#etatbeneficiaire_C").val(); - college_couvert = $("#college_couvert_C").val(); - derogation_en_cours = $("#derogation_en_cours_C").val(); - derogation_finger_en_cours = $("#derogation_finger_en_cours_C").val(); - - datejour = $("#datejour_C").val(); - - dateSortieBeneficiaire = $("#dateSortieBeneficiaire_C").val(); - var tdd = new Date(dateSortieBeneficiaire); - dtd = Math.round(Date.parse(tdd)/(1000*3600*24)); - - - dateFactureReelle = $("#dateFactureReelle").val(); - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - dateEntreeBeneficiaire = $("#dateEntreeBeneficiaire_C").val(); - - libelledebutMoisDecompte = $("#debutMoisDecompte").val(); - debutMoisDecompte = $("#debutMoisDecompte").datepicker("getDate"); - var tddebut = new Date(debutMoisDecompte); - dddebut = Math.round(Date.parse(tddebut)/(1000*3600*24)); - - CalculerFinMoisDecompte(); - - libellefinMoisDecompte = $("#finMoisDecompte").val(); - finMoisDecompte = $("#finMoisDecompte").datepicker("getDate"); - var tfin = new Date(finMoisDecompte); - ddfin = Math.round(Date.parse(tfin)/(1000*3600*24)); - - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = $("#dateFactureReelle").datepicker("getDate"); - var td2 = new Date(dateEcheancePolice); - var tdj = new Date(datejour); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - dtj=Math.round(Date.parse(tdj)/(1000*3600*24)); - - if ( (dt1ddfin) ) - { - v_msg="Attention! date hors du mois! => "+libelledebutMoisDecompte+" - "+libellefinMoisDecompte; - v_msgEng="Warning! date out of the month!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if(dateSortieBeneficiaire>"2000-01-01") - { - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - else - { - // A désactivé peut-être pour RADIANT - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - // Fin désactivation peut-être pour RADIANT - - if (college_couvert<1 && derogation_en_cours<1) - { - v_msg="Attention! Cette personne n\'a pas accès à ce centre"; - v_msgEng="Warning! This person does not have access to this center"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dtj) - { - v_msg="Attention! Revoir la date!"; - v_msgEng="Warning! Review the date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dt2 || dt1"2000-01-01") - { - v_msg="Attention! personne décédée!"; - v_msgEng="Warning! Deceased!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - return true; -} - -function ajax_context_datefacture_reelle(dateFactureReelle) -{ - donnees = 'dateFactureReelle='+dateFactureReelle; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdatefacturerelle/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - aller_a_la_consultatio(); - } - }); -} - -function aller_a_la_consultatio() -{ - window.location.assign($("#racineWeb" ).val()+"Consultation/"); -} - -function ajax_maj_qte_examen_lab(idExamen, quantite, controle) -{ - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - alerter_depassement_limite(); - controle.focus(); - } - }); - } -} - -function ajax_maj_qte_examen_lab_select(idExamen, quantite, controle) -{ - donnee_a_affciher = ""; - - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectexamens/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#livraison").html(data); - donnee_a_affciher = data; - alerter_depassement_limite(); - }, - error: function(data) { - }, - complete: function() { - $("#totam_donnees").html(donnee_a_affciher); - controle.focus(); - } - }); - } -} - -function ajax_maj_qte_examen_cso(idExamen, quantite, controle) -{ - donnee_a_affciher = ""; - - quantite=quantite.replace(",","."); - controle.value=quantite; - - if(controle_numerique(controle)) - { - if(quantite==0) - { - controle.focus(); - v_msg="Veuillez saisir la quantité!"; - v_msgEng="Please enter the quantity!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idExamen='+idExamen+"&quantite="+quantite; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailexamen/majquantiteexam/", - type: 'POST', - data: donnees, - success: function(data) { - $("#livraison").html(data); - controle.focus(); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function actualiser_saisie_pharmacien() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacien/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#livraison").html(data); - raffraichier_detail_prescription(); - }, - complete: function() { - alerter_depassement_limite(); - } - }); -} - -function lister_ged() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteged/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function ctrlkeypress_lister_ged(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - lister_ged();; - } -} - -function check_ged(idGed, cheminFichier, controle) -{ - donnees = "idGed="+idGed+"&cheminFichier="+cheminFichier; - - // var cible_ged = $('#cible_ged'); - var ctrl_btn_ged = $("#btn_ged"+idGed); - var ctrl_mess_not_found= $("#mess_not_found"+idGed); - var ctrl_check = $("#ctrl_check"+idGed); - - // document.getElementById('bouton_'+id).innerHTML='Afficher le texte'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxged/verifierexistancefichier/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - - donnees_retour = data; - - if(donnees_retour=="1") - { - ctrl_btn_ged.show(); - } - else - { - ctrl_mess_not_found.html("Not found"); - } - }, - complete: function() - { - controle.style.display = 'none'; - ctrl_check.show(); - } - }); -} - -function lister_ged_adherent() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedadherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function lister_ged_beneficiaire_prest() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprest/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - - -function lister_ged_feuille_maladie() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - nomOrigine = $("#nomOrigine").val(); - - donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine; - - $("#div_ged").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); -} - -function pop_ged_pharmacie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistegedpharmacie/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_ged").html(data); - }, - complete: function() { - $("#btn_pop_ged_pharmacie").click(); - } - }); -} - -function save_enroleur(user_id) -{ - if (user_id>"") - { - donnees = 'user_id='+user_id; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/saveenroleur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - } - }); - } -} - - -/* ACTIVATION POPUP -function imprimer_liste_assures() -{ - $('#div_export_assures').html(''); - - $("#btn_liste_assures").click(); - popalertmessagerie -} -*/ - -function pop_dernier_messagerie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/derniermessage/", - error: function(errorData) { - }, - success: function(data) { - $("#div_dernier_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_dernier_messagerie").click(); - } - }); -} - -function marquer_dernier_message_comme_lu(idMessagerie, controle) -{ - donnees = 'idMessagerie='+idMessagerie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - // controle.parentElement.removeChild(controle); - $("#btn_close_pop_dernier_messagerie").click(); - } - }); -} - -function isNumeric(num){ - return !isNaN(num) -} - -function retirer_consommable(idConsommable) -{ - donnees = 'idConsommable='+idConsommable; - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you Confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommable/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function retirer_consommable_tous() -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you Confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommabletous/", - type: 'POST', - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_consommable(); - } - }); - } -} - -function valider_consommables() -{ - facturerConsommable=$("#facturerConsommable").val(); - if (facturerConsommable!="1") - { - v_msg="Consommables non facturés!"; - v_msgEng="Consumables not invoiced!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette saisie?"; - v_msgEng="Do you confirm this situation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - feuillemaladie(); - } -} - -function imprimerdecompteprestataireaccord() -{ - regle=$("#regle").val(); - - if( (regle!=1) && (regle!=9) ) - { - v_msg="Pas encore validé par l\'asssureur"; - v_msgEng="Not yet validates by insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idReglement = $("#idReglement").val(); - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerdecompteprestataireaccord", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - - -function consulter_une_factures() -{ - window.location.assign($("#racineWeb" ).val()+"Factureconsprestataire/"); -} - -function ctrlkeypressfacture(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#idFacture").blur(); - } -} - -function chercher_facture(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturefeuillemaladie() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_facture_pop(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture_pop").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture_pop").html(data); - }, - error: function(data) { - }, - complete: function() { - $('#btn_pop_consulter_facture').click(); - } - }); -} - -function consulterfacturefeuillemaladie_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureverres_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureged_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function reafficher_ged_facture(idFacture) -{ - if (idFacture>"0") - { - donnees = 'idFacture='+idFacture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgedfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); - } -} - -function valider_ged_facture() -{ - idFacture = $("#idFactureGed").val(); - v_url = $("#racineWeb").val()+"Ajaxgedfacture/chargerged"; - - donnees = ""; - - donnees = new FormData($("#ajax_form_upload")[0]); - - $.ajax({ - type: "POST", - url: v_url, - data: donnees, - contentType: false, - cache: false, - processData :false, - - success: function(message){ - alert_ebene(message); - }, - error: function(errorData){ - }, - complete: function() { - // reafficher_ged_facture(idFacture); - } - }); -} - -function consulterfactureged() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function enregistrer_nv_verres() -{ - libelleOptique = $("#libelleOptique").val(); - - if (libelleOptique<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleOptique").focus(); - return; - } - - prixVerre=$("#prixVerre").val(); - prixVerre=prixVerre.replace(",","."); - $("#prixVerre").val(prixVerre); - - if(isNaN(prixVerre)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixVerre").val("0"); - $("#prixVerre").focus(); - return; - } - - if(prixVerre==0) - { - $("#prixVerre").focus(); - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'libelleOptique='+libelleOptique+'&prixVerre='+prixVerre; - - // typeSms="ententeprealableopt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/creerverre/", - type: 'POST', - data: donnees, - success: function(data) { - - $("#btn_close_pop_new_verre").click(); - $("#btn_close_pop_verre").click(); - - // $("#div_test_gabarit").html(data); - - }, - error: function(data) { - }, - complete: function() { - actualiser_opticien(); - } - }); -} - -function demander_accord_opt(idOptique) -{ - donnees = 'idOptique='+idOptique; - - typeSms="ententeprealableopt"; - - donnees_sav = 'idOptique='+idOptique+'&typeMail=mailententeprealableopt'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailopticien/demanderaccordopt/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function demander_accord_mont(idOptique) -{ - - prixPrestataire = $("#prixPrestataire").val(); - - prixPrestataire=prixPrestataire.replace(",","."); - $("#prixPrestataire").val(prixPrestataire); - - if(isNaN(prixPrestataire)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#prixPrestataire").val("0"); - $("#prixPrestataire").focus(); - return; - } - - if(prixPrestataire==0) - { - $("#prixPrestataire").focus(); - - v_msg="Veuillez saisir le prix!"; - v_msgEng="Please enter the price!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idOptique='+idOptique+'&prixPrestataire='+prixPrestataire; - - typeSms="ententeprealablemont"; - - donnees_sav = donnees+'&typeMail=mailententeprealablemont'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmonture/demanderaccordmont/", - - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - $("#div_monture").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -// 06/04/2019 -function changer_langue() -{ - codeLangue = $("#codeLangue").val(); - - v_msg="Confirmez-vous le changement de langue?"; - v_msgEng="Do you confirm the language change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/", - type : 'post', - // data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/"); - } - }); - } -} - -function envoyersms(p_destinataires, p_message, creation_message) -{ - if(creation_message=="1") - { - envoyer_messagerie(p_message, "0"); - } - - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - if(p_destinataires.length<5) - { - /* - v_msg="SMS => Pas de destintaire!"; - v_msgEng="SMS => No recipient!"; - - alert_ebene(v_msg, v_msgEng); - */ - - return; - } - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="blive") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="hooza") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function preparesms_adherent(typeSms) -{ - // ajout du 09/04/2025 => empêcher l'nevoi des messages de Facturation - return; - - /* - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return; - } - - smsmParFacture = $("#smsmParFacture").val(); - - if(smsmParFacture=="0") - { - return; - } - - codeLangueAdherent = $("#codeLangueAdherent").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "0"; - - devise = $("#devise_C").val(); - - if (typeSms=="facturer_cso") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonConsultation = $("#numeroBonConsultation_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Consultation form No :" : "Bon consultation No : "; - p_message += numeroBonConsultation+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Consumptions : " : "Consommations : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_pha") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Prescription No : " : "Ordonnance No : "; - p_message += numeroBonOrdonnance+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Pharmacy Consumptions : " : "Consommations Pharmacie : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - - } - - if (typeSms=="facturer_lab") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonExamen = $("#numeroBonExamen_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Exam form No : " : "Bon Examens No : "; - p_message += numeroBonExamen+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Laboratory consumptions : " : "Consommations Labo : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_opt") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOptique = $("#numeroBonOptique_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical foem No : " : "Bon Optique No : "; - p_message += numeroBonOptique+" "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical consumptions : " : "Consommations Optiques : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_mont") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "Optical frames Consumptions : " : "Consommations Montures : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_sea") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonKine = $("#numeroBonKine_C").val(); - - p_destinataires = $("#telephonePortableAdherent_C").val(); - - p_message = $("#prestataire_C").val()+" "; - p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += (codeLangueAdherent=="en_US") ? "KINE form No : " : "Bon KINE No : "; - p_message += numeroBonKine+" "; - - p_message += (codeLangueAdherent=="en_US") ? "KINE Consumptions : " : "Consommations KINE : "; - p_message += cout_f+" "+devise; - - p_message +=" TM : "+montantTm_f+" "+devise; - } - - envoyersms(p_destinataires, p_message, creation_message); - */ -} - -function ajouter_sms_attente(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_sms_attente_singleton(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - var addr = p_destinataires.split(","); - - addr.forEach(function(element) - { - p_dest = element; - - if(p_dest.length>4) - { - donnees = "destinataires="+p_dest+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } - else - { - v_msg=p_dest+" => Mauvais format!"; - v_msgEng=p_dest+" => wrong phone format!"; - alert_ebene(v_msg, v_msgEng); - } - }); -} - -function tester_disponibiliter_sms() -{ - p_message = ""; - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - p_message = "Fournisseur : esicia "; - } - else - if(fournisseurSms=="blive") - { - p_message = "Fournisseur : blive "; - } - else - if(fournisseurSms=="hooza") - { - p_message = "Fournisseur : hooza "; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - p_destinataires = "25761198584"; - // p_destinataires = "25761198584,25761198584"; - - donnees = "destinataires="+p_destinataires+"&message="+p_message+"&fournisseurSms="+fournisseurSms; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtesterdisponiblitesms/envoyerlesms/", - type: 'POST', - data: donnees, - success: function(data) - { - $('#div_test_gabarit').html(data); - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_destinataire_sms_adherent(p_destinataires) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return p_destinataires; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return p_destinataires; - } - - tel_adh = $("#telephonePortableAdherent_C").val(); - - if(tel_adh.length>4) - { - return p_destinataires+","+tel_adh; - } - - return p_destinataires; -} - -function tester_ajouter_destinataire_sms_adherent() -{ - p_destinataires = "22506802339"; -} - -function preparemail_adherent(typeSms) -{ - emailParFacture = $("#emailParFacture").val(); - - if(emailParFacture=="0") - { - return; - } - - emailAdherent = $("#emailAdherent_C").val(); - - if(emailAdherent.length<5) - { - return; - } - - codeLangueAdherent = $("#codeLangueAdherent").val(); - - p_objet_email_adh = (codeLangueAdherent=="en_US") ? "ALERT CONSUMPTION" : "ALERT CONSOMMATIONS"; - - p_messageemail_adh = ""; - - devise = $("#devise_C").val(); - - cout = parseInt(cout); - cout = cout.toLocaleString(); - - if (typeSms=="facturer_cso") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonConsultation = $("#numeroBonConsultation_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+")"; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Consultation form No : " : "Bon consultation No : "; - p_messageemail_adh += numeroBonConsultation; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Consumptions : " : "Consommations : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_pha") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Prescription No : " : "Ordonnance No : "; - p_messageemail_adh += numeroBonOrdonnance; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Pharmacy Consumptions : " : "Consommations Pharmacie : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - - } - - if (typeSms=="facturer_lab") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonExamen = $("#numeroBonExamen_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Exam form No : " : "Bon Examens No : "; - p_messageemail_adh += numeroBonExamen; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Laboratory consumptions : " : "Consommations Labo : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_opt") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonOptique = $("#numeroBonOptique_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical form No : " : "Bon Optique No : "; - p_messageemail_adh += numeroBonOptique; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical consumptions : " : "Consommations Optiques : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_mont") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "Optical frames Consumptions : " : "Consommations Montures : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - if (typeSms=="facturer_sea") - { - patient = $("#beneficiaire_C").val(); - numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val(); - numeroBonKine = $("#numeroBonKine_C").val(); - - p_messageemail_adh = $("#prestataire_C").val()+" "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "KINE form No : " : "Bon KINE No : "; - p_messageemail_adh += numeroBonKine; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh += (codeLangueAdherent=="en_US") ? "KINE Consumptions : " : "Consommations KINE : "; - p_messageemail_adh += cout_f+" "+devise; - - p_messageemail_adh +="\n\n"; - - p_messageemail_adh +="TM : "+montantTm_f+" "+devise; - } - - ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh); -} - -function ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh) -{ - donnees = "email="+emailAdherent+"&objet="+p_objet_email_adh+"&message="+p_messageemail_adh; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmailadhattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function verifiertentativeidentitification(user_id) -{ - /* - donnees = 'user_id='+user_id; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenvoimaildivers/verifiertentativeidentitification/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() { - } - }); - */ -} - -function afficherbon_vide() -{ - $("#div_bonpecs").html(""); - - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : 0"); - } - else - { - $("#nbligne").val("Nombre de bons affichés : 0"); - } - - codeTypeBon=$("#codeTypeBon").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/vide/", - error: function(errorData) - { - }, - success: function(data) - { - $("#div_bonpecs").html(data); - }, - complete: function() - { - } - }); -} - -function demander_accord_pha_cso(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - typeSms="ententeprealablepha"; - - donnees_sav = 'idMedicament='+idMedicament+'&typeMail=mailententeprealablepha'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpharmacie/demanderaccordpha/", - type: 'POST', - data: donnees, - success: function(data) { - preparesms(typeSms); - - v_msg="Demande accord prealable envoyée!"; - v_msgEng="Request prior agreement sent!"; - alert_ebene(v_msg, v_msgEng); - - // raffraichir affichage - $("#livraison").html(data); - }, - error: function(data) { - }, - complete: function() { - mettremailattente(donnees_sav); - } - }); -} - -function desactiver_click_droit() -{ - if (document.addEventListener) { - document.addEventListener('contextmenu', function (e) { - e.preventDefault(); - }, false); - } else { - document.attachEvent('oncontextmenu', function () { - window.event.returnValue = false; - }); - } -} - -function enregistrer_new_notes() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - donnees = 'notesNew='+notesNew; - - v_msg="Confirmez-vous cette note?"; - v_msgEng="Do you confirm this note?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/creernote/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_notes_feuille(); - } - }); - } -} - -function afficher_notes_feuille() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initiernotesfeuille() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/nouvellenote/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function click_btn_add_drug() -{ - hospitalisation = $("#hospitalisation_C").val(); - - nbMedicamentMax = parseInt($("#nbMedicamentMax").val()); - nbMedicamentSaisie = parseInt($("#nbMedicamentSaisie").val()); - - if (nbMedicamentSaisie>=nbMedicamentMax && hospitalisation!="1") - { - v_msg="Attention! Maximum de médicaments atteint!"; - v_msgEng="Warning! Maximum drugs reached!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#btn_add_drug").click(); -} - -function imprimer_feuille_maladie() -{ - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees_retour = ""; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_export_a").html(donnees_retour); - $("#btn_imprimer_feuille_maladie").click(); - } - }); -} - -function controle_numerique_new(idControle, oldValue) -{ - controle = document.getElementById(idControle); - - valeur = controle.value; - - if(isNaN(valeur)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=oldValue; - controle.focus(); - return false; - } - - return true; -} - -function reinitrechercherbonordonnance() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnance/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmacien/"); - } - }); -} - -function reinit_chercher_ordonnance_opt() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - // window.location.assign($("#racineWeb" ).val()+"Opticien/"); - }, - error: function(data) { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Opticien/"); - } - }); -} - -// - -function reinitrechercherbonkine() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/reinit/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Kine/"); - } - }); -} - -function supprimer_espace_string(p_mot) -{ - p_mot = p_mot.trim(); - p_mot = p_mot.replace(" ", ""); - return p_mot; -} - -function notesfeuillemaladie() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesfeuillemaladie/"); -} - -function raffraichier_gabarit() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgabarit/", - success: function(data) - { - $("#div_ajaxgabarit").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - $(".datepicker" ).datepicker(); - - raffraichier_messagerie(); - } - }); -} - -function 'connexion_cookie');() -{ - alert('connexion_cookie'); - msgErreur=$("#msgErreur").val(); - - donnees = 'msgErreur='+msgErreur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconnexioncookie/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_ajaxconnexion").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - var login = document.getElementById("login").value; - if (login>" ") - { - $("#mdp").focus(); - } - else - { - $("#login").focus(); - } - } - }); -} - - -function ajaxaffectionspossibles() -{ - codeTypeAffection=$("#codeTypeAffection").val(); - - donnees = 'codeTypeAffection='+codeTypeAffection; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxaffectionspossibles/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeaffections").html(data); - } - }); -} - - -function enregistreraffection() -{ - affectionObligatoire=$("#affectionObligatoire").val(); - codeAffection=$("#codeAffectionPop").val(); - codeAffectionOld=$("#codeAffection").val(); - - if (affectionObligatoire=="1" && codeAffection<="0000") - { - v_msg="Diagnostique exigé!"; - v_msgEng="Diagnosis required!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeAffectionPop").focus(); - - return; - } - - if (codeAffection==codeAffectionOld) - { - v_msg="Déjà saisi!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeAffectionPop").focus(); - - return; - } - - v_msg="Confirmez-vous cette affection?"; - v_msgEng="Do you confirm this affection?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeAffection='+codeAffection; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreraffection/enregistreraffection/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - $("#close_pop_affection").click(); - feuillemaladie(); - } - }); - } -} - -function diagnosticsfeuillemaladie() -{ - /* - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - window.location.assign($("#racineWeb" ).val()+"Diagnosticscons/"); -} - -function afficher_diagnostics_feuille() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticscons/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - - -function imprimer_ecarts_decompte() -{ - var div_export = $('#div_export_ecart_decompte'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_imprimer_ecart_decompte").click(); - - // alert("Ajaximprimerecartdecompte"); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerecartdecompte/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - // $("#btn_imprimer_ecart_decompte").click(); - } - }); - -} - -function afficher_ecarts_facture_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartfacture/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function ecarts_facture_non_saisies_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartnonsaisi/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function initvidermessagerie() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvidermessagerie/", - error: function(errorData) { - }, - success: function(data) { - $("#div_vider_messagerie").html(data); - }, - complete: function() { - $("#btn_pop_vider_messagerie").click(); - $(".datepicker" ).datepicker(); - } - }); -} - -function vidermessagerie() -{ - dateLimite = $("#dateLimite").val(); - - v_msg="Confirmez-vous le vidage de tous les messages générés avant le "+dateLimite+" ?"; - v_msgEng="Do you confirm the emptying of all messages generated before the "+dateLimite+" ?"; - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'dateLimite=' + dateLimite; - - $("#btn_pop_vider_messagerie").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvidermessagerie/vidermessagerie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - v_msg="Vidage effectué avec succès!"; - v_msgEng="Emptying done successfully!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_pop_vider_messagerie_quit").click(); - gerer_messagerie(); - // Messagerie/ - } - }); - } -} - -function afficher_contacts_assureur() -{ - window.location.assign($("#racineWeb" ).val()+"Infossassureur/"); -} - -function ajaxdelaicarencecaisonconsultation() -{ - codeRaisonConsultation=$("#codeRaisonConsultation").val(); - - donnees = 'codeRaisonConsultation='+codeRaisonConsultation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdelaicarencecaisonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infodelaicarence").html(data); - }, - complete: function() { - $("#delaiCarenceRaisonconsultation").val( $("#delaiCarenceRaisonconsultation_info").val()); - $("#appliquerDelaiCarence").val( $("#appliquerDelaiCarence_info").val()); - } - }); -} - -function CalculerFinMoisDecompte() -{ - var typdate = $("#debutMoisDecompte").datepicker("getDate"); - typdate.addMonths(1); - $("#finMoisDecompte").datepicker( "setDate", typdate ); -} - -function reposmedical() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Reposmedical/"); -} - -function afficher_repos_medical() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initier_repos_medical() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/nouveaureposmedical/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function enregistrer_new_repos_medical() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - nbJour = $("#nbJour").val(); - - if(isNaN(nbJour)) - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - if (nbJour<="0") - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - donnees = 'notesNew='+notesNew+"&nbJour="+nbJour; - - v_msg="Confirmez-vous ce repos médical?"; - v_msgEng="Do you confirm this medical rest?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/creerreposmedical/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_repos_medical(); - } - }); - } -} - -function supprimer_affections(idAffection) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistreraffection/supprimeraffection/", - type : 'post', - data: "idAffection="+idAffection, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#close_pop_affection").click(); - feuillemaladie(); - } - }); - } -} - -function anteceentsmedicaux() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Anteceentsmedicaux/"); -} - -function diagnosticsbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Diagnosticsconsbeneficiaire/"); -} - -function notesbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesbeneficiaire/"); -} - -function afficher_diagnostics_beneficiaire() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticsbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - -function afficher_notes_beneficiaire() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function test_online() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - v_msg="Connexion OK!"; - v_msgEng="Connection OK"; - alert_ebene(v_msg, v_msgEng); - - } - else - { - $("#test_connexion").css('background-color', 'red'); - v_msg="Problème de Connexion!"; - v_msgEng="Connection Problem!"; - alert_ebene(v_msg, v_msgEng); - } - return; -} - -function raffraichier_messagerie() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - c_html = ""; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/", - success: function(data) { - c_html = data; - }, - error: function(errorData) { - }, - complete: function() { - $("#nbMessagesNonLus").html(c_html); - msgNonLus=$("#msgNonLus").val(); - - if(msgNonLus>0) - { - pop_dernier_messagerie(); - } - } - }); - } - else - { - $("#test_connexion").css('background-color', 'red'); - return; - } -} - - -function consulterfactureverres() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function init_remplacer_medicament(idMedicament) -{ - donnees = 'idMedicament='+idMedicament; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/initremplacement/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() - { - $("#btn_remplacer_medicament").click(); - } - }); -} - -function consulter_remplacer_medicament() -{ - $("#div_liste_medicaments_remplaces").html('
  ' + 'Veuillez patienter...' + '
'); - - $('#btn_medicaments_remplaces').click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/consulterremplacement/", - type: 'POST', - success: function(data) { - $("#div_liste_medicaments_remplaces").html(data); - }, - error: function(data) { - }, - complete: function() - { - // $('#btn_medicaments_remplaces').click(); - } - }); -} - -function ctrlkeypress_medicament_remplacement(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medicament_remplacement(); - } -} - -function afficher_pop_recherche_medicament_remplacement() -{ - nomsearch = $("#nomsearchrempl").val(); - - if (nomsearch > " ") - { - donnees = "valid=1&nomsearch="+nomsearch; - - // alert(donnees); - // return; - - $("#div_listemedicament_rempl").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedicaments/remplacement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedicament_rempl").html(data); - } - }); - } -} - -function selectionner_medicament_pop_rempl(codeMedicament, libelleMedicament) -{ - $("#codeMedicament_pop_rempl").val(codeMedicament); - $("#libelleMedicament_pop_rempl").val(libelleMedicament); -} - -function remplacer_medicament() -{ - codeMedicamentNouv = $("#codeMedicament_pop_rempl").val(); - libelleMedicamentNouv = $("#libelleMedicament_pop_rempl").val(); - - if (codeMedicamentNouv<=" ") - { - v_msg="Veuillez sélectionner un médicament!"; - v_msgEng="Please select a medicine/drug!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Prescrire : "+libelleMedicamentNouv+"?"; - v_msgEng="Prescribe : "+libelleMedicamentNouv+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'codeMedicamentNouv='+codeMedicamentNouv; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/remplacermedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - // $("#btn_close_pop_rempl").click(); - prescription_medicament(); - }, - complete: function() { - } - }); - } -} - -function imprimer_facture_feuille_maladie(idFactureFeuille) -{ - donnees = 'idFacture='+idFactureFeuille; - - // alert("imprimer_facture_feuille_maladie => "+donnees); - // return; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfeuillemaladie/imprimerfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#div_imprimer_facture").html(data); - }, - complete: function() { - $("#btn_pop_imprimer_facture").click(); - } - }); -} - -function appliquerDataTable(){ - - var sc = $(window).scrollTop(), - dh = $(document).height(), - ch = $(window).height(); - scrollPercent = (sc / (dh-ch)) * 100; - - try{ - var oTable = $('.tabliste').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "75vh", - "pagingType": "full_numbers", - "autoWidth": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "fixedColumns": true, - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - /* - $(window).bind('resize', function () { - oTable.fnAdjustColumnSizing(false); - }); - */ - } - catch(err){ - return false; - } - -} - -function appliquerDataTableMini(){ - try{ - $('.tablistemini').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "34vh", - "pagingType": "full_numbers", - "autoWidth": false, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -function dataTableSpeciale(){ - try{ - $('.tabspeciale').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "75vh", - "pagingType": "full_numbers", - "autoWidth": false, - "bFilter": false, - "bLengthChange": false, - "orderMulti": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -function dataTableSpecialeMini(){ - try{ - $('.tabspecialemini').DataTable({ - "lengthMenu": [ 50, 100, 150], - "scrollX": true, - "scrollY": "34vh", - "pagingType": "full_numbers", - "autoWidth": false, - "bFilter": false, - "bLengthChange": false, - "orderMulti": true, - "language": { - "lengthMenu":"Affiche _MENU_ par page", - "zeroRecords": "Désolé - Aucune donnée trouvée", - "info": "_PAGE_ sur _PAGES_ pages", - "infoEmpty": "Pas d'enregistrement", - "search": "Recherche:", - "paginate": { - "next": "â–º", - "previous": "â—„", - "first": "|â—„", - "last": "â–º|" - }, - "infoFiltered": "(filtré de _MAX_ total enregistrements)" - } - }); - - } - catch(err){ - return false; - } -} - -$(function(){ - appliquerDataTable(); - dataTableSpeciale(); - $('.js-example-basic-single').select2(); - $('.selectpicker').selectpicker(); -}); - - -function ajaxinfosboninitconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - codeGestionBon = $("#codeGestionBon").val(); - - if (codeGestionBon!="0") - { - v_msg="Option non disponible!"; - v_msgEng="Option not available!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - numeroBon = $("#numeroBon").val(); - - if(isNaN(numeroBon)) - { - v_msg="Veuillez revoir le numéro de bon!"; - v_msgEng="Please review the prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - if ($("#numeroBon").val()<="0") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#btn_enreg").disable(); - $("#msgErreur").html(""); - $("#codeEtatBon").val(""); - - $("#numeroBon").focus(); - return; - } - - donnees = "numeroBon="+numeroBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosbonconsultation/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infosbon").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerinitconsultation() -{ - badcodeGestionBon = $("#badcodeGestionBon").val(); - - if (badcodeGestionBon=="1") - { - v_msg="Veuillez revoir le type de gestion de bons!"; - v_msgEng="Please review the type of forms management!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - appliquerDelaiCarence = $("#appliquerDelaiCarence").val(); - - - anciennete = $("#anciennete").val(); - anciennete = parseInt(anciennete); - - delaiCarenceRaisonconsultation = $("#delaiCarenceRaisonconsultation").val(); - delaiCarenceRaisonconsultation = parseInt(delaiCarenceRaisonconsultation); - - delaiCarenceBeneficiaire = $("#delaiCarenceBeneficiaire").val(); - delaiCarenceBeneficiaire = parseInt(delaiCarenceBeneficiaire); - - - // if (delaiCarenceBeneficiaire>0 && appliquerDelaiCarence=="1") - if (delaiCarenceBeneficiaire>0) - { - if (anciennete  ' + 'Veuillez patienter... / Please wait...' + ''); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"}, - success: function(data) { - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - v_msg="Enrôlement effectué avec succès!"; - v_msgEng="Enrollment completed successfully!!"; - // alert_ebene(v_msg, v_msgEng); - setTimeout(() => { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - }, 1000) - } - }, - error: function(data) { - }, - complete: function(data) { - $("#div_wait_face_ebene").html(''); - } - }); -} - -function ebene_confirmer_photo_face() // OK -{ - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_supprimer_photo_face").disable(); - $("#ebene_take_photo_face").disable(); - $("#motif").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_supprimer_photo_face").prop('disabled', true); - $("ebene_take_photo_face").prop('disabled', true); - $("motif").prop('disabled', true); - - $('#message_face').html(""); - $("#div_wait_face_ebene").html(''); - - $("#del_face").val("0"); - faceRegistered = $("#faceRegistered").val(); - if(faceRegistered!="1") - { - v_msg="Cette personne n'a pas encore de photo dans le système!"; - v_msgEng="This person does not have a photo in the system yet!"; - alert_ebene(v_msg, v_msgEng); - $('#message_face').html(""); - return; - } - - image_face = $("#image_face").val(); - if(image_face<=" ") - { - v_msg="Veuillez prendre une photo!"; - v_msgEng="Please take a photo!"; - alert_ebene(v_msg, v_msgEng); - $('#message_face').html(""); - return; - } - - $("#div_wait_face_ebene").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"}, - success: function(data) { - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - $("#okId_face").val("1"); - v_msg="Face confirmée!"; - v_msgEng="Face confirmed!"; - // alert_ebene(v_msg, v_msgEng); - setTimeout(() => { - consultation(); - }, 1000) - } - else - { - $("#okId").val("-1"); - $("#okId_face").val("-1"); - } - }, - error: function(data) { - }, - complete: function(data) { - $("#div_wait_face_ebene").html(''); - } - }); -} - -function ebene_supprimer_photo_face() // OK -{ - $('#message_face').html(""); - $("#div_wait_face_ebene").html(''); - - motif=$("#motif").val(); - motif= motif.trim(); - $("#motif").val(motif); - - if (motif<=" ") - { - v_msg="Veuillez saisir un motif!"; - v_msgEng="Please enter a reaon!"; - alert_ebene(v_msg, v_msgEng); - - $("#motif").focus(); - return; - } - - $("#del_face").val("1"); - - faceRegistered = $("#faceRegistered").val(); - if(faceRegistered!="1") - { - v_msg="Cette personne n'a pas encore de photo dans le système!"; - v_msgEng="This person does not have a photo in the system yet!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - image_face = $("#image_face").val(); - if(image_face<=" ") - { - v_msg="Veuillez prendre une photo!"; - v_msgEng="Please take a photo!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_supprimer_photo_face").disable(); - $("#ebene_take_photo_face").disable(); - $("#motif").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_supprimer_photo_face").prop('disabled', true); - $("ebene_take_photo_face").prop('disabled', true); - $("motif").prop('disabled', true); - - $("#div_wait_face_ebene").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - compare_face = $("#compare_face").val(); - - var dataURL = canvas.toDataURL("image/jpeg"); - - $.ajax({ - url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/", - type: 'POST', - data: {'image_face' : dataURL, 'compare_face' : compare_face, 'del_face' : "1", 'motif' : motif}, - success: function(data) { - $("#ebene_take_photo_face").enable(); - $("#div_wait_face_ebene").html(''); - $("#message_face").html(data); - photo_succes = $("#photo_succes").val(); - if(photo_succes=="1") - { - $("#okId").val("-1"); - $("#okId_face").val("-1"); - - document.getElementById('photo_face').setAttribute('src', ""); - - $("#faceRegistered").val("0"); - - $("#ebene_confirmer_photo_face").disable(); - $("#ebene_supprimer_photo_face").disable(); - $("#motif").disable(); - - $("ebene_confirmer_photo_face").prop('disabled', true); - $("ebene_supprimer_photo_face").prop('disabled', true); - $("motif").prop('disabled', true); - - v_msg="Face supprimée avec succès!"; - v_msgEng="Face removed successfully!"; - // alert_ebene(v_msg, v_msgEng); - setTimeout(() => { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); - }, 1000) - } - }, - error: function(data) { - }, - complete: function(data) { - $("#div_wait_face_ebene").html(''); - } - }); - } -} - -function fiche_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"); -} diff --git a/extranet/Modele/Adherent.php b/extranet/Modele/Adherent.php deleted file mode 100644 index 815d37a..0000000 --- a/extranet/Modele/Adherent.php +++ /dev/null @@ -1,244 +0,0 @@ -executerRequete($sql, array($idAdherent)); - return $adherent->fetch(PDO::FETCH_ASSOC); - } - - public function getAdherents($noadherentsearch=null, $noPiecesearch=null, $emailsearch=null, - $nomsearch=null, $prenomsearch=null, $telsearch=null) { - - $noadherentsearch = contruireParamLike($noadherentsearch); - $noPiecesearch = contruireParamLike($noPiecesearch); - $emailsearch = contruireParamLike($emailsearch); - $nomsearch = contruireParamLike($nomsearch); - $prenomsearch = contruireParamLike($prenomsearch); - $telsearch = contruireParamLike($telsearch); - - $sql = 'select A.* from vw_p_adherent A WHERE (A.codeSociete=?) AND (numeroAdherent LIKE ?) - AND (emailAdherent LIKE ?) AND (nomAdherent LIKE ?) AND (prenomsAdherent LIKE ?) - AND (telephonePortableAdherent LIKE ?)'; - - $adherent = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $noadherentsearch, $noPiecesearch, $emailsearch,$nomsearch, $prenomsearch, $telsearch)); - return $adherent; - } - - public function getAdherent($numeroAdherent) { - $sql = 'sselect A.* from vw_p_adherent A WHERE (A.codeSociete=?) AND (A.numeroAdherent=?)'; - - $adherent = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroAdherent)); - return $adherent; - } - - public function getAdherentId($idAdherent) { - $sql = 'sselect A.* from vw_p_adherent A where (A.idAdherent=?)'; - $adherent = $this->executerRequete($sql, array($idAdherent)); - return $adherent->fetch(PDO::FETCH_ASSOC); - } - - public function getAdherentIdConso($idAdherent) { - $sql = 'call sp_p_get_adherent_id_conso(?);'; - $adherent = $this->executerRequete($sql, array($idAdherent)); - return $adherent->fetch(PDO::FETCH_ASSOC); - } - - public function getIdAdherent($numeroAdherent) { - $sql = 'SELECT idAdherent FROM vw_p_adherent WHERE (codeSociete=?) AND (numeroAdherent=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroAdherent)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['idAdherent']; - } - - public function getContexteAdherentId($idAdherent) { - - $sql = 'select * from vw_p_adherent where (idAdherent=?);'; - $resultat = $this->executerRequete($sql, array($idAdherent)); - - $context = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idClient_C'] = $context['idClient']; - $_SESSION['p_numeroClient_C'] = $context['numeroClient']; - $_SESSION['p_nomClient_C'] = $context['nomClient']; - $_SESSION['p_adresseGeoClient_C'] = $context['adresseGeoClient']; - $_SESSION['p_boitepostaleClient_C'] = $context['boitepostaleClient']; - $_SESSION['p_telephoneBureauClient_C'] = $context['telephoneBureauClient']; - $_SESSION['p_telephonePortableClient_C'] = $context['telephonePortableClient']; - $_SESSION['p_faxClient_C'] = $context['faxClient']; - $_SESSION['p_emailClient_C'] = $context['emailClient']; - $_SESSION['p_idPolice_C'] = $context['idPolice']; - $_SESSION['p_numeroPolice_C'] = $context['numeroPolice']; - $_SESSION['p_dateEffetPolice_C'] = $context['dateEffetPolice']; - $_SESSION['p_dateFinPolice_C'] = $context['dateFinPolice']; - $_SESSION['p_dateEcheancePolice_C'] = $context['dateEcheancePolice']; - $_SESSION['p_codeEtatPolice_C'] = $context['codeEtatPolice']; - $_SESSION['p_idCollege_C'] = $context['idCollege']; - $_SESSION['p_codeProduit_C'] = $context['codeProduit']; - $_SESSION['p_idAdherent_C'] = $context['idAdherent']; - $_SESSION['p_numeroAdherent_C'] = $context['numeroAdherent']; - $_SESSION['p_nomAdherent_C'] = $context['nomAdherent']; - $_SESSION['p_prenomsAdherent_C'] = $context['prenomsAdherent']; - $_SESSION['p_adherent_C'] = $context['adherent']; - $_SESSION['p_telephonePortableAdherent_C'] = $context['telephonePortableAdherent']; - $_SESSION['p_codeLangueAdherent'] = $context['codeLangueAdherent']; - $_SESSION['p_emailAdherent_C'] = $context['emailAdherent']; - $_SESSION['p_produit_C'] = $context['produit']; - $_SESSION['p_libelleCollege_C'] = $context['libelleCollege']; - $_SESSION['p_exercieReference_C'] = $context['exercieReference']; - $_SESSION['idEntetecontrat'] = $context['idEntetecontrat']; - - $_SESSION['p_adresseGeoAdherent_C'] = ""; - $_SESSION['p_paysAdherent_C'] = ""; - $_SESSION['p_adressePostaleAdherent_C'] = ""; - $_SESSION['p_telephonFixeAdherent_C'] = ""; - $_SESSION['p_nomBeneficiaire_C'] = ""; - $_SESSION['p_prenomsBeneficiaire_C'] = ""; - $_SESSION['p_beneficiaire_C'] = ""; - $_SESSION['p_codeLienParente_C'] = ""; - $_SESSION['p_numeroPiece_C'] = ""; - $_SESSION['p_sexe_C'] = ""; - $_SESSION['p_codeGroupeSanguin_C'] = ""; - $_SESSION['p_dateNaissance_C'] = ""; - $_SESSION['p_telephonePortableBeneficiaire_C'] = ""; - $_SESSION['p_dateEntreeBeneficiaire_C'] = ""; - $_SESSION['p_dateSortieBeneficiaire_C'] = ""; - $_SESSION['p_codeMotifSortie_C'] = ""; - $_SESSION['p_codeEtatBeneficiaire_C'] = ""; - $_SESSION['p_lienPhoto_C'] = ""; - $_SESSION['p_dateEffetBeneficiaire_C'] = ""; - $_SESSION['p_dateEffetCouvert'] = "0"; - $_SESSION['p_enVigueur_C'] = ""; - $_SESSION['p_naturepiece_C'] = ""; - $_SESSION['p_lienparente_C'] = ""; - $_SESSION['p_motifsortie_C'] = ""; - $_SESSION['p_etatbeneficiaire_C'] = ""; - $_SESSION['p_ageBeneficiaire_C'] = ""; - $_SESSION['p_idBeneficiaire_C'] = ""; - - $_SESSION['p_decede_C'] = ""; - $_SESSION['p_dateDeces_C'] = ""; - - $_SESSION['p_user_id_C'] = "0"; - $_SESSION['p_user_id_substitut'] = "0"; - $_SESSION['p_finger_id_C'] = "0"; - - $_SESSION['p_numeroBeneficiaire_C'] = ""; - $_SESSION['p_numeroFeuilleMaladie_C'] = "0"; - $_SESSION['p_numeroPrescription_C'] = "0"; - $_SESSION['p_numeroPrescription_C'] = "0"; - $_SESSION['p_idFacture_C'] = "0"; - $_SESSION['p_idBeneficiaire_sav'] = "0"; - - return $context; - } - - public function getContexteAdherentIdConso($idAdherent) { - - $sql = 'call sp_p_get_contexte_adherent_id_conso(?);'; - $resultat = $this->executerRequete($sql, array($idAdherent)); - - $context = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idClient_C'] = $context['idClient']; - $_SESSION['p_numeroClient_C'] = $context['numeroClient']; - $_SESSION['p_nomClient_C'] = $context['nomClient']; - $_SESSION['p_adresseGeoClient_C'] = $context['adresseGeoClient']; - $_SESSION['p_boitepostaleClient_C'] = $context['boitepostaleClient']; - $_SESSION['p_telephoneBureauClient_C'] = $context['telephoneBureauClient']; - $_SESSION['p_telephonePortableClient_C'] = $context['telephonePortableClient']; - $_SESSION['p_faxClient_C'] = $context['faxClient']; - $_SESSION['p_emailClient_C'] = $context['emailClient']; - $_SESSION['p_idPolice_C'] = $context['idPolice']; - $_SESSION['p_numeroPolice_C'] = $context['numeroPolice']; - $_SESSION['p_dateEffetPolice_C'] = $context['dateEffetPolice']; - $_SESSION['p_dateFinPolice_C'] = $context['dateFinPolice']; - $_SESSION['p_dateEcheancePolice_C'] = $context['dateEcheancePolice']; - $_SESSION['p_codeEtatPolice_C'] = $context['codeEtatPolice']; - $_SESSION['p_idCollege_C'] = $context['idCollege']; - $_SESSION['p_codeProduit_C'] = $context['codeProduit']; - $_SESSION['p_idAdherent_C'] = $context['idAdherent']; - $_SESSION['p_numeroAdherent_C'] = $context['numeroAdherent']; - $_SESSION['p_nomAdherent_C'] = $context['nomAdherent']; - $_SESSION['p_prenomsAdherent_C'] = $context['prenomsAdherent']; - $_SESSION['p_adherent_C'] = $context['adherent']; - $_SESSION['p_telephonePortableAdherent_C'] = $context['telephonePortableAdherent']; - $_SESSION['p_codeLangueAdherent'] = $context['codeLangueAdherent']; - $_SESSION['p_emailAdherent_C'] = $context['emailAdherent']; - $_SESSION['p_produit_C'] = $context['produit']; - $_SESSION['p_libelleCollege_C'] = $context['libelleCollege']; - - $_SESSION['p_adresseGeoAdherent_C'] = ""; - $_SESSION['p_paysAdherent_C'] = ""; - $_SESSION['p_adressePostaleAdherent_C'] = ""; - $_SESSION['p_telephonFixeAdherent_C'] = ""; - $_SESSION['p_nomBeneficiaire_C'] = ""; - $_SESSION['p_prenomsBeneficiaire_C'] = ""; - $_SESSION['p_beneficiaire_C'] = ""; - $_SESSION['p_codeLienParente_C'] = ""; - $_SESSION['p_numeroPiece_C'] = ""; - $_SESSION['p_sexe_C'] = ""; - $_SESSION['p_codeGroupeSanguin_C'] = ""; - $_SESSION['p_dateNaissance_C'] = ""; - $_SESSION['p_telephonePortableBeneficiaire_C'] = ""; - $_SESSION['p_dateEntreeBeneficiaire_C'] = ""; - $_SESSION['p_dateSortieBeneficiaire_C'] = ""; - $_SESSION['p_codeMotifSortie_C'] = ""; - $_SESSION['p_codeEtatBeneficiaire_C'] = ""; - $_SESSION['p_lienPhoto_C'] = ""; - $_SESSION['p_dateEffetBeneficiaire_C'] = ""; - $_SESSION['p_dateEffetCouvert'] = "0"; - $_SESSION['p_enVigueur_C'] = ""; - $_SESSION['p_naturepiece_C'] = ""; - $_SESSION['p_lienparente_C'] = ""; - $_SESSION['p_motifsortie_C'] = ""; - $_SESSION['p_etatbeneficiaire_C'] = ""; - $_SESSION['p_ageBeneficiaire_C'] = ""; - $_SESSION['p_idBeneficiaire_C'] = ""; - $_SESSION['p_numeroBeneficiaire_C'] = ""; - $_SESSION['p_numeroFeuilleMaladie_C'] = "0"; - $_SESSION['p_numeroPrescription_C'] = "0"; - $_SESSION['p_idFacture_C'] = "0"; - - $_SESSION['p_decede_C'] = ""; - $_SESSION['p_dateDeces_C'] = ""; - $_SESSION['p_idBeneficiaire_sav'] = "0"; - - return $context; - } - - public function existeligne($numeroAdherent) { - $sql = 'select id FROM adherent WHERE (codeSociete=?) and (numeroAdherent=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$numeroAdherent)); - return ($resultat->rowCount() > 0); - } - - public function getRapportSpAdherent($idAdherent) - { - $dj = date("Y-m-d"); - $sql = 'call sp_rapport_sp_adherent(?, ?)'; - - $sppolice = $this->executerRequete($sql, array($idAdherent, $dj)); - return $sppolice->fetch(PDO::FETCH_ASSOC); - } - - public function getentetecontrat($idEntetecontrat) - { - $sql = 'SELECT * FROM entetecontrat WHERE id=? limit 1;'; - - $resultat = $this->executerRequete($sql, array($idEntetecontrat)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function controlerplafondadherentannuel($idAdherent) - { - $sql = 'select fn_control_plafond_adherent_courant(?) as controlerPlafondAdherent;'; - - $resultat = $this->executerRequete($sql, array($idAdherent)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_controlerPlafondAdherent'] = $ligne['controlerPlafondAdherent']; - } -} \ No newline at end of file diff --git a/extranet/Modele/Affection.php b/extranet/Modele/Affection.php deleted file mode 100644 index 7dd1972..0000000 --- a/extranet/Modele/Affection.php +++ /dev/null @@ -1,84 +0,0 @@ -executerRequete($sql, array($codeSociete, $codeTypeAffection)); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getAffections($codeAffection=null,$libelle=null) { - $codeAffection = contruireParamLike($codeAffection); - $libelle = contruireParamLike($libelle); - - $sql = 'SELECT A.id, A.codeSociete, A.codeAffection, A.libelle, A.codeType, B.libelle as libelleType - FROM affection A left join typeaffection B on (B.codeSociete=A.codeSociete AND B.codeType=A.codeType) - WHERE (A.codeSociete=? AND A.codeAffection LIKE ? AND A.libelle LIKE ?) order by A.libelle'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeAffection,$libelle)); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - public function getAffection($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeAffection, A.libelle, A.codeType, B.libelle as libelleType - FROM affection A left join typeaffection B on (B.codeSociete=A.codeSociete AND B.codeType=A.codeType) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $affection = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($affection->rowCount() > 0) - return $affection->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun affection ne correspond à cet id : '$id'"); - } - public function getnombreAffection() - { - $sql = 'select count(*) as nbAffection FROM affection A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbAffection']; - } - - public function ajouter($codeSociete, $codeAffection, $libelle, $codeType) { - $sql = 'INSERT INTO affection (codeSociete, codeAffection, libelle, codeType) VALUES (?,?,?,?)'; - $this->executerRequete($sql, array($codeSociete, $codeAffection, $libelle, $codeType)); - } - - public function modifier($id, $codeAffection, $libelle, $codeType) { - $sql = 'UPDATE affection SET codeAffection=?, libelle=?, codeType=? where (id=?)'; - $this->executerRequete($sql, array($codeAffection, $libelle, $codeType, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM affection WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeAffection) { - $sql = 'select id FROM affection WHERE (codeSociete=?) and (codeAffection=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeAffection)); - return ($resultat->rowCount() > 0); - } -} \ No newline at end of file diff --git a/extranet/Modele/Banque.php b/extranet/Modele/Banque.php deleted file mode 100644 index 72cf00b..0000000 --- a/extranet/Modele/Banque.php +++ /dev/null @@ -1,52 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codebanque,$libelle)); - return $banques; - } - public function getBanque($id) { - $sql = 'SELECT id, codeSociete, codebanque, libelle - FROM banque A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $banque = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($banque->rowCount() > 0) - return $banque->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune banque ne correspond à cet id : '$id'"); - } - public function getNombreBanque() - { - $sql = 'select count(*) as nbBanque FROM banque A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbBanque']; - } - - public function ajouter($codeSociete, $codebanque, $libelle) { - $sql = 'INSERT INTO banque (codeSociete, codebanque, libelle) VALUES (?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codebanque, $libelle)); - } - - public function modifier($id, $codebanque, $libelle) { - $sql = 'UPDATE banque SET codebanque=?, libelle=? where (id=?)'; - $this->executerRequete($sql, array($codebanque, $libelle, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM banque WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codebanque) { - $sql = 'select id FROM banque WHERE (codeSociete=?) and (codebanque=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codebanque)); - return ($resultat->rowCount() > 0); - } -} \ No newline at end of file diff --git a/extranet/Modele/Beneficiaire.php b/extranet/Modele/Beneficiaire.php deleted file mode 100644 index 6e8b733..0000000 --- a/extranet/Modele/Beneficiaire.php +++ /dev/null @@ -1,567 +0,0 @@ -executerRequete($sql); - return $beneficiaire; - } - - public function getBeneficiaires($nomBeneficiaire, $prenomsBeneficiaire, $telephonePortable, $email) - { - $nomBeneficiaire = contruireParamLike($nomBeneficiaire); - $prenomsBeneficiaire = contruireParamLike($prenomsBeneficiaire); - $telephonePortable = contruireParamLike($telephonePortable); - $email = contruireParamLike($email); - - $sql = 'call sp_p_get_beneficiaires(?, ?, ?, ?, ?);'; - - $adherent = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $nomBeneficiaire, $prenomsBeneficiaire, $telephonePortable, $email)); - return $adherent; - } - - public function getBeneficiairesAdh($numeroAdherent) { - $sql = 'SELECT * from vw_p_beneficiaire A WHERE (A.codeSociete=?) AND (A.numeroAdherent=?) order by A.numeroBeneficiaire'; - - $beneficiaires = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroAdherent)); - return $beneficiaires; - } - - public function getBeneficiaire($numeroBeneficiaire) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_no(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBeneficiaire, $codeReseau, $codePrestataire)); - return $beneficiaire; - } - - public function getBeneficiaireConsultation($numeroBonConsultation) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_consultation(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonConsultation, $codeReseau, $codePrestataire)); - return $beneficiaire; - } - - public function getBeneficiaireConsultationCso($numeroBonConsultation) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_consultation_cso(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonConsultation, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOrdonnance($numeroBonOrdonnance) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_ordonnance(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonOrdonnance, $codeReseau, $codePrestataire)); - return $beneficiaire; - } - - public function getBeneficiaireOptique($numeroBonOptique) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_optique(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonOptique, $codeReseau, $codePrestataire)); - return $beneficiaire; - } - - public function getBeneficiaireOrdonnanceCso($numeroBonOrdonnance) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_ordonnance_cso(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonOrdonnance, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOptiqueCso($numeroBonOptique) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_optique_cso(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonOptique, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireExamenCso($numeroBonExamen) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_examen_cso(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonExamen, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireKineCso($numeroBonKine) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_kine_cso(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonKine, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireSeanceKine($numeroBonSeance) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_seance_kine(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonSeance, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOrdonnancePha($numeroBonOrdonnance) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_ordonnance(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonOrdonnance, $codeReseau, $codePrestataire)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOrdonnanceLab($numeroBonExamen) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_examen(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonExamen, $codeReseau, $codePrestataire)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOrdonnanceLabCsoExt($numeroBonExamen) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_examen_cso_ext(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonExamen, $codeReseau, $codePrestataire)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOrdonnanceSea($numeroBonKine) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_seance(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonKine, $codeReseau, $codePrestataire)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireOrdonnanceOpt($numeroBonOptique) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_optique(?, ?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBonOptique, $codeReseau, $codePrestataire)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getBeneficiaireHospit($numeroBonHospitalisation) - { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_hospit(?, ?, ?);'; - - $beneficiaire = $this->executerRequete($sql, array($codePrestataire, $numeroBonHospitalisation, $codeReseau)); - return $beneficiaire->fetch(PDO::FETCH_ASSOC); - } - - public function getIdBeneficiaire($numeroBeneficiaire) { - $sql = 'SELECT idBeneficiaire FROM vw_p_beneficiaire WHERE (codeSociete=?) AND (numeroBeneficiaire=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroBeneficiaire)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['idBeneficiaire']; - } - - public function getIdPremierBeneficiaire($idAdherent) { - $sql = 'SELECT idBeneficiaire FROM vw_p_beneficiaire WHERE (idAdherent=?)'; - $resultat = $this->executerRequete($sql, array($idAdherent)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['idBeneficiaire']; - } - - public function getContexteBeneficiaireId($idBeneficiaire) { - $codeReseau = $_SESSION['p_codeReseauPrestataire_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_beneficiaire_id(?, ?, ?);'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $codeReseau, $codePrestataire)); - $context = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idBeneficiaire_C'] = $context['idBeneficiaire']; - $_SESSION['p_idBeneficiaire_sav'] = $_SESSION['p_idBeneficiaire_C']; - - $_SESSION['p_user_id_C'] = $context['user_id']; - $_SESSION['p_user_id_substitut'] = $context['user_id']; - $_SESSION['p_finger_id_C'] = $context['finger_id']; - - $_SESSION['p_idSubstitut_C'] = $context['idSubstitut']; - $_SESSION['p_substitutnonassure_C'] = $context['substitutnonassure']; - $_SESSION['p_substitutenVigueur_C'] = $context['substitutenVigueur']; - - $_SESSION['p_idClient_C'] = $context['idClient']; - $_SESSION['p_numeroClient_C'] = $context['numeroClient']; - $_SESSION['p_nomClient_C'] = $context['nomClient']; - $_SESSION['p_adresseGeoClient_C'] = $context['adresseGeoClient']; - $_SESSION['p_boitepostaleClient_C'] = $context['boitepostaleClient']; - $_SESSION['p_telephoneBureauClient_C'] = $context['telephoneBureauClient']; - $_SESSION['p_telephonePortableClient_C'] = $context['telephonePortableClient']; - $_SESSION['p_faxClient_C'] = $context['faxClient']; - $_SESSION['p_emailClient_C'] = $context['emailClient']; - $_SESSION['p_idPolice_C'] = $context['idPolice']; - $_SESSION['p_numeroPolice_C'] = $context['numeroPolice']; - $_SESSION['p_dateEffetPolice_C'] = $context['dateEffetPolice']; - $_SESSION['p_dateFinPolice_C'] = $context['dateFinPolice']; - $_SESSION['p_dateEcheancePolice_C'] = $context['dateEcheancePolice']; - $_SESSION['p_codeEtatPolice_C'] = $context['codeEtatPolice']; - $_SESSION['p_idCollege_C'] = $context['idCollege']; - $_SESSION['p_codeProduit_C'] = $context['codeProduit']; - $_SESSION['p_idAdherent_C'] = $context['idAdherent']; - $_SESSION['p_numeroAdherent_C'] = $context['numeroAdherent']; - $_SESSION['p_numeroBeneficiaire_C'] = $context['numeroBeneficiaire']; - $_SESSION['p_nomBeneficiaire_C'] = $context['nomBeneficiaire']; - $_SESSION['p_prenomsBeneficiaire_C'] = $context['prenomsBeneficiaire']; - $_SESSION['p_beneficiaire_C'] = $context['beneficiaire']; - $_SESSION['p_codeLienParente_C'] = $context['codeLienParente']; - $_SESSION['p_numeroPiece_C'] = $context['numeroPiece']; - $_SESSION['p_sexe_C'] = $context['sexe']; - $_SESSION['p_codeGroupeSanguin_C'] = $context['codeGroupeSanguin']; - $_SESSION['p_dateNaissance_C'] = $context['dateNaissance']; - $_SESSION['p_telephonePortableBeneficiaire_C'] = $context['telephonePortableBeneficiaire']; - $_SESSION['p_dateEntreeBeneficiaire_C'] = $context['dateEntreeBeneficiaire']; - $_SESSION['p_dateSortieBeneficiaire_C'] = $context['dateSortieBeneficiaire']; - $_SESSION['p_codeMotifSortie_C'] = $context['codeMotifSortie']; - $_SESSION['p_codeEtatBeneficiaire_C'] = $context['codeEtatBeneficiaire']; - $_SESSION['p_lienPhoto_C'] = $context['lienPhoto']; - $_SESSION['p_dateEffetBeneficiaire_C'] = $context['dateEffetBeneficiaire']; - $_SESSION['p_dateEffetCouvert'] = $context['dateEffetCouvert']; - $_SESSION['p_enVigueur_C'] = $context['enVigueur']; - $_SESSION['p_nomAdherent_C'] = $context['nomAdherent']; - $_SESSION['p_prenomsAdherent_C'] = $context['prenomsAdherent']; - $_SESSION['p_adherent_C'] = $context['adherent']; - $_SESSION['p_adresseGeoAdherent_C'] = $context['adresseGeoAdherent']; - $_SESSION['p_adressePostaleAdherent_C'] = $context['adressePostaleAdherent']; - $_SESSION['p_paysAdherent_C'] = $context['paysAdherent']; - $_SESSION['p_telephonePortableAdherent_C'] = $context['telephonePortableAdherent']; - $_SESSION['p_codeLangueAdherent'] = $context['codeLangueAdherent']; - $_SESSION['p_telephonFixeAdherent_C'] = $context['telephonFixeAdherent']; - $_SESSION['p_emailAdherent_C'] = $context['emailAdherent']; - $_SESSION['p_produit_C'] = $context['produit']; - $_SESSION['p_naturepiece_C'] = $context['naturepiece']; - $_SESSION['p_lienparente_C'] = $context['lienparente']; - $_SESSION['p_motifsortie_C'] = $context['motifsortie']; - $_SESSION['p_exercieReference_C'] = $context['exercieReference']; - $_SESSION['idEntetecontrat'] = $context['idEntetecontrat']; - $_SESSION['p_anciennete'] = $context['anciennete']; - $_SESSION['p_delaiCarenceBeneficiaire'] = $context['delaiCarenceBeneficiaire']; - $_SESSION['p_derogationFingerPermanent'] = $context['derogationFingerPermanent']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $_SESSION['p_etatbeneficiaire_C'] = $context['etatbeneficiaireEng']; - } - else - { - $_SESSION['p_etatbeneficiaire_C'] = $context['etatbeneficiaire']; - } - - $_SESSION['p_libelleCollege_C'] = $context['libelleCollege']; - $_SESSION['p_ageBeneficiaire_C'] = $context['ageBeneficiaire']; - $_SESSION['p_college_couvert_C'] = $context['college_couvert']; - - // $_SESSION['p_accesAjoutPh_C'] = $context['accesAjoutPh']; - $_SESSION['p_accesAjoutPhClient'] = $context['accesAjoutPhClient']; - $_SESSION['p_ajoutPrescription_C'] = $context['ajoutPrescription']; - $_SESSION['p_ajoutPrescriptionExam_C'] = $context['ajoutPrescriptionExam']; - - $_SESSION['p_derogation_en_cours_C'] = $context['derogation_en_cours']; - $_SESSION['p_tmDerogation_C'] = $context['tmDerogation']; - - $_SESSION['p_derogation_finger_en_cours_C'] = $context['derogation_finger_en_cours']; - $_SESSION['p_tm_C'] = $context['tm']; - $_SESSION['p_appliquerTmHospit_C'] = $context['appliquerTmHospit']; - $_SESSION['p_numeroFeuilleMaladie_C'] = "0"; - $_SESSION['p_numeroPrescription_C'] = "0"; - $_SESSION['p_idFacture_C'] = "0"; - - $_SESSION['p_decede_C'] = $context['decede']; - $_SESSION['p_dateDeces_C'] = $context['dateDeces']; - - $_SESSION['p_tmPrestataireEnPlus_C'] = $context['tmPrestataireEnPlus']; - - if($_SESSION['p_tmPrestataireEnPlus_C']>0) - { - $_SESSION['p_tm_C'] = $_SESSION['p_tmPrestataireEnPlus_C']; - } - - - $_SESSION['p_tmPrestataireTm_C'] = $context['tmPrestataireTm']; - $_SESSION['p_tmPrestataireTmExiste_C'] = $context['tmPrestataireTmExiste']; - - // if($_SESSION['p_tmPrestataireTm_C']>0) - if($_SESSION['p_tmPrestataireTmExiste_C']>0) - { - $_SESSION['p_tm_C'] = $_SESSION['p_tmPrestataireTm_C']; - } - - if($_SESSION['p_derogation_en_cours_C']>0) - { - $_SESSION['p_tm_C'] = $_SESSION['p_tmDerogation_C']; - } - - // vérifier que la photo du bénéficiaire existe - if ($_SESSION['p_lienPhoto_C']>" ") - { - if(!@fopen($_SESSION['p_dossierPhoto_C'].$_SESSION['p_dossierSociete'].'/Photos/'.$_SESSION['p_lienPhoto_C'], 'r')) - { - $_SESSION['p_lienPhoto_C'] = ""; - } - } - - $_SESSION['p_tm_F'] = "0"; - - return $context; - } - - public function getBeneficiairesId($idAdherent) { - $sql = 'SELECT * FROM vw_p_beneficiaire A WHERE (A.idAdherent=?) and (A.supprime!="1") order by A.codeLienParente, A.numeroBeneficiaire'; - - $beneficiaires = $this->executerRequete($sql, array($idAdherent)); - return $beneficiaires; - } - - public function getentetecontrat($idEntetecontrat) - { - $sql = 'SELECT * FROM entetecontrat WHERE id=? limit 1;'; - - $resultat = $this->executerRequete($sql, array($idEntetecontrat)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function controlerplafondbeneficiaireannuel($idBeneficiaire) - { - $sql = 'select fn_control_plafond_beneficiaire_courant(?) as controlerPlafondBeneficiaire;'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_controlerPlafondBeneficiaire'] = $ligne['controlerPlafondBeneficiaire']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - - $this->controlerplafondadherentannuel($idAdherent); - } - - public function controlerplafondadherentannuel($idAdherent) - { - $sql = 'select fn_control_plafond_adherent_courant(?) as controlerPlafondAdherent;'; - - $resultat = $this->executerRequete($sql, array($idAdherent)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_controlerPlafondAdherent'] = $ligne['controlerPlafondAdherent']; - } - - public function registerface($numeroBeneficiaire) - { - /* - $sql = 'update beneficiaire set faceRegistered="1" WHERE (numeroBeneficiaire=?)'; - $this->executerRequete($sql, array($numeroBeneficiaire)); - */ - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_register_face(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroBeneficiaire, $codePrestataire, $user)); - } - - public function unregisterface($numeroBeneficiaire, $motif) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_remove_face(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroBeneficiaire, $codePrestataire, $user, $motif)); - } - - // - public function init_reconnaitrelaface() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_init_reconnaitrelaface(?, ?);'; - $resultat = $this->executerRequete($sql, array($codePrestataire, $user)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idLogapiface'] = $ligne['idLogapiface']; - } - - public function succes_reconnaitrelaface($username, $resultat) - { - $idLogapiface = $_SESSION['p_idLogapiface']; - - $sql = 'call sp_succes_reconnaitrelaface(?, ?, ?);'; - $this->executerRequete($sql, array($idLogapiface, $username, $resultat)); - } - - - public function echec_reconnaitrelaface($resultat) - { - $idLogapiface = $_SESSION['p_idLogapiface']; - - $sql = 'call sp_echec_reconnaitrelaface(?, ?);'; - $this->executerRequete($sql, array($idLogapiface, $resultat)); - } - - public function init_enregisterlaface() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_init_enregisterlaface(?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($codePrestataire, $user, $username)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idLogapiface'] = $ligne['idLogapiface']; - } - - public function init_supprimerlaface() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_init_supprimerlaface(?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($codePrestataire, $user, $username)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idLogapiface'] = $ligne['idLogapiface']; - } - - public function init_confirmerlaface($del) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_init_confirmerlaface(?, ?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($codePrestataire, $user, $username, $del)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idLogapiface'] = $ligne['idLogapiface']; - } - - public function getlogreconnaissancefaciale($debut, $fin) - { - $ipConnexion = contruireParamLike($ipConnexion); - - $sql = 'call sp_get_logreconnaissancefaciale(?, ?)'; - - $resultat = $this->executerRequete($sql, array($debut, $fin)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function changerPhoto($id, $nomImage) - { - $sql = 'update beneficiaire set lienPhoto=?, faceRegistered="1" WHERE (id=?)'; - $this->executerRequete($sql, array($nomImage, $id)); - } - - public function supprimerPhoto($id) - { - $sql = 'update beneficiaire set lienPhoto="", faceRegistered="0" WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function init_traiterlaface($codeActionFace) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $username = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_init_traiterlaface(?, ?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($codePrestataire, $user, $username, $codeActionFace)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idLogapiface'] = $ligne['idLogapiface']; - } - - public function resultat_traitement_face($username, $success, $message) - { - $idLogapiface = $_SESSION['p_idLogapiface']; - - $sql = 'CALL sp_resultat_traitement_face(?, ?, ?, ?);'; - - $this->executerRequete($sql, array($idLogapiface, $username, $success, $message)); - } - - public function getModeBiometrie() { - $sql = 'CALL sp_p_get_mode_biometrie(?, ?);'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $_SESSION['p_codePrestataire_C'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_codeModeBiometrieSociete'] = $ligne['codeModeBiometrieSociete']; - $_SESSION['p_codeModeBiometrie'] = $ligne['codeModeBiometrie']; - - $codeModeBiometrie = $_SESSION['p_codeModeBiometrie']; - if($codeModeBiometrie=='1' or $codeModeBiometrie=='3'){ - $_SESSION['p_fingerActif'] = '1'; - } - else{ - $_SESSION['p_fingerActif'] = '0'; - } - - if($codeModeBiometrie=='2' or $codeModeBiometrie=='3'){ - $_SESSION['p_faceActif'] = '1'; - } - else{ - $_SESSION['p_faceActif'] = '0'; - } - - } - -} \ No newline at end of file diff --git a/extranet/Modele/Beneficiaire_temp.php b/extranet/Modele/Beneficiaire_temp.php deleted file mode 100644 index 13c01f1..0000000 --- a/extranet/Modele/Beneficiaire_temp.php +++ /dev/null @@ -1,87 +0,0 @@ -executerRequete($sql, array($idAdherent, $dateEntree, $user, $prorata)); - return $adherent_temp->fetch(PDO::FETCH_ASSOC); - } - - public function getListeBeneficiaire_temp() - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_afficher_beneficiaire_resiliation(?);'; - - $beneficiaires = $this->executerRequete($sql, array($user)); - return $beneficiaires->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeBeneficiaire_temp_Ren() - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_afficher_beneficiaire_renouvellement(?);'; - - $beneficiaires = $this->executerRequete($sql, array($user)); - return $beneficiaires->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeBeneficiaire_temp_Ret() - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_afficher_beneficiaire_a_retirer(?);'; - - $beneficiaires = $this->executerRequete($sql, array($user)); - return $beneficiaires->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeBeneficiaire_temp_Ret_Selection() - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_afficher_beneficiaire_retrait(?);'; - - $beneficiaires = $this->executerRequete($sql, array($user)); - return $beneficiaires->fetchAll(PDO::FETCH_ASSOC); - } - - - public function recapitulerretrait() - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_recapituler_retrait(?);'; - - $this->executerRequete($sql, array($user)); - } - - public function selectionretrait($idBeneficiaire, $choix) { - $sql = 'call sp_selection_retrait(?, ?)'; - $this->executerRequete($sql, array($idBeneficiaire, $choix)); - } - - public function selectionlimite($idBeneficiaire, $choix) { - $sql = 'update beneficiaire_temp set choix=? WHERE (id=?);'; - $this->executerRequete($sql, array($choix, $idBeneficiaire)); - } - - public function selectionlimitetout($idCollegeTemp, $choix) { - $sql = 'update beneficiaire_temp set choix=? WHERE (idCollegeTemp=?);'; - $this->executerRequete($sql, array($choix, $idCollegeTemp)); - } - - public function getListeBeneficiaire_temp_limite($id_college_temp) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_afficher_beneficiaire_limite(?, ?);'; - - $beneficiaires = $this->executerRequete($sql, array($id_college_temp, $user)); - return $beneficiaires->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Beneficiairerequetes.php b/extranet/Modele/Beneficiairerequetes.php deleted file mode 100644 index f14b839..0000000 --- a/extranet/Modele/Beneficiairerequetes.php +++ /dev/null @@ -1,68 +0,0 @@ -executerRequete($sql, array($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesassuretotal($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient) - { - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $numeroPolice = contruireParamLike($numeroPolice); - $telephonePortableAdherent = contruireParamLike($telephonePortableAdherent); - $emailAdherent = contruireParamLike($emailAdherent); - $nomClient = contruireParamLike($nomClient); - - $sql = 'call sp_requetes_assure_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function requetesassureexport($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient) - { - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $numeroPolice = contruireParamLike($numeroPolice); - $telephonePortableAdherent = contruireParamLike($telephonePortableAdherent); - $emailAdherent = contruireParamLike($emailAdherent); - $nomClient = contruireParamLike($nomClient); - - $sql = 'call sp_requetes_assure_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroAdherent, $numeroBeneficiaire, $adherent, $beneficiaire, $numeroPolice, $codeProduit, $codeEtatPolice, - $codeLienParente, $telephonePortableAdherent, $emailAdherent, $sexe, $codeEtatBeneficiaire, $decede, $numeroClient1, $numeroClient2, $nomClient) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Bonpec.php b/extranet/Modele/Bonpec.php deleted file mode 100644 index 0d232a6..0000000 --- a/extranet/Modele/Bonpec.php +++ /dev/null @@ -1,501 +0,0 @@ -executerRequete($sql, array($codePrestataire)); - return $bonpecs; - } - - public function afficherBonpecs($codePrestataire, $codeTypeBon, $codeEtatBon, $noDepart, $noFin) - { - $codeEtatBon = contruireParamLike($codeEtatBon); - - $sql = 'call sp_afficher_bonpecs(?, ?, ?, ?, ?, ?)'; - $bonpecs = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codePrestataire, $codeTypeBon, $codeEtatBon, $noDepart, $noFin)); - - return $bonpecs->fetchAll(PDO::FETCH_ASSOC); - } - - public function getBonId($id) { - $sql = 'select A.*, A.id as IdBon, B.libelle as typeBon, C.libelle as etatBon , - IFNULL(concat(nomBeneficiaire, " ",prenomsBeneficiaire),"") as beneficiaire - from p_bonpec A - left join typebon B on (B.codeTypeBon=A.codeTypeBon) - left join etatbon C on (C.codeEtatBon=A.codeEtatBon) - left join beneficiaire D on (D.numeroBeneficiaire=A.numeroBeneficiaire) - WHERE (A.id=?)'; - - $bonpec = $this->executerRequete($sql, array($id)); - if ($bonpec->rowCount() > 0) - return $bonpec->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun profil ne correspond à cet id : '$id'"); - } - - public function getBonNumeroBon($numeroBon) { - $sql = 'select A.*, A.id as IdBon, B.libelle as typeBon, C.libelle as etatBon , - IFNULL(concat(nomBeneficiaire, " ",prenomsBeneficiaire),"") as beneficiaire - from p_bonpec A - left join typebon B on (B.codeTypeBon=A.codeTypeBon) - left join etatbon C on (C.codeEtatBon=A.codeEtatBon) - left join beneficiaire D on (D.numeroBeneficiaire=A.numeroBeneficiaire) - WHERE (A.numeroBon=?)'; - - $bonpec = $this->executerRequete($sql, array($numeroBon)); - if ($bonpec->rowCount() > 0) - return $bonpec->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun profil ne correspond à cet N° : '$numeroBon'"); - } - - public function genererBon($codePrestataire, $codeTypeBon, $noDepart, $noFin) - { - $dj = date('Y-m-d'); - $numeroBon = "0"; - for ($numeroBon = $noDepart; $numeroBon <= $noFin; $numeroBon++) - { - $sql = 'insert into p_bonpec (codeSociete, codeTypeBon, codePrestataire, numeroBon, dateGeneration, codeUtilisateurGeneration) - values (?, ?, ?, ?, ?, ?);'; - - $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeTypeBon, $codePrestataire, $numeroBon, $dj, $_SESSION['p_login'])); - } - - $sql = 'call sp_set_dernier_numero_pec(?, ?, ?)'; - $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeTypeBon, $numeroBon-1)); - } - - public function plageLibre($codeTypeBon, $noDepart, $noFin) { - $sql = 'select id FROM p_bonpec WHERE (codeSociete=?) and (codeTypeBon=?) and (numeroBon between ? and ?) limit 1'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeTypeBon, $noDepart, $noFin)); - - return ($resultat->rowCount() == 0); - } - - public function getDenierNumeroBon($codeTypeBon) - { - $sql = 'select fn_getDenierNumeroBon(?, ?) as denierNumeroBon'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeTypeBon)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['denierNumeroBon']; - } - - public function receptionnerBon($codePrestataire, $codeTypeBon, $noDepart, $noFin) - { - $codeUtilisateurReception = $_SESSION['p_login']; - - $sql = 'UPDATE p_bonpec SET codeEtatBon="1", dateReception=curdate(), codeUtilisateurReception=?, heureReception=now() - WHERE (codePrestataire=?) AND (codeTypeBon=?) AND (numeroBon between ? and ?) AND (codeEtatBon="0")'; - - $this->executerRequete($sql, array($codeUtilisateurReception, $codePrestataire, $codeTypeBon, $noDepart, $noFin)); - } - - public function supprimerBon($noDepart, $noFin) { - $sql = 'DELETE FROM p_bonpec WHERE (numeroBon between ? and ? AND codeEtatBon="0" )'; - $this->executerRequete($sql, array($noDepart, $noFin)); - } - - public function annulerBonId($idBon, $motifAnnulation) { - $dateAnnulation = date('Y-m-d'); - $codeUtilisateurAnnulation = $_SESSION['p_login']; - - $sql = 'UPDATE p_bonpec SET codeEtatBon="3", motifAnnulation=?, dateAnnulation=?, codeUtilisateurAnnulation=? WHERE (id=?)'; - $this->executerRequete($sql, array($motifAnnulation, $dateAnnulation, $codeUtilisateurAnnulation, $idBon)); - } - - public function demanderAnnulationBonId($idBon, $motifAnnulation) { - $sql = 'call sp_p_demande_annulation_bon(?, ?)'; - $this->executerRequete($sql, array($idBon, $motifAnnulation)); - } - - public function estdisponible($codePrestataire, $numeroBon) { - $sql = 'select id FROM p_bonpec WHERE (codeEtatBon="1") AND (codePrestataire=?) AND (numeroBon=?)'; - $resultat = $this->executerRequete($sql, array($codePrestataire, $numeroBon)); - return ($resultat->rowCount() == 1); - } - - public function getetatbon($codePrestataire, $codeTypeBon, $numeroBon) { - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_infos_bon_eng(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeTypeBon, $numeroBon)); - - if($resultat->rowCount() > 0) - { - // return $resultat->fetch(PDO::FETCH_ASSOC); - return $resultat->fetch(); - } - else - return array('-1','Not Found'); - } - else - { - $sql = 'call sp_p_infos_bon(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeTypeBon, $numeroBon)); - - if($resultat->rowCount() > 0) - { - // return $resultat->fetch(PDO::FETCH_ASSOC); - return $resultat->fetch(); - } - else - return array('-1','Introuvable'); - } - /* - $sql = 'call sp_p_infos_bon(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeTypeBon, $numeroBon)); - - if($resultat->rowCount() > 0) - { - return $resultat->fetch(PDO::FETCH_ASSOC); - } - else - return array('-1','Introuvable / Not Found'); - */ - } - - - public function imrimerBon($numeroBon) { - $sql = 'SELECT A.numeroBon, A.numeroBeneficiaire, BN.numeroAdherent, A.codeActe, C.codeActeVisible, - BN.codeSexe, BN.dateNaissance, B.libelle AS prestataire, C.libelle AS acte, - IFNULL(CONCAT("Dr ", D.nom, " ", D.prenoms),"") AS medecin, A.montantacte, A.tauxCouverture, - A.montantTm, A.fichierBon, NOW() AS dateCourante, AD.numeroPolice, - CONCAT(BN.nomBeneficiaire, " ", BN.prenomsBeneficiaire) AS beneficiaire, - CONCAT(AD.nomAdherent, " ", AD.prenomsAdherent) AS assure, IFNULL(DM.dureeHospitAccordee,"No duree") AS dureeHospitAccordee, - CONCAT(CL.nom, " ", IFNULL(CL.prenoms,"")) AS souscripteur - FROM p_bonpec A - JOIN beneficiaire BN ON (BN.numeroBeneficiaire=A.numeroBeneficiaire) - JOIN adherent AD ON (AD.numeroAdherent=BN.numeroAdherent) - JOIN police P ON (P.numeroPolice=AD.numeroPolice) - JOIN client CL ON (CL.numeroClient=P.numeroClient) - JOIN prestataire B ON (B.codePrestataire=A.codePrestataire) - JOIN acte_bon C ON (C.codeActe=A.codeActe) - LEFT JOIN demandepec DM ON (DM.numeroBon=A.numeroBon) - LEFT JOIN medecin D ON (D.codeMedecin=A.codeMedecin) - Where (A.numeroBon=?)'; - - $bonpec = $this->executerRequete($sql, array($numeroBon)); - if ($bonpec->rowCount() > 0) - return $bonpec->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun bon ne correspond à cet N° : '$numeroBon'"); - } - - - public function imrimerBonVierge($numeroDossier, $montantacte, $tauxCouverture) { - $sql = 'SELECT A.id AS numeroDossier, A.numeroBeneficiaire, BN.numeroAdherent, A.codeActe, C.codeActeVisible, - BN.codeSexe, BN.dateNaissance, B.libelle AS prestataire, C.libelle AS acte, - IFNULL(CONCAT("Dr ", D.nom, " ", D.prenoms),"") AS medecin, ? AS montantacte, - ? AS tauxCouverture, "0" AS montantTm, "" AS fichierBon, NOW() AS dateCourante, AD.numeroPolice, - CONCAT(BN.nomBeneficiaire, " ", BN.prenomsBeneficiaire) AS beneficiaire, - CONCAT(AD.nomAdherent, " ", AD.prenomsAdherent) AS assure, - CONCAT(CL.nom, " ", IFNULL(CL.prenoms,"")) AS souscripteur - FROM dossier A - JOIN beneficiaire BN ON (BN.numeroBeneficiaire=A.numeroBeneficiaire) - JOIN adherent AD ON (AD.numeroAdherent=BN.numeroAdherent) - JOIN police P ON (P.numeroPolice=AD.numeroPolice) - JOIN client CL ON (CL.numeroClient=P.numeroClient) - JOIN prestataire B ON (B.codePrestataire=A.codePrestataire) - JOIN acte_bon C ON (C.codeActe=A.codeActe) - LEFT JOIN demandepec DM ON (DM.numeroBon=A.numeroBon) - LEFT JOIN medecin D ON (D.codeMedecin=A.codeMedecin) - Where (A.id=?)'; - - $bonpec = $this->executerRequete($sql, array($montantacte, $tauxCouverture, $numeroDossier)); - if ($bonpec->rowCount() > 0) - return $bonpec->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun dossier ne correspond à cet N° : '$numeroDossier'"); - } - - public function majfichierBon($numeroBon, $fichierBon) { - $sql = 'UPDATE p_bonpec SET fichierBon=? WHERE (numeroBon=?)'; - $this->executerRequete($sql, array($fichierBon, $numeroBon)); - } - - public function majBonAImprimer($numeroDemande, $numeroBon) { - $dateSysteme = date('Y-m-d'); - $codeUtilisateur = $_SESSION['p_login']; - - $sql = 'UPDATE p_bonpec , demandepec SET p_bonpec.codeEtatBon="2", p_bonpec.numeroBeneficiaire=demandepec.numeroBeneficiaire, - p_bonpec.numeroDossier=demandepec.numeroDossier, p_bonpec.codeActe=demandepec.codeActe, p_bonpec.codeMedecin=demandepec.codeMedecin, - demandepec.numeroBon=p_bonpec.numeroBon, demandepec.bonImprime="1", - tauxCouverture="100", montantTm="0", montantacte="0", p_bonpec.dateImpression=?, p_bonpec.codeUtilisateurImpression=? - WHERE (p_bonpec.numeroBon=?) AND (demandepec.id=?)'; - - $this->executerRequete($sql, array($dateSysteme, $codeUtilisateur, $numeroBon, $numeroDemande)); - } - - public function getBonpecsAssure($codePrestataire, $codeActe, $numeroBeneficiaire) { - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - - $codePrestataire = contruireParamLike($codePrestataire); - $codeActe = contruireParamLike($codeActe); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - - $sql = 'SELECT numeroBon, A.codePrestataire, P.libelle AS prestataire, A.numeroBeneficiaire, - CONCAT(BN.prenomsBeneficiaire, " ", BN.nomBeneficiaire) AS beneficiaire, - A.dateImpression, A.codeActe, AB.libelle AS acte, A.tauxCouverture - FROM p_bonpec A - LEFT JOIN beneficiaire BN ON (BN.numeroBeneficiaire=A.numeroBeneficiaire) - JOIN prestataire P ON (P.codePrestataire=A.codePrestataire) - JOIN acte_bon AB ON (AB.codeActe=A.codeActe) - WHERE (BN.numeroAdherent=?) AND (A.codeEtatBon="2") - AND (A.codePrestataire LIKE ?) AND (A.codeActe LIKE ?) - AND (A.numeroBeneficiaire LIKE ?) - ORDER BY A.dateImpression DESC'; - - $bonpecs = $this->executerRequete($sql, array($numeroAdherent, $codePrestataire, $codeActe, $numeroBeneficiaire)); - return $bonpecs; - } - - public function Rqacte($codePrestataire, $codeActe, $date1, $date2, $noDepart, $noFin, $nomBeneficiaire, - $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeActe = contruireParamLike($codeActe); - $nomBeneficiaire = contruireParamLike($nomBeneficiaire); - $prenomsBeneficiaire = contruireParamLike($prenomsBeneficiaire); - - If($numeroBeneficiaire1=="0") - { - $numeroBeneficiaire1=""; - } - - if($noDepart>0 || $noFin>0) - { - $sql = 'SELECT P.libelle AS prestataire, DATE_FORMAT(A.dateImpression, "%d/%m/%Y") AS dateImpression, numeroBon, - BN.nomBeneficiaire, BN.prenomsBeneficiaire, AB.libelle AS acte, A.tauxCouverture - FROM p_bonpec A - JOIN beneficiaire BN ON (BN.numeroBeneficiaire=A.numeroBeneficiaire) - JOIN prestataire P ON (P.codePrestataire=A.codePrestataire) - JOIN acte_bon AB ON (AB.codeActe=A.codeActe) - WHERE (A.codeEtatBon="2") AND (A.codePrestataire LIKE ?) - AND (A.codeActe LIKE ?) AND (A.numeroBon BETWEEN ? AND ?) - AND (A.dateImpression BETWEEN ? AND ?) AND (BN.nomBeneficiaire LIKE ?) - AND (BN.prenomsBeneficiaire LIKE ?) AND (A.numeroBeneficiaire BETWEEN ? AND ?) '; - - $typeuseur = $_SESSION['p_codeTypeUtilisateur']; - switch ($typeuseur) - { - case "AS": /* ASSURE*/ - { - $sql .= ' AND (BN.numeroAdherent=?) ORDER BY A.dateImpression DESC, numeroBon'; - $liste = $this->executerRequete($sql, array($codePrestataire, $codeActe, $noDepart, $noFin, $date1, $date2, - $nomBeneficiaire, $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2, $_SESSION["p_numeroAdherent_C"])); - break; - } - case "PR": /* PRESTATAIRE*/ - { - $sql .= ' AND (A.codePrestataire=?) ORDER BY A.dateImpression DESC, numeroBon'; - $liste = $this->executerRequete($sql, array($codePrestataire, $codeActe, $noDepart, $noFin, $date1, $date2, - $nomBeneficiaire, $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2, $_SESSION["p_codePrestataireUtilisateur"])); - break; - } - default: /* Dans tous les autres cas */ - { - $sql .= ' ORDER BY A.dateImpression DESC, numeroBon'; - - $liste = $this->executerRequete($sql, array($codePrestataire, $codeActe, $noDepart, $noFin, $date1, $date2, - $nomBeneficiaire, $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2)); - } - } - } else - { - $sql = 'SELECT P.libelle AS prestataire, DATE_FORMAT(A.dateImpression, "%d/%m/%Y") AS dateImpression, numeroBon, - BN.nomBeneficiaire, BN.prenomsBeneficiaire, AB.libelle AS acte, A.tauxCouverture - FROM p_bonpec A - JOIN beneficiaire BN ON (BN.numeroBeneficiaire=A.numeroBeneficiaire) - JOIN prestataire P ON (P.codePrestataire=A.codePrestataire) - JOIN acte_bon AB ON (AB.codeActe=A.codeActe) - WHERE (A.codeEtatBon="2") AND (A.codePrestataire LIKE ?) - AND (A.codeActe LIKE ?) AND (A.dateImpression BETWEEN ? AND ?) - AND (BN.nomBeneficiaire LIKE ?) AND (BN.prenomsBeneficiaire LIKE ?) - AND (A.numeroBeneficiaire BETWEEN ? AND ?) '; - - $typeuseur = $_SESSION['p_codeTypeUtilisateur']; - switch ($typeuseur) - { - case "AS": /* ASSURE*/ - { - $sql .= ' AND (BN.numeroAdherent=?) ORDER BY A.dateImpression DESC, numeroBon'; - $liste = $this->executerRequete($sql, array($codePrestataire, $codeActe, $date1, $date2, $nomBeneficiaire, - $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2, $_SESSION["p_numeroAdherent_C"])); - break; - } - case "PR": /* PRESTATAIRE*/ - { - $sql .= ' AND (A.codePrestataire=?) ORDER BY A.dateImpression DESC, numeroBon'; - $liste = $this->executerRequete($sql, array($codePrestataire, $codeActe, $date1, $date2, $nomBeneficiaire, - $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2, $_SESSION["p_codePrestataireUtilisateur"])); - break; - } - default: /* Dans tous les autres cas */ - { - $sql .= ' ORDER BY A.dateImpression DESC, numeroBon'; - $liste = $this->executerRequete($sql, array($codePrestataire, $codeActe, $date1, $date2, $nomBeneficiaire, - $prenomsBeneficiaire, $numeroBeneficiaire1, $numeroBeneficiaire2)); - } - } - } - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getInfos($idBon) - { - $sql = 'call sp_get_infos_bon(?)'; - $resultat = $this->executerRequete($sql, array($idBon)); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function enregistrerremplacementconsultation($numeroFeuilleMaladie, $OldnumeroBon, $numeroBon, $motifremplacement) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_remplacement_consultation(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $OldnumeroBon, $numeroBon, $motifremplacement, $user)); - - $_SESSION['p_numeroBonConsultation_C'] = $numeroBon; - } - - public function enregistrerremplacementordonnance($numeroFeuilleMaladie, $OldnumeroBon, $numeroBon, $motifremplacement) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_remplacement_ordonnance(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $OldnumeroBon, $numeroBon, $motifremplacement, $user)); - - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBon; - } - - // pour les requêtes - - public function requetesbonpec($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeTypeBon = contruireParamLike($codeTypeBon); - $codeEtatBon = contruireParamLike($codeEtatBon); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_bonpec(?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesbonpectotal($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeTypeBon = contruireParamLike($codeTypeBon); - $codeEtatBon = contruireParamLike($codeEtatBon); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_bonpec_total(?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function requetesbonpecexport($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeTypeBon = contruireParamLike($codeTypeBon); - $codeEtatBon = contruireParamLike($codeEtatBon); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_bonpec_export(?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeTypeBon, $codeEtatBon, - $numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getNbBonPrestataireDisponible($codePrestataire, $codeTypeBon) - { - $sql = 'select fn_get_nb_bons_prestataire_disponible(?, ?, ?) as nbBons'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codePrestataire, $codeTypeBon)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - return $ligne['nbBons']; - } - - public function getCodeGestionBon($codeTypeBon) - { - $sql = 'select codeGestionBon from p_typebon where (codeTypeBon=?)'; - - $resultat = $this->executerRequete($sql, array($codeTypeBon)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - return $ligne['codeGestionBon']; - } - - public function getGestionBon($codeGestionBon) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'SELECT libelleEng AS libelle FROM p_gestionbon WHERE (codeGestionBon=?)'; - } - else - { - $sql = 'SELECT libelle FROM p_gestionbon WHERE (codeGestionBon=?)'; - } - - $resultat = $this->executerRequete($sql, array($codeGestionBon)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - return $ligne['libelle']; - } - - public function getCodeGestionBonPrestataire() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'select codeGestionBon from prestataire where (codePrestataire=?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - return $ligne['codeGestionBon']; - } - -} \ No newline at end of file diff --git a/extranet/Modele/Client.php b/extranet/Modele/Client.php deleted file mode 100644 index fa4937a..0000000 --- a/extranet/Modele/Client.php +++ /dev/null @@ -1,222 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'], $nomsearch, $prenomsearch, $telsearch)); - return $clients; - } - - public function getClientsearch($numeroClient) { - $sql = 'SELECT A.id, A.codeSociete, numeroClient, nom, prenoms, B.libelle as Ville, telephonePortable - FROM clients A left join ville B on (B.codeSociete=A.codeSociete AND B.codeVille=A.codeVille) - WHERE (A.codeSociete=?) AND (A.numeroClient=?)'; - - $clients = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroClient)); - return $clients; - } - - public function getClientsearchPol($numeroPolice) { - $sql = 'SELECT A.id, A.codeSociete, A.numeroClient, nom, prenoms, B.libelle as Ville, telephonePortable - FROM clients A left join ville B on (B.codeSociete=A.codeSociete AND B.codeVille=A.codeVille) - join police P on (P.idClient=A.id) WHERE (A.codeSociete=?) AND (P.numeroPolice=?)'; - - $clients = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroPolice)); - return $clients; - } - - public function getClientVide() { - $sql = 'SELECT A.id, A.codeSociete, numeroClient, nom, prenoms, B.libelle as Ville, telephonePortable - FROM clients A left join ville B on (B.codeSociete=A.codeSociete AND B.codeVille=A.codeVille) - order by nom, prenoms'; - // order by nom, prenoms limit 20'; - - $clients = $this->executerRequete($sql); - return $clients; - } - - - public function getClient($numeroClient) { - $sql = 'SELECT A.id, A.codeSociete, numeroClient, A.typeClient, D.libelle as libelleTypeClient, A.codeTitre, E.libelle as libelleTitre, - A.nom, A.prenoms, adresseGeo, boitepostale, A.codeVille, C.libelle as Ville, A.codeLocalite, L.libelle as localite, A.codePays, F.libelle as pays, A.telephoneBureau, A.telephonedomicile, - A.telephonePortable, A.fax, A.email, A.sexe, A.dateNaissance, A.codeSecteur, B.libelleSecteur, A.codeGestionnaire, concat(G.nom," ", G.prenoms) as gestionnaire, - A.nomMandataire, A.telephoneFixemandataire, A.telephonePortablemandataire, A.emailMandataire, A.dateCre, A.user - FROM clients A - left join secteuractivite B on (B.codeSecteur=A.codeSecteur) - left join pays F on (F.codeSociete=A.codeSociete AND F.codePays=A.codePays) - left join ville C on (C.codeSociete=A.codeSociete AND C.codeVille=A.codeVille) - left join localite L on (L.codeSociete=A.codeSociete AND L.codeLocalite=A.codeLocalite) - left join typeclient D on (D.codeTypeClient=A.typeClient) - left join titre E on (E.codeTitre=A.codeTitre) - left join gestionnaire G on (G.codeSociete=A.codeSociete AND G.codeGestionnaire=A.codeGestionnaire) - WHERE (A.codeSociete=?) AND (A.numeroClient=?)'; - - $client = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroClient)); - return $client; - } - - public function getClientId($id) { - $sql = 'SELECT A.id, A.codeSociete, numeroClient, A.typeClient, D.libelle as libelleTypeClient, A.codeTitre, E.libelle as libelleTitre, - A.nom, A.prenoms, adresseGeo, boitepostale, A.codeVille, C.libelle as Ville, A.codeLocalite, L.libelle as localite, A.codePays, F.libelle as pays, A.telephoneBureau, A.telephonedomicile, - A.telephonePortable, A.fax, A.email, A.sexe, A.dateNaissance, A.codeSecteur, B.libelleSecteur, A.codeGestionnaire, concat(G.nom," ", G.prenoms) as gestionnaire, - A.nomMandataire, A.telephoneFixemandataire, A.telephonePortablemandataire, A.emailMandataire, A.dateCre, A.user - FROM clients A - left join secteuractivite B on (B.codeSecteur=A.codeSecteur) - left join pays F on (F.codeSociete=A.codeSociete AND F.codePays=A.codePays) - left join ville C on (C.codeSociete=A.codeSociete AND C.codeVille=A.codeVille) - left join localite L on (L.codeSociete=A.codeSociete AND L.codeLocalite=A.codeLocalite) - left join typeclient D on (D.codeTypeClient=A.typeClient) - left join titre E on (E.codeTitre=A.codeTitre) - left join gestionnaire G on (G.codeSociete=A.codeSociete AND G.codeGestionnaire=A.codeGestionnaire) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $client = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - return $client->fetch(PDO::FETCH_ASSOC); - /* - if ($client->rowCount() > 0) - return $client->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun client ne correspond au id '$id'"); - */ - } - - public function getNombreClients() - { - $sql = 'select count(*) as nbClients FROM clients A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbClients']; - } - - public function getIdClient($numeroClient) { - $sql = 'SELECT id FROM clients WHERE (codeSociete=?) AND (numeroClient=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroClient)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['id']; - } - - public function getContexteClientId($id) { - $sql = 'SELECT A.id as idClient, A.numeroClient, concat(A.nom," ",A.prenoms) as nomClient FROM clients A WHERE (A.codeSociete=?) AND (A.id=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - $context = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idClient_C'] = $context['idClient']; - $_SESSION['p_numeroClient_C'] = $context['numeroClient']; - $_SESSION['p_nomClient_C'] = $context['nomClient']; - $_SESSION['p_idClientAjax'] = $context['idClient']; - - $_SESSION['p_idPolice_C'] = ""; - $_SESSION['p_numeroPolice_C'] = ""; - - $_SESSION['p_ndAdh_C'] = "0"; - $_SESSION['p_ndDep_C'] = "0"; - $_SESSION['p_ndActif_C'] = "0"; - - $_SESSION['p_idAdherent_C'] = ""; - $_SESSION['p_numeroAdherent_C'] = ""; - $_SESSION['p_nomAdherent_C'] = ""; - - $_SESSION['p_idBeneficiaire_C'] = ""; - $_SESSION['p_numeroBeneficiaire_C'] = ""; - $_SESSION['p_idBeneficiaire_sav'] = "0"; - $_SESSION['p_nomBeneficiaire_C'] = ""; - $_SESSION['p_lienPhoto_C'] = ""; - } - - public function existeligne($numeroClient) { - $sql = 'select id FROM clients WHERE (codeSociete=?) and (numeroClient=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$numeroClient)); - return ($resultat->rowCount() > 0); - } - - public function getDenierNumeroClient() - { - $sql = 'select dernierNumeroClient from numerotationclient WHERE (codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - - if ($resultat->rowCount() == 0) - { - $sql = 'INSERT INTO numerotationclient (codeSociete, dernierNumeroClient) values (?,?)'; - $this->executerRequete($sql, array($_SESSION['p_codeSociete'], "1")); - return "0"; - } else - { - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['dernierNumeroClient']; - } - } - - public function setDenierNumeroClient($numeroClient) - { - $sql = 'update numerotationclient set dernierNumeroClient=? WHERE (codeSociete=?)'; - $this->executerRequete($sql, array($numeroClient, $_SESSION['p_codeSociete'])); - } - - public function ajouter($codeSociete, $numeroClient, $typeClient, $codeTitre, $nom, $prenoms, $adresseGeo, - $boitepostale, $codeVille, $codePays, $telephoneBureau, $telephonedomicile, $telephonePortable, $fax, - $email, $sexe, $dateNaissance, $codeSecteur, $codeGestionnaire, $nomMandataire, $telephoneFixemandataire, - $telephonePortablemandataire, $emailMandataire, $dateCre, $user, $codeLocalite) - { - $sql = 'INSERT INTO clients (codeSociete, numeroClient, typeClient, codeTitre, nom, prenoms, adresseGeo, - boitepostale, codeVille, codePays, telephoneBureau, telephonedomicile, telephonePortable, fax, email, - sexe, dateNaissance, codeSecteur, codeGestionnaire, nomMandataire, telephoneFixemandataire, - telephonePortablemandataire, emailMandataire, dateCre, user, codeLocalite) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $numeroClient, $typeClient, $codeTitre, $nom, $prenoms, $adresseGeo, - $boitepostale, $codeVille, $codePays, $telephoneBureau, $telephonedomicile, $telephonePortable, $fax, - $email, $sexe, $dateNaissance, $codeSecteur, $codeGestionnaire, $nomMandataire, $telephoneFixemandataire, - $telephonePortablemandataire, $emailMandataire, $dateCre, $user, $codeLocalite)); - - return $this->dernierId(); - } - - public function modifier($id, $typeClient, $codeTitre, $nom, $prenoms, $adresseGeo, - $boitepostale, $codeVille, $codePays, $telephoneBureau, $telephonedomicile, $telephonePortable, $fax, - $email, $sexe, $dateNaissance, $codeSecteur, $codeGestionnaire, $nomMandataire, $telephoneFixemandataire, - $telephonePortablemandataire, $emailMandataire, $codeLocalite) - { - $sql = 'UPDATE clients SET typeClient=?, codeTitre=?, nom=?, prenoms=?, adresseGeo=?, - boitepostale=?, codeVille=?, codePays=?, telephoneBureau=?, telephonedomicile=?, telephonePortable=?, fax=?, - email=?, sexe=?, dateNaissance=?, codeSecteur=?, codeGestionnaire=?, nomMandataire=?, telephoneFixemandataire=?, - telephonePortablemandataire=?, emailMandataire=?, codeLocalite=? where (id=?)'; - - $this->executerRequete($sql, array($typeClient, $codeTitre, $nom, $prenoms, $adresseGeo, - $boitepostale, $codeVille, $codePays, $telephoneBureau, $telephonedomicile, $telephonePortable, $fax, - $email, $sexe, $dateNaissance, $codeSecteur, $codeGestionnaire, $nomMandataire, $telephoneFixemandataire, - $telephonePortablemandataire, $emailMandataire, $codeLocalite, $id)); - } - - public function supprimer($idClient) { - $sql = 'select id from police where (idClient=?) limit 1'; - $resultat = $this->executerRequete($sql, array($idClient)); - - if($resultat->rowCount() == 0) - { - $sql = 'DELETE FROM clients WHERE (id=?)'; - $this->executerRequete($sql, array($idClient)); - return true; - } - else - { - return false; - } - } - - public function getContexteAjaxClient($id) - { - $sql = 'SELECT A.id as idClient FROM clients A WHERE (A.id=?)'; - $resultat = $this->executerRequete($sql, array($id)); - $context = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idClientAjax'] = $context['idClient']; - } -} \ No newline at end of file diff --git a/extranet/Modele/Consommable_temp.php b/extranet/Modele/Consommable_temp.php deleted file mode 100644 index f9412a4..0000000 --- a/extranet/Modele/Consommable_temp.php +++ /dev/null @@ -1,111 +0,0 @@ -executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, - $codeTarifActe, $tm, $nomConsommable, $idAdherent)); - - return $consommables->fetchAll(PDO::FETCH_ASSOC); - } - - public function getconsommables() - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_afficher_consommables(?, ?)'; - - $consommables = $this->executerRequete($sql, array($idSaisie, $user)); - - return $consommables->fetchAll(PDO::FETCH_ASSOC); - } - - public function ajouterconsommable($idConsommable) - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_consommable(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idConsommable, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - } - - public function majquantite($idConsommable, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - // $sql = 'call sp_p_maj_quantite_consommable(?, ?, ?)'; - $sql = 'call sp_p_maj_quantite_acte(?, ?, ?)'; - - $this->executerRequete($sql, array($idConsommable, $quantite, $tm)); - } - - - public function majprix($idConsommable, $valeurActe) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_prix_consommable(?, ?, ?)'; - - $this->executerRequete($sql, array($idConsommable, $valeurActe, $tm)); - } - - public function creerconsommable($nomConsommable, $prixconsommable, $quantiteconsommable) - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - - $sql = 'call sp_p_creer_nv_consommables(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $numeroFeuilleMaladie, $user, $tm, $nomConsommable, - $prixconsommable, $quantiteconsommable, $numeroAdherent)); - } - - public function getconsommablesfeuille($numeroFeuilleMaladie, $codePrestataire) - { - $sql = 'call sp_p_get_consommables_feuille(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function retirerconsommabletous() - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $sql = 'call sp_p_retirer_consommables_tous(?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie)); - } - - public function retirerconsommable($idConsommable) - { - $sql = 'call sp_p_retirer_consommable(?)'; - - $this->executerRequete($sql, array($idConsommable)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Demandebonpec.php b/extranet/Modele/Demandebonpec.php deleted file mode 100644 index 228e8a4..0000000 --- a/extranet/Modele/Demandebonpec.php +++ /dev/null @@ -1,15 +0,0 @@ -executerRequete($sql, array($codeSociete, $codePrestataire, $codeTypeBon, $d1, $d2)); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Demandedecompte.php b/extranet/Modele/Demandedecompte.php deleted file mode 100644 index d3dbebe..0000000 --- a/extranet/Modele/Demandedecompte.php +++ /dev/null @@ -1,208 +0,0 @@ -executerRequete($sql, array($codePrestataire, $codeExercice, $codeMois)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['idDemandeDecompte']; - } - - public function initdemandedecompte() - { - $codeSociete = $_SESSION['p_codeSociete']; - $user = $_SESSION['p_login']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeExercice = $_SESSION['p_codeExercice_C']; - $codeMois = $_SESSION['p_codeMois_C']; - - $sql = 'call sp_p_init_demande_decompte(?, ?, ?, ?, ?);'; - - $this->executerRequete($sql, array($codeSociete, $codePrestataire, $user, $codeExercice, $codeMois)); - } - - public function getinfosdemandedecompte($idDemandeDecompte) - { - $sql = 'call sp_p_get_infos_demande_decompte(?)'; - - $resultat = $this->executerRequete($sql, array($idDemandeDecompte)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getdemandedecompte($idDemandeDecompte) - { - $sql = 'call sp_p_get_demandedecompte(?)'; - - $resultat = $this->executerRequete($sql, array($idDemandeDecompte)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroDemandeDecompte_C'] = $ligne['numeroDemandeDecompte']; - - return $ligne; - } - - public function rechargerdemandedecompte($idDemandeDecompte, $numeroDemandeDecompte, $codePrestataire, $codeExercice, $codeMois) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_recharger_demande_decompte(?, ?, ?, ?, ?, ?);'; - - $this->executerRequete($sql, array($idDemandeDecompte, $numeroDemandeDecompte, $codePrestataire, $codeExercice, $codeMois, $user)); - } - - public function get_numerodecompte($idReglement) - { - $sql = 'select fn_get_numerodecompte(?) as numeroDecompte'; - - $resultat = $this->executerRequete($sql, array($idReglement)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['numeroDecompte']; - } - - - public function getdetaildemandedecompte($numeroDemandeDecompte) - { - $sql = 'call sp_p_get_detail_demandedecompte(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function recapdecompte($idReglement, $numeroDecompte) - { - $sql = 'call sp_r_recap_decompte(?, ?)'; - $this->executerRequete($sql, array($idReglement, $numeroDecompte)); - } - - public function getdecomptes($codePrestataire, $codeExercice, $codeMois, $codeEtatDecompte) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeEtatDecompte = contruireParamLike($codeEtatDecompte); - - $sql = 'call sp_r_get_decomptes(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeExercice, $codeMois, $codeEtatDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexport($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportcso($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_cso(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportcsoid($idReglement) - { - $sql = 'call sp_p_bordereau_decompte_export_cso_id(?)'; - - $resultat = $this->executerRequete($sql, array($idReglement)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportpha($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_pha(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportopt($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_opt(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportlab($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_lab(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function getdetaildecompteexportsea($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_sea(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - // DEMANDE DE DECOMPTE - - public function getdetaildemandedecompteexportcso($numeroDemandeDecompte) - { - $sql = 'call sp_p_demande_decompte_export_cso(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildemandedecompteexportpha($numeroDemandeDecompte) - { - $sql = 'call sp_p_demande_decompte_export_pha(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildemandedecompteexportopt($numeroDemandeDecompte) - { - $sql = 'call sp_p_demande_decompte_export_opt(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildemandedecompteexportlab($numeroDemandeDecompte) - { - $sql = 'call sp_p_demande_decompte_export_lab(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildemandedecompteexportsea($numeroDemandeDecompte) - { - $sql = 'call sp_p_demande_decompte_export_sea(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Derogation.php b/extranet/Modele/Derogation.php deleted file mode 100644 index 2afd434..0000000 --- a/extranet/Modele/Derogation.php +++ /dev/null @@ -1,54 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrerdemandederogation($codeDerogation, $observations) - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeUtilisateur = $_SESSION['p_login']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_demander_derogation(?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $codePrestataire, $observations, $codeUtilisateur, $codeDerogation, - $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - } - - public function getderogations($codePrestataire, $idBeneficiaire, $d1, $d2) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_get_derogations_beneficiaireEng(?, ?, ?, ?)'; - } - else - { - $sql = 'call sp_p_get_derogations_beneficiaire(?, ?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idBeneficiaire, $d1, $d2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Detailexamem.php b/extranet/Modele/Detailexamem.php deleted file mode 100644 index dbec62c..0000000 --- a/extranet/Modele/Detailexamem.php +++ /dev/null @@ -1,121 +0,0 @@ -executerRequete($sql, array($numeroBonExamen)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrerverre($codeOptique) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_verre(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $user, $codeOptique)); - } - - - public function getdetailexamenfeuille() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_get_detail_examen_eng(?)'; - } - else - { - $sql = 'call sp_p_get_detail_examen(?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetailoptique($numeroOptique) - { - $sql = 'call sp_p_get_detail_optique(?)'; - - $resultat = $this->executerRequete($sql, array($numeroOptique)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetailoptique_opt($numeroBonOptique) - { - $sql = 'call sp_p_get_detail_optique_opt(?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOptique)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function ajouterexamen($codeActe, $ententePrealable) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_ajouter_examen(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifActe, $numeroExamen, $codeActe, $user, $tm, $ententePrealable)); - } - - public function majquantite($idExamen, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_examen(?, ?, ?)'; - - $this->executerRequete($sql, array($idExamen, $quantite, $tm)); - } - - public function majquantiteexam($idExamen, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_examen_lab(?, ?, ?)'; - - $this->executerRequete($sql, array($idExamen, $quantite, $tm)); - } - - public function supprimerexamen($idExamen) - { - $sql = 'call sp_p_supprimer_prescription_examen(?)'; - - $this->executerRequete($sql, array($idExamen)); - } - - public function ajouterexamenlab($codeActe, $ententePrealable) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_ajouter_examen_lab(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifActe, $numeroExamen, $codeActe, $user, $idSaisie, $tm, $ententePrealable, $codePrestataire)); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Detailoptique.php b/extranet/Modele/Detailoptique.php deleted file mode 100644 index 9f9051a..0000000 --- a/extranet/Modele/Detailoptique.php +++ /dev/null @@ -1,113 +0,0 @@ -executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $user, $codeOptique)); - } - - - public function getdetailoptiquefeuille() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - if (est_anglophone()) - { - $sql = 'CALL sp_p_get_detail_optique_eng(?);'; - } - else - { - $sql = 'call sp_p_get_detail_optique(?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - // return $resultat; - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetailoptique($numeroOptique) - { - $sql = 'call sp_p_get_detail_optique(?)'; - - $resultat = $this->executerRequete($sql, array($numeroOptique)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetailoptique_opt($numeroBonOptique) - { - if (est_anglophone()) - { - $sql = 'call sp_p_get_detail_optique_opt_eng(?)'; - } - else - { - $sql = 'call sp_p_get_detail_optique_opt(?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroBonOptique)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function ajouteroptique($codeOptique) - { - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $numeroOptique = $_SESSION['p_numeroOptique_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_ajouter_optique(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifOptique, $numeroOptique, $codeOptique, $user, $tm)); - } - - public function majquantite($idMedicament, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_medicament(?, ?, ?)'; - - $this->executerRequete($sql, array($idMedicament, $quantite, $tm)); - } - - public function supprimerverre($idOptique) - { - $sql = 'call sp_p_supprimer_verre_prescription(?)'; - - $this->executerRequete($sql, array($idOptique)); - } - - public function ajouterverreopt($codeOptique) - { - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - $idSaisie = $_SESSION['p_idSaisie']; - - $sql = 'call sp_p_ajouter_verre_opt(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifOptique, $numeroFeuilleMaladie, $codeOptique, $user, $tm, $idSaisie)); - } - - public function demanderaccordopt($idOptique) - { - $codeSociete = $_SESSION['p_codeSociete']; - - $sql = 'call sp_p_demanderaccordopt(?, ?)'; - - $this->executerRequete($sql, array($idOptique, $codeSociete)); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Detailprescription.php b/extranet/Modele/Detailprescription.php deleted file mode 100644 index 68ee90e..0000000 --- a/extranet/Modele/Detailprescription.php +++ /dev/null @@ -1,120 +0,0 @@ -executerRequete($sql, array($numeroPrescription)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetailprescription_pha($numeroBonOrdonnance) - { - $sql = 'call sp_p_get_detail_prescription_pha(?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOrdonnance)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function ajoutermedicament($codeMedicament) - { - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - $accesAjoutPh = $_SESSION['p_accesAjoutPh_C']; - - $sql = 'call sp_p_ajouter_medicament(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifMedicament, $numeroPrescription, $codeMedicament, $user, $tm, $accesAjoutPh)); - } - - public function ajoutermedicamentpha($codeMedicament) - { - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $accesAjoutPh = $_SESSION['p_accesAjoutPh_C']; - - $sql = 'call sp_p_ajouter_medicament_pha(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifMedicament, $numeroPrescription, $codeMedicament, $user, $tm, $idSaisie, $accesAjoutPh)); - } - - public function majquantite($idMedicament, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_medicament(?, ?, ?)'; - - $this->executerRequete($sql, array($idMedicament, $quantite, $tm)); - } - - public function majquantitepha($idMedicament, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_medicament_pha(?, ?, ?)'; - - $this->executerRequete($sql, array($idMedicament, $quantite, $tm)); - } - - public function majprixpha($idMedicament, $prix) - { - $tm = $_SESSION['p_tm_C']; - - // $sql = 'call sp_p_maj_quantite_medicament_pha(?, ?, ?)'; - $sql = 'call sp_p_maj_prix_medicament_pha(?, ?, ?)'; - - $this->executerRequete($sql, array($idMedicament, $prix, $tm)); - } - - public function supprimer($idMedicament) - { - $sql = 'call sp_p_supprimer_medicament_prescription(?)'; - - $this->executerRequete($sql, array($idMedicament)); - } - - public function demanderaccordpha($idMedicament) - { - $codeSociete = $_SESSION['p_codeSociete']; - - $sql = 'call sp_p_demanderaccordpha(?, ?)'; - - $this->executerRequete($sql, array($idMedicament, $codeSociete)); - } - - // $_SESSION['p_idMedicament_a_remplacer'] = $idMedicament; - public function remplacermedicament($codeMedicamentNouv) - { - $idMedicamentAnc = $_SESSION['p_idMedicament_a_remplacer']; - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_remplacer_medicament(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifMedicament, $numeroPrescription, $codeMedicamentNouv, $user, $tm, $idMedicamentAnc)); - } - - - public function getmedicamentsremplaces($numeroBonOrdonnance) - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - - $sql = 'call sp_p_get_medicaments_remplaces(?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOrdonnance)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Detailseance.php b/extranet/Modele/Detailseance.php deleted file mode 100644 index 94c57c1..0000000 --- a/extranet/Modele/Detailseance.php +++ /dev/null @@ -1,51 +0,0 @@ -executerRequete($sql, array($numeroBonExamen)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetailseancefeuille() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $sql = 'call sp_p_get_detail_seance(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function majquantite($idExamen, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_examen(?, ?, ?)'; - - $this->executerRequete($sql, array($idExamen, $quantite, $tm)); - } - - public function ajouterexamenlab($codeActe, $ententePrealable) - { - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_ajouter_examen_lab(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeTarifActe, $numeroExamen, $codeActe, $user, $idSaisie, $tm, $ententePrealable, $codePrestataire)); - - } - -} \ No newline at end of file diff --git a/extranet/Modele/Detailtarifacte.php b/extranet/Modele/Detailtarifacte.php deleted file mode 100644 index b85155f..0000000 --- a/extranet/Modele/Detailtarifacte.php +++ /dev/null @@ -1,321 +0,0 @@ -executerRequete($sql, array($codeTarifActe, $codeActe, $codePrestataire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getactespossibles($codeTypePrestation, $codeFamilleActe) - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeSociete = $_SESSION['p_codeSociete']; - $codeProduit = $_SESSION['p_codeProduit_C']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_actes_possibles_eng(?, ?, ?, ?, ?, ?, ?)'; - } - else - { - $sql = 'call sp_p_actes_possibles(?, ?, ?, ?, ?, ?, ?)'; - } - - $actes = $this->executerRequete($sql, array($idAdherent, $codeTarifActe, $codeTypePrestation, $codeFamilleActe, $codePrestataire, - $codeSociete, $codeProduit)); - return $actes; - } - - public function getchambespossibles() - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_chambres_possibles_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_chambres_possibles(?, ?, ?)'; - } - - $actes = $this->executerRequete($sql, array($idAdherent, $codeTarifActe, $codePrestataire)); - return $actes; - } - - public function getseancespossibles() - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_seances_possibles_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_seances_possibles(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($idAdherent, $codeTarifActe, $codePrestataire)); - // return $actes; - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getprixacte($codeActe) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'select fn_prix_acte(?, ?, ?) as prixActe;'; - - $resultat = $this->executerRequete($sql, array($codeTarifActe, $codeActe, $codePrestataire)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['prixActe']; - } - - public function getententePrealable($codeActe) - { - $sql = 'select fn_entente_prealable_acte(?) as ententePrealable;'; - - $resultat = $this->executerRequete($sql, array($codeActe)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['ententePrealable']; - } - - public function getacteExclu($codeActe) - { - $sql = 'select fn_acte_exclu(?) as acteExclu;'; - - $resultat = $this->executerRequete($sql, array($codeActe)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['acteExclu']; - } - - public function getacteChirurgie($codeActe) - { - $sql = 'select fn_chirurgie_acte(?) as acteChirurgie;'; - - $resultat = $this->executerRequete($sql, array($codeActe)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['acteChirurgie']; - } - - public function getactesspossibleslike($codeTarifActe, $codeTypePrestation, $libelleActeSearch) - { - $libelleActeSearch = contruireParamLike($libelleActeSearch); - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $sql = 'call sp_p_actes_possibles_like(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codeTarifActe, $codeTypePrestation, $libelleActeSearch, $codePrestataire, $idAdherent)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getactesspossiblestous($codeTarifActe, $codeTypePrestation) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $sql = 'call sp_p_actes_possibles_tous(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codeTarifActe, $codeTypePrestation, $codePrestataire, $idAdherent)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getactesvide() { - $sql = 'call sp_p_actes_vide()'; - $resultat = $this->executerRequete($sql); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function geatactesspossiblesselection($codeFamilleActe) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_recherche_actes_selection_eng(?, ?, ?, ?, ?)'; - } - else - { - $sql = 'call sp_p_recherche_actes_selection(?, ?, ?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie,$codeTarifActe, $tm , $codeFamilleActe, - $codePrestataire, $idAdherent)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function geatexamenspossiblesselection($codeFamilleActe) - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $sql = 'call sp_p_recherche_examens_selection(?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user, $codeTarifActe, $tm , $codeFamilleActe, - $codePrestataire, $idAdherent)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function geatactesexamensselection($codeFamilleActe) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $delaiCarenceBeneficiaire= $_SESSION['p_delaiCarenceBeneficiaire']; - $anciennete = $_SESSION['p_anciennete']; - - $codeSociete = $_SESSION['p_codeSociete']; - $codeProduit = $_SESSION['p_codeProduit_C']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_recherche_actes_examens_selection_eng(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - } - else - { - $sql = 'call sp_p_recherche_actes_examens_selection(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie,$codeTarifActe, $tm , $codeFamilleActe, $codePrestataire, - $idAdherent, $delaiCarenceBeneficiaire, $anciennete, $codeSociete, $codeProduit)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getactesspossibleslikecomplet($codeTarifActe, $libelleActeSearch) - { - $libelleActeSearch = contruireParamLike($libelleActeSearch); - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $sql = 'call sp_p_actes_possibles_like_complet(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codeTarifActe, $libelleActeSearch, $codePrestataire, $idAdherent)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getexamenspossibleslikeprescription($codeTarifActe, $libelleActeSearch) - { - $libelleActeSearch = contruireParamLike($libelleActeSearch); - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $delaiCarenceBeneficiaire= $_SESSION['p_delaiCarenceBeneficiaire']; - $anciennete = $_SESSION['p_anciennete']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_examens_possibles_prescription_eng(?, ?, ?, ?, ?, ?)'; - } - else - { - $sql = 'call sp_p_examens_possibles_prescription(?, ?, ?, ?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($codeTarifActe, $libelleActeSearch, $codePrestataire, - $idAdherent, $delaiCarenceBeneficiaire, $anciennete)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdelaicarenceacte($codeActe) - { - $sql = 'select fn_delai_carence_acte(?) as delaiCarenceActe;'; - - $resultat = $this->executerRequete($sql, array($codeActe)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['delaiCarenceActe']; - } - - public function settmtypeprestation($codeTypePrestation) - { - $idCollege = $_SESSION['p_idCollege_C']; - - $sql = 'select fn_tm_type_prestataion(?, ?) as tm_type_prestataion;'; - - $resultat = $this->executerRequete($sql, array($idCollege, $codeTypePrestation)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_tm_TP'] = $ligne['tm_type_prestataion']; - } - - public function getseancespossiblesprescription() - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $actesHarmonises = $_SESSION['p_actesHarmonises']; - - if( isset($actesHarmonises) && ($actesHarmonises=="1") ) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'CALL sp_p_seances_possibles_prescription_harmonise_eng(?);'; - } - else - { - $sql = 'CALL sp_p_seances_possibles_prescription_harmonise(?);'; - } - - $liste = $this->executerRequete($sql, array($idAdherent)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - else - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_seances_possibles_prescription_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_seances_possibles_prescription(?, ?, ?)'; - } - - $liste = $this->executerRequete($sql, array($idAdherent, $codeTarifActe, $codePrestataire)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - } - -} \ No newline at end of file diff --git a/extranet/Modele/Detailtarifmedicament.php b/extranet/Modele/Detailtarifmedicament.php deleted file mode 100644 index 983931d..0000000 --- a/extranet/Modele/Detailtarifmedicament.php +++ /dev/null @@ -1,93 +0,0 @@ -executerRequete($sql, array($numeroPrescription, $codeTarifMedicament, $nomsearch, $codeSociete, $codeProduit)); - - return $medicaments; - } - - public function getmedicamentspossiblespha($nomsearch=null) - { - $nomsearch = contruireParamLike($nomsearch); - - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - - $sql = 'call sp_p_medicaments_possibles_pha(?, ?, ?)'; - - $medicaments = $this->executerRequete($sql, array($numeroPrescription, $codeTarifMedicament, $nomsearch)); - - return $medicaments; - } - - public function getmedicamentvide() { - $sql = 'call sp_p_medicaments_vide()'; - - $medicaments = $this->executerRequete($sql); - return $medicaments; - } - - - public function ajouter($codeActe, $libelle, $codeFamilleActe, $montant) { - $sql = 'INSERT INTO acte_bon (codeActe, libelle, codeFamilleActe, montant) VALUES (?, ?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeActe, $libelle, $codeFamilleActe, $montant)); - } - - public function modifier($id, $codeActe, $libelle, $codeFamilleActe, $montant) { - $sql = 'UPDATE acte_bon SET codeActe=?, libelle=?, codeFamilleActe=?, montant=? where (id=?)'; - $this->executerRequete($sql, array($codeActe, $libelle, $codeFamilleActe, $montant, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM acte WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeActe) { - $sql = 'select id FROM acte_bon WHERE (codeActe=?)'; - $resultat = $this->executerRequete($sql, array($codeActe)); - return ($resultat->rowCount() > 0); - } - - public function getListe($codePrestataire, $codeFamilleActe) { - $sql = 'select A.codeActe as `code`, B.libelle from acte_bonprestataire A - JOIN acte_bon B on (B.codeActe=A.codeActe) - where (codePrestataire=?) AND (B.codeFamilleActe=?) - order by B.libelle'; - - $liste = $this->executerRequete($sql, array($codePrestataire, $codeFamilleActe)); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function creermedicament($nomMedicament, $prixMedicament, $qteMedicament) - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $tm = $_SESSION['p_tm_C']; - // $accesAjoutPh = $_SESSION['p_accesAjoutPh_C']; - $accesAjoutPh = $_SESSION['p_accesAjoutPhClient']; - - $sql = 'call sp_p_creer_nv_medicament(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $consommables = $this->executerRequete($sql, array($codeSociete, $numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, - $codeTarifMedicament, $tm, $nomMedicament, $prixMedicament, $qteMedicament, $accesAjoutPh)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Detailtarifoptique.php b/extranet/Modele/Detailtarifoptique.php deleted file mode 100644 index 48c4219..0000000 --- a/extranet/Modele/Detailtarifoptique.php +++ /dev/null @@ -1,43 +0,0 @@ -executerRequete($sql, array($numeroOptique, $codeTarifOptique)); - - return $verres->fetchAll(PDO::FETCH_ASSOC); - } - - public function getverrespossiblesprescription() - { - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $numeroOptique = $_SESSION['p_numeroOptique_C']; - - if (est_anglophone()) - { - $sql = 'CALL sp_p_verres_possibles_prescription_eng(?);'; - } - else - { - $sql = 'CALL sp_p_verres_possibles_prescription(?);'; - } - - $verres = $this->executerRequete($sql, array($numeroOptique)); - - return $verres->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Ententeprealable.php b/extranet/Modele/Ententeprealable.php deleted file mode 100644 index eafde12..0000000 --- a/extranet/Modele/Ententeprealable.php +++ /dev/null @@ -1,23 +0,0 @@ -executerRequete($sql, array($numeroFeuilleMaladie)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getActesExclusFeuilleMaladie($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_actes_exclus_feuillemaladie(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Envoimail.php b/extranet/Modele/Envoimail.php deleted file mode 100644 index 0462914..0000000 --- a/extranet/Modele/Envoimail.php +++ /dev/null @@ -1,196 +0,0 @@ -executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codePrestataire, $user)); - } - - public function ajoutermailhospitalisation($typeMail, $numeroBon, $numeroFeuilleMaladie) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroBon, numeroFeuilleMaladie, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroBon, $numeroFeuilleMaladie, $codePrestataire, $user)); - } - - public function ajoutermailpharmacie($typeMail, $numeroFeuilleMaladie, $codePrestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, codePrestataire, codeUtilisateur) values(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codePrestataire, $user)); - } - - public function ajoutermaillabo($typeMail, $numeroFeuilleMaladie, $codePrestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, codePrestataire, codeUtilisateur) values(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codePrestataire, $user)); - } - - public function ajoutermailkine($typeMail, $numeroFeuilleMaladie, $codePrestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, codePrestataire, codeUtilisateur) values(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codePrestataire, $user)); - } - - public function ajoutermailoptique($typeMail, $numeroFeuilleMaladie, $codePrestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, codePrestataire, codeUtilisateur) values(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codePrestataire, $user)); - } - - public function ajoutermailcommandebon($typeMail, $codeTypeBon, $quantite, $prestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, codeTypeBon, quantite, prestataire, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $codeTypeBon, $quantite, $prestataire, $codePrestataire, $user)); - } - - public function ajoutermailreceptionbon($typeMail, $codeTypeBon, $noDepart, $noFin, $prestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, codeTypeBon, noDepart, noFin, prestataire, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $codeTypeBon, $noDepart, $noFin, $prestataire, $codePrestataire, $user)); - } - - public function ajoutermaildemandeannulationbon($typeMail, $idBon) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, idBon, codePrestataire, codeUtilisateur) values(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $idBon, $codePrestataire, $user)); - } - - public function ajoutermaildemandederogation($typeMail, $codeDerogation, $observations, $prestataire, $idBeneficiaire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, codeDerogation, observations, prestataire, idBeneficiaire, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $codeDerogation, $observations, $prestataire, $idBeneficiaire, $codePrestataire, $user)); - } - - public function ajoutermailfraudeidentite($typeMail, $idBeneficiaire, $prestataire) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, idBeneficiaire, prestataire, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $idBeneficiaire, $prestataire, $codePrestataire, $user)); - } - - - public function ajoutermailententeprealable($typeMail, $numeroFeuilleMaladie, $codeActe) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, codeActe, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codeActe, $codePrestataire, $user)); - } - - public function ajoutermailautorisation($typeMail, $numeroFeuilleMaladie, $codeActe) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, codeActe, codePrestataire, codeUtilisateur) values(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($typeMail, $numeroFeuilleMaladie, $codeActe, $codePrestataire, $user)); - } - - public function ajoutermailententeprealablepha($typeMail, $idMedicament) - { - $user = $_SESSION['p_login']; - - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, numeroBonOrdonnance, codePrestataire, codeMedicament, codeUtilisateur) - select ?, numeroFeuilleMaladie, numeroBonOrdonnance, codePrestataire, codeMedicament, userP - from p_prestationmedicaments_temp A - where (id=?);'; - - $this->executerRequete($sql, array($typeMail, $idMedicament)); - } - - public function ajoutermailententeprealableopt($typeMail, $idOptique) - { - $sql = 'insert into p_envoimail (typeMail, numeroFeuilleMaladie, numeroBonOptique, codePrestataire, codeUtilisateur) - select ?, numeroFeuilleMaladie, numeroBonOptique, codePrestataire, userP - from p_prestationoptiques_temp A - where (id=?);'; - - $this->executerRequete($sql, array($typeMail, $idOptique)); - } - - public function ajoutermailententeprealablemont($typeMail, $idOptique) - { - $sql = 'insert into p_envoimail (typeMail, idBeneficiaire, codePrestataire, codeUtilisateur) - select ?, idBeneficiaire, codePrestataire, userP - from p_prestationoptiques_temp A - where (id=?);'; - - $this->executerRequete($sql, array($typeMail, $idOptique)); - } - - // autres tables que p_envoimail - - public function ajoutersms($destinataires, $message) - { - $user = $_SESSION['p_login']; - - $sql = 'insert into envoisms (destinataires, message, codeUtilisateur) values(?, ?, ?)'; - $sortie = $this->executerRequete($sql, array($destinataires, $message, $user)); - } - - public function ajoutermailadherent($email, $objet, $message) - { - $user = $_SESSION['p_login']; - - $sql = 'INSERT INTO p_envoimailadherent (email, objet, message, codeUtilisateur) values(?, ?, ?, ?)'; - - $sortie = $this->executerRequete($sql, array($email, $objet, $message, $user)); - } - - public function logenvoisms($destinataires, $message) - { - $user = $_SESSION['p_login']; - - $sql = 'insert into logenvoisms (destinataires, message, codeUtilisateur) values(?, ?, ?)'; - - $sortie = $this->executerRequete($sql, array($destinataires, $message, $user)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Etatbon.php b/extranet/Modele/Etatbon.php deleted file mode 100644 index 02d0ca3..0000000 --- a/extranet/Modele/Etatbon.php +++ /dev/null @@ -1,21 +0,0 @@ -executerRequete($sql); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Etatdecompte.php b/extranet/Modele/Etatdecompte.php deleted file mode 100644 index ca2de65..0000000 --- a/extranet/Modele/Etatdecompte.php +++ /dev/null @@ -1,20 +0,0 @@ -"0" order by ordre'; - } - else - { - $sql = 'SELECT codeEtatDecompte as `code`, libelle FROM p_etatdecompte where codeEtatDecompte>"0" order by ordre'; - } - - $liste = $this->executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Etatpersonne.php b/extranet/Modele/Etatpersonne.php deleted file mode 100644 index 61ebd61..0000000 --- a/extranet/Modele/Etatpersonne.php +++ /dev/null @@ -1,42 +0,0 @@ -executerRequete($sql); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeSuiteFam($oldcodeEtatPersonne) - { - $sql = 'SELECT codeEtatPersonne as `code`, etatpossible as libelle - FROM vw_suiteetatpersonne where (oldcodeEtatPersonne=?) - and (famille="1") order by etatpossible;'; - - $liste = $this->executerRequete($sql, array($oldcodeEtatPersonne)); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeSuiteDep($oldcodeEtatPersonne) { - $sql = 'SELECT codeEtatPersonne as `code`, etatpossible as libelle - FROM vw_suiteetatpersonne where (oldcodeEtatPersonne=?) - and (dependant="1") order by etatpossible;'; - - $liste = $this->executerRequete($sql, array($oldcodeEtatPersonne)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} diff --git a/extranet/Modele/Etatpolice.php b/extranet/Modele/Etatpolice.php deleted file mode 100644 index a519d6c..0000000 --- a/extranet/Modele/Etatpolice.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Examen.php b/extranet/Modele/Examen.php deleted file mode 100644 index b466b5f..0000000 --- a/extranet/Modele/Examen.php +++ /dev/null @@ -1,57 +0,0 @@ -executerRequete($sql, array($numeroExamen)); - - return $prescription->fetch(PDO::FETCH_ASSOC); - } - - public function getprescription_lab($numeroBonExamen, $codePrestataireLivraison) - { - $sql = 'call sp_p_get_cons_lab(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataireLivraison)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroBonExamen_C'] = $ligne['numeroBonExamen']; - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - return $ligne; - } - - public function getdetailprescription_lab($numeroBonExamen, $codePrestataireLivraison) - { - $sql = 'call sp_r_get_detail_prestation_lab(?, ?)'; - - $optique = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataireLivraison)); - - return $optique->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Examen_temp.php b/extranet/Modele/Examen_temp.php deleted file mode 100644 index d8dcf29..0000000 --- a/extranet/Modele/Examen_temp.php +++ /dev/null @@ -1,336 +0,0 @@ -executerRequete($sql, array($numeroFeuilleMaladie, $idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getprescription_lab($numeroBonExamen) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_prescription_temp_lab(?, ?, ?)'; - - $prescription = $this->executerRequete($sql, array($numeroBonExamen, $idSaisie, $user)); - - $ligne = $prescription->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - - return $ligne; - } - - public function getoptique($numeroExamen) - { - $sql = 'call sp_p_get_optique(?)'; - - $optique = $this->executerRequete($sql, array($numeroExamen)); - - return $optique->fetch(PDO::FETCH_ASSOC); - } - - public function getContexteAjaxOptique($numeroExamen) - { - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - } - - public function enregistrerprescriptionexamen($numeroBonExamen, $codeMedecin, $codeGestionBon) - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_prescription_examen(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $idBeneficiaire, $numeroFeuilleMaladie, $numeroBonExamen, - $codeMedecin, $user, $idSaisie, $codeGestionBon)); - } - - public function getoptique_opt($numeroBonExamen) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_optique_temp_opt(?, ?, ?)'; - - $prescription = $this->executerRequete($sql, array($numeroBonExamen, $idSaisie, $user)); - - $ligne = $prescription->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - return $ligne; - } - - public function initexamen_cso() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_init_examen_cso(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroFeuilleMaladie, $user)); - } - - public function initexamensmedicaux_cso() - { -/* - "PB0001", -- p_codePrestataire, - "59f0f7b01fb65", -- p_idSaisie, - "4", -- p_numeroExamen, - "kanepb", -- p_user, - "HPRF", -- p_codeTarifActe, - "10" -- p_tm -*/ - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_examen_medicaux_cso(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroExamen, $user, $codeTarifActe, $tm)); - } - - public function initexamen_lab($numeroBonExamen) - { - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_examen_lab(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroBonExamen, $user, $codeTarifActe, $tm)); - } - - - public function initexamen_lab_cso_ext($numeroBonExamen) - { - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_examen_lab_cso_ext(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroBonExamen, $user, $codeTarifActe, $tm)); - } - - public function getContexteAjaxPrescription($numeroExamen) - { - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - } - - public function getContexteAjaxOrdonnance($numeroBonExamen) - { - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - } - - public function enregistrerprescription($numeroBon, $codeMedecin) - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_prescription(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idBeneficiaire, $numeroFeuilleMaladie, $numeroExamen, $numeroBon, $codeMedecin, $user)); - } - - public function getdetailnonlivre() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_get_detail_non_livre_exam_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_get_detail_non_livre_exam(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaillivre() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_get_detail_livre_exam_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_get_detail_livre_exam(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaillivre_total() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_total_livre_exam(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function ajouterexamen($idExamen) - { - $sql = 'call sp_p_ajouter_examen_temp(?)'; - - $this->executerRequete($sql, array($idExamen)); - } - - public function ajouterexamentous() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_ajouter_examen_temp_tous(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user)); - } - - public function retirerexamen($idExamen) - { - $sql = 'call sp_p_retirer_examen_temp(?)'; - - $this->executerRequete($sql, array($idExamen)); - } - - public function retirerexamentous() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_retirer_examen_temp_tous(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user)); - } - - public function enregistrerexamen() - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_examen_cso(?, ?, ? , ? , ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - } - - public function facturerlaboratoire($user_id_substitut) - { - $numeroExamen = $_SESSION['p_numeroExamen_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $user_id = $_SESSION['p_user_id_C']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_examen_lab(?, ?, ?, ?, ? , ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroExamen, $idSaisie, $user, $user_id, $idAdherent, $numeroAdherent, - $idBeneficiaire, $numeroBeneficiaire, $user_id_substitut)); - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - } - - public function videroptiquetemp() - { - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - - $sql = 'call sp_p_vider_optique_temp(?, ?)'; - - $this->executerRequete($sql, array($user, $idSaisie)); - } - - public function majmonturetemp($idOptique, $monture) - { - $codeActeMonture = $_SESSION['p_codeActeMonture_C']; - - $sql = 'call sp_p_maj_monture_temp(?, ?, ?)'; - $this->executerRequete($sql, array($idOptique, $monture, $codeActeMonture)); - } - - public function getfactures_examen($numeroBonExamen) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_facture_examen(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getfactures_total_examen($numeroBonExamen) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_total_facture_examen(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - -} diff --git a/extranet/Modele/Exclusioncollege.php b/extranet/Modele/Exclusioncollege.php deleted file mode 100644 index 77ab0f2..0000000 --- a/extranet/Modele/Exclusioncollege.php +++ /dev/null @@ -1,15 +0,0 @@ -executerRequete($sql, array($codeSociete, $idCollege)); - - return $exclusions->fetchAll(PDO::FETCH_ASSOC); - } -} diff --git a/extranet/Modele/Exercice.php b/extranet/Modele/Exercice.php deleted file mode 100644 index 3c3954d..0000000 --- a/extranet/Modele/Exercice.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Facture.php b/extranet/Modele/Facture.php deleted file mode 100644 index 0533eb5..0000000 --- a/extranet/Modele/Facture.php +++ /dev/null @@ -1,293 +0,0 @@ -executerRequete($sql, array($idFacture)); - - $ligne = $facture->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - - return $ligne; - } - - public function getfacturesprestataire($codePrestataire, $idBeneficiaire, $d1, $d2) - { - $sql = 'call sp_p_get_factures_ben(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idBeneficiaire, $d1, $d2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getfacturesben($idBeneficiaire, $d1, $d2) - { - $sql = 'call sp_r_get_factures(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $d1, $d2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getfacturesprestatairecons($codePrestataire, $d1, $d2) - { - $sql = 'call sp_p_get_factures_cons(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $d1, $d2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function gettotalfacturesprestatairecons($codePrestataire, $d1, $d2) - { - $sql = 'call sp_p_get_total_factures_cons(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $d1, $d2)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getContexteAjaxFacture($numeroFacture) - { - $_SESSION['p_numeroFacture_C'] = $numeroFacture; - } - - public function requetesfacture($codePrestataire, $dateFacture1, $dateFacture2, $numeroAdherent, $numeroBeneficiaire, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $hospitalisation, $numeroChambre, $chirurgie, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_factures(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateFacture1, $dateFacture2, $numeroAdherent, $numeroBeneficiaire, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $hospitalisation, $numeroChambre, $chirurgie, $adherent, $beneficiaire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesfacturetotal($codePrestataire, $dateFacture1, $dateFacture2, $numeroAdherent, $numeroBeneficiaire, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $hospitalisation, $numeroChambre, $chirurgie, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_factures_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateFacture1, $dateFacture2, $numeroAdherent, $numeroBeneficiaire, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $hospitalisation, $numeroChambre, $chirurgie, $adherent, $beneficiaire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function requetesfactureexport($codePrestataire, $dateFacture1, $dateFacture2, $numeroAdherent, $numeroBeneficiaire, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $hospitalisation, $numeroChambre, $chirurgie, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_factures_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateFacture1, $dateFacture2, $numeroAdherent, $numeroBeneficiaire, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $hospitalisation, $numeroChambre, $chirurgie, $adherent, $beneficiaire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function init_facture_sans_bon() - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_r_init_facture_classique(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire, $user, - $idAdherent, $numeroAdherent, $numeroBeneficiaire, $idSaisie)); - } - - public function getfacture_sans_bon_temp() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_get_facture_classique_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $idSaisie, $user)); - - // return $resultat->fetchAll(PDO::FETCH_ASSOC); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getprestations_sans_bon_temp() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_get_prestation_classique_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function consulterfacturefacture($idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_consulter_facture_facture(?, ?)'; - - $resultat = $this->executerRequete($sql, array($idFacture, $codePrestataire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function consulterfacturefeuillemaladie($idFacture) - { - $sql = 'call sp_p_consulter_facture_feuillemaladie(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function consulterfactureprestationactes($idFacture) - { - $sql = 'call sp_p_consulter_facture_prestationactes(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function consulterfacturemedicaments($idFacture) - { - $sql = 'call sp_p_consulter_facture_medicaments(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function consulterfactureverres($idFacture) - { - $codeActeOptique = $_SESSION['p_codeActeOptique_C']; - - if (est_anglophone()) - { - $sql = 'call sp_r_consulter_facture_verres_eng(?)'; - } - else - { - $sql = 'call sp_r_consulter_facture_verres(?)'; - } - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function getgedfacture($idFacture) - { - $sql = 'call sp_r_get_ged_facture(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesfacturenew($codePrestataire, $dateFacture1, $dateFacture2, $chrono) - { - if ($chrono=="1") - { - $sql = 'call sp_requetes_factures_new_chrono(?, ?, ?)'; - } - else - { - $sql = 'call sp_requetes_factures_new(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateFacture1, $dateFacture2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesfactureexportnew($codePrestataire, $dateFacture1, $dateFacture2) - { - $sql = 'call sp_requetes_factures_export_new(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateFacture1, $dateFacture2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function consulterfacturediagnostics($idFacture) - { - $sql = 'call sp_r_consulter_facture_diagnostics(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Facturesansbon.php b/extranet/Modele/Facturesansbon.php deleted file mode 100644 index 22d41ab..0000000 --- a/extranet/Modele/Facturesansbon.php +++ /dev/null @@ -1,149 +0,0 @@ -executerRequete($sql, array($idFacture)); - - $ligne = $facture->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - - return $ligne; - } - - - public function getContexteAjaxFacture($numeroFacture) - { - $_SESSION['p_numeroFacture_C'] = $numeroFacture; - } - - public function init_facture_sans_bon() - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_r_init_facture_sans_bon(?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire, $user, - $idAdherent, $numeroAdherent, $numeroBeneficiaire, $idSaisie, $tm)); - } - - public function getfacture_sans_bon_temp() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_get_facture_classique_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $idSaisie, $user)); - - // return $resultat->fetchAll(PDO::FETCH_ASSOC); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getprestations_sans_bon_temp() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_get_prestation_classique_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function afficher_garantieadherent_temp() - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_get_garantieadherent_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idAdherent, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function majprix($idPrestation, $valeurActe) - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_maj_prix_facture_sans_bon(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idAdherent, $idBeneficiaire, $idSaisie, $user, $idPrestation, $valeurActe)); - } - - public function majtm($tm) - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_maj_tm_facture_classique(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idAdherent, $idBeneficiaire, $idSaisie, $user, $tm)); - } - - public function enregistrerfacturetemp($dateFacture, $hospitalisation, $observations, $tm, $numeroBon, $medecinManquant, - $codeMedecin, $initialiserprestation) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_enregistrer_facture_sans_bon_temp(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idAdherent, $idBeneficiaire, $idSaisie, $user, $codePrestataire, $dateFacture, $hospitalisation, - $observations, $tm, $numeroBon, $medecinManquant, $codeMedecin, $initialiserprestation)); - } - - - public function validerfacturesansbon() - { - $idAdherent = $_SESSION['p_idAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_valider_facture_sans_bon(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idAdherent, $idBeneficiaire, $idSaisie, $user)); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Familleacte.php b/extranet/Modele/Familleacte.php deleted file mode 100644 index 05bc210..0000000 --- a/extranet/Modele/Familleacte.php +++ /dev/null @@ -1,80 +0,0 @@ -executerRequete($sql, array($codeTypePrestation)); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - else - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'CALL sp_p_liste_famille_actes_eng(?, ?);'; - } - else - { - $sql = 'CALL sp_p_liste_famille_actes(?, ?);'; - } - - $liste = $this->executerRequete($sql, array($codeTarifActe, $codeTypePrestation)); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - } - - public function getListeComplet() - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $actesHarmonises = $_SESSION['p_actesHarmonises']; - $hospitalisation = $_SESSION['p_hospitalisation_C']; - - if( isset($actesHarmonises) && ($actesHarmonises=="1") ) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'CALL sp_p_liste_actes_examens_harmonises_eng(?);'; - } - else - { - $sql = 'CALL sp_p_liste_actes_examens_harmonises(?);'; - } - - $liste = $this->executerRequete($sql, array($hospitalisation)); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - else - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'CALL sp_p_liste_actes_examens_eng(?, ?)'; - } - else - { - $sql = 'CALL sp_p_liste_actes_examens(?, ?)'; - } - - $liste = $this->executerRequete($sql, array($codeTarifActe, $hospitalisation)); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - } -} \ No newline at end of file diff --git a/extranet/Modele/Feuillemaladie.php b/extranet/Modele/Feuillemaladie.php deleted file mode 100644 index 39790e6..0000000 --- a/extranet/Modele/Feuillemaladie.php +++ /dev/null @@ -1,412 +0,0 @@ -executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire, $dateSurvenance,$numeroBon, - $user, $tm, $idAdherent, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation, $numeroDerogationFinger, $idSaisie, - $modeSaisieFacture, $user_id_substitut, $codeGestionBon)); - - if ($resultat->rowCount() == 0) - { - return "0"; - } else - { - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - return $numeroFeuilleMaladie; - } - } - - public function enregistrerconsultation($codeActe, $dateSurvenance, $numeroBon, $observations, - $prixActe, $montantTm, $aRembourser, $codeMedecin, $codeRaisonConsultation, $numeroDerogation, - $numeroDerogationFinger, $medecinManquant, $codeGestionBon, $codeSpecialiteManuel) - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - $idSaisie = $_SESSION['p_idSaisie']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - $modeSaisieFacture = $_SESSION['p_modeSaisieFacture']; - $user_id_substitut = "0"; - - if($_SESSION['p_user_id_C'] != $_SESSION['p_user_id_substitut']) - { - $user_id_substitut = $_SESSION['p_user_id_substitut']; - } - - $sql = 'call sp_p_enregistrer_consultation(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - /* - var_dump - ( - array - ( - $codeSociete, $codePrestataire, $idBeneficiaire, $dateSurvenance,$numeroBon, - $observations, $prixActe, $montantTm, $aRembourser, $user, $codeMedecin, $codeActe, $codeRaisonConsultation, $tm, - $idAdherent, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation, $numeroDerogationFinger, $idSaisie, $medecinManquant, - $modeSaisieFacture, $user_id_substitut, $codeGestionBon, $codeSpecialiteManuel - ) - ); - exit(); - */ - - $resultat = $this->executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire, $dateSurvenance,$numeroBon, - $observations, $prixActe, $montantTm, $aRembourser, $user, $codeMedecin, $codeActe, $codeRaisonConsultation, $tm, - $idAdherent, $numeroAdherent, $numeroBeneficiaire, $numeroDerogation, $numeroDerogationFinger, $idSaisie, $medecinManquant, - $modeSaisieFacture, $user_id_substitut, $codeGestionBon, $codeSpecialiteManuel)); - - if ($resultat->rowCount() == 0) - { - return "0"; - } else - { - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - - return $numeroFeuilleMaladie; - } - } - - public function getfeuillemaladie($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_feuille_maladie(?)'; - - $feuillemaladie = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - $ligne = $feuillemaladie->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroBonExamen_C'] = $ligne['numeroBonExamen']; - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - $_SESSION['p_codeMedecin_C'] = $ligne['codeMedecin']; - $_SESSION['p_medecinConsultation_C'] = $ligne['medecinConsultation']; - - return $ligne; - } - - public function getinfosfeuillemaladie($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_infos_feuille_maladie(?)'; - - $feuillemaladie = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - return $feuillemaladie->fetch(PDO::FETCH_ASSOC); - - } - - public function getfeuillesmaladie($codePrestataire, $idBeneficiaire, $d1, $d2) - { - $sql = 'call sp_p_get_feuilles_maladie_ben(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idBeneficiaire, $d1, $d2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getfeuillesmaladiecons($codePrestataire, $d1, $d2) - { - $sql = 'call sp_p_get_feuilles_maladie_cons(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $d1, $d2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function gettotalfeuillesmaladiecons($codePrestataire, $d1, $d2) - { - $sql = 'call sp_p_get_total_feuilles_maladie_cons(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $d1, $d2)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getContexteAjaxFeuilleMaladie($numeroFeuilleMaladie) - { - $_SESSION['p_numeroFeuilleMaladie_C'] = $numeroFeuilleMaladie; - } - - public function facturer($user_id_substitut) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $user_id = $_SESSION['p_user_id_C']; - $idSaisie = $_SESSION['p_idSaisie']; - - $sql = 'call sp_p_facturer_feuille_maladie(?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $user, $user_id, $idSaisie, $user_id_substitut)); - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - } - - public function enregistrerhospitalisation($numeroBon, $codeGestionBon) - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $user = $_SESSION['p_login']; - - if($_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - $sql = 'call sp_p_enregistrer_hospitalisation(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idBeneficiaire, $numeroFeuilleMaladie, $numeroBon, $user, $codeGestionBon)); - - $_SESSION['p_hospitalisation_C'] = "1"; - } - - public function requetesfeuillesmaladie($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - $codeRaisonConsultation = contruireParamLike($codeRaisonConsultation); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - $facture = contruireParamLike($facture); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_feuilles_maladie(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesfeuillesmaladietotal($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - $codeRaisonConsultation = contruireParamLike($codeRaisonConsultation); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - $facture = contruireParamLike($facture); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_feuilles_maladie_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - - } - - public function requetesfeuillesmaladieexport($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - $codeRaisonConsultation = contruireParamLike($codeRaisonConsultation); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - $facture = contruireParamLike($facture); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - - $sql = 'call sp_requetes_feuilles_maladie_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateConsultation1, $dateConsultation2, $numeroAdherent, $numeroBeneficiaire, - $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, - $codeTypePrestataire, $numeroDecompte1, $numeroDecompte2, $codeRaisonConsultation, $hospitalisation, $numeroChambre, $chirurgie, $facture, $adherent, $beneficiaire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getnotesfeuillemaladie($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_notes_feuille(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function creernote($numeroFeuilleMaladie, $notesNew) - { - $user = $_SESSION['p_login']; - $source = "P"; - - $sql = 'call sp_p_creer_note_feuille_maladie(?, ?, ?, ?);'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $notesNew, $user, $source)); - } - - public function getfeuillemaladieimpression($numeroFeuilleMaladie) - { - $sql = 'call sp_p_imprimer_feuille_maladie(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - - } - - public function enregistreraffection($numeroFeuilleMaladie, $codeAffection) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_affection(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $codeAffection, $user)); - } - - public function getDiagnostics($numeroFeuilleMaladie) - { - $codeSociete = $_SESSION['p_codeSociete']; - - $sql = 'call sp_p_get_diagnostics_feuille(?, ?)'; - - $resultat = $this->executerRequete($sql, array($codeSociete, $numeroFeuilleMaladie) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function getreposmedicalfeuillemaladie($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_repos_medical_feuille(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function creerreposmedical($numeroFeuilleMaladie, $notesNew, $nbJour) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_creer_reposmedical_feuille_maladie(?, ?, ?, ?);'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $notesNew, $user, $nbJour)); - } - - public function supprimeraffection($idAffection) { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_supprimer_affection(?, ?)'; - - $resultat = $this->executerRequete($sql, array($idAffection, $user)); - } - - public function getnotesBeneficiaire($idBeneficiaire) - { - $sql = 'call sp_p_get_notes_beneficiaire(?)'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getDiagnosticsBeneficiaire($idBeneficiaire) - { - $codeSociete = $_SESSION['p_codeSociete']; - - $sql = 'call sp_p_get_diagnostics_beneficiaire(?, ?)'; - - $resultat = $this->executerRequete($sql, array($codeSociete, $idBeneficiaire) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function completerconsultation($codeActe, $prixActe, $montantTm, $aRembourser, - $codeMedecin, $codeRaisonConsultation, $medecinManquant, $codeSpecialiteManuel) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - - $sql = 'call sp_p_completer_consultation(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $numeroAdherent, $prixActe, $montantTm, $aRembourser, $user, - $codeMedecin, $codeActe, $codeRaisonConsultation, $medecinManquant, $codeSpecialiteManuel)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Finger.php b/extranet/Modele/Finger.php deleted file mode 100644 index 45382ba..0000000 --- a/extranet/Modele/Finger.php +++ /dev/null @@ -1,37 +0,0 @@ -executerRequete($sql, array($user_id)); - } - - public function verifier_tentative_identification($user_id) - { - $sql = 'call sp_p_compteur_tentative_identification(?)'; - $resultat = $this->executerRequete($sql, array($user_id)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbTentative']; - } - - public function compteur_tentative_identification($user_id) - { - $sql = 'call sp_p_compteur_tentative_identification(?)'; - $resultat = $this->executerRequete($sql, array($user_id)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbTentative']; - } - - public function saveenroleur($user_id) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_save_enroleur(?, ?, ?)'; - - $this->executerRequete($sql, array($user_id, $codePrestataire, $user)); - } -} diff --git a/extranet/Modele/Garantieadherent.php b/extranet/Modele/Garantieadherent.php deleted file mode 100644 index 5d9e531..0000000 --- a/extranet/Modele/Garantieadherent.php +++ /dev/null @@ -1,80 +0,0 @@ -executerRequete($sql, array($idAdherent)); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getGarantieBeneficiaire($idBeneficiaire) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'call sp_p_afficher_garantiebeneficiaire_eng(?);'; - } - else - { - $sql = 'call sp_p_afficher_garantiebeneficiaire(?);'; - } - - - $resultat = $this->executerRequete($sql, array($idBeneficiaire)); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getPlafondAvantFacture() - { - $idFacture = $_SESSION['p_idFacture_C']; - - $sql = 'call sp_p_get_plafond_avant_facture_id(?);'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getPlafondAvantFactureId($idFacture) - { - $sql = 'call sp_p_get_plafond_avant_facture_id(?);'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getentetecontrat($idEntetecontrat) - { - $sql = 'SELECT * FROM entetecontrat WHERE id=? limit 1;'; - - $resultat = $this->executerRequete($sql, array($idEntetecontrat)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getLimitesBeneficiaire($idBeneficiaire) - { - $sql = 'call sp_p_afficher_limites_beneficiaire(?);'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire)); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getLimitesAdherent($idAdherent) - { - $sql = 'call sp_p_afficher_limites_adherent(?);'; - - $resultat = $this->executerRequete($sql, array($idAdherent)); - return $resultat->fetch(PDO::FETCH_ASSOC); - } -} diff --git a/extranet/Modele/Garantiecollege.php b/extranet/Modele/Garantiecollege.php deleted file mode 100644 index c7e0c30..0000000 --- a/extranet/Modele/Garantiecollege.php +++ /dev/null @@ -1,59 +0,0 @@ -executerRequete($sql, array($idCollege)); - return $garanties; - } - - - public function getGarOptCollege($idCollege) - { - $sql = 'select A.*, IFNULL(B.idCollege,"0") as idCollege - from garantie A - left join garantiecollege B on (B.idCollege=?) and (B.codeSociete=A.codeSociete) and (B.codeGarantie=A.codeGarantie) - Where (A.optionnelle="1") order by A.ordre'; - - $garanties = $this->executerRequete($sql, array($idCollege)); - return $garanties; - } - - - public function getGarOptCollegeAcq($idCollege) - { - $sql = 'select B.*, B.id as idGarantie - from garantie A - join garantiecollege B on (B.codeSociete=A.codeSociete) and (B.codeGarantie=A.codeGarantie) - Where (B.idCollege=?) and (A.optionnelle="1") order by A.ordre'; - - $garanties = $this->executerRequete($sql, array($idCollege)); - return $garanties; - } - - public function ajouter($idCollege, $codeGarantie) - { - $sql = 'insert into garantiecollege (codeSociete, idCollege, numeroPolice, codeGarantie, garantie, optionnelle, - additionnelle, tauxPlafond, forfaitPlafond, ordre, plafondLettre) - select A.codeSociete, B.id as idCollege, B.numeroPolice, A.codeGarantie, A.libelle, A.optionnelle, - A.additionnelle, A.tauxPlafond, - A.forfaitPlafond, A.ordre, A.plafondLettre - from garantie A - join police B on (B.codeSociete=A.codeSociete) - where (B.id=?) and (A.codeGarantie=?)'; - - $this->executerRequete($sql, array($idCollege, $codeGarantie)); - } - - public function supprimer($id) - { - $sql = 'DELETE FROM garantiecollege WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } -} diff --git a/extranet/Modele/Ged.php b/extranet/Modele/Ged.php deleted file mode 100644 index e927674..0000000 --- a/extranet/Modele/Ged.php +++ /dev/null @@ -1,135 +0,0 @@ -executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $d1, $d2, $nomOrigine)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrergedfeuillemaladie($nomOrigine, $nouveau_fichier, $taille) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $user = $_SESSION['p_login']; - $cheminFichier = $_SESSION['p_dossierGed'].$nouveau_fichier; - - $sql = 'call sp_p_ajouter_ged_feuillemaladie(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $nomOrigine, $cheminFichier, $taille, $user)); - } - - public function enregistrergedbeneficiaireprest($nomOrigine, $nouveau_fichier, $taille) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $user = $_SESSION['p_login']; - $cheminFichier = $_SESSION['p_dossierGed'].$nouveau_fichier; - - $sql = 'call sp_p_ajouter_ged_beneficiaire_prest(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idBeneficiaire, $nomOrigine, $cheminFichier, $taille, $user)); - } - - public function getgedbeneficiaireprest($d1, $d2, $nomOrigine) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $sql = 'call sp_p_get_ged_beneficiaire_prest(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idBeneficiaire, $d1, $d2, $nomOrigine)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getgedadherent($d1, $d2, $nomOrigine) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - - $sql = 'call sp_p_get_ged_adherent(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idAdherent, $d1, $d2, $nomOrigine)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrergedadherent($nomOrigine, $nouveau_fichier, $taille) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $user = $_SESSION['p_login']; - $cheminFichier = $_SESSION['p_dossierGed'].$nouveau_fichier; - - $sql = 'call sp_p_ajouter_ged_adherent(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idAdherent, $nomOrigine, $cheminFichier, $taille, $user)); - } - - public function getged($d1, $d2, $nomOrigine) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_ged(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $d1, $d2, $nomOrigine)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrerged($nomOrigine, $nouveau_fichier, $taille) - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - $cheminFichier = $_SESSION['p_dossierGed'].$nouveau_fichier; - - $sql = 'call sp_p_ajouter_ged(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $codePrestataire, $nomOrigine, $cheminFichier, $taille, $user)); - } - - public function getgedpharmacie() - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - - $sql = 'call sp_p_get_ged_pharmacie(?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOrdonnance)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrergedpharmacie($nomOrigine, $nouveau_fichier, $taille) - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $cheminFichier = $_SESSION['p_dossierGed'].$nouveau_fichier; - - $sql = 'call sp_p_ajouter_ged_pharmacie(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroBonOrdonnance, $idSaisie, $user, $nomOrigine, $cheminFichier, $taille)); - } - - public function enregistrergedprescription($nomOrigine, $nouveau_fichier, $taille) - { - $numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $cheminFichier = $_SESSION['p_dossierGed'].$nouveau_fichier; - - $sql = 'call sp_p_ajouter_ged_prescription(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroBonOrdonnance, $idSaisie, $user, $nomOrigine, $cheminFichier, $taille)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Generartionbon.php b/extranet/Modele/Generartionbon.php deleted file mode 100644 index a39f9f4..0000000 --- a/extranet/Modele/Generartionbon.php +++ /dev/null @@ -1,29 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'], $codePrestataire, $codeTypeBon, $d1, $d2)); - - return $bonpecs->fetchAll(PDO::FETCH_ASSOC); - } - - public function detailgenerationbon($idgenerationbon) - { - $sql = 'call sp_detailgenerationbon(?)'; - $bonpecs = $this->executerRequete($sql, array($idgenerationbon)); - - return $bonpecs->fetchAll(PDO::FETCH_ASSOC); - } - - public function unegenerationbon($idgenerationbon) - { - $sql = 'call sp_afficher_genererationbon(?)'; - $generationbon = $this->executerRequete($sql, array($idgenerationbon)); - - return $generationbon->fetch(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Groupesanguin.php b/extranet/Modele/Groupesanguin.php deleted file mode 100644 index 7402135..0000000 --- a/extranet/Modele/Groupesanguin.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Langue.php b/extranet/Modele/Langue.php deleted file mode 100644 index fb56bfa..0000000 --- a/extranet/Modele/Langue.php +++ /dev/null @@ -1,14 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Lienparente.php b/extranet/Modele/Lienparente.php deleted file mode 100644 index 270e4fa..0000000 --- a/extranet/Modele/Lienparente.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Localite.php b/extranet/Modele/Localite.php deleted file mode 100644 index 6468f85..0000000 --- a/extranet/Modele/Localite.php +++ /dev/null @@ -1,71 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeLocalite,$libelle,$ville)); - return $localite; - } - public function getLocalite($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeLocalite, A.libelle, A.codePays, A.codeVille, - B.libelle as pays, C.libelle as libelleVille - FROM localite A left join pays B on (B.codeSociete=A.codeSociete AND B.codePays=A.codePays) - left join ville C on (C.codeSociete=A.codeSociete AND C.codeVille=A.codeVille) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $localite = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($localite->rowCount() > 0) - return $localite->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune localité ne correspond à cet id : '$id'"); - } - public function getNombreLocalite() - { - $sql = 'select count(*) as nbLocalite FROM localite A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbLocalite']; - } - - public function ajouter($codeSociete, $codeLocalite, $libelle, $codePays, $codeVille) { - $sql = 'INSERT INTO localite (codeSociete, codeLocalite, libelle, codePays, codeVille) VALUES (?, ?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeLocalite, $libelle, $codePays, $codeVille)); - } - - public function modifier($id, $codeLocalite, $libelle, $codePays, $codeVille) { - $sql = 'UPDATE localite SET codeLocalite=?, libelle=?, codePays=?, codeVille=? where (id=?)'; - $this->executerRequete($sql, array($codeLocalite, $libelle, $codePays, $codeVille, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM localite WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeLocalite) { - $sql = 'select id FROM localite WHERE (codeSociete=?) and (codeLocalite=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeLocalite)); - return ($resultat->rowCount() > 0); - } - - public function getListe($codePays=null, $codeVille=null) { - $codePays = contruireParam($codePays); - $codeVille = contruireParam($codeVille); - $sql = 'SELECT codeLocalite as `code`, libelle FROM localite - WHERE (codeSociete=? AND codePays=? AND codeVille=?) order by libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codePays, $codeVille)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Logconnexion.php b/extranet/Modele/Logconnexion.php deleted file mode 100644 index 709a764..0000000 --- a/extranet/Modele/Logconnexion.php +++ /dev/null @@ -1,28 +0,0 @@ -executerRequete($sql, array($login, $heureConnexion, $ipConnexion, $idSaisie)); - - return $this->dernierId(); - } - - public function succesconnexion($idConnexion) - { - $sql = 'UPDATE p_logconnexion SET success="1" where (id=?)'; - - $this->executerRequete($sql, array($idConnexion)); - } - - public function suivisaisies($login, $idSaisie, $codeLangue) - { - $sql = 'CALL sp_p_init_suivisaisies(?, ?, ?);'; - - $this->executerRequete($sql, array($login, $idSaisie, $codeLangue)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Medecin.php b/extranet/Modele/Medecin.php deleted file mode 100644 index fe82d7f..0000000 --- a/extranet/Modele/Medecin.php +++ /dev/null @@ -1,78 +0,0 @@ -executerRequete($sql, array($codePrestataire, $nomsearch, $noOrdreMedecin, $filtreMedecin)); - - return $medecins; - } - - public function getmedecinsvide() { - $sql = 'call sp_p_medecins_vide()'; - $medecins = $this->executerRequete($sql); - return $medecins; - } - - public function getMedecins($codeMedecin=null,$nom=null,$prenoms=null) { - $codeMedecin = contruireParamLike($codeMedecin); - $nom = contruireParamLike($nom); - $prenoms = contruireParamLike($prenoms); - - $sql = 'SELECT A.*, B.libelle as specialite FROM p_medecin A left join specialite B on (B.codeSpecialite=A.codeSpecialite) - WHERE (A.codeMedecin LIKE ? AND A.nom LIKE ? AND A.prenoms LIKE ?) - order by A.nom, A.prenoms'; - - $medecins = $this->executerRequete($sql, array($codeMedecin,$nom,$prenoms)); - return $medecins; - } - - public function getMedecin($id) { - $sql = 'SELECT A.*, B.libelle as specialite FROM p_medecin A - left join specialite B on (B.codeSpecialite=A.codeSpecialite) - WHERE (A.id=?)'; - - $medecin = $this->executerRequete($sql, array($id)); - if ($medecin->rowCount() > 0) - return $medecin->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun médecin ne correspond à cet id : '$id'"); - } - public function ajouter($codeMedecin, $nom, $prenoms, $telephone, $email, $noOrdreMedecin, $codeSpecialite) { - $sql = 'INSERT INTO p_medecin (codeMedecin, nom, prenoms, telephone, email, noOrdreMedecin, codeSpecialite) - VALUES (?, ?, ?, ?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeMedecin, $nom, $prenoms, $telephone, $email, $noOrdreMedecin, $codeSpecialite)); - } - - public function modifier($id, $codeMedecin, $nom, $prenoms, $telephone, $email, $noOrdreMedecin, $codeSpecialite) { - $sql = 'UPDATE p_medecin SET codeMedecin=? , nom=?, prenoms=?, telephone=?, email=?, noOrdreMedecin=? , codeSpecialite=? where (id=?)'; - $this->executerRequete($sql, array($codeMedecin, $nom, $prenoms, $telephone, $email, $noOrdreMedecin, $codeSpecialite, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM p_medecin WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeMedecin) { - $sql = 'select id FROM p_medecin WHERE (codeMedecin=?)'; - $resultat = $this->executerRequete($sql, array($codeMedecin)); - return ($resultat->rowCount() > 0); - } -} \ No newline at end of file diff --git a/extranet/Modele/Medecinprestataire.php b/extranet/Modele/Medecinprestataire.php deleted file mode 100644 index 944d8f9..0000000 --- a/extranet/Modele/Medecinprestataire.php +++ /dev/null @@ -1,54 +0,0 @@ -executerRequete($sql, array($codePrestataire)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function Rqmedecin($codePrestataire, $codeSpecialite, $nom, $prenoms) - { - $codePrestataire = contruireParamLike($codePrestataire); - //$specialite = contruireParamLike($specialite); - $codeSpecialite = contruireParamLike($codeSpecialite); - $nom = contruireParamLike($nom); - $prenoms = contruireParamLike($prenoms); - - $codeTypeUtilisateur = $_SESSION['p_codeTypeUtilisateur']; - - if($codeTypeUtilisateur=="PR") - { - $codePrestataire = $_SESSION["p_codePrestataireUtilisateur"]; - $sql = 'SELECT C.libelle AS prestataire, S.libelle as specialite, B.nom, B.prenoms, - B.telephone, B.email, B.noOrdreMedecin - FROM medecinprestataire A - JOIN medecin B ON (B.codeMedecin=A.codeMedecin) - JOIN prestataire C ON (C.codePrestataire=A.codePrestataire) - LEFT JOIN specialite S ON (S.codeSpecialite=B.codeSpecialite) - WHERE (A.codePrestataire=?) AND (B.codeSpecialite LIKE ?) - AND (B.nom LIKE ?) AND (B.prenoms LIKE ?) - ORDER BY C.libelle, S.libelle, B.nom, B.prenoms'; - } else - { - $sql = 'SELECT C.libelle AS prestataire, S.libelle as specialite, B.nom, B.prenoms, - B.telephone, B.email, B.noOrdreMedecin - FROM medecinprestataire A - JOIN medecin B ON (B.codeMedecin=A.codeMedecin) - JOIN prestataire C ON (C.codePrestataire=A.codePrestataire) - LEFT JOIN specialite S ON (S.codeSpecialite=B.codeSpecialite) - WHERE (A.codePrestataire LIKE ?) AND (B.codeSpecialite LIKE ?) - AND (B.nom LIKE ?) AND (B.prenoms LIKE ?) - ORDER BY C.libelle, S.libelle, B.nom, B.prenoms'; - } - // $liste = $this->executerRequete($sql, array($codePrestataire, $specialite, $nom, $prenoms)); - $liste = $this->executerRequete($sql, array($codePrestataire, $codeSpecialite, $nom, $prenoms)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Menu.php b/extranet/Modele/Menu.php deleted file mode 100644 index dc60050..0000000 --- a/extranet/Modele/Menu.php +++ /dev/null @@ -1,20 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeProfil)); - - return $menu->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Menuutilisateur.php b/extranet/Modele/Menuutilisateur.php deleted file mode 100644 index 7d9aaf4..0000000 --- a/extranet/Modele/Menuutilisateur.php +++ /dev/null @@ -1,15 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'], $codeProfil)); - - return $menusutilisateur; - } -} \ No newline at end of file diff --git a/extranet/Modele/Menuvueutilisateur.php b/extranet/Modele/Menuvueutilisateur.php deleted file mode 100644 index 4fb100e..0000000 --- a/extranet/Modele/Menuvueutilisateur.php +++ /dev/null @@ -1,27 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'], $_SESSION['p_codeProfil'], $vue)); - - $_SESSION['p_menu'.$vue] = $menuvue->fetchAll(PDO::FETCH_ASSOC); - } - // ajouté le 30/07/2019 - $_SESSION['p_vue'] = $vue; - } -} \ No newline at end of file diff --git a/extranet/Modele/Messagerie.php b/extranet/Modele/Messagerie.php deleted file mode 100644 index a72ac41..0000000 --- a/extranet/Modele/Messagerie.php +++ /dev/null @@ -1,166 +0,0 @@ -executerRequete($sql, array($codePrestataire)); - */ - - $sql = 'call sp_p_messages_non_lus_user(?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function countmessagesnonlus() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_count_messages_non_lus(?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire)); - - $donnees = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_nbMessagesNonLus_C'] = $donnees['nbMessagesNonLus']; - - return $_SESSION['p_nbMessagesNonLus_C']; - } - - public function creermessage($textMessage, $idParent) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_creer_messagerie(?, ?, ?, ?);'; - - $this->executerRequete($sql, array($codePrestataire, $textMessage, $user, $idParent)); - } - - public function marquercommelu($idMessagerie) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_marquer_messagerie_lu(?, ?);'; - - $this->executerRequete($sql, array($idMessagerie, $user)); - } - - public function getmessages($codePrestataire, $date1, $date2, $messageLu, $textMessage) - { - $sql = 'call sp_p_messages(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $date1, $date2, $messageLu, $textMessage)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function repondremessage($idMessagerie, $idParent, $textMessage) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_repondre_messagerie(?, ?, ?, ?, ?);'; - - $this->executerRequete($sql, array($codePrestataire, $idMessagerie, $idParent, $textMessage, $user)); - } - - - public function getmessageriesimple($idMessagerie, $idParent) - { - $sql = 'call sp_p_get_messagerie_simple(?, ?);'; - - $resultat = $this->executerRequete($sql, array($idMessagerie, $idParent)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - - public function getmessageriehistorique($idParent) - { - $sql = 'call sp_p_messages_historique(?)'; - - $resultat = $this->executerRequete($sql, array($idParent)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getmessagescommun($date1, $date2) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_messages_commun(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $date1, $date2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getderniermessagenonlu() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_dernier_message_non_lu(?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function countmessagesnonlususer() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_count_messages_non_lus_user(?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $user)); - - $donnees = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_nbMessagesNonLus_C'] = $donnees['nbMessagesNonLus']; - - return $_SESSION['p_nbMessagesNonLus_C']; - } - - public function getderniermessagenonluuser() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_dernier_message_non_lu_user(?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function marquercommeluser($idMessagerie) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_marquer_messagerie_lu_user(?, ?);'; - - $this->executerRequete($sql, array($idMessagerie, $user)); - } - - public function vidermessagerie($dateLimite) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_marquer_messagerie_plusieurs_lu_user(?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $dateLimite, $user)); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Modepaiement.php b/extranet/Modele/Modepaiement.php deleted file mode 100644 index 84eeabe..0000000 --- a/extranet/Modele/Modepaiement.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Moyenpaiement.php b/extranet/Modele/Moyenpaiement.php deleted file mode 100644 index 79ed85f..0000000 --- a/extranet/Modele/Moyenpaiement.php +++ /dev/null @@ -1,77 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeMoyenPaiement,$libelle)); - return $moyenpaiements; - } - public function getMoyenpaiement($id) { - $sql = 'SELECT * FROM moyenpaiement A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $moyenpaiement = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($moyenpaiement->rowCount() > 0) - return $moyenpaiement->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun moyen de paiement ne correspond à cet id : '$id'"); - } - - public function ajouter($codeSociete, $codeMoyenPaiement, $libelle, $codeTypePaiement, $numeroCompte) { - $sql = 'INSERT INTO moyenpaiement (codeSociete, codeMoyenPaiement, libelle, codeTypePaiement, numeroCompte) VALUES (?, ?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeMoyenPaiement, $libelle, $codeTypePaiement, $numeroCompte)); - } - - public function modifier($id, $codeSociete, $codeMoyenPaiement, $libelle, $codeTypePaiement, $numeroCompte) { - $sql = 'UPDATE moyenpaiement SET ccodeMoyenPaiement=?, libelle=?, codeTypePaiement=?, numeroCompte=? where (id=?)'; - $this->executerRequete($sql, array($codeSociete, $codeMoyenPaiement, $libelle, $codeTypePaiement, $numeroCompte, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM moyenpaiement WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeMoyenPaiement) { - $sql = 'select id FROM moyenpaiement WHERE (codeSociete=?) and (codeMoyenPaiement=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeMoyenPaiement)); - return ($resultat->rowCount() > 0); - } - - public function getListe($codeModePaiement) { - $sql = 'SELECT codeMoyenPaiement as `code`, moyenpaiement AS libelle FROM vw_moyenpaiement - WHERE (codeSociete=?) AND (codeModePaiement=?) ORDER BY 2'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeModePaiement)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getNumeroCompte($codeModePaiement, $codeMoyenPaiement) { - $sql = 'SELECT numeroCompte FROM vw_moyenpaiement WHERE (codeSociete=?) - AND (codeModePaiement=?) AND (codeMoyenPaiement=?)'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeModePaiement, $codeMoyenPaiement)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['numeroCompte']; - - /* - if($resultat->rowCount() > 0) - { - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['numeroCompte']; - } - else - { - return ""; - } - */ - } - -} \ No newline at end of file diff --git a/extranet/Modele/Naturepiece.php b/extranet/Modele/Naturepiece.php deleted file mode 100644 index 4c22a63..0000000 --- a/extranet/Modele/Naturepiece.php +++ /dev/null @@ -1,62 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeNaturePiece,$libelle)); - return $banques; - } - public function getNaturepiece($id) { - $sql = 'SELECT id, codeSociete, codeNaturePiece, libelle - FROM naturepiece A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $naturepiece = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($naturepiece->rowCount() > 0) - return $naturepiece->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune naturepiece ne correspond à cet id : '$id'"); - } - public function getNombreNaturepiece() - { - $sql = 'select count(*) as nbNaturepiece FROM naturepiece A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbNaturepiece']; - } - - public function ajouter($codeSociete, $codeNaturePiece, $libelle) { - $sql = 'INSERT INTO naturepiece (codeSociete, codeNaturePiece, libelle) VALUES (?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeNaturePiece, $libelle)); - } - - public function modifier($id, $codeNaturePiece, $libelle) { - $sql = 'UPDATE naturepiece SET codeNaturePiece=?, libelle=? where (id=?)'; - $this->executerRequete($sql, array($codeNaturePiece, $libelle, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM naturepiece WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeNaturePiece) { - $sql = 'select id FROM naturepiece WHERE (codeSociete=?) and (codeNaturePiece=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeNaturePiece)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeNaturePiece as `code`, libelle FROM naturepiece - WHERE (codeSociete=?) order by ordre, libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Natureprestataire.php b/extranet/Modele/Natureprestataire.php deleted file mode 100644 index 5415953..0000000 --- a/extranet/Modele/Natureprestataire.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Opticiens.php b/extranet/Modele/Opticiens.php deleted file mode 100644 index 8b7ace3..0000000 --- a/extranet/Modele/Opticiens.php +++ /dev/null @@ -1,72 +0,0 @@ -executerRequete($sql, array($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesoptiquetotal($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codePrestatairePrescription = contruireParamLike($codePrestatairePrescription); - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleOptique = contruireParamLike($libelleOptique); - - $sql = 'call sp_requetes_optique_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function requetesoptiqueexport($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codePrestatairePrescription = contruireParamLike($codePrestatairePrescription); - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleOptique = contruireParamLike($libelleOptique); - - $sql = 'call sp_requetes_optique_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOptique1, $numeroBonOptique2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleOptique) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Optique.php b/extranet/Modele/Optique.php deleted file mode 100644 index 935c744..0000000 --- a/extranet/Modele/Optique.php +++ /dev/null @@ -1,103 +0,0 @@ -executerRequete($sql, array($numeroOptique)); - - return $optique->fetch(PDO::FETCH_ASSOC); - } - - public function getoptique_opt($numeroBonOptique, $codePrestataireLivraison) - { - $sql = 'call sp_p_get_cons_opt(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOptique, $codePrestataireLivraison)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroBonExamen_C'] = $ligne['numeroBonExamen']; - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - return $ligne; - } - - public function get_facture_optique($idFacture) - { - $sql = 'call sp_p_get_facture_opt(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroBonExamen_C'] = $ligne['numeroBonExamen']; - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - return $ligne; - } - - public function getdetailoptique_opt($numeroBonOptique, $codePrestataireLivraison) - { - $sql = 'call sp_r_get_detail_optique_opt(?, ?)'; - - $optique = $this->executerRequete($sql, array($numeroBonOptique, $codePrestataireLivraison)); - - return $optique->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetail_facture_optique($idFacture) - { - $sql = 'call sp_p_get_detail_facture_opt(?)'; - - $optique = $this->executerRequete($sql, array($idFacture)); - - return $optique->fetchAll(PDO::FETCH_ASSOC); - } - - public function getContexteAjaxOptique($numeroOptique) - { - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - } -} \ No newline at end of file diff --git a/extranet/Modele/Optique_temp.php b/extranet/Modele/Optique_temp.php deleted file mode 100644 index 3cf04ea..0000000 --- a/extranet/Modele/Optique_temp.php +++ /dev/null @@ -1,364 +0,0 @@ -executerRequete($sql, array($numeroFeuilleMaladie, $idSaisie, $user)); - - return $optique->fetch(PDO::FETCH_ASSOC); - } - - public function getoptique($numeroOptique) - { - $sql = 'call sp_p_get_optique(?)'; - - $optique = $this->executerRequete($sql, array($numeroOptique)); - - return $optique->fetch(PDO::FETCH_ASSOC); - } - - public function getContexteAjaxOptique($numeroOptique) - { - $_SESSION['p_numeroOptique_C'] = $numeroOptique; - } - - public function enregistreroptique($numeroBonOptique, $codeMedecin, $codeGestionBon) - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_optique(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $idBeneficiaire, $numeroFeuilleMaladie, $numeroBonOptique, $codeMedecin, - $user, $idSaisie, $codeGestionBon)); - } - - public function getoptique_opt($numeroBonOptique) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeActeOptiqueCl = $_SESSION['p_codeActeOptiqueCl_C']; - - $sql = 'call sp_p_get_optique_temp_opt(?, ?, ?)'; - - $prescription = $this->executerRequete($sql, array($numeroBonOptique, $idSaisie, $user)); - - $ligne = $prescription->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - - return $ligne; - } - - public function initoptique_cso() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeActeOptique = $_SESSION['p_codeActeOptique_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_init_optique_cso(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $codeActeOptique, $idSaisie, $numeroFeuilleMaladie, $user)); - } - - public function initoptique_opt() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeActeOptique = $_SESSION['p_codeActeOptique_C']; - $numeroBonOptique = $_SESSION['p_numeroBonOptique_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $codeActeMonture = $_SESSION['p_codeActeMonture_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_optique_opt(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $codeActeOptique, $codeActeMonture, $idSaisie, $numeroBonOptique, $user, $codeTarifOptique, $tm)); - } - - public function getContexteAjaxPrescription($numeroPrescription) - { - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - } - - public function getContexteAjaxOrdonnance($numeroBonOrdonnance) - { - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - } - - public function enregistrerprescription($numeroBon, $codeMedecin) - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_prescription(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idBeneficiaire, $numeroFeuilleMaladie, $numeroPrescription, $numeroBon, $codeMedecin, $user)); - - } - - public function getdetailnonlivre() - { - $numeroOptique = $_SESSION['p_numeroOptique_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - if (est_anglophone()) - { - $sql = 'call sp_p_get_detail_non_livre_opt_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_get_detail_non_livre_opt(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroOptique, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaillivre() - { - $numeroOptique = $_SESSION['p_numeroOptique_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - if (est_anglophone()) - { - $sql = 'call sp_p_get_detail_livre_opt_eng(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_get_detail_livre_opt(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($numeroOptique, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function ajouterverre($idOptique) - { - $sql = 'call sp_p_ajouter_verre_temp(?)'; - - $this->executerRequete($sql, array($idOptique)); - } - - public function ajouterverretous() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_ajouter_verre_temp_tous(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $idSaisie, $user)); - } - - public function retirerverre($idOptique) - { - $sql = 'call sp_p_retirer_verre_temp(?)'; - - $this->executerRequete($sql, array($idOptique)); - } - - public function retirerverretous() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_retirer_verre_temp_tous(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $idSaisie, $user)); - } - - public function enregistrerpharmacie() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_pharmacie_cso(?, ?, ? , ? , ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - } - - public function factureropotique() - { - $numeroOptique = $_SESSION['p_numeroOptique_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $user_id = $_SESSION['p_user_id_C']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_optique_opt(?, ?, ?, ?, ? , ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroOptique, $idSaisie, $user, $user_id, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - } - - public function facturermonture($numeroFacture, $user_id_substitut) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $user_id = $_SESSION['p_user_id_C']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_optique_monture(?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idSaisie, $user, $user_id, $idAdherent, $numeroAdherent, $idBeneficiaire, - $numeroBeneficiaire, $numeroFacture, $user_id_substitut)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idFactureMonture'] = $ligne['idFactureMonture']; - $idFactureMonture = $_SESSION['p_idFactureMonture']; - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - - return $idFactureMonture; - } - - public function videroptiquetemp() - { - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - - $sql = 'call sp_p_vider_optique_temp(?, ?)'; - - $this->executerRequete($sql, array($user, $idSaisie)); - } - - public function majmonturetemp($idOptique, $monture) - { - $codeActeMonture = $_SESSION['p_codeActeMonture_C']; - - $sql = 'call sp_p_maj_monture_temp(?, ?, ?)'; - $this->executerRequete($sql, array($idOptique, $monture, $codeActeMonture)); - } - - public function initmonture() - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - $codeActeOptique = $_SESSION['p_codeActeOptique_C']; - $codeActeMonture = $_SESSION['p_codeActeMonture_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_monture(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $codePrestataire, $idBeneficiaire, $user, $idSaisie, $idAdherent, - $numeroAdherent, $numeroBeneficiaire, $codeActeOptique, $codeActeMonture, $tm)); - } - - public function getmonture_temp() - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_monture_temp(?, ?)'; - - $resultat = $this->executerRequete($sql, array($idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getdetailmonture_temp() - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_detail_monture_temp(?, ?)'; - - $resultat = $this->executerRequete($sql, array($idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function majmonturetemp_monture($idOptique, $monture, $numeroFacture) - { - $sql = 'call sp_p_maj_monture_temp_monture(?, ?, ?)'; - $this->executerRequete($sql, array($idOptique, $monture, $numeroFacture)); - } - - public function afficher_garantieadherent_temp_monture() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_garantieadherent_temp_monture(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function creerverre($libelleOptique, $prixVerre) - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $tm = $_SESSION['p_tm_C']; - $accesAjoutPh = $_SESSION['p_accesAjoutPh_C']; - - $sql = 'call sp_p_creer_nv_verres(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, - $codeTarifOptique, $tm, $libelleOptique, $prixVerre, $accesAjoutPh)); - } - - public function demanderaccordmont($idOptique, $prixPrestataire) - { - $codeSociete = $_SESSION['p_codeSociete']; - - $sql = 'call sp_p_demanderaccordmont(?, ?, ?)'; - - $this->executerRequete($sql, array($idOptique, $codeSociete, $prixPrestataire)); - } - -} diff --git a/extranet/Modele/Ouinon.php b/extranet/Modele/Ouinon.php deleted file mode 100644 index 9d5df39..0000000 --- a/extranet/Modele/Ouinon.php +++ /dev/null @@ -1,20 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Pays.php b/extranet/Modele/Pays.php deleted file mode 100644 index 9d5141d..0000000 --- a/extranet/Modele/Pays.php +++ /dev/null @@ -1,62 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codePays,$libelle)); - return $payss; - } - public function getPays($id) { - $sql = 'SELECT id, codeSociete, codePays, libelle - FROM pays A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $pays = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($pays->rowCount() > 0) - return $pays->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune pays ne correspond à cet id : '$id'"); - } - public function getNombrePays() - { - $sql = 'select count(*) as nbPays FROM pays A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbPays']; - } - - public function ajouter($codeSociete, $codePays, $libelle) { - $sql = 'INSERT INTO pays (codeSociete, codePays, libelle) VALUES (?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codePays, $libelle)); - } - - public function modifier($id, $codePays, $libelle) { - $sql = 'UPDATE pays SET codePays=?, libelle=? where (id=?)'; - $this->executerRequete($sql, array($codePays, $libelle, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM pays WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codePays) { - $sql = 'select id FROM pays WHERE (codeSociete=?) and (codePays=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codePays)); - return ($resultat->rowCount() > 0); - } - - public function getListe($codePaysDefault=null) { - $codePaysDefault = contruireParam($codePaysDefault); - $sql = 'SELECT case when codePays = ? then "0" else "1" end as ordre, codePays as `code`, libelle - FROM pays WHERE (codeSociete=?) order by 1, libelle'; - - $liste = $this->executerRequete($sql, array($codePaysDefault, $_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Periode.php b/extranet/Modele/Periode.php deleted file mode 100644 index 2479c96..0000000 --- a/extranet/Modele/Periode.php +++ /dev/null @@ -1,19 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Pharmacie.php b/extranet/Modele/Pharmacie.php deleted file mode 100644 index 9716726..0000000 --- a/extranet/Modele/Pharmacie.php +++ /dev/null @@ -1,72 +0,0 @@ -executerRequete($sql, array($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetespharmacietotal($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codePrestatairePrescription = contruireParamLike($codePrestatairePrescription); - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleMedicament = contruireParamLike($libelleMedicament); - - $sql = 'call sp_requetes_pharmacie_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function requetespharmacieexport($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codePrestatairePrescription = contruireParamLike($codePrestatairePrescription); - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleMedicament = contruireParamLike($libelleMedicament); - - $sql = 'call sp_requetes_pharmacie_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, - $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Police.php b/extranet/Modele/Police.php deleted file mode 100644 index c374eb4..0000000 --- a/extranet/Modele/Police.php +++ /dev/null @@ -1,523 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroClient)); - return $polices; - } - - public function getPolicesId($id) { - $sql = 'SELECT A.id, A.codeSociete, A.idClient, A.numeroClient, numeroPolice, numeroPoliceSociete, numeroDevis, - B.libelle As typeAvenant, dateEffet, dateFin, dateEcheance, numeroAvenant, dateAvenant, ADDDATE(A.dateEcheance, +1) as DateRenouvellement, - D.libelle as etatPolice, A.codeFractionnement, T.libelle As typeContrat, IFNULL(A.primeFamille,"0") as primeFamille, - IFNULL(A.primeBeneficiaire,"0") as primeBeneficiaire, rachatTm, rachatTm, TM.libelle as rachattm, garantieArchive, collegeArchive - FROM police A - left join typecontrat T on (T.codeTypeContrat=A.codeTypeContrat) - left join typeavenant B on (B.codeTypeAvenant=A.codeTypeAvenant) - left join etatpolice D on (D.codeEtatPolice=A.codeEtatPolice) - left join rachattm TM on (TM.codeRachatTm=A.rachatTm) - WHERE (A.codeSociete=?) AND (A.idClient=?) order by A.id'; - - $polices = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - return $polices; - } - - public function getPolice($numeroPolice) { - $sql = 'SELECT A.id, A.codeSociete, A.idClient, A.numeroClient, numeroPolice, numeroPoliceSociete, numeroDevis, - A.codeTypeContrat, B.libelle As typeContrat, dateEffet, dateFin, dateEcheance, numeroAvenant, ADDDATE(A.dateEcheance, +1) as DateRenouvellement, - A.codeTypeAvenant, D.libelle as typeAvenant, dateAvenant, A.codeApporteur, F.libelle as apporteur, A.codeGestionnaire, - concat(G.nom, " ", G.prenoms) as gestionnaire, A.dateCre, A.userCre, A.dateModif, A.userModif, A.codeEtatPolice, - E.libelle As etatPolice, A.codeFractionnement, IFNULL(A.primeFamille,"0") as primeFamille, garantieArchive, collegeArchive, - IFNULL(A.primeBeneficiaire,"0") as primeBeneficiaire, rachatTm, TM.libelle as rachattm - FROM police A left join typecontrat B on (B.codeTypeContrat=A.codeTypeContrat) - left join typeavenant D on (D.codeTypeAvenant=A.codeTypeAvenant) - left join etatpolice E on (E.codeEtatPolice=A.codeEtatPolice) - left join apporteur F on (F.codeSociete=A.codeSociete AND F.codeApporteur=A.codeApporteur) - left join gestionnaire G on (G.codeSociete=A.codeSociete AND G.codeGestionnaire=A.codeGestionnaire) - left join rachattm TM on (TM.codeRachatTm=A.rachatTm) - WHERE (A.codeSociete=?) AND (A.numeroPolice=?)'; - - $police = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroPolice)); - - if ($police->rowCount() > 0) - return $police->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune police ne correspond au numéo '$numeroPolice'"); - } - - public function getPoliceId($id) { - $sql = 'SELECT A.id, A.codeSociete, A.idClient, A.numeroClient, numeroPolice, numeroPoliceSociete, numeroDevis, - A.codeTypeContrat, B.libelle As typeContrat, dateEffet, dateFin, dateEcheance, numeroAvenant, ADDDATE(A.dateEcheance, +1) as DateRenouvellement, - A.codeTypeAvenant, D.libelle as typeAvenant, dateAvenant, A.codeApporteur, F.libelle as apporteur, A.codeGestionnaire, - concat(G.nom, " ", G.prenoms) as gestionnaire, A.dateCre, A.userCre, A.dateModif, A.userModif, A.codeEtatPolice, A.taciteReconduction, - E.libelle As etatPolice, A.codePeriodicite, A.codeFractionnement, H.libelle as fractionnement, A.deduireComm, A.tauxRachatTm, - IFNULL(B.tauxTaxe,"0") AS tauxTaxe, IFNULL(A.tauxCommission,"0") AS tauxCommission, IFNULL(A.primeFamille,"0") as primeFamille, - IFNULL(A.primeBeneficiaire,"0") as primeBeneficiaire, rachatTm, TM.libelle as rachattm, garantieArchive, collegeArchive - FROM police A - left join typecontrat B on (B.codeTypeContrat=A.codeTypeContrat) - left join typeavenant D on (D.codeTypeAvenant=A.codeTypeAvenant) - left join etatpolice E on (E.codeEtatPolice=A.codeEtatPolice) - left join apporteur F on (F.codeSociete=A.codeSociete AND F.codeApporteur=A.codeApporteur) - left join gestionnaire G on (G.codeSociete=A.codeSociete AND G.codeGestionnaire=A.codeGestionnaire) - left join fractionnement H on (H.codeFractionnement=A.codeFractionnement) - left join rachattm TM on (TM.codeRachatTm=A.rachatTm) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $police = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - - if ($police->rowCount() > 0) - return $police->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune police ne correspond au ie '$id'"); - } - - public function getPoliceIdSimple($id) { - $sql = 'SELECT A.* FROM police A WHERE (A.codeSociete=?) AND (A.id=?)'; - $police = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($police->rowCount() > 0) - return $police->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune police ne correspond au ie '$id'"); - } - - - public function getTextecp($id) { - $sql = 'select texteCp from police where (id=?)'; - $textecp = $this->executerRequete($sql, array($id)); - return $textecp->fetch(PDO::FETCH_ASSOC); - } - - public function enregistrertexteCp($texteCp, $idPolice) { - $sql = 'update police set texteCp=? where (id=?)'; - $this->executerRequete($sql, array($texteCp, $idPolice)); - } - - public function getNombrePolices($numeroClient) - { - $sql = 'select count(*) as nbPolices FROM polices A WHERE (A.codeSociete=?) AND (A.numeroClient=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroClient)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbPolices']; - } - - public function getNombrePolicesId($id) - { - $sql = 'select count(*) as nbPolices FROM police A WHERE (A.codeSociete=?) AND (A.id=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbPolices']; - } - - public function getContextePoliceId($id) { - $sql = 'SELECT A.idClient, A.numeroClient, A.id AS idPolice, A.numeroPolice, - IFNULL(B.tauxTaxe,"0") AS tauxTaxe, A.codeEtape, IFNULL(A.tauxCommission,"0") AS tauxCommission, - IFNULL(A.primeFamille,"0") as primeFamille, IFNULL(A.primeBeneficiaire,"0") as primeBeneficiaire, rachatTm, - TM.libelle as rachattm, garantieArchive, collegeArchive, A.codeTypeAvenant, ADDDATE(A.dateEcheance, +1) as DateRenouvellement, - A.dateEffet, A.dateFin, A.dateEcheance, dateAvenant, A.deduireComm, A.codeEtatPolice - FROM police A - LEFT JOIN typecontrat B ON (B.codeTypeContrat=A.codeTypeContrat) - left join rachattm TM on (TM.codeRachatTm=A.rachatTm) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - $context = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_idClient_C'] = $context['idClient']; - $_SESSION['p_numeroClient_C'] = $context['numeroClient']; - $_SESSION['p_idPolice_C'] = $context['idPolice']; - $_SESSION['p_numeroPolice_C'] = $context['numeroPolice']; - $_SESSION['p_codeEtape_C'] = $context['codeEtape']; - $_SESSION['p_tauxTaxe_C'] = $context['tauxTaxe']; - $_SESSION['p_tauxCommission_C'] = $context['tauxCommission']; - $_SESSION['p_deduireComm_C'] = $context['deduireComm']; - $_SESSION['p_codeTypeAvenant_C'] = $context['codeTypeAvenant']; - $_SESSION['p_codeEtatPolice_C'] = $context['codeEtatPolice']; - - $_SESSION['p_dateEffet_C'] = $context['dateEffet']; - $_SESSION['p_dateFin_C'] = $context['dateFin']; - $_SESSION['p_dateEcheance_C'] = $context['dateEcheance']; - - $_SESSION['p_DateRenouvellement_C'] = $context['DateRenouvellement']; - - $_SESSION['p_dateAvenant_C'] = $context['dateAvenant']; - - $_SESSION['p_idPoliceAjax'] = $_SESSION['p_idPolice_C']; - - $_SESSION['p_primeFamille_C'] = $context['primeFamille']; - $_SESSION['p_primeBeneficiaire_C'] = $context['primeBeneficiaire']; - - $_SESSION['p_rachatTm_C'] = $context['rachatTm']; - - // $_SESSION['p_garantieArchive_C'] = $context['garantieArchive']; - $_SESSION['p_collegeArchive_C'] = $context['collegeArchive']; - - $_SESSION['p_idAdherent_C'] = ""; - $_SESSION['p_numeroAdherent_C'] = ""; - $_SESSION['p_nomAdherent_C'] = ""; - - $_SESSION['p_idBeneficiaire_C'] = ""; - $_SESSION['p_numeroBeneficiaire_C'] = ""; - $_SESSION['p_idBeneficiaire_sav'] = "0"; - $_SESSION['p_nomBeneficiaire_C'] = ""; - $_SESSION['p_lienPhoto_C'] = ""; - - // nb famille et de dépendants - $sql = 'select - ifnull(sum(case when codeLienParente="A" then "1" else "0" end), "0") as ndAdh, - ifnull(SUM(case when codeLienParente="A" then "0" else "1" end), "0") as ndDep, - ifnull(SUM(case when codeEtatBeneficiaire="V" then "1" else "0" end), "0") as ndActif - from beneficiaire where (codeSociete=?) AND (idPolice=?)'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - $effectif = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_ndAdh_C'] = $effectif['ndAdh']; - $_SESSION['p_ndDep_C'] = $effectif['ndDep']; - $_SESSION['p_ndActif_C'] = $effectif['ndActif']; - } - - public function getDenierNumeroPolice($annee) - { - $sql = 'select dernierNumeroPolice from numerotationpolice WHERE (codeSociete=? AND annee=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$annee)); - - if ($resultat->rowCount() == 0) - { - $sql = 'insert into numerotationpolice (codeSociete, annee, dernierNumeroPolice) values (?,?,?)'; - $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$annee,"0")); - return "1"; - } else - { - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['dernierNumeroPolice']+1; - } - } - - public function setDenierNumeroPolice($annee,$dernierNumeroPolice) - { - $sql = 'update numerotationpolice set dernierNumeroPolice=? WHERE (codeSociete=? AND annee=?)'; - $this->executerRequete($sql, array($dernierNumeroPolice, $_SESSION['p_codeSociete'], $annee)); - } - - public function ajouter($codeSociete, $idClient, $numeroClient, $numeroPolice, $numeroPoliceSociete, $codeTypeContrat, - $dateEffet, $dateFin, $dateEcheance, $numeroAvenant, $codeTypeAvenant, $dateAvenant, $codeApporteur, - $codeGestionnaire, $dateCre, $userCre, $codeEtatPolice, $codeFractionnement, $codePeriodicite, $tauxCommission, - $primeFamille, $primeBeneficiaire, $rachatTm, $deduireComm, $taciteReconduction, $tauxRachatTm) - { - - $sql = 'INSERT INTO police (codeSociete, idClient, numeroClient, numeroPolice, numeroPoliceSociete, - codeTypeContrat, dateEffet, dateFin, dateEcheance, numeroAvenant, codeTypeAvenant, dateAvenant, - codeApporteur, codeGestionnaire, dateCre, userCre, codeEtatPolice, codeFractionnement, codePeriodicite, tauxCommission, - primeFamille, primeBeneficiaire, rachatTm, deduireComm, taciteReconduction, tauxRachatTm) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $idClient, $numeroClient, $numeroPolice, $numeroPoliceSociete, $codeTypeContrat, - $dateEffet, $dateFin, $dateEcheance, $numeroAvenant, $codeTypeAvenant, $dateAvenant, $codeApporteur, - $codeGestionnaire, $dateCre, $userCre, $codeEtatPolice, $codeFractionnement, $codePeriodicite, $tauxCommission, - $primeFamille, $primeBeneficiaire, $rachatTm, $deduireComm, $taciteReconduction, $tauxRachatTm)); - - $dernierId=$this->dernierId(); - - $sql = 'insert into avenant (codeSociete, idPolice, numeroPolice, codeTypeAvenant, numeroAvenant, dateEffet, dateCre, user, dateSysteme) - select codeSociete, id as idPolice, numeroPolice, codeTypeAvenant, numeroAvenant, dateEffet, dateCre, userCre as `user`, dateSysteme - from police where (id=?)'; - - $this->executerRequete($sql, array($dernierId)); - - return $dernierId; - - } - - public function modifier($id, $tauxCommission, $primeFamille, $primeBeneficiaire, $codeApporteur, $rachatTm) - { - $sql = 'UPDATE police SET tauxCommission=?, primeFamille=?, primeBeneficiaire=?, codeApporteur=?, rachatTm=? where (id=?)'; - $this->executerRequete($sql, array($tauxCommission, $primeFamille, $primeBeneficiaire, $codeApporteur, $rachatTm, $id)); - } - - public function initresiliation($idPolice) - { - $dateAvenant = $_SESSION['p_dateAvenant_C']; - $motifavenant = $_SESSION['p_motifavenant_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_init_resiliation(?, ?, ?, ?)'; - $this->executerRequete($sql, array($idPolice, $dateAvenant, $user, $motifavenant)); - } - - public function initretrait($idPolice) - { - $dateAvenant = $_SESSION['p_dateAvenant_C']; - $motifavenant = $_SESSION['p_motifavenant_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_init_retrait(?, ?, ?, ?)'; - $this->executerRequete($sql, array($idPolice, $dateAvenant, $user, $motifavenant)); - } - - public function initrerenouvellement($idPolice) - { - $dateAvenant = $_SESSION['p_dateAvenant_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_init_renouvellement(?, ?, ?)'; - $this->executerRequete($sql, array($idPolice, $dateAvenant, $user)); - } - - public function initLimiteAdditionnelle($idPolice, $dateAvenant) - { - $user = $_SESSION['p_login']; - - $sql = 'call sp_init_limite_additionnelle(?, ?, ?)'; - $this->executerRequete($sql, array($idPolice, $dateAvenant, $user)); - } - - public function getAvenantTemp() { - $user = $_SESSION['p_login']; - $sql = 'SELECT * FROM avenant_temp WHERE (`user`=?) order by id desc'; - $resultat = $this->executerRequete($sql, array($user)); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getEmissionTemp() { - $user = $_SESSION['p_login']; - $sql = 'SELECT * FROM emission_temp WHERE (`user`=?)'; - $resultat = $this->executerRequete($sql, array($user)); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function creeravenant($idPolice, $codeTypeAvenant, $motifavenant, $dateAvenant) - { - $user = $_SESSION['p_login']; - $sql = 'call sp_creer_avenant(?, ?, ?, ?, ?)'; - $this->executerRequete($sql, array($idPolice, $codeTypeAvenant, $motifavenant, $dateAvenant, $user)); - } - - public function enregistrerresiliation() - { - $user = $_SESSION['p_login']; - $idPolice = $_SESSION['p_idPolice_C']; - - $sql = 'call sp_avenant_resiliation(?, ?)'; - $this->executerRequete($sql, array($idPolice, $user)); - } - - public function enregistrerretrait() - { - $user = $_SESSION['p_login']; - $idPolice = $_SESSION['p_idPolice_C']; - - $sql = 'call sp_avenant_retrait(?, ?)'; - $this->executerRequete($sql, array($idPolice, $user)); - } - - public function enregistrerrenouvellement() - { - $user = $_SESSION['p_login']; - $idPolice = $_SESSION['p_idPolice_C']; - - $sql = 'call sp_avenant_renouvellement(?, ?)'; - $this->executerRequete($sql, array($idPolice, $user)); - } - - public function getIdPolice($numeroPolice) { - $sql = 'SELECT id FROM police WHERE (codeSociete=?) AND (numeroPolice=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $numeroPolice)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['id']; - } - - public function existeligne($numeroPolice) { - $sql = 'select id FROM police WHERE (codeSociete=?) and (numeroPolice=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$numeroPolice)); - return ($resultat->rowCount() > 0); - } - - public function formaterNumeroPolice($annee,$numeroPolice) { - $numeroPolice = "00000".$numeroPolice; - $numeroPolice = substr($numeroPolice, -6); - $numeroPolice = $annee.$numeroPolice; - return $numeroPolice; - } - - public function supprimer($idPolice) { - $sql = 'select id from college where (idPolice=?) limit 1'; - $resultat = $this->executerRequete($sql, array($idPolice)); - - if($resultat->rowCount() == 0) - { - $sql = 'DELETE FROM police WHERE (id=?)'; - $this->executerRequete($sql, array($idPolice)); - return true; - } - else - { - return false; - } - } - - public function getExisteQuittance($idPolice) { - $sql = 'select id from emission where (idPolice=?) limit 1'; - $resultat = $this->executerRequete($sql, array($idPolice)); - - if($resultat->rowCount() == 0) - { - return "0"; - } - else - { - return "Q"; - } - } - - public function archivergarantie($id) { - $sql = 'UPDATE police SET garantieArchive="1" where (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function archivercollege($id) { - $sql = 'UPDATE police SET collegeArchive="1" where (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function getContexteAjaxPolice($id) - { - $sql = 'SELECT A.id as idPolice FROM police A WHERE (A.id=?)'; - $resultat = $this->executerRequete($sql, array($id)); - $context = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idPoliceAjax'] = $context['idPolice']; - $_SESSION['p_idPolice_C'] = $_SESSION['p_idPoliceAjax']; - } - - public function getEnteteCP($idPolice) - { - $sql = 'call sp_entete_cp(?);'; - - $entete = $this->executerRequete($sql, array($idPolice)); - return $entete->fetch(PDO::FETCH_ASSOC); - } - - public function getCollegesCP($idPolice) - { - $sql = 'call sp_collesges_police(?);'; - - $colleges = $this->executerRequete($sql, array($idPolice)); - return $colleges->fetchAll(PDO::FETCH_ASSOC); - } - - public function getGarantiesCollegesCP($idPolice) - { - $sql = 'call sp_garanties_colleges_police(?);'; - - $garantiescolleges = $this->executerRequete($sql, array($idPolice)); - return $garantiescolleges->fetchAll(PDO::FETCH_ASSOC); - } - - public function gettableauPrestationsCP($idPolice) - { - $sql = 'call sp_tableau_prestation_police(?);'; - - $colleges = $this->executerRequete($sql, array($idPolice)); - return $colleges->fetchAll(PDO::FETCH_ASSOC); - } - - public function getRapportSpPolice($idPolice, $dateReference) - { - $sql = 'call sp_rapport_sp_police(?, ?);'; - - $sppolice = $this->executerRequete($sql, array($idPolice, $dateReference)); - return $sppolice->fetch(PDO::FETCH_ASSOC); - } - - public function getConsommationPolice($idPolice, $dateReference) - { - // $dj = date("Y-m-d"); - $sql = 'call sp_consommation_police(?, ?);'; - - $consommationpolice = $this->executerRequete($sql, array($idPolice, $dateReference)); - return $consommationpolice->fetch(PDO::FETCH_ASSOC); - } - - public function getExisteConsommationPolice($idPolice) - { - $dj = date("Y-m-d"); - $sql = 'call sp_consommation_police(?, ?);'; - - $resultat = $this->executerRequete($sql, array($idPolice, $dj)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $consommationpolice = $ligne['consommation']; - - if($consommationpolice>"0") - { - return "C"; - } - else - { - return "0"; - } - } - - public function gettableauAjustementCP() - { - $sql = 'call sp_tableau_ajustement();'; - - $tableauajustementcps = $this->executerRequete($sql); - return $tableauajustementcps->fetchAll(PDO::FETCH_ASSOC); - } - - public function getClientsearchPol($numeroPolice) - { - $sql = 'select id as idPolice from police WHERE (codeSociete=?) AND (numeroPolice=?)'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$numeroPolice)); - - if ($resultat->rowCount() == 0) - { - return "0"; - } else - { - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['idPolice']; - } - } - - public function recapituler_maj_limite_police() - { - $user = $_SESSION['p_login']; - $sql = 'call sp_recapituller_maj_limite_police(?)'; - - $this->executerRequete($sql, array($user)); - } - - public function enregistrerlimiteadditionnelle() - { - $user = $_SESSION['p_login']; - $idPolice = $_SESSION['p_idPolice_C']; - - $sql = 'call sp_avenant_limite_additionnelle(?, ?)'; - $this->executerRequete($sql, array($idPolice, $user)); - } - - public function getContexteClientId($idPolice) { - $sql = 'SELECT A.id as idClient, A.numeroClient, concat(A.nom," ",A.prenoms) as nomClient - FROM clients A join police B on (B.idClient=A.id) WHERE (B.id=?)'; - - $resultat = $this->executerRequete($sql, array($idPolice)); - - $context = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_idClient_C'] = $context['idClient']; - $_SESSION['p_numeroClient_C'] = $context['numeroClient']; - $_SESSION['p_nomClient_C'] = $context['nomClient']; - $_SESSION['p_idClientAjax'] = $context['idClient']; - } -} \ No newline at end of file diff --git a/extranet/Modele/Prescription.php b/extranet/Modele/Prescription.php deleted file mode 100644 index b980f9a..0000000 --- a/extranet/Modele/Prescription.php +++ /dev/null @@ -1,85 +0,0 @@ -executerRequete($sql, array($numeroPrescription)); - - return $prescription->fetch(PDO::FETCH_ASSOC); - } - - public function getContexteAjaxPrescription($numeroPrescription) - { - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - } - - public function getprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison) - { - $sql = 'call sp_p_get_cons_pha(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataireLivraison)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroBonExamen_C'] = $ligne['numeroBonExamen']; - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - return $ligne; - } - - public function getdetailprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison) - { - $sql = 'call sp_r_get_detail_prescription_pha(?, ?)'; - - $optique = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataireLivraison)); - - return $optique->fetchAll(PDO::FETCH_ASSOC); - } - - public function enregistrerprescription($numeroBon, $codeMedecin, $codeGestionBon) - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $user = $_SESSION['p_login']; - $fusionConsOrd = $_SESSION['p_fusionConsOrd']; - - $sql = 'call sp_p_enregistrer_prescription(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idBeneficiaire, $numeroFeuilleMaladie, $numeroPrescription, $numeroBon, - $codeMedecin, $user, $codeGestionBon, $fusionConsOrd)); - } - - public function noprescription() - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $sql = 'call sp_p_no_prescription(?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie)); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Prescription_temp.php b/extranet/Modele/Prescription_temp.php deleted file mode 100644 index 5723db8..0000000 --- a/extranet/Modele/Prescription_temp.php +++ /dev/null @@ -1,330 +0,0 @@ -executerRequete($sql, array($numeroPrescription, $idSaisie, $user)); - - return $prescription->fetch(PDO::FETCH_ASSOC); - } - - public function getprescription_pha($numeroBonOrdonnance) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_prescription_temp_pha(?, ?, ?)'; - - $prescription = $this->executerRequete($sql, array($numeroBonOrdonnance, $idSaisie, $user)); - - $ligne = $prescription->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - - - return $ligne; - } - - public function getinfosprescription_pha($numeroBonOrdonnance) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_infos_prescription_temp_pha(?, ?, ?)'; - - $prescription = $this->executerRequete($sql, array($numeroBonOrdonnance, $idSaisie, $user)); - - $ligne = $prescription->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - return $ligne; - } - - public function initpharmacie_cso() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeActePharmacie = $_SESSION['p_codeActePharmacie_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_pharmacie_cso(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $codeActePharmacie, $idSaisie, $numeroPrescription, $user, $codeTarifMedicament, $tm)); - } - - public function initpharmacie_pha($numeroBonOrdonnance) - { - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $codeActePharmacie = $_SESSION['p_codeActePharmacie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifMedicament = $_SESSION['p_codeTarifMedicament_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_pharmacie_pha(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $codeActePharmacie, $idSaisie, $numeroBonOrdonnance, $user, $codeTarifMedicament, $tm)); - } - - public function getContexteAjaxPrescription($numeroPrescription) - { - $_SESSION['p_numeroPrescription_C'] = $numeroPrescription; - } - - public function getContexteAjaxOrdonnance($numeroBonOrdonnance) - { - $_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance; - } - - public function enregistrerprescription($numeroBon, $codeMedecin) - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_enregistrer_prescription(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($idBeneficiaire, $numeroFeuilleMaladie, $numeroPrescription, $numeroBon, $codeMedecin, $user)); - } - - public function getdetailnonlivre() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_detail_non_livre(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaillivre() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_detail_livre(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user, $codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaillivrecso() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - // $sql = 'call sp_p_get_detail_livre(?, ?, ?, ?)'; - $sql = 'call sp_p_get_detail_livre_cso(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user, $codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaillivrepha() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - // $sql = 'call sp_p_get_detail_livre(?, ?, ?, ?)'; - $sql = 'call sp_p_get_detail_livre_pha(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user, $codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function ajoutermedicament($idMedicament) - { - $sql = 'call sp_p_ajouter_medicament_temp(?)'; - - $this->executerRequete($sql, array($idMedicament)); - } - - - public function ajoutermedicamentcso($idMedicament) - { - // $sql = 'call sp_p_ajouter_medicament_temp(?)'; - $sql = 'call sp_p_ajouter_medicament_temp_cso(?)'; - - $this->executerRequete($sql, array($idMedicament)); - } - - public function ajoutermedicamenttous() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_ajouter_medicament_temp_tous(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user)); - } - - public function ajoutermedicamenttouscso() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - // $sql = 'call sp_p_ajouter_medicament_temp_tous(?, ?, ?)'; - $sql = 'call sp_p_ajouter_medicament_temp_tous_cso(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user)); - } - - public function retirermedicament($idMedicament) - { - $sql = 'call sp_p_retirer_medicament_temp(?)'; - - $this->executerRequete($sql, array($idMedicament)); - } - - public function retirermedicamentcso($idMedicament) - { - $sql = 'call sp_p_retirer_medicament_temp_cso(?)'; - - $this->executerRequete($sql, array($idMedicament)); - } - - - public function retirermedicamenttous() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_retirer_medicament_temp_tous(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user)); - } - - - public function retirermedicamenttouscso() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - // $sql = 'call sp_p_retirer_medicament_temp_tous(?, ?, ?)'; - $sql = 'call sp_p_retirer_medicament_temp_tous_cso(?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user)); - } - - public function enregistrerpharmacie() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_pharmacie_cso(?, ?, ? , ? , ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - } - - public function facturerpharmacie() - { - $numeroPrescription = $_SESSION['p_numeroPrescription_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $user_id = $_SESSION['p_user_id_C']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_pharmacie_pha(?, ?, ?, ?, ? , ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescription, $idSaisie, $user, $user_id, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - - } - - public function annulersubstitutionmedicament($idMedicament) - { - $sql = 'call sp_p_annuler_substitution_medicament_temp(?)'; - - $this->executerRequete($sql, array($idMedicament)); - } - - public function getmedicament($idMedicament) - { - $sql = 'call sp_p_get_medicament(?)'; - - $resultat = $this->executerRequete($sql, array($idMedicament)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function enregistrersubstitutionmedicament($idMedicament, $prixSubstitut) - { - $sql = 'call sp_p_enregistrer_substitution_medicament_temp(?, ?)'; - - $this->executerRequete($sql, array($idMedicament, $prixSubstitut)); - } - - public function getfactures_ordonnance($numeroBonOrdonnance) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_facture_ordonnance(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getfactures_total_ordonnance($numeroBonOrdonnance) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_total_facture_ordonnance(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } -} - diff --git a/extranet/Modele/Prestataire.php b/extranet/Modele/Prestataire.php deleted file mode 100644 index 94e0215..0000000 --- a/extranet/Modele/Prestataire.php +++ /dev/null @@ -1,152 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codePrestataire,$libelle)); - return $prestataires; - } - public function getPrestataire($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeTypePrestataire, B.libelle as typePrestataire, A.codePrestataire, A.libelle, - A.codePays, C.libelle as pays, A.codeVille, D.libelle as ville, A.codeLocalite, E.libelle as localite, - A.adresseGeo, A.adressePost, A.telephoneFixe, A.telephonePortable, A.email, A.nomResponsable, - A.contactResponsable, A.emailResponsable, A.nomInterlocuteur, A.contactInterlocuteur, A.emailInterlocuteur, - numeroCompte, A.codeGestionnaire, concat(F.nom," ",F.prenoms) as gestionnaire, A.codeNaturePrestataire - FROM prestataire A - left join typeprestataire B on (B.codeSociete=A.codeSociete AND B.codeTypePrestataire=A.codeTypePrestataire) - left join pays C on (C.codeSociete=A.codeSociete AND C.codePays=A.codePays) - left join ville D on (D.codeSociete=A.codeSociete AND D.codeVille=A.codeVille) - left join localite E on (E.codeSociete=A.codeSociete AND E.codeLocalite=A.codeLocalite) - left join gestionnaire F on (F.codeSociete=A.codeSociete AND F.codeGestionnaire=A.codeGestionnaire) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $prestataire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($prestataire->rowCount() > 0) - return $prestataire->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun prestataire ne correspond à cet id : '$id'"); - } - public function getnombrePrestataire() - { - $sql = 'select count(*) as nbPrestataire FROM prestataire A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbPrestataire']; - } - - public function ajouter($codeSociete, $codeTypePrestataire, $codePrestataire, $libelle, $codePays, $codeVille, $codeLocalite, - $adresseGeo, $adressePost, $telephoneFixe, $telephonePortable, $email, $nomResponsable, $contactResponsable, - $emailResponsable, $nomInterlocuteur, $contactInterlocuteur, $emailInterlocuteur,$numeroCompte, $codeGestionnaire, $codeNaturePrestataire) -{ - $sql = 'INSERT INTO prestataire (codeSociete, codeTypePrestataire, codePrestataire, libelle, codePays, codeVille, codeLocalite, - adresseGeo, adressePost, telephoneFixe, telephonePortable, email, nomResponsable, contactResponsable, emailResponsable, - nomInterlocuteur, contactInterlocuteur, emailInterlocuteur, numeroCompte, codeGestionnaire, codeNaturePrestataire) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; - $this->executerRequete($sql, array($codeSociete, $codeTypePrestataire, $codePrestataire, $libelle, $codePays, $codeVille, $codeLocalite, - $adresseGeo, $adressePost, $telephoneFixe, $telephonePortable, $email, $nomResponsable, $contactResponsable, - $emailResponsable, $nomInterlocuteur, $contactInterlocuteur, $emailInterlocuteur,$numeroCompte, $codeGestionnaire, $codeNaturePrestataire)); - } - - public function modifier($id, $codeTypePrestataire, $codePrestataire, $libelle, $codePays, $codeVille, $codeLocalite, - $adresseGeo, $adressePost, $telephoneFixe, $telephonePortable, $email, $nomResponsable, $contactResponsable, - $emailResponsable, $nomInterlocuteur, $contactInterlocuteur, $emailInterlocuteur,$numeroCompte, $codeGestionnaire, $codeNaturePrestataire) { - $sql = 'UPDATE prestataire SET codeTypePrestataire=?, codePrestataire=?, libelle=?, codePays=?, codeVille=?, codeLocalite=?, - adresseGeo=?, adressePost=?, telephoneFixe=?, telephonePortable=?, email=?, nomResponsable=?, contactResponsable=?, emailResponsable=?, - nomInterlocuteur=?, contactInterlocuteur=?, emailInterlocuteur=?, numeroCompte=?, codeGestionnaire=?, codeNaturePrestataire=? - where (id=?)'; - $this->executerRequete($sql, array($codeTypePrestataire, $codePrestataire, $libelle, $codePays, $codeVille, $codeLocalite, - $adresseGeo, $adressePost, $telephoneFixe, $telephonePortable, $email, $nomResponsable, $contactResponsable, - $emailResponsable, $nomInterlocuteur, $contactInterlocuteur, $emailInterlocuteur,$numeroCompte, $codeGestionnaire, $codeNaturePrestataire, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM prestataire WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codePrestataire) { - $sql = 'select id FROM prestataire WHERE (codeSociete=?) and (codePrestataire=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codePrestataire)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codePrestataire as `code`, libelle FROM prestataire WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql,array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeTypePrestataire($codeTypePrestataire) { - $sql = 'SELECT codePrestataire as `code`, libelle FROM prestataire - WHERE (codeSociete=?) and (codeTypePrestataire=?) - order by libelle'; - - $liste = $this->executerRequete($sql,array($_SESSION['p_codeSociete'], $codeTypePrestataire)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListePharmacie() { - $sql = 'SELECT codePrestataire as `code`, libelle FROM prestataire - WHERE (codeTypePrestataire in ("PHA", "CSO")) - order by libelle'; - - $liste = $this->executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeOpticien() { - $sql = 'SELECT codePrestataire as `code`, libelle FROM prestataire - WHERE (codeTypePrestataire = "OPT") - order by libelle'; - - $liste = $this->executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getunprestatairebycode($codePrestataire) - { - $sql = 'select * from prestataire where (codePrestataire=?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getusersprestataire($codePrestataire) - { - $sql = 'call sp_get_users_prestataire(?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getmedecinsprestataire($codePrestataire) - { - $sql = 'call sp_get_medecins_prestataire(?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Prestationactes.php b/extranet/Modele/Prestationactes.php deleted file mode 100644 index 87d4b2c..0000000 --- a/extranet/Modele/Prestationactes.php +++ /dev/null @@ -1,456 +0,0 @@ -executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $user, $codeActe, $codeMedecin, $quantite, $prixActe, - $valeurActe, $montantTm, $aRembourser, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire, $ententePrealable, - $autorisation, $idSaisie, $prixTarif)); - } - - public function enregistrerchambre($codeActe, $quantite, $prixActe, $valeurActe, $montantTm, $aRembourser, $debut, $fin, - $numeroChambre, $autorisation, $prixTarif, $ententePrealable) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_chambre(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $user, $codeActe, $quantite, $prixActe, - $valeurActe, $montantTm, $aRembourser, $debut, $fin, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire, $numeroChambre, - $autorisation, $idSaisie, $prixTarif, $ententePrealable)); - } - - public function getprestationsfeuille($numeroFeuilleMaladie, $codePrestataire) - { - $sql = 'call sp_p_get_prestations_feuille(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getactesmedicauxfeuille($numeroFeuilleMaladie, $codePrestataire) - { - $sql = 'call sp_p_get_actes_medicaux_feuille(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function getactesmedicauxfeuille_total($numeroFeuilleMaladie, $codePrestataire) - { - $sql = 'call sp_p_get_actes_medicaux_feuille_total(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function init_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_garantieadherent_temp(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function init_garantieadherent_temp_pha($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_garantieadherent_temp_pha(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function init_garantieadherent_temp_lab($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_garantieadherent_temp_lab(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function init_garantieadherent_temp_sea($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_garantieadherent_temp_sea(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function afficher_garantieadherent_temp() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_get_garantieadherent_temp(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function init_garantieadherent_temp_simple($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_garantieadherent_temp_simple(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - } - - - public function vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_vider_garantieadherent_temp_s(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - } - - public function init_garantieadherent_temp_opt($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_garantieadherent_temp_opt(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $tm)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_garantieadherent_temp(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getchambresfeuille($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_chambres_feuille(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function gettotalchambresfeuille($numeroFeuilleMaladie) - { - $sql = 'call sp_p_get_total_chambres_feuille(?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie) ); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function supprimeracte($idPrestationactes, $codeTypePrestation) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $sql = 'call sp_p_supprimer_acte_medical(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $idPrestationactes, $codeTypePrestation)); - } - - public function supprimeracteselect($idPrestationactes, $codeTypePrestation) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $sql = 'call sp_p_supprimer_acte_medical_select(?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $idPrestationactes, $codeTypePrestation, $idSaisie, $user)); - } - - public function supprimerchambre($idChambre) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - - $sql = 'call sp_p_supprimer_acte_medical(?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $numeroFeuilleMaladie, $idChambre, "HOSP")); - } - - public function requetesprestationactes($codePrestataire, $datePrestation1, $datePrestation2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, - $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, $codeTypePrestataire, $numeroFeuilleMaladie1, - $numeroFeuilleMaladie2, $codeTypePrestation, $ententePrealable, $numeroChambre, $facture, $adherent, $beneficiaire, $libelleActe, $libelleFamilleActe) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - $codeTypePrestation = contruireParamLike($codeTypePrestation); - - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleActe = contruireParamLike($libelleActe); - $libelleFamilleActe = contruireParamLike($libelleFamilleActe); - - $sql = 'call sp_requetes_prestationactes(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $datePrestation1, $datePrestation2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, - $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, $codeTypePrestataire, $numeroFeuilleMaladie1, - $numeroFeuilleMaladie2, $codeTypePrestation, $ententePrealable, $numeroChambre, $facture, $adherent, $beneficiaire, $libelleActe, $libelleFamilleActe)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesprestationactestotal($codePrestataire, $datePrestation1, $datePrestation2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, - $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, $codeTypePrestataire, $numeroFeuilleMaladie1, - $numeroFeuilleMaladie2, $codeTypePrestation, $ententePrealable, $numeroChambre, $facture, $adherent, $beneficiaire, $libelleActe, $libelleFamilleActe) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - $codeTypePrestation = contruireParamLike($codeTypePrestation); - - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleActe = contruireParamLike($libelleActe); - $libelleFamilleActe = contruireParamLike($libelleFamilleActe); - - $sql = 'call sp_requetes_prestationactes_total(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $datePrestation1, $datePrestation2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, - $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, $codeTypePrestataire, $numeroFeuilleMaladie1, - $numeroFeuilleMaladie2, $codeTypePrestation, $ententePrealable, $numeroChambre, $facture, $adherent, $beneficiaire, $libelleActe, $libelleFamilleActe)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function requetesprestationactesexport($codePrestataire, $datePrestation1, $datePrestation2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, - $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, $codeTypePrestataire, $numeroFeuilleMaladie1, - $numeroFeuilleMaladie2, $codeTypePrestation, $ententePrealable, $numeroChambre, $facture, $adherent, $beneficiaire, $libelleActe, $libelleFamilleActe) - { - $codePrestataire = contruireParamLike($codePrestataire); - $numeroAdherent = contruireParamLike($numeroAdherent); - $numeroBeneficiaire = contruireParamLike($numeroBeneficiaire); - $codeMedecin = contruireParamLike($codeMedecin); - $codeTypePrestataire = contruireParamLike($codeTypePrestataire); - $codeTypePrestation = contruireParamLike($codeTypePrestation); - /* - $hospitalisation = contruireParamLike($hospitalisation); - $numeroChambre = contruireParamLike($numeroChambre); - $chirurgie = contruireParamLike($chirurgie); - $facture = contruireParamLike($facture); - */ - $adherent = contruireParamLike($adherent); - $beneficiaire = contruireParamLike($beneficiaire); - $libelleActe = contruireParamLike($libelleActe); - $libelleFamilleActe = contruireParamLike($libelleFamilleActe); - - $sql = 'call sp_requetes_prestationactes_export(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $datePrestation1, $datePrestation2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, - $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroBonHospitalisation1, - $numeroBonHospitalisation2, $numeroBonOptique1, $numeroBonOptique2, $codeTypePrestataire, $numeroFeuilleMaladie1, - $numeroFeuilleMaladie2, $codeTypePrestation, $ententePrealable, $numeroChambre, $facture, $adherent, $beneficiaire, $libelleActe, $libelleFamilleActe)); - - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getconsommables() - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_afficher_consommables(?, ?)'; - - $consommables = $this->executerRequete($sql, array($idSaisie, $user)); - - return $consommables->fetchAll(PDO::FETCH_ASSOC); - } - - public function majquantite($idPrestationactes, $quantite) - { - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_maj_quantite_acte(?, ?, ?)'; - - $this->executerRequete($sql, array($idPrestationactes, $quantite, $tm)); - } - - public function calculer_nb_actes_verres() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $codeActeOptiqueCl = $_SESSION['p_codeActeOptiqueCl_C']; - - $sql = 'select fn_actes_verres_beneficiaire(?, ?, ?) as nbActesVerres;'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $codeTarifOptique, $codeActeOptiqueCl)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_nbActesVerres'] = $ligne['nbActesVerres']; - // return $ligne['prixActe']; - } - - public function get_nb_actes_verres() - { - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $codeTarifOptique = $_SESSION['p_codeTarifOptique_C']; - $codeActeOptiqueCl = $_SESSION['p_codeActeOptiqueCl_C']; - - $sql = 'select fn_actes_verres_beneficiaire(?, ?, ?) as nbActesVerres;'; - - $resultat = $this->executerRequete($sql, array($idBeneficiaire, $codeTarifOptique, $codeActeOptiqueCl)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_nbActesVerres'] = $ligne['nbActesVerres']; - return $_SESSION['p_nbActesVerres']; - } - - public function requetesprestationactesexportnew($codePrestataire, $datePrestation1, $datePrestation2) - { - $actVisible = $_SESSION['p_actVisible']; - - if($actVisible=="1") - { - $sql = 'call sp_p_requetes_prestationactes_export(?, ?, ?)'; - } - else - { - $sql = 'call sp_p_requetes_prestationactes_export_invisible(?, ?, ?)'; - } - - $resultat = $this->executerRequete($sql, array($codePrestataire, $datePrestation1, $datePrestation2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function requetesprestationactesnew($codePrestataire, $datePrestation1, $datePrestation2) - { - $sql = 'call sp_p_requetes_prestationactes(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $datePrestation1, $datePrestation2)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getLimitesBeneficiaireTemp() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_get_limitebeneficiaire_temp(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getLimitesBeneficiaireTempMonture() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_get_limitebeneficiaire_temp_monture(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getLimitesBeneficiaireTempAssureur() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_r_get_limitebeneficiaire_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getconsultationfeuille($numeroFeuilleMaladie, $codePrestataire) - { - $sql = 'call sp_p_get_cponsultation_feuille(?, ?)'; - - $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Prestationactes_temp.php b/extranet/Modele/Prestationactes_temp.php deleted file mode 100644 index f8b473c..0000000 --- a/extranet/Modele/Prestationactes_temp.php +++ /dev/null @@ -1,188 +0,0 @@ -executerRequete($sql, array($idReglement, $numeroDecompte, $idFacture, $idSaisie, $user) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function getprestationsfeuille_temp_pha($numeroDecompte, $idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idReglement = $_SESSION['p_idReglement_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_prestations_feuille_temp_pha(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idReglement, $numeroDecompte, $idFacture, $idSaisie, $user) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getprestationsfeuille_temp_total() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $idFacture = $_SESSION['p_idFacture_C']; - - $sql = 'call sp_p_get_prestations_feuille_temp_total(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idFacture, $idSaisie, $user) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function afficherprestationsfeuille_temp() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idFacture = $_SESSION['p_idFacture_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_afficher_prestations_feuille_temp(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idFacture, $idSaisie, $user) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function afficherprestationsfeuille_temp_pha() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idFacture = $_SESSION['p_idFacture_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_afficher_prestations_feuille_temp_pha(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idFacture, $idSaisie, $user)) ; - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function get_facture_decompte() - { - $idFacture = $_SESSION['p_idFacture_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_r_get_facture_decompte(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture) ); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function validerprestation($idPrestationactes, $choix) - { - $sql = 'call sp_r_valider_prestation(?, ?)'; - - $this->executerRequete($sql, array($idPrestationactes, $choix)); - } - - public function validerfacturedec($idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idReglement = $_SESSION['p_idReglement_C']; - $numeroDecompte = $_SESSION['p_numeroDecompte_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_valider_facture_temp(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idReglement, $numeroDecompte, $numeroFeuilleMaladie, $idFacture, $idSaisie, $user)); - } - - - public function validerfacturedecpha($idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idReglement = $_SESSION['p_idReglement_C']; - $numeroDecompte = $_SESSION['p_numeroDecompte_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_valider_facture_temp_pha(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idReglement, $numeroDecompte, $numeroFeuilleMaladie, $idFacture, $idSaisie, $user)); - } - - public function reinitfacturedec($idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idReglement = $_SESSION['p_idReglement_C']; - $numeroDecompte = $_SESSION['p_numeroDecompte_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_reinit_facture_temp(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idReglement, $numeroDecompte, $numeroFeuilleMaladie, $idFacture, $idSaisie, $user)); - } - - public function majmontantforce($idPrestationactes, $montantForce) - { - $sql = 'call sp_r_maj_montantforce_prestation(?, ?)'; - $this->executerRequete($sql, array($idPrestationactes, $montantForce)); - } - - // OPTIQUES - - public function getprestationsfeuille_temp_opt($numeroDecompte, $idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idReglement = $_SESSION['p_idReglement_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_prestations_feuille_temp_opt(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idReglement, $numeroDecompte, $idFacture, $idSaisie, $user) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function afficherprestationsfeuille_temp_opt() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idFacture = $_SESSION['p_idFacture_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_afficher_prestations_feuille_temp_opt(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($idFacture, $idSaisie, $user) ); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function validerfacturedecopt($idFacture) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $idReglement = $_SESSION['p_idReglement_C']; - $numeroDecompte = $_SESSION['p_numeroDecompte_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_r_valider_facture_temp_opt(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idReglement, $numeroDecompte, $numeroFeuilleMaladie, $idFacture, $idSaisie, $user)); - } -} \ No newline at end of file diff --git a/extranet/Modele/Produit.php b/extranet/Modele/Produit.php deleted file mode 100644 index 4ade7c4..0000000 --- a/extranet/Modele/Produit.php +++ /dev/null @@ -1,77 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeProduit,$libelle,$reseau)); - return $produits; - } - public function getProduit($id) { - $sql = 'select A.id, A.codeSociete, A.codeProduit, A.libelle, A.codeEtatProduit, A.dateEtat, A.codeBaseTarification, - B.libelle as baseTarification, A.primeFixe, A.primeFamille, A.primeIndividu, A.codeReseau, C.libelle as reseausoins - from produit A - left join basetarification B on (B.codeBaseTarification=A.codeBaseTarification) - left join reseausoins C on (C.codeSociete=A.codeSociete AND C.codeReseau=A.codeReseau) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $produit = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($produit->rowCount() > 0) - return $produit->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun produit ne correspond à cet id : '$id'"); - } - public function getnombreProduit() - { - $sql = 'select count(*) as nbProduit FROM produit A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbProduit']; - } - - public function ajouter($codeSociete,$codeProduit, $libelle, $codeEtatProduit, $dateEtat, $codeBaseTarification, $primeFixe, - $primeFamille, $primeIndividu, $codeReseau) { - $sql = 'INSERT INTO produit (codeSociete, codeProduit, libelle, codeEtatProduit, dateEtat, codeBaseTarification, primeFixe, - primeFamille, primeIndividu, codeReseau) - VALUES (?,?,?,?,?,?,?,?,?,?)'; - $this->executerRequete($sql, array($codeSociete, $codeProduit, $libelle, $codeEtatProduit, $dateEtat, $codeBaseTarification, $primeFixe, - $primeFamille, $primeIndividu, $codeReseau)); - } - - public function modifier($id, $codeProduit, $libelle, $codeEtatProduit, $dateEtat, $codeBaseTarification, $primeFixe, - $primeFamille, $primeIndividu, $codeReseau) { - $sql = 'UPDATE produit SET codeProduit=?, libelle=?, codeEtatProduit=?, dateEtat=?, codeBaseTarification=?, primeFixe=?, - primeFamille=?, primeIndividu=?, codeReseau=? - where (id=?)'; - $this->executerRequete($sql, array($codeProduit, $libelle, $codeEtatProduit, $dateEtat, $codeBaseTarification, $primeFixe, - $primeFamille, $primeIndividu, $codeReseau, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM produit WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeProduit) { - $sql = 'select id FROM produit WHERE (codeSociete=?) and (codeProduit=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeProduit)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeProduit as `code`, libelle FROM produit WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql,array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Profil.php b/extranet/Modele/Profil.php deleted file mode 100644 index 9c18fe1..0000000 --- a/extranet/Modele/Profil.php +++ /dev/null @@ -1,64 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeProfil,$libelle)); - return $profils; - } - public function getProfil($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeProfil, A.libelle, A.codeProfilSysteme, B.libelle as profilSysteme - FROM profil A left join profilsysteme B on (B.codeProfilSysteme=A.codeProfilSysteme) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $profil = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($profil->rowCount() > 0) - return $profil->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun profil ne correspond à cet id : '$id'"); - } - public function getNombreProfil() - { - $sql = 'select count(*) as nbProfil FROM profil A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbProfil']; - } - - public function ajouter($codeSociete, $codeProfil, $libelle, $codeProfilSysteme) { - $sql = 'INSERT INTO profil (codeSociete, codeProfil, libelle, codeProfilSysteme) VALUES (?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeProfil, $libelle, $codeProfilSysteme)); - } - - public function modifier($id, $codeProfil, $libelle, $codeProfilSysteme) { - $sql = 'UPDATE profil SET codeProfil=?, libelle=?, codeProfilSysteme=? where (id=?)'; - $this->executerRequete($sql, array($codeProfil, $libelle, $codeProfilSysteme, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM profil WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeProfil) { - $sql = 'select id FROM profil WHERE (codeSociete=?) and (codeProfil=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeProfil)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeProfil as `code`, libelle - FROM profil WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Profilsysteme.php b/extranet/Modele/Profilsysteme.php deleted file mode 100644 index 7b82f6e..0000000 --- a/extranet/Modele/Profilsysteme.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Rachattm.php b/extranet/Modele/Rachattm.php deleted file mode 100644 index 5ed2274..0000000 --- a/extranet/Modele/Rachattm.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Raisonconsultation.php b/extranet/Modele/Raisonconsultation.php deleted file mode 100644 index 2b9c6b8..0000000 --- a/extranet/Modele/Raisonconsultation.php +++ /dev/null @@ -1,40 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdelaicarencecaisonconsultation($codeRaisonConsultation) - { - $sql = 'select fn_delai_carence_raison_consultation(?) as delaiCarenceRaisonconsultation;'; - - $resultat = $this->executerRequete($sql, array($codeRaisonConsultation)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['delaiCarenceRaisonconsultation']; - } - - public function getappliquerdelaicarence($codeRaisonConsultation) - { - $sql = 'select fn_appliquer_delai_carence(?) as appliquerDelaiCarence;'; - - $resultat = $this->executerRequete($sql, array($codeRaisonConsultation)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['appliquerDelaiCarence']; - } - -} \ No newline at end of file diff --git a/extranet/Modele/Reglement.php b/extranet/Modele/Reglement.php deleted file mode 100644 index 85a41a9..0000000 --- a/extranet/Modele/Reglement.php +++ /dev/null @@ -1,163 +0,0 @@ -executerRequete($sql, array($idReglement)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroDecompte_C'] = $ligne['numeroDecompte']; - - // return $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne; - } - - public function getinfosdecompte($idReglement) - { - $sql = 'call sp_r_get_infos_decompte(?)'; - - $resultat = $this->executerRequete($sql, array($idReglement)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getdetaildecompte($numeroDecompte) - { - $sql = 'call sp_r_get_detail_decompte(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function recapdecompte($idReglement, $numeroDecompte) - { - $sql = 'call sp_r_recap_decompte(?, ?)'; - $this->executerRequete($sql, array($idReglement, $numeroDecompte)); - } - - public function getdecomptes($codePrestataire, $codeExercice, $codeMois, $codeEtatDecompte) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeEtatDecompte = contruireParamLike($codeEtatDecompte); - - // $sql = 'call sp_r_get_decomptes(?, ?, ?, ?)'; - $sql = 'call sp_r_get_decomptes(?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeExercice, $codeMois, $codeEtatDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdecomptesexercice($codePrestataire, $codeExercice, $codeEtatDecompte) - { - $codePrestataire = contruireParamLike($codePrestataire); - $codeEtatDecompte = contruireParamLike($codeEtatDecompte); - - $sql = 'call sp_p_get_decomptes_exercice(?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codePrestataire, $codeExercice, $codeEtatDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexport($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportcso($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_cso(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportcsoid($idReglement) - { - $sql = 'call sp_p_bordereau_decompte_export_cso_id(?)'; - - $resultat = $this->executerRequete($sql, array($idReglement)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportpha($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_pha(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportopt($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_opt(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getdetaildecompteexportlab($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_lab(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - - public function getdetaildecompteexportsea($numeroDecompte) - { - $sql = 'call sp_p_bordereau_decompte_export_sea(?)'; - - $resultat = $this->executerRequete($sql, array($numeroDecompte)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function validerdecompteprestataire() - { - $idReglement = $_SESSION['p_idReglement_C']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_valider_decompte_prestataire(?, ?)'; - - $this->executerRequete($sql, array($idReglement, $user)); - } - - public function getecartsdecompte($codeTypeEcart) - { - $idReglement = $_SESSION['p_idReglement_C']; - - $sql = 'call sp_r_get_ecarts_decompte(?, ?)'; - - $resultat = $this->executerRequete($sql, array($idReglement, $codeTypeEcart)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getrecapecartdecompte($idReglement) - { - $sql = 'call sp_r_get_ecarts_decompte_total(?)'; - - $resultat = $this->executerRequete($sql, array($idReglement)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Reponseautorisation.php b/extranet/Modele/Reponseautorisation.php deleted file mode 100644 index 81f3a83..0000000 --- a/extranet/Modele/Reponseautorisation.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Reponsederogation.php b/extranet/Modele/Reponsederogation.php deleted file mode 100644 index d136a52..0000000 --- a/extranet/Modele/Reponsederogation.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Reponseententeprealable.php b/extranet/Modele/Reponseententeprealable.php deleted file mode 100644 index cbef478..0000000 --- a/extranet/Modele/Reponseententeprealable.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Requetes.php b/extranet/Modele/Requetes.php deleted file mode 100644 index 8576551..0000000 --- a/extranet/Modele/Requetes.php +++ /dev/null @@ -1,17 +0,0 @@ -executerRequete($sql, array($codeProfil)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - - } -} \ No newline at end of file diff --git a/extranet/Modele/Reseausoins.php b/extranet/Modele/Reseausoins.php deleted file mode 100644 index ae5dee0..0000000 --- a/extranet/Modele/Reseausoins.php +++ /dev/null @@ -1,60 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeReseau,$libelle)); - return $reseausoins; - } - public function getReseausoin($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeReseau, A.libelle, descritpionReseau - FROM reseausoins A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $reseausoin = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($reseausoin->rowCount() > 0) - return $reseausoin->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun réseau ne correspond à cet id : '$id'"); - } - public function getNombreReseausoins() - { - $sql = 'select count(*) as nbReseausoin FROM reseausoins A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbReseausoin']; - } - - public function ajouter($codeSociete, $codeReseau, $libelle, $descritpionReseau) { - $sql = 'INSERT INTO reseausoins (codeSociete, codeReseau, libelle, descritpionReseau) VALUES (?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeReseau, $libelle, $descritpionReseau)); - } - - public function modifier($id, $codeReseau, $libelle, $descritpionReseau) { - $sql = 'UPDATE reseausoins SET codeReseau=?, libelle=?, descritpionReseau=? where (id=?)'; - $this->executerRequete($sql, array($codeReseau, $libelle, $descritpionReseau, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM reseausoins WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeReseau) { - $sql = 'select id FROM reseausoins WHERE (codeSociete=?) and (codeReseau=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeReseau)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeReseau as `code`, libelle FROM reseausoins WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql,array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Seance.php b/extranet/Modele/Seance.php deleted file mode 100644 index 420ce8b..0000000 --- a/extranet/Modele/Seance.php +++ /dev/null @@ -1,56 +0,0 @@ -executerRequete($sql, array($numeroExamen)); - - return $prescription->fetch(PDO::FETCH_ASSOC); - } - - public function getprescription_sea($idFacture) - { - $sql = 'call sp_p_get_cons_sea(?)'; - - $resultat = $this->executerRequete($sql, array($idFacture)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - $_SESSION['p_numeroBonConsultation_C'] = $ligne['numeroBonConsultation']; - $_SESSION['p_numeroBonOrdonnance_C'] = $ligne['numeroBonOrdonnance']; - $_SESSION['p_numeroBonHospitalisation_C'] = $ligne['numeroBonHospitalisation']; - $_SESSION['p_numeroBonOptique_C'] = $ligne['numeroBonOptique']; - $_SESSION['p_numeroBonExamen_C'] = $ligne['numeroBonExamen']; - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - - $_SESSION['p_numeroPrescription_C'] = $ligne['numeroPrescription']; - $_SESSION['p_numeroOptique_C'] = $ligne['numeroOptique']; - $_SESSION['p_numeroExamen_C'] = $ligne['numeroExamen']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - - $_SESSION['p_idFacture_C'] = $ligne['idFacture']; - $_SESSION['p_hospitalisation_C'] = $ligne['hospitalisation']; - if($_SESSION['p_hospitalisation_C']>0 && $_SESSION['p_appliquerTmHospit_C']>0) - { - $_SESSION['p_tm_C'] = "0"; - } - $_SESSION['p_chirurgie_C'] = $ligne['chirurgie']; - - return $ligne; - } - - public function getdetailprescription_sea($idFacture) - { - $sql = 'call sp_r_get_detail_prestation_sea(?)'; - - $optique = $this->executerRequete($sql, array($idFacture)); - - return $optique->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Seance_temp.php b/extranet/Modele/Seance_temp.php deleted file mode 100644 index b338936..0000000 --- a/extranet/Modele/Seance_temp.php +++ /dev/null @@ -1,198 +0,0 @@ -executerRequete($sql, array($numeroFeuilleMaladie, $idSaisie, $user)); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getprescription_sea($numeroBonKine) - { - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_get_prescription_temp_sea(?, ?, ?)'; - - $prescription = $this->executerRequete($sql, array($numeroBonKine, $idSaisie, $user)); - - $ligne = $prescription->fetch(PDO::FETCH_ASSOC); - $_SESSION['p_numeroBonKine_C'] = $ligne['numeroBonKine']; - $_SESSION['p_numeroPrescriptionKine_C'] = $ligne['numeroPrescriptionKine']; - $_SESSION['p_numeroFeuilleMaladie_C'] = $ligne['numeroFeuilleMaladie']; - - return $ligne; - } - - public function attributionbontemporaire($numeroBonSeance, $codeGestionBon) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_attrubuer_bon_seance_kine(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $idSaisie, $user, $numeroBonSeance, $codeGestionBon)); - } - - public function getContexteAjaxOptique($numeroExamen) - { - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - } - - public function enregistrerprescriptionseance($numeroBonKine, $codeMedecin, $codeGestionBon) - { - $codeSociete = $_SESSION['p_codeSociete']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_prescription_seance(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $idBeneficiaire, $numeroFeuilleMaladie, $numeroBonKine, $codeMedecin, - $user, $idSaisie, $codeGestionBon)); - } - - - public function modifierprescriptionseance($codeActePrescription, $quantite, $prixActe, $montantTm, $montantArembourser, - $fraisReel, $ententePrealable) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_modifier_prescription_seance(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $codeActePrescription, $quantite, $user, $idSaisie, $tm, - $prixActe, $montantTm, $montantArembourser, $fraisReel, $ententePrealable)); - } - - public function modifierseancecso($quantite, $fraisReel, $montantTm, $montantArembourser) - { - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $sql = 'call sp_p_modifier_seance_cso(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroFeuilleMaladie, $user, $idSaisie, $quantite, $fraisReel, $montantTm, $montantArembourser)); - } - - - public function modifierseancesea($codeActe, $quantite) - { - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C']; - $user = $_SESSION['p_login']; - $idSaisie = $_SESSION['p_idSaisie']; - $tm = $_SESSION['p_tm_C']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_modifier_seance_sea(?, ?, ?, ?, ?, ?, ?, ?);'; - - $this->executerRequete($sql, array($codeTarifActe, $numeroPrescriptionKine, $codeActe, $user, $idSaisie, $tm, $quantite, $codePrestataire)); - } - - public function initseance_cso() - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_seance_cso(?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroFeuilleMaladie, $user, $tm)); - } - - public function initseancekine_cso($codeGestionBon) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_seance_kine_cso(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroPrescriptionKine, $user, $codeTarifActe, $tm, $codeGestionBon)); - } - - public function initseancekine_sea($codeGestionBon) - { - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $numeroBonKine = $_SESSION['p_numeroBonKine_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $codeTarifActe = $_SESSION['p_codeTarifActe_C']; - $tm = $_SESSION['p_tm_C']; - - $sql = 'call sp_p_init_seance_kine_sea(?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codePrestataire, $idSaisie, $numeroBonKine, $user, $codeTarifActe, $tm, $codeGestionBon)); - } - - public function getContexteAjaxPrescription($numeroExamen) - { - $_SESSION['p_numeroExamen_C'] = $numeroExamen; - } - - public function getContexteAjaxOrdonnance($numeroBonExamen) - { - $_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen; - } - - public function enregistrerseance($codeGestionBon) - { - $numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_seance_cso(?, ?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescriptionKine, $idSaisie, $user, $idAdherent, $numeroAdherent, - $idBeneficiaire, $numeroBeneficiaire, $codeGestionBon)); - } - - public function facturerseance($user_id_substitut, $codeGestionBon) - { - $numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C']; - $idSaisie = $_SESSION['p_idSaisie']; - $user = $_SESSION['p_login']; - - $user_id = $_SESSION['p_user_id_C']; - - $idAdherent = $_SESSION['p_idAdherent_C']; - $numeroAdherent = $_SESSION['p_numeroAdherent_C']; - $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; - $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; - - $sql = 'call sp_p_enregistrer_seance_sea(?, ?, ?, ?, ? , ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($numeroPrescriptionKine, $idSaisie, $user, $user_id, $idAdherent, $numeroAdherent, - $idBeneficiaire, $numeroBeneficiaire, $user_id_substitut, $codeGestionBon)); - - $_SESSION['p_okId'] = "-1"; - $_SESSION['p_okId_face'] = "-1"; - } -} diff --git a/extranet/Modele/Secteuractivite.php b/extranet/Modele/Secteuractivite.php deleted file mode 100644 index 5d53961..0000000 --- a/extranet/Modele/Secteuractivite.php +++ /dev/null @@ -1,61 +0,0 @@ -executerRequete($sql, array($codeSecteur,$libelleSecteur)); - return $secteuractivites; - } - public function getSecteuractivite($id) { - $sql = 'SELECT id, codeSecteur, libelleSecteur - FROM secteuractivite A WHERE (A.id=?)'; - - $secteuractivite = $this->executerRequete($sql, array($id)); - if ($secteuractivite->rowCount() > 0) - return $secteuractivite->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun Secteur d'activité ne correspond à cet id : '$id'"); - } - public function getNombreSecteurs() - { - $sql = 'select count(*) as nbSecteurs FROM secteuractivite'; - $resultat = $this->executerRequete($sql); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbSecteurs']; - } - - public function ajouter($codeSecteur, $libelleSecteur) { - $sql = 'INSERT INTO secteuractivite (codeSecteur,libelleSecteur) VALUES ( ?, ?)'; - $this->executerRequete($sql, array($codeSecteur, $libelleSecteur)); - } - - public function modifier($id, $codeSecteur, $libelleSecteur) { - $sql = 'UPDATE secteuractivite SET codeSecteur=?, libelleSecteur=? where (id=?)'; - $this->executerRequete($sql, array($codeSecteur, $libelleSecteur, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM secteuractivite WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeSecteur) { - $sql = 'select id FROM secteuractivite WHERE (codeSecteur=?)'; - $resultat = $this->executerRequete($sql, array($codeSecteur)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeSecteur as `code`, libelleSecteur as libelle - FROM secteuractivite order by libelleSecteur'; - - $liste = $this->executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Service.php b/extranet/Modele/Service.php deleted file mode 100644 index d34151b..0000000 --- a/extranet/Modele/Service.php +++ /dev/null @@ -1,61 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeService,$libelle)); - return $Services; - } - public function getService($id) { - $sql = 'SELECT id, codeSociete, codeService, libelle - FROM service A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $Service = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($Service->rowCount() > 0) - return $Service->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune Service ne correspond à cet id : '$id'"); - } - public function getNombreService() - { - $sql = 'select count(*) as nbService FROM Service A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbService']; - } - - public function ajouter($codeSociete, $codeService, $libelle) { - $sql = 'INSERT INTO Service (codeSociete, codeService, libelle) VALUES (?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeService, $libelle)); - } - - public function modifier($id, $codeService, $libelle) { - $sql = 'UPDATE service SET codeService=?, libelle=? where (id=?)'; - $this->executerRequete($sql, array($codeService, $libelle, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM service WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeService) { - $sql = 'select id FROM service WHERE (codeSociete=?) and (codeService=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeService)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeService as `code`, libelle - FROM service WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Sexe.php b/extranet/Modele/Sexe.php deleted file mode 100644 index d0b4b4b..0000000 --- a/extranet/Modele/Sexe.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Situationfamille.php b/extranet/Modele/Situationfamille.php deleted file mode 100644 index ddebf02..0000000 --- a/extranet/Modele/Situationfamille.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Societeuser.php b/extranet/Modele/Societeuser.php deleted file mode 100644 index 2d341f1..0000000 --- a/extranet/Modele/Societeuser.php +++ /dev/null @@ -1,29 +0,0 @@ -executerRequete($sql, array($codeSociete)); - return $societe->fetch(PDO::FETCH_ASSOC); - } - - public function getinfossassureurs($codeSociete) - { - $sql = 'select A.* from contactsassureur A where (A.codeSociete=?) order by A.ordre, A.nom, A.prenoms;'; - - $resultat = $this->executerRequete($sql, array($codeSociete)); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Specialite.php b/extranet/Modele/Specialite.php deleted file mode 100644 index 4ad9309..0000000 --- a/extranet/Modele/Specialite.php +++ /dev/null @@ -1,21 +0,0 @@ -executerRequete($sql); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Titre.php b/extranet/Modele/Titre.php deleted file mode 100644 index 032f21b..0000000 --- a/extranet/Modele/Titre.php +++ /dev/null @@ -1,61 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeTitre,$libelle)); - return $titres; - } - public function getTitre($id) { - $sql = 'SELECT id, codeSociete, codeTitre, libelle, titreCourrier - FROM titre A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $titre = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($titre->rowCount() > 0) - return $titre->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune titre ne correspond à cet id : '$id'"); - } - public function getNombreTitre() - { - $sql = 'select count(*) as nbTitre FROM titre A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbTitre']; - } - - public function ajouter($codeSociete, $codeTitre, $libelle, $titreCourrier) { - $sql = 'INSERT INTO titre (codeSociete, codeTitre, libelle, titreCourrier) VALUES (?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeTitre, $libelle, $titreCourrier)); - } - - public function modifier($id, $codeTitre, $libelle, $titreCourrier) { - $sql = 'UPDATE titre SET codeTitre=?, libelle=?, titreCourrier=? where (id=?)'; - $this->executerRequete($sql, array($codeTitre, $libelle, $titreCourrier, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM titre WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeTitre) { - $sql = 'select id FROM titre WHERE (codeSociete=?) and (codeTitre=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeTitre)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeTitre as `code`, libelle FROM titre - WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Typeaffection.php b/extranet/Modele/Typeaffection.php deleted file mode 100644 index b7f1829..0000000 --- a/extranet/Modele/Typeaffection.php +++ /dev/null @@ -1,82 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeTypeAffection,$libelle)); - return $typeaffections; - } - public function getTypeaffection($id) { - $sql = 'SELECT id, codeSociete, codeTypeAffection, libelle - FROM p_typeaffection A WHERE (A.codeSociete=?) AND (A.id=?)'; - - $p_typeaffection = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($p_typeaffection->rowCount() > 0) - return $p_typeaffection->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune p_typeaffection ne correspond à cet id : '$id'"); - } - public function getNombreTypeaffection() - { - $sql = 'select count(*) as nbTypeaffection FROM p_typeaffection A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbTypeaffection']; - } - - public function ajouter($codeSociete, $codeTypeAffection, $libelle) { - $sql = 'INSERT INTO p_typeaffection (codeSociete, codeTypeAffection, libelle) VALUES (?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeTypeAffection, $libelle)); - } - - public function modifier($id, $codeTypeAffection, $libelle) { - $sql = 'UPDATE p_typeaffection SET codeTypeAffection=?, libelle=? where (id=?)'; - $this->executerRequete($sql, array($codeTypeAffection, $libelle, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM p_typeaffection WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeTypeAffection) { - $sql = 'select id FROM p_typeaffection WHERE (codeSociete=?) and (codeTypeAffection=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeTypeAffection)); - return ($resultat->rowCount() > 0); - } - - public function getListe() - { - if ($_SESSION['p_AffectionVisible']=="1") - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'SELECT codeTypeAffection as `code`, libelleEng as libelle - FROM p_typeaffection WHERE (codeSociete=?) order by libelleEng'; - } - else - { - $sql = 'SELECT codeTypeAffection as `code`, libelle - FROM p_typeaffection WHERE (codeSociete=?) order by libelle'; - } - } - else - { - $sql = 'SELECT codeTypeAffection as `code`, codeTypeAffection as libelle - FROM p_typeaffection WHERE (codeSociete=?) order by codeTypeAffection'; - } - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - -} \ No newline at end of file diff --git a/extranet/Modele/Typebon.php b/extranet/Modele/Typebon.php deleted file mode 100644 index ab6a57f..0000000 --- a/extranet/Modele/Typebon.php +++ /dev/null @@ -1,144 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getListeFusion() - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'SELECT codeTypeBon as `code`, libelleEng as libelle FROM p_typebon WHERE (codeTypeBon!="ORDO") order by ordre, libelle'; - } - else - { - $sql = 'SELECT codeTypeBon as `code`, libelle FROM p_typebon WHERE (codeTypeBon!="ORDO") order by ordre, libelle'; - } - - $liste = $this->executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - - public function getDemandeBons($codeTypeBon, $d1, $d2) - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - - $sql = 'call sp_p_get_demande_bons(?, ?, ?, ?, ?)'; - - $resultat = $this->executerRequete($sql, array($codeSociete, $codePrestataire, $codeTypeBon, $d1, $d2)); - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - public function getDenierNumeroBon($codeTypeBon) - { - $sql = 'select fn_getDenierNumeroBon(?, ?) as denierNumeroBon'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeTypeBon)); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['denierNumeroBon']; - } - - public function plageLibre($codeTypeBon, $noDepart, $noFin) { - $sql = 'select id FROM p_bonpec WHERE (codeSociete=?) and (codeTypeBon=?) and (numeroBon between ? and ?) limit 1'; - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codeTypeBon, $noDepart, $noFin)); - - return $resultat->rowCount(); - } - - - public function commanderbon($codeTypeBon, $quantite, $commentaire) - { - $codeSociete = $_SESSION['p_codeSociete']; - $codePrestataire = $_SESSION['p_codePrestataire_C']; - $dateDemande = date('Y-m-d'); - $codeUtilisateur = $_SESSION['p_login']; - - $sql = 'insert into p_demandebonpec (codeSociete, codeTypeBon, codePrestataire, quantite, dateDemande, commentaire, codeUtilisateur) - values (?, ?, ?, ?, ?, ?, ?)'; - - $this->executerRequete($sql, array($codeSociete, $codeTypeBon, $codePrestataire, $quantite, $dateDemande, $commentaire, $codeUtilisateur)); - } - - public function getInfos($codeTypeBon) - { - $sql = 'select libelle from p_typebon where (codeTypeBon=?)'; - $resultat = $this->executerRequete($sql, array($codeTypeBon)); - return $resultat->fetch(PDO::FETCH_ASSOC); - } - - public function getCodeGestionBon($codeTypeBon) - { - $sql = 'select codeGestionBon from p_typebon where (codeTypeBon=?)'; - - $resultat = $this->executerRequete($sql, array($codeTypeBon)); - - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - return $ligne['codeGestionBon']; - } - - public function getTypebonParam() - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'CALL sp_get_type_bon_param_eng(?)'; - } - else - { - $sql = 'CALL sp_get_type_bon_param(?)'; - } - - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - - return $resultat->fetchAll(PDO::FETCH_ASSOC); - } - - /* - public function getCodeGestionBon($codeTypeBon) - { - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $sql = 'SELECT codeGestionBon, libelleEng AS libelle FROM p_typebon WHERE (codeTypeBon=?)'; - } - else - { - $sql = 'SELECT codeGestionBon, libelleEng AS libelle FROM p_typebon WHERE (codeTypeBon=?)'; - } - - $resultat = $this->executerRequete($sql, array($codeTypeBon)); - - // $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - - return $resultat->fetch(PDO::FETCH_ASSOC); - } - */ -} \ No newline at end of file diff --git a/extranet/Modele/Typeclient.php b/extranet/Modele/Typeclient.php deleted file mode 100644 index b5f2908..0000000 --- a/extranet/Modele/Typeclient.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Typecontrat.php b/extranet/Modele/Typecontrat.php deleted file mode 100644 index e9971ee..0000000 --- a/extranet/Modele/Typecontrat.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Typeprestataire.php b/extranet/Modele/Typeprestataire.php deleted file mode 100644 index c8e0a34..0000000 --- a/extranet/Modele/Typeprestataire.php +++ /dev/null @@ -1,64 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeTypePrestataire,$libelle)); - return $typeprestataires; - } - public function getTypeprestataire($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeTypePrestataire, A.libelle, A.codeTypeSysteme, B.libelle as libelleTypeSysteme - FROM typeprestataire A left join typeprestatairesysteme B on (B.codeTypeSysteme=A.codeTypeSysteme) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $typeprestataire = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($typeprestataire->rowCount() > 0) - return $typeprestataire->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune typeprestataire ne correspond à cet id : '$id'"); - } - public function getNombreTypeprestataire() - { - $sql = 'select count(*) as nbTypeprestataire FROM typeprestataire A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbTypeprestataire']; - } - - public function ajouter($codeSociete, $codeTypePrestataire, $libelle, $codeTypeSysteme) { - $sql = 'INSERT INTO typeprestataire (codeSociete, codeTypePrestataire, libelle, codeTypeSysteme) VALUES (?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeTypePrestataire, $libelle, $codeTypeSysteme)); - } - - public function modifier($id, $codeTypePrestataire, $libelle, $codeTypeSysteme) { - $sql = 'UPDATE typeprestataire SET codeTypePrestataire=?, libelle=?, codeTypeSysteme=? where (id=?)'; - $this->executerRequete($sql, array($codeTypePrestataire, $libelle, $codeTypeSysteme, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM typeprestataire WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeTypePrestataire) { - $sql = 'select id FROM typeprestataire WHERE (codeSociete=?) and (codeTypePrestataire=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeTypePrestataire)); - return ($resultat->rowCount() > 0); - } - - public function getListe() { - $sql = 'SELECT codeTypePrestataire as `code`, libelle - FROM typeprestataire WHERE (codeSociete=?) order by libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Typeprestatairesysteme.php b/extranet/Modele/Typeprestatairesysteme.php deleted file mode 100644 index 012cdad..0000000 --- a/extranet/Modele/Typeprestatairesysteme.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Typeprestation.php b/extranet/Modele/Typeprestation.php deleted file mode 100644 index 4c5df21..0000000 --- a/extranet/Modele/Typeprestation.php +++ /dev/null @@ -1,14 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } - -} \ No newline at end of file diff --git a/extranet/Modele/Utilisateur.php b/extranet/Modele/Utilisateur.php deleted file mode 100644 index f2b4a12..0000000 --- a/extranet/Modele/Utilisateur.php +++ /dev/null @@ -1,95 +0,0 @@ -executerRequete($sql, array($login)); - - if ($utilisateur->rowCount() == 1) - { - $user = $utilisateur->fetch(PDO::FETCH_ASSOC); - $hash = $user['motPass']; - return (password_verify($mdp, $hash)); - } else - return false; - } - - public function getUtilisateur($login) - { - $sql = "call sp_p_get_utilisateur(?);"; - - $utilisateur = $this->executerRequete($sql, array($login)); - if ($utilisateur->rowCount() == 1) - // return $utilisateur->fetch(PDO::FETCH_ASSOC); - return $utilisateur->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucun utilisateur ne correspond aux identifiants fournis"); - } - - public function changerpass($login, $ancmdp, $nvmdp) - { - $hash = password_hash($nvmdp, PASSWORD_DEFAULT); - $sql = "UPDATE p_utilisateur set motPass=?, reInit = '0' WHERE codeUtilisateur=?"; - $this->executerRequete($sql, array($hash, $login)); - } - - public function viderTablesTemporairesUser($login) - { - $idSaisie = $_SESSION['p_idSaisie']; - $sql = "call sp_p_viderTablesTemporairesUser(?, ?)"; - $this->executerRequete($sql, array($login, $idSaisie)); - } - - public function getUtilisateurIdsaisie($idSaisie) - { - $sql = "call sp_p_get_utilisateur_idSaisie(?);"; - - $utilisateur = $this->executerRequete($sql, array($idSaisie)); - return $utilisateur->fetch(PDO::FETCH_ASSOC); - } - - public function changerlangueutilisateur() - { - $user = $_SESSION['p_login']; - $codeLangue = $_SESSION['p_lang']; - - if($codeLangue == "en_US") - { - $codeNewLang = "fr_FR"; - } - else - { - $codeNewLang = "en_US"; - } - - $sql = "call sp_p_changer_langue_utilisateur(?, ?);"; - - $this->executerRequete($sql, array($user, $codeNewLang)); - - $_SESSION['p_lang'] = $codeNewLang; - setcookie('lang', $codeLangue, time()+365*24*3600, '/'); - $_COOKIE['lang'] = $codeNewLang; - } - - public function verifiermotpassdefaut($codeSociete, $mdp) - { - $sql = "call sp_get_mot_pass_reinit(?);"; - - $resultat = $this->executerRequete($sql, array($codeSociete)); - - if ($resultat->rowCount() == 1) - { - $user = $resultat->fetch(PDO::FETCH_ASSOC); - $hash = $user['motPassReinit']; - return (password_verify($mdp, $hash)); - } - else - { - return false; - } - } - -} \ No newline at end of file diff --git a/extranet/Modele/Ville.php b/extranet/Modele/Ville.php deleted file mode 100644 index dd86f78..0000000 --- a/extranet/Modele/Ville.php +++ /dev/null @@ -1,64 +0,0 @@ -executerRequete($sql, array($_SESSION['p_codeSociete'],$codeVille,$libelle)); - return $villes; - } - public function getVille($id) { - $sql = 'SELECT A.id, A.codeSociete, A.codeVille, A.libelle, A.codePays, B.libelle AS pays - FROM ville A left join pays B on (B.codePays=A.codePays) - WHERE (A.codeSociete=?) AND (A.id=?)'; - - $ville = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $id)); - if ($ville->rowCount() > 0) - return $ville->fetch(PDO::FETCH_ASSOC); - else - throw new Exception("Aucune ville ne correspond à cet id : '$id'"); - } - public function getNombreVille() - { - $sql = 'select count(*) as nbVille FROM ville A WHERE (A.codeSociete=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'])); - $ligne = $resultat->fetch(PDO::FETCH_ASSOC); - return $ligne['nbVille']; - } - - public function ajouter($codeSociete, $codeVille, $libelle, $codePays) { - $sql = 'INSERT INTO ville (codeSociete, codeVille, libelle, codePays) VALUES (?, ?, ?, ?)'; - $this->executerRequete($sql, array($codeSociete, $codeVille, $libelle, $codePays)); - } - - public function modifier($id, $codeVille, $libelle, $codePays) { - $sql = 'UPDATE ville SET codeVille=?, libelle=?, codePays=? where (id=?)'; - $this->executerRequete($sql, array($codeVille, $libelle, $codePays, $id)); - } - - public function supprimer($id) { - $sql = 'DELETE FROM ville WHERE (id=?)'; - $this->executerRequete($sql, array($id)); - } - - public function existeligne($codeVille) { - $sql = 'select id FROM ville WHERE (codeSociete=?) and (codeVille=?)'; - $resultat = $this->executerRequete($sql, array($_SESSION['p_codeSociete'],$codeVille)); - return ($resultat->rowCount() > 0); - } - - public function getListe($codePays=null) { - $codePays = contruireParam($codePays); - $sql = 'SELECT codeVille as `code`, libelle FROM ville - WHERE (codeSociete=? AND codePays=?) order by libelle'; - - $liste = $this->executerRequete($sql, array($_SESSION['p_codeSociete'], $codePays)); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} \ No newline at end of file diff --git a/extranet/Modele/Vues.php b/extranet/Modele/Vues.php deleted file mode 100644 index 9737d1c..0000000 --- a/extranet/Modele/Vues.php +++ /dev/null @@ -1,12 +0,0 @@ -executerRequete($sql); - return $liste->fetchAll(PDO::FETCH_ASSOC); - } -} diff --git a/extranet/Vue/Actesmedicaux/index.php b/extranet/Vue/Actesmedicaux/index.php deleted file mode 100644 index a3ecf99..0000000 --- a/extranet/Vue/Actesmedicaux/index.php +++ /dev/null @@ -1,225 +0,0 @@ -titre = "INTER-SANTE - "._("Ajout acte médical") ; - $chirurgie = $_SESSION['p_chirurgie_C']; -?> - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -
-
- -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
" onClick="javascript:enregistreractemedical();" style='font-size:10pt;' >
-
- -
- -
- -
- - - - - - - -
- -
- -
\ No newline at end of file diff --git a/extranet/Vue/Afficherbons/index.php b/extranet/Vue/Afficherbons/index.php deleted file mode 100644 index 43f4d27..0000000 --- a/extranet/Vue/Afficherbons/index.php +++ /dev/null @@ -1,62 +0,0 @@ -titre = "INTER-SANTE - "._("Afficher bons") ; -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- -
- - - - - - - - - - - - - - - - - -
No Benef
-
diff --git a/extranet/Vue/Afficherged/index.php b/extranet/Vue/Afficherged/index.php deleted file mode 100644 index 8d491fd..0000000 --- a/extranet/Vue/Afficherged/index.php +++ /dev/null @@ -1,52 +0,0 @@ -titre = "INTER-SANTE - "._("Afficher GED") ; -?> - - -
-
- - - - - - - - - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
nettoyer($ged['nomOrigine']) ?>nettoyer($ged['utilisateur']) ?>nettoyer($ged['dateSysteme'])) ?>nettoyer($ged['prestataire']) ?> nettoyer($ged['codeSecret']) ?>
-
-
diff --git a/extranet/Vue/Ajaxactesmedicauxselect/index.php b/extranet/Vue/Ajaxactesmedicauxselect/index.php deleted file mode 100644 index 4ecc048..0000000 --- a/extranet/Vue/Ajaxactesmedicauxselect/index.php +++ /dev/null @@ -1,91 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($prestation['id']); - $supprimable = $prestation['supprimable']; - $codeTypePrestation=$this->nettoyer($prestation['codeTypePrestation']); - $ententePrealable=$this->nettoyer($prestation['ententePrealable']); - $autorisation=$this->nettoyer($prestation['autorisation']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleActe = $this->nettoyer($prestation['libelleActeEng']); - } - else - { - $libelleActe = $this->nettoyer($prestation['libelleActe']); - } - - $codeActe = $this->nettoyer($prestation['codeActe']); - - if($actVisible!="1") - { - $libelleActe = $codeActe; - } - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<=
Total nettoyer($prestations_total['fraisReel'])) ?>nettoyer($prestations_total['montantTm'])) ?>nettoyer($prestations_total['montantArembourser'])) ?>
nettoyer($prestation['valeurActe'])) ?> - - nettoyer($prestation['fraisReel'])) ?> nettoyer($prestation['montantTm'])) ?> nettoyer($prestation['montantArembourser'])) ?>
- -
diff --git a/extranet/Vue/Ajaxactespossibles/index.php b/extranet/Vue/Ajaxactespossibles/index.php deleted file mode 100644 index 6a87af8..0000000 --- a/extranet/Vue/Ajaxactespossibles/index.php +++ /dev/null @@ -1,5 +0,0 @@ -
- -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxactespossiblesmed/index.php b/extranet/Vue/Ajaxactespossiblesmed/index.php deleted file mode 100644 index 62cf1aa..0000000 --- a/extranet/Vue/Ajaxactespossiblesmed/index.php +++ /dev/null @@ -1,5 +0,0 @@ -
- -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxactespossiblesselection/index.php b/extranet/Vue/Ajaxactespossiblesselection/index.php deleted file mode 100644 index 09c31ad..0000000 --- a/extranet/Vue/Ajaxactespossiblesselection/index.php +++ /dev/null @@ -1,68 +0,0 @@ - - -
- - - - - - - - - - - nettoyer($acte['codeActe']); - $act_ententePrealable=$this->nettoyer($acte['ententePrealable']); - $act_exclu=$this->nettoyer($acte['exclu']); - $act_chirurgie=$this->nettoyer($acte['chirurgie']); - $act_valeurActe=$this->nettoyer($acte['valeurActe']); - $act_montantTm=$this->nettoyer($acte['montantTm']); - $act_aRembourser=$this->nettoyer($acte['montantArembourser']); - $delaiCarenceEnCours=$this->nettoyer($acte['delaiCarenceEnCours']); - - $libelleActe = $this->nettoyer($acte['libelleActe']); - - if($actVisible!="1") - { - $libelleActe = $codeActe; - } - - ?> - - - - - - - - - - - - - - - - - - - - - - - -
=>
Excl
-
- diff --git a/extranet/Vue/Ajaxaffectionspossibles/index.php b/extranet/Vue/Ajaxaffectionspossibles/index.php deleted file mode 100644 index c88c4bc..0000000 --- a/extranet/Vue/Ajaxaffectionspossibles/index.php +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/extranet/Vue/Ajaxafficherbons/index.php b/extranet/Vue/Ajaxafficherbons/index.php deleted file mode 100644 index e538919..0000000 --- a/extranet/Vue/Ajaxafficherbons/index.php +++ /dev/null @@ -1,71 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - echapper($bonpec['motifAnnulation']); - $nbligne++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
nettoyer($bonpec['codeTypeBon']) ?>nettoyer($bonpec['dateGeneration'])) ?>nettoyer($bonpec['dateReception'])) ?>nettoyer($bonpec['codeUtilisateurReception']) ?>nettoyer($bonpec['etatBon']) ?>nettoyer($bonpec['numeroBeneficiaire']) ?>nettoyer($bonpec['beneficiaire']) ?>nettoyer($bonpec['dateImpression'])) ?>nettoyer($bonpec['codeUtilisateurImpression']) ?> nettoyer($bonpec['numeroRemplacement']) ?>
- -
diff --git a/extranet/Vue/Ajaxafficherbons/vide.php b/extranet/Vue/Ajaxafficherbons/vide.php deleted file mode 100644 index 7dd94a6..0000000 --- a/extranet/Vue/Ajaxafficherbons/vide.php +++ /dev/null @@ -1,24 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - -
- -
diff --git a/extranet/Vue/Ajaxafficherconsommables/index.php b/extranet/Vue/Ajaxafficherconsommables/index.php deleted file mode 100644 index 2b9358a..0000000 --- a/extranet/Vue/Ajaxafficherconsommables/index.php +++ /dev/null @@ -1,89 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - -
- - - - " onclick="javascript:enregistrer_nv_consommables()();" />
- - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($consommable['id']); - $libelleConsommable = $this->echapper($consommable['libelleActe']); - $libelleConsommable2= $this->nettoyer($consommable['libelleActe']); - $valeurActe = $this->nettoyer($consommable['valeurActe']); - ?> - - - - - - - - - - - - - - - - - - - - - -
nettoyer($consommable['quantite'])) ?> - - nettoyer($consommable['valeurActe'])) ?> - - nettoyer($consommable['fraisReel'])) ?> nettoyer($consommable['montantTm'])) ?> nettoyer($consommable['montantArembourser'])) ?>
-
diff --git a/extranet/Vue/Ajaxalistedemandebon/index.php b/extranet/Vue/Ajaxalistedemandebon/index.php deleted file mode 100644 index effe696..0000000 --- a/extranet/Vue/Ajaxalistedemandebon/index.php +++ /dev/null @@ -1,25 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
Id Date
nettoyer($demandesbon['id']) ?>nettoyer($demandesbon['typbon']) ?>nettoyer($demandesbon['quantite']) ?>nettoyer($demandesbon['utilisateur']) ?>nettoyer($demandesbon['dateSysteme'])) ?>
-
diff --git a/extranet/Vue/Ajaxalistegenererbons/index.php b/extranet/Vue/Ajaxalistegenererbons/index.php deleted file mode 100644 index a30be68..0000000 --- a/extranet/Vue/Ajaxalistegenererbons/index.php +++ /dev/null @@ -1,33 +0,0 @@ - -
- - - - - - - - - - - - - - - nettoyer($generartionbon['id']); - $nbligne++; - ?> - - - - - - - - - - -
TypeDate
nettoyer($generartionbon['typeBon']) ?>nettoyer($generartionbon['dateSysteme'])) ?>nettoyer($generartionbon['noDepart']) ?>nettoyer($generartionbon['noFin']) ?>nettoyer($generartionbon['utilisateur']) ?>nettoyer($generartionbon['receptionnaire']) ?>
- -
diff --git a/extranet/Vue/Ajaxbondisponible/index.php b/extranet/Vue/Ajaxbondisponible/index.php deleted file mode 100644 index 8a9c7e3..0000000 --- a/extranet/Vue/Ajaxbondisponible/index.php +++ /dev/null @@ -1,5 +0,0 @@ - -
- -

-
diff --git a/extranet/Vue/Ajaxchangerdureechambre/index.php b/extranet/Vue/Ajaxchangerdureechambre/index.php deleted file mode 100644 index 71b6961..0000000 --- a/extranet/Vue/Ajaxchangerdureechambre/index.php +++ /dev/null @@ -1,56 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Total
- - - - - " onClick="javascript:enregistrerchambre();" style='font-size:10pt;' > - - " onClick="javascript:enregistrerchambre();" style='font-size:10pt;' > - - -
-
diff --git a/extranet/Vue/Ajaxchangerordonnance/index.php b/extranet/Vue/Ajaxchangerordonnance/index.php deleted file mode 100644 index 19bc494..0000000 --- a/extranet/Vue/Ajaxchangerordonnance/index.php +++ /dev/null @@ -1,244 +0,0 @@ -nettoyer($prescription['numeroBonOrdonnance']); - $numeroPrescription = $_SESSION['p_numeroPrescription_C'] ; - $actVisible = $_SESSION['p_actVisible']; -?> - -" ") : ?> -
-
- - - - - - - - - - - - - - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detailprescription['libelleMedicament']); - $codeMedicament=$this->nettoyer($detailprescription['codeMedicament']); - ?> - - - - - - - - - - - - - - - -
Totalnettoyer($prescription['fraisReel'])) ?>nettoyer($prescription['montantTm'])) ?>nettoyer($prescription['montantArembourser'])) ?>
- - - - - - nettoyer($detailprescription['unite']) ?> nettoyer($detailprescription['valeurActe'])) ?> nettoyer($detailprescription['quantite']) ?> nettoyer($detailprescription['fraisReel'])) ?> nettoyer($detailprescription['montantTm'])) ?> nettoyer($detailprescription['montantArembourser'])) ?>
-
- -
- - -
- - - - - - - - - - - - - - - - nettoyer($detailnonlivre['id']); - $libelleMedicament=$this->nettoyer($detailnonlivre['libelleMedicament']); - $codeMedicament=$this->nettoyer($detailnonlivre['codeMedicament']); - ?> - - - - - - - - - - - - - - - - - - -
nettoyer($detailnonlivre['unite']) ?> nettoyer($detailnonlivre['valeurActe'])) ?> nettoyer($detailnonlivre['quantite']) ?> nettoyer($detailnonlivre['fraisReel'])) ?> nettoyer($detailnonlivre['montantTm'])) ?> nettoyer($detailnonlivre['montantArembourser'])) ?>
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detaillivre['id']); - $substituable = $this->nettoyer($detaillivre['substituable']); - $substitue = $this->nettoyer($detaillivre['substitue']); - $libelleMedicament=$this->nettoyer($detaillivre['libelleMedicament']); - $codeMedicament=$this->nettoyer($detaillivre['codeMedicament']); - $nomSubstitut=$this->nettoyer($detaillivre['nomSubstitut']); - if($actVisible=="1") - { - $libelleMedicament=$codeMedicament; - $nomSubstitut=$codeMedicament; - } - $nbLivre++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - -
Total nettoyer($prescription['fraisReelLivre'])) ?>nettoyer($prescription['montantTmLivre'])) ?>nettoyer($prescription['montantArembourserLivre'])) ?>
nettoyer($detaillivre['unite']) ?> nettoyer($detaillivre['valeurActe'])) ?> nettoyer($detaillivre['quantite']) ?> nettoyer($detaillivre['fraisReel'])) ?> nettoyer($detaillivre['montantTm'])) ?> nettoyer($detaillivre['montantArembourser'])) ?>
- -
-
-
- -
-
- - - - - - - - - - - -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
-

-
- diff --git a/extranet/Vue/Ajaxchangerqteacte/index.php b/extranet/Vue/Ajaxchangerqteacte/index.php deleted file mode 100644 index f55d896..0000000 --- a/extranet/Vue/Ajaxchangerqteacte/index.php +++ /dev/null @@ -1,36 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
" onClick="javascript:enregistreractemedical();" style='font-size:10pt;' >
-
diff --git a/extranet/Vue/Ajaxcommanderbons/index.php b/extranet/Vue/Ajaxcommanderbons/index.php deleted file mode 100644 index f9897f6..0000000 --- a/extranet/Vue/Ajaxcommanderbons/index.php +++ /dev/null @@ -1,31 +0,0 @@ -
- - - - - - - - - - - - - - - -
- -
- -
-

-
- - - -
-
-
diff --git a/extranet/Vue/Ajaxconnexioncookie/index.php b/extranet/Vue/Ajaxconnexioncookie/index.php deleted file mode 100644 index 14e1a86..0000000 --- a/extranet/Vue/Ajaxconnexioncookie/index.php +++ /dev/null @@ -1,87 +0,0 @@ -titre = "INTER-SANTE - Connexion" ; - - if (isset($_COOKIE['codeUtilisateur'])) - { - $_SESSION['p_lang'] = $_COOKIE['lang']; - $codeUtilisateur = $_COOKIE['codeUtilisateur']; - } - else - { - $_SESSION['p_lang'] = "fr_FR"; - $codeUtilisateur = ""; - } -?> - -
- -
-
-
- -
- -
- -
- -
- -
-
-
- -
-

-
- -
-
- -
- - - - - -
-
-
- -
- -
-
- -
- - - - - - -
-
-
-
-
-
- -
- -
-
-
- -
-

- - " "): ?> -
- -
- -

-
- -
diff --git a/extranet/Vue/Ajaxconsultationbencso/index.php b/extranet/Vue/Ajaxconsultationbencso/index.php deleted file mode 100644 index 65aa21a..0000000 --- a/extranet/Vue/Ajaxconsultationbencso/index.php +++ /dev/null @@ -1,98 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
ValRejExclObs
nettoyer($feuillemaladie['dateConsultation'])) ?> - - - - nettoyer($feuillemaladie['numeroDecompte']) ?> nettoyer($feuillemaladie['medecinConsultation']) ?>nettoyer($feuillemaladie['fraisReel'])) ?>nettoyer($feuillemaladie['montantTm'])) ?>nettoyer($feuillemaladie['montantArembourser'])) ?>nettoyer($feuillemaladie['fraisExclu'])) ?>nettoyer($feuillemaladie['fraisRetenu'])) ?>nettoyer($feuillemaladie['montantForce'])) ?>nettoyer($feuillemaladie['montantApayer'])) ?>nettoyer($feuillemaladie['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationbenlab/index.php b/extranet/Vue/Ajaxconsultationbenlab/index.php deleted file mode 100644 index bf34b8e..0000000 --- a/extranet/Vue/Ajaxconsultationbenlab/index.php +++ /dev/null @@ -1,89 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
Date ValRejExclObs
nettoyer($facture['dateSysteme'])) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationbenopt/index.php b/extranet/Vue/Ajaxconsultationbenopt/index.php deleted file mode 100644 index ab3794c..0000000 --- a/extranet/Vue/Ajaxconsultationbenopt/index.php +++ /dev/null @@ -1,90 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
Date ValRejExclObs
nettoyer($facture['dateSysteme'])) ?> - - nettoyer($numeroBonOptique) ?> nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationbenpha/index.php b/extranet/Vue/Ajaxconsultationbenpha/index.php deleted file mode 100644 index 2f94273..0000000 --- a/extranet/Vue/Ajaxconsultationbenpha/index.php +++ /dev/null @@ -1,89 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
Date ValRejExclObs
nettoyer($facture['dateSysteme'])) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationbensea/index.php b/extranet/Vue/Ajaxconsultationbensea/index.php deleted file mode 100644 index 216e00e..0000000 --- a/extranet/Vue/Ajaxconsultationbensea/index.php +++ /dev/null @@ -1,93 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
Date ValRejExclObs
nettoyer($facture['dateFacture'])) ?> nettoyer($facture['numeroBonKine']) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationcso/index.php b/extranet/Vue/Ajaxconsultationcso/index.php deleted file mode 100644 index e05a9a6..0000000 --- a/extranet/Vue/Ajaxconsultationcso/index.php +++ /dev/null @@ -1,67 +0,0 @@ -
- - - nettoyer($feuillemaladie['numeroFeuilleMaladie']); - $numeroBonConsultation = $this->nettoyer($feuillemaladie['numeroBonConsultation']); - $observationsFacture = $feuillemaladie['observations']; - $regle = $feuillemaladie['regle']; - $valide = $feuillemaladie['valide']; - $facture = $feuillemaladie['facture']; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
nettoyer($feuillemaladie['dateConsultation'])) ?> nettoyer($feuillemaladie['adherent']) ?>nettoyer($feuillemaladie['beneficiaire']) ?>nettoyer($feuillemaladie['fraisReel'])) ?>nettoyer($feuillemaladie['montantTm'])) ?>nettoyer($feuillemaladie['montantArembourser'])) ?>nettoyer($feuillemaladie['fraisExclu'])) ?>nettoyer($feuillemaladie['fraisRetenu'])) ?>nettoyer($feuillemaladie['montantForce'])) ?>nettoyer($feuillemaladie['montantApayer'])) ?>nettoyer($feuillemaladie['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationcsoentete/index.php b/extranet/Vue/Ajaxconsultationcsoentete/index.php deleted file mode 100644 index 2fdd80a..0000000 --- a/extranet/Vue/Ajaxconsultationcsoentete/index.php +++ /dev/null @@ -1,70 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValRejExclObs
-
diff --git a/extranet/Vue/Ajaxconsultationlab/index.php b/extranet/Vue/Ajaxconsultationlab/index.php deleted file mode 100644 index dae7e01..0000000 --- a/extranet/Vue/Ajaxconsultationlab/index.php +++ /dev/null @@ -1,70 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
nettoyer($facture['dateFacture'])) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['numeroBeneficiaire']) ?> nettoyer($facture['beneficiaire']) ?>nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationlabentete/index.php b/extranet/Vue/Ajaxconsultationlabentete/index.php deleted file mode 100644 index 6f91b0e..0000000 --- a/extranet/Vue/Ajaxconsultationlabentete/index.php +++ /dev/null @@ -1,71 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date ValRejExclObs
-
diff --git a/extranet/Vue/Ajaxconsultationopt/index.php b/extranet/Vue/Ajaxconsultationopt/index.php deleted file mode 100644 index d3807f0..0000000 --- a/extranet/Vue/Ajaxconsultationopt/index.php +++ /dev/null @@ -1,71 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
nettoyer($facture['dateFacture'])) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['numeroBeneficiaire']) ?> nettoyer($facture['beneficiaire']) ?>nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationoptentete/index.php b/extranet/Vue/Ajaxconsultationoptentete/index.php deleted file mode 100644 index 6f91b0e..0000000 --- a/extranet/Vue/Ajaxconsultationoptentete/index.php +++ /dev/null @@ -1,71 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date ValRejExclObs
-
diff --git a/extranet/Vue/Ajaxconsultationpha/index.php b/extranet/Vue/Ajaxconsultationpha/index.php deleted file mode 100644 index f719fb5..0000000 --- a/extranet/Vue/Ajaxconsultationpha/index.php +++ /dev/null @@ -1,70 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
nettoyer($facture['dateFacture'])) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['numeroBeneficiaire']) ?> nettoyer($facture['beneficiaire']) ?>nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
diff --git a/extranet/Vue/Ajaxconsultationphaentete/index.php b/extranet/Vue/Ajaxconsultationphaentete/index.php deleted file mode 100644 index 6f91b0e..0000000 --- a/extranet/Vue/Ajaxconsultationphaentete/index.php +++ /dev/null @@ -1,71 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date ValRejExclObs
-
diff --git a/extranet/Vue/Ajaxconsultationsea/index.php b/extranet/Vue/Ajaxconsultationsea/index.php deleted file mode 100644 index 3c7cd0d..0000000 --- a/extranet/Vue/Ajaxconsultationsea/index.php +++ /dev/null @@ -1,62 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' '): ?> - - - - - - - -
nettoyer($facture['dateFacture'])) ?> - - nettoyer($facture['numeroDecompte']) ?> nettoyer($facture['numeroBeneficiaire']) ?> nettoyer($facture['beneficiaire']) ?>nettoyer($facture['fraisReel'])) ?>nettoyer($facture['montantTm'])) ?>nettoyer($facture['montantArembourser'])) ?>nettoyer($facture['fraisExclu'])) ?>nettoyer($facture['fraisRetenu'])) ?>nettoyer($facture['montantForce'])) ?>nettoyer($facture['montantApayer'])) ?>nettoyer($facture['montantPaye'])) ?> -
-
\ No newline at end of file diff --git a/extranet/Vue/Ajaxconsultationseaentete/index.php b/extranet/Vue/Ajaxconsultationseaentete/index.php deleted file mode 100644 index cc8b389..0000000 --- a/extranet/Vue/Ajaxconsultationseaentete/index.php +++ /dev/null @@ -1,71 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date ValRejExclObs
-
diff --git a/extranet/Vue/Ajaxcontextbeneficiaire/index.php b/extranet/Vue/Ajaxcontextbeneficiaire/index.php deleted file mode 100644 index e993e1a..0000000 --- a/extranet/Vue/Ajaxcontextbeneficiaire/index.php +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/extranet/Vue/Ajaxdelaicarencecaisonconsultation/index.php b/extranet/Vue/Ajaxdelaicarencecaisonconsultation/index.php deleted file mode 100644 index baa4ec4..0000000 --- a/extranet/Vue/Ajaxdelaicarencecaisonconsultation/index.php +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/extranet/Vue/Ajaxdemandedecompte/index.php b/extranet/Vue/Ajaxdemandedecompte/index.php deleted file mode 100644 index a3f0b6e..0000000 --- a/extranet/Vue/Ajaxdemandedecompte/index.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/extranet/Vue/Ajaxdepassementlimitefeuillemaladie/index.php b/extranet/Vue/Ajaxdepassementlimitefeuillemaladie/index.php deleted file mode 100644 index 4d714df..0000000 --- a/extranet/Vue/Ajaxdepassementlimitefeuillemaladie/index.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxderogation/index.php b/extranet/Vue/Ajaxderogation/index.php deleted file mode 100644 index ab79bfe..0000000 --- a/extranet/Vue/Ajaxderogation/index.php +++ /dev/null @@ -1,56 +0,0 @@ -
- - - - - - - - - - - - - - - - nettoyer($derogation['idDemandederogation']); - $codeReponseDerogation = $this->nettoyer($derogation['codeReponseDerogation']); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No Date Situation
nettoyer($derogation['numeroDerogation']) ?>nettoyer($derogation['dateSysteme'])) ?>nettoyer($derogation['libelleDerogation']) ?>nettoyer($derogation['dateReponse'])) ?>nettoyer($derogation['responsableDerogation']) ?>nettoyer($derogation['reponseDerogation']) ?>nettoyer($derogation['motifRefusAssure']) ?>nettoyer($derogation['debut'])) ?>nettoyer($derogation['fin'])) ?>nettoyer($derogation['tmDerogation']) ?>
-
- - - - - - diff --git a/extranet/Vue/Ajaxdetailexamen/index.php b/extranet/Vue/Ajaxdetailexamen/index.php deleted file mode 100644 index c5f1b1a..0000000 --- a/extranet/Vue/Ajaxdetailexamen/index.php +++ /dev/null @@ -1,157 +0,0 @@ -
- -
- - - - - - - - - - - - - - - - nettoyer($detailnonlivre['id']); - $valeurActe = $this->nettoyer($detailnonlivre['valeurActe']); - $ententePrealable = $this->nettoyer($detailnonlivre['ententePrealable']); - $codeActe = $this->nettoyer($detailnonlivre['codeActe']); - $libelleActe = $this->nettoyer($detailnonlivre['libelleActe']); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
W R nettoyer($detailnonlivre['quantite']) ?> nettoyer($detailnonlivre['valeurActe'])) ?> nettoyer($detailnonlivre['fraisReel'])) ?> nettoyer($detailnonlivre['montantTm'])) ?> nettoyer($detailnonlivre['montantArembourser'])) ?>
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detaillivre['id']); - $ententePrealable = $this->nettoyer($detaillivre['ententePrealable']); - $libelleActe = $this->nettoyer($detaillivre['libelleActe']); - - $nbLivre++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Total nettoyer($prescription['fraisReelLivre'])) ?>nettoyer($prescription['montantTmLivre'])) ?>nettoyer($prescription['montantArembourserLivre'])) ?>
- - nettoyer($detaillivre['valeurActe'])) ?> nettoyer($detaillivre['fraisReel'])) ?> nettoyer($detaillivre['montantTm'])) ?> nettoyer($detaillivre['montantArembourser'])) ?>
- - - -
- -
- -
- -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxdetailfacturesansboncso/index.php b/extranet/Vue/Ajaxdetailfacturesansboncso/index.php deleted file mode 100644 index 9844d0f..0000000 --- a/extranet/Vue/Ajaxdetailfacturesansboncso/index.php +++ /dev/null @@ -1,257 +0,0 @@ -
- - 0); - $controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0); - ?> - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Date Hospit - -
Dr
Observat - - " onClick="javascript:valider_facture_sans_bon_temp();" style='font-size:9pt;' >
-
- -
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - nettoyer($prestation['id']); - $libelleActe = $this->echapper($prestation['libelleActe']); - $valeurActe = $this->nettoyer($prestation['valeurActe']); - ?> - - - - - - - - - - - - -
dechapper($libelleActe) ?> - - nettoyer($prestation['fraisReel'])) ?> nettoyer($prestation['montantTm'])) ?> nettoyer($prestation['montantArembourser'])) ?>
-
- - - - - - - - - - - - - - - - - - - - - - - - nettoyer($garantieadherent['champApplication']); - ?> - - - - - - - - - - - - - - - - - - - -
nettoyer($garantieadherent['exercieReference'])?> nettoyer($garantieadherent['garantie'])?> nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['soldeOld'])) ?>nettoyer($garantieadherent['consommationNew'])) ?>nettoyer($garantieadherent['consommationSousGarantie'])) ?>nettoyer($garantieadherent['fraisExclu'])) ?>nettoyer($garantieadherent['fraisRetenu'])) ?>nettoyer($garantieadherent['soldeNew'])) ?>
- -
- -
- -
- -
- - - - - -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxdetaillaboratoire/index.php b/extranet/Vue/Ajaxdetaillaboratoire/index.php deleted file mode 100644 index a9ea245..0000000 --- a/extranet/Vue/Ajaxdetaillaboratoire/index.php +++ /dev/null @@ -1,280 +0,0 @@ -0); - $controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0); -?> - -
-
- - - - - - - - - - - - - - - - - - - - - nettoyer($detailnonlivre['id']); - $valeurActe = $this->nettoyer($detailnonlivre['valeurActe']); - $ententePrealable = $this->nettoyer($detailnonlivre['ententePrealable']); - $codeActe = $this->nettoyer($detailnonlivre['codeActe']); - $libelleActe = $this->nettoyer($detailnonlivre['libelleActe']); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
W R nettoyer($detailnonlivre['quantite']) ?> nettoyer($detailnonlivre['valeurActe'])) ?> nettoyer($detailnonlivre['fraisReel'])) ?> nettoyer($detailnonlivre['montantTm'])) ?> nettoyer($detailnonlivre['montantArembourser'])) ?>
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detaillivre['id']); - $ententePrealable = $this->nettoyer($detaillivre['ententePrealable']); - $libelleActe = $this->nettoyer($detaillivre['libelleActe']); - $ajLabo = $this->nettoyer($detaillivre['ajLabo']); - $typeSysteme = $this->nettoyer($detaillivre['typeSysteme']); - $nbLivre++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Total Total nettoyer($prescription['fraisReelLivre'])) ?>nettoyer($prescription['montantTmLivre'])) ?>nettoyer($prescription['montantArembourserLivre'])) ?>
nettoyer($detaillivre['libelleActe']) ?> - - nettoyer($detaillivre['libelleActe']) ?> nettoyer($detaillivre['quantite']) ?> nettoyer($detaillivre['valeurActe'])) ?> nettoyer($detaillivre['fraisReel'])) ?> nettoyer($detaillivre['montantTm'])) ?> nettoyer($detaillivre['montantArembourser'])) ?>
- -
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - nettoyer($garantieadherent['champApplication']); - ?> - - - - - - - - - - - - - - - - - - -
nettoyer($garantieadherent['garantie'])?> nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['soldeOld'])) ?>nettoyer($garantieadherent['consommationNew'])) ?>nettoyer($garantieadherent['consommationSousGarantie'])) ?>nettoyer($garantieadherent['fraisExclu'])) ?>nettoyer($garantieadherent['fraisRetenu'])) ?>nettoyer($garantieadherent['soldeNew'])) ?>
- - - - - - - - - -
- -
- -
- -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxdetailopticien/creerverre.php b/extranet/Vue/Ajaxdetailopticien/creerverre.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxdetailopticien/index.php b/extranet/Vue/Ajaxdetailopticien/index.php deleted file mode 100644 index acbf071..0000000 --- a/extranet/Vue/Ajaxdetailopticien/index.php +++ /dev/null @@ -1,215 +0,0 @@ -
- - nettoyer($prescription['nbActesMonture']); - - $controlerPlafondAdherent = ($_SESSION['p_controlerPlafondAdherent']>0); - $controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0); - ?> - -
- - - - - - - - - - - - - nettoyer($detailnonlivre['id']); - $valeurActe = $this->nettoyer($detailnonlivre['valeurActe']); - $ententePrealable2=$this->nettoyer($detailnonlivre['ententePrealable']); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ +
W R nettoyer($detailnonlivre['libelleOptique']) ?> nettoyer($detailnonlivre['fraisReel'])) ?> nettoyer($detailnonlivre['montantTm'])) ?> nettoyer($detailnonlivre['montantArembourser'])) ?>
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detaillivre['id']); - $nbLivre++; - ?> - - - - - - 0) : ?> - - - - - - - - - - - - - - - -
Total nettoyer($prescription['fraisReelLivre'])) ?>nettoyer($prescription['montantTmLivre'])) ?>nettoyer($prescription['montantArembourserLivre'])) ?>
nettoyer($detaillivre['libelleOptique']) ?> nettoyer($detaillivre['valeurActe'])) ?> nettoyer($detaillivre['monture'])) ?> - nettoyer($detaillivre['fraisReel'])) ?> nettoyer($detaillivre['montantTm'])) ?> nettoyer($detaillivre['montantArembourser'])) ?>
- -
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - nettoyer($garantieadherent['champApplication']); - ?> - - - - - - - - - - - - - - - - - - -
nettoyer($garantieadherent['garantie'])?> nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['soldeOld'])) ?>nettoyer($garantieadherent['consommationNew'])) ?>nettoyer($garantieadherent['consommationSousGarantie'])) ?>nettoyer($garantieadherent['fraisExclu'])) ?>nettoyer($garantieadherent['fraisRetenu'])) ?>nettoyer($garantieadherent['soldeNew'])) ?>
- - - - - - - - - -
-
\ No newline at end of file diff --git a/extranet/Vue/Ajaxdetailordonnance/index.php b/extranet/Vue/Ajaxdetailordonnance/index.php deleted file mode 100644 index d61df23..0000000 --- a/extranet/Vue/Ajaxdetailordonnance/index.php +++ /dev/null @@ -1,92 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - -
" onclick="javascript:pop_ged_pharmacie();" style='font-size:10pt;' >
- -
-

-
- - - - - - - - - - - - - - - nettoyer($detailprescription['livre']); - - $substituable = $this->nettoyer($detailprescription['substituable']); - $substitue = $this->nettoyer($detailprescription['substitue']); - - $nomSubstitut = $this->nettoyer($detailprescription['nomSubstitut']); - $libelleMedicament = $this->nettoyer($detailprescription['libelleMedicament']); - $ajPharmacie = $this->nettoyer($detailprescription['ajPharmacie']); - $ententePrealable1=$this->nettoyer($detailprescription['ententePrealable']); - ?> - - - - - - - - - - - - - - - - - - - - - - - "0"): ?> - - - - - - - -
" . $nomSubstitut ?> nettoyer($detailprescription['instructions']) ?> nettoyer($detailprescription['unite']) ?> nettoyer($detailprescription['numeroBonOrdonnance']) ?> nettoyer($detailprescription['numeroRemplacement']) ?>
-
diff --git a/extranet/Vue/Ajaxdetailpharmacie/index.php b/extranet/Vue/Ajaxdetailpharmacie/index.php deleted file mode 100644 index 2ffefa6..0000000 --- a/extranet/Vue/Ajaxdetailpharmacie/index.php +++ /dev/null @@ -1,130 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - nettoyer($detailnonlivre['id']); - $valeurActe = $this->nettoyer($detailnonlivre['valeurActe']); - $ententePrealable2=$this->nettoyer($detailnonlivre['ententePrealable']); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
W R nettoyer($detailnonlivre['libelleMedicament']) ?> nettoyer($detailnonlivre['unite']) ?> nettoyer($detailnonlivre['valeurActe'])) ?> nettoyer($detailnonlivre['quantite']) ?> nettoyer($detailnonlivre['fraisReel'])) ?> nettoyer($detailnonlivre['montantTm'])) ?> nettoyer($detailnonlivre['montantArembourser'])) ?> nettoyer($detailnonlivre['numeroBonOrdonnance']) ?>
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detaillivre['id']); - $ententePrealable3=$this->nettoyer($detaillivre['ententePrealable']); - $nbLivre++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - -
Total nettoyer($prescription['fraisReelLivre'])) ?>nettoyer($prescription['montantTmLivre'])) ?>nettoyer($prescription['montantArembourserLivre'])) ?>
nettoyer($detaillivre['libelleMedicament']) ?> nettoyer($detaillivre['unite']) ?> nettoyer($detaillivre['valeurActe'])) ?> nettoyer($detaillivre['quantite']) ?> nettoyer($detaillivre['fraisReel'])) ?> nettoyer($detaillivre['montantTm'])) ?> nettoyer($detaillivre['montantArembourser'])) ?> nettoyer($detaillivre['numeroBonOrdonnance']) ?>
- - - -
- -
- -
- -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxdetailpharmacien/index.php b/extranet/Vue/Ajaxdetailpharmacien/index.php deleted file mode 100644 index c3f62c5..0000000 --- a/extranet/Vue/Ajaxdetailpharmacien/index.php +++ /dev/null @@ -1,279 +0,0 @@ -
- nettoyer($prescription['idPrestationactes']); - $estRempalace=($prescription['numeroRemplace'] == $numeroBonOrdonnance); - - $controlerPlafondAdherent = ($_SESSION['p_controlerPlafondAdherent']>0); - $controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0); - ?> - -
- - - - - - - - - - - - - - - - - nettoyer($detailnonlivre['id']); - $valeurActe = $this->nettoyer($detailnonlivre['valeurActe']); - - $substituable = $this->nettoyer($detailnonlivre['substituable']); - $substitue = $this->nettoyer($detailnonlivre['substitue']); - - $nomSubstitut = $this->nettoyer($detailnonlivre['nomSubstitut']); - $libelleMedicament = $this->nettoyer($detailnonlivre['libelleMedicament']); - - if($substituable=="1") - { - $libelleMedicament = $libelleMedicament . " => " . $nomSubstitut; - } - $ententePrealable2=$this->nettoyer($detailnonlivre['ententePrealable']); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
W R nettoyer($detailnonlivre['unite']) ?> nettoyer($detailnonlivre['valeurActe'])) ?> nettoyer($detailnonlivre['quantite']) ?> nettoyer($detailnonlivre['fraisReel'])) ?> nettoyer($detailnonlivre['montantTm'])) ?> nettoyer($detailnonlivre['montantArembourser'])) ?>
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detaillivre['id']); - $substituable = $this->nettoyer($detaillivre['substituable']); - $substitue = $this->nettoyer($detaillivre['substitue']); - $ajPharmacie = $this->nettoyer($detaillivre['ajPharmacie']); - $typeSysteme = $this->nettoyer($detaillivre['typeSysteme']); - $ententePrealable3=$this->nettoyer($detaillivre['ententePrealable']); - $pharmacieInterne = $this->nettoyer($detaillivre['pharmacieInterne']); - $nbLivre++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Total nettoyer($prescription['fraisReelLivre'])) ?>nettoyer($prescription['montantTmLivre'])) ?>nettoyer($prescription['montantArembourserLivre'])) ?>
nettoyer($detaillivre['libelleMedicament']) ?> nettoyer($detaillivre['unite']) ?> - - nettoyer($detaillivre['valeurActe'])) ?> - - nettoyer($detaillivre['quantite']) ?> nettoyer($detaillivre['fraisReel'])) ?> nettoyer($detaillivre['montantTm'])) ?> nettoyer($detaillivre['montantArembourser'])) ?>
- -
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($garantieadherent['champApplication']); - ?> - - - - - - - - - - - - - - - - - - - -
nettoyer($garantieadherent['garantie'])?> nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['soldeOld'])) ?>nettoyer($garantieadherent['consommationNew'])) ?>nettoyer($garantieadherent['consommationSousGarantie'])) ?>nettoyer($garantieadherent['fraisExclu'])) ?>nettoyer($garantieadherent['fraisRetenu'])) ?>nettoyer($garantieadherent['soldeNew'])) ?>
- - - - - - - - - -
- -
- -
- -
diff --git a/extranet/Vue/Ajaxdetailprescription/consulterremplacement.php b/extranet/Vue/Ajaxdetailprescription/consulterremplacement.php deleted file mode 100644 index 9e8150d..0000000 --- a/extranet/Vue/Ajaxdetailprescription/consulterremplacement.php +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - nettoyer($medicaments_remplace['codeMedicamentAnc']); - $medicamentAnc = $this->nettoyer($medicaments_remplace['medicamentAnc']); - - $codeMedicamentNouv = $this->nettoyer($medicaments_remplace['codeMedicamentNouv']); - $medicamentnouv = $this->nettoyer($medicaments_remplace['medicamentnouv']); - - if($actVisible!="1") - { - $medicamentAnc = $codeMedicamentAnc; - $medicamentnouv = $codeMedicamentNouv; - } - ?> - - - - - - - - - -
nettoyer($medicaments_remplace['dateSysteme'])) ?> nettoyer($medicaments_remplace['medicamentAnc']) ?> nettoyer($medicaments_remplace['quantiteAnc']) ?> nettoyer($medicaments_remplace['medicamentnouv']) ?> nettoyer($medicaments_remplace['codeUtilisateur']) ?>
diff --git a/extranet/Vue/Ajaxdetailprescription/index.php b/extranet/Vue/Ajaxdetailprescription/index.php deleted file mode 100644 index 6d0f55d..0000000 --- a/extranet/Vue/Ajaxdetailprescription/index.php +++ /dev/null @@ -1,180 +0,0 @@ -
- "0") : - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($detailprescription['id']); - $livre =$this->nettoyer($detailprescription['livre']); - $substituable = $this->nettoyer($detailprescription['substituable']); - $substitue = $this->nettoyer($detailprescription['substitue']); - $nomSubstitut = $this->nettoyer($detailprescription['nomSubstitut']); - $codeMedicament = $this->nettoyer($detailprescription['codeMedicament']); - $libelleMedicament = $this->nettoyer($detailprescription['libelleMedicament']); - $ajPharmacie = $this->nettoyer($detailprescription['ajPharmacie']); - $ententePrealable =$this->nettoyer($detailprescription['ententePrealable']); - $medicamentRemplace = $this->nettoyer($detailprescription['medicamentRemplace']); - - if($actVisible!="1") - { - $libelleMedicament = $codeMedicament; - } - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "1") : ?> - - - - - - - - - - "0"): ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
Totalnettoyer($prescription['fraisReel'])) ?>nettoyer($prescription['montantTm'])) ?>nettoyer($prescription['montantArembourser'])) ?>
nettoyer($detailprescription['unite']) ?> nettoyer($detailprescription['valeurActe'])) ?> - "1") : ?> - - - - - nettoyer($detailprescription['fraisReel'])) ?> nettoyer($detailprescription['montantTm'])) ?> nettoyer($detailprescription['montantArembourser'])) ?> nettoyer($detailprescription['numeroBonOrdonnance']) ?> nettoyer($detailprescription['numeroRemplacement']) ?>
- - - - -
diff --git a/extranet/Vue/Ajaxdetailprescriptionexamen/index.php b/extranet/Vue/Ajaxdetailprescriptionexamen/index.php deleted file mode 100644 index ce7f083..0000000 --- a/extranet/Vue/Ajaxdetailprescriptionexamen/index.php +++ /dev/null @@ -1,80 +0,0 @@ -
- "0") : - ?> - - - - - - - - - - - - - - nettoyer($detailexamen['id']); - $livre=$this->nettoyer($detailexamen['livre']); - $nbExamens++; - ?> - - - - - - - -
nettoyer($detailexamen['libelleActe']) ?> - - - -
- - - - - - -
diff --git a/extranet/Vue/Ajaxdetailseance/enregistrerseance.php b/extranet/Vue/Ajaxdetailseance/enregistrerseance.php deleted file mode 100644 index 69e405b..0000000 --- a/extranet/Vue/Ajaxdetailseance/enregistrerseance.php +++ /dev/null @@ -1 +0,0 @@ -OK enregistrerseance \ No newline at end of file diff --git a/extranet/Vue/Ajaxdetailseance/index.php b/extranet/Vue/Ajaxdetailseance/index.php deleted file mode 100644 index e06079f..0000000 --- a/extranet/Vue/Ajaxdetailseance/index.php +++ /dev/null @@ -1 +0,0 @@ -Ajaxdetailseance \ No newline at end of file diff --git a/extranet/Vue/Ajaxdiagnosticsbeneficiaire/index.php b/extranet/Vue/Ajaxdiagnosticsbeneficiaire/index.php deleted file mode 100644 index 41d74a8..0000000 --- a/extranet/Vue/Ajaxdiagnosticsbeneficiaire/index.php +++ /dev/null @@ -1,58 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - nettoyer($diagnostic['id']); - $supprime = $this->nettoyer($diagnostic['supprime']); - - $codeAffection = $this->nettoyer($diagnostic['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection; - } - else - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection; - } - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - ?> - - - - - - - - - - - - - - -
Date Diagnostic User
User Date
nettoyer($diagnostic['dateSysteme'])) ?> nettoyer($diagnostic['codeUtilisateur']) ?> nettoyer($diagnostic['userSuppression']) ?> nettoyer($diagnostic['heueSuppression'])) ?>
-
diff --git a/extranet/Vue/Ajaxdiagnosticscons/index.php b/extranet/Vue/Ajaxdiagnosticscons/index.php deleted file mode 100644 index 41d74a8..0000000 --- a/extranet/Vue/Ajaxdiagnosticscons/index.php +++ /dev/null @@ -1,58 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - nettoyer($diagnostic['id']); - $supprime = $this->nettoyer($diagnostic['supprime']); - - $codeAffection = $this->nettoyer($diagnostic['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection; - } - else - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection; - } - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - ?> - - - - - - - - - - - - - - -
Date Diagnostic User
User Date
nettoyer($diagnostic['dateSysteme'])) ?> nettoyer($diagnostic['codeUtilisateur']) ?> nettoyer($diagnostic['userSuppression']) ?> nettoyer($diagnostic['heueSuppression'])) ?>
-
diff --git a/extranet/Vue/Ajaxdossiers/index.php b/extranet/Vue/Ajaxdossiers/index.php deleted file mode 100644 index 895b37f..0000000 --- a/extranet/Vue/Ajaxdossiers/index.php +++ /dev/null @@ -1,47 +0,0 @@ -
- - - - - - - - - - - - - - - - nettoyer($feuillemaladie['numeroFeuilleMaladie']); - $numeroBonConsultation = $this->nettoyer($feuillemaladie['numeroBonConsultation']); - $facture = $feuillemaladie['facture']; - ?> - - - - - - - - - - - - - - - - - - -
Date
- - - - nettoyer($feuillemaladie['dateSysteme'])) ?>nettoyer($feuillemaladie['numeroBonConsultation']) ?>nettoyer($feuillemaladie['medecinConsultation']) ?>nettoyer($feuillemaladie['fraisReel'])) ?>nettoyer($feuillemaladie['montantTm'])) ?>nettoyer($feuillemaladie['montantArembourser'])) ?>nettoyer($feuillemaladie['montantRembourse'])) ?>
-
diff --git a/extranet/Vue/Ajaxecartdecomptecons/ecartfacture.php b/extranet/Vue/Ajaxecartdecomptecons/ecartfacture.php deleted file mode 100644 index 6151aab..0000000 --- a/extranet/Vue/Ajaxecartdecomptecons/ecartfacture.php +++ /dev/null @@ -1,58 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - nettoyer($facture['idFacture']); - $idEcart = $this->nettoyer($facture['id']); - $observations = $facture['observations']; - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleEcart = $this->nettoyer($facture['libelleEcartEng']); - } - else - { - $libelleEcart = $this->nettoyer($facture['libelleEcart']); - } - ?> - - - - - - - - - - ' '): ?> - - - - - -
Date Sens Obs
nettoyer($facture['dateFacture'])) ?> nettoyer($facture['numeroBeneficiaire']) ?> nettoyer($facture['beneficiaire']) ?> nettoyer($facture['montantPrestataire'])) ?> nettoyer($facture['montantAssureur'])) ?> nettoyer($facture['montantEcart'])) ?> " - onClick="javascript:alert('');"> - - -
-
diff --git a/extranet/Vue/Ajaxecartdecomptecons/ecartnonsaisi.php b/extranet/Vue/Ajaxecartdecomptecons/ecartnonsaisi.php deleted file mode 100644 index 1c426fa..0000000 --- a/extranet/Vue/Ajaxecartdecomptecons/ecartnonsaisi.php +++ /dev/null @@ -1,45 +0,0 @@ - - -
-
- -
- - - - - - - - - - - - - - nettoyer($facture['id']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleEcart = $this->nettoyer($facture['libelleEcartEng']); - } - else - { - $libelleEcart = $this->nettoyer($facture['libelleEcart']); - } - ?> - - - - - - - - - - -
Date Sens Observations
nettoyer($facture['dateFacture'])) ?> nettoyer($facture['numeroBeneficiaire']) ?> nettoyer($facture['beneficiaire']) ?> nettoyer($facture['montantPrestataire'])) ?> nettoyer($facture['observations']) ?>
-
diff --git a/extranet/Vue/Ajaxecartdecomptecons/index.php b/extranet/Vue/Ajaxecartdecomptecons/index.php deleted file mode 100644 index 1f112c7..0000000 --- a/extranet/Vue/Ajaxecartdecomptecons/index.php +++ /dev/null @@ -1,67 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nettoyer($reglement['ndFacture'])) ?> nettoyer($reglement['montantPrestataire'])) ?> nettoyer($reglement['montantApayer'])) ?> nettoyer($reglement['montantRedresse'])) ?>
nettoyer($recapecartdecompte['nbTotal'])) ?> nettoyer($recapecartdecompte['montantPrestataireTotal'])) ?> nettoyer($recapecartdecompte['montantAssureurTotal'])) ?> nettoyer($recapecartdecompte['montantEcartTotal'])) ?>
nettoyer($recapecartdecompte['nbTotalFacture'])) ?> nettoyer($recapecartdecompte['montantPrestataireTotalFacture'])) ?> nettoyer($recapecartdecompte['montantAssureurTotalFacture'])) ?> nettoyer($recapecartdecompte['montantEcartTotalFacture'])) ?>
nettoyer($recapecartdecompte['nbTotalNonsaisi'])) ?> nettoyer($recapecartdecompte['montantPrestataireTotalNonsaisi'])) ?> nettoyer($recapecartdecompte['montantAssureurTotalNonsaisi'])) ?> nettoyer($recapecartdecompte['montantEcartTotalNonsaisi'])) ?>
nettoyer($recapecartdecompte['nbTotalEnFavPrest'])) ?> nettoyer($recapecartdecompte['montantEcartTotalEnFavPrest'])) ?>
nettoyer($recapecartdecompte['nbTotalEnFavAss'])) ?> nettoyer($recapecartdecompte['montantEcartTotalEnFavAss'])) ?>
nettoyer($reglement['resteEcartAjustifer'])) ?>
-
diff --git a/extranet/Vue/Ajaxenregistreractemedical/index.php b/extranet/Vue/Ajaxenregistreractemedical/index.php deleted file mode 100644 index d20b5a0..0000000 --- a/extranet/Vue/Ajaxenregistreractemedical/index.php +++ /dev/null @@ -1,2 +0,0 @@ -
-
\ No newline at end of file diff --git a/extranet/Vue/Ajaxenregistrerchambre/index.php b/extranet/Vue/Ajaxenregistrerchambre/index.php deleted file mode 100644 index d20b5a0..0000000 --- a/extranet/Vue/Ajaxenregistrerchambre/index.php +++ /dev/null @@ -1,2 +0,0 @@ -
-
\ No newline at end of file diff --git a/extranet/Vue/Ajaxenregistrerconsultation/index.php b/extranet/Vue/Ajaxenregistrerconsultation/index.php deleted file mode 100644 index c6efe04..0000000 --- a/extranet/Vue/Ajaxenregistrerconsultation/index.php +++ /dev/null @@ -1,2 +0,0 @@ -
-
diff --git a/extranet/Vue/Ajaxenregistrerhospitalisation/index.php b/extranet/Vue/Ajaxenregistrerhospitalisation/index.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxenregistreroptique/index.php b/extranet/Vue/Ajaxenregistreroptique/index.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxenregistrerprescription/index.php b/extranet/Vue/Ajaxenregistrerprescription/index.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxenregistrerprescriptionexamen/index.php b/extranet/Vue/Ajaxenregistrerprescriptionexamen/index.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxenregistrerprescriptionseance/index.php b/extranet/Vue/Ajaxenregistrerprescriptionseance/index.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxenregistrerverre/index.php b/extranet/Vue/Ajaxenregistrerverre/index.php deleted file mode 100644 index c6efe04..0000000 --- a/extranet/Vue/Ajaxenregistrerverre/index.php +++ /dev/null @@ -1,2 +0,0 @@ -
-
diff --git a/extranet/Vue/Ajaxenvoimaildivers/index.php b/extranet/Vue/Ajaxenvoimaildivers/index.php deleted file mode 100644 index 3273a3a..0000000 --- a/extranet/Vue/Ajaxenvoimaildivers/index.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/extranet/Vue/Ajaxenvoimaildivers/verifiertentativeidentitification.php b/extranet/Vue/Ajaxenvoimaildivers/verifiertentativeidentitification.php deleted file mode 100644 index 3273a3a..0000000 --- a/extranet/Vue/Ajaxenvoimaildivers/verifiertentativeidentitification.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/extranet/Vue/Ajaxexamenspossiblesselection/index.php b/extranet/Vue/Ajaxexamenspossiblesselection/index.php deleted file mode 100644 index b3db963..0000000 --- a/extranet/Vue/Ajaxexamenspossiblesselection/index.php +++ /dev/null @@ -1,43 +0,0 @@ -
- - - - - - - - - - - nettoyer($acte['codeActe']); - $act_ententePrealable=$this->nettoyer($acte['ententePrealable']); - $act_exclu=$this->nettoyer($acte['exclu']); - $act_valeurActe=$this->nettoyer($acte['valeurActe']); - $act_montantTm=$this->nettoyer($acte['montantTm']); - $act_aRembourser=$this->nettoyer($acte['montantArembourser']); - ?> - - - - - - - - - - - - - - - - - - - - - -
=>
nettoyer($acte['libelleActe']) ?> Excl
-
- diff --git a/extranet/Vue/Ajaxfacturatioseancecso/index.php b/extranet/Vue/Ajaxfacturatioseancecso/index.php deleted file mode 100644 index 636bbfb..0000000 --- a/extranet/Vue/Ajaxfacturatioseancecso/index.php +++ /dev/null @@ -1,62 +0,0 @@ -
- nettoyer($prescription['numeroBonSeance']); - $_SESSION['p_numeroBonSeance_C'] = $numeroBonSeance; - $codeGestionBon = $this->nettoyer($prescription['codeGestionBon']); - ?> - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- " onClick="javascript:valider_seance_cso();" style='font-size:10pt;' > -
-
diff --git a/extranet/Vue/Ajaxfacturatioseancesea/facturerseance.php b/extranet/Vue/Ajaxfacturatioseancesea/facturerseance.php deleted file mode 100644 index e69de29..0000000 diff --git a/extranet/Vue/Ajaxfacturatioseancesea/index.php b/extranet/Vue/Ajaxfacturatioseancesea/index.php deleted file mode 100644 index 0fda2fd..0000000 --- a/extranet/Vue/Ajaxfacturatioseancesea/index.php +++ /dev/null @@ -1,185 +0,0 @@ -
- nettoyer($prescription['facture']); - $nbRestantOld = $this->nettoyer($prescription['nbRestantOld']); - $codeActeSeance = $this->nettoyer($prescription['codeActeSeance']); - $numeroBonSeance = $this->nettoyer($prescription['numeroBonSeance']); - $_SESSION['p_numeroBonSeance_C'] = $numeroBonSeance; - - $codeGestionBon = $this->nettoyer($prescription['codeGestionBon']); - - if( isset($_SESSION['p_actesHarmonises']) && ($_SESSION['p_actesHarmonises']=="1") ) - { - $actesHarmonises = true; - } - else - { - $actesHarmonises = false; - } - - $controlerPlafondAdherent = ($_SESSION['p_controlerPlafondAdherent']>0); - $controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0); - ?> - -
- -
- - - - - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nettoyer($garantieadherent['garantie'])?> nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['soldeOld'])) ?>nettoyer($garantieadherent['consommationNew'])) ?>nettoyer($garantieadherent['consommationSousGarantie'])) ?>nettoyer($garantieadherent['fraisExclu'])) ?>nettoyer($garantieadherent['fraisRetenu'])) ?>nettoyer($garantieadherent['soldeNew'])) ?>
- -
- -
diff --git a/extranet/Vue/Ajaxfactureconspop/feuillemaladie.php b/extranet/Vue/Ajaxfactureconspop/feuillemaladie.php deleted file mode 100644 index 46558fb..0000000 --- a/extranet/Vue/Ajaxfactureconspop/feuillemaladie.php +++ /dev/null @@ -1,135 +0,0 @@ -
- nettoyer($feuillemaladie['codeTypeAffection']); - - $codeAffection = $this->nettoyer($feuillemaladie['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($feuillemaladie['libelleAffectionEng']); - $raisonconsultation = $this->nettoyer($feuillemaladie['raisonconsultationEng']); - } - else - { - $libelleAffection = $this->nettoyer($feuillemaladie['libelleAffection']); - $raisonconsultation = $this->nettoyer($feuillemaladie['raisonconsultation']); - } - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - ?> - - " disabled > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - nettoyer($diagnostic['id']); - $supprime = $this->nettoyer($diagnostic['supprime']); - - $codeAffection = $this->nettoyer($diagnostic['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection; - } - else - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection; - } - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - ?> - - - - - - - - - - - - - - -
Date Diagnostic User
User Date
nettoyer($diagnostic['dateSysteme'])) ?> nettoyer($diagnostic['codeUtilisateur']) ?> nettoyer($diagnostic['userSuppression']) ?> nettoyer($diagnostic['heueSuppression'])) ?>
- -
diff --git a/extranet/Vue/Ajaxfactureconspop/geds.php b/extranet/Vue/Ajaxfactureconspop/geds.php deleted file mode 100644 index 9378910..0000000 --- a/extranet/Vue/Ajaxfactureconspop/geds.php +++ /dev/null @@ -1,29 +0,0 @@ -
- -
- - - - - - - - - - nettoyer($ged['idGed']); - $cheminFichier = $this->nettoyer($ged['cheminFichier']); - ?> - - - - - - - -
Date
nettoyer($ged['dateSysteme'])) ?>nettoyer($ged['nomOrigine']) ?> - -
-
- -
diff --git a/extranet/Vue/Ajaxfactureconspop/index.php b/extranet/Vue/Ajaxfactureconspop/index.php deleted file mode 100644 index 255bb78..0000000 --- a/extranet/Vue/Ajaxfactureconspop/index.php +++ /dev/null @@ -1,131 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
E-mail / Tel
Date User
- - - - - - - - - - - - -
- -
diff --git a/extranet/Vue/Ajaxfactureconspop/medicaments.php b/extranet/Vue/Ajaxfactureconspop/medicaments.php deleted file mode 100644 index db870a4..0000000 --- a/extranet/Vue/Ajaxfactureconspop/medicaments.php +++ /dev/null @@ -1,56 +0,0 @@ -
- - - - " disabled > - - - - - - - - - - - - - - - - nettoyer($medicament['ententePrealable']); - - $libelleMedicament = $this->nettoyer($medicament['libelleMedicament']); - $codeMedicament = $this->nettoyer($medicament['codeMedicament']); - - if($actVisible!="1") - { - $libelleMedicament = $codeMedicament; - } - ?> - - - - - - - - - - - - - - - - - - - - - -
Date
nettoyer($medicament['dateSysteme'])) ?> nettoyer($medicament['valeurActe'])) ?> nettoyer($medicament['quantite']) ?> nettoyer($medicament['fraisReel'])) ?> nettoyer($medicament['montantTm'])) ?> nettoyer($medicament['montantArembourser'])) ?>
-
diff --git a/extranet/Vue/Ajaxfactureconspop/prestationactes.php b/extranet/Vue/Ajaxfactureconspop/prestationactes.php deleted file mode 100644 index 62cd3c6..0000000 --- a/extranet/Vue/Ajaxfactureconspop/prestationactes.php +++ /dev/null @@ -1,66 +0,0 @@ -
- - - " disabled > - - - - - - - - - - - - - - - - - nettoyer($prestation['codeTypePrestation']); - $ententePrealable = $this->nettoyer($prestation['ententePrealable']); - $autorisation = $this->nettoyer($prestation['autorisation']); - - $codeActe = $this->nettoyer($prestation['codeActe']); - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleActe = $this->nettoyer($prestation['libelleActeEng']); - } - else - { - $libelleActe = $this->nettoyer($prestation['libelleActe']); - } - - if($actVisible!="1") - { - $libelleActe = $codeActe; - } - ?> - - - - - - - - - - - - - - - - - - - - - - -
Date
nettoyer($prestation['dateSysteme'])) ?> nettoyer($prestation['valeurActe'])) ?> nettoyer($prestation['quantite']) ?> nettoyer($prestation['fraisReel'])) ?> nettoyer($prestation['montantTm'])) ?> nettoyer($prestation['montantArembourser'])) ?>
-
diff --git a/extranet/Vue/Ajaxfactureconspop/verres.php b/extranet/Vue/Ajaxfactureconspop/verres.php deleted file mode 100644 index 8215fe0..0000000 --- a/extranet/Vue/Ajaxfactureconspop/verres.php +++ /dev/null @@ -1,35 +0,0 @@ -
- - - " disabled > - - - - - - - - - - - - nettoyer($verre['libelleVerre']); - $codeOptique = $this->nettoyer($verre['codeOptique']); - - if($actVisible!="1") - { - $libelleVerre = $codeOptique; - } - ?> - - - - - - - -
Date
nettoyer($verre['dateSysteme'])) ?> nettoyer($verre['valeurActe'])) ?>
-
diff --git a/extranet/Vue/Ajaxfactureconsprestataire/feuillemaladie.php b/extranet/Vue/Ajaxfactureconsprestataire/feuillemaladie.php deleted file mode 100644 index be1570c..0000000 --- a/extranet/Vue/Ajaxfactureconsprestataire/feuillemaladie.php +++ /dev/null @@ -1,136 +0,0 @@ -
- nettoyer($feuillemaladie['codeTypeAffection']); - - $codeAffection = $this->nettoyer($feuillemaladie['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($feuillemaladie['libelleAffectionEng']); - $raisonconsultation = $this->nettoyer($feuillemaladie['raisonconsultationEng']); - } - else - { - $libelleAffection = $this->nettoyer($feuillemaladie['libelleAffection']); - $raisonconsultation = $this->nettoyer($feuillemaladie['raisonconsultation']); - } - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - ?> - - " disabled > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - nettoyer($diagnostic['id']); - $supprime = $this->nettoyer($diagnostic['supprime']); - - $codeAffection = $this->nettoyer($diagnostic['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection; - } - else - { - $libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection; - } - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - ?> - - - - - - - - - - - - - - -
Date Diagnostic User
User Date
nettoyer($diagnostic['dateSysteme'])) ?> nettoyer($diagnostic['codeUtilisateur']) ?> nettoyer($diagnostic['userSuppression']) ?> nettoyer($diagnostic['heueSuppression'])) ?>
- -
diff --git a/extranet/Vue/Ajaxfactureconsprestataire/geds.php b/extranet/Vue/Ajaxfactureconsprestataire/geds.php deleted file mode 100644 index 7d3a776..0000000 --- a/extranet/Vue/Ajaxfactureconsprestataire/geds.php +++ /dev/null @@ -1,27 +0,0 @@ -
- -
- - - - - - - - - nettoyer($ged['idGed']); - $cheminFichier = $this->nettoyer($ged['cheminFichier']); - ?> - - - - - - - -
Date
nettoyer($ged['dateSysteme'])) ?>nettoyer($ged['nomOrigine']) ?> - -
-
-
diff --git a/extranet/Vue/Ajaxfactureconsprestataire/index.php b/extranet/Vue/Ajaxfactureconsprestataire/index.php deleted file mode 100644 index 3dc52e1..0000000 --- a/extranet/Vue/Ajaxfactureconsprestataire/index.php +++ /dev/null @@ -1,131 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
E-mail / Tel
Date User
- - - - - - - - - - - -
- -
diff --git a/extranet/Vue/Ajaxfactureconsprestataire/medicaments.php b/extranet/Vue/Ajaxfactureconsprestataire/medicaments.php deleted file mode 100644 index ea866a8..0000000 --- a/extranet/Vue/Ajaxfactureconsprestataire/medicaments.php +++ /dev/null @@ -1,56 +0,0 @@ -
- - - - " disabled > - - - - - - - - - - - - - - - - nettoyer($medicament['ententePrealable']); - - $libelleMedicament = $this->nettoyer($medicament['libelleMedicament']); - $codeMedicament = $this->nettoyer($medicament['codeMedicament']); - - if($actVisible!="1") - { - $libelleMedicament = $codeMedicament; - } - ?> - - - - - - - - - - - - - - - - - - - - - -
Date
nettoyer($medicament['dateSysteme'])) ?> nettoyer($medicament['valeurActe'])) ?> nettoyer($medicament['quantite']) ?> nettoyer($medicament['fraisReel'])) ?> nettoyer($medicament['montantTm'])) ?> nettoyer($medicament['montantArembourser'])) ?>
-
diff --git a/extranet/Vue/Ajaxfactureconsprestataire/prestationactes.php b/extranet/Vue/Ajaxfactureconsprestataire/prestationactes.php deleted file mode 100644 index 163c85f..0000000 --- a/extranet/Vue/Ajaxfactureconsprestataire/prestationactes.php +++ /dev/null @@ -1,66 +0,0 @@ -
- - - " disabled > - - - - - - - - - - - - - - - - - nettoyer($prestation['codeTypePrestation']); - $ententePrealable = $this->nettoyer($prestation['ententePrealable']); - $autorisation = $this->nettoyer($prestation['autorisation']); - - $codeActe = $this->nettoyer($prestation['codeActe']); - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleActe = $this->nettoyer($prestation['libelleActeEng']); - } - else - { - $libelleActe = $this->nettoyer($prestation['libelleActe']); - } - - if($actVisible!="1") - { - $libelleActe = $codeActe; - } - ?> - - - - - - - - - - - - - - - - - - - - - - -
Date
nettoyer($prestation['dateSysteme'])) ?> nettoyer($prestation['valeurActe'])) ?> nettoyer($prestation['quantite']) ?> nettoyer($prestation['fraisReel'])) ?> nettoyer($prestation['montantTm'])) ?> nettoyer($prestation['montantArembourser'])) ?>
-
diff --git a/extranet/Vue/Ajaxfactureconsprestataire/verres.php b/extranet/Vue/Ajaxfactureconsprestataire/verres.php deleted file mode 100644 index 697049f..0000000 --- a/extranet/Vue/Ajaxfactureconsprestataire/verres.php +++ /dev/null @@ -1,35 +0,0 @@ -
- - - " disabled > - - - - - - - - - - - - nettoyer($verre['libelleVerre']); - $codeOptique = $this->nettoyer($verre['codeOptique']); - - if($actVisible!="1") - { - $libelleVerre = $codeOptique; - } - ?> - - - - - - - -
Date
nettoyer($verre['dateSysteme'])) ?> nettoyer($verre['valeurActe'])) ?>
-
diff --git a/extranet/Vue/Ajaxfeuillemaladie/index.php b/extranet/Vue/Ajaxfeuillemaladie/index.php deleted file mode 100644 index 2bb5814..0000000 --- a/extranet/Vue/Ajaxfeuillemaladie/index.php +++ /dev/null @@ -1,515 +0,0 @@ -
- titre = "INTER-SANTE - Feuille Maladie"; - - $facture = $feuillemaladie['facture']; - $numeroDerogation = $feuillemaladie['numeroDerogation']; - $numeroDerogationFinger = $feuillemaladie['numeroDerogationFinger']; - $nb_notefeuillemaladie = $feuillemaladie['nb_notefeuillemaladie']; - $idFactureFeuille = $feuillemaladie['idFactureFeuille']; - - $agePrescription = $this->nettoyer($feuillemaladie['agePrescription']); - $bonCaduc = $this->nettoyer($feuillemaladie['bonCaduc']); - - $modeSaisieFacture = $_SESSION['p_modeSaisieFacture']; - - if($modeSaisieFacture=="1") - { - $bonCaduc = "0"; - } - - $actVisible = $_SESSION['p_actVisible']; - - $AffectionVisible = $_SESSION['p_AffectionVisible']; - - $codeTypeAffection = $this->nettoyer($feuillemaladie['codeTypeAffection']); - - $codeAffection = $this->nettoyer($feuillemaladie['codeAffection']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleAffection = $this->nettoyer($feuillemaladie['libelleAffectionEng'])." => ".$codeAffection; - } - else - { - $libelleAffection = $this->nettoyer($feuillemaladie['libelleAffection'])." => ".$codeAffection; - } - - if($AffectionVisible!="1") - { - $libelleAffection = $codeAffection; - } - - $controlerPlafondAdherent = ($_SESSION['p_controlerPlafondAdherent']>0); - $controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - Notes => " . $nb_notefeuillemaladie . " => User => " . $feuillemaladie['codeUtilisateur'] ?>" readonly > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-

-
- -
-

".$agePrescription . " "._("jours") . " => " . _("BON CADUC") ?>

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nettoyer($prestation['id']); - $supprimable = $prestation['supprimable']; - $codeTypePrestation = $this->nettoyer($prestation['codeTypePrestation']); - $ententePrealable = $this->nettoyer($prestation['ententePrealable']); - $autorisation = $this->nettoyer($prestation['autorisation']); - - if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US") - { - $libelleActe = $this->nettoyer($prestation['libelleActeEng']); - } - else - { - $libelleActe = $this->nettoyer($prestation['libelleActe']); - } - - $codeActe = $this->nettoyer($prestation['codeActe']); - - if($actVisible!="1") - { - $libelleActe = $codeActe; - } - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date
nettoyer($feuillemaladie['fraisReel'])) ?>nettoyer($feuillemaladie['montantTm'])) ?>nettoyer($feuillemaladie['montantArembourser'])) ?>
nettoyer($prestation['dateSysteme'])) ?> nettoyer($prestation['medecinActe']) ?> nettoyer($prestation['valeurActe'])) ?> nettoyer($prestation['quantite']) ?> nettoyer($prestation['fraisReel'])) ?> nettoyer($prestation['montantTm'])) ?> nettoyer($prestation['montantArembourser'])) ?>
- - - - - - - - - - - - - - - - - - - - - - - nettoyer($garantieadherent['champApplication']); - ?> - - - - - - - - - - - - - - - - - - -
nettoyer($garantieadherent['garantie'])?> nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['soldeOld'])) ?>nettoyer($garantieadherent['consommationNew'])) ?>nettoyer($garantieadherent['consommationSousGarantie'])) ?>nettoyer($garantieadherent['fraisExclu'])) ?>nettoyer($garantieadherent['fraisRetenu'])) ?>nettoyer($garantieadherent['soldeNew'])) ?>
- - -
- -
- - - - "0"): ?> -
-

-
- - - "0"): ?> -
-

-
- - - - - - - - - - -
\ No newline at end of file diff --git a/extranet/Vue/Ajaxgabarit/index.php b/extranet/Vue/Ajaxgabarit/index.php deleted file mode 100644 index 96921eb..0000000 --- a/extranet/Vue/Ajaxgabarit/index.php +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extranet/Vue/Ajaximprimerfeuillemaladie/index.php b/extranet/Vue/Ajaximprimerfeuillemaladie/index.php deleted file mode 100644 index 86cbd60..0000000 --- a/extranet/Vue/Ajaximprimerfeuillemaladie/index.php +++ /dev/null @@ -1,2 +0,0 @@ -
-
diff --git a/extranet/Vue/Ajaxinfosacte/index.php b/extranet/Vue/Ajaxinfosacte/index.php deleted file mode 100644 index a9ec216..0000000 --- a/extranet/Vue/Ajaxinfosacte/index.php +++ /dev/null @@ -1,4 +0,0 @@ -