429 lines
17 KiB
PHP
429 lines
17 KiB
PHP
<?php
|
|
$this->titre = "INTER-SANTE - Examens Médicaux";
|
|
$numeroBonExamen = $prescription['numeroBonExamen'];
|
|
$facture = $prescription['facture'];
|
|
$ajoutPrescriptionExam = ($_SESSION['p_ajoutPrescriptionExam_C']==1) ;
|
|
$actVisible = $_SESSION['p_actVisible'];
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<input class="sr-only" id="facture" name="facture" type="text" value= "<?= $facture ?>" >
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:9pt;' >
|
|
<tbody>
|
|
<tr>
|
|
<td width="7%" > <?= _("Prescript du") ?> </td>
|
|
<td width="10%" > <INPUT class="form-control" TYPE="text" value="<?= dateLang($this->nettoyer($prescription['datePrescription'])) ?>" readonly style="text-align: center; font-size:9pt;" > </td>
|
|
|
|
<td width="7%" align="center"> <?= _("Médecin") ?> </td>
|
|
<td> <INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['medecinPrescription']) ?>" readonly style='font-size:9pt;'> </td>
|
|
|
|
<td width="10%" align="center"> <?= _("Bon Exam") ?> </td>
|
|
<td width="10%"> <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="7%" align="center"> <?= _("Tél Méd") ?> </td>
|
|
<td width="15%"> <INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['telephoneMedecin']) ?>" readonly style='font-size:9pt;'> </td>
|
|
</tr>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<tr>
|
|
<td colspan="8" align='center' class="alert alert-danger" style="font-size:12pt; height:30px; padding:5px;" > <?= _("Dejà facturée !") ?> </td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<?php if($actVisible=="1"): ?>
|
|
<?php if($facture=="0") : ?>
|
|
<?php if($ajoutPrescriptionExam) : ?>
|
|
<button type="button" class="form-control btn btn-primary" onClick="javascript:selectionexamens_cso();" style='font-size:10pt;' > <?= _("Ajouter Examen")."..." ?> </button>
|
|
<?php else: ?>
|
|
<!-- <button type="button" class="form-control btn btn-primary" disabled style='font-size:10pt;' > <?= _("Ajouter Examen")."..." ?> </button> -->
|
|
<button type="button" class="form-control btn btn-primary" onClick="javascript:selectionexamens_cso();" style='font-size:10pt;' > <?= _("Ajouter Examen")."..." ?> </button>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<div id="ordonnance">
|
|
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center"> <?= _("Examens prescrits") ?> </th>
|
|
<th width ="5%" style="text-align:center"> <?= _("Accord") ?> </th>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($detailprescriptions as $detailprescription):
|
|
$livre = $this->nettoyer($detailprescription['livre']);
|
|
$ajLabo = $this->nettoyer($detailprescription['ajLabo']);
|
|
$ententePrealable = $this->nettoyer($detailprescription['ententePrealable']);
|
|
$libelleActe = $this->nettoyer($detailprescription['libelleActe']);
|
|
$codeActe = $this->nettoyer($detailprescription['codeActe']);
|
|
?>
|
|
|
|
<?php if($livre=="1") : ?>
|
|
<tr valign="top" style="color:blue">
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" > <?= $ententePrealable ?> </td>
|
|
<?php else: ?>
|
|
<td align='center' > <?= $ententePrealable ?> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div id="livraison">
|
|
|
|
<div id="non_livre">
|
|
<?php if ($facture=="0"): ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th width="5%" style="text-align:center" > <input class="form-control btn btn-primary" type="button" value=" + + " onClick="javascript:ajouterexamen_tous();" style='font-size:10pt;' > </th>
|
|
<th width="45%" > <?= _("Examens en attente") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Valeur") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Frais") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("T M") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
|
|
<th width ="5%" style="text-align:center"> <?= _("Accord") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($detailnonlivres as $detailnonlivre):
|
|
$idNonLivre=$this->nettoyer($detailnonlivre['id']);
|
|
$valeurActe = $this->nettoyer($detailnonlivre['valeurActe']);
|
|
$ententePrealable = $this->nettoyer($detailnonlivre['ententePrealable']);
|
|
$codeActe = $this->nettoyer($detailnonlivre['codeActe']);
|
|
$libelleActe = $this->nettoyer($detailnonlivre['libelleActe']);
|
|
?>
|
|
<tr valign="top">
|
|
<?php if($valeurActe=="0") : ?>
|
|
<td width="5%" align='center'> </td>
|
|
<?php else: ?>
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" > W </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" > <input type="button" value=" + " onClick="javascript:ajouterexamen('<?= $idNonLivre ?>', '<?= $ententePrealable ?>', '<?= $codeActe ?>');"> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" > R </td>
|
|
<?php else: ?>
|
|
<td width="5%" align='center'> <input type="button" value=" + " onClick="javascript:ajouterexamen('<?= $idNonLivre ?>', '<?= $ententePrealable ?>', '<?= $codeActe ?>');"></td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'> <?= $this->nettoyer($detailnonlivre['quantite']) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['valeurActe'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['montantArembourser'])) ?> </td>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" > <?= $ententePrealable ?> </td>
|
|
<?php else: ?>
|
|
<td align='center' > <?= $ententePrealable ?> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div id="livre">
|
|
|
|
<?php $nbLivre = 0; ?>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th width="50%" > <?= _("Examens effectués") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Valeur") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Frais") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("T M") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
|
|
<th width ="5%" style="text-align:center"> <?= _("Accord") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3" style='text-align:center'> Total </td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourserLivre'])) ?></td>
|
|
<td> </td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
<?php foreach ($detaillivres as $detaillivre):
|
|
$idLivre=$this->nettoyer($detaillivre['id']);
|
|
$ententePrealable = $this->nettoyer($detaillivre['ententePrealable']);
|
|
$libelleActe = $this->nettoyer($detaillivre['libelleActe']);
|
|
$codeActe = $this->nettoyer($detaillivre['codeActe']);
|
|
$nbLivre++;
|
|
?>
|
|
<tr valign="top">
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['quantite'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['valeurActe'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantArembourser'])) ?> </td>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" > <?= $ententePrealable ?> </td>
|
|
<?php else: ?>
|
|
<td align='center' > <?= $ententePrealable ?> </td>
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="8" height="5"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th width="5%" style="text-align:center" > <input class="form-control btn btn-primary" type="button" value=" - - " onClick="javascript:retirerexamen_tous();" style='font-size:10pt;' > </th>
|
|
<th width="45%" > <?= _("A facturer") ?> </th>
|
|
|
|
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Valeur") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Frais") ?> </th>
|
|
|
|
<th width="10%" style="text-align:center"> <?= _("T M") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
|
|
<th width ="5%" style="text-align:center"> <?= _("Accord") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4" style='text-align:center'> Total </td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourserLivre'])) ?></td>
|
|
<td> </td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
<?php foreach ($detaillivres as $detaillivre):
|
|
$idLivre=$this->nettoyer($detaillivre['id']);
|
|
$ententePrealable = $this->nettoyer($detaillivre['ententePrealable']);
|
|
$libelleActe = $this->nettoyer($detaillivre['libelleActe']);
|
|
$codeActe = $this->nettoyer($detaillivre['codeActe']);
|
|
$nbLivre++;
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'> <input type="button" value=" - " onClick="javascript:retirerexamen('<?= $idLivre ?>');"></td>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' >
|
|
<?php if($actVisible=="1"): ?>
|
|
<?= $libelleActe ?>
|
|
<?php else: ?>
|
|
<?= $codeActe ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<td>
|
|
<INPUT style='text-align:center; font-size:8pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($detaillivre['quantite']) ?>"
|
|
onBlur="ajax_maj_qte_examen_cso('<?=$idLivre?>', this.value, this);">
|
|
</td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['valeurActe'])) ?> </td>
|
|
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantArembourser'])) ?> </td>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td align='center' style="background-color: yellow;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;" > <?= $ententePrealable ?> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red; color:white;" > <?= $ententePrealable ?> </td>
|
|
<?php else: ?>
|
|
<td align='center' > <?= $ententePrealable ?> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="8" height="5"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<input class="sr-only" type="text" id="nbLivre" name="nbLivre" value="<?= $nbLivre ?>" >
|
|
</div>
|
|
|
|
<div id="div_fraisExclu">
|
|
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
|
|
</div>
|
|
|
|
<div id="div_test">
|
|
|
|
</div>
|
|
</div>
|
|
|