This commit is contained in:
KANE LAZENI 2026-03-07 01:39:39 +00:00
commit 37b10b8ef6
10 changed files with 419 additions and 22 deletions

View File

@ -32,8 +32,8 @@ body {
}
.navbar-inverse{
background-color: rgba(0,0,255,0.2)
border-color:#080808
background-color: rgba(0,0,255,0.2);
border-color: #080808;
}
.sidebar-nav > li > a {
@ -198,3 +198,53 @@ input[type="button" i], input[type="submit" i], input[type="reset" i], input[typ
{
padding: 1px 1px;
}
.frmSearch {
width: 100%;
padding: 10px;
background: #858585;
}
#element-list {
list-style-type: none;
margin: 0;
padding: 0;
width: 100%;
}
#element-list li {
padding: 10px;
background: #FFF;
border-bottom: #F0F0F0 1px solid;
}
#element-list li:hover {
background:blue !important;
color: #fff !important;
cursor: pointer;
cursor: hand;
}
#searchInput,
#searchInputActe,
#searchInputLienparente {
padding: 10px;
}
.div_selection_list{
position:absolute;
z-index:999;
height:250px;
width:35%;
overflow: auto;
}
#div_selection_acte,
#div_selection,
#div_selection_prestataire{
position:absolute;
z-index:999;
height:250px;
overflow: auto;
width: 87%;
}

View File

@ -0,0 +1,66 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Detailtarifacte.php';
require_once 'Modele/Prestationactes.php';
class ControleurAjaxchargeractesmedicaux extends Controleur {
private $acte;
private $prescription;
public function __construct() {
$this->acte = new Detailtarifacte();
$this->prescription = new Prestationactes();
}
public function index() {
$libelle = $this->requete->getParametreFormulaire("libelle");
if ($libelle=="vide" || $libelle=="") {
$actes = $this->acte->getactesexamenvide();
}else{
$actes = $this->acte->getactesmedicauxpossibles($libelle);
}
$this->genererVueAjax(array('actes' => $actes));
}
public function actecharge()
{
$codeActe = $this->requete->getParametreFormulaire("codeActe");
$acte_charge = $this->acte->chargerinfosacte($codeActe);
$this->genererVueAjax(array('acte_charge' => $acte_charge));
}
}

View File

@ -13,17 +13,17 @@ class ControleurAjaxselectactesmedicaux extends Controleur {
}
public function index() {
$codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe");
//$codeFamilleActe = $this->requete->getParametreFormulaire("codeFamilleActe");
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$actes = $this->acte->geatactesexamensselection($codeFamilleActe);
//$actes = $this->acte->geatactesexamensselection($codeFamilleActe);
$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));
$this->genererVueAjax(array(/*'actes' => $actes, */'prestations' => $prestations, 'prestations_total' => $prestations_total));
}
public function enregistreractemedical()

View File

