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

481 lines
20 KiB
PHP
Executable File

<?php if($feuille['facture']=='0' && $feuille['bonCaduc']=='0'): ?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<!--
<td width="7%"> <?= _("Famille Actes") ?> </td>
-->
<td >
<SELECT class="sr-only" id="codeFamilleActe" NAME="codeFamilleActe" required AUTOCOMPLETE="OFF" onChange="ajaxactespossibles_selection_hospitalisation();" style='font-size:10pt;' >
<?php liste_options($familleacte,$_SESSION['codeFamilleActeHos'],true); ?>
</SELECT>
</td>
</tr>
</tbody>
</table>
<?php else:
$actVisible = $_SESSION['p_actVisible'];
?>
<div id="div_findelaicarence">
</div>
<?php
$dateDebutHospit = $this->nettoyer($feuillemaladie['dateDebutHospit']);
$facture = $this->nettoyer($feuillemaladie['facture']);
$bonCaduc = $this->nettoyer($feuillemaladie['bonCaduc']);
$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']);
$noChambre = $this->nettoyer($feuillemaladie['numeroChambre']);
//var_dump($idProlongationFeuille);
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;
$totalHospitalisation = $hospit_total['fraisReel'];
?>
<input class="sr-only" id="nbreProlongation" name="nbreProlongation" type="text" value= "<?= count($listeProlongations); ?>" >
<input class="sr-only" id="prolongationHospit" name="prolongationHospit" type="text" value= "<?= $prolongationHospit; ?>" >
<input class="sr-only" id="totalHospitalisation" name="totalHospitalisation" type="text" value= "<?= $totalHospitalisation; ?>" >
<div id="div_prestations" >
<div id="recap">
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<?php
$hospit_total_reclame = $hospit_total['totalPrixManuel'];
?>
<td align="center"width="10%"> <?= _("Réclamé") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($hospit_total_reclame) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; background-color:#5f9ea0; color:white;"> </td>
<td align="center" width="13%"> <?= _("Part Assuré") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($hospit_total['montantTm']+$hospit_total['depassement']) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; background-color:#ba74d4; color:white;"> </td>
<td align="center" > <?= _("A Remb.") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($hospit_total['montantArembourser']) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; background-color:rgba(255, 0, 127); color:white;"> </td>
</tr>
<?php if ($facture=="1" || $bonCaduc=="1"): ?>
<tr>
<td colspan="6">
</td>
</tr>
<?php else: ?>
<?php if($plafondHospitalisation != "9999999999" && $plafondHospitalisation > "0" && $hospit_total['montantArembourser'] >= $plafondHospitalisation): ?>
<tr>
<td colspan="6">
<marquee behavior="scroll" direction="left" scrollamount="15" style="color:white; background-color:red; font-size:14pt; font-weight:bold;">
<?= _("Le patient à atteint son plafond pour la garantie d'hospitalisation. Par conséquent, tous ses frais supplémentaires qui seront générés seront entièrement à sa charge.")." ".$_SESSION['p_nomSociete_C']." ". _("vous remercie.") ?>
</marquee>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
</tbody>
</table>
</div>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td colspan="8" align="center">
<legend > <?= _("DETAIL HOSPITALISATION") ?></legend >
</td>
</tr>
</tbody>
</table>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="5%" align="center"> <?= _("Début") ?> </td>
<td align="center">
<INPUT class="form-control datepicker" TYPE="text" id="dateDebutHospit" style="font-size:10pt;text-align: center;" value="<?=($dateDebutHospit != '') ? datefr($dateDebutHospit) : datefr(date('Y-m-d'))?>" onchange="javascrpit:majDebutHospitalisation();" disabled>
</td>
<td width="5%" align="center"> <?= _("Durée") ?> </td>
<td width="10%">
<input class="form-control" type="text" id="dureeHospit" name="dureeHospit" style="font-size:10pt;text-align: center;" Value="<?=$dureeHospit?>" onChange="javascrpit:majDureeHospitalisation();" disabled>
</td>
<td width="5%" align="center"> <?= _("Corrigée") ?> </td>
<td width="10%">
<input class="form-control" type="text" id="dureeCorrigeeHospit" name="dureeCorrigeeHospit" style="background-color: rgb(255,0,0);text-align: center; font-size:10pt; color:white;" Value="<?=$dureeCorrigeeHospit?>" disabled>
</td>
<?php if ($facture=="1" || $bonCaduc=="1"): ?>
<td width="11%" align="center"> <?= _("No Chambre") ?> </td>
<td width="9%"><input id="noChambre" name="noChambre" style="font-size:10pt; text-align:center;" class="form-control" value="<?=$noChambre?>" type="text" disabled> </td>
<?php else: ?>
<td width="11%" align="center" class="required"> <?= _("No Chambre") ?> </td>
<td width="9%"><input id="noChambre" name="noChambre" style="font-size:10pt; text-align:center;" class="form-control" value="<?=$noChambre?>" type="text" onchange="javascrpit:majChambreHospitalisation();" required AUTOCOMPLETE="OFF" > </td>
<?php endif; ?>
<td width="5%" align="center"> <?= _("Fin") ?> </td>
<td>
<INPUT class="form-control" TYPE="text" id="dateFinHospitalisation" name="dateFinHospitalisation" style="font-size:10pt;text-align: center;" value="<?=datefr($dateFinHospit)?>" disabled>
</td>
</tr>
<?php if($dateDebutHospit != ''): ?>
<tr id="tr_type">
<td width="5%" > <?= _("Type") ?> </td>
<td colspan="9">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$typeHospitInit?>" disabled>
</td>
</tr>
<?php else: ?>
<tr id="tr_type">
<td width="5%" > <?= _("Type") ?> </td>
<?php if($plafondActeHospit == "9999999999" || $plafondActeHospit == "0"): ?>
<td colspan="9">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$typeHospit?>" disabled>
</td>
<?php else: ?>
<td colspan="7">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$typeHospit?>" disabled>
</td>
<td width="5%" > <?= _("Plafond") ?> </td>
<td >
<INPUT class="form-control" TYPE="text" style="font-size:10pt; font-weight:bold; text-align:center; background-color:#f5fffa; color:red;" value="<?=format_N($plafondActeHospit)?>" disabled>
</td>
<?php endif; ?>
</tr>
<?php endif; ?>
<?php if($plafondActeHospit > "9999999999" && $plafondActeHospit > "0" && $prestations_total['montantArembourser'] >= $plafondActeHospit): ?>
<tr>
<td colspan="10">
<marquee behavior="scroll" direction="left" scrollamount="10" style="color:white; background-color:red; font-size:14pt; font-weight:bold;">
<?= _("Le")." ".$typeHospit." "._("est atteint!") ?>
</marquee>
</td>
</tr>
<?php endif; ?>
<tr>
<td colspan="10" align="center">
<a style="font-size:12pt;" href="javascript:aff();"><span id="aff"><?= _("Afficher + de détails...") ?></span></a><a style="font-size:12pt;" href="javascript:cach();"><span id="cach"><?= _("Masquer les détails...")?></span></a>
</td>
</tr>
<tr id="tr_motif">
<td width="5%" > <?= _("Motif") ?> </td>
<td colspan="9">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$motifHospitalisation?>" disabled>
</td>
</tr>
<tr id="tr_instruction">
<td width="5%" > <?= _("Instruc") ?> </td>
<td colspan="9">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$instructionHospit?>" disabled>
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
<thead>
<tr>
<th style="text-align:center"> <?= _("Acte / Plafond") ?> </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"> <?= _("T M") ?> </th>
<th style="text-align:center"> <?= _("A Remb") ?> </th>
<th style="text-align:center"> <?= _("Dépass") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<?php
$prestation_total_reclame = $this->nettoyer($prestations_total['totalPrixManuel']);
?>
<td colspan="4" style='text-align:center'> <?= _("Total (".count($prestations).")") ?> </td>
<td align='center'><?= format_N($prestation_total_reclame) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['fraisReel'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantTm'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantArembourser'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['depassement'])) ?></td>
</tr>
</tfoot>
<tbody>
<?php
$tab = array("HOSGRP","HOSMED","HOSCHI");
foreach ($prestations as $prestation):
$idPrestationactes=$this->nettoyer($prestation['id']);
$supprimable = $prestation['supprimable'];
$codeTypePrestation=$this->nettoyer($prestation['codeTypePrestation']);
$ententePrealable=$this->nettoyer($prestation['ententePrealable']);
$autorisation=$this->nettoyer($prestation['autorisation']);
$codeTarifActe=$this->nettoyer($prestation['codeTarifActe']);
$valeurActeManuel = $this->nettoyer($prestation['valeurActeManuel']);
if($valeurActeManuel == "0" ){
$valeurActeManuel = $this->nettoyer($prestation['prixPrestataire']);
}
$libelleConsommable=$this->nettoyer($prestation['libelleConsommable']);
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
$libelleActe = substr($this->nettoyer($prestation['libelleActeEng']),0,57);
}
else
{
$libelleActe = substr($this->nettoyer($prestation['libelleActe']),0,57);
}
$codeActe = $this->nettoyer($prestation['codeActe']);
if($codeActe == "CSM"){
$libelleActe = substr($libelleConsommable,0,57);
}
if($actVisible!="1")
{
$libelleActe = $codeActe;
}
$valeurActe = $this->nettoyer($prestation['valeurActe']);
$plafondActe = $this->nettoyer($prestation['plafondActe']);
$plafond = (($plafondActe == $valeurActe) && ($valeurActe > "0"))?"1":"0";
if ($plafondActe > "0" && $plafondActe !="9999999999"){
$forfaitPlafond = " / ".format_N($plafondActe);
}else{
$forfaitPlafond = "";
}
$tarif = $this->nettoyer($prestation['tarif']);
?>
<?php if($ententePrealable=='2' || $autorisation=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable=='1' || $autorisation=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable=='9' || $autorisation=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td > <?= $libelleActe.$forfaitPlafond ?> </td>
<td align='center'><?= format_N($valeurActeManuel) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['valeurActe'])) ?></td>
<td align='center'><?= $this->nettoyer($prestation['quantite']) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['prixManuel'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['fraisReel'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantArembourser'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['depassement'])) ?></td>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="10" height="8"></td>
</tr>
</tbody>
</table>
<?php if ($prolongationHospit=="1"): ?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td colspan="8" align="center">
<legend><?= _("DETAILS PROROGATIONS") ?></legend>
</td>
</tr>
</tbody>
</table>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<?php
$i = 0;
foreach ($listeProlongations as $v):
$idProlongation =$this->nettoyer($v['id']);
$plafondActeProlongation = $this->nettoyer($v['plafondActeProlongation']);
$totalArembourserProlongation = $this->nettoyer($v['totalArembourserProlongation']);
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
$typeHospit = $this->nettoyer($v['typeHospitEng']);
}
else
{
$typeHospit = $this->nettoyer($v['typeHospit']);
}
$i++;
?>
<tr>
<td width="5%" align="center"> <?= _("Numéro") ?> </td>
<td align="center">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;text-align: center;" value="<?= $i?>" disabled>
</td>
<td width="5%" align="center"> <?= _("Début") ?> </td>
<td align="center">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;text-align: center;" value="<?=datefr($this->nettoyer($v['debut']))?>" disabled>
</td>
<td width="5%" align="center"> <?= _("Durée") ?> </td>
<td width="8%">
<input class="form-control" type="text" style="font-size:10pt;text-align: center;" Value="<?=$this->nettoyer($v['duree'])?>" disabled>
</td>
<td width="5%" align="center"> <?= _("Corrigée") ?> </td>
<td width="8%">
<input class="form-control" type="text" style="background-color: rgb(255,0,0);text-align: center; font-size:10pt; color:white;" Value="<?=$this->nettoyer($v['dureeCorrigee'])?>" disabled>
</td>
<?php if ($facture=="1" || $bonCaduc=="1"): ?>
<td width="11%" align="center"> <?= _("No Chambre") ?> </td>
<td width="8%"><input style="font-size:10pt; text-align:center;" class="form-control" id="noChambrePro<?= $i?>" name="noChambrePro<?= $i?>" type="text" Value="<?=$this->nettoyer($v['numeroChambre'])?>" disabled></td>
<?php else: ?>
<td width="11%" align="center" class="required"> <?= _("No Chambre") ?> </td>
<td width="8%"><input style="font-size:10pt; text-align:center;" class="form-control" id="noChambrePro<?= $i?>" name="noChambrePro<?= $i?>" type="text" Value="<?=$this->nettoyer($v['numeroChambre'])?>" onchange="javascrpit:majChambreProrogation('<?= $idProlongation?>',this.value);" required AUTOCOMPLETE="OFF" ></td>
<?php endif; ?>
<td width="5%" align="center"> <?= _("Fin") ?> </td>
<td>
<INPUT class="form-control" TYPE="text" style="font-size:10pt;text-align: center;" value="<?=datefr($this->nettoyer($v['fin']))?>" disabled>
</td>
</tr>
<tr id="tr_type<?= $i?>">
<td width="5%" > <?= _("Type") ?> </td>
<?php if($plafondActeProlongation == "9999999999" || $plafondActeProlongation == "0"): ?>
<td colspan="11">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$typeHospit?>" disabled>
</td>
<?php else: ?>
<td colspan="9">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$typeHospit?>" disabled>
</td>
<td width="5%" > <?= _("Plafond") ?> </td>
<td >
<INPUT class="form-control" TYPE="text" style="font-size:10pt; font-weight:bold; text-align:center; background-color:#f5fffa; color:red;" value="<?=format_N($plafondActeProlongation)?>" disabled>
</td>
<?php endif; ?>
</tr>
<?php if($plafondActeProlongation > "0" && $plafondActeProlongation !="9999999999" && $totalArembourserProlongation > "0" && $totalArembourserProlongation >= $plafondActeProlongation): ?>
<tr>
<td colspan="12">
<marquee behavior="scroll" direction="left" scrollamount="6" style="background-color:yellow; color:red; font-size:14pt">
<?= _("Le plafond de l'".$typeHospit." "."est atteint!") ?>
</marquee>
</td>
</tr>
<?php endif; ?>
<tr>
<td colspan="12" align="center">
<a style="font-size:12pt;" href="javascript:affLigneTab(<?= $i?>);"><span id="aff<?= $i?>">Afficher + de détails...</span></a><a style="font-size:12pt;" href="javascript:cachLigneTab(<?= $i?>);"><span id="cach<?= $i?>">Masquer les détails...</span></a>
</td>
</tr>
<tr id="tr_motif<?= $i?>">
<td width="5%" > <?= _("Motif") ?> </td>
<td colspan="11">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$this->nettoyer($v['motifProlongation'])?>" disabled>
</td>
</tr>
<tr id="tr_instruction<?= $i?>">
<td width="5%" > <?= _("Instruc") ?> </td>
<td colspan="11">
<INPUT class="form-control" TYPE="text" style="font-size:10pt;" value="<?=$this->nettoyer($v['motifAssure'])?>" disabled>
</td>
</tr>
<tr>
<td colspan="12">
<script>
affiche_prestations_prolongation(<?= $idProlongation?>,<?= $i?>);
</script>
</td>
</tr>
<tr>
<td colspan="12">
<div id="div_prestations_prolongation<?= $i?>">
</div>
</td>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="10" height="8"></td>
</tr>
</tbody>
</table>
<?php endif; ?>
</div>
<?php endif; ?>