prestation/Vue/Examensmedicaux/index.php
2025-12-05 10:42:46 +00:00

492 lines
21 KiB
PHP
Executable File

<?php
$this->titre = "INTER-SANTE - Examens Médicaux";
$numeroBonExamen = $prescription['numeroBonExamen'];
$facture = $prescription['facture'];
$bonCaduc = $prescription['bonCaduc'];
$agePrescription = $prescription['agePrescription'];
$ajoutPrescriptionExam = ($_SESSION['p_ajoutPrescriptionExam_C']==1) ;
$actVisible = $_SESSION['p_actVisible'];
?>
<script type="text/javascript">
</script>
<legend><?= _("Laboratoire interne") ?></legend>
<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="5%" > <?= _("Souscrip.") ?> </td>
<td width="20%">
<INPUT style='text-align:center; font-size:11pt;' class="form-control" TYPE="text" id="nomClient" name="nomClient"
value="<?= $_SESSION['p_nomClient_C'] ?>" onChange="" readonly >
</td>
<td width="5%" align="center" > <?= _("Adh.") ?> </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"> <?= _("Bénéf.") ?> </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 Bénéf.") ?> </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>
<INPUT id="dateSurvenance" name="dateSurvenance" class="sr-only" TYPE="text" value="<?= dateLang($this->nettoyer($prescription['datePrescription'])) ?>" readonly style="text-align: center; font-size:9pt;" > </td>
<table class="table table-responsive table-condensed" style='font-size:9pt;' >
<tbody>
<tr>
<td width="7%" > <?= _("Prescrit le") ?> </td>
<td width="10%" > <INPUT id="datePrescription" name="datePrescription" 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"> <?= _("Praticien") ?> </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 Examen") ?> </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="<?= $numeroBonExamen ?>" readonly > </td>
<td width="7%" align="center"> <?= _("Tél Praticien") ?> </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">
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
<H4> <?= _("Dejà facturée !") ?> </H4>
</div>
</td>
</tr>
<?php elseif($bonCaduc=="1"): ?>
<tr>
<td colspan="8">
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center; margin-bottom:5px;" >
<H4> <?= " Age => ".$agePrescription . " "._("jours") . " => " . _("BON CADUC") ?> </H4>
</div>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php if ($facture=="1"): ?>
<div id="recap">
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td align="center" style="font-weight: bold;"> <?= _("Réclamé") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; "> </td>
<td align="center" style="font-weight: bold;"> <?= _("Part Assuré") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['montantTmLivre']+$prescription['depassementLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; color:red;"> </td>
<td align="center" style="font-weight: bold;"> <?= _("A Rembourser") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisRetenuLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; "> </td>
</tr>
</tbody>
</table>
</div>
<?php endif; ?>
<?php if($actVisible=="1"): ?>
<?php if($facture=="0") : ?>
<?php if($ajoutPrescriptionExam) : ?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td >
<div class="frmSearch">
<input id="searchInput" name="searchInput" style="font-size:10pt;" class="form-control" type="text" placeholder="<?= _("Entrer au minimum, les 3 premières lettres du nom de l'examen à prescrire...") ?>" autofocus required AUTOCOMPLETE="OFF" >
<div id="div_selection">
</div>
</div>
</td>
</tr>
</tbody>
</table>
<?php else: ?>
<!--<button type="button" class="form-control btn btn-primary" onClick="javascript:prescription_examen();" style="width:99%;font-size:11pt;font-weight: bold; margin:5px;" > <?= _("Retourner à la prescription des examens...") ?> </button>-->
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<div id="ordonnance">
<div id="div_legende_couleur" style="width:100%; margin: 5px;">
<table class="table table-responsive" style="width:78%; margin:auto;">
<tbody>
<tr>
<td style="font-weight:bold; text-align:right;"> <?= _("Attente réponse:") ?></td>
<td width="4%" style="background-color:yellow"></td>
<td width="2%"></td>
<td style="font-weight:bold; text-align:right;"><?= _("Accord assureur:") ?></td>
<td width="4%" style="background-color: #00ff00"></td>
<td width="2%"></td>
<td style="font-weight:bold; text-align:right;"><?= _("Non garanti / refus:") ?></td>
<td width="4%" style="background-color: red;"></td>
</tr>
</tbody>
</table>
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:11pt;'>
<thead>
<tr>
<th style="text-align:center"> <?= _("Garanties") ?> </th>
<th style="text-align:center"> <?= _("Examens / Radios 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']);
$garantie = $this->nettoyer($detailprescription['garantie']);
?>
<?php if($livre=="1") : ?>
<tr valign="top" style="color:blue">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align="center">
<?= $garantie ?>
</td>
<td >
<?php if($actVisible=="1"): ?>
<?= $libelleActe ?>
<?php else: ?>
<?= $codeActe ?>
<?php endif; ?>
</td>
<?php if($ententePrealable<>"0"): ?>
<?php if($ententePrealable=='2'): ?>
<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'): ?>
<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; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="livraison">
<!--
<input class="sr-only" id="statutBIO" name="statutBIO" type="text" value= "<?= $statutBIO ?>">
<input class="sr-only" id="statutIMA" name="statutIMA" type="text" value= "<?= $statutIMA ?>">
<input class="sr-only" id="statutEXA" name="statutEXA" type="text" value= "<?= $statutEXA ?>">
-->
<?php if($facture == "0") : ?>
<div id="div_messages">
</div>
<div id="recap">
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td align="center" style="font-weight: bold;"> <?= _("Réclamé") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold;"> </td>
<td align="center" style="font-weight: bold;"> <?= _("Part Assuré") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['montantTmLivre']+$prescription['depassementLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; color:red;"> </td>
<td align="center" style="font-weight: bold;"> <?= _("A Rembourser") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisRetenuLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold;"> </td>
</tr>
</tbody>
</table>
</div>
<?php endif; ?>
<div id="non_livre">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
<thead>
<tr>
<?php if($facture=="1" || $bonCaduc=="1"): ?>
<th width="5%" > </th>
<?php else: ?>
<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>
<?php endif; ?>
<th colspan="2"> <?= _("Examens / Radios à facturer") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Total") ?> </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']);
/*
if($actVisible!="1")
{
$libelleActe = $codeActe;
}
*/
$codeGarantie = $this->nettoyer($detailnonlivre['codeGarantie']);
$tarif = $this->nettoyer($detailnonlivre['tarif']);
?>
<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 ?>', '<?= $codeGarantie ?>');"> </td>
<?php elseif($ententePrealable=='9'): ?>
<td align='center' style="background-color: red; color:white;" > R </td>
<?php else: ?>
<?php if($facture=="1" || $bonCaduc=="1"): ?>
<td width="5%" > </td>
<?php else: ?>
<td width="5%" align='center'> <input type="button" value=" + " onClick="javascript:ajouterexamen('<?= $idNonLivre ?>', '<?= $ententePrealable ?>', '<?= $codeActe ?>', '<?= $codeGarantie ?>');"></td>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<td align='center' > <?= $codeGarantie ?> </td>
<td > <?= $libelleActe ?> </td>
<td align='center'>
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
<?= format_N($this->nettoyer($detailnonlivre['valeurActe'])) ?>
</button>
</td>
<td align='center' > <?= $this->nettoyer($detailnonlivre['quantite']) ?> </td>
<td align='center' > <?= format_N($this->nettoyer($detailnonlivre['fraisReel'])) ?> </td>
<?php if($ententePrealable<>"0"): ?>
<?php if($ententePrealable=='2'): ?>
<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'): ?>
<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; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="livre">
<?php
$nbLivre = 0;
?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
<thead>
<tr>
<?php if($facture=="1" || $bonCaduc=="1"): ?>
<th width="5%" > </th>
<?php else: ?>
<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>
<?php endif; ?>
<th > <?= _("Examens / Radios livrés") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Total") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Taux") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Montant TM") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Remb") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Dépass") ?> </th>
<th width ="5%" style="text-align:center"> <?= _("Motif") ?> </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> </td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourserLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['depassementLivre'])) ?></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']);
if (est_anglophone())
{
$libelleActe = $this->nettoyer($detaillivre['libelleActeEng']);
}
/*
if($actVisible!="1")
{
$libelleActe = $codeActe;
}
*/
$tm = $this->nettoyer($detaillivre['tm']);
$taux = (100-$tm)."%";
$codeMotifDepassement = $this->nettoyer($detaillivre['codeMotifDepassement']);
$motif = $this->nettoyer($detaillivre['motif']);
$motifEng = $this->nettoyer($detaillivre['motifEng']);
$tarif = $this->nettoyer($detaillivre['tarif']);
$nbLivre++;
?>
<tr valign="top">
<?php if($facture=="1" || $bonCaduc=="1"): ?>
<td width="5%" > </td>
<?php else: ?>
<td align='center'> <input type="button" value=" - " onClick="javascript:retirerexamen('<?= $idLivre ?>');"></td>
<?php endif; ?>
<td > <?= $libelleActe ?> </td>
<td align='center'>
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
<?= format_N($this->nettoyer($detaillivre['valeurActe'])) ?>
</button>
</td>
<td align='center'>
<?= $this->nettoyer($detaillivre['quantite']) ?>
</td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['fraisReel'])) ?> </td>
<td align='center'> <?= $taux ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantTm'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantArembourser'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['depassement'])) ?> </td>
<?php if($codeMotifDepassement!=''): ?>
<td align='center'>
<button type="button" class="btn btn-info" title="Voir le motif du dépassement..." onClick='javascript:alert_ebene("<?= $motif ?>","<?= $motifEng ?>");'>
<?= $codeMotifDepassement ?>
</button>
</td>
<?php else: ?>
<td > </td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="10" height="5"></td>
</tr>
</tbody>
</table>
<input class="sr-only" type="text" id="nbLivre" name="nbLivre" value="<?= $nbLivre ?>" >
</div>
<?php if($facture=="1" || $bonCaduc=="1"): ?>
<div id="div_ged_0"></div>
<?php else: ?>
<div id="div_ged_0" style="margin-top:20px;">
<form enctype="multipart/form-data" action="Examensmedicaux" method="post">
<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:afficher_examensmedicaux();"><?= _("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; ?>
<div id="div_fraisExclu">
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
</div>
</div>