diff --git a/Controleur/ControleurHospitalisationproforma.php b/Controleur/ControleurHospitalisationproforma.php index d5bf875..3c08bf3 100755 --- a/Controleur/ControleurHospitalisationproforma.php +++ b/Controleur/ControleurHospitalisationproforma.php @@ -7,24 +7,23 @@ require_once 'Modele/Prestationactes.php'; require_once 'Modele/Medecin.php'; require_once 'Modele/Affection.php'; - class ControleurHospitalisationproforma extends Controleur { private $menuvue; private $ben; private $prestation; private $medecin; private $affection; - private $feuille; + private $feuillemaladie; public function __construct() { $this->menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Hospitalisationproforma'); - $this->ben = new Beneficiaire(); - $this->feuille = new Feuillemaladie(); - $this->prestation = new Prestationactes(); - $this->medecin = new Medecin(); - $this->affection = new Affection(); + $this->ben = new Beneficiaire(); + $this->prestation = new Prestationactes(); + $this->medecin = new Medecin(); + $this->affection = new Affection(); + $this->feuillemaladie = new Feuillemaladie(); } public function index() @@ -78,7 +77,7 @@ class ControleurHospitalisationproforma extends Controleur { $affections = $this->affection->getListes(); $ligneZero = $this->prestation->proformaLigneZero($idProformaHospitalisation); - $autoriserBonHospitAvantDate = $this->feuille->getAutoriserBonHospitAvantDate(); + $autoriserBonHospitAvantDate = $this->feuillemaladie->getAutoriserBonHospitAvantDate(); $this->genererVue(array( 'idBeneficiaire' => $idBeneficiaire, diff --git a/Controleur/ControleurProformahospitalisation.php b/Controleur/ControleurProformahospitalisation.php index e7b8a13..c8dbc16 100755 --- a/Controleur/ControleurProformahospitalisation.php +++ b/Controleur/ControleurProformahospitalisation.php @@ -2,10 +2,10 @@ require_once 'Framework/Controleur.php'; require_once 'Modele/Menuvueutilisateur.php'; require_once 'Modele/Beneficiaire.php'; +require_once 'Modele/Feuillemaladie.php'; require_once 'Modele/Prestationactes.php'; require_once 'Modele/Medecin.php'; require_once 'Modele/Affection.php'; -require_once 'Modele/Feuillemaladie.php'; class ControleurProformahospitalisation extends Controleur { private $menuvue; @@ -14,7 +14,6 @@ class ControleurProformahospitalisation extends Controleur { private $medecin; private $affection; private $feuillemaladie; - public function __construct() { $this->menuvue = new Menuvueutilisateur(); @@ -23,11 +22,8 @@ class ControleurProformahospitalisation extends Controleur { $this->ben = new Beneficiaire(); $this->prestation = new Prestationactes(); $this->medecin = new Medecin(); - $this->affection = new Affection(); $this->feuillemaladie = new Feuillemaladie(); - - //$_SESSION["proforma"] = "1"; } public function index() diff --git a/Controleur/ControleurProformahospitalisation_save.php b/Controleur/ControleurProformahospitalisation_save.php new file mode 100755 index 0000000..c8dbc16 --- /dev/null +++ b/Controleur/ControleurProformahospitalisation_save.php @@ -0,0 +1,163 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue('Proformahospitalisation'); + + $this->ben = new Beneficiaire(); + $this->prestation = new Prestationactes(); + $this->medecin = new Medecin(); + $this->affection = new Affection(); + $this->feuillemaladie = new Feuillemaladie(); + } + + public function index() + { + $codePrestataire = $_SESSION['p_codePrestataire_C']; + $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; + + if($idBeneficiaire > "0") + { + $adh = $this->ben->trouverBeneficiaireId($idBeneficiaire); + + $_SESSION['p_numeroBeneficiaire_P'] = $adh['numero']; + $_SESSION['p_beneficiaire_P'] = $adh['beneficiaire']; + $_SESSION['p_nomPolice_P'] = $adh['nomPolice']; + $_SESSION['p_nomCollege_P'] = $adh['nomCollege']; + $_SESSION['p_codeLienParente_P'] = $adh['codeLienParente']; + $_SESSION['p_numeroAdherent_P'] = $adh['numeroAdherent']; + $_SESSION['p_adherent_P'] = $adh['adherent']; + + $_SESSION['p_dateSortieBeneficiaire_P'] = $adh['dateSortieBeneficiaire']; + $_SESSION['p_dateEffetCouvert_P'] = $adh['dateEffetCouvert']; + $_SESSION['p_codeEtatBeneficiaire_P'] = $adh['codeEtatBeneficiaire']; + $_SESSION['p_etatbeneficiaireEng_P'] = $adh['etatbeneficiaireEng']; + $_SESSION['p_etatbeneficiaire_P'] = $adh['etatbeneficiaire']; + + // $beneficiaire = $this->ben->getContexteBeneficiaireId($idBeneficiaire); + } + /* + else{ + $_SESSION['p_numeroBeneficiaire_P'] = ''; + $_SESSION['p_beneficiaire_P'] = ''; + $_SESSION['p_nomPolice_P'] = ''; + $_SESSION['p_nomCollege_P'] = ''; + $_SESSION['p_codeLienParente_P'] = ''; + $_SESSION['p_numeroAdherent_P'] = ''; + $_SESSION['p_adherent_P'] = ''; + + $_SESSION['p_dateSortieBeneficiaire_P'] = null; + $_SESSION['p_dateEffetCouvert_P'] = null; + $_SESSION['p_codeEtatBeneficiaire_P'] = ''; + $_SESSION['p_etatbeneficiaireEng_P'] = ''; + $_SESSION['p_etatbeneficiaire_P'] = ''; + } + */ + + $numeroBeneficiaire = (isset($_SESSION['p_numeroBeneficiaire_P']) && $idBeneficiaire > "0")? $_SESSION['p_numeroBeneficiaire_P']:""; + $beneficiaire = (isset($_SESSION['p_beneficiaire_P']) && $idBeneficiaire > "0")? $_SESSION['p_beneficiaire_P']:""; + + $nomPolice = (isset($_SESSION['p_nomPolice_P']) && $idBeneficiaire > "0")? $_SESSION['p_nomPolice_P']:""; + $nomCollege = (isset($_SESSION['p_nomCollege_P']) && $idBeneficiaire > "0")? $_SESSION['p_nomCollege_P']:""; + $codeLienParente = (isset($_SESSION['p_codeLienParente_P']) && $idBeneficiaire > "0")? $_SESSION['p_codeLienParente_P']:""; + + $noAdherent = (isset($_SESSION['p_numeroAdherent_P']) && $idBeneficiaire > "0")? $_SESSION['p_numeroAdherent_P']:""; + $nomAdherent = (isset($_SESSION['p_adherent_P']) && $idBeneficiaire > "0")? $_SESSION['p_adherent_P']:""; + + $typeHospitalisation = $this->prestation->gettypehospitalisation(); + $medecins = $this->medecin->getpraticiensprestataire($codePrestataire); + + $idProforma = isset($_SESSION['p_idProforma_C']) ? $_SESSION['p_idProforma_C'] : '0'; + + if($idProforma > "0" && $idBeneficiaire > "0"){ + $this->prestation->getenteteproformahospitalisation($idProforma); + } + + $affections = $this->affection->getListes(); + $actesChambre = $this->feuillemaladie->getActeChambreHospitalisation(); + + /* + var_dump(array( + 'idBeneficiaire_session_c' => $_SESSION['p_idBeneficiaire_C'], + 'idBeneficiaire' => $idBeneficiaire, + 'numeroBeneficiaire'=> $numeroBeneficiaire, + 'nomPolice' => $nomPolice, + 'nomCollege' => $nomCollege, + 'codeLienParente' => $codeLienParente, + 'noAdherent' => $noAdherent, + 'nomAdherent' => $nomAdherent + )); + exit(); + */ + + $this->genererVue(array( + 'idBeneficiaire' => $idBeneficiaire, + 'numeroBeneficiaire'=> $numeroBeneficiaire, + 'beneficiaire' => $beneficiaire, + 'nomPolice' => $nomPolice, + 'nomCollege' => $nomCollege, + 'codeLienParente' => $codeLienParente, + 'noAdherent' => $noAdherent, + 'nomAdherent' => $nomAdherent, + 'typeHospitalisation' => $typeHospitalisation, + 'medecins' => $medecins, + 'affections' => $affections, + 'actesChambre' => $actesChambre + )); + } + + public function unsetsession() + { + /* + $_SESSION['p_idBeneficiaire_P'] = ""; + $_SESSION['p_dateDebutProforma_C'] = ""; + $_SESSION['p_dureeProforma_C'] = "0"; + $_SESSION['p_motifProforma_C'] = ""; + $_SESSION['p_codeMedecinProforma_C'] = ""; + $_SESSION['p_numeroBeneficiaire_P'] = ""; + $_SESSION['p_beneficiaire_P'] = ""; + $_SESSION['p_nomPolice_P'] = ""; + $_SESSION['p_nomCollege_P'] = ""; + $_SESSION['p_codeLienParente_P'] = ""; + $_SESSION['p_numeroAdherent_P'] = ""; + $_SESSION['p_adherent_P'] = ""; + + + $_SESSION['p_idProforma_C'] = "0"; + $_SESSION['p_dateDebutProforma_C'] = ""; + + $_SESSION['p_nomClient_C'] = ""; + $_SESSION['p_adherent_C'] = ""; + $_SESSION['p_beneficiaire_C'] = ""; + $_SESSION['p_telephonePortableBeneficiaire_C'] = ""; + + $_SESSION['p_idBeneficiaire_C'] = "0"; + $_SESSION['p_numeroBeneficiaire_C'] = "0"; + $_SESSION['p_codeReponseEntentePrealable_C'] = ""; + + $_SESSION['p_numeroEntentePrealable_C'] = "0"; + + $_SESSION['p_observation_C'] = ""; + $_SESSION['p_motifRefus_C'] = ""; + + $_SESSION['p_idProformaHospitalisation_C'] = "0"; + + // $beneficiaire = $this->ben->getBeneficiaireVide(); + */ + } +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 41d6a69..402cf7d 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -19547,6 +19547,7 @@ function raffraichier_messagerie() // alert("raffraichier_messagerie"); // return; + /* deconnexion='0'; if($('#nomForm').val()=="feuillemaladie"){ numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val(); @@ -19591,6 +19592,7 @@ function raffraichier_messagerie() $("#test_connexion").css('background-color', 'red'); return; } + */ }