prestation/Vue/Fichebeneficiaire/index.php
2025-12-01 18:54:33 +00:00

779 lines
40 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<INPUT class="sr-only" TYPE="text" id="nomForm" NAME="nomForm" value="ficheBeneficiaire">
<INPUT class="sr-only" TYPE="text" id="todDay" NAME="todDay" value="<?= date('d/m/Y') ?>">
<?php
$this->titre = "INTER-SANTE - Fiche Bénéficiaire";
$datejour = $this->datejour;
$estcouvert = ($_SESSION['p_dateEcheancePolice_C']>=$datejour);
$_SESSION['p_nbTentative'] = "0";
$age = $beneficiaire['ageBeneficiaire'];
$_SESSION['nuit']= $nuit ;
$estidentifiable = ($age>6);
$estsubstitue = ($_SESSION['p_idSubstitut_C']>0);
$college_couvert = $_SESSION['p_college_couvert_C'];
$derogation_en_cours = $_SESSION['p_derogation_en_cours_C'];
$dateSortieBeneficiaire = $this->nettoyer($beneficiaire['dateSortieBeneficiaire']);
$estsorti = false;
// maj 15/10/2018 => si dateSortie < dateJour => on n'est pas couvert
if($dateSortieBeneficiaire>"2000-01-01")
{
$estsorti = ($dateSortieBeneficiaire<=$datejour);
$estcouvert = ($estcouvert && ($dateSortieBeneficiaire>$datejour));
}
$dateEffetCouvert = $_SESSION['p_dateEffetCouvert'];
$derogation_finger_en_cours = $_SESSION['p_derogation_finger_en_cours_C'];
$derogationFingerPrestataire = $_SESSION['p_derogationFingerPrestataire'];
$avecReferencement = $referencementpolice['avecReferencement'];
$prestataireReference="0";
//echo $estGarantie;
$garant = $this->nettoyer($beneficiaire['garant']);
if(strlen($garant)>"25"){
$garant = $this->nettoyer($beneficiaire['codeGcAssureur']);
}
$produit = $this->nettoyer($beneficiaire['produit']);
//les initialisations pour la page consultation
$badcodeGestionBon = "1";
$tab_gestion_bon = array("0", "1", "2");
if (in_array($codeGestionBon, $tab_gestion_bon))
{
$badcodeGestionBon = "0";
}
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'] ;
$avecReferencement = $referencementpolice['avecReferencement'];
$tauxAvecReferencement = $referencementpolice['tauxAvecReferencement'];
$tauxSansReferencement = $referencementpolice['tauxSansReferencement'];
$okReferencement = $_SESSION['p_okReferencement_C'];
$dernierMedecinConsulte = $_SESSION['p_dernierMedecinConsulte'];
$dernierActe = $_SESSION['p_dernierActe'];
$dateDernierActe = $_SESSION['p_dateDernierActe_C'];
$codePrestataire = $_SESSION['p_codePrestataire_C'];
$nbreConsultaionSpecialisteJour = $_SESSION['p_nbreConsultaionSpecialisteJour'];
$paramConsultationSpecialisteJour = $_SESSION['p_paramConsultationSpecialisteJour'];
$dateDerniereConsultaionGeneraliste = $_SESSION['p_dateDerniereConsultaionGeneraliste'];
$dateDerniereConsultaionSpecialiste = $_SESSION['p_dateDerniereConsultaionSpecialiste'];
$faceRegistered = $this->nettoyer($beneficiaire['faceRegistered']);
$face_confirmee = $_SESSION['p_okId_face'];
$fingerActif = $_SESSION['p_fingerActif'];
$faceActif = $_SESSION['p_faceActif'];
$codeDerogationEnCours = $_SESSION['p_codeDerogationEnCours_C'];
if($derogation_en_cours > "0" && $codeDerogationEnCours=="02" && $_SESSION['prestationPossible']=="1"){
$_SESSION['p_okId_face'] = "-1";
$_SESSION['p_faceActif'] = "0";
$face_confirmee = $_SESSION['p_okId_face'];
$faceActif = $_SESSION['p_faceActif'];
}
$sessionConsultationConservee = isset($_SESSION['sessionConsultationConservee'])?$_SESSION['sessionConsultationConservee']:"0";
if (est_anglophone()){
if($beneficiaire['sexe'] == "M"){
$sexe = "Male";
}else{
$sexe = "Female";
}
}else{
if($beneficiaire['sexe'] == "M"){
$sexe = "Masculin";
}else{
$sexe = "Féminin";
}
}
$lienPhoto = "";
if($_SESSION['p_lienPhoto_C']>" " && $faceRegistered=="1")
{
$lienPhoto = $_SESSION['p_dossierPhoto_C'].$_SESSION['p_dossierSociete'].'/Photos/'.$_SESSION['p_lienPhoto_C'];
// Vérifie si le fichier existe en essayant de l'ouvrir
$handle = @fopen($lienPhoto, "r");
if ($handle) {
fclose($handle);
} else {
$faceRegistered="0";
}
}
else
{
$faceRegistered="0";
}
$activerOtp = $_SESSION['p_activerOtpPrestations_C'];
$otpStatus = $this->nettoyer($beneficiaire['otpStatus']);
if($modeSaisieFacture=="1") // Pas OTP en mode Décompte
{
$otpStatus = -1;
}
$prestationPossible = $_SESSION['prestationPossible'];
$prestationPossibleEncaissement = $this->nettoyer($beneficiaire['prestationPossibleEncaissement']);
$imgData = $_SESSION['p_photoAssureCrypte'];
?>
<INPUT class="sr-only datepicker" TYPE="text" id="debutMoisDecompte" NAME="debutMoisDecompte" value="<?= dateLang($_SESSION['p_debutMoisDecompte']) ?>" readonly>
<INPUT class="sr-only datepicker" TYPE="text" id="finMoisDecompte" name="finMoisDecompte">
<INPUT class="sr-only" TYPE="text" id="etatbeneficiaire_C" name="etatbeneficiaire_C" value="<?= $_SESSION['p_etatbeneficiaire_C'] ?>">
<INPUT class="sr-only" TYPE="text" id="dateEntreeBeneficiaire" NAME="dateEntreeBeneficiaire" value="<?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire'])) ?>">
<INPUT class="sr-only" TYPE="text" id="tm" NAME="tm" value="<?= $beneficiaire['tm'] ?>">
<INPUT class="sr-only" TYPE="text" id="age" NAME="age" value="<?= $age ?>">
<INPUT class="sr-only" TYPE="text" id="avecReferencement" NAME="avecReferencement" value="<?= $avecReferencement ?>">
<INPUT class="sr-only" TYPE="text" id="prestataireReference" NAME="prestataireReference" value="<?= $prestataireReference ?>">
<INPUT class="sr-only" TYPE="text" id="tauxAvecReferencement" NAME="tauxAvecReferencement" value="<?= $referencementpolice['tauxAvecReferencement'] ?>">
<INPUT class="sr-only" TYPE="text" id="tauxSansReferencement" NAME="tauxSansReferencement" value="<?= $referencementpolice['tauxSansReferencement'] ?>">
<INPUT class="sr-only" TYPE="text" id="codeReferencement" NAME="codeReferencement" value="<?= $beneficiaire['codeReference'] ?>">
<button class="sr-only" id="btn_popdate_reelle" name="btn_popdate_reelle" type="button" data-bs-toggle="modal" data-bs-target="#popdate_reelle" > </button>
<INPUT class="sr-only" TYPE="text" id="faceRegistered" name="faceRegistered" value="<?= $faceRegistered ?>">
<INPUT class="sr-only" TYPE="text" id="autoriserUnBonPrincipal" name="autoriserUnBonPrincipal" value="<?= $this->nettoyer($beneficiaire['autoriserUnBonPrincipal']) ?>">
<!-- 22-11-2022 ----------->
<INPUT class="sr-only" TYPE="text" id="agemaxipediatrie" NAME="agemaxipediatrie" value="<?= $agemaxipediatrie ?>">
<INPUT class="sr-only" TYPE="text" id="parametreNombreFeuilleGratuitJour" NAME="parametreNombreFeuilleGratuitJour" value="<?= $parametreNombreFeuilleGratuitJour ?>">
<INPUT class="sr-only" TYPE="text" id="nombreFeuilleGratuite" NAME="nombreFeuilleGratuite" value="<?= $nombreFeuilleGratuite ?>">
<INPUT class="sr-only" TYPE="text" id="sessionConsultationConservee" name="sessionConsultationConservee" value="<?= $sessionConsultationConservee ?>">
<INPUT class="sr-only" TYPE="text" id="face_confirmee" name="face_confirmee" value="<?= $face_confirmee ?>">
<INPUT class="sr-only" TYPE="text" id="faceActif" name="faceActif" value="<?= $faceActif ?>">
<INPUT class="sr-only" TYPE="text" id="prestationPossible" name="prestationPossible" value="<?= $_SESSION['prestationPossible'] ?>">
<INPUT class="sr-only" TYPE="text" id="prestationPossibleEncaissement" name="prestationPossibleEncaissement" value="<?= $prestationPossibleEncaissement ?>">
<legend>
<i class="fas fa-stethoscope" ></i>&nbsp; &nbsp;<?= _("FICHE DE CONSULTATION") ?>
<!-- Icône d'aide simple (?) -->
<span class="help-icon" data-bs-toggle="modal" data-bs-target="#helpModal">?</span>
</legend>
<!-- ------------------- -->
<h5 class="alert alert-danger" style="height:35px; padding:5px; text-align:center; margin-bottom:5px;"><?= _("Patient") ." (". $beneficiaire['numeroBeneficiaire'] . ") => " . _("Effet") . " : " . dateLang($this->nettoyer($beneficiaire['dateEffetBeneficiaire']), $_SESSION['p_lang'])." => ". _("Garant") . " : " .$garant." => ".$produit ?></h5>
<?php if($_SESSION['p_vip_C']=="1"): ?>
<INPUT class="form-control vip" TYPE="text" id="vip" name="vip" value="<?= $_SESSION['p_strVip_C'] ?>">
<?php endif; ?>
<button class="sr-only" id="btn_pop_save_face" name="btn_pop_save_face" type="button" data-bs-toggle="modal" data-bs-target="#pop_rec_faciale" > </button>
<div id="div_beneficiaire">
<?php if ($faceActif=='1' && $_SESSION['prestationPossible']=="1") : ?>
<table class="table table-responsive table-condensed">
<tbody>
<?php if ($faceRegistered=="1") : ?>
<tr>
<td>
<button style='font-size:15pt; width:100%; font-weight:bold;' type="button" class="btn btn-primary" onClick="javascript:ebene_init_confirm_photo_face();">
<i class="fa fa-camera" aria-hidden="true"></i> &nbsp; &nbsp; <?= _("AUTHENTIFIER LA PHOTO DU PATIENT") ?>
</button>
</td>
</tr>
<?php else: ?>
<tr>
<td>
<button style='font-size:15pt; width:100%; font-weight:bold;' type="button" class="btn btn-primary" onClick="javascript:ebene_init_photo_face();">
<i class="fa fa-floppy-disk" aria-hidden="true"></i> &nbsp; &nbsp;<?= _("ENREGISTRER LA PHOTO DU PATIENT") ?>
</button>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php endif; ?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td rowspan="3">
<div class="photo-container">
<?php if ($faceRegistered=="1"): ?>
<img class="photoId rounded-circle" src="data:image/jpg;base64,<?=$imgData?>" alt="<?= _("Photo du patient") ?> " style="width: 50px;" data-bs-toggle="modal" data-bs-target="#pop_photo">
<?php endif; ?>
</div>
</td>
</tr>
<tr>
<td width="10%" align="center"> <?= _("Nom Patient") ?> </td>
<td width="24%" ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="nomBeneficiaire" NAME="nomBeneficiaire" value="<?= $beneficiaire['nomBeneficiaire'] ?>" readonly ></td>
<td width="10%" align="center"> <?= _("Prénoms") ?> </td>
<td width="24%" ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="prenomsBeneficiaire" NAME="prenomsBeneficiaire" value="<?= $beneficiaire['prenomsBeneficiaire'] ?>" readonly ></td>
<td width="10%" align="center"> <?= _("Couverture") ?> </td>
<td width="22%">
<INPUT style='font-size:10pt;' class="form-control" TYPE="text" value="<?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire']), $_SESSION['p_lang']).' - '.dateLang($_SESSION['p_dateEcheancePolice_C'], $_SESSION['p_lang']) ?>" readonly >
</td>
</tr>
<tr>
<td align="center"> <?= _("Lien Parenté") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="lienparente" name="lienparente" value="<?= $beneficiaire['lienparente'] ?>" readonly ></td>
<td align="center"> <?= _("Naissance") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="dateNaissance" NAME="dateNaissance" value="<?= dateLang($this->nettoyer($beneficiaire['dateNaissance']), $_SESSION['p_lang']).' => '.$beneficiaire['ageBeneficiaire'].' ans' ?>" readonly></td>
<td align="center"> <?= _("Etat") ?> </td>
<?php if ($dateEffetCouvert=="0") : ?>
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Non renouvelé") ?> </td>
<?php else: ?>
<?php if ($estcouvert) : ?>
<?php if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US"): ?>
<?php if ($beneficiaire['codeEtatBeneficiaire']=="V"): ?>
<td align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $beneficiaire['etatbeneficiaireEng'] ?> </td>
<?php else: ?>
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= $beneficiaire['etatbeneficiaireEng'] ?> </td>
<?php endif; ?>
<?php else: ?>
<?php if ($beneficiaire['codeEtatBeneficiaire']=="V"): ?>
<td align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $beneficiaire['etatbeneficiaire'] ?> </td>
<?php else: ?>
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= $beneficiaire['etatbeneficiaire'] ?> </td>
<?php endif; ?>
<?php endif; ?>
<?php else: ?>
<?php if ($estsorti): ?>
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Retiré") ?> </td>
<?php else: ?>
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Expiré") ?> </td>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</tr>
<?php if ($prestataireReference=="1"): ?>
<?php if ($beneficiaire['codeReference']=="" && $referecementPossible=="1") : ?>
<tr>
<td colspan="3" align="center" style="color:red; font-size:14pt;">
<button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:generercodereference();" > <?= _("Générer un code de référence...") ?> </button>
</td>
<td >
<INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="codeReference" NAME="codeReference" value="" readonly >
</td>
<td align="center" class="required"> <?= _("Validité (en jour)") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="number" id="dureeCode" NAME="dureeCode" required AUTOCOMPLETE="OFF" min="1" max="5" onchange="maj_beneficiaire();" readonly></td>
</tr>
<?php else : ?>
<tr>
<td colspan="3" align="center" style="color:red; font-size:14pt;">
<button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:generercodereference();" disabled> <?= _("Générer un code de référence...") ?> </button>
</td>
<td >
<INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="codeReference" NAME="codeReference" value="<?= $beneficiaire['codeReference'] ?>" readonly >
</td>
<td align="center" class="required"> <?= _("Validité (en jour)") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="number" id="dureeCode" NAME="dureeCode" value="<?= $beneficiaire['dureeCode'] ?>" readonly min="1" max="5"></td>
</tr>
<?php endif; ?>
<?php endif; ?>
<tr>
<td colspan="7">
<div id="div_taux">
<button style='font-size:12pt; font-weight: bold; background-color:#f5deb3; color:#a0522d;' class="form-control btn" TYPE="text"> <?= _("TAUX DE COUVERTURE") ?> :<?= $_SESSION['p_tauxdecouverture_C'];?> %</button>
</div>
</td>
</tr>
</tbody>
</table>
<?php if($otpStatus=="-1" || $otpStatus=="1"): ?>
<?php
if ($_SESSION['prestationPossible']=="0"):
?>
<marquee behavior="scroll" direction="left" scrollamount="15" style="background-color:red;color:white; font-weight:bold; font-size:14pt">
<?= $_SESSION['messagePrestationImpossible']; ?>
</marquee>
<?php else:
if ($_SESSION['p_modeSaisieFacture']!=1):
if ($_SESSION['p_codeTypePrestataire_C']=='CSO' || $_SESSION['p_codeTypePrestataire_C']=='DEN' || $_SESSION['p_codeTypePrestataire_C']=='HRW' || $_SESSION['p_codeTypePrestataire_C']=='HPP' || $_SESSION['p_codeTypePrestataire_C']=='POC' || $_SESSION['p_codeTypePrestataire_C']=='CME' || $_SESSION['p_codeTypePrestataire_C']=='IMA' || $_SESSION['p_codeTypePrestataire_C']=='HPC'):
?>
<div id="div_consultation">
<input class="sr-only" id="badcodeGestionBon" name="badcodeGestionBon" type="text" value= "<?= $badcodeGestionBon ?>" >
<input class="sr-only" id="delaiCarenceRaisonconsultation" name="delaiCarenceRaisonconsultation" type="number" value= "0" >
<input class="sr-only" id="appliquerDelaiCarence" name="appliquerDelaiCarence" type="text" value= "0" >
<!-- <INPUT class="sr-only" TYPE="text" id="prestataireReference" NAME="prestataireReference" value="<?= $prestataireReference ?>"> -->
<INPUT class="sr-only" TYPE="text" id="dureeVieBon" NAME="dureeVieBon" value="<?= $dureeVieBon ?>">
<INPUT class="sr-only" TYPE="text" id="dureeDerniereConsultation" NAME="dureeDerniereConsultation" value="<?= $dureeDerniereConsultation ?>">
<INPUT class="sr-only" TYPE="text" id="dernierMedecinConsulte" NAME="dernierMedecinConsulte" value="<?= $dernierMedecinConsulte ?>">
<INPUT class="sr-only" TYPE="text" id="dernierActe" NAME="dernierActe" value="<?= $dernierActe ?>">
<INPUT class="sr-only" TYPE="text" id="dateDernierActe" NAME="dateDernierActe" value="<?= $dateDernierActe ?>">
<INPUT class="sr-only" TYPE="text" id="dateJour" NAME="dateJour" value="<?= date('Y-m-d') ?>">
<INPUT class="sr-only" TYPE="text" id="codePrestataire" NAME="codePrestataire" value="<?= $codePrestataire ?>">
<INPUT class="sr-only" TYPE="text" id="dernierCentre" NAME="dernierCentre" value="<?= $dernierCentre ?>">
<!-- Ajout du 22/08/2022 -->
<INPUT class="sr-only" TYPE="text" id="dateDerniereConsultaionGeneraliste" NAME="dateDerniereConsultaionGeneraliste" value="<?= $dateDerniereConsultaionGeneraliste ?>">
<INPUT class="sr-only" TYPE="text" id="dateDerniereConsultaionSpecialiste" NAME="dateDerniereConsultaionSpecialiste" value="<?= $dateDerniereConsultaionSpecialiste ?>">
<INPUT class="sr-only" TYPE="text" id="nbreConsultaionSpecialisteJour" NAME="nbreConsultaionSpecialisteJour" value="<?= $nbreConsultaionSpecialisteJour ?>">
<INPUT class="sr-only" TYPE="text" id="paramConsultationSpecialisteJour" NAME="paramConsultationSpecialisteJour" value="<?= $paramConsultationSpecialisteJour ?>">
<!-- Ajout du 24/0/2022 -->
<INPUT class="sr-only" TYPE="text" id="codeTypePrestataire" NAME="codeTypePrestataire" value="<?= $_SESSION['p_codeTypePrestataire_C'] ?>">
<!-- Ajout du 01/02/2023 -->
<div id="div_findelaicarence">
</div>
<?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: ?>
<form id="frmconsultation" name="frmconsultation" method="post" >
<input class="sr-only" type="text" id="codeTypePrestation" name="codeTypePrestation" value="CONS">
<input class="sr-only" type="text" id="nbBonsCons" name="nbBonsCons" Value="<?= $nbBonsCons ?>" >
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
<input class="sr-only" type="text" id="okReferencement" name="okReferencement" Value="<?= $okReferencement ?>" >
<input class="sr-only" type="text" id="ententePrealable" name="ententePrealable" value="0">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<?php if ($okReferencement=="1" && $reference['codeReference']!="") : ?>
<tr>
<td width="15%" > <?= _("Date Référence") ?> </td>
<td width="30%" >
<INPUT class="form-control" TYPE="text" id="dateReferencement" NAME="dateReferencement" Value="<?= dateFr($reference['dateReference']) ?>" readonly style='font-size:10pt;' >
</td>
<td width="1%" align="center" > <?= _("Code Référence") ?> </td>
<td >
<INPUT class="form-control" TYPE="text" id="codeReferencement" NAME="codeReferencement" Value="<?= $reference['codeReference'] ?>" style='font-size:10pt;' autofocus readonly>
</td>
</tr>
<?php endif;
$codeMedecinConsultation = isset($_SESSION['codeMedecinConsultation'])?$_SESSION['codeMedecinConsultation']:"";
?>
<tr>
<td class="required" style="font-weight:bold"> <?= _("Acte Médical") ?> </td>
<?php
$codeActeConsultation = isset($_SESSION['codeActeConsultation'])?$_SESSION['codeActeConsultation']:"";
?>
<td colspan="3">
<SELECT class="form-control selectpicker" id="codeActe" NAME="codeActe" data-live-search="true" onChange="javascript:affichespecialite();" required style='font-size:10pt;' autofocus>
<?php liste_options($acte, $codeActeConsultation); ?>
</SELECT>
</td>
</tr>
<tr>
<td width="15%" style="font-weight:bold" class="required"> <?= _("Spécialité") ?> </td>
<td colspan="3">
<div id="div_specialite">
<INPUT class="sr-only" TYPE="text" id="nuit" NAME="nuit" value="<?= $nuit ?>">
<SELECT id="codeSpecialite" class="form-control selectpicker" data-live-search="true" NAME="codeSpecialite" onBlur="javascript:specialite_medecin();" required style='font-size:10pt;height:30px !important;'>
<?php liste_options($specialite,""); ?>
</SELECT>
</div>
</td>
</tr>
<tr>
<td width="15%" class="required" style="font-weight:bold"> <?= _("Praticien(ne)") ?> </td>
<td colspan="3">
<div id="div_medecin">
<SELECT id="codeMedecin" class="form-control selectpicker" data-live-search="true" NAME="codeMedecin" required style='font-size:10pt;height:30px !important;' >
<?php liste_options($medecins,""); ?>
</SELECT>
</div>
</td>
</tr>
</tbody>
</table>
<div id="infosacte" style='font-size:10pt;'>
<input class="sr-only" type="number" id="prixActe" name="prixActe" value="0">
<input class="sr-only" type="number" id="montantTm" name="montantTm" value="0">
<input class="sr-only" type="number" id="aRembourser" name="aRembourser" value="0">
<input class="sr-only" type="number" id="delaiCarenceActe" name="delaiCarenceActe" value="0">
<input class="sr-only" type="text" id="ententeprealable" name="ententeprealable" value="0">
<?php
$prixActeConsultation = isset($_SESSION['prixActeConsultation'])? $_SESSION['prixActeConsultation']:"0";
$montantTmConsultation = isset($_SESSION['montantTmConsultation'])? $_SESSION['montantTmConsultation']:"0";
$montantArembourserConsultation = isset($_SESSION['montantArembourserConsultation'])? $_SESSION['montantArembourserConsultation']:"0";
?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="15%" > <?= _("Prix Acte") ?> </td>
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly> </td>
<td width="15%" align="center"> <?= _("Montant T M") ?> </td>
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
<td width="15%" align="center"> <?= _("A Rembourser") ?> </td>
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
</tr>
</tbody>
</table>
</div>
<?php
$codeRaisonConsultation = isset($_SESSION['codeRaisonConsultation'])? $_SESSION['codeRaisonConsultation']:"";
$observationsConsultation = isset($_SESSION['observationsConsultation'])? $_SESSION['observationsConsultation']:"";
$bonPrincipalConsultation = isset($_SESSION['bonPrincipalConsultation'])? $_SESSION['bonPrincipalConsultation']:"0";
?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="15%"> <?= _("Date Consultation") ?> </td>
<td width="20%" >
<INPUT class="form-control" TYPE="text" id="dateSurvenance" NAME="dateSurvenance" Value="<?= $_SESSION['p_dateFactureReellefr_C'] ?>" readonly style='font-size:10pt;' >
</td>
<td width="15%" align="center" class="required" style="font-weight:bold"> <?= _("Raison Consultation") ?> </td>
<td colspan="3" >
<SELECT class="form-select" id="codeRaisonConsultation" NAME="codeRaisonConsultation" onChange="ajaxdelaicarencecaisonconsultation();" required AUTOCOMPLETE="OFF" style='font-size:10pt;'>
<?php liste_options($raison,"",true); ?>
</SELECT>
</td>
</tr>
<tr>
<td width="15%"> <?= _("Dernière Consultation") ?> </td>
<td width="20%" >
<INPUT class="form-control" TYPE="text" id="derniereDateConsultation" NAME="derniereDateConsultation" style='font-size:10pt;' value="<?= datefr($_SESSION['p_derniereDateConsultation'])?>" disabled>
</td>
<td width="15%" align="center" style="font-weight:bold"> <?= _("Observations") ?> </td>
<td colspan="3" >
<INPUT class="form-control" TYPE="text" id="observations" NAME="observations" style='font-size:10pt;' value="" >
</td>
</tr>
</table>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="15%" > <?= _("Bons Disponibles") ?> </td>
<td width="20%" > <input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $nbBonsCons ?>" readonly > </td>
<td width="15%" align="center" > <?= _("Type Gestion Bon") ?> </td>
<td width="20%">
<?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>
<td width="15%" align="center" id="labelBonPrincipal" class=""> <?= _("N° Bon Principal") ?> </td>
<td width="20%">
<input class="form-control" id="bonPrincipal" name="bonPrincipal" style="text-align: center; font-size:10pt;'" Value="" disabled onChange="javascript:controler_bon_principal();">
</td>
</tr>
</tbody>
</table>
<div id="infosbon">
<?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: ?>
<?php if (($face_confirmee=="1") or ($faceActif!='1')): ?>
<button id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" onClick="javascript:enregistrer_consultation();" style='font-size:12pt; font-weight:bold;'><i class="fa fa-floppy-disk"></i>&nbsp; &nbsp;<?= _("ENREGISTRER LA CONSULTATION") ?></button>
<?php else: ?>
<button id="btn_enreg" name="btn_enreg" disabled class = "form-control btn btn-primary" type="button" style='font-size:12pt; font-weight:bold;' ><i class="fa fa-floppy-disk"></i>&nbsp; &nbsp;<?= _("ENREGISTRER LA CONSULTATION") ?></button>
<?php endif; ?>
<?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%" > <?= _("Numéro Bon") ?> </td>
<td width="30%" >
<input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" required AUTOCOMPLETE="OFF"
onChange="javascript:ajaxinfosbonconsultation();" onkeypress="javascript:ctrlkeypress_numeroBon(event);"
>
</td>
<td width="15%" > </td>
<td>
<input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("ENREGISTRER") ?>" disabled style='font-size:15pt; font-weight:bold;' >
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php endif; ?>
<div id="div_fraisExclu">
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
</div>
<?php if (isset($msgErreur)): ?>
<div id ="msgErreur" class="alert alert-danger" style="height:38px; padding:5px;" >
<H4><?= $msgErreur ?></H4>
</div>
<?php endif; ?>
</div>
<div id="div_messages" style="margin-top:10px;">
</div>
</form>
<?php endif; ?>
<div id="infodelaicarence" style="display: none">
<input type="number" id="delaiCarenceRaisonconsultation_info" name="delaiCarenceRaisonconsultation_info" value="0">
<input type="text" id="appliquerDelaiCarence_info" name="appliquerDelaiCarence_info" value="0">
</div>
</div>
<?php else:
if ($_SESSION['p_codeTypePrestataire_C']=='PHA'):?>
<legend><?= _("BONS DE PHARMACIE EN COURS")?></legend>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:11pt; margin-top:-15px;">
<thead>
<tr>
<th style="text-align:center"> <?= _("No Bon") ?> </th>
<th style="text-align:center"> <?= _("Prescrit le") ?> </th>
<th > <?= _("Prescrit à") ?> </th>
<th style="text-align:center"> <?= _("Médicaments non livrés") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($bonNonLivrePha as $v):?>
<tr valign="top">
<td align='center' width="10%"> <input style='font-size:11pt;' type="button" value="<?= $v['numeroBonOrdonnance'] ?>" onClick="javascript:bons_encours_pha(<?= $v['numeroBonOrdonnance'] ?>);"> </td>
<td align='center' width="15%"> <?= dateLang($this->nettoyer($v['datePrescription']), $_SESSION["p_lang"]) ?> </td>
<td ><?= $this->nettoyer($v['prestataire']) ?></td>
<td align='center' width="15%"><?= $this->nettoyer($v['nbNonLivre']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php
endif;
endif;
endif;
endif;
?>
</div>
<!-- -->
<div id="content">
<?php if ($college_couvert<"1" && $derogation_en_cours<"1") : ?>
<div id ="msgErreur" class="alert alert-danger" style="height:38px; padding:5px;" >
<H4><?= _("Cette personne n'a pas accès à") . " " . $_SESSION['p_prestataire_C'] ?></H4>
</div>
<?php endif; ?>
</div>
<div id="div_err">
<INPUT class="sr-only" TYPE="text" id="nbTentative" name="nbTentative" value="0">
</div>
<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>
<div class="modal fade" id="popdate_reelle" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button id="btn_close_pop" name="btn_close_pop" type="button" class="close" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
<h4 class="modal-title"> <?= _("Date Effective") ?> </h4>
</div>
<div class="modal-body">
<div id="div_date_reelle">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td> <?= _("Date Effective") ?> </td>
<td width="30%" colspan="3"> <INPUT style='text-align:center; font-size:11pt;' class="form-control datepicker" TYPE="text" id="dateFactureReelle" NAME="dateFactureReelle" value="" required AUTOCOMPLETE="OFF" > </td>
<td> </td>
<td> <input class = "form-control btn btn-primary" type="button" value="<?= _("Valider...") ?>" onClick="javascript:consultation_assureur();" style='font-size:11pt;' > </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button id="close_pop" name="close_pop" type="button" class="btn btn-default" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
</div>
</div>
</div>
</div>
<!-- Modal d'aide -->
<div class="modal fade" id="helpModal" tabindex="-1" aria-labelledby="helpModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content modal-help">
<div class="modal-header">
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="helpModalLabel"><?= _("Aide - Utilisation") ?></h4>
</div>
<div class="modal-body">
<h5 ><?=_("Fiche de consultation")?></h5>
<p><?= _("Cette page permet de créer un dossier médical pour tout patient couvert par une police dassurance et dafficher ses informations principales (nom, prénoms, date de naissance, etc.).") ?></p>
<p><?= _("Comment l'utiliser ?") ?></p>
<ol>
<li><?= _("Vérifiez toujours l'état de la couverture du patient avant toute consultation.") ?></li>
<?php if ($faceActif=='1' && $_SESSION['prestationPossible']=="1") : ?>
<li><?= _("Branchez la webcam si nécessaire.") ?></li>
<?php if ($faceRegistered=="1"): ?>
<li><?= _("Cliquez sur le bouton <strong>AUTHENTIFIER LA PHOTO DU PATIENT</strong>.") ?></li>
<li><?= _("Dans la fenêtre qui souvre, capturez le visage du patient et comparez-le avec la photo enregistrée.") ?></li>
<li><?= _("Si la reconnaissance est validée, vous pouvez poursuivre. Dans le cas contraire, la consultation nest possible quavec laccord de lassureur suite à une dérogation.") ?></li>
<?php else: ?>
<li><?= _("Cliquez sur le bouton <strong>ENREGISTRER LA PHOTO DU PATIENT</strong>.") ?></li>
<li><?= _("Dans la fenêtre qui souvre, capturez le visage du patient et enregistrer le.") ?></li>
<?php endif; ?>
<?php endif; ?>
<li><?= _("Sélectionnez l'acte médical, la spécialité et le praticien dans les listes déroulantes.") ?></li>
<li><?= _("Les informations de tarif et de prise en charge s'affichent automatiquement.") ?></li>
<li><?= _("Renseignez la raison de la consultation et toute observation utile.") ?></li>
<li><?= _("Validez la consultation en cliquant sur le bouton <strong>ENREGISTRER LA CONSULTATION</strong>.") ?></li>
</ol>
<div class="alert alert-info mt-3">
<strong><?= _("Remarque").":" ?></strong>
<?= _("Certaines fonctionnalités peuvent être désactivées en fonction des droits de l'utilisateur ou des paramètres de la police d'assurance.") ?>
</div>
<h5 ><?=_("Les boutons d'action de la page")?></h5>
<ul>
<li><?= _("<strong>Retour</strong>").": "._("Ouvre la page <strong>INFORMATIONS SUR LADHÉRENT</strong> pour consulter les données concernant les membres de la famille du patient.") ?></li>
<li><?= _("<strong>Actualiser</strong>").": "._("Réactualise les inforamtions de la page en cours.") ?></li>
<li><?= _("<strong>Consultation</strong>").": "._("Ouvre la page <strong>CONSULTATION</strong> uniquement si lassureur saisit, de façon rétroactive, une facture non enregistrée par le prestataire, afin de régulariser un décompte périodique.") ?></li>
<li><?= _("<strong>Dossiers Médicaux</strong>").": "._("Ouvre la page <strong>HISTORIQUE DES DOSSIERS MÉDICAUX DU PATIENT</strong> pour afficher tous ses dossiers médicaux enregistrés sur une période donnée.") ?></li>
<li><?= _("<strong>Famille</strong>").": "._("Ouvre la page <strong>INFORMATIONS SUR LADHÉRENT</strong> pour consulter les données concernant les membres de la famille du patient.") ?></li>
<li><?= _("<strong>Demande de dérogation</strong>").": "._("Ouvre la page <strong>DEMANDE DE DÉROGATION</strong> pour transmettre une demande à lassureur lorsquune exception détectée par le système bloque le processus.") ?></li>
<li><?= _("<strong>Historique Dérogation</strong>").": "._("Ouvre la page <strong>HISTORIQUE DES DEMANDES DE DÉROGATION</strong> pour afficher, sur une période donnée, toutes les demandes envoyées à lassureur ainsi que les réponses reçues.") ?></li>
<li><?= _("<strong>Nouvelle Proforma</strong>").": "._("Ouvre la page <strong>FACTURE PROFORMA DHOSPITALISATION DU PATIENT</strong> pour établir des factures proforma dhospitalisation chirurgicale au nom du patient et les transmettre à lassureur pour traitement.") ?></li>
<li><?= _("<strong>Historique Proforma</strong>").": "._("Ouvre la page <strong>HISTORIQUE DES PROFORMA DHOSPITALISATION DU PATIENT</strong> pour afficher, sur une période donnée, toutes les factures proforma dhospitalisation envoyées à lassureur ainsi que les réponses reçues.") ?></li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"><?= _("Fermer") ?></button>
</div>
</div>
</div>
</div>
<?php else:
switch ($otpStatus) {
case 0:
$messageOtp = "Veuillez envoyer un code de vérification à l'assuré!";
break;
case 2:
$messageOtp = "Veuillez saisir le code de vérification reçu par l'assuré sur son téléphone portable ou son adresse e-mail!";
break;
case 9:
$messageOtp = "Code incorrect, veuillez réessayer!";
break;
default:
$messageOtp = "Veuillez envoyer un code de vérification à l'assuré!";
}
?>
<h5 class="alert alert-danger" style="height:35px; padding:5px; text-align:center; margin-bottom:5px;"> <?= $messageOtp ?> </h5>
<?php if($otpStatus=='0') : ?>
<form action="Fichebeneficiaire/envoyerotp" method="post">
<?php else: ?>
<form action="Fichebeneficiaire/confirmerotp" method="post">
<?php endif; ?>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<?php if($otpStatus=='0') : ?>
<td> <input style='font-size:10pt;' class="form-control btn btn-info" type="submit" name="submit" value="<?= _("Envoyer Code") ?>" /> </td>
<?php elseif($otpStatus=='2'): ?>
<td> <INPUT style='font-size:10pt;' class="form-control" type="text" id="otpValue" name="otpValue" required AUTOCOMPLETE="OFF" autofocus > </td>
<td> <input style='font-size:10pt;' class="form-control btn btn-primary" type="submit" name="submit" value="<?= _("Vérifier Code") ?>" /> </td>
<?php else: ?>
<td> <INPUT style='font-size:10pt;' class="form-control" type="text" id="otpValue" name="otpValue" required AUTOCOMPLETE="OFF" autofocus > </td>
<td> <input style='font-size:10pt;' class="form-control btn btn-warning" type="submit" name="submit" value="<?= _("Vérifier Code à nouveau") ?>" /> </td>
<?php endif; ?>
</tr>
</tbody>
</table>
</form>
<?php endif; ?>
<?php if($faceActif=='1') : ?>
<?php include 'faceebene/ebenetraitementimage.php'; ?>
<?php endif; ?>