radiantassure/Controleur/ControleurFeuillemaladie.php
2025-12-07 09:35:13 +00:00

46 lines
1.5 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Feuillemaladie.php';
require_once 'Modele/Prestationactes.php';
class ControleurFeuillemaladie extends Controleur {
private $menuvue;
private $feuillemaladie;
private $prestation;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Feuillemaladie');
$this->feuillemaladie = new Feuillemaladie();
$this->prestation = new Prestationactes();
$_SESSION['codeTypeFacture_C'] = "CSO";
}
public function index()
{
$numeroFeuilleMaladie = $_SESSION['numeroFeuilleMaladie_C'];
$codePrestataire = $_SESSION['codePrestataire_C'];
$garantieadherent_temp = null;
$infosfeuillemaladie = $this->feuillemaladie->getinfosfeuillemaladie($numeroFeuilleMaladie);
$facture = $infosfeuillemaladie['facture'];
$this->prestation->vider_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire);
if($facture==0)
{
$garantieadherent_temp = $this->prestation->init_garantieadherent_temp($numeroFeuilleMaladie, $codePrestataire);
}
$feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie);
$prestations = $this->prestation->getprestationsfeuille($numeroFeuilleMaladie, $codePrestataire);
$this->genererVue(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations,
'garantieadherent_temp' => $garantieadherent_temp));
}
}