49 lines
1.6 KiB
PHP
49 lines
1.6 KiB
PHP
<?php
|
|
require_once 'Framework/Modele.php';
|
|
|
|
class Prescription extends Modele {
|
|
|
|
public function getprescription($numeroPrescription)
|
|
{
|
|
$sql = 'call sp_r_get_prescription(?)';
|
|
|
|
$prescription = $this->executerRequete($sql, array($numeroPrescription));
|
|
|
|
return $prescription->fetch();
|
|
}
|
|
|
|
public function getprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison)
|
|
{
|
|
$sql = 'call sp_p_get_prescription_pha(?, ?)';
|
|
|
|
$optique = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataireLivraison));
|
|
|
|
return $optique->fetch(PDO::FETCH_ASSOC);
|
|
}
|
|
|
|
public function getdetailprescription_pha($numeroBonOrdonnance, $codePrestataireLivraison)
|
|
{
|
|
$sql = 'call sp_r_get_detail_prescription_pha(?, ?)';
|
|
|
|
$optique = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataireLivraison));
|
|
|
|
return $optique->fetchAll(PDO::FETCH_ASSOC);
|
|
}
|
|
|
|
public function getContexteAjaxPrescription($numeroPrescription)
|
|
{
|
|
$_SESSION['numeroPrescription_C'] = $numeroPrescription;
|
|
}
|
|
|
|
public function enregistrerprescription($numeroBon, $codeMedecin)
|
|
{
|
|
$idBeneficiaire = $_SESSION['idBeneficiaire_C'];
|
|
$numeroFeuilleMaladie = $_SESSION['numeroFeuilleMaladie_C'];
|
|
$numeroPrescription = $_SESSION['numeroPrescription_C'];
|
|
$user = $_SESSION['login'];
|
|
|
|
$sql = 'call sp_p_enregistrer_prescription(?, ?, ?, ?, ?, ?)';
|
|
|
|
$this->executerRequete($sql, array($idBeneficiaire, $numeroFeuilleMaladie, $numeroPrescription, $numeroBon, $codeMedecin, $user));
|
|
}
|
|
} |