181 lines
8.0 KiB
PHP
181 lines
8.0 KiB
PHP
<div id="medicaments">
|
|
<?php
|
|
$numeroBonOrdonnance = $prescription['numeroBonOrdonnance'];
|
|
$nbMedicamentSaisie = $prescription['nbMedicamentSaisie'];
|
|
$hospitalisation = $_SESSION['p_hospitalisation_C'];
|
|
$actVisible = $_SESSION['p_actVisible'];
|
|
$facture = $prescription['facture'];
|
|
|
|
if ($numeroBonOrdonnance>"0") :
|
|
?>
|
|
|
|
<input class="sr-only" type="text" id="nbMedicamentSaisie" name="nbMedicamentSaisie" value="<?= $nbMedicamentSaisie ?>" >
|
|
|
|
<legend> <?= _("Médicaments prescrits") ?> </legend>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center"> <?= _("Libellé") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Unité") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Valeur") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("Frais") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("T M") ?> </th>
|
|
<th width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Suppr") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Bon") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Rempl") ?> </th>
|
|
<th style="text-align:center" > <?= _("Accord") ?> </th>
|
|
<th colspan="2" width="8%" style="text-align:center"> <?= _("Rempl") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4" style='text-align:center'> Total</td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReel'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['montantTm'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourser'])) ?></td>
|
|
<td colspan="6"> </td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
<?php foreach ($detailprescriptions as $detailprescription):
|
|
$idMedicament =$this->nettoyer($detailprescription['id']);
|
|
$livre =$this->nettoyer($detailprescription['livre']);
|
|
$substituable = $this->nettoyer($detailprescription['substituable']);
|
|
$substitue = $this->nettoyer($detailprescription['substitue']);
|
|
$nomSubstitut = $this->nettoyer($detailprescription['nomSubstitut']);
|
|
$codeMedicament = $this->nettoyer($detailprescription['codeMedicament']);
|
|
$libelleMedicament = $this->nettoyer($detailprescription['libelleMedicament']);
|
|
$ajPharmacie = $this->nettoyer($detailprescription['ajPharmacie']);
|
|
$ententePrealable =$this->nettoyer($detailprescription['ententePrealable']);
|
|
$medicamentRemplace = $this->nettoyer($detailprescription['medicamentRemplace']);
|
|
|
|
if($actVisible!="1")
|
|
{
|
|
$libelleMedicament = $codeMedicament;
|
|
}
|
|
?>
|
|
<?php if($ajPharmacie=="1") : ?>
|
|
<tr valign="top" style="background-color: rgb(0, 142, 142);">
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
|
|
<?php if($ententePrealable=='2' || $ententePrealable=='3'): ?>
|
|
<td align='center' style="background-color: yellow;"> <?= $libelleMedicament ?> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;"> <?= $libelleMedicament ?> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td align='center' style="background-color: red;color:white;"> <?= $libelleMedicament ?> </td>
|
|
<?php else: ?>
|
|
<td align='center'> <?= $libelleMedicament ?> </td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'> <?= $this->nettoyer($detailprescription['unite']) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailprescription['valeurActe'])) ?> </td>
|
|
|
|
<td align='center'>
|
|
<?php if ($livre!="1" && $ajPharmacie<>"1") : ?>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['quantite']) ?>"
|
|
onBlur="ajax_maj_qte_medicament('<?=$idMedicament?>', this.value, this);">
|
|
<?php else: ?>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['quantite']) ?>" readonly >
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td align='center'> <?= format_N($this->nettoyer($detailprescription['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailprescription['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailprescription['montantArembourser'])) ?> </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td> </td>
|
|
<?php else: ?>
|
|
<?php if ($livre!="1" && $ajPharmacie<>"1") : ?>
|
|
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_medicament('<?= $idMedicament ?>');"> </td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'> <?= $this->nettoyer($detailprescription['numeroBonOrdonnance']) ?> </td>
|
|
<td align='center'> <?= $this->nettoyer($detailprescription['numeroRemplacement']) ?> </td>
|
|
|
|
<?php if($ententePrealable<>"0"): ?>
|
|
<td align='center'> <input type="checkbox" checked disabled></td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" disabled></td>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($facture!="1"): ?>
|
|
<td colspan="2"> </td>
|
|
<?php else: ?>
|
|
<?php if ($medicamentRemplace=="1") : ?>
|
|
<td> <input class = "form-control btn btn-primary" type="button" value="Cons" onClick="javascript:consulter_remplacer_medicament('<?= $numeroBonOrdonnance ?>');"> </td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($livre!="1") : ?>
|
|
<td> <input class = "form-control btn btn-warning" type="button" value="Rempl" onClick="javascript:init_remplacer_medicament('<?= $idMedicament ?>');"> </td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="13" height="8"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="modal fade" id="popRechercheMedicament" 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édicament...") ?></h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_listemedicament" onkeypress="javascript:ctrlkeypress(event);">
|
|
<?php if ($nbMedicamentSaisie>=$_SESSION['p_nbMedicamentMax'] && $hospitalisation!="1"): ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px;">
|
|
<H4> <?= _("Attention! Maximum de médicaments atteint!") ?></H4>
|
|
</div>
|
|
<?php else: ?>
|
|
<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="10%" > Code </th>
|
|
<th style="text-align:center" ><?= _("Nom contenant...") ?> </th>
|
|
<th style="text-align:center" > <?= _("Prix") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2"><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_medicament();" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
</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>
|