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

446 lines
21 KiB
PHP
Executable File

<?php
$this->titre = "INTER-SANTE - Séances";
$numeroBonKine = $_SESSION['p_numeroBonKine_C'];
$numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C'] ;
$numeroBonSeance = "0";
$nbRestantOld = "0";
$ententePrealable = "0";
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
$badcodeGestionBon = "1";
$tab_gestion_bon = array("0", "1", "2");
if (in_array($codeGestionBon, $tab_gestion_bon))
{
$badcodeGestionBon = "0";
}
$vueParent = $_SESSION['p_vueRetour'];
?>
<script type="text/javascript">
</script>
<input class="sr-only" type="text" id="badcodeGestionBon" name="badcodeGestionBon" value= "<?= $badcodeGestionBon ?>" >
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
<input class="sr-only" type="text" id="nbBonsCons" name="nbBonsCons" Value="<?= $nbBonsCons ?>" >
<INPUT class="sr-only" TYPE="text" id="vueParent" name="vueParent" value="<?= $vueParent ?>">
<legend><?= _("Gestion des séances") ?></legend>
<?php if($numeroBonKine=="-1") : ?>
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "">
<div id="seance" onkeypress="javascript:ctrlkeypressordsea(event);">
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "0" >
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">
<input class="sr-only" type="text" id="facture" name="facture" >
<input class="sr-only" type="number" id="nbRestantOld" name="nbRestantOld" >
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td width="15%" align="center" class="required"> <?= _("Numéro de Bon").": " ?> </td>
<td width="20%">
<INPUT style='text-align:center; font-size:12pt;' class="form-control" TYPE="text" id="numeroBonKine" name="numeroBonKine"
onChange="javascript:chercher_ordonnance_sea_cso(this.value);" autofocus required AUTOCOMPLETE="OFF" >
</td>
<td > </td>
</tr>
</tbody>
</table>
</div>
<div id="ordonnance">
</div>
</div>
<?php else: ?>
<?php if ($numeroPrescriptionKine>" " && $contestation=="0") :
$facture = $this->nettoyer($prescription['facture']);
$nbRestantOld = $this->nettoyer($prescription['nbRestantOld']);
$codeActeSeance = $this->nettoyer($prescription['codeActeSeance']);
$numeroBonSeance = $this->nettoyer($prescription['numeroBonSeance']);
$ententePrealable = $this->nettoyer($prescription['ententePrealable']);
$motifSeance = $this->nettoyer($prescription['motifSeance']);
$agePrescription = $this->nettoyer($prescription['agePrescription']);
$bonCaduc = $this->nettoyer($prescription['bonCaduc']);
$dureeTraitement = $prescription['dureeTraitement'];
$rapportTraitement = $this->nettoyer($prescription['rapportTraitement']);
$nbFait = $compteSeance;
$nbFaitPrestataire = $compteSeancePrestataire;
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
{
$libelleActePrescription = $this->nettoyer($prescription['libelleActePrescriptionEng']);
}
else
{
$libelleActePrescription = $this->nettoyer($prescription['libelleActePrescription']);
}
$codeActePrescription = $prescription['codeActePrescription'];
$proformaAccorde = $prescription['proformaAccorde'];
$codePrestataireAccorde = $prescription['codePrestataireAccorde'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
?>
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "<?= $bonCaduc ?>" >
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "<?= $codeActeSeance ?>">
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">
<input class="sr-only" type="text" id="facture" name="facture" value="<?= $facture ?>" >
<input class="sr-only" type="number" id="nbRestantOld" name="nbRestantOld" value="<?= $nbRestantOld ?>" >
<table class="table table-responsive table-condensed" style='font-size:9pt;' >
<tbody>
<tr>
<td width="15%" class="required"> <?= _("Numéro de Bon").": " ?> </td>
<td width="10%">
<INPUT style='text-align:center; font-size:11pt;' class="form-control" TYPE="text" id="numeroBonKine" name="numeroBonKine"
value="<?= $numeroBonKine ?>" onChange="javascript:chercher_ordonnance_sea_cso(this.value);"
autofocus required AUTOCOMPLETE="OFF" >
</td>
<td width="10%" align="center" > <?= _("Prescrit le") ?> </td>
<td width="10%" > <INPUT 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"> <?= _("Médecin") ?> </td>
<td> <INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['medecinPrescription']) ?>" readonly style='font-size:9pt;'> </td>
<td width="7%" align="center"> <?= _("Tél Médecin") ?> </td>
<td width="15%"> <INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['telephoneMedecin']) ?>" readonly style='font-size:9pt;'> </td>
</tr>
</tbody>
</table>
<table class="table table-responsive table-condensed" style='font-size:9pt;' >
<tbody>
<!--
<tr>
<td width="7%" > <?= _("Souscripteur") ?> </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érent") ?> </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"> <?= _("Patient") ?> </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 Patient") ?> </td>
<td width="13%"> <INPUT class="form-control" TYPE="text" value="<?= $_SESSION['p_telephonePortableBeneficiaire_C']; ?>" readonly style='font-size:9pt;'> </td>
</tr>
-->
<tr>
<td colspan="8">
<INPUT style='font-size:12pt; font-weight: bold; background-color:#f5deb3 !important; color:#a0522d; text-align:center;' class="form-control" TYPE="text" id="taux" name="taux"
value="<?= 'TAUX DE COUVERTURE : '.$tauxCouverture ?>" onChange="" readonly >
</td>
</tr>
</tbody>
</table>
</div>
<div class="alert alert-danger" style="text-align:center; height:38px; padding:5px;" >
<H4><?= _("Prescrit à").": ".$this->nettoyer($prescription['prestatairePrescription']) ?></H4>
</div>
<div id ="div_wait">
</div>
<div id="ordonnance">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="15%"> <?= _("Renseignement Clinique") ?> </td>
<td colspan="7"><input type="text" id="motifSeance" name="motifSeance" style="font-size:10pt;" class="form-control" value="<?= $motifSeance ?>" readonly ></td>
</tr>
<tr>
<td > <?= _("Acte Prescrit") ?> </td>
<?php if($ententePrealable=='2'): ?>
<td colspan="5" style='background-color: yellow; font-size:13pt; font-weight:bold;'> <?= $libelleActePrescription ?> </td>
<?php elseif($ententePrealable=='1'): ?>
<td colspan="5" style='background-color: #00ff00; font-size:13pt; font-weight:bold;'> <?= $libelleActePrescription ?> </td>
<?php elseif($ententePrealable=='9'): ?>
<td colspan="5" style='background-color: red;color:white; font-size:13pt; font-weight:bold;'> <?= $libelleActePrescription ?> </td>
<?php else: ?>
<td colspan="5" style="background-color: #5c656a; color:white; font-size:13pt; font-weight:bold;"> <?= $libelleActePrescription ?> </td>
<?php endif; ?>
<td align="center" class="required"><?= _("Durée (Jour)") ?></td>
<td>
<input style="font-size:10pt;" type="number" id="dureeTraitement" name="dureeTraitement" class="form-control" value="<?= $dureeTraitement ?>" type="text" required onchange="javascript:maj_duree_traitement_seance_cso();">
</td>
</tr>
<tr>
<td > <?= _("Nombre Prescrit") ?> </td>
<td width="15%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="nbSeance" name="nbSeance" value="<?= $this->nettoyer($prescription['nbSeance']) ?>" readonly > </td>
<td width="10%" align="center"> <?= _("Nombre Modifié") ?> </td>
<td width="15%" > <input class="form-control" style="background-color:blue !important;color:white; text-align: center; font-size:10pt;" type="number" id="quantiteCorrigee " name="quantiteCorrigee " value="<?= $this->nettoyer($prescription['quantiteCorrigee']) ?>" readonly > </td>
<td width="10%" align="center"> <?= _("Nombre Effectué") ?> </td>
<td width="15%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="nbLivreOld" name="nbLivreOld" value="<?= $this->nettoyer($prescription['nbLivreOld']) ?>" readonly > </td>
<td width="10%" align="center"> <?= _("Nombre Restant") ?> </td>
<td width="15%"> <input class="form-control" style="background-color:red !important;color:white; text-align: center; font-size:10pt;" type="number" id="nbRestant" name="nbRestant" value="<?= $this->nettoyer($prescription['nbRestantOld']) ?>" readonly > </td>
</tr>
<tr style='background-color:white'>
<td colspan="8" height="20"></td>
</tr>
</tbody>
</table>
</div>
<?php if($ententePrealable<2): ?>
<div id="div_facturation_seance" style="margin-bottom:20px;">
<input class="sr-only" type="number" id="fraisRetenuSeance" name="fraisRetenuSeance" value="0" >
<?php if($nbRestantOld>"0") : ?>
<?php if($this->nettoyer($prescription['bonCaduc'])=="0" or $modeSaisieFacture==1) : ?>
<?php if($nbFait == '0' && $_SESSION['proforma_envoye'] == '0' && $codePrestataireAccorde ==''): ?>
<button type="button" id="btn_proforma" name="btn_proforma" class="form-control btn btn-info" style="font-weight:bold; font-size:12pt;" onclick="javascript:proforma_seance_cso('<?= $codeActePrescription ?>');"> <?= _("Envoyer une demande d'accord préalable...") ?></button>
<?php elseif($_SESSION['proforma_envoye']=='1' && $proformaAccorde=='0' && $codePrestataireAccorde ==''): ?>
<!--<button type="button" id="btn_actualiser" name="btn_actualiser" class="form-control btn btn-primary" style='font-size:12pt;' onclick="javascript:actualiser_seance_cso()"> <?= _("Actualiser") ?></button>-->
<marquee behavior="scroll" direction="left" scrollamount="10" style="color:red; background-color:yellow; font-size:14pt">
<?= _("Veuillez patienter, votre demande sera traitée dans un court instant! Merci.") ?>
</marquee>
<?php elseif($_SESSION['proforma_envoye']=='1' && $proformaAccorde=='1' && $codePrestataireAccorde == $codePrestataire): ?>
<button type="button" id="btn_InitSession" name="btn_InitSession" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popInitSession" style='font-size:12pt;' > <?= _("Commencer les séances de")." ".$libelleActePrescription."..." ?></button>
<?php else: ?>
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
<H4 ><?= _("SEANCES IMPOSSIBLES A REALISER CAR ACCORDEES A UN AUTRE PRESTATAIRE.") ?> </H4>
</div>
<?php endif; ?>
<?php else: ?>
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
<H4> Age => <?= $this->nettoyer($prescription['agePrescription']) . " "._("jours") . " => " . _("BON CADUC") ?> </H4>
</div>
<?php endif; ?>
<?php else: ?>
<?php if ($numeroPrescriptionKine>"0") :
require('seanceseffectuees.php');
?>
<div class="alert alert-danger" style="height:38px; padding:5px;" >
<H4><?= _("Séances terminées!") ?></H4>
</div>
<table class="table table-responsive table-condensed" style='font-size:10pt;' >
<tbody>
<?php if($facture == '0'): ?>
<tr>
<td colspan="3"><textarea style='font-size:10pt;' id ="rapportTraitement" name="rapportTraitement" rows="20" class="form-control-lg" placeholder="<?= _('Rapport traitement ici') ?>" required AUTOCOMPLETE="OFF" autofocus style="width:100%;" onchange="javascript:enregistrer_rapport_seance();"><?= $rapportTraitement;?></textarea></td>
</tr>
<!--
<tr>
<td colspan="3" align="center"> <input style='font-size:10pt;' type="button" class = "form-control btn btn-primary" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrer_rapport_seance();"> </td>
</tr>
-->
<?php else: ?>
<tr>
<td colspan="3"><textarea style='font-size:10pt;' id ="rapportTraitement" name="rapportTraitement" rows="20" class="form-control-lg" placeholder="<?= _('Rapport traitement ici') ?>" disabled style="width:100%;"><?= $rapportTraitement;?></textarea></td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($codePrestataireAccorde =='' || $codePrestataireAccorde == $codePrestataire): ?>
<div id="recap">
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td align="center" width="15%" style="font-weight: bold;"> <?= _("Réclamé") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($totalseances['fraisReel_total']) ?>" readonly style="text-align: center; font-size:12pt; font-weight:bold;" > </td>
<td align="center" width="13%" style="font-weight: bold;"> <?= _("Part Assuré") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($totalseances['montantTm_total']+$totalseances['depassement_total']) ?>" readonly style="text-align: center; font-size:12pt; 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($totalseances['montantArembourser_total']) ?>" readonly style="text-align: center; font-size:12pt; font-weight:bold;" > </td>
</tr>
</tbody>
</table>
</div>
<?php
require('seanceseffectuees.php');
?>
<?php endif; ?>
<?php else: ?>
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "0" >
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "">
<div id="laboratoire" onkeypress="javascript:ctrlkeypressordsea(event);">
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">
<input class="sr-only" type="text" id="facture" name="facture" >
<input class="sr-only" type="number" id="nbRestantOld" name="nbRestantOld" >
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td width="15%" align="center" class="required"> <?= _("Numéro de Bon").": " ?> </td>
<td width="20%">
<INPUT style='text-align:center; font-size:12pt;' class="form-control" TYPE="text" id="numeroBonKine" name="numeroBonKine"
onChange="javascript:chercher_ordonnance_sea_cso(this.value);" autofocus required AUTOCOMPLETE="OFF" >
</td>
<td > </td>
</tr>
</tbody>
</table>
</div>
<div id="ordonnance">
</div>
</div>
<?php if($contestation== "1"): ?>
<div class="alert alert-danger" style="height:38px; padding:5px;" >
<H4><?= _("Dossier médical contesté! Impossible de faire les séances prescrites au patient.") ?></H4>
</div>
<?php else: ?>
<div class="alert alert-danger" style="height:38px; padding:5px;" >
<H4><?= _("Numéro de Bon") . " " .$numeroBonKineSearch. " "._("introuvable"). " !" ?></H4>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<div id="loadingDiv" style="display: none">
<div class="ajax-mask"><div class="loading"><img src="Bootstrap/images/loading-spinner-grey.gif"/> <?= _("Veuillez patienter...") ?> </span></div></div>
</div>
<!-- pour sélctionner un nouveau bon -->
<div class="modal fade" id="popInitSession" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button id="btn_close_pop_session" name="btn_close_pop_session" type="button" class="close" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
<h4 class="modal-title"><?= _("Attribuer un bon...") ?> </h4>
</div>
<div class="modal-body">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="20%" > <?= _("Bons Disponibles") ?> </td>
<td width="30%" > <input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $nbBonsCons ?>" readonly > </td>
<td width="15%" align="center" > <?= _("Gestion") ?> </td>
<td>
<?php if($badcodeGestionBon=="1") : ?>
<input class="form-control" style="text-align: center; font-size:10pt; background-color: red;color:white;" Value="<?= _("INCONNU") ?>" readonly >
<?php else: ?>
<input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $typeGestionbon ?>" readonly >
<?php endif; ?>
</td>
</tr>
</tbody>
</table>
<div id="infosbon">
<?php if ($badcodeGestionBon=="1") : ?>
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
<H4> <?= _("REVOIR LE TYPE DE GESTION DES BONS") ?> </H4>
</div>
<?php else: ?>
<?php if($codeGestionBon!="0"): ?>
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="1">
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="1">
<input class="sr-only" type="text" id="numeroBon" name="numeroBon" value="1">
<?php if($codeGestionBon=="1" && $nbBonsCons<1): ?>
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
</div>
<?php else: ?>
<input id="btn_enreg_bon_kine" name="btn_enreg_bon_kine" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrerbonsseancekine();" style='font-size:10pt;' >
<?php endif; ?>
<?php else: ?>
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="">
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="0">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<?php if($nbBonsCons<1): ?>
<tr>
<input class="sr-only" type="number" id="numeroBon" name="numeroBon" required AUTOCOMPLETE="OFF" >
<td>
<div class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
</div>
</td>
</tr>
<?php else: ?>
<tr>
<td width="15%" class="required"> <?= _("Numéro de Bon").": " ?> </td>
<td width="20%" >
<input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" required AUTOCOMPLETE="OFF"
onChange="javascript:ajaxinfosbonseancekine();" onkeypress="javascript:ctrlkeypress_numeroBon(event);" ></td>
<td width="15%" > </td>
<td><input id="btn_enreg_bon_kine" name="btn_enreg_bon_kine" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" disabled style='font-size:10pt;' ></td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (isset($msgErreur)): ?>
<div id ="msgErreur" class="alert alert-danger" style="height:38px; padding:5px;" >
<H4><?= $msgErreur ?></H4>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="modal-footer">
<button id="close_pop_acte" name="close_pop_acte" type="button" class="btn btn-default" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
</div>
</div>
</div>
</div>
<input class="sr-only" type="text" id="ententePrealableSea" name="ententePrealableSea" Value="<?= $ententePrealable ?>" >