214 lines
8.2 KiB
PHP
Executable File
214 lines
8.2 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Detailtarifacte.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
require_once 'Modele/Feuillemaladie.php';
|
|
require_once 'Modele/Prescription.php';
|
|
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
|
|
|
class ControleurAjaxselectactesmedicauxhospitalisation extends Controleur {
|
|
private $feuillemaladie;
|
|
private $acte;
|
|
private $prescription;
|
|
private $prestation;
|
|
private $garantie;
|
|
|
|
|
|
public function __construct() {
|
|
$this->feuillemaladie = new Feuillemaladie();
|
|
$this->acte = new Detailtarifacte();
|
|
$this->prestation = new Prestationactes();
|
|
$this->prescription = new Prescription();
|
|
$this->garantie = new Garantiesbaremepriseencharge();
|
|
}
|
|
|
|
public function index() {
|
|
|
|
$codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe");
|
|
|
|
$_SESSION['codeFamilleActeHos'] = $codeFamilleActe;
|
|
|
|
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
|
|
|
|
$codeGarantie = "HOS";
|
|
|
|
$datePrestation = $_SESSION['datePrestation'];
|
|
|
|
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
|
|
$this->garantie->getsourcebaremegarantienew($idBeneficiaire, $codeGarantie, $datePrestation);
|
|
|
|
$typeHospitalisation = $this->prestation->gettypehospitalisation();
|
|
|
|
$feuillemaladie = $this->feuillemaladie->getfeuillemaladie($numeroFeuilleMaladie);
|
|
|
|
$hospit_total = $this->prestation->gethospitalisation_total($numeroFeuilleMaladie);
|
|
|
|
|
|
|
|
if($feuillemaladie['optionHospitalisation'] == "option-1"){
|
|
$codeActe = "HHM";
|
|
$plafondHospitalisation = $_SESSION['p_bareme']['gar_forfaitPlafondBeneficiaire'];
|
|
$plafondHospitalisationFamille = $_SESSION['p_bareme']['gar_forfaitPlafondFamille'];
|
|
}elseif ($feuillemaladie['optionHospitalisation'] == "option-3"){
|
|
$codeActe = "HHC";
|
|
$plafondHospitalisation = $_SESSION['p_bareme']['gar_forfaitPlafondBeneficiaire'];
|
|
$plafondHospitalisationFamille = $_SESSION['p_bareme']['gar_forfaitPlafondFamille'];
|
|
}else{
|
|
$codeActe = "";
|
|
$plafondHospitalisation = "9999999999";
|
|
$plafondHospitalisationFamille = "9999999999";
|
|
}
|
|
|
|
$tm = $this->prestation->ticketModerateurDefinitif($codeGarantie, $codeActe, $datePrestation);
|
|
|
|
$tauxCouverture = (100-$tm)."%";//$this->acte->tauxCouverture($tMGarantie);
|
|
|
|
|
|
if($codeActe == ""){
|
|
$plafondActeHospit = "9999999999";
|
|
$plafondActeHospitFamille = "9999999999";
|
|
$periodicite = "";
|
|
$periodiciteEng = "";
|
|
}else{
|
|
$this->garantie->getsourcebaremenew($idBeneficiaire, $codeActe, $datePrestation);
|
|
|
|
$plafondActeHospit = $_SESSION['p_bareme']['act_forfaitPlafondBeneficiaire'];//$this->prestation->getPlafondActe($codeActe);
|
|
$plafondActeHospitFamille = $_SESSION['p_bareme']['act_forfaitPlafondFamille'];
|
|
|
|
$codePeriodiciteActe = $_SESSION['p_bareme']['gar_codePeriodicitePlafondBeneficiaire'];
|
|
|
|
$periodicite = $this->garantie->getlibelleperiodicite($codePeriodiciteActe);
|
|
$periodiciteEng = $this->garantie->getlibelleperiodicite($codePeriodiciteActe);
|
|
|
|
if($plafondActeHospit == "0"){
|
|
$plafondActeHospit = "9999999999";
|
|
$plafondActeHospitFamille = "9999999999";
|
|
$periodicite = "";
|
|
$periodiciteEng = "";
|
|
}
|
|
}
|
|
|
|
$this->garantie->baremesolde($idBeneficiaire,$codeActe,$codeGarantie,$numeroFeuilleMaladie);
|
|
$baremesolde = $this->garantie->getbaremesolde($idBeneficiaire,$codeActe,$codeGarantie,$numeroFeuilleMaladie);
|
|
|
|
|
|
$soldeConsommation = $baremesolde['soldeConsommation'] - $hospit_total['montantArembourser'];
|
|
|
|
$prixChambre = $this->prestation->getprixchambrehospitalisation($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
|
|
$prestations = $this->prestation->getactesmedicauxhospitalisation($numeroFeuilleMaladie, $codePrestataire);
|
|
$prestations_total = $this->prestation->getactesmedicauxhospitalisation_total($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
|
|
$nbreTotalActes = $this->prestation->getnbreactehospitalisation($numeroFeuilleMaladie);
|
|
$facture = $feuillemaladie['facture'];
|
|
|
|
$listeProlongations = $this->feuillemaladie->getListeProlongations($numeroFeuilleMaladie);
|
|
|
|
$nbreActesSansPrix = $this->prestation->getNbreActesSansPrix($numeroFeuilleMaladie, $feuillemaladie['idProlongation']);
|
|
|
|
$this->genererVueAjax(array('feuillemaladie' => $feuillemaladie, 'prestations' => $prestations,
|
|
'prestations_total' => $prestations_total, 'plafondHospitalisation' => $plafondHospitalisation,
|
|
'tauxCouverture' => $tauxCouverture, 'act_periodicite' => $periodicite, 'act_periodiciteEng' => $periodiciteEng,
|
|
'typeHospitalisation' => $typeHospitalisation, 'soldeConsommation' => $soldeConsommation, 'hospit_total' => $hospit_total,
|
|
'nbreTotalActes' => $nbreTotalActes, 'plafondActeHospit' => $plafondActeHospit, 'listeProlongations' => $listeProlongations,
|
|
'nbreActesSansPrix' => $nbreActesSansPrix, 'prixChambre' => $prixChambre));
|
|
}
|
|
|
|
public function enregistreractemedical()
|
|
{
|
|
$codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe");
|
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
|
$ententePrealable = $this->requete->getParametreFormulaire("ententePrealable");
|
|
$prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique");
|
|
$valeurActe = $prixActe ;
|
|
$quantite = "1";
|
|
$montantTm = $this->requete->getParametreFormulaire("montantTm", "numerique");
|
|
$aRembourser = $this->requete->getParametreFormulaire("aRembourser", "numerique");
|
|
|
|
$autorisation = "0";
|
|
$prixTarif = $prixActe ;
|
|
$prixBase = $this->requete->getParametreFormulaire("prixBase", "numerique");
|
|
$fraisReelBase = $prixBase;
|
|
$depassement = $this->requete->getParametreFormulaire("depassement", "numerique");
|
|
|
|
$this->prestation->enregistreractemedicalhospitalisation($codeFamilleActe, $codeActe, $quantite, $prixActe, $valeurActe, $montantTm, $aRembourser,
|
|
$ententePrealable, $autorisation, $prixTarif, $prixBase, $fraisReelBase, $depassement);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function supprimeracte()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
|
|
$this->prestation->supprimeractehospitalisation($idPrestationactes);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majquantite()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
|
|
|
|
$this->prestation->majquantitehospitalisation($idPrestationactes, $quantite);
|
|
|
|
//$this->executerAction("index");
|
|
}
|
|
|
|
public function majvaleuracte()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
$valeurActe = $this->requete->getParametreFormulaire("valeurActe", "numerique");
|
|
|
|
$this->prestation->majvaleuractehospitalisation($idPrestationactes, $valeurActe);
|
|
|
|
//$this->executerAction("index");
|
|
}
|
|
|
|
|
|
public function enregistrertypehospitalisation()
|
|
{
|
|
$type = $this->requete->getParametre("type");
|
|
|
|
$_SESSION['p_option_hospitalisation'] = $type;
|
|
|
|
if($type=="option-1"){
|
|
$_SESSION['p_acte_hospitalisation'] = "HHM";
|
|
$_SESSION['accouchement'] = "0";
|
|
}elseif($type=="option-2"){
|
|
$_SESSION['p_acte_hospitalisation'] = "HHS";
|
|
$_SESSION['accouchement'] = "0";
|
|
}elseif($type=="option-3"){
|
|
$_SESSION['p_acte_hospitalisation'] = "HHC";
|
|
$_SESSION['accouchement'] = "0";
|
|
}elseif($type=="option-4"){
|
|
$_SESSION['p_acte_hospitalisation'] = "HHA";
|
|
$_SESSION['accouchement'] = "1";
|
|
}
|
|
|
|
$this->prestation->majoptionhospitalisation($type);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function validerhospitalisation()
|
|
{
|
|
$numeroChambre = $this->requete->getParametreFormulaire("numeroChambre");
|
|
|
|
$this->prestation->validerhospitalisation();
|
|
|
|
// $this->executerAction("index");
|
|
}
|
|
|
|
public function supprimeacte()
|
|
{
|
|
|
|
$this->prestation->supprimeactesansprix();
|
|
|
|
// $this->executerAction("index");
|
|
}
|
|
} |