production/Vue/Ajaxententeprealables/index.php
2025-12-01 16:12:12 +00:00

236 lines
12 KiB
PHP
Executable File

<div id="div_ententeprealable">
<div id="div_patienter">
</div>
<table class="table table-striped table-bordered table-condensed table-responsive" style="font-size:9pt;">
<thead>
<tr>
<th rowspan="2" style='text-align:center'> No </th>
<th rowspan="2" style='text-align:center'> Date </th>
<th rowspan="2" style='text-align:center' width="15%"> <?= _("Acte") ?> </th>
<th rowspan="2" style='text-align:center' width="15%"> <?= ("Motif Clinique") ?> </th>
<th rowspan="2" style='text-align:center' > <?= _("Bon No") ?> </th>
<th rowspan="2" style='text-align:center' > <?= _("Prestataire") ?> </th>
<th rowspan="2" colspan="2" style='text-align:center'> <?= _("Bénéficiaire") ?> </th>
<th rowspan="2" style='text-align:center'> <?= _("Répondue le") ?> </th>
<th rowspan="2" style='text-align:center'> <?= _("Répondue par") ?> </th>
<th rowspan="2" style='text-align:center'> <?= _("Situation") ?> </th>
<th colspan="2" style='text-align:center'> <?= _("Motif Réponse") ?> </th>
<th rowspan="2" style='text-align:center'> <?= _("Facturé") ?> </th>
</tr>
<tr>
<th style='text-align:center'> <?= _("Réel") ?> </th>
<th style='text-align:center'> <?= _("A l'assuré") ?> </th>
</tr>
</thead>
<tbody>
<?php
/*
var_dump($ententeprealables);
die();
*/
$numeroBonOld = "";
$numeroFeuilleMaladieOld="";
foreach ($ententeprealables as $ententeprealable):
//var_dump($ententeprealable);
//die();
$idDemandeententeprealable = $this->nettoyer($ententeprealable['idDemandeententeprealable']);
$codeReponseEntentePrealable = $this->nettoyer($ententeprealable['codeReponseEntentePrealable']);
$numeroEntentePrealable = $this->nettoyer($ententeprealable['numeroEntentePrealable']);
$facture = $this->nettoyer($ententeprealable['facture']);
$motifPrestataire = $this->nettoyer($ententeprealable['motifPrestataire']);
$codeActe = $this->nettoyer($ententeprealable['codeActe']);
$libelleActe = $this->nettoyer($ententeprealable['libelleActe']);
$numeroBonExamen = $this->nettoyer($ententeprealable['numeroBonExamen']);
$numeroBon = $this->nettoyer($ententeprealable['numeroBon']);
$codeTypePrestation = $this->nettoyer($ententeprealable['codeTypePrestation']);
$codeGarantie = $this->nettoyer($ententeprealable['codeGarantie']);
$numeroFeuilleMaladie = $this->nettoyer($ententeprealable['numeroFeuilleMaladie']);
$fraisReelExamen = $this->nettoyer($ententeprealable['fraisReelExamen']);
if ($codeTypePrestation=="EXAM" && $numeroBon != $numeroBonOld ){
if (est_anglophone()){
$libelleActe = "PRESCRIBED EXAMS";
}else{
$libelleActe = "EXAMENS PRESCRITS";
}
}elseif($codeTypePrestation=="ACT" && $numeroBon != $numeroBonOld){
if (est_anglophone()){
$libelleActe = "PRESCRIBED ACTS";
}else{
$libelleActe = "ACTES PRESCRITS";
}
}
?>
<?php if (($codeTypePrestation=="EXAM" || $codeTypePrestation=="ACT") && $numeroBon != $numeroBonOld ) : ?>
<?php if($codeReponseEntentePrealable=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($codeReponseEntentePrealable=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($codeReponseEntentePrealable=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'>
<input type="button" style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px;" value="<?= $numeroEntentePrealable ?> "
onClick="javascript:consulter_ententeprealable_2(<?= $idDemandeententeprealable ?>);">
</td>
<td align='center'><?= dateheureLang($this->nettoyer($ententeprealable['dateSysteme'])) ?></td>
<td align='center'>
<?php if($codeTypePrestation=='EXAM'): ?>
<a title='<?= _("Afficher les examens prescrits") ?>' href="javascript:afficherListeActesPrescrits('<?= $numeroFeuilleMaladie ?>', '<?= $codeTypePrestation ?>', '<?= $codeGarantie ?>');">
<span style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px; padding-left:5px; padding-right:5px;">
<?= $libelleActe ?>
</span>
</a>
<?php else: ?>
<a title='<?= _("Afficher les actes médicaux prescrits") ?>' href="javascript:afficherListeActesPrescrits('<?= $numeroFeuilleMaladie ?>', '<?= $codeTypePrestation ?>', '<?= $codeGarantie ?>');">
<span style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px; padding-left:5px; padding-right:5px;">
<?= $libelleActe ?>
</span>
</a>
<?php endif; ?>
</td>
<td >
<?= substr(strtoupper($motifPrestataire),0,50) ?>
<?php if(strlen($motifPrestataire)>50): ?>
<a title='<?= _("Voir le motif clinique") ?>' style="color:red;font-weight:blod;" href='javascript:alert("<?= $motifPrestataire ?>");'>
<?= _("Lire la suite...") ?>
</a>
<?php endif; ?>
</td>
<INPUT class="sr-only" TYPE="text" id="smsGestionPrestataire" name="smsGestionPrestataire" value="<?= $this->nettoyer($ententeprealable['smsGestionPrestataire']) ?>">
<td align='center'><?= $numeroBon ?> </td>
<td align='center'>
<?= $this->nettoyer($ententeprealable['prestataire']) ?>
</td>
</td>
<td align='center'>
<a title="<?= _("Voir les infos du bénéficiaire") ?>" href='javascript:afficheBeneficiaire("<?= $this->nettoyer($ententeprealable['numeroBeneficiaire']) ?>");'>
<span style="color:blue;background-color:#eeeeee; border:1px solid #000; border-radius:3px;"><?= $this->nettoyer($ententeprealable['numeroBeneficiaire']) ?>
</span>
</a>
</td>
<td><?= $this->nettoyer($ententeprealable['beneficiaire']).' - ( '.$this->nettoyer($ententeprealable['souscripteur']).' )' ?></td>
<td align='center'><?= dateheureLang($this->nettoyer($ententeprealable['dateReponse'])) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['responsableAccord']) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['reponsentEnteprealable']) ?></td>
<?php if ($codeReponseEntentePrealable=='2'): ?>
<td colspan="2" align="center" >
<input style="color:blue;" type="button" value="<?= _("Historique") ?>"
onClick="javascript:afficherHistoriquePrestataion('<?=$ententeprealable['numeroBeneficiaire']?>', <?= $numeroBon ?>);">
</td>
<!-- <td align="center">
<input style="color:red;" type="button" value="<?= _("Refuser") ?>"
onClick="javascript:refuser_ententeprealable_2(<?= $idDemandeententeprealable ?>, <?= $facture ?>);">
</td> -->
<?php elseif($codeReponseEntentePrealable=='1'): ?>
<td colspan="2" align='center'><?= $this->nettoyer($ententeprealable['motifReel']) ?></td>
<?php elseif($codeReponseEntentePrealable=='9'): ?>
<td align='center'><?= $this->nettoyer($ententeprealable['motifReel']) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['motifRefusAssure']) ?></td>
<?php endif; ?>
<?php if ($facture=="1"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
<?php elseif( $numeroFeuilleMaladie != $numeroFeuilleMaladieOld ): ?>
<?php //elseif($codeGarantie != "HOS"): ?>
<?php //else: ?>
<?php if($codeReponseEntentePrealable=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($codeReponseEntentePrealable=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($codeReponseEntentePrealable=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'>
<input type="button" style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px;" value="<?= $numeroEntentePrealable ?> "
onClick="javascript:consulter_ententeprealable_2(<?= $idDemandeententeprealable ?>);">
</td>
<td align='center'><?= dateheureLang($this->nettoyer($ententeprealable['dateSysteme'])) ?></td>
<td align='center'>
<?= $libelleActe ?>
</td>
<td align='center'>
<p>
<?= substr(strtoupper($motifPrestataire),0,50) ?>
<?php if(strlen($motifPrestataire)>50): ?>
<a title='Voir le motif médical' style="color:red;font-weight:blod;" href='javascript:alert("<?= $motifPrestataire ?>");'>
Lire la suite...
</a>
<?php endif; ?>
</p>
</td>
<td align='center'><?= $numeroBon ?> </td>
<td align='center'>
<?= $this->nettoyer($ententeprealable['prestataire']) ?>
<!-- <?php if($motifPrestataire>' '): ?>
<a title='Voir le motif médical' style="" href='javascript:alert("<?= $motifPrestataire ?>");'>
<span style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;display: block; width:200px;">
<?= $this->nettoyer($ententeprealable['prestataire']) ?>
</span>
</a>
<?php else: ?>
<?= $this->nettoyer($ententeprealable['prestataire']) ?>
<?php endif; ?> -->
</td>
</td>
<td align='center'>
<a title="Voir les infos bénéficiaire" href='javascript:afficheBeneficiaire("<?= $this->nettoyer($ententeprealable['numeroBeneficiaire']) ?>");'>
<span style="color:blue;background-color:#eeeeee; border:1px solid #000; border-radius:3px;"><?= $this->nettoyer($ententeprealable['numeroBeneficiaire']) ?>
</span>
</a>
</td>
<td><?= $this->nettoyer($ententeprealable['beneficiaire']) ?></td>
<td align='center'><?= dateheureLang($this->nettoyer($ententeprealable['dateReponse'])) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['responsableAccord']) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['reponsentEnteprealable']) ?></td>
<?php if ($codeReponseEntentePrealable=='2'): ?>
<td align="center" >
<input style="color:blue;" type="button" value="<?= _("Accepter") ?>"
onClick="javascript:accepter_ententeprealable_2(<?= $idDemandeententeprealable ?>, <?= $facture ?>);">
</td>
<td align="center">
<input style="color:red;" type="button" value="<?= _("Refuser") ?>"
onClick="javascript:refuser_ententeprealable_2(<?= $idDemandeententeprealable ?>, <?= $facture ?>);">
</td>
<?php elseif($codeReponseEntentePrealable=='1'): ?>
<td colspan="2" align='center'><?= $this->nettoyer($ententeprealable['motifReel']) ?></td>
<?php elseif($codeReponseEntentePrealable=='9'): ?>
<td align='center'><?= $this->nettoyer($ententeprealable['motifReel']) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['motifRefusAssure']) ?></td>
<?php endif; ?>
<?php if ($facture=="1"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
<?php endif; ?>
<?php $numeroBonOld = $numeroBon; $numeroFeuilleMaladieOld = $numeroFeuilleMaladie;
endforeach; ?>
</tbody>
</table>
</div>