@ -17602,10 +17602,57 @@ function dataTableSpecialeMini(){
$(function(){
appliquerDataTable();
dataTableSpeciale();
$('.js-example-basic-single').select2();
$('.selectpicker').selectpicker();
});
$('.selectpicker').selectpicker();
$("#div_selection").hide();
$("#searchInput").keyup(debounce(function() {
const libelle = $(this).val().trim();
if (!libelle || libelle.length < 3) {
$("#div_selection").hide();
return;
}
const formHandlers = {
"selectactesmedicaux": {
link: "Ajaxchargeractesmedicaux/",
data: { libelle: libelle }
}
};
const handler = formHandlers[$('#nomForm').val()];
if (!handler) return;
/* Vérification des prérequis si nécessaire
if (handler.preCheck && !handler.preCheck()) {
return;
}
*/
// Préparation des données
const data = typeof handler.data === 'function' ? handler.data() : handler.data;
// Envoi de la requête AJAX
$.ajax({
type: "POST",
url: $("#racineWeb").val() + handler.link,
data: data,
beforeSend: function() {
$("#searchInput").css("background", "#FFF url(Bootstrap/images/loading.gif) no-repeat 165px");
},
success: function(data) {
$("#div_selection").show().html(data);
$("#searchInput").css("background", "#FFF");
},
error: function(xhr, status, error) {
console.error("Erreur lors de la recherche:", error);
$("#searchInput").css("background", "#FFF");
}
});
}, 300));
});
function ajaxinfosboninitconsultation()
{
@ -18588,3 +18635,134 @@ function visibilite_date_rdv()
}
}
// Fonction debounce pour limiter les appels fréquents
function debounce(func, wait, immediate) {
let timeout;
return function() {
const context = this, args = arguments;
const later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
const callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
}
function selectElement(val){
$("#searchInput").val(val);
$("#div_selection").hide();
}
function validate_acte_params(params) {
if (!params.codeMedecin || params.codeMedecin.trim() === "") {
alert_ebene("Veuillez sélectionner un médecin!", "Please select a doctor!");
$("#nomMedecin").focus();
return false;
}
if (!params.codeActe || params.codeActe.trim() === "") {
alert_ebene("Veuillez sélectionner un acte!", "Please select an act!");
return false;
}
if (!params.prixActe || params.prixActe == 0) {
alert_ebene("Veuillez revoir le tarif!", "Please review rate!");
return false;
}
return true;
}
function ajouter_un_acte_selection_new(params) {
// Normalisation entente préalable
if (params.ententePrealable == 1) {
params.ententePrealable = "2";
}
var donnees = {
codeFamilleActe: params.codeFamilleActe,
codeActe: params.codeActe,
codeMedecin: params.codeMedecin,
ententePrealable: params.ententePrealable,
prixActe: params.prixActe,
montantTm: params.montantTm,
aRembourser: params.aRembourser
};
var numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
var donnees_sav = {
codeActe: params.codeActe,
numeroFeuilleMaladie: numeroFeuilleMaladie,
typeMail: "mailententeprealable"
};
$("#div_prestations").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/> Veuillez patienter...</div>');
$.ajax({
url: $("#racineWeb").val() + "Ajaxselectactesmedicaux/enregistreractemedical/",
type: 'post',
data: donnees,
success: function(data) {
maj_fraisexclu_cso();
if (params.ententePrealable == "2") {
preparesms("ententeprealable");
alert_ebene("Demande accord préalable envoyée!", "Request prior agreement sent!");
}
$("#totam_donnees").html(data);
},
complete: function() {
if (params.ententePrealable == "2") {
mettremailattente(donnees_sav);
}
}
});
}
function add_selected_acte_medicaux(controle) {
var str = controle.split(' <==> ');
var codeActe = str[0] || "";
var libelleActe = str[1] || "";
var acteExclu = str[3] || "";
acteExclu = (acteExclu === "Garanti" || acteExclu === "Guaranteed") ? 0 : 1;
if (!libelleActe.trim()) return;
if (acteExclu === 1) {
alert_ebene("Acte non couvert!", "Not covered!");
return;
}
$("#div_patientez").html('<div style="text-align:center; color:#4caf50; font-size:14px;"><i class="fa fa-spinner fa-spin fa-5x"></i></div>');
$.ajax({
url: $("#racineWeb").val() + "Ajaxchargeractesmedicaux/actecharge/",
type: 'post',
data: { codeActe: codeActe },
success: function(data) {
//alert(data);
//$('#div_test_gabarit').html(data);
//return;
$("#div_patientez").html(data);
$("#searchInput").val('');
var params = {
codeActe: codeActe,
prixActe: $("#prixActe").val(),
montantTm: $("#montantTm").val(),
aRembourser: $("#aRembourser").val(),
ententePrealable: $("#ententePrealable").val(),
codeFamilleActe: $("#codeFamilleActe").val(),
codeMedecin: $("#codeMedecin").val()
};
if (validate_acte_params(params)) {
ajouter_un_acte_selection_new(params);
}
}
});
}

View File

@ -318,4 +318,52 @@ class Detailtarifacte extends Modele {
}
}
public function getactesexamenvide() {
$sql = 'call sp_p_actes_examen_vide()';
$resultat = $this->executerRequete($sql);
return $resultat->fetchAll(PDO::FETCH_ASSOC);
}
public function getactesmedicauxpossibles($libelle)
{
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$codeTarifActe = $_SESSION['p_codeTarifActe_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$idAdherent = $_SESSION['p_idAdherent_C'];
$libelle = contruireParamLike($libelle);
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
$sql = 'call sp_p_recherche_actes_medicaux_eng(?, ?, ?, ?, ?);';
}
else
{
$sql = 'call sp_p_recherche_actes_medicaux(?, ?, ?, ?, ?);';
}
$resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie,$codeTarifActe, $libelle, $codePrestataire, $idAdherent));
return $resultat->fetchAll(PDO::FETCH_ASSOC);
}
public function chargerinfosacte($codeActe)
{
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$codeTarifActe = $_SESSION['p_codeTarifActe_C'];
$tm = $_SESSION['p_tm_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$idAdherent = $_SESSION['p_idAdherent_C'];
$sql = 'call sp_p_charger_infosacte_medical(?, ?, ?, ?, ?, ?);';
$resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie,$codeTarifActe, $codeActe,
$codePrestataire, $idAdherent, $tm));
return $resultat->fetch(PDO::FETCH_ASSOC);
}
}

