123 lines
4.2 KiB
PHP
123 lines
4.2 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
require_once 'Modele/Beneficiaire.php';
|
|
|
|
class ControleurAjaxproformahospitalisation extends Controleur {
|
|
private $prestation;
|
|
private $beneficiaire;
|
|
|
|
public function __construct() {
|
|
$this->prestation = new Prestationactes();
|
|
|
|
$this->beneficiaire = new Beneficiaire();
|
|
}
|
|
|
|
public function index() {
|
|
$idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire");
|
|
|
|
$_SESSION['p_idBeneficiaire_P'] = $idBeneficiaire;
|
|
|
|
|
|
|
|
$this->genererVueAjax();
|
|
}
|
|
|
|
public function unsetsession()
|
|
{
|
|
//var_dump($_SESSION['p_numeroFeuilleMaladie_C']);
|
|
//die();
|
|
|
|
if($_SESSION['p_numeroFeuilleMaladie_C'] == "0" || is_null($_SESSION['p_numeroFeuilleMaladie_C'])){
|
|
$_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";
|
|
|
|
$_SESSION['p_codeAffection_C'] = "";
|
|
|
|
|
|
$beneficiaire = $this->ben->getBeneficiaireVide();
|
|
}
|
|
}
|
|
|
|
public function valider()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$this->prestation->validerproformahospitalisation($idProforma);
|
|
|
|
|
|
$this->unsetsession();
|
|
}
|
|
|
|
public function enregistrerentete()
|
|
{
|
|
$optionHospitalisation = $this->requete->getParametreFormulaire("optionHospitalisation");
|
|
$dateDebut = $this->requete->getParametreDate("dateDebut");
|
|
$codeMedecin = $this->requete->getParametreFormulaire("codeMedecin");
|
|
$duree = $this->requete->getParametreFormulaire("duree");
|
|
$motif = $this->requete->getParametreFormulaire("motif");
|
|
|
|
$idProformaHospitalisation = $this->requete->getParametreFormulaire("idProformaHospitalisation");
|
|
|
|
$numeroFeuilleMaladie = $this->requete->getParametreFormulaire("numeroFeuilleMaladie");
|
|
$idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire");
|
|
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
|
|
|
|
$codeAffection = $this->requete->getParametreFormulaire("codeAffection");
|
|
|
|
$codeActeChambre = "";
|
|
|
|
$idProforma = $this->prestation->enregistrerenteteproformahospitalisation($optionHospitalisation, $dateDebut,
|
|
$codeMedecin,$duree,$motif, $idProformaHospitalisation, $numeroFeuilleMaladie, $idBeneficiaire, $codePrestataire,
|
|
$codeAffection, $codeActeChambre);
|
|
|
|
$_SESSION['p_idProforma_C'] = $idProforma;
|
|
$_SESSION['p_idProformaHospitalisation_C'] = $idProforma;
|
|
|
|
echo $idProforma;
|
|
}
|
|
|
|
public function saveData()
|
|
{
|
|
$_SESSION['p_optionProforma_C'] = $this->requete->getParametreFormulaire("optionHospitalisation");
|
|
$_SESSION['p_dateDebutProforma_C'] = $this->requete->getParametreDate("dateDebutHospit");
|
|
$_SESSION['p_codeActeChambre_C'] = $this->requete->getParametreFormulaire("codeActeChambreHospit");
|
|
|
|
$_SESSION['p_dureeProforma_C'] = $this->requete->getParametreFormulaire("dureeHospit");
|
|
$_SESSION['p_motifProforma_C'] = $this->requete->getParametreFormulaire("motifHospitalisation");
|
|
|
|
$_SESSION['p_idBeneficiaire_C'] = $this->requete->getParametreFormulaire("idBeneficiaire");
|
|
|
|
}
|
|
|
|
} |