129 lines
4.4 KiB
PHP
129 lines
4.4 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Detailtarifacte.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
require_once 'Modele/Prescription.php';
|
|
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
|
|
|
class ControleurAjaxselectactesmedicaux extends Controleur {
|
|
private $acte;
|
|
private $prestation;
|
|
private $prescription;
|
|
private $garantie;
|
|
|
|
public function __construct() {
|
|
$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['codeFamilleActeMed'] = $codeFamilleActe;
|
|
|
|
|
|
if($codeFamilleActe !=""){
|
|
$codeGarantie = $this->prescription->getGarantieFamilleActe($codeFamilleActe);
|
|
}else{
|
|
$codeGarantie = "";
|
|
}
|
|
|
|
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
|
|
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
|
|
|
|
$datePrestation = $this->prescription->getDateSurvenance($numeroFeuilleMaladie); //date('Y-m-d');
|
|
|
|
$_SESSION['p_datePrestation'] = $datePrestation;
|
|
|
|
|
|
$actes = $this->acte->geatactesexamensselection($codeFamilleActe, $datePrestation);
|
|
|
|
if(isset($_SESSION['codeActe']) && $_SESSION['codeActe'] !=""){
|
|
$codeActe = $_SESSION['codeActe'];
|
|
$tm = $this->acte->ticketModerateurDefinitif($codeGarantie, $codeActe, $datePrestation);
|
|
}else{
|
|
$tm = $this->acte->ticketModerateurDefinitif($codeGarantie, "", $datePrestation);
|
|
}
|
|
|
|
$tauxCouverture = (100-$tm)."%";
|
|
|
|
//highlight_string("<?php\n\$datas =\n" . var_export($situationGarantie, true) . ";\n>");
|
|
//die();
|
|
|
|
$motifActe = $this->prestation->getmotifacte();
|
|
|
|
$prestations = $this->prestation->getactesmedicauxfeuille($numeroFeuilleMaladie, $codePrestataire);
|
|
$prestations_total = $this->prestation->getactesmedicauxfeuille_total($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$this->genererVueAjax(array('actes' => $actes, 'prestations' => $prestations, 'prestations_total' => $prestations_total,
|
|
'tauxCouverture' => $tauxCouverture, 'motifActe' => $motifActe));
|
|
}
|
|
|
|
public function enregistreractemedical()
|
|
{
|
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
|
$prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique");
|
|
$valeurActe = $prixActe ;
|
|
$quantite = "1";
|
|
$ententePrealable = $this->requete->getParametreFormulaire("ententePrealable");
|
|
$autorisation = "0";
|
|
|
|
$prixTarif = $prixActe ;
|
|
$prixBase = $this->requete->getParametreFormulaire("prixBase", "numerique");
|
|
|
|
$motifActe = $this->requete->getParametreFormulaire("motifActe");
|
|
|
|
$_SESSION['codeActe'] = $codeActe;
|
|
|
|
$datePrestation = $_SESSION['p_datePrestation'];
|
|
$codeGarantie = $this->acte->getGarantieActe($codeActe);
|
|
|
|
$tm = $this->acte->ticketModerateurDefinitif($codeGarantie, $codeActe, $datePrestation);
|
|
|
|
|
|
$this->prestation->enregistreractemedical($codeActe, $quantite, $prixActe, $valeurActe, $ententePrealable, $autorisation, $prixTarif, $prixBase, $motifActe, $tm);
|
|
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function supprimeracte()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
$codeTypePrestation = $this->requete->getParametre("codeTypePrestation");
|
|
|
|
$this->prestation->supprimeracteselect($idPrestationactes, $codeTypePrestation);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majquantite()
|
|
{
|
|
$idPrestationactes = $this->requete->getParametre("idPrestationactes");
|
|
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
|
|
|
|
$this->prestation->majquantite($idPrestationactes, $quantite);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majgestionacte()
|
|
{
|
|
$nbreActesPrescrits = $this->requete->getParametreFormulaire("nbreActesPrescrits", "numerique");
|
|
|
|
$this->prestation->majgestionacte($nbreActesPrescrits);
|
|
|
|
}
|
|
|
|
public function majmotifacte()
|
|
{
|
|
$motifActe = $this->requete->getParametreFormulaire("motifActe");
|
|
|
|
$this->prestation->majmotifacte($motifActe);
|
|
|
|
}
|
|
} |