66 lines
3.0 KiB
PHP
Executable File
66 lines
3.0 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Bonpec.php';
|
|
|
|
class ControleurAjaxavishospitalisation extends Controleur {
|
|
private $bonpec;
|
|
|
|
public function __construct() {
|
|
$this->bonpec = new Bonpec();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
|
|
|
|
$numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C'];
|
|
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
|
|
$motifHospitalisation = $this->requete->getParametreFormulaire("motifHospitalisation");
|
|
$codeTypeChambre = $this->requete->getParametreFormulaire("codeTypeChambre");
|
|
$duree = $this->requete->getParametreFormulaire("duree");
|
|
|
|
$dateDebut = $this->requete->getParametreDate("dateDebut");
|
|
|
|
$codeTypeHospitalisation= $this->requete->getParametreFormulaire("codeTypeHospitalisation");
|
|
|
|
$codeAvisExistant = $this->bonpec->getCodeAvisExistant();
|
|
|
|
if($codeAvisExistant==""){
|
|
$codeAvisHopitalisation = $this->bonpec->getCodeAvisHospitalisation($idBeneficiaire, $numeroBeneficiaire, $codePrestataire, $motifHospitalisation, $codeTypeChambre, $dateDebut, $duree, $codeTypeHospitalisation);
|
|
}else{
|
|
$codeAvisHopitalisation = $codeAvisExistant;
|
|
}
|
|
|
|
$_SESSION['codeAvisHopitalisation'] = $codeAvisHopitalisation;
|
|
$reponseAvis = $this->bonpec->getReponseAvisHospitalisation($codeAvisHopitalisation);
|
|
|
|
|
|
$this->genererVueAjax(array('codeAvisHopitalisation' => $codeAvisHopitalisation, 'reponseAvis' => $reponseAvis));
|
|
}
|
|
|
|
public function prolongation()
|
|
{
|
|
|
|
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
|
|
$numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C'];
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
|
|
$numeroBonHospitalisation = $this->requete->getParametreFormulaire("numeroBonHospitalisation");
|
|
$numeroAvisHopitalisation = $this->requete->getParametreFormulaire("numeroAvisHopitalisation");
|
|
$motifProlongation = $this->requete->getParametreFormulaire("motifProlongation");
|
|
$codeTypeChambreProlongation = $this->requete->getParametreFormulaire("codeTypeChambreProlongation");
|
|
$dateDebutProlongation = $this->requete->getParametreDate("dateDebutProlongation");
|
|
$dureeProlongation = $this->requete->getParametreFormulaire("dureeProlongation");
|
|
$codeTypeHospitalisationPro = $this->requete->getParametreFormulaire("codeTypeHospitalisationPro");
|
|
$numeroChambreProlongation = $this->requete->getParametreFormulaire("numeroChambreProlongation");
|
|
|
|
$numeroAvisProlongation = $this->bonpec->getNumeroAvisProlongation($idBeneficiaire, $numeroBeneficiaire, $codePrestataire, $numeroBonHospitalisation,
|
|
$numeroAvisHopitalisation, $motifProlongation, $codeTypeChambreProlongation, $dateDebutProlongation, $dureeProlongation,
|
|
$codeTypeHospitalisationPro, $numeroChambreProlongation);
|
|
|
|
$this->genererVueAjax(array('numeroAvisProlongation' => $numeroAvisProlongation));
|
|
|
|
}
|
|
} |