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

204 lines
9.6 KiB
PHP
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="div_ententeprealable">
<div id="div_patienter">
</div>
<table class="table table-striped table-bordered table-condensed table-responsive" style="font-size:8pt;">
<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'> <?= _("Médicament") ?> </th>
<th rowspan="2" style='text-align:center'> <?= _("Qté") ?> </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
$numeroBonOld = "";
$numeroFeuilleMaladieOld="";
foreach ($ententeprealables as $ententeprealable):
//highlight_string("<?php\n\$datas =\n" . var_export($ententeprealable, true) . ";\n>");
$idDemandeententeprealable = $this->nettoyer($ententeprealable['idDemandeententeprealable']);
$codeReponseEntentePrealable = $this->nettoyer($ententeprealable['codeReponseEntentePrealable']);
$numeroEntentePrealable = $this->nettoyer($ententeprealable['numeroEntentePrealable']);
$facture = $this->nettoyer($ententeprealable['facture']);
$libelleMedicament = $this->nettoyer($ententeprealable['libelleMedicament']);
$codeMedicament = $this->nettoyer($ententeprealable['codeMedicament']);
$fraisReelPhcie = $this->nettoyer($ententeprealable['fraisReelPhcie']);
$numeroFeuilleMaladie = $this->nettoyer($ententeprealable['numeroFeuilleMaladie']);
$numeroBonOrdonnance = $this->nettoyer($ententeprealable['numeroBonOrdonnance']);
$codeTypePrestation = $this->nettoyer($ententeprealable['codeTypePrestation']);
$codeGarantie = $this->nettoyer($ententeprealable['codeGarantie']);
if ($codeMedicament=="MEDIC"){
if (est_anglophone()){
$libelleMedicament = "DRUG FEES: ".format_N($fraisReelPhcie);
}else{
$libelleMedicament = "FRAIS MEDICAMENTS: ".format_N($fraisReelPhcie);
}
}
if ($codeTypePrestation=="PHAR" && $numeroBonOrdonnance != $numeroBonOld ){
if (est_anglophone()){
$libelleMedicament = "LIST OF VOUCHER ACTS: ".$numeroBonOrdonnance;
}else{
$libelleMedicament = "LISTE DES MEDICAMENTS DU BON: ".$numeroBonOrdonnance;
}
}
//var_dump($libelleMedicament );
//die();
?>
<?php if ( $codeTypePrestation=="PHAR" && $numeroBonOrdonnance != $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" value="<?= $numeroEntentePrealable ?> "
onClick="javascript:consulter_ententeprealable_pha_2(<?= $idDemandeententeprealable ?>);">
</td>
<td align='center'><?= dateheureLang($this->nettoyer($ententeprealable['dateSysteme'])) ?></td>
<td align='center'>
<a title='Voir les medicaments prescrits' href="javascript:afficherMedicamentsPrescrits('<?= $numeroFeuilleMaladie ?>');">
<span style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px;">
<?= $libelleMedicament ?>
</span>
</a>
</td>
<td align='center'><?= $this->nettoyer($ententeprealable['quantite']) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['prestataire']) ?></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 colspan="2" align="center" >
<input style="color:red;" type="button" value="<?= _("Historique") ?>"
onClick="javascript:afficherHistoriqueMedicament('<?= $ententeprealable['numeroBeneficiaire'] ?>');">
</td>
<!-- <td align="center">
<input style="color:red;" type="button" value="<?= _("Refuser") ?>"
onClick="javascript:refuser_ententeprealable_pha(<?= $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 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" value="<?= $numeroEntentePrealable ?> "
onClick="javascript:consulter_ententeprealable_pha_2(<?= $idDemandeententeprealable ?>);">
</td>
<td align='center'><?= dateheureLang($this->nettoyer($ententeprealable['dateSysteme'])) ?></td>
<td align='center'>
<?php if($codeMedicament=="MEDIC"): ?>
<a title='Voir les medicaments prescrits' href="javascript:afficherMedicamentsPrescrits('<?= $numeroFeuilleMaladie ?>');">
<span style="color:blue; background-color:#eeeeee; border:1px solid #000; border-radius:3px;">
<?= $libelleMedicament ?>
</span>
</a>
<?php else: ?>
<?= $libelleMedicament ?>
<?php endif; ?>
</td>
<td align='center'><?= $this->nettoyer($ententeprealable['quantite']) ?></td>
<td align='center'><?= $this->nettoyer($ententeprealable['prestataire']) ?></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_pha(<?= $idDemandeententeprealable ?>, <?= $facture ?>);">
</td>
<td align="center">
<input style="color:red;" type="button" value="<?= _("Refuser") ?>"
onClick="javascript:refuser_ententeprealable_pha(<?= $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 = $numeroBonOrdonnance; $numeroFeuilleMaladieOld = $numeroFeuilleMaladie; endforeach; ?>
</tbody>
</table>
</div>