production/Controleur/ControleurTraitementproformahospitalisation.php
2025-12-02 11:29:44 +00:00

277 lines
8.1 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Examen.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurTraitementproformahospitalisation extends Controleur {
private $menuvue;
private $examen;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Traitementproformahospitalisation');
$this->examen = new Examen();
}
public function index()
{
$idProforma = $this->requete->getParametreFormulaire("id");
$_SESSION['idProforma'] = $idProforma;
$examen = $this->examen->getproformahospit($idProforma);
$codeGarantie = "HOS";
$codeActe = "HHC";
$datePrestation = date('Y-m-d');//$examen['dateDebut'];
$idBeneficiaire = $examen['idBeneficiaire'];
$codePrestataire = $examen['codePrestataire'];
$_SESSION['codePrestataireProforma']= $examen['codePrestataire'];
$this->examen->initdetailproformahospit($idProforma);
$detailexamens = $this->examen->getdetailproformahospit($idProforma);
$motifexamens = $this->examen->getmotifproformahospit($idProforma);
$situationBeneficiaire = $this->examen->getSituationBeneficiaire($idBeneficiaire, $codeGarantie, $codeActe, $datePrestation);
$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->genererVue(array('idProforma' => $idProforma, 'motifexamens' => $motifexamens, 'examen' => $examen,
'detailexamens' => $detailexamens, 'situationBeneficiaire' => $situationBeneficiaire, 'choix' => $choix,
'hospit_total' => $hospit_total, 'accorderTout' => $accorderTout, 'refuserTout' => $refuserTout,
'siRefus' => $siRefus));
}
public function refuserexamen()
{
$idExamen = $this->requete->getParametre("idExamen");
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$p_choix = $this->requete->getParametre("p_choix");
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->refuserexamen($idExamen,$numeroFeuilleMaladie,$p_choix, $codeTypePrestation);
$this->executerAction("index");
}
public function annulerrefusexamen()
{
$idExamen = $this->requete->getParametre("idExamen");
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$p_choix = $this->requete->getParametre("p_choix");
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->annulerrefusexamen($idExamen,$numeroFeuilleMaladie,$p_choix,$codeTypePrestation);
$this->executerAction("index");
}
public function refuserTouteDemandes()
{
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$p_choix = $this->requete->getParametre("p_choix");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$_SESSION["refuserTout"] = "1";
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->refuserTouteDemandes($numeroFeuilleMaladie,$p_choix, $codeTypePrestation, $vue);
$this->executerAction("index");
}
public function annulerRefuserTouteDemandes()
{
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$p_choix = $this->requete->getParametre("p_choix");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$_SESSION["refuserTout"] = "0";
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->annulerRefuserTouteDemandes($numeroFeuilleMaladie,$p_choix, $codeTypePrestation, $vue);
$this->executerAction("index");
}
public function validerexamen()
{
$idExamen = $this->requete->getParametre("idExamen");
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$p_choix = $this->requete->getParametre("p_choix");
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->validerexamen($idExamen,$numeroFeuilleMaladie,$p_choix,$codeTypePrestation);
$this->executerAction("index");
}
//ajout 14-09-2023
public function annulervalidationexamen()
{
$idExamen = $this->requete->getParametre("idExamen");
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$p_choix = $this->requete->getParametre("p_choix");
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->annulervalidationexamen($idExamen,$numeroFeuilleMaladie,$p_choix,$codeTypePrestation);
//$this->examen->updateexamen($numeroFeuilleMaladie);
$this->executerAction("index");
}
public function validerTouteDemandes()
{
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$p_choix = $this->requete->getParametre("p_choix");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$_SESSION["validerTout"] = "1";
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->validerTouteDemandes($numeroFeuilleMaladie,$p_choix, $codeTypePrestation, $vue);
$this->executerAction("index");
}
public function annulervaliderTouteDemande()
{
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$p_choix = $this->requete->getParametre("p_choix");
$codeTypePrestation = $this->requete->getParametreFormulaire("codeTypePrestation");
$_SESSION["validerTout"] = "0";
$vue = $_SESSION['vueEntentePrealable'];
if($codeTypePrestation=="ACT"){
if($vue == "Listeententeprealabledent"){
$codeGarantie = "DEN";
}else{
$codeGarantie = "";
}
}
$this->examen->annulervaliderTouteDemande($numeroFeuilleMaladie, $codeTypePrestation, $vue);
$this->executerAction("index");
}
public function supprimer()
{
$idExamen = $this->requete->getParametre("idExamen");
$this->examen->supprimerexamen($idExamen);
$this->examen->updateexamen($_SESSION['numeroFeuilleMaladie_C']);
$this->executerAction("index");
}
public function valider_examen()
{
$idExamen = $this->requete->getParametre("idExamen");
$numeroFeuilleMaladie = $this->requete->getParametre("numeroFeuilleMaladie");
$this->examen->supprimerexamen($idExamen);
$this->examen->updateexamen($_SESSION['numeroFeuilleMaladie_C']);
$this->executerAction("index");
}
}