This commit is contained in:
KONE SOREL 2026-03-10 08:12:31 +00:00
parent ab208418a4
commit 37309c5c35
2 changed files with 254 additions and 0 deletions

View File

@ -0,0 +1,68 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Societeuser.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Ouinon.php';
class ControleurModifautresparametresmed extends Controleur {
private $menuvue;
private $societeuser;
private $envoismsactifOuinon;
private $smsAssureOuinon;
private $smsmParFactureOuinon;
private $emailParFactureOuinon;
private $copieSmsAssureOuinon;
private $seuilAlerteActifOuinon;
private $accorderMedecinSouscripteurOuinon;
private $tousActesSoumisOuinon;
private $envoismswhatsappactifOuinon;
private $appliquerTarifBasOuinon;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Modifautresparametresmed');
$this->societeuser = new Societeuser();
$this->envoismsactifOuinon = (new Ouinon())->getListe();
$this->smsAssureOuinon = (new Ouinon())->getListe();
$this->smsmParFactureOuinon = (new Ouinon())->getListe();
$this->emailParFactureOuinon = (new Ouinon())->getListe();
$this->copieSmsAssureOuinon = (new Ouinon())->getListe();
$this->seuilAlerteActifOuinon = (new Ouinon())->getListe();
$this->accorderMedecinSouscripteurOuinon = (new Ouinon())->getListe();
$this->tousActesSoumisOuinon = (new Ouinon())->getListe();
$this->envoismswhatsappactifOuinon = (new Ouinon())->getListe();
$this->appliquerTarifBasOuinon = (new Ouinon())->getListe();
}
public function index()
{
$codeSociete = $_SESSION['codeSociete'];
$societeuser = $this->societeuser->getVwSocieteuser($codeSociete);
$this->genererVue(array(
'societeuser' => $societeuser,
'envoismsactifOuinon' => $this->envoismsactifOuinon,
'smsAssureOuinon' => $this->smsAssureOuinon,
'smsmParFactureOuinon' => $this->smsmParFactureOuinon,
'emailParFactureOuinon' => $this->emailParFactureOuinon,
'copieSmsAssureOuinon' => $this->copieSmsAssureOuinon,
'seuilAlerteActifOuinon' => $this->seuilAlerteActifOuinon,
'accorderMedecinSouscripteurOuinon' => $this->accorderMedecinSouscripteurOuinon,
'tousActesSoumisOuinon' => $this->tousActesSoumisOuinon,
'envoismswhatsappactifOuinon' => $this->envoismswhatsappactifOuinon,
'appliquerTarifBasOuinon' => $this->appliquerTarifBasOuinon,
));
}
}

View File