View File

@ -0,0 +1,6 @@
<input class="sr-only" id="codeActe" name="codeActe" type="text" value= "<?= $acte_charge['codeActe'] ?>">
<input class="sr-only" id="prixActe" name="prixActe" type="text" value= "<?= $acte_charge['valeurActe'] ?>">
<input class="sr-only" id="montantTm" name="montantTm" type="text" value= "<?= $acte_charge['montantTm'] ?>">
<input class="sr-only" id="aRembourser" name="aRembourser" type="text" value= "<?= $acte_charge['montantArembourser'] ?>">
<input class="sr-only" id="ententePrealable" name="ententePrealable" type="text" value= "<?= $acte_charge['ententePrealable'] ?>">
<input class="sr-only" id="codeFamilleActe" name="codeFamilleActe" type="text" value= "<?= $acte_charge['codeFamilleActe'] ?>">

View File

@ -0,0 +1,35 @@
<?php
if(!empty($actes)) {
?>
<ul id="element-list">
<?php
foreach($actes as $v) {
if(est_anglophone()){
if (isset($tab[1]) && $tab[1] != "Guaranteed"){
$style = "background-color: red; color:white;";
}elseif (isset($tab[2]) && $tab[2] == "Request Approval"){
$style = "background-color: yellow;";
}else{
$style = "background-color: white;";
}
}else{
if (isset($tab[1]) && $tab[1] != "Garanti"){
$style = "background-color: red; color:white;";
}elseif (isset($tab[2]) && $tab[2] == "Demander Accord"){
$style = "background-color: yellow;";
}else{
$style = "background-color: white;";
}
}
?>
<li style="<?php echo $style; ?>" onClick="selectElement('<?php echo $v["libelle"]; ?>');add_selected_acte_medicaux('<?php echo $v["code"]." <==> ".$v["libelle"]; ?>');"><?php echo $v["libelle"]; ?></li>
<?php } ?>
</ul>
<?php
} else{
?>
<marquee behavior="scroll" direction="left" scrollamount="10" style="color:white; background-color:red; font-size:14pt; font-weight:bold;">
<?= _("L'acte saisi n'existe pas.") ?>
</marquee>
<?php } ?>

View File

@ -1,7 +1,7 @@
<?php
$actVisible = $_SESSION['p_actVisible'];
?>
<!--
<div id="div_actes" class="col-xs-4" style="padding-right:1px;">
<div id="listeacte">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
@ -55,12 +55,12 @@
</div>
</div>
<div id="div_prestations" class="col-xs-8" >
-->
<div id="div_prestations" class="col-xs-12" >
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="5%" style='text-align:center'> <= </th>
<th width="5%" style='text-align:center'> <?= _("Suppr") ?> </th>
<th style="text-align:center"> <?= _("Acte") ?> </th>
<th style="text-align:center"> <?= _("Valeur") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Qté") ?> </th>
@ -119,7 +119,7 @@
<?php if ($supprimable=="0"): ?>
<td> </td>
<?php else: ?>
<td> <input class = "form-control btn btn-danger" type="button" value="<=" onClick="javascript:supprimer_acte_medical_selection('<?= $idPrestationactes ?>', '<?= $codeTypePrestation ?>');"> </td>
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_acte_medical_selection('<?= $idPrestationactes ?>', '<?= $codeTypePrestation ?>');"> </td>
<?php endif; ?>
<td align='center'> <?= $libelleActe ?> </td>
@ -137,7 +137,5 @@
<td colspan="7" height="8"></td>
</tr>
</tbody>
</table>
</div>

