118 lines
3.7 KiB
PHP
Executable File
118 lines
3.7 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Detailexamem.php';
|
|
require_once 'Modele/Examen_temp.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
|
|
class ControleurAjaxdetaillaboratoire extends Controleur {
|
|
private $prescription;
|
|
private $detailprescription;
|
|
private $prestation;
|
|
|
|
public function __construct() {
|
|
$this->prescription = new Examen_temp();
|
|
$this->detailprescription = new Detailexamem();
|
|
$this->prestation = new Prestationactes();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
$numeroBonExamen = $_SESSION['p_numeroBonExamen_C'];
|
|
$numeroExamen = $_SESSION['p_numeroExamen_C'];
|
|
|
|
$prescription = $this->prescription->getprescription_lab($numeroBonExamen);
|
|
|
|
$detailprescriptions = $this->detailprescription->getdetailprescription_lab($numeroBonExamen);
|
|
|
|
$detailnonlivres = $this->prescription->getdetailnonlivre();
|
|
|
|
$detaillivres = $this->prescription->getdetaillivre();
|
|
|
|
$garantieadherent_temp = $this->prestation->getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp();
|
|
|
|
$this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions,
|
|
'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp,
|
|
'limite_beneficiaire' => $limite_beneficiaire));
|
|
}
|
|
|
|
public function ajouterexamen()
|
|
{
|
|
$idExamen = $this->requete->getParametreFormulaire("idExamen");
|
|
|
|
$this->prescription->ajouterexamen($idExamen);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function ajouterexamentous()
|
|
{
|
|
$this->prescription->ajouterexamentous();
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirerexamen()
|
|
{
|
|
$idExamen = $this->requete->getParametreFormulaire("idExamen");
|
|
|
|
$this->prescription->retirerexamen($idExamen);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirerexamentous()
|
|
{
|
|
$this->prescription->retirerexamentous();
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function enregistrerlaboratoire()
|
|
{
|
|
$user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut");
|
|
$this->prescription->facturerlaboratoire($user_id_substitut);
|
|
}
|
|
|
|
public function annulersubstitutionmedicament()
|
|
{
|
|
$idMedicament = $this->requete->getParametreFormulaire("idMedicament");
|
|
|
|
$this->prescription->annulersubstitutionmedicament($idMedicament);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function enregistrersubstitutionmedicament()
|
|
{
|
|
$idMedicament = $this->requete->getParametreFormulaire("idMedicament");
|
|
$prixSubstitut = $this->requete->getParametreFormulaire("prixSubstitut", "numerique");
|
|
|
|
$this->prescription->enregistrersubstitutionmedicament($idMedicament, $prixSubstitut);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function ajouterexamenprescription()
|
|
{
|
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
|
$ententePrealable = $this->requete->getParametreFormulaire("ententePrealable");
|
|
|
|
$this->detailprescription->ajouterexamenlab($codeActe, $ententePrealable);
|
|
|
|
$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");
|
|
}
|
|
} |