Update acts fields and add networks exclusions menu
This commit is contained in:
parent
c9a1044610
commit
e2d3a4bb06
|
@ -515,6 +515,7 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
|
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
|
||||||
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
|
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
|
||||||
$data['billing_types'] = $this->user_model->getEnumValues('nh_acts','billing_type');
|
$data['billing_types'] = $this->user_model->getEnumValues('nh_acts','billing_type');
|
||||||
|
$data['acts_types'] = $this->user_model->getEnumValues('nh_acts','type');
|
||||||
$data['authorization_types'] = $this->user_model->getEnumValues('nh_acts','authorization_type');
|
$data['authorization_types'] = $this->user_model->getEnumValues('nh_acts','authorization_type');
|
||||||
$data['provider_classes'] = $this->nano_health_model->getProviderClasses($data['config_id']);
|
$data['provider_classes'] = $this->nano_health_model->getProviderClasses($data['config_id']);
|
||||||
}
|
}
|
||||||
|
@ -2064,7 +2065,8 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['network_id'] = $this->session->userdata('network_id');
|
$data['network_id'] = $this->session->userdata('network_id');
|
||||||
|
|
||||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
$data['exclusion'] = $this->nano_health_model->getConfig($data['network_id']);
|
$exclusion = $this->nano_health_model->getExclusion($data['network_id']);
|
||||||
|
$data['exclusion'] = $exclusion ? $exclusion->first_row() : null ;
|
||||||
|
|
||||||
$this->load->view('header_hyp', $data);
|
$this->load->view('header_hyp', $data);
|
||||||
$this->load->view('nano_health/hyper/exclusions');
|
$this->load->view('nano_health/hyper/exclusions');
|
||||||
|
|
|
@ -439,6 +439,24 @@ class NanoHealthController extends CI_Controller
|
||||||
return json_encode(['status' => 500]);
|
return json_encode(['status' => 500]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function storeExclusions(){
|
||||||
|
if($this->isLogged()) {
|
||||||
|
if (isset($_POST)) {
|
||||||
|
$id = $_POST['id'];
|
||||||
|
|
||||||
|
// var_dump($_POST);
|
||||||
|
if(!empty($id)){
|
||||||
|
$this->db->where('id',$id);
|
||||||
|
$this->db->update('nh_exclusions',$_POST);
|
||||||
|
}else{
|
||||||
|
$this->db->insert('nh_exclusions',$_POST);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(['status' => 200 ]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function isLogged()
|
private function isLogged()
|
||||||
{
|
{
|
||||||
if (!$this->session->userdata('email')) {
|
if (!$this->session->userdata('email')) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ class CareRequests extends CI_Controller
|
||||||
if(isset($row->beneficiary_id)){
|
if(isset($row->beneficiary_id)){
|
||||||
$insured = $row->beneficiary_lastname.' '.$row->beneficiary_firstname;
|
$insured = $row->beneficiary_lastname.' '.$row->beneficiary_firstname;
|
||||||
}
|
}
|
||||||
$data[] = array($row->request_id , $insured, $this->lang->line($row->to), $row->user_phone, $row->act_code , $row->act_name,
|
$data[] = array($row->request_id , $row->issuer_agent_lastname.' | '.$row->issuer_agent_phone , $insured, $this->lang->line($row->to), $row->user_phone, $row->act_code , $row->act_name,
|
||||||
mb_strtoupper($this->lang->line($row->state),'UTF-8'), $row->created_at , $row->state === 'UNDER_VALIDATION' ? $buttons : null);
|
mb_strtoupper($this->lang->line($row->state),'UTF-8'), $row->created_at , $row->state === 'UNDER_VALIDATION' ? $buttons : null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -908,4 +908,8 @@ $lang['reminder_delay_days'] = "Invoice payment reminder time in days";
|
||||||
$lang['suspension_delay_days_after_reminder'] = "Suspension period after reminder period in days";
|
$lang['suspension_delay_days_after_reminder'] = "Suspension period after reminder period in days";
|
||||||
$lang['unit_value'] = "Unit value";
|
$lang['unit_value'] = "Unit value";
|
||||||
$lang['unit_value_required'] = "Unit value is required";
|
$lang['unit_value_required'] = "Unit value is required";
|
||||||
|
$lang['issuer_agent'] = "Issuing agent";
|
||||||
|
$lang['CONSULTATION'] = "CONSULTATION";
|
||||||
|
$lang['EXAM'] = "EXAM";
|
||||||
|
$lang['consultation_cannot_have_unit_price'] = "A consultation cannot have a unit price";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -918,4 +918,8 @@ $lang['reminder_delay_days'] = "Délai de relance de paiement d'une facture en j
|
||||||
$lang['suspension_delay_days_after_reminder'] = "Délai de suspension apres le délai de relance de jours";
|
$lang['suspension_delay_days_after_reminder'] = "Délai de suspension apres le délai de relance de jours";
|
||||||
$lang['unit_value'] = "Valeur de l'unité";
|
$lang['unit_value'] = "Valeur de l'unité";
|
||||||
$lang['unit_value_required'] = "La valeur de l'unité est requise";
|
$lang['unit_value_required'] = "La valeur de l'unité est requise";
|
||||||
|
$lang['issuer_agent'] = "Agent emetteur";
|
||||||
|
$lang['CONSULTATION'] = "CONSULTATION";
|
||||||
|
$lang['EXAM'] = "EXAMEN";
|
||||||
|
$lang['consultation_cannot_have_unit_price'] = "Une consultation ne peut pas avoir de prix unitaire"
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
||||||
|
<!--<link rel="stylesheet" href="--><?//= base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css') ?><!--">-->
|
||||||
|
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
Exclusions
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<!-- <h3 class="box-title">Compose New Message</h3>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<div id="editor">
|
||||||
|
<?= $exclusion->document ?? null ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box-footer">
|
||||||
|
<div class="pull-right">
|
||||||
|
<button id="save" class="btn btn-primary">
|
||||||
|
<?= $this->lang->line('save') ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- <button type="reset" class="btn btn-default"><i class="fa fa-times"></i> Discard</button>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></link>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- DataTables -->
|
||||||
|
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||||
|
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||||
|
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
toastr.options.closeButton = true;
|
||||||
|
toastr.options.closeMethod = 'fadeOut';
|
||||||
|
toastr.options.closeDuration = 5000;
|
||||||
|
toastr.options.closeEasing = 'swing';
|
||||||
|
|
||||||
|
var quill = new Quill('#editor', {
|
||||||
|
theme: 'snow'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#save").click(function () {
|
||||||
|
$.ajax({
|
||||||
|
url: '<?= base_url('NanoHealthController/storeExclusions')?>',
|
||||||
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
"id": "<?= $exclusion->id ?? null ?>",
|
||||||
|
"network_id": "<?= $network_id ?>",
|
||||||
|
"document": quill.root.innerHTML,
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if(data.status === 200){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: "<?= $this->lang->line('wallet_update')?>",
|
||||||
|
text:"<?= $this->lang->line('informations_updated')?>",
|
||||||
|
timer: 3000
|
||||||
|
}).then(()=>{
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
toastr.error("<?= $this->lang->line('error_message')?>" , "<?= $this->lang->line('request_error')?>");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
error: function (resultat, statut, error) {
|
||||||
|
console.log(resultat + " " + error);
|
||||||
|
toastr.error("<?= $this->lang->line('error_message')?>" , "<?= $this->lang->line('request_error')?>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
|
@ -383,9 +383,9 @@ $careRequests = [];
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
echo "<th width='5'>#</th>
|
echo "<th>Code</th>
|
||||||
<th>Code</th>
|
|
||||||
<th>".$this->lang->line('Nom')."</th>
|
<th>".$this->lang->line('Nom')."</th>
|
||||||
|
<th>Type</th>
|
||||||
<th>".$this->lang->line('billing_type')."</th>
|
<th>".$this->lang->line('billing_type')."</th>
|
||||||
<th>".$this->lang->line('unit_value')."</th>
|
<th>".$this->lang->line('unit_value')."</th>
|
||||||
<th>".$this->lang->line('authorization_type')."</th>
|
<th>".$this->lang->line('authorization_type')."</th>
|
||||||
|
@ -401,15 +401,15 @@ $careRequests = [];
|
||||||
$amount = isset($row->amount) ? Money::of(round($row->amount, 2), $currency_code, $context)->formatTo('fr_FR') : ''
|
$amount = isset($row->amount) ? Money::of(round($row->amount, 2), $currency_code, $context)->formatTo('fr_FR') : ''
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $i+1 ?></td>
|
|
||||||
<td><?= $row->code ?></td>
|
<td><?= $row->code ?></td>
|
||||||
<td><?= $row->name ?></td>
|
<td><?= $row->name ?></td>
|
||||||
|
<td><?= $this->lang->line($row->type); ?></td>
|
||||||
<td><?= $this->lang->line($row->billing_type); ?></td>
|
<td><?= $this->lang->line($row->billing_type); ?></td>
|
||||||
<td><?= $row->unit_value ?></td>
|
<td><?= $row->unit_value ?></td>
|
||||||
<td><?= $this->lang->line($row->authorization_type); ?></td>
|
<td><?= $this->lang->line($row->authorization_type); ?></td>
|
||||||
<td><?= $amount ?></td>
|
<td><?= $amount ?></td>
|
||||||
<td>
|
<td>
|
||||||
<button class='btn btn-success editAct' data-id="<?=$row->id?>" data-name="<?=$row->name?>" data-billing_type="<?=$row->billing_type?>"
|
<button class='btn btn-success editAct' data-id="<?=$row->id?>" data-name="<?=$row->name?>" data-type="<?=$row->type?>" data-billing_type="<?=$row->billing_type?>"
|
||||||
data-authorization_type="<?=$row->authorization_type?>" data-code="<?=$row->code?>" data-amount="<?=$row->amount?>" data-unit_value="<?=$row->unit_value?>">
|
data-authorization_type="<?=$row->authorization_type?>" data-code="<?=$row->code?>" data-amount="<?=$row->amount?>" data-unit_value="<?=$row->unit_value?>">
|
||||||
<i class='fa fa-edit'></i>
|
<i class='fa fa-edit'></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -442,8 +442,7 @@ $careRequests = [];
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
echo "<th width='5'>#</th>
|
echo "<th>".$this->lang->line('Nom')."</th>
|
||||||
<th>".$this->lang->line('Nom')."</th>
|
|
||||||
<th>Action</th>";
|
<th>Action</th>";
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -453,7 +452,6 @@ $careRequests = [];
|
||||||
if(isset($provider_classes)){
|
if(isset($provider_classes)){
|
||||||
foreach($provider_classes->result() as $i => $row) { ?>
|
foreach($provider_classes->result() as $i => $row) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $i+1 ?></td>
|
|
||||||
<td><?= $row->name ?></td>
|
<td><?= $row->name ?></td>
|
||||||
<td>
|
<td>
|
||||||
<button class='btn btn-success edit-class' data-id="<?=$row->id?>" data-name="<?=$row->name?>">
|
<button class='btn btn-success edit-class' data-id="<?=$row->id?>" data-name="<?=$row->name?>">
|
||||||
|
@ -744,6 +742,15 @@ $careRequests = [];
|
||||||
<label class="col-form-label"><?= $this->lang->line('Nom'); ?></label>
|
<label class="col-form-label"><?= $this->lang->line('Nom'); ?></label>
|
||||||
<input type="text" required class="form-control input-lg" name="name">
|
<input type="text" required class="form-control input-lg" name="name">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-form-label">Type</label>
|
||||||
|
<select class="form-control input-lg" name="type" required>
|
||||||
|
<?php $array = array_values($acts_types);
|
||||||
|
foreach ($array as $value) { ?>
|
||||||
|
<option value="<?=$value?>" > <?=$this->lang->line($value)?> </option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-form-label"><?= $this->lang->line('billing_type'); ?></label>
|
<label class="col-form-label"><?= $this->lang->line('billing_type'); ?></label>
|
||||||
<select class="form-control input-lg" name="billing_type" required>
|
<select class="form-control input-lg" name="billing_type" required>
|
||||||
|
@ -1076,9 +1083,12 @@ $careRequests = [];
|
||||||
|
|
||||||
$("#actForm").submit(function( event ) {
|
$("#actForm").submit(function( event ) {
|
||||||
let billing_type = $("select[name='billing_type'] :selected",this).val()
|
let billing_type = $("select[name='billing_type'] :selected",this).val()
|
||||||
|
let type = $("select[name='type'] :selected",this).val()
|
||||||
let amount = parseFloat($("input[name='amount']",this).val())
|
let amount = parseFloat($("input[name='amount']",this).val())
|
||||||
let unit_value = $("input[name='unit_value']",this).val()
|
let unit_value = $("input[name='unit_value']",this).val()
|
||||||
if(billing_type === "UNIT_PRICE" && isNaN(amount)) {
|
if(type === "CONSULTATION" && billing_type === "UNIT_PRICE") {
|
||||||
|
toastr.error("<?= $this->lang->line('consultation_cannot_have_unit_price')?>", "<?= $this->lang->line('management_rule')?>");
|
||||||
|
}else if(billing_type === "UNIT_PRICE" && isNaN(amount)) {
|
||||||
toastr.error("<?= $this->lang->line('amount_required')?>", "<?= $this->lang->line('management_rule')?>");
|
toastr.error("<?= $this->lang->line('amount_required')?>", "<?= $this->lang->line('management_rule')?>");
|
||||||
}else if(billing_type === "UNIT_PRICE" && unit_value.length === 0) {
|
}else if(billing_type === "UNIT_PRICE" && unit_value.length === 0) {
|
||||||
toastr.error("<?= $this->lang->line('unit_value_required')?>", "<?= $this->lang->line('management_rule')?>");
|
toastr.error("<?= $this->lang->line('unit_value_required')?>", "<?= $this->lang->line('management_rule')?>");
|
||||||
|
@ -1092,6 +1102,7 @@ $careRequests = [];
|
||||||
"id" : selectedActId,
|
"id" : selectedActId,
|
||||||
"code": $("input[name='code']",this).val(),
|
"code": $("input[name='code']",this).val(),
|
||||||
"name": $("input[name='name']",this).val(),
|
"name": $("input[name='name']",this).val(),
|
||||||
|
"type": type,
|
||||||
"billing_type": billing_type,
|
"billing_type": billing_type,
|
||||||
"authorization_type": $("select[name='authorization_type'] :selected",this).val(),
|
"authorization_type": $("select[name='authorization_type'] :selected",this).val(),
|
||||||
"unit_value": $("input[name='unit_value']",this).val(),
|
"unit_value": $("input[name='unit_value']",this).val(),
|
||||||
|
@ -1137,6 +1148,7 @@ $careRequests = [];
|
||||||
$("#modal-act h3").html("<?=$this->lang->line('edit_act')?>");
|
$("#modal-act h3").html("<?=$this->lang->line('edit_act')?>");
|
||||||
$("#actForm input[name='code']").val($(this).data('code'));
|
$("#actForm input[name='code']").val($(this).data('code'));
|
||||||
$("#actForm input[name='name']").val($(this).data('name'));
|
$("#actForm input[name='name']").val($(this).data('name'));
|
||||||
|
$("#actForm select[name='type']").val($(this).data('type'));
|
||||||
$("#actForm select[name='billing_type']").val($(this).data('billing_type'));
|
$("#actForm select[name='billing_type']").val($(this).data('billing_type'));
|
||||||
$("#actForm input[name='amount']").val($(this).data('amount'));
|
$("#actForm input[name='amount']").val($(this).data('amount'));
|
||||||
$("#actForm input[name='unit_value']").val($(this).data('unit_value'));
|
$("#actForm input[name='unit_value']").val($(this).data('unit_value'));
|
||||||
|
@ -1150,6 +1162,7 @@ $careRequests = [];
|
||||||
$("#modal-act h3").html("<?=$this->lang->line('add_act')?>");
|
$("#modal-act h3").html("<?=$this->lang->line('add_act')?>");
|
||||||
$("#actForm input[name='code']").val(null);
|
$("#actForm input[name='code']").val(null);
|
||||||
$("#actForm input[name='name']").val(null);
|
$("#actForm input[name='name']").val(null);
|
||||||
|
("#actForm select[name='type']").prop('selectedIndex',0);
|
||||||
$("#actForm select[name='billing_type']").prop('selectedIndex',0);
|
$("#actForm select[name='billing_type']").prop('selectedIndex',0);
|
||||||
$("#actForm input[name='amount']").val(null);
|
$("#actForm input[name='amount']").val(null);
|
||||||
$("#actForm input[name='unit_value']").val(null);
|
$("#actForm input[name='unit_value']").val(null);
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align='center'><?=$this->lang->line('request_id')?></th>
|
<th align='center'><?=$this->lang->line('request_id')?></th>
|
||||||
|
<th><?=$this->lang->line('issuer_agent')?></th>
|
||||||
<th><?=$this->lang->line('one_insured')?></th>
|
<th><?=$this->lang->line('one_insured')?></th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th><?=$this->lang->line('Contact')?></th>
|
<th><?=$this->lang->line('Contact')?></th>
|
||||||
|
@ -130,9 +131,9 @@
|
||||||
},
|
},
|
||||||
"type": "POST"
|
"type": "POST"
|
||||||
},
|
},
|
||||||
"aaSorting": [[7, "desc"]],
|
"aaSorting": [[8, "desc"]],
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
"targets": [7],
|
"targets": [8],
|
||||||
// "orderable": false,
|
// "orderable": false,
|
||||||
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
|
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
|
||||||
}],
|
}],
|
||||||
|
|
Loading…
Reference in New Issue