From e2d3a4bb06a042851e8a74c419323843deed5847 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Wed, 6 Apr 2022 10:52:17 +0100 Subject: [PATCH] Update acts fields and add networks exclusions menu --- application/controllers/Hyperviseur_dash.php | 4 +- .../controllers/NanoHealthController.php | 18 +++ .../controllers/pagination/CareRequests.php | 2 +- application/language/english/message_lang.php | 4 + application/language/french/message_lang.php | 4 + .../views/nano_health/hyper/exclusions.php | 108 ++++++++++++++++++ .../nano_health/hyper/gestion_wallet.php | 29 +++-- .../validating_doctor/care_requests.php | 5 +- 8 files changed, 162 insertions(+), 12 deletions(-) create mode 100755 application/views/nano_health/hyper/exclusions.php diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 4d23a208..7365df37 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -515,6 +515,7 @@ class Hyperviseur_dash extends CI_Controller $data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($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['acts_types'] = $this->user_model->getEnumValues('nh_acts','type'); $data['authorization_types'] = $this->user_model->getEnumValues('nh_acts','authorization_type'); $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['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('nano_health/hyper/exclusions'); diff --git a/application/controllers/NanoHealthController.php b/application/controllers/NanoHealthController.php index b8a1fa8d..7975a7a7 100644 --- a/application/controllers/NanoHealthController.php +++ b/application/controllers/NanoHealthController.php @@ -439,6 +439,24 @@ class NanoHealthController extends CI_Controller 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() { if (!$this->session->userdata('email')) { diff --git a/application/controllers/pagination/CareRequests.php b/application/controllers/pagination/CareRequests.php index 73bba710..607bd1e6 100755 --- a/application/controllers/pagination/CareRequests.php +++ b/application/controllers/pagination/CareRequests.php @@ -40,7 +40,7 @@ class CareRequests extends CI_Controller if(isset($row->beneficiary_id)){ $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); } diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index 485b3a57..4527a879 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -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['unit_value'] = "Unit value"; $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"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 6db14479..53bcd34b 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -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['unit_value'] = "Valeur de l'unité"; $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" ?> diff --git a/application/views/nano_health/hyper/exclusions.php b/application/views/nano_health/hyper/exclusions.php new file mode 100755 index 00000000..05771479 --- /dev/null +++ b/application/views/nano_health/hyper/exclusions.php @@ -0,0 +1,108 @@ + + + + +
+ + +
+

+ Exclusions +

+
+ +
+
+
+
+
+ +
+ +
+
+
+ document ?? null ?> +
+ + + +
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/hyper/gestion_wallet.php b/application/views/nano_health/hyper/gestion_wallet.php index dcd8c20c..37cf5c95 100755 --- a/application/views/nano_health/hyper/gestion_wallet.php +++ b/application/views/nano_health/hyper/gestion_wallet.php @@ -383,9 +383,9 @@ $careRequests = []; # - Code + echo "Code ".$this->lang->line('Nom')." + Type ".$this->lang->line('billing_type')." ".$this->lang->line('unit_value')." ".$this->lang->line('authorization_type')." @@ -401,15 +401,15 @@ $careRequests = []; $amount = isset($row->amount) ? Money::of(round($row->amount, 2), $currency_code, $context)->formatTo('fr_FR') : '' ?> - code ?> name ?> + lang->line($row->type); ?> lang->line($row->billing_type); ?> unit_value ?> lang->line($row->authorization_type); ?> - @@ -442,8 +442,7 @@ $careRequests = []; # - ".$this->lang->line('Nom')." + echo "".$this->lang->line('Nom')." Action"; ?> @@ -453,7 +452,6 @@ $careRequests = []; if(isset($provider_classes)){ foreach($provider_classes->result() as $i => $row) { ?> - name ?>