@ -0,0 +1,186 @@
<div class="page-content">
<input class="sr-only" type="text" id="idSocieteuser" name="idSocieteuser" value="<?= $this->nettoyer($societeuser['idSocieteuser']) ?>">
<div class="header-section mb-4">
<div class="d-flex flex-column flex-md-row align-items-md-center justify-content-between bg-white p-3 shadow-sm border-start border-warning border-4" style="border-radius: var(--radius-md);">
<div class="d-flex align-items-center">
<div class="icon-shape bg-warning-ghost text-warning rounded-circle me-3" style="width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-file-medical-alt fs-5"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Modifier règles métier") ?></h4>
<p class="text-muted small mb-0"><?= _("Médical") ?></p>
</div>
</div>
<div class="position-relative mt-3 mt-md-0" style="min-width: 280px; flex-grow: 1; max-width: 350px;">
<i class="fas fa-search position-absolute top-50 start-0 translate-middle-y ms-3 text-muted"></i>
<input type="text" id="globalSearch" class="form-control ps-5 border-2 rounded-pill shadow-none" placeholder="<?= _('Chercher un paramètre...') ?>">
</div>
<div class="d-flex gap-2 mt-3 mt-md-0">
<button class="btn btn-outline-secondary btn-sm px-3 fw-bold" onclick="javascript:afficher_autres_parametresgeneraux();">
<i class="fas fa-undo me-2"></i><?= _("Annuler") ?>
</button>
<button class="btn btn-primary btn-sm px-3 fw-bold shadow-sm" id="btn_enreg" onclick="javascript:enregistrer_modif_parametres_med();">
<i class="fas fa-save me-2"></i><?= _("Enregistrer") ?>
</button>
</div>
</div>
</div>
<form id="formModifMedical">
<div class="card border-0 shadow-sm mb-4">
<div class="card-header bg-info py-3 d-flex align-items-center justify-content-between">
<h6 class="mb-0 text-white fw-bold text-uppercase">
<i class="fas fa-comment-alt me-2"></i><?= _("Règles du Médical") ?>
</h6>
<span class="badge bg-white text-primary rounded-pill"><?= _("14 Paramètres") ?></span>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="bg-light">
<tr>
<th width="5%" class="text-center border-0 small text-muted">#</th>
<th class="border-0 small text-muted"><?= _("PARAMÈTRE DE COMMUNICATION") ?></th>
<th width="15%" class="text-center border-0 small text-muted"><?= _("Valeur Actuelle") ?></th>
<th width="22%" class="text-center border-0 small text-muted"><?= _("Nouvelle Valeur") ?></th>
</tr>
</thead>
<tbody>
<?php
$med_bool = [
['01', _("Activer la notification par SMS."), 'envoismsactif', $envoismsactifOuinon, 's_envoismsactif'],
['02', _("Activer la notification par WhatsApp."), 'envoismswhatsappactif', $envoismswhatsappactifOuinon, 's_envoismswhatsappactif'],
['03', _("Activer les notifications SMS/WhatsApp pour les assurés."), 'smsAssure', $smsAssureOuinon, 's_smsAssure'],
['04', _("Alerter l'assuré principal (SMS/WhatsApp) à chaque facturation."), 'smsmParFacture', $smsmParFactureOuinon, 's_smsmParFacture'],
['05', _("Alerter l'assuré principal par e-mail à chaque facturation."), 'emailParFacture', $emailParFactureOuinon, 's_emailParFacture'],
['06', _("Transmettre à l'assuré les échanges prestataires sur les ententes et dérogations."), 'copieSmsAssure', $copieSmsAssureOuinon, 's_copieSmsAssure'],
['07', _("Alerter l'assuré principal (SMS/WhatsApp/e-mail) dès que son solde atteint le seuil défini."), 'seuilAlerteActif', $seuilAlerteActifOuinon, 's_seuilAlerteActif']
];
foreach($med_bool as $b):
$status = ($societeuser[$b[2]] == "1"); ?>
<tr class="searchable-row">
<td class="text-center"><span class="badge-ghost bg-info-ghost"><?= $b[0] ?></span></td>
<td class="text-muted fw-bold"><?= $b[1] ?></td>
<td class="text-center bg-light text-muted fw-bold"><?= $status ? _("Oui") : _("Non") ?></td>
<td>
<select class="form-select form-select-sm fw-bold border-warning" id="<?= $b[4] ?>" name="<?= $b[4] ?>">
<?php liste_options($b[3], $this->nettoyer($societeuser[$b[2]]), true); ?>
</select>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="card border-0 shadow-sm mb-4">
<div class="card-header bg-dark py-3">
<h6 class="mb-0 text-white fw-bold text-uppercase">
<i class="fas fa-file-medical-alt me-2"></i><?= _("Protocoles d'Entente Préalable") ?>
</h6>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<tbody>
<tr class="searchable-row">
<td class="text-center"><span class="badge-ghost bg-info-ghost">08</span></td>
<td class="text-muted fw-bold"><?= _("Déclencher une entente préalable si le seuil du montant total des examens prescrits est dépassé.") ?></td>
<td class="text-center bg-light text-muted fw-bold"><?= format_N($this->nettoyer($societeuser['montantTotalExamen'])) ?></td>
<td>
<div class="input-group input-group-sm">
<input class="form-control text-center fw-bold border-warning" id="s_montantTotalExamen" name="s_montantTotalExamen" type="text" value="<?= $this->nettoyer($societeuser['montantTotalExamen']) ?>">
<span class="input-group-text bg-white border-warning"><?= $_SESSION['devise_C'] ?></span>
</div>
</td>
</tr>
<tr class="searchable-row">
<td class="text-center"><span class="badge-ghost bg-info-ghost">09</span></td>
<td class="text-muted fw-bold"><?= _("Déclencher une entente préalable si le seuil du montant total des médicaments prescrits est dépassé.") ?></td>
<td class="text-center bg-light text-muted fw-bold"><?= format_N($this->nettoyer($societeuser['montantTotalMedicament'])) ?></td>
<td>
<div class="input-group input-group-sm">
<input class="form-control text-center fw-bold border-warning" id="s_montantTotalMedicament" name="s_montantTotalMedicament" type="text" value="<?= $this->nettoyer($societeuser['montantTotalMedicament']) ?>">
<span class="input-group-text bg-white border-warning"><?= $_SESSION['devise_C'] ?></span>
</div>
</td>
</tr>
<tr class="searchable-row">
<td width="5%" class="text-center"><span class="badge-ghost bg-info-ghost">10</span></td>
<td class="text-muted fw-bold"><?= _("Autoriser le médecin du souscripteur à recevoir et traiter les ententes préalables.") ?></td>
<td width="15%" class="text-center bg-light text-muted fw-bold">
<?php $med = ($societeuser['accorderMedecinSouscripteur'] == "1"); ?>
<span class="badge rounded-pill px-3 py-2 <?= $med ? 'bg-success-ghost text-success' : 'bg-danger-ghost text-danger' ?>">
<?= $med ? _("OUI") : _("NON") ?>
</span>
</td>
<td width="22%">
<select class="form-select form-select-sm fw-bold border-warning" id="s_accorderMedecinSouscripteur" name="s_accorderMedecinSouscripteur">
<?php liste_options($accorderMedecinSouscripteurOuinon, $this->nettoyer($societeuser['accorderMedecinSouscripteur']), true); ?>
</select>
</td>
</tr>
<tr class="searchable-row">
<td class="text-center"><span class="badge-ghost bg-info-ghost">11</span></td>
<td class="text-muted fw-bold"><?= _("Délai de réponse alloué au médecin du souscripteur.") ?></td>
<td class="text-center bg-light text-muted fw-bold"><?= $this->nettoyer($societeuser['delaisReponseMedecinSouscripteur']) ?></td>
<td>
<div class="input-group input-group-sm">
<input class="form-control text-center fw-bold border-warning" id="s_delaisReponseMedecinSouscripteur" name="s_delaisReponseMedecinSouscripteur" type="text" value="<?= $this->nettoyer($societeuser['delaisReponseMedecinSouscripteur']) ?>">
<span class="input-group-text bg-white border-warning"><?= _("Heure(s)") ?></span>
</div>
</td>
</tr>
<tr class="searchable-row">
<td width="5%" class="text-center"><span class="badge-ghost bg-info-ghost">12</span></td>
<td class="text-muted fw-bold"><?= _("Tout acte en entente préalable entraîne la soumission complète de la prescription.") ?></td>
<td width="15%" class="text-center bg-light text-muted fw-bold">
<?php $med = ($societeuser['tousActesSoumisEntentePrealable'] == "1"); ?>
<span class="badge rounded-pill px-3 py-2 <?= $med ? 'bg-success-ghost text-success' : 'bg-danger-ghost text-danger' ?>">
<?= $med ? _("OUI") : _("NON") ?>
</span>
</td>
<td width="22%">
<select class="form-select form-select-sm fw-bold border-warning" id="s_tousActesSoumisOuinon" name="s_tousActesSoumisOuinon">
<?php liste_options($tousActesSoumisOuinon, $this->nettoyer($societeuser['tousActesSoumisEntentePrealable']), true); ?>
</select>
</td>
</tr>
<tr class="searchable-row">
<td class="text-center"><span class="badge-ghost bg-info-ghost">13</span></td>
<td class="text-muted fw-bold"><?= _("Déclencher une entente préalable au dépassement du nombre d'actes par prescription.") ?></td>
<td class="text-center bg-light text-muted fw-bold"><?= $this->nettoyer($societeuser['nombreActeEntentePrealable']) ?></td>
<td>
<div class="input-group input-group-sm">
<input class="form-control text-center fw-bold border-warning" id="s_nombreActeEntentePrealable" name="s_nombreActeEntentePrealable" type="text" value="<?= $this->nettoyer($societeuser['nombreActeEntentePrealable']) ?>">
</div>
</td>
</tr>
<tr class="searchable-row">
<td width="5%" class="text-center"><span class="badge-ghost bg-info-ghost">14</span></td>
<td class="text-muted fw-bold"><?= _("Appliquer automatiquement le tarif négocié le plus bas.") ?></td>
<td width="15%" class="text-center bg-light text-muted fw-bold">
<?php $med = ($societeuser['appliquerTarifBas'] == "1"); ?>
<span class="badge rounded-pill px-3 py-2 <?= $med ? 'bg-success-ghost text-success' : 'bg-danger-ghost text-danger' ?>">
<?= $med ? _("OUI") : _("NON") ?>
</span>
</td>
<td width="22%">
<select class="form-select form-select-sm fw-bold border-warning" id="s_appliquerTarifBas" name="s_appliquerTarifBas">
<?php liste_options($appliquerTarifBasOuinon, $this->nettoyer($societeuser['appliquerTarifBas']), true); ?>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</form>
</div>