160 lines
9.1 KiB
PHP
Executable File
160 lines
9.1 KiB
PHP
Executable File
<?php
|
|
$this->titre = "Intersanté - Remboursement Direct";
|
|
|
|
$idDemandeRemboursement = $_SESSION['idDemandeRemboursement'] ?? "0";
|
|
|
|
if($idDemandeRemboursement > "0"){
|
|
$numeroDemandeRemboursement = $this->nettoyer($demande['numeroDemandeRemboursement']);
|
|
$codeEtatDemandeRemboursement = $this->nettoyer($demande['codeEtatDemandeRemboursement']);
|
|
$lien = $this->nettoyer($demande['lien']);
|
|
$numeroBeneficiaire = $this->nettoyer($demande['numeroBeneficiaire']);
|
|
$observation = $this->nettoyer($demande['observation']);
|
|
|
|
if (est_anglophone()){
|
|
$lien = $this->nettoyer($demande['lienEng']);
|
|
}
|
|
}else{
|
|
$numeroDemandeRemboursement = "0";
|
|
$codeEtatDemandeRemboursement = "0";
|
|
$lien = "";
|
|
$numeroBeneficiaire = "";
|
|
$observation = "";
|
|
}
|
|
|
|
?>
|
|
<div id="div_liste" class="card shadow-lg border-0 mb-4" style="border-radius: 15px;">
|
|
<div class="card-header bg-primary text-white py-3" style="border-radius: 15px 15px 0 0;">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<h1 class="mb-0">
|
|
<i class="fas <?= ($idDemandeRemboursement > 0) ? 'fa-file-invoice-dollar' : 'fa-plus-circle' ?> me-2"></i>
|
|
<?= ($idDemandeRemboursement > 0) ? _("Détails du Remboursement") : _("Nouvelle Demande") ?>
|
|
</h1>
|
|
<?php if($idDemandeRemboursement > 0): ?>
|
|
<span class="badge bg-white text-primary fs-6">N° <?= $numeroDemandeRemboursement ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-body p-4">
|
|
<div class="row g-4 mb-4">
|
|
<div class="col-md-7">
|
|
<div class="p-3 border rounded bg-light">
|
|
<h6 class="text-muted text-uppercase small fw-bold mb-3 border-bottom pb-2">
|
|
<i class="fas fa-user-injured me-2"></i><?= _("Bénéficiaire des soins") ?>
|
|
</h6>
|
|
<div class="row g-3">
|
|
<div class="col-md-8">
|
|
<label class="form-label small text-muted mb-0"><?= _("Patient") ?></label>
|
|
<?php if($idDemandeRemboursement > 0): ?>
|
|
<div class="fw-bold fs-6"><?= $beneficiaireNom ?></div>
|
|
<?php else: ?>
|
|
<select class="form-select form-select-sm shadow-sm" id="numeroBeneficiaire" name="numeroBeneficiaire" onchange="lienparente();">
|
|
<?php liste_options($benficiaires, $numeroBeneficiaire); ?>
|
|
</select>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label class="form-label small text-muted mb-0"><?= _("Lien") ?></label>
|
|
<div class="fw-bold py-1 px-2 bg-white border rounded text-center small text-primary" id="div_lien">
|
|
<?= $lien ?: '--' ?>
|
|
</div>
|
|
</div>
|
|
<div class="col-12">
|
|
<label class="form-label small text-muted mb-0"><?= _("Commentaire / Motif du patient") ?></label>
|
|
<p class="mb-0 italic text-dark bg-white p-2 border rounded-1 small">
|
|
<?= $observation ?: _("Aucun commentaire fourni.") ?>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if($codeEtatDemandeRemboursement > 0): ?>
|
|
<div class="col-md-5">
|
|
<div class="card h-100 border-0 shadow-sm overflow-hidden">
|
|
<div class="card-body p-0">
|
|
<?php
|
|
$bgStatus = ($codeEtatDemandeRemboursement == "1") ? "bg-success" : "bg-danger";
|
|
$iconStatus = ($codeEtatDemandeRemboursement == "1") ? "fa-check-double" : "fa-ban";
|
|
?>
|
|
<div class="<?= $bgStatus ?> text-white p-3 text-center">
|
|
<i class="fas <?= $iconStatus ?> fa-2x mb-2"></i>
|
|
<h5 class="mb-0 text-uppercase fw-bold"><?= ($codeEtatDemandeRemboursement == "1") ? _("Demande Accordée") : _("Demande Refusée") ?></h5>
|
|
<small class="opacity-75"><?= _("Répondu le") ?> <?= dateLang($demande['dateReponseDemandeRemboursement']) ?></small>
|
|
</div>
|
|
<div class="p-3 bg-white">
|
|
<label class="small text-muted d-block mb-1"><?= _("Justification de l'assureur") ?> :</label>
|
|
<div class="p-2 bg-light rounded small" style="min-height: 60px; border-left: 3px solid #ccc;">
|
|
<?= $this->nettoyer($demande['motifReponseDemandeRemboursement']) ?>
|
|
</div>
|
|
<?php if($codeEtatDemandeRemboursement == "1"): ?>
|
|
<div class="mt-3 pt-2 border-top">
|
|
<div class="d-flex justify-content-between">
|
|
<small class="text-muted"><?= _("Dossier n°") ?></small>
|
|
<span class="badge bg-primary"><?= $demande['idDossier'] ?></span>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php if($idDemandeRemboursement > 0): ?>
|
|
<div class="card border-0 shadow-sm mt-4">
|
|
<div class="card-header bg-dark text-white py-2 d-flex justify-content-between align-items-center">
|
|
<span class="small fw-bold"><i class="fas fa-file-pdf me-2"></i><?= _("PIÈCES JOINTES (Factures)") ?></span>
|
|
<span class="badge bg-secondary"><?= count($geds) ?></span>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<?php if($codeEtatDemandeRemboursement == "0"): ?>
|
|
<div class="p-3 bg-info bg-opacity-10 border-bottom">
|
|
<form enctype="multipart/form-data" action="Remboursement" method="post" class="row g-2 align-items-center">
|
|
<div class="col-sm-8">
|
|
<input class="form-control form-control-sm" name="fichier_upload" type="file" required />
|
|
</div>
|
|
<div class="col-sm-4 d-flex gap-1">
|
|
<button type="submit" name="submit" class="btn btn-sm btn-primary flex-grow-1">
|
|
<i class="fas fa-cloud-upload-alt me-1"></i><?= _("Ajouter") ?>
|
|
</button>
|
|
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="actualiser_remboursement();">
|
|
<i class="fas fa-sync"></i>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<table class="table table-hover table-sm mb-0">
|
|
<tbody class="small">
|
|
<?php foreach ($geds as $ged): ?>
|
|
<tr>
|
|
<td class="ps-3 py-2 text-muted" width="150"><?= dateheureLang($ged['dateSysteme']) ?></td>
|
|
<td class="py-2"><i class="far fa-file-image me-2 text-primary"></i><?= $this->nettoyer($ged['nomOrigine']) ?></td>
|
|
<td class="text-end pe-3 py-2">
|
|
<a href="<?= $ged['cheminFichier'] ?>" target="_blank" class="btn btn-xs btn-outline-danger">
|
|
<i class="fas fa-download"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php if(empty($geds)): ?>
|
|
<tr><td colspan="3" class="text-center py-4 text-muted italic"><?= _("Aucune facture scannée pour cette demande.") ?></td></tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if($idDemandeRemboursement == "0"): ?>
|
|
<div class="mt-4 pt-3 border-top text-end">
|
|
<button class="btn btn-success px-5 shadow-sm rounded-pill" onClick="enregistrer_demande_remboursement();">
|
|
<i class="fas fa-check-circle me-2"></i><?= _("Soumettre ma demande") ?>
|
|
</button>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|