a
This commit is contained in:
parent
67946c7668
commit
7412d16cce
63
Controleur/ControleurAjaxconstante.php
Executable file
63
Controleur/ControleurAjaxconstante.php
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Beneficiaire.php';
|
||||
|
||||
class ControleurAjaxconstante extends Controleur {
|
||||
private $beneficiaire;
|
||||
|
||||
public function __construct() {
|
||||
$this->beneficiaire = new Beneficiaire();
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire");
|
||||
$beneficiaire = $this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire);
|
||||
|
||||
$datePriseConstante = date('Y-m-d');
|
||||
|
||||
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
||||
|
||||
$constantes = $this->beneficiaire->getconstantebeneficiaire($idBeneficiaire, $codePrestataire, $datePriseConstante);
|
||||
$historiques = $this->beneficiaire->gethistoriqueconstantebeneficiaire($idBeneficiaire);
|
||||
|
||||
$this->genererVueAjax(array(
|
||||
'beneficiaire' => $beneficiaire,
|
||||
'constantes' => $constantes,
|
||||
'historiques' => $historiques
|
||||
));
|
||||
}
|
||||
|
||||
public function enregistrer()
|
||||
{
|
||||
$idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire");
|
||||
$temperature = $this->requete->getParametreFormulaire("temperature");
|
||||
$poids = $this->requete->getParametreFormulaire("poids");
|
||||
$taille = $this->requete->getParametreFormulaire("taille");
|
||||
$imc = $this->requete->getParametreFormulaire("imc");
|
||||
$systolique = $this->requete->getParametreFormulaire("systolique");
|
||||
$diastolique = $this->requete->getParametreFormulaire("diastolique");
|
||||
$pouls = $this->requete->getParametreFormulaire("pouls");
|
||||
$saturationOxygene = $this->requete->getParametreFormulaire("saturationOxygene");
|
||||
|
||||
$datePriseConstante = date('Y-m-d');
|
||||
|
||||
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
||||
|
||||
$numeroConstante = $this->beneficiaire->getnumeroconstantebeneficiaire($idBeneficiaire, $codePrestataire, $datePriseConstante);
|
||||
|
||||
|
||||
if($numeroConstante=="0"){
|
||||
$this->beneficiaire->creerconstantebeneficiaire($idBeneficiaire,$codePrestataire,$datePriseConstante,$temperature,
|
||||
$poids,$taille,$imc,$systolique,$diastolique,$pouls,$saturationOxygene);
|
||||
|
||||
}else{
|
||||
$this->beneficiaire->majconstantebeneficiaire($idBeneficiaire,$codePrestataire,$datePriseConstante,$temperature,
|
||||
$poids,$taille,$imc,$systolique,$diastolique,$pouls,$saturationOxygene,
|
||||
$numeroConstante);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
169
Vue/Ajaxconstante/index.php
Executable file
169
Vue/Ajaxconstante/index.php
Executable file
|
|
@ -0,0 +1,169 @@
|
|||
<?php
|
||||
$temperature = is_array($constantes)? $this->nettoyer($constantes['temperature']):"";
|
||||
$poids = is_array($constantes)? $this->nettoyer($constantes['poids']):"";
|
||||
$taille = is_array($constantes)? $this->nettoyer($constantes['taille']):"";
|
||||
$imc = is_array($constantes)? $this->nettoyer($constantes['imc']):"";
|
||||
$systolique = is_array($constantes)? $this->nettoyer($constantes['systolique']):"";
|
||||
$diastolique = is_array($constantes)? $this->nettoyer($constantes['diastolique']):"";
|
||||
$pouls = is_array($constantes)? $this->nettoyer($constantes['pouls']):"";
|
||||
$saturationOxygene = is_array($constantes)? $this->nettoyer($constantes['saturationOxygene']):"";
|
||||
?>
|
||||
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button id="btn_close_constante" name="btn_close_constante" type="button" class="close" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
||||
<h4 class="modal-title"><?= _("Prise des constantes hémodynamiques") ?></h4>
|
||||
</div>
|
||||
|
||||
<h4 class="text-center" style="font-weight:bold">
|
||||
<?= $beneficiaire['nomBeneficiaire'].' '.$beneficiaire['prenomsBeneficiaire'].' - '.$beneficiaire['ageBeneficiaire'].' ans - Sexe: '.$beneficiaire['sexe'] ?>
|
||||
</h4>
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="div_constante">
|
||||
<table class="table table-bordered table-condensed table-responsive" style='font-size:12pt;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" width="20%" > Constante </th>
|
||||
<th width="50%" style="text-align:center" > <?= _("Mesure") ?> </th>
|
||||
<th style="text-align:center" width="10%"> <?= _("Unité") ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="required"><?= _("Température") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="temperature" name="temperature" style='font-size:10pt;'
|
||||
value='<?= $temperature ?>' required>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("°C") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="required"><?= _("Poids") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="poids" name="poids" style='font-size:10pt;'
|
||||
value='<?= $poids ?>' required>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("kg") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= _("Taille") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="taille" name="taille" style='font-size:10pt;'
|
||||
value='<?= $taille ?>' onchange="calculImc();">
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("m") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= _("IMC") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="imc" name="imc" style='font-size:10pt;'
|
||||
value='<?= $imc ?>' readonly>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("kg/m2") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= _("Tension Systolique") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="systolique" name="systolique" style='font-size:10pt;'
|
||||
value='<?= $systolique ?>'>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("mmHg") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= _("Tension Diastolique") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="diastolique" name="diastolique" style='font-size:10pt;'
|
||||
value='<?= $diastolique ?>'>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("mmHg") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= _("Pouls") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="pouls" name="pouls" style='font-size:10pt;'
|
||||
value='<?= $pouls ?>'>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("P/mn") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= _("Saturation en Oxygène") ?></td>
|
||||
<td>
|
||||
<input type="text" class="form-control text-center" id="saturationOxygene" name="saturationOxygene" style='font-size:10pt;'
|
||||
value='<?= $saturationOxygene ?>'>
|
||||
</td>
|
||||
<td style="font-weight:bold"><?= _("%") ?></td>
|
||||
</tr>
|
||||
<tr style='background-color:white'>
|
||||
<td colspan="3" height="10"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<button id="btn_enregconstante" name="btn_enregconstante" type="button" class="form-control btn btn-primary"
|
||||
style='font-size:10pt;' onClick="javascript:enregistrer_constante();">
|
||||
<?= _("Enregistrer") ?>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr style="border:none; border-top: 3px double #333; color:#333; overflow: visible; text-align:center; height:5px;">
|
||||
<p><a href="javascript:afficherHistoriqueConstante();" style="font-size:16pt;"><span id="span_constante" title="Cliquez sur le lien pour afficher ou masquer">Afficher</span> l'historique des prises de constantes du patient</a></p>
|
||||
<INPUT class="sr-only" TYPE="text" id="masquerConstante" NAME="masquerConstante" value="1">
|
||||
<div id="div_historique_constante" >
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center'> <?= _("Date") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Prestataire") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Température") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Poids") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Taille") ?> </th>
|
||||
<th style='text-align:center'> <?= _("IMC") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Systolique") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Diastolique") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Pouls") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Oxygène") ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($historiques as $v):
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align="center"> <?= datefr($v['datePriseConstante']) ?> </td>
|
||||
<td><?= $this->nettoyer($v['prestataire']) ?></td>
|
||||
<td align="center"> <?=$v['temperature'] ?> </td>
|
||||
<td align="center"> <?=$v['poids'] ?> </td>
|
||||
<td align="center"> <?=$v['taille'] ?> </td>
|
||||
<td align="center"> <?=$v['imc'] ?> </td>
|
||||
<td align="center"> <?=$v['systolique'] ?> </td>
|
||||
<td align="center"> <?=$v['diastolique'] ?> </td>
|
||||
<td align="center"> <?=$v['pouls'] ?> </td>
|
||||
<td align="center"> <?=$v['saturationOxygene'] ?> </td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr style='background-color:white'>
|
||||
<td colspan="10" height="10"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button id="close_pop_constante" name="close_pop_constante" type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user