radiantprestation/Vue/Ajaxdetailordonnance/index.php

93 lines
4.3 KiB
PHP

<div id="ordonnance">
<?php
$accesAjoutPh = ($_SESSION['p_accesAjoutPh_C']==1) ;
$accesAjoutPhClient = ($_SESSION['p_accesAjoutPhClient']==1) ;
$ajoutPrescription = ($_SESSION['p_ajoutPrescription_C']==1) ;
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
$nbMedicamentSaisie = $prescription['nbMedicamentSaisie'];
$hospitalisation = $_SESSION['p_hospitalisation_C'];
?>
<?php if($nbMedicamentSaisie<$_SESSION['p_nbMedicamentMax'] or $hospitalisation=="1") : ?>
<table class="table table-responsive table-condensed" style='font-size:10pt;' >
<tbody>
<tr>
<?php if($ajoutPrescription) : ?>
<td> <button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popRechercheMedicament" style='font-size:10pt;' > <?= _("Ajouter Médicament")."..." ?> </button> </td>
<?php else: ?>
<td> <button type="button" class="form-control btn btn-primary" style='font-size:10pt;' disabled > <?= _("Ajouter Médicament")."..." ?> </button> </td>
<?php endif; ?>
<td width="10%" > </td>
<?php if($accesAjoutPh) : ?>
<td> <button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popCreerMedicament" style='font-size:10pt;' > <?= _("Créer Médicament...") ?> </button> </td>
<?php else: ?>
<td> <button type="button" class="form-control btn btn-primary" style='font-size:10pt;' disabled > <?= _("Créer Médicament...") ?> </button> </td>
<?php endif; ?>
<td width="10%" > </td>
<td> <INPUT class="form-control btn btn-info" value="<?= _("GED Ordonnance...") ?>" onclick="javascript:pop_ged_pharmacie();" style='font-size:10pt;' > </td>
</tr>
</tbody>
</table>
<?php else: ?>
<div class="alert alert-danger" style="height:30px; padding:5px;">
<H4> <?= _("Attention! Maximum de médicaments atteint!") ?></H4>
</div>
<?php endif; ?>
<table class="table table-striped table-hover table-condensed table-responsive" style='font-size:9pt;'>
<thead>
<tr>
<th style="text-align:center"> <?= _("Médicaments prescrits") ?> </th>
<th style="text-align:center"> <?= _("Instructions") ?> </th>
<th style="text-align:center"> <?= _("Unité") ?> </th>
<th style="text-align:center"> <?= _("Bon") ?> </th>
<th style="text-align:center"> <?= _("Rempl") ?> </th>
<th style="text-align:center" > <?= _("Accord") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($detailprescriptions as $detailprescription):
$livre = $this->nettoyer($detailprescription['livre']);
$substituable = $this->nettoyer($detailprescription['substituable']);
$substitue = $this->nettoyer($detailprescription['substitue']);
$nomSubstitut = $this->nettoyer($detailprescription['nomSubstitut']);
$libelleMedicament = $this->nettoyer($detailprescription['libelleMedicament']);
$ajPharmacie = $this->nettoyer($detailprescription['ajPharmacie']);
$ententePrealable1=$this->nettoyer($detailprescription['ententePrealable']);
?>
<?php if($ententePrealable1=='2' || $ententePrealable1=='3'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable1=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable1=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<?php if($substituable=="1") : ?>
<td align='center' style="background-color: yellow;"> <?= $libelleMedicament . " => " . $nomSubstitut ?> </td>
<?php else: ?>
<td align='center'> <?= $libelleMedicament ?> </td>
<?php endif; ?>
<td align='center'> <?= $this->nettoyer($detailprescription['instructions']) ?> </td>
<td align='center'> <?= $this->nettoyer($detailprescription['unite']) ?> </td>
<td align='center'> <?= $this->nettoyer($detailprescription['numeroBonOrdonnance']) ?> </td>
<td align='center'> <?= $this->nettoyer($detailprescription['numeroRemplacement']) ?> </td>
<?php if($ententePrealable1<>"0"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>