executerRequete($sql, array($numeroPrescription)); return $prescription->fetch(PDO::FETCH_ASSOC); } public function getprescriptionexamen($numeroExamen) { $sql = 'call sp_r_get_prescription_examen(?)'; $prescription = $this->executerRequete($sql, array($numeroExamen)); return $prescription->fetch(PDO::FETCH_ASSOC); } 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)); } public function getprescription_labo($numeroBonExamen, $codePrestataireLivraison) { $sql = 'call sp_p_get_prescription_labo(?, ?);'; $optique = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataireLivraison)); return $optique->fetch(PDO::FETCH_ASSOC); } public function getdetailprescription_labo($numeroBonExamen, $codePrestataireLivraison) { $sql = 'call sp_r_get_detail_prescription_labo(?, ?);'; $optique = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataireLivraison)); return $optique->fetchAll(PDO::FETCH_ASSOC); } public function getprescription_examen_livre($numeroBonExamen, $codePrestataireLivraison, $prestataireLivraison) { $sql = 'call sp_p_get_prescription_examen_livre(?, ?, ?);'; $optique = $this->executerRequete($sql, array($numeroBonExamen, $codePrestataireLivraison, $prestataireLivraison)); return $optique->fetch(PDO::FETCH_ASSOC); } public function getprescription_medicament_livre($numeroBonOrdonnance, $codePrestataireLivraison, $prestataireLivraison) { $sql = 'call sp_p_get_prescription_medicament_livre(?, ?, ?)'; $optique = $this->executerRequete($sql, array($numeroBonOrdonnance, $codePrestataireLivraison, $prestataireLivraison)); return $optique->fetch(PDO::FETCH_ASSOC); } public function getDateSurvenance($numeroFeuilleMaladie) { $sql = 'SELECT `dateSurvenance` FROM `p_feuillemaladie` WHERE `numeroFeuilleMaladie`=?'; $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie))->fetch(PDO::FETCH_ASSOC); return $resultat['dateSurvenance']; } public function getseanceprescrit($numeroPrescriptionKine) { $sql = 'call sp_r_get_prescription_seance(?)'; $prescription = $this->executerRequete($sql, array($numeroPrescriptionKine)); return $prescription->fetch(PDO::FETCH_ASSOC); } public function getseancefeuille($numeroFeuilleMaladie) { $sql = 'call sp_r_prescription_seance_feuillecons(?)'; $prescription = $this->executerRequete($sql, array($numeroFeuilleMaladie)); return $prescription->fetch(PDO::FETCH_ASSOC); } }