diff --git a/Js/fonctions.js b/Js/fonctions.js index e7f274f..fef26da 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -28856,3 +28856,143 @@ function charger_csrf_token(v_data) // alert("charger_csrf_token => "+v_data); return v_data; } + +// gestion prise de constante => 13/06/2026 +function affiche_constante() +{ + idBeneficiaire = $("#idBeneficiaire").val(); + + donnees = 'idBeneficiaire='+idBeneficiaire; + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxconstante/", + type : 'post', + data: donnees, + error: function(errorData){ + alert("Erreur : "+errorData); + }, + success: function(data) { + $("#div_constante_beneficiaire").html(data); + $('#div_constante_beneficiaire').modal("show"); + }, + complete: function() { + afficherHistoriqueConstante(); + } + }); +} + + + +function enregistrer_constante() +{ + idBeneficiaire = $("#idBeneficiaire").val(); + temperature = $("#temperature").val(); + poids = $("#poids").val(); + taille = $("#taille").val(); + imc = $("#imc").val(); + systolique = $("#systolique").val(); + diastolique = $("#diastolique").val(); + pouls = $("#pouls").val(); + saturationOxygene = $("#saturationOxygene").val(); + + if(idBeneficiaire<="0") + { + v_msg="Bénéficiaire manquant!"; + v_msgEng="Missing beneficiary!"; + alert_ebene(v_msg, v_msgEng); + + return; + } + + if(temperature<=" ") + { + v_msg="Veuillez renseigner la température du patient!"; + v_msgEng="Please fill in the patient's temperature!"; + alert_ebene(v_msg, v_msgEng); + + $("#temperature").focus(); + return; + } + + if(poids<=" ") + { + v_msg="Veuillez renseigner le poids du patient!"; + v_msgEng="Please fill in the patient's weight!"; + alert_ebene(v_msg, v_msgEng); + + $("#poids").focus(); + return; + } + + donnees = 'idBeneficiaire='+idBeneficiaire; + donnees += '&temperature='+temperature; + donnees += '&poids='+poids; + donnees += '&taille='+taille; + donnees += '&imc='+imc; + donnees += '&systolique='+systolique; + donnees += '&diastolique='+diastolique; + donnees += '&pouls='+pouls; + donnees += '&saturationOxygene='+saturationOxygene; + + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxconstante/enregistrer/", + type: 'POST', + data: donnees, + success: function(data) { + + }, + error: function(data) { + }, + complete: function() { + $("#close_pop_constante").click(); + } + }); + +} + +function afficherHistoriqueConstante() +{ + masquerConstante = $("#masquerConstante").val(); + + if(masquerConstante=="1"){ + $('#div_historique_constante').hide(); + $("#masquerConstante").val("0"); + $("#span_constante").text("Afficher"); + + }else{ + $('#div_historique_constante').show(); + $("#masquerConstante").val("1"); + $("#span_constante").text("Masquer"); + } +} + + +function constantes() +{ + window.location.assign($("#racineWeb" ).val()+"Constantes/"); +} + +function retourConstantes() +{ + var vueRetour = $("#vueRetour").val(); + + window.location.assign($("#racineWeb" ).val()+vueRetour+"/"); + +} + +function calculImc() +{ + poids = $("#poids").val(); + taille = $("#taille").val(); + + imc = 0; + + if(poids >" " && taille >" ") + { + imc = parseFloat(poids.replace(",","."))/(parseFloat(taille.replace(",",".")) ** 2); + + $("#imc").val(parseFloat(imc).toFixed(3)); + } + +} diff --git a/Vue/Fichebeneficiaire/index.php b/Vue/Fichebeneficiaire/index.php index 5b53b29..bed700f 100755 --- a/Vue/Fichebeneficiaire/index.php +++ b/Vue/Fichebeneficiaire/index.php @@ -379,6 +379,16 @@ + + + + + + + diff --git a/Vue/gabarit.php b/Vue/gabarit.php index a021247..622448e 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -892,7 +892,7 @@ - +