759 lines
35 KiB
PHP
Executable File
759 lines
35 KiB
PHP
Executable File
<?php
|
|
$this->titre = "INTER-SANTE - Prescription";
|
|
|
|
$numeroBonOrdonnance = $prescription['numeroBonOrdonnance'];
|
|
$facture = $prescription['facture'];
|
|
$_SESSION['p_numeroBonOrdonnance_C'] = $numeroBonOrdonnance;
|
|
$nbMedicamentSaisie = $prescription['nbMedicamentSaisie'];
|
|
|
|
$badcodeGestionBon = "1";
|
|
$tab_gestion_bon = array("0", "1", "2");
|
|
if (in_array($codeGestionBon, $tab_gestion_bon))
|
|
{
|
|
$badcodeGestionBon = "0";
|
|
}
|
|
|
|
//var_dump($_SESSION['p_codeTarifMedicament_C']);
|
|
|
|
$actVisible = $_SESSION['p_actVisible'];
|
|
$hospitalisation = $_SESSION['p_hospitalisation_C'];
|
|
$miseEnObservation = $_SESSION['p_miseEnObservation_C'];
|
|
$fusionConsOrd = $_SESSION['p_fusionConsOrd'];
|
|
|
|
$agePrescription = $this->nettoyer($prescription['agePrescription']);
|
|
//var_dump($agePrescription);
|
|
|
|
$bonCaduc = $this->nettoyer($prescription['bonCaduc']);
|
|
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
|
|
|
|
if($modeSaisieFacture=="1")
|
|
{
|
|
$bonCaduc = "0";
|
|
}
|
|
|
|
$ententePrealable = $prescription['ententePrealable'];
|
|
|
|
|
|
|
|
?>
|
|
|
|
<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 ?>" >
|
|
|
|
<input class="sr-only" id="ententePrealable" name="ententePrealable" type="text" value= "<?= $ententePrealable ?>">
|
|
<input class="sr-only" id="montantTotalMedicament" name="montantTotalMedicament" type="text" value= "<?= $montantTotalMedicament ?>">
|
|
|
|
<input class="sr-only" id="codeReponseEntentePrealable" name="codeReponseEntentePrealable" type="text" value= "<?= $codeReponseEntentePrealable ?>">
|
|
|
|
<input class="sr-only" id="modeSaisieFacture" name="modeSaisieFacture" type="text" value= "<?= $modeSaisieFacture ?>">
|
|
|
|
<input class="sr-only" id="prescriptionSiCritereBareme" name="prescriptionSiCritereBareme" type="text" value="<?= $_SESSION['p_prescriptionSiCritereBareme_C'] ?>" >
|
|
|
|
<INPUT class="sr-only" id="statut" name="statut" type="text" value="<?= $statut;?>">
|
|
<INPUT class="sr-only" id="libelleMotif" name="libelleMotif" type="text" value="<?= $motif['libelle'];?>">
|
|
<INPUT class="sr-only" id="libelleMotifEng" name="libelleMotifEng" type="text" value="<?= $motif['libelleEng'];?>">
|
|
|
|
<INPUT class="sr-only" id="numeroEnteteEntentePrealable" name="numeroEnteteEntentePrealable" type="text" value="<?= $numeroEnteteEntentePrealable;?>">
|
|
|
|
|
|
<?php if ($numeroBonOrdonnance<="0") : ?>
|
|
<input class="sr-only" id="nomForm" name="nomForm" type="text" value= "frmprescriptionmedicament">
|
|
<?php else: ?>
|
|
<input class="sr-only" id="nomForm" name="nomForm" type="text" value= "prescriptionmedicament">
|
|
<?php endif; ?>
|
|
|
|
<?php if ($numeroBonOrdonnance<="0" && $badcodeGestionBon=="1") : ?>
|
|
<div class="alert alert-danger" style="height:40px; 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="numeroBonOrdonnance" name="numeroBonOrdonnance" type="text" value= "<?= $numeroBonOrdonnance ?>" >
|
|
<input class="sr-only" id="codeMedecin" name="codeMedecin" type="text" value= "<?= $prescription['codeMedecin'] ?>">
|
|
<input class="sr-only" type="text" id="numOrd" name="numOrd" value= "<?= $numeroBonOrdonnance ?>" >
|
|
<input class="sr-only" type="text" id="noPrescription" name="noPrescription" value="<?= $this->nettoyer($prescription['noPrescription']) ?>" >
|
|
<input class="sr-only" type="text" id="nbMedicamentMax" name="nbMedicamentMax" value="<?= $_SESSION['p_nbMedicamentMax'] ?>" >
|
|
<button id="btn_add_drug" name="btn_add_drug" type="button" class="sr-only" btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRechercheMedicament" > </button>
|
|
|
|
<button id="btn_remplacer_medicament" name="btn_remplacer_medicament" type="button" class="sr-only" btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRechercheMedicamentRemplacment" ><?= _("Remplacer Médicament...") ?></button>
|
|
|
|
<input class="sr-only" type="text" id="nbBonsOrd" name="nbBonsOrd" Value="<?= $nbBonsOrd ?>" >
|
|
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
|
|
|
|
<legend><?= _("Prescription de médicaments") ?></legend>
|
|
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:9pt;' >
|
|
<tbody>
|
|
<!--
|
|
<tr>
|
|
<td width="5%" > <?= _("Souscripteur") ?> </td>
|
|
<td width="20%">
|
|
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" id="nomClient" name="nomClient"
|
|
value="<?= $_SESSION['p_nomClient_C'] ?>" onChange="" readonly >
|
|
</td>
|
|
|
|
<td width="7%" align="center" > <?= _("Adhérent") ?> </td>
|
|
<td width="20%" > <INPUT class="form-control" TYPE="text" value="<?= $_SESSION['p_adherent_C']; ?>" readonly style="text-align: center; font-size:9pt;" > </td>
|
|
|
|
<td width="5%" align="center"> <?= _("Patient") ?> </td>
|
|
<td width="25%"> <INPUT class="form-control" TYPE="text" value="<?= $_SESSION['p_beneficiaire_C']; ?>" readonly style='font-size:9pt;'> </td>
|
|
|
|
<td width="7%" align="center"> <?= _("Tél. Patient") ?> </td>
|
|
<td width="13%"> <INPUT class="form-control" TYPE="text" value="<?= $_SESSION['p_telephonePortableBeneficiaire_C']; ?>" readonly style='font-size:9pt;'> </td>
|
|
</tr>
|
|
-->
|
|
<tr>
|
|
<td >
|
|
<INPUT style='font-size:12pt; font-weight: bold; background-color:#f5deb3 !important; color:#a0522d; text-align:center;' class="form-control" TYPE="text" id="nomClient" name="nomClient"
|
|
value="<?= 'TAUX DE COUVERTURE : '.$tauxCouverture ?>" onChange="" readonly >
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="5%" >Date</td>
|
|
<td width="20%" > <INPUT class="form-control" TYPE="text" value="<?= dateLang($this->nettoyer($prescription['datePrescription'])) ?>" readonly style="text-align: center; font-size:10pt;" id="dateSurvenance" name="dateSurvenance"> </td>
|
|
|
|
<td width="7%" align="center"> <?= _("Médecin") ?> </td>
|
|
<td>
|
|
<?php if ($numeroBonOrdonnance>"0" || $facture=="1") : ?>
|
|
<INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['medecinPrescription']) ?>" readonly style='font-size:10pt;'>
|
|
<?php else: ?>
|
|
<button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRechercheMedecin" style='font-size:10pt;' ><span id="nomMedecin" name="nomMedecin"> <?= $this->nettoyer($prescription['medecinPrescription']) ?> </span></button>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td width="7%" align="center"> <?= _("No Bon") ?> </td>
|
|
<td width="10%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue !important;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonOrdonnance ?>" readonly > </td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<!--
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="5%" > <?= _("Bons Dispo.") ?> </td>
|
|
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $nbBonsOrd ?>" readonly > </td>
|
|
|
|
<td width="7%" align="center"> <?= _("No Bon") ?> </td>
|
|
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue !important;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonOrdonnance ?>" readonly > </td>
|
|
|
|
|
|
<td width="5%" 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="div_messages">
|
|
|
|
</div>
|
|
|
|
<div id="infosbon">
|
|
<?php if($fusionConsOrd=="1"): ?>
|
|
<?php if ($numeroBonOrdonnance>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:40px; padding:5px; text-align:center; margin-bottom:5px;" >
|
|
<H4><?= _("Dejà facturée !") ?> </H4>
|
|
</div>
|
|
</td>
|
|
<?php else: ?>
|
|
<?php if ($nbMedicamentSaisie>=$_SESSION['p_nbMedicamentMax'] && ($hospitalisation!="1" || $miseEnObservation!="1")): ?>
|
|
<td>
|
|
<div class="alert alert-danger" style="height:38px; padding:5px;">
|
|
<H4> <?= _("Attention! Maximum de médicaments atteint!") ?></H4>
|
|
</div>
|
|
</td>
|
|
<?php else: ?>
|
|
<?php if($actVisible=="1" && $bonCaduc!="1"): ?>
|
|
<!-- bande bleue de recherche d'examen -->
|
|
<?php if($statut=="1" || $_SESSION['p_prescriptionSiCritereBareme_C']=="1"): ?>
|
|
|
|
<td>
|
|
<div class="frmSearch" style="position: relative;">
|
|
<input id="searchInput" name="searchInput" style="font-size:11pt; padding-left: 35px;" class="form-control" type="text" placeholder="<?= _("Effectuer une recherche de médicament...") ?>" autofocus required AUTOCOMPLETE="OFF">
|
|
<i class="fas fa-search" style="position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #999;"></i>
|
|
<div id="div_selection"></div>
|
|
</div>
|
|
<?php else: ?>
|
|
<?php if($bonCaduc=="1") : ?>
|
|
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center; margin-bottom:5px;" >
|
|
<H4> <?= " Age => ".$agePrescription . " "._("jours") . " => " . _("BON CADUC") ?> </H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?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($bonCaduc!="1") : ?>
|
|
<input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrerprescription();" style='font-size:10pt;' >
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php else: ?>
|
|
<?php if($codeGestionBon!="0"): ?>
|
|
<?php if ($numeroBonOrdonnance>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td align='center' style="font-size:11pt;font-weight:bold;">
|
|
<?= _("Sélectionner un médicament dans la liste") ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<?php if ($facture=="1"): ?>
|
|
<td>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:40px; padding:5px; text-align:center; margin-bottom:5px;" >
|
|
<H4><?= _("Dejà facturée !") ?> </H4>
|
|
</div>
|
|
</td>
|
|
<?php else: ?>
|
|
<?php if ($nbMedicamentSaisie>=$_SESSION['p_nbMedicamentMax'] && ($hospitalisation!="1"||$miseEnObservation!="1")): ?>
|
|
<td>
|
|
<div class="alert alert-danger" style="height:38px; padding:5px;">
|
|
<H4> <?= _("Attention! Maximum de médicaments atteint.") ?></H4>
|
|
</div>
|
|
</td>
|
|
<?php else: ?>
|
|
<td>
|
|
<?php if($actVisible=="1" && $bonCaduc!="1"): ?>
|
|
<SELECT id="codeMedicament" class="form-control selectpicker" data-live-search="true" NAME="codeMedicament" required AUTOCOMPLETE="OFF" onChange="javascript:add_selected_drug(this);" style='font-size:10pt;' >
|
|
<?php liste_options($medicaments,""); ?>
|
|
</SELECT>
|
|
<div id="div_patienter">
|
|
</div>
|
|
<?php else: ?>
|
|
<SELECT id="codeMedicament" class="form-control selectpicker" data-live-search="true" NAME="codeMedicament" required AUTOCOMPLETE="OFF" onChange="" style='font-size:10pt;' disabled>
|
|
<?php liste_options($medicaments,""); ?>
|
|
</SELECT>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td>
|
|
|
|
</td>
|
|
<?php endif; ?>
|
|
<?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:40px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
|
|
</div>
|
|
<?php else: ?>
|
|
<input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrerprescription();" style='font-size:10pt;' >
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<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 ($numeroBonOrdonnance>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="5%" > <?= _("No Bon") ?> </td>
|
|
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonOrdonnance ?>" readonly > </td>
|
|
|
|
<td width="7%" > <?= _("Médicament") ?></td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td >
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:40px; padding:5px; text-align:center; margin-bottom:5px;" >
|
|
<H4><?= _("Dejà facturée !") ?> </H4>
|
|
</div>
|
|
</td>
|
|
<?php else: ?>
|
|
<?php if ($nbMedicamentSaisie>=$_SESSION['p_nbMedicamentMax'] && ($hospitalisation!="1"||$miseEnObservation!="1")): ?>
|
|
<td >
|
|
<div class="alert alert-danger" style="height:38px; padding:5px;">
|
|
<H4> <?= _("Attention! Maximum de médicaments atteint!") ?></H4>
|
|
</div>
|
|
</td>
|
|
<?php else: ?>
|
|
<td>
|
|
<?php if($actVisible=="1" && $bonCaduc!="1"): ?>
|
|
<!--<input class="form-control btn btn-primary" type="button" value="<?= _("Ajouter Médicament...") ?>" onClick="javascript:click_btn_add_drug();" style='font-size:10pt;'>-->
|
|
<SELECT id="codeMedicament" class="form-control selectpicker" data-live-search="true" NAME="codeMedicament" required AUTOCOMPLETE="OFF" onChange="javascript:add_selected_drug(this);" style='font-size:10pt;' >
|
|
<?php liste_options($medicaments,""); ?>
|
|
</SELECT>
|
|
<div id="div_patienter">
|
|
</div>
|
|
<?php else: ?>
|
|
<!--<input class="form-control btn btn-primary" type="button" value="<?= _("Ajouter Médicament...") ?>" disabled style='font-size:10pt;'> -->
|
|
<SELECT id="codeMedicament" class="form-control selectpicker" data-live-search="true" NAME="codeMedicament" required AUTOCOMPLETE="OFF" onChange="" style='font-size:10pt;' disabled>
|
|
<?php liste_options($medicaments,""); ?>
|
|
</SELECT>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
<?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 AUTOCOMPLETE="OFF" >
|
|
<td>
|
|
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php else: ?>
|
|
<tr>
|
|
<td width="5%" > <?= _("No Bon") ?> </td>
|
|
<?php if ($facture=="1"): ?>
|
|
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonOrdonnance ?>" readonly > </td>
|
|
<?php elseif($bonCaduc!="1"): ?>
|
|
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" required AUTOCOMPLETE="OFF"
|
|
onChange="javascript:ajaxinfosbonprescription();" onkeypress="javascript:ctrlkeypress_numeroBon(event);" autofocus ></td>
|
|
<?php else: ?>
|
|
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" readonly ></td>
|
|
<?php endif; ?>
|
|
|
|
<td width="5%" > </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 endif; ?>
|
|
|
|
<?php if (isset($msgErreur)): ?>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:38px; padding:5px;" >
|
|
<H4><?= $msgErreur ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
|
|
<?php if($facture=="0" || $bonCaduc=="1") : ?>
|
|
<?php if($statut=="1" || $_SESSION['p_prescriptionSiCritereBareme_C']=="1"): ?>
|
|
<div id="div_legende_couleur" style="width:100%; margin: 5px;">
|
|
<table class="table-responsive" style="width:50%; margin:auto;">
|
|
<tbody>
|
|
<tr>
|
|
<td style="font-weight:bold; text-align:left; background-color:#f8f8ff; text-decoration-line: underline;"> <?= _("Légende").":"; ?></td>
|
|
|
|
<td style="font-weight:bold; background-color:#f8f8ff; text-align:right;"> <?= _("Attente réponse:") ?></td>
|
|
<td width="4%" style="background-color:yellow"></td>
|
|
<td width="2%" style="background-color:#f8f8ff;"></td>
|
|
<td style="font-weight:bold; background-color:#f8f8ff; text-align:right;"><?= _("Accord assureur:") ?></td>
|
|
<td width="4%" style="background-color: #00ff00"></td>
|
|
<td width="2%" style="background-color:#f8f8ff;"></td>
|
|
<td style="font-weight:bold; background-color:#f8f8ff; text-align:right;"><?= _("Non garanti / refus:") ?></td>
|
|
<td width="4%" style="background-color: red;"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($numeroBonOrdonnance>"0") : ?>
|
|
<div id="medicaments">
|
|
<?php $fraisTotal = $this->nettoyer($prescription['fraisReel']); ?>
|
|
<input class="sr-only" type="text" id="fraisTotal" name="fraisTotal" value="<?= $fraisTotal ?>" >
|
|
<input class="sr-only" type="text" id="nbMedicamentSaisie" name="nbMedicamentSaisie" value="<?= $nbMedicamentSaisie ?>" >
|
|
|
|
<div >
|
|
<input class="form-control" style="text-align: center; font-size: 12pt;font-weight: bold;" type="text" value="<?= _("Liste des médicaments prescrits") ?>" readonly > </td>
|
|
</div>
|
|
|
|
<?php if($statut=="1" || $_SESSION['p_prescriptionSiCritereBareme_C']=="1"): ?>
|
|
<div class="tab-container">
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt; white-space: nowrap;">
|
|
<thead>
|
|
<tr>
|
|
<th width="24%" style="text-align:center"> <?= _("Nom") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Forme") ?> </th>
|
|
<th width="6%" style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
|
|
<th width="6%" style="text-align:center"> <?= _("Prix Total") ?> </th>
|
|
|
|
<th width="15%" style="text-align:center"> <?= _("Posologie") ?> </th>
|
|
|
|
|
|
<th width="7%" colspan="2" style="text-align:center"> <?= _("Durée (Jour)") ?> </th>
|
|
<th width="5%" style="text-align:center" > <?= _("Accord") ?> </th>
|
|
<th width="6%" style="text-align:center"> <?= _("Garanti") ?> </th>
|
|
<th width="7%" style="text-align:center"> <?= _("Renouvelable") ?> </th>
|
|
<th width="9%" style="text-align:center"> <?= _("Fréquence (Jour)") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Suppr") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
<?php
|
|
|
|
$existeEntentePrealable = 0;
|
|
?>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4" style='text-align:center'> Total <?=" (".count($detailprescriptions).")"?> </td>
|
|
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReelLivre']>"0" ? $prescription['fraisReelLivre'] : $prescription['fraisReel'])) ?></td>
|
|
|
|
<td colspan="8"> </td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
<?php
|
|
$nbreMedciament=0;
|
|
$existeEntentePrealable = '0';
|
|
$envoyeSms = '0';
|
|
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']);
|
|
$libelleMedicament = $this->nettoyer($detailprescription['libelleMedicament']);
|
|
$codeMedicament = $this->nettoyer($detailprescription['codeMedicament']);
|
|
$ajPharmacie = $this->nettoyer($detailprescription['ajPharmacie']);
|
|
$ententePrealable = $this->nettoyer($detailprescription['ententePrealable']);
|
|
$medicamentRemplace = $this->nettoyer($detailprescription['medicamentRemplace']);
|
|
|
|
$nbreMedciament = $nbreMedciament+1;
|
|
$prixTotal = $this->nettoyer($detailprescription['fraisReel']);
|
|
|
|
$envoyeSms = $this->nettoyer($detailprescription['envoyeSms']);
|
|
|
|
if($ententePrealable == "2"){
|
|
$existeEntentePrealable = $ententePrealable;
|
|
}
|
|
|
|
if($actVisible!="1")
|
|
{
|
|
$libelleMedicament = $codeMedicament;
|
|
}
|
|
|
|
$forme = $this->nettoyer($detailprescription['forme']);
|
|
|
|
|
|
|
|
$exclu = $this->nettoyer($detailprescription['exclu']);
|
|
|
|
if($exclu=="1"){
|
|
$garanti = "Non";
|
|
}else{
|
|
$garanti = "Oui";
|
|
}
|
|
|
|
$renouvelable = $this->nettoyer($detailprescription['renouvelable']);
|
|
|
|
$frequenceRenouvellement = $this->nettoyer($detailprescription['frequenceRenouvellement']);
|
|
|
|
|
|
if($renouvelable=="1"){
|
|
$ren = "Oui";
|
|
}else{
|
|
$ren = "Non";
|
|
}
|
|
|
|
if (est_anglophone()){
|
|
$forme = $this->nettoyer($detailprescription['formeEng']);
|
|
|
|
if($renouvelable=="1"){
|
|
$ren = "Yes";
|
|
}else{
|
|
$ren = "No";
|
|
}
|
|
|
|
if($exclu=="1"){
|
|
$garanti = "No";
|
|
}else{
|
|
$garanti = "Yes";
|
|
}
|
|
}
|
|
|
|
|
|
$envoyeSms++;
|
|
?>
|
|
<?php if($ajPharmacie=="1") : ?>
|
|
<tr valign="top" style="background-color: rgb(0, 142, 142);">
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
<td align='center'> <?= $libelleMedicament ?> </td>
|
|
<td align='center' > <?= $forme ?> </td>
|
|
<td align='center' > <?= format_N($this->nettoyer($detailprescription['valeurActe'])) ?> </td>
|
|
<td align='center' >
|
|
<?php if ($livre!="1" && $bonCaduc!="1" && $ententePrealable!='1' && $ententePrealable!='9') : ?>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['quantite']) ?>"
|
|
onChange="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']) ?>"
|
|
disabled >
|
|
<?php endif; ?>
|
|
</td>
|
|
<td align='center'> <?= format_N($prixTotal) ?> </td>
|
|
|
|
<?php if ($livre=="1" || $facture=="1" || $bonCaduc=="1"): ?>
|
|
<td align='center' >
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['posologie']) ?>" disabled>
|
|
</td>
|
|
<td> </td>
|
|
<?php else: ?>
|
|
<?php if ($facture!="1" && $livre!="1" && $bonCaduc!="1" && $ententePrealable!='1' && $ententePrealable!='9') : ?>
|
|
<td align='center'>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['posologie']) ?>"
|
|
onChange="ajax_maj_posologie_medicament('<?=$idMedicament?>', this.value, this);">
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' >
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['posologie']) ?>" disabled>
|
|
</td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php if ($livre!="1" && $bonCaduc!="1" && $ententePrealable!='1' && $ententePrealable!='9') : ?>
|
|
<td align='center' colspan="2">
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['dureeTraitement']) ?>"
|
|
onChange="ajax_maj_duree_medicament('<?=$idMedicament?>', this.value, this);">
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' >
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($detailprescription['dureeTraitement']) ?>"
|
|
disabled >
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<?php if($ententePrealable<>"0"): ?>
|
|
<?php if($ententePrealable=='2' || $ententePrealable=='3'): ?>
|
|
<td align='center' style="background-color: yellow;"> <input type="checkbox" checked disabled> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td align='center' style="background-color: #00ff00;"> <input type="checkbox" checked disabled> </td>
|
|
<?php elseif($ententePrealable=='9' || $exclu=='1'): ?>
|
|
<td align='center' style="background-color: red;color:white;"> <input type="checkbox" checked disabled> </td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" checked disabled> </td>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<td align='center' > <input type="checkbox" disabled></td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center' > <?=$garanti?></td>
|
|
<?php if ($livre!="1" && $bonCaduc!="1" && $ententePrealable!='1' && $ententePrealable!='9' && $exclu!="1") : ?>
|
|
<td align='center' >
|
|
<SELECT class="form-select" style='font-size:8pt; text-align:center; height: 27px !important; ' onChange="ajax_maj_renouvelable_medicament('<?=$idMedicament?>', this.value, this);">
|
|
<?php liste_options($ouinonrenouvelable, $renouvelable, true); ?>
|
|
</SELECT>
|
|
</td>
|
|
|
|
<td align='center' >
|
|
<?php if ($renouvelable=="1") : ?>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $frequenceRenouvellement ?>"
|
|
onChange="ajax_maj_frequence_medicament('<?=$idMedicament?>', this.value, this);" required>
|
|
<?php else: ?>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="0" disabled>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<?php else: ?>
|
|
<td align='center' > <?=$ren?></td>
|
|
<td align='center' > <?=$frequenceRenouvellement?></td>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($livre!="1" && $bonCaduc!="1" && $ententePrealable!='1' && $ententePrealable!='9'): ?>
|
|
<td>
|
|
<button type="button" class="form-control btn btn-danger" onClick="javascript:supprimer_medicament('<?= $idMedicament ?>');">
|
|
<i class="fa fa-times" aria-hidden="true"></i>
|
|
</button>
|
|
</td>
|
|
<?php else: ?>
|
|
<td></td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="15" height="8"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<input class="sr-only" type="text" id="existeEntentePrealable" name="existeEntentePrealable" value="<?= $existeEntentePrealable ?>" >
|
|
<input class="sr-only" type="text" id="envoyeSms" name="envoyeSms" value="<?= $envoyeSms ?>" >
|
|
</div>
|
|
<?php endif; ?>
|
|
<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-bs-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" || $miseEnObservation!="1")): ?>
|
|
<div class="alert alert-danger" style="height:38px; 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" > <?= _("Forme") ?> </th>
|
|
<th style="text-align:center" > <?= _("Prix Unitaire") ?> </th>
|
|
<th style="text-align:center" > <?= _("Accord") ?> </th>
|
|
<th style="text-align:center" > <?= _("Exclu") ?> </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 colspan="4"> <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-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if($facture=="1" || $bonCaduc=="1"): ?>
|
|
<div id="div_ged_0"></div>
|
|
<?php elseif($numeroBonOrdonnance>"0"): ?>
|
|
<div id="div_ged_0" style="margin-top:20px;">
|
|
<form enctype="multipart/form-data" action="Prescription" method="post">
|
|
<div >
|
|
<input class="form-control" style="text-align: center; font-size: 12pt;font-weight: bold;" type="text" value="<?= _("Gestion Electronique des Documents (GED)") ?>" readonly > </td>
|
|
</div>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td> <?= _("Document") ?> </td>
|
|
<td> <input style="font-size: 15px; height: 40px" class="form-control btn btn-info" name="fichier_upload" type="file" id="fichier_upload" /> </td>
|
|
|
|
<td> </td>
|
|
<td> <input style='font-size:10pt;' class="form-control btn btn-primary" type="submit" name="submit" value="<?= _("Envoyer") ?>" /> </td>
|
|
|
|
<td> </td>
|
|
<td > <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:prescription_medicament();"><?= _("Actualiser...") ?></button> </td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
|
|
<?php if((isset($msgErreurGed)) && ($msgErreurGed>" ")) : ?>
|
|
<INPUT style='font-size:12pt; color:red; text-align:center;' class="form-control" type="text" value="<?= $msgErreurGed ?>" readonly >
|
|
<?php endif; ?>
|
|
|
|
<table class="table table-striped table-hover table-condensed table-responsive" style="font-size:9pt;" >
|
|
<thead>
|
|
<th width="12%" style='text-align:center'> Date </th>
|
|
<th style='text-align:center'> <?= _("Document GED") ?></th>
|
|
<th width="11%" style='text-align:center'> <?= _("Télécharger") ?> </th>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($geds as $ged):
|
|
$idGed=$this->nettoyer($ged['idGed']);
|
|
$cheminFichier = $this->nettoyer($ged['cheminFichier']);
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'><?= dateheureLang($this->nettoyer($ged['dateSysteme'])) ?></td>
|
|
<td align='center'><?= $this->nettoyer($ged['nomOrigine']) ?></td>
|
|
<td align="center">
|
|
<a style="font-size:10pt;" href="<?= $cheminFichier ?>" target="_blank" > <?= _("Télécharger") ?> </a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
|
|
<div id="content">
|
|
<?php include 'flexcode/include/global.php'; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<button id="btn_medicaments_remplaces" name="btn_medicaments_remplaces" type="button" class="sr-only" btn btn-primary" data-bs-toggle="modal" data-bs-target="#po_liste_medicaments_remplaces" > </button>
|
|
|
|
<div class="modal fade" id="po_liste_medicaments_remplaces" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h4 class="modal-title"><?= _("Médicaments remplacés") ?></h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_liste_medicaments_remplaces" >
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|