358 lines
16 KiB
PHP
358 lines
16 KiB
PHP
<?php
|
|
$this->titre = "INTER-SANTE - Prescription Examens";
|
|
|
|
$numeroBonExamen = $examen['numeroBonExamen'];
|
|
$numeroExamen = $examen['numeroExamen'];
|
|
$facture = $examen['facture'];
|
|
$_SESSION['p_numeroBonExamen_C'] = $numeroBonExamen;
|
|
$_SESSION['p_numeroExamen_C'] = $numeroExamen;
|
|
|
|
$badcodeGestionBon = "1";
|
|
$tab_gestion_bon = array("0", "1", "2");
|
|
if (in_array($codeGestionBon, $tab_gestion_bon))
|
|
{
|
|
$badcodeGestionBon = "0";
|
|
}
|
|
$actVisible = $_SESSION['p_actVisible'];
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$libelleCarence = "Wait Period";
|
|
}
|
|
else
|
|
{
|
|
$libelleCarence = "Carence";
|
|
}
|
|
|
|
$agePrescription = $this->nettoyer($examen['agePrescription']);
|
|
$bonCaduc = $this->nettoyer($examen['bonCaduc']);
|
|
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
|
|
|
|
if($modeSaisieFacture=="1")
|
|
{
|
|
$bonCaduc = "0";
|
|
}
|
|
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<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 ($numeroBonExamen<="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: ?>
|
|
<button class="sr-only" id="btn_pop_tarif" name="btn_pop_tarif" type="button" data-toggle="modal" data-target="#popTarif" style='font-size:10pt;' > </button>
|
|
<input class="sr-only" id="codeTypePrestation" name="codeTypePrestation" type="text" value="EXAM">
|
|
|
|
<input class="sr-only" id="facture" name="facture" type="text" value= "<?= $facture ?>" >
|
|
<input class="sr-only" id="numeroBonExamen" name="numeroBonExamen" type="text" value= "<?= $numeroBonExamen ?>" >
|
|
<input class="sr-only" id="codeMedecin" name="codeMedecin" type="text" value= "<?= $examen['codeMedecin'] ?>">
|
|
|
|
<input class="sr-only" type="text" id="nbBonsOrd" name="nbBonsOrd" Value="<?= $nbBonsOrd ?>" >
|
|
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
|
|
|
|
<?php if ($numeroBonExamen>"0") : ?>
|
|
<legend><?= _("Prescription Examens") ?></legend>
|
|
<?php else: ?>
|
|
<legend> <?= _("Nouvelle prescription Examens") ?> </legend>
|
|
<?php endif; ?>
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > Date Prescription </td>
|
|
<td width="24%" > <INPUT class="form-control" TYPE="text" value="<?= dateLang($this->nettoyer($examen['datePrescription'])) ?>" readonly style="text-align: center; font-size:10pt;" > </td>
|
|
|
|
<td width="15%" align="center"> <?= _("Médecin") ?> </td>
|
|
<td>
|
|
<?php if ($numeroBonExamen>"0" or $facture=="1") : ?>
|
|
<INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($examen['medecinPrescription']) ?>" readonly style='font-size:10pt;'>
|
|
<?php else: ?>
|
|
<button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popRechercheMedecin" style='font-size:10pt;' ><span id="nomMedecin" name="nomMedecin"> <?= $this->nettoyer($examen['medecinPrescription']) ?> </span></button>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<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 ($numeroBonExamen>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > <?= _("No Bon") ?> </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="<?= $numeroBonExamen ?>" readonly > </td>
|
|
|
|
<td width="15%" > </td>
|
|
|
|
<?php if ($facture!="1" && $bonCaduc!="1"): ?>
|
|
<td> <button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popRechercheActe" style='font-size:10pt;' > <?= _("Rechercher Acte...") ?> </button> </td>
|
|
<?php else: ?>
|
|
<td> <input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" disabled style='font-size:10pt;' > </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"): ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("Dejà facturée !") ?> </H4>
|
|
</div>
|
|
<?php elseif($bonCaduc!="1"): ?>
|
|
<input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrerprescriptionexamen();" style='font-size:10pt;' >
|
|
<?php else: ?>
|
|
<input id="btn_enreg" name="btn_enreg" disabled class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" 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 ($numeroBonExamen>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > <?= _("No Bon") ?> </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="<?= $numeroBonExamen ?>" readonly > </td>
|
|
|
|
<td width="15%" > </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("Dejà facturée !") ?> </H4>
|
|
</div>
|
|
<?php elseif($bonCaduc!="1"): ?>
|
|
<td> <button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popRechercheActe" style='font-size:10pt;' > <?= _("Rechercher Acte...") ?> </button> </td>
|
|
<?php else: ?>
|
|
<td> <button type="button" class="form-control btn btn-primary" disabled style='font-size:10pt;' > <?= _("Rechercher Acte...") ?> </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%" > <?= _("No Bon") ?> </td>
|
|
<?php if ($facture=="1"): ?>
|
|
<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="<?= $numeroBonExamen ?>" 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="ajaxinfosbonprescriptionexamen();" 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>
|
|
|
|
<?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="examens">
|
|
<?php if ($numeroBonExamen>"0") : ?>
|
|
<legend> <?= _("Examens prescrits") ?> </legend>
|
|
|
|
<?php $nbExamens = 0; ?>
|
|
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th width="50%" style="text-align:center" > <?= _("Acte") ?> </th>
|
|
<th style="text-align:center" > <?= _("Famille Actes") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Suppr") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($detailexamens as $detailexamen):
|
|
$idExamen = $this->nettoyer($detailexamen['id']);
|
|
$livre = $this->nettoyer($detailexamen['livre']);
|
|
$ententePrealable = $this->nettoyer($detailexamen['ententePrealable']);
|
|
$ajLabo = $this->nettoyer($detailexamen['ajLabo']);
|
|
$nbExamens++;
|
|
?>
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<tr style="background-color: yellow;" >
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<tr style="background-color: #00ff00;" >
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<tr style="background-color: red; color:white;" >
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
|
|
<td align='center'>
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $this->nettoyer($detailexamen['libelleActe']) ?>
|
|
<?php else: ?>
|
|
<?= $this->nettoyer($detailexamen['codeActe']) ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td align='center'> <?= $this->nettoyer($detailexamen['libelleFamilleActe']) ?> </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td> </td>
|
|
<?php else: ?>
|
|
<?php if ($livre!="1" && $ajLabo<>"1" && $bonCaduc!="1") : ?>
|
|
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_examen('<?= $idExamen ?>');"> </td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<input class="sr-only" type="text" id="nbExamens" name="nbExamens" value="<?= $nbExamens ?>" >
|
|
|
|
<div class="modal fade" id="popRechercheActe" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button id="btn_close_pop_acte" name="btn_close_pop" type="button" class="close" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h4 class="modal-title"> <?= _("Rechercher un Acte...") ?> </h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_liste_actes_possibles" onkeypress="javascript:ctrlkeypress_examens_possibles(event);">
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center"> Code </th>
|
|
<th style="text-align:center"> <?= _("Famille") ?> </th>
|
|
<th style="text-align:center" > <?= _("Acte") ?> </th>
|
|
<th style="text-align:center" > <?= _("Prix") ?> </th>
|
|
<th style="text-align:center" > <?= _("Accord") ?> </th>
|
|
<th style="text-align:center" > <?= _("Exclu") ?> </th>
|
|
<th style="text-align:center" > <?=$libelleCarence?> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="3"><input type="text" class="form-control" id="libelleActeSearch" name="libelleActeSearch" style='font-size:10pt;' ></td>
|
|
<td colspan="4"><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Rechercher...") ?>" onclick="javascript:afficher_pop_recherche_examens_possibles();" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop_acte" name="close_pop_acte" type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="modal fade" id="popRechercheMedecin" 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>
|
|
<h4 class="modal-title"><?= _("Rechercher un Médecin...") ?></h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_listemedecins" onkeypress="javascript:ctrlkeypress_medecin(event);">
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center" width="15%" > Code </th>
|
|
<th width="50%" style="text-align:center" > <?= _("Nom contenant...") ?> </th>
|
|
<th style="text-align:center" > <?= _("Spécialité") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><input type="text" class="form-control" id="noOrdreMedecin" name="noOrdreMedecin" autofocus style='font-size:10pt;' ></td>
|
|
<td><input type="text" class="form-control" id="nomsearch" name="nomsearch" autofocus style='font-size:10pt;' ></td>
|
|
<td><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Rechercher...") ?>" onclick="javascript:afficher_pop_recherche_medecin();" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop" name="close_pop" type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|