191 lines
6.0 KiB
PHP
Executable File
191 lines
6.0 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Examen.php';
|
|
|
|
class ControleurAjaxtraitementproformahospitalisation extends Controleur {
|
|
|
|
public function __construct() {
|
|
$this->examen = new Examen();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("id");
|
|
|
|
if ($idProforma==""){
|
|
$idProforma = $_SESSION['idProforma'];
|
|
}
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$examen = $this->examen->getproformahospit($idProforma);
|
|
|
|
$codePrestataire = $_SESSION['codePrestataireProforma'];
|
|
|
|
$detailexamens = $this->examen->getdetailproformahospit($idProforma);
|
|
$motifexamens = $this->examen->getmotifproformahospit($idProforma);
|
|
|
|
$choix = $this->examen->choixActe($idProforma);
|
|
$accorderTout = $this->examen->accorderTout($idProforma);
|
|
$refuserTout = $this->examen->refuserTout($idProforma);
|
|
$siRefus = $this->examen->siRefus($idProforma);
|
|
|
|
$hospit_total = $this->examen->cumulProformaHospitalisation($idProforma);
|
|
|
|
|
|
$this->genererVueAjax(array('idProforma' => $idProforma, 'motifexamens' => $motifexamens,
|
|
'examen' => $examen, 'detailexamens' => $detailexamens, 'choix' => $choix, 'hospit_total' => $hospit_total,
|
|
'accorderTout' => $accorderTout, 'refuserTout' => $refuserTout, 'siRefus' => $siRefus));
|
|
}
|
|
|
|
public function majdureecorrigee()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$dureeCorrigee = $this->requete->getParametreFormulaire("dureeCorrigee");
|
|
|
|
$this->examen->majdureecorrigeeproformahospi($idProforma, $dureeCorrigee);
|
|
|
|
}
|
|
|
|
public function validertoutproformahospit()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->validertoutproformahospitalisation($idProforma);
|
|
}
|
|
|
|
public function annulervalidertoutproformahospit()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
|
|
$this->examen->annulervalidertoutproformahospitalisation($idProforma);
|
|
|
|
}
|
|
|
|
public function refusertoutproformahospit()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->refusertoutproformahospitalisation($idProforma);
|
|
|
|
}
|
|
|
|
public function annulerrefusertoutproformahospit()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
|
|
$this->examen->annulerrefusertoutproformahospitalisation($idProforma);
|
|
|
|
}
|
|
|
|
public function majvaleuracte()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
$valeurActe = $this->requete->getParametreFormulaire("valeurActe", "numerique");
|
|
|
|
//$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->majvaleuracteproformahospitalisation($idPrestationactes, $valeurActe);
|
|
|
|
}
|
|
|
|
public function majquantite()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
|
|
|
|
//$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->majquantiteproformahospitalisation($idPrestationactes, $quantite);
|
|
|
|
}
|
|
|
|
public function validerunacteproformahospit()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametreFormulaire("idPrestationactes");
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->validerunacteproformahospitalisation($idProforma, $idPrestationactes, $choix);
|
|
}
|
|
|
|
public function refuserunacteproformahospit()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametreFormulaire("idPrestationactes");
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->refuserunacteproformahospitalisation($idProforma, $idPrestationactes, $choix);
|
|
}
|
|
|
|
public function validerproformahospit()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$this->examen->validerproformahospitalisation($idProforma);
|
|
|
|
|
|
|
|
//echo $numeroBonHospitalisation;
|
|
}
|
|
|
|
public function majobservation()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$observation = $this->requete->getParametreFormulaire("observation");
|
|
|
|
$this->examen->majobservationproformahospitalisation($idProforma, $observation);
|
|
}
|
|
|
|
public function majmotifrefus()
|
|
{
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$_SESSION['idProforma'] = $idProforma;
|
|
|
|
$motifRefus = $this->requete->getParametreFormulaire("motifRefus");
|
|
|
|
$this->examen->majmotifrefusproformahospitalisation($idProforma, $motifRefus);
|
|
}
|
|
|
|
public function ajouteractes()
|
|
{
|
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$this->examen->ajouteractesproforma($codeActe, $idProforma);
|
|
|
|
}
|
|
|
|
public function creerconsommableproformahospit()
|
|
{
|
|
$nomConsommable = $this->requete->getParametreFormulaire("libelleconsommable");
|
|
$prixconsommable = $this->requete->getParametreFormulaire("prixconsommable", "numerique");
|
|
$quantiteconsommable = $this->requete->getParametreFormulaire("quantiteconsommable", "numerique");
|
|
$idProforma = $this->requete->getParametreFormulaire("idProforma");
|
|
|
|
$this->examen->creerconsommableproformahospit($nomConsommable, $prixconsommable, $quantiteconsommable, $idProforma);
|
|
}
|
|
} |