View File

@ -8,6 +8,7 @@
<input class="sr-only" id="codeTypePrestation" name="codeTypePrestation" type="text" value="ACT">
<input class="sr-only" id="codeMedecin" name="codeMedecin" type="text" value= "<?= $_SESSION['p_codeMedecin_C'] ?>">
<INPUT class="sr-only" id="chirurgie_C" name="chirurgie_C" type="text" value="<?= $_SESSION['p_chirurgie_C'] ?>">
<INPUT class="sr-only" id="nomForm" name="nomForm" type="text" value="selectactesmedicaux">
<legend> <?= _("Ajouter un acte médical") ?> </legend>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
@ -23,6 +24,7 @@
</tr>
<!--
<tr>
<td> <?= _("Famille Actes") ?> </td>
<td colspan="3">
@ -32,7 +34,7 @@
</td>
</tr>
<!--
<tr>
<td> <?= _("Acte") ?> </td>
<td colspan="3">
@ -41,6 +43,15 @@
</tr>
-->
<tr>
<td> <?= _("Acte") ?> </td>
<td colspan="3">
<div class="frmSearch">
<input id="searchInput" name="searchInput" style="font-size:11pt; padding-left: 35px;" class="form-control" type="text" placeholder="<?= _("Saisissez le nom de l'acte...") ?>" autofocus required AUTOCOMPLETE="OFF">
<div id="div_selection"></div>
</div>
</td>
</tr>
</tbody>
</table>
@ -82,8 +93,10 @@
</div>
</div>
<div class="row" id="totam_donnees">
<div id="div_patientez"></div>
<div class="row" id="totam_donnees">
<!--
<div id="div_actes" class="col-xs-4" style="padding-right:1px;">
<div id="listeacte">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
@ -96,12 +109,13 @@
</table>
</div>
</div>
-->
<div id="div_prestations" class="col-xs-8" >
<div id="div_prestations" class="col-xs-12" >
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="5%" style='text-align:center'> <= </th>
<th width="5%" style='text-align:center'> <?= _("Suppr") ?> </th>
<th style="text-align:center"> <?= _("Acte") ?> </th>
<th style="text-align:center"> <?= _("Valeur") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Qté") ?> </th>
@ -159,7 +173,7 @@
<?php if ($supprimable=="0"): ?>
<td> </td>
<?php else: ?>
<td> <input class = "form-control btn btn-danger" type="button" value="<=" onClick="javascript:supprimer_acte_medical_selection('<?= $idPrestationactes ?>', '<?= $codeTypePrestation ?>');"> </td>
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_acte_medical_selection('<?= $idPrestationactes ?>', '<?= $codeTypePrestation ?>');"> </td>
<?php endif; ?>
<td align='center'> <?= $libelleActe ?> </td>

View File

@ -16,7 +16,7 @@
<link href="Bootstrap/css/simple-sidebar.css" rel="stylesheet">
<link href="Bootstrap/css/jquery-ui.css" rel="stylesheet">
<link href="Bootstrap/css/style.css?ver=2019.10.10.1" rel="stylesheet">
<link href="Bootstrap/css/style.css?ver=2026.03.03.07" rel="stylesheet">
<link href="Bootstrap/css/datatables.min.css" rel="stylesheet">
@ -26,6 +26,7 @@
<title><?= $_SESSION['p_vue'] ?></title>
<script type="text/javascript">
/*
if (document.addEventListener) {
document.addEventListener('contextmenu', function (e) {
e.preventDefault();
@ -35,6 +36,7 @@
window.event.returnValue = false;
});
}
*/
</script>
</head>
@ -263,7 +265,7 @@ actesHarmonises : <?= $_SESSION['p_actesHarmonises'] ?>
<script src="Js/datepicker-fr.js"></script>
<?php endif; ?>
<script src="Js/fonctions.js?ver=2026.01.16.07"></script>
<script src="Js/fonctions.js?ver=2026.03.03.07"></script>
<script src="Bootstrap/js/timer.jquery.js"></script>