370 lines
17 KiB
PHP
370 lines
17 KiB
PHP
<?php $this->titre = "INTER-SANTE - Hospitalisation";
|
|
$numeroBonHospitalisation = $feuillemaladie['numeroBonHospitalisation'];
|
|
$facture = $feuillemaladie['facture'];
|
|
$dateFinHospit = $feuillemaladie['dateFinHospit'];
|
|
$dateDebutHospit = $feuillemaladie['dateDebutHospit'];
|
|
|
|
$badcodeGestionBon = "1";
|
|
$tab_gestion_bon = array("0", "1", "2");
|
|
if (in_array($codeGestionBon, $tab_gestion_bon))
|
|
{
|
|
$badcodeGestionBon = "0";
|
|
}
|
|
|
|
$agePrescription = $this->nettoyer($feuillemaladie['agePrescription']);
|
|
$bonCaduc = $this->nettoyer($feuillemaladie['bonCaduc']);
|
|
|
|
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
|
|
|
|
if($modeSaisieFacture=="1")
|
|
{
|
|
$bonCaduc = "0";
|
|
}
|
|
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<legend> <?= _("Hospitalisation") ?> </legend>
|
|
|
|
<input class="sr-only" id="badcodeGestionBon" name="badcodeGestionBon" type="text" value= "<?= $badcodeGestionBon ?>" >
|
|
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "<?= $bonCaduc ?>" >
|
|
|
|
<?php if ($numeroBonHospitalisation<="0" && $badcodeGestionBon=="1") : ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("REVOIR LE TYPE DE GESTION DES BONS") ?> </H4>
|
|
</div>
|
|
<?php else: ?>
|
|
<input class="sr-only" id="facture" name="facture" type="text" value= "<?= $facture ?>" >
|
|
<input class="sr-only" id="dateFinHospit" name="dateFinHospit" type="text" value= "<?= $dateFinHospit ?>" >
|
|
<input class="sr-only" id="numeroBonHospitalisation" name="numeroBonHospitalisation" type="text" value= "<?= $numeroBonHospitalisation ?>" >
|
|
|
|
<input class="sr-only" type="text" id="nbBonsOrd" name="nbBonsOrd" Value="<?= $nbBonsOrd ?>" >
|
|
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > <?= _("Bons Disponibles") ?> </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $nbBonsOrd ?>" readonly > </td>
|
|
|
|
<td width="15%" align="center" > <?= _("Gestion") ?> </td>
|
|
<td>
|
|
<?php if($badcodeGestionBon=="1") : ?>
|
|
<input class="form-control" style="text-align: center; font-size:10pt; background-color: red;color:white;" Value="<?= _("INCONNU") ?>" readonly >
|
|
<?php else: ?>
|
|
<input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $typeGestionbon ?>" readonly >
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="infosbon">
|
|
<!-- debut new -->
|
|
<?php if($codeGestionBon!="0"): ?>
|
|
<?php if ($numeroBonHospitalisation>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > <?= _("Bon Hospit") ?> </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonHospitalisation ?>" readonly > </td>
|
|
|
|
<td width="15%" > </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td align='center' class="alert alert-danger" style="height:30px; padding:5px;"> <?= _("Dejà facturée !") ?> </td>
|
|
<?php elseif($bonCaduc!="1"): ?>
|
|
<td> <button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popAjoutChambre" style='font-size:10pt;' > <?= _("Ajouter une chambre...") ?> </button> </td>
|
|
<?php else: ?>
|
|
<td> <button type="button" disabled class="form-control btn btn-primary" style='font-size:10pt;' > <?= _("Ajouter une chambre...") ?> </button> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="1">
|
|
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="1">
|
|
<input class="sr-only" type="text" id="numeroBon" name="numeroBon" value="1">
|
|
|
|
<?php if($codeGestionBon=="1" && $nbBonsOrd<1): ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
|
|
</div>
|
|
<?php else: ?>
|
|
|
|
<?php if ($facture!="1" && $bonCaduc!="1"): ?>
|
|
<input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrerhospitalisation();" style='font-size:10pt;' >
|
|
<?php else: ?>
|
|
<input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" disabled style='font-size:10pt;' >
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<!-- Fin new -->
|
|
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="">
|
|
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="0">
|
|
<?php if ($numeroBonHospitalisation>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > <?= _("Bon Hospit") ?> </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonHospitalisation ?>" readonly > </td>
|
|
|
|
<td width="15%" > </td>
|
|
<?php if ($facture=="1"): ?>
|
|
<td align='center' class="alert alert-danger" style="height:30px; padding:5px;" > <?= _("Dejà facturée !") ?> </td>
|
|
<?php elseif($bonCaduc!="1"): ?>
|
|
<td> <button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popAjoutChambre" style='font-size:10pt;' > <?= _("Ajouter une chambre...") ?> </button> </td>
|
|
<?php else: ?>
|
|
<td> <button type="button" disabled class="form-control btn btn-primary" style='font-size:10pt;' > <?= _("Ajouter une chambre...") ?> </button> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<?php if($nbBonsOrd<1): ?>
|
|
<tr>
|
|
<input class="sr-only" type="number" id="numeroBon" name="numeroBon" required >
|
|
<td>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php else: ?>
|
|
<tr>
|
|
<td width="10%" > <?= _("Numéro Bon") ?> </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonHospitalisation ?>" readonly > </td>
|
|
<?php elseif($bonCaduc!="1"): ?>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" required
|
|
onChange="ajaxinfosbonhospitalisation();" onkeypress="javascript:ctrlkeypress_numeroBon(event);" autofocus ></td>
|
|
<?php else: ?>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" readonly ></td>
|
|
<?php endif; ?>
|
|
|
|
|
|
<td width="15%" > </td>
|
|
<td><input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" disabled style='font-size:10pt;' ></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($msgErreur)): ?>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:30px; padding:5px;" >
|
|
<H4><?= $msgErreur ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div id ="div_wait">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php if($bonCaduc=="1") : ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center; margin-bottom:5px;" >
|
|
<H4> <?= " Age => ".$agePrescription . " "._("jours") . " => " . _("BON CADUC") ?> </H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div id="div_chambre">
|
|
<?php if ($numeroBonHospitalisation>"0") : ?>
|
|
<legend> <?= _("Chambres occupées") ?> </legend>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
|
|
<thead>
|
|
<tr>
|
|
<th> <?= _("Libellé") ?> </th>
|
|
<th width="7%" style="text-align:center"> <?= _("Prix") ?> </th>
|
|
<th width="7%" style="text-align:center"> <?= _("Début") ?> </th>
|
|
<th width="7%" style="text-align:center"> <?= _("Fin") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Durée") ?> </th>
|
|
<th width="7%" style="text-align:center"> Total </th>
|
|
<th width="7%" style="text-align:center"> <?= _("T M") ?> </th>
|
|
<th width="7%" style="text-align:center"> <?= _("A Remb") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Suppr") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4" style='text-align:center'> Total</td>
|
|
<td align='center'><?= $this->nettoyer($totalchambres['duree']) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($totalchambres['fraisReel'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($totalchambres['montantTm'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($totalchambres['montantArembourser'])) ?></td>
|
|
<td> </td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
<?php foreach ($chambres as $chambre):
|
|
$idChambre=$this->nettoyer($chambre['id']);
|
|
$ententePrealable=$this->nettoyer($chambre['ententePrealable']);
|
|
$autorisation=$this->nettoyer($chambre['autorisation']);
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$libelleChambre = $this->nettoyer($chambre['libelleChambreEng']);
|
|
}
|
|
else
|
|
{
|
|
$libelleChambre = $this->nettoyer($chambre['libelleChambre']);
|
|
}
|
|
?>
|
|
<?php if($ententePrealable=='2' || $autorisation=='2'): ?>
|
|
<tr valign="top" style="background-color: yellow;">
|
|
<?php elseif($ententePrealable=='1' || $autorisation=='1'): ?>
|
|
<tr valign="top" style="background-color: #00ff00;">
|
|
<?php elseif($ententePrealable=='9' || $autorisation=='9'): ?>
|
|
<tr valign="top" style="background-color: red;color:white;">
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
|
|
<td> <?= $libelleChambre ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['valeurActe'])) ?> </td>
|
|
<td align='center'> <?= dateLang($this->nettoyer($chambre['debut'])) ?> </td>
|
|
<td align='center'> <?= dateLang($this->nettoyer($chambre['fin'])) ?> </td>
|
|
<td align='center'> <?= $this->nettoyer($chambre['quantite']) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['montantArembourser'])) ?> </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td> </td>
|
|
<?php else: ?>
|
|
<?php if ($bonCaduc!="1") : ?>
|
|
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_chambre('<?= $idChambre ?>');"> </td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="9" height="8"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<div class="modal fade" id="popAjoutChambre" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button id="btn_close_pop" name="btn_close_pop" type="button" class="close" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h3 class="modal-title"> <?= _("Ajouter une chambre") ?> </h3>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_ajout_chambre">
|
|
<form id="frmchambre" name="frmchambre" method="post" >
|
|
|
|
<input class="sr-only" type="text" id="codeTypePrestation" name="codeTypePrestation" value="HOSP">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="15%" > <?= _("T M") ?> </td>
|
|
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="number" id="tauxCouverture" name="tauxCouverture" value="<?= $_SESSION['p_tm_C'] ?>" readonly ></td>
|
|
|
|
<td width="15%" align="center"> <?= _("Chambre") ?> </td>
|
|
<td colspan="3">
|
|
<div id="listeacte">
|
|
<SELECT class="form-control" id="codeActe" NAME="codeActe" required onChange="ajaxprixchambre();" style='font-size:10pt;' required autofocus >
|
|
<?php liste_options($acte,""); ?>
|
|
</SELECT>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> <?= _("Début") ?> </td>
|
|
<td > <INPUT onChange="claculerfinchambre();" style='font-size:10pt;' class="form-control datepicker" TYPE="text" id="debut" NAME="debut" Value="<?= dateLang($dateDebutHospit) ?>" required style='font-size:10pt;' ></td>
|
|
|
|
<td align="center"> <?= _("Durée") ?> </td>
|
|
<td width="15%" >
|
|
<input class="form-control" type="number" id="quantite" name="quantite" value="1" style="text-align: center; font-size:10pt;'"
|
|
onBlur="ajax_changer_duree_chambre();" >
|
|
</td>
|
|
|
|
<td width="15%" align="center" > <?= _("Fin") ?> </td>
|
|
<td width="20%" > <INPUT style='font-size:10pt;' class="form-control datepicker" TYPE="text" id="fin" NAME="fin" value="<?= dateCouranteLang($_SESSION['p_lang']) ?>" required disabled > </td>
|
|
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="infosacte" style='font-size:10pt;'>
|
|
<input class="sr-only" type="number" id="prixActe" name="prixActe" value="0">
|
|
<input class="sr-only" type="number" id="valeurActe" name="valeurActe" value="0">
|
|
<input class="sr-only" type="number" id="montantTm" name="montantTm" value="0">
|
|
<input class="sr-only" type="number" id="aRembourser" name="aRembourser" value="0">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="15%" > <?= _("Prix") ?> </td>
|
|
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly> </td>
|
|
|
|
<td width="15%" align="center"> Total </td>
|
|
<td width="15%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
|
|
|
|
<td width="15%" align="center"> <?= _("T M") ?> </td>
|
|
<td width="20%" align="center" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> <?= _("A Remb") ?> </td>
|
|
<td > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
|
|
|
|
<td colspan="2"> </td>
|
|
|
|
<td align="center"> <?= _("No Chambre") ?> </td>
|
|
<td> <input id="numeroChambre" name="numeroChambre" class="form-control" style="text-align: center; font-size:10pt;'" type="text"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td colspan="5"><input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" style='font-size:10pt;' disabled ></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div id="div_fraisExclu">
|
|
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
|
|
</div>
|
|
|
|
<div id="div_test">
|
|
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|