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

261 lines
11 KiB
PHP
Executable File

<?php
$actVisible = $_SESSION['p_actVisible'];
$dateDebutHospit = $this->nettoyer($feuillemaladie['dateDebutHospit']);
$dureeHospit = $this->nettoyer($feuillemaladie['dureeHospit']);
$dureeCorrigeeHospit = $this->nettoyer($feuillemaladie['dureeCorrigeeHospit']);
$dateFinHospit = $this->nettoyer($feuillemaladie['dateFinHospit']);
$prolongationHospit = $this->nettoyer($feuillemaladie['prolongationHospit']);
$dateDebutPrologation = $this->nettoyer($feuillemaladie['dateDebutPrologation']);
$dureeProlongation = $this->nettoyer($feuillemaladie['dureeProlongation']);
$dureeCorrigeeProlongation = $this->nettoyer($feuillemaladie['dureeCorrigeeProlongation']);
$dateFinProlongation = $this->nettoyer($feuillemaladie['dateFinProlongation']);
$numeroChambreProlongation = $this->nettoyer($feuillemaladie['numeroChambreProlongation']);
$motifHospitalisation = $this->nettoyer($feuillemaladie['motifHospitalisation']);
$instructionHospit = $this->nettoyer($feuillemaladie['instructionHospit']);
$idProlongationFeuille = $this->nettoyer($feuillemaladie['idProlongation']);
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
$typeHospitInit = $this->nettoyer($feuillemaladie['typeHospitInit']);
$typeHospit = $this->nettoyer($feuillemaladie['typeHospit']);
}
else
{
$typeHospitInit = $this->nettoyer($feuillemaladie['typeHospitInit']);
$typeHospit = $this->nettoyer($feuillemaladie['typeHospit']);
}
$typeHospitInit = $typeHospitInit =='' ? $typeHospit: $typeHospitInit;
$facture = $this->nettoyer($feuillemaladie['facture']);
$bonCaduc = $this->nettoyer($feuillemaladie['bonCaduc']);
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
if($modeSaisieFacture=="1")
{
$bonCaduc = "0";
}
//var_dump($facture);
//var_dump($bonCaduc);
//$totalHospitalisation = $prestations_total['fraisReel'];
?>
<input class="sr-only" id="nbreActeEntentePrealable" name="nbreActeEntentePrealable" type="text" value= "<?= $nbreActeEntentePrealable; ?>" >
<input class="sr-only" id="nbreProlongation" name="nbreProlongation" type="text" value= "<?= count($listeProlongations); ?>" >
<input class="sr-only" id="prixChambreProlongation" name="prixChambreProlongation" type="text" value= "<?= $prixChambreProlongation; ?>" >
<input class="sr-only" id="idProlongation" name="idProlongation" type="text" value= "<?= $idProlongation; ?>" >
<input class="sr-only" id="nbreActesSansPrixPro" name="nbreActesSansPrixPro" type="text" value= "<?= $nbreActesSansPrix; ?>" >
<input class="sr-only" id="noChambrePro" name="noChambrePro" type="text" value= "<?= $noChambrePro; ?>" >
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
<thead>
<tr>
<th width="5%" style='text-align:center'> <?= _("Suppr") ?> </th>
<th style="text-align:center"> <?= _("Acte <b> - [Plafond]</b>") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Accord") ?> </th>
<th style="text-align:center"> <?= _("PU Réclamé") ?> </th>
<th style="text-align:center"> <?= _("PU Appliqué") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th style="text-align:center"> <?= _("PT Réclamé") ?> </th>
<th style="text-align:center"> <?= _("PT Appliqué") ?> </th>
<th style="text-align:center"> <?= _("TM") ?> </th>
<th style="text-align:center"> <?= _("Mont. TM") ?> </th>
<th style="text-align:center"> <?= _("A Remb") ?> </th>
<th style="text-align:center"> <?= _("Dépass") ?> </th>
<th style="text-align:center"> <?= _("Motif") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<?php
$prolongations_total_reclame = $this->nettoyer($prolongations_total['totalPrixManuel']);
?>
<td colspan="6" style='text-align:center'> <?= _("Total (".count($prolongations).")") ?> </td>
<td align='center'><?= format_N($prolongations_total_reclame) ?></td>
<td align='center'><?= format_N($this->nettoyer($prolongations_total['fraisReel'])) ?></td>
<td></td>
<td align='center'><?= format_N($this->nettoyer($prolongations_total['montantTm'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prolongations_total['montantArembourser'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prolongations_total['depassement'])) ?></td>
<td></td>
</tr>
<?php if($prolongations_total_reclame == "0"): ?>
<tr style='background-color:white'>
<td colspan="13" height="8"></td>
</tr>
<tr>
<td colspan="13" style="background-color:yellow">
<marquee behavior="scroll" direction="left" scrollamount="10" style="background-color:yellow; color:red; font-size:12pt">
<?= _("Veuillez saisir vos prix de prestation dans la zone PU Réclamé ou cliquer sur le bouton rouge pour retirer les lignes qui n'ont pas de prix. Merci pour votre compréhension.") ?>
</marquee>
</td>
</tr>
<?php endif; ?>
</tfoot>
<!-- -->
<tbody>
<?php
foreach ($prolongations as $prolongation):
$idPrestationactes=$this->nettoyer($prolongation['id']);
$supprimable = $prolongation['supprimable'];
$codeTypePrestation=$this->nettoyer($prolongation['codeTypePrestation']);
$ententePrealable=$this->nettoyer($prolongation['ententePrealable']);
$autorisation=$this->nettoyer($prolongation['autorisation']);
$codeTarifActe=$this->nettoyer($prolongation['codeTarifActe']);
$libelleConsommable=$this->nettoyer($prolongation['libelleConsommable']);
$valeurActeManuel = $this->nettoyer($prolongation['valeurActeManuel']);
if($valeurActeManuel == "0" ){
$valeurActeManuel = $this->nettoyer($prolongation['prixPrestataire']);
}
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
$libelleActe = substr($this->nettoyer($prolongation['libelleActeEng']),0,40);
}
else
{
$libelleActe = substr($this->nettoyer($prolongation['libelleActe']),0,40);
}
$codeActe = $this->nettoyer($prolongation['codeActe']);
if($codeActe == "CSM"){
$libelleActe = substr($libelleConsommable,0,40);
}
if($actVisible!="1")
{
$libelleActe = $codeActe;
}
$valeurActe = $this->nettoyer($prolongation['valeurActe']);
$plafondActe = $this->nettoyer($prolongation['plafondActe']);
$plafond = (($plafondActe == $valeurActe) && ($valeurActe > "0"))?"1":"0";
$idProlongation = $this->nettoyer($prolongation['idProlongation']);
if ($plafondActe > "0" && $plafondActe !="9999999999"){
$forfaitPlafond = " - [".format_N($plafondActe)."]";
}else{
$forfaitPlafond = "";
}
//
$prixTarif = $this->nettoyer($prolongation['prixTarif']);
//var_dump($codeTarifActe!="CHAMB" && $valeurActe=="0");
$codeMotifDepassement = $this->nettoyer($prolongation['codeMotifDepassement']);
$motif = $this->nettoyer($prolongation['motif']);
$motifEng = $this->nettoyer($prolongation['motifEng']);
$tarif = $this->nettoyer($prolongation['tarif']);
$prixModifiableEnHospit = $this->nettoyer($prolongation['tarif']);
$acteChambre = $this->nettoyer($prolongation['acteChambre']);
?>
<tr valign="top">
<?php if ($supprimable=="0" || $facture=='1' || $bonCaduc=='1' || $ententePrealable=='1'): ?>
<td> </td>
<?php elseif ($idProlongationFeuille != $idProlongation): ?>
<td> </td>
<?php else: ?>
<?php if ($acteChambre=="0" || $valeurActe=="0" || $ententePrealable=='2'): ?>
<td>
<button type="button" class="form-control btn btn-danger" onClick="javascript:supprimer_acte_medical_hospitalisation('<?= $idPrestationactes ?>', '<?= $codeTypePrestation ?>');">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</td>
<?php else: ?>
<td></td>
<?php endif; ?>
<?php endif; ?>
<td > <?= $libelleActe."<b style='color:red'>".$forfaitPlafond."</b>" ?> </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; ?>
<td align='center'>
<?php if($facture=='1' || $bonCaduc=='1' || $idProlongationFeuille != $idProlongation || $prixModifiableEnHospit == "0"): ?>
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
<?= format_N($valeurActeManuel) ?>
</button>
<?php else: ?>
<td align='center' width="13%">
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= format_N($valeurActeManuel) ?>"
onChange="ajax_maj_prix_acte_hospitalisation('<?=$idPrestationactes?>', this.value, this);" onBlur="formatMonetaire(this);" onkeyup="controle_numerique(this);" onfocus="formatNumerique(this);">
</td>
<?php endif; ?>
</td>
<td align='center'> <?= format_N($this->nettoyer($prolongation['valeurActe'])) ?></td>
<?php if($facture=='1' || $bonCaduc=='1' || $ententePrealable=='1'): ?>
<td align='center'><?= $this->nettoyer($prolongation['quantite']) ?></td>
<?php elseif ($idProlongationFeuille != $idProlongation): ?>
<td align='center'> <?= format_N($this->nettoyer($prolongation['quantite'])) ?></td>
<?php else: ?>
<?php if ($acteChambre=="0" || $valeurActe=="0") : ?>
<td align='center'>
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($prolongation['quantite']) ?>"
onchange="ajax_maj_qte_acte_hospitalisation('<?=$idPrestationactes?>', this.value, this);" onBlur="controle_numerique(this);">
</td>
<?php else: ?>
<td align='center'><?= $this->nettoyer($prolongation['quantite']) ?></td>
<?php endif; ?>
<?php endif; ?>
<td align='center'> <?= format_N($this->nettoyer($prolongation['prixManuel'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prolongation['fraisReel'])) ?></td>
<td align='center'> <?= $this->nettoyer($prolongation['tm'])?></td>
<td align='center'> <?= format_N($this->nettoyer($prolongation['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prolongation['montantArembourser'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prolongation['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="13" height="8"></td>
</tr>
</tbody>
</table>