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

65 lines
2.3 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Feuillemaladie.php';
require_once 'Modele/Prestationactes.php';
require_once 'Modele/Typeaffection.php';
require_once 'Modele/Affection.php';
require_once 'Modele/Beneficiaire.php';
class ControleurAjaxfeuillemaladie extends Controleur {
private $feuillemaladie;
private $prestation;
private $typeaffection;
private $affection;
private $beneficiaire;
public function __construct() {
$this->feuillemaladie = new Feuillemaladie();
$this->prestation = new Prestationactes();
$this->typeaffection = new Typeaffection();
$this->affection = new Affection();
$this->beneficiaire = new Beneficiaire();
}
public function index()
{
$_SESSION['p_controlerGarantieMaternite'] = "0";
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
$codePrestataire = $_SESSION['p_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);
$typeaffections = $this->typeaffection->getListe() ;
$codeTypeAffection = $feuillemaladie['codeTypeAffection'];
$affections = $this->affection->getListe($codeTypeAffection) ;
$diagnostics = $this->feuillemaladie->getDiagnostics($numeroFeuilleMaladie);
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
$this->beneficiaire->controlerplafondbeneficiaireannuel($idBeneficiaire);
$limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp();
$this->genererVueAjax(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations,
'garantieadherent_temp' => $garantieadherent_temp, 'typeaffections' => $typeaffections, 'affections' => $affections,
'diagnostics' => $diagnostics, 'limite_beneficiaire' => $limite_beneficiaire));
}
}