prestation/Controleur/ControleurAjaxselectexamens.php
2025-12-05 10:42:46 +00:00

79 lines
2.4 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Examen_temp.php';
require_once 'Modele/Familleacte.php';
require_once 'Modele/Detailexamem.php';
require_once 'Modele/Detailtarifacte.php';
class ControleurAjaxselectexamens extends Controleur {
private $acte;
private $prestation;
private $detailprescription;
public function __construct() {
$this->acte = new Detailtarifacte();
$this->detailprescription = new Detailexamem();
$this->prescription = new Examen_temp();
$codeTypePrestation = "EXAM";
$this->familleacte = (new Familleacte())->getListe($codeTypePrestation);
}
public function index() {
$codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe");
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$actes = $this->acte->geatexamenspossiblesselection($codeFamilleActe);
$prestations = $this->prescription->getdetaillivre();
$prestations_total = $this->prescription->getdetaillivre_total();
$this->genererVueAjax(array('familleacte' => $this->familleacte, 'actes' => $actes, 'prestations' => $prestations, 'prestations_total' => $prestations_total));
}
public function ajouterexamenprescription()
{
$codeActe = $this->requete->getParametreFormulaire("codeActe");
$ententePrealable = $this->requete->getParametreFormulaire("ententePrealable");
$this->detailprescription->ajouterexamenlab($codeActe, $ententePrealable);
$this->executerAction("index");
}
public function retirerexamen()
{
$idExamen = $this->requete->getParametreFormulaire("idExamen");
$this->prescription->retirerexamen($idExamen);
$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 majquantiteexam()
{
$idExamen = $this->requete->getParametreFormulaire("idExamen");
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
$this->detailprescription->majquantiteexam($idExamen, $quantite);
$this->executerAction("index");
}
}