From a136faf9883082f56b82014389dd7e84233b8023 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Wed, 22 Dec 2021 10:08:33 +0100 Subject: [PATCH] Add Agent panel --- application/controllers/Agent.php | 50 +- application/language/english/message_lang.php | 1 + application/language/french/message_lang.php | 1 + .../agent/health_care_sheet_form.php | 484 ++++++++++++++++++ .../agent/insurances_health_care_sheets.php | 206 -------- .../hyper/insurances_health_care_sheets.php | 4 +- 6 files changed, 527 insertions(+), 219 deletions(-) create mode 100755 application/views/nano_health/agent/health_care_sheet_form.php delete mode 100755 application/views/nano_health/agent/insurances_health_care_sheets.php diff --git a/application/controllers/Agent.php b/application/controllers/Agent.php index 04548ff9..ba5f78d1 100755 --- a/application/controllers/Agent.php +++ b/application/controllers/Agent.php @@ -28,19 +28,45 @@ class Agent extends CI_Controller $data['network'] = $this->session->userdata('network'); $data['code_parrain'] = $this->session->userdata('parrain'); $data['network_agent_id'] = $this->session->userdata('network_agent_id'); - - $startDate = $this->input->get('d'); - $endDate = $this->input->get('f'); - - $format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d'; - $data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null; - $data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null; - $endDate = Date('Y-m-d', strtotime($endDate . "+1 day")); - $data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id')); - $this->load->view('header_agent', $data); - $this->load->view('nano_health/hyper/insurances_health_care_sheets'); - $this->load->view('footer'); + + if ($this->input->get('history')) { + if($this->input->get('id') !== null){ + $history = $this->input->get('history'); + if($history == 'insurance-health_care_sheets'){ + $data['active'] = "health_care_sheets"; + $data['health_care_sheet_id'] = $this->input->get('id'); + $data['health_care_sheet'] = $this->nano_health_model->getInfosHealthCareSheetById($this->input->get('id')); + $data['performances'] = $this->nano_health_model->getHealthCareSheetPerformances($data['health_care_sheet']->id ?? null); + $data['exams'] = $this->nano_health_model->getHealthCareSheetExams($data['health_care_sheet']->id ?? null); + $data['prescriptions'] = $this->nano_health_model->getHealthCareSheetPrescriptions($data['health_care_sheet']->id ?? null); + + $this->load->view('header_agent', $data); + $this->load->view('nano_health/hyper/infos_health_care_sheet'); + } + $this->load->view('footer'); + return; + }else{ +// $this->historique($id_network, $this->input->get('d'), $this->input->get('f'), $this->input->get('history'), $this->input->get('parrainId')); + } + }else if($this->input->get('action')) { + + $this->load->view('header_agent', $data); + $this->load->view('nano_health/agent/health_care_sheet_form'); + $this->load->view('footer'); + }else{ + $startDate = $this->input->get('d'); + $endDate = $this->input->get('f'); + + $format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d'; + $data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null; + $data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null; + $endDate = Date('Y-m-d', strtotime($endDate . "+1 day")); + + $this->load->view('header_agent', $data); + $this->load->view('nano_health/hyper/insurances_health_care_sheets'); + $this->load->view('footer'); + } } } diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index d404ebfe..acb6fe70 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -821,4 +821,5 @@ $lang['subscription_resubmitted'] = "The subscription has been resubmitted"; $lang['insurance_part'] = "Insurance share"; $lang['insurance_part'] = "Insurance share"; $lang['consultation_id'] = "Consulation ID"; +$lang['new_care_sheet'] = "Enter a care sheet"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index acffc4c0..9d34b01c 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -832,4 +832,5 @@ $lang['subscription_resubmitted'] = "La souscription a été re-soumise"; $lang['insurance_part'] = "Part de l'assurance"; $lang['insurance_part'] = "Part de l'assurance"; $lang['consultation_id'] = "ID de la consultation"; +$lang['new_care_sheet'] = "Saisir une feuille de soins"; ?> diff --git a/application/views/nano_health/agent/health_care_sheet_form.php b/application/views/nano_health/agent/health_care_sheet_form.php new file mode 100755 index 00000000..c2f735f6 --- /dev/null +++ b/application/views/nano_health/agent/health_care_sheet_form.php @@ -0,0 +1,484 @@ + + + + + + + + + + + +
+ +
+ +

+ lang->line('new_care_sheet') ?> +

+ +
+ +
+
+ +
+ +
+
+

Formulaire

+
+ + +
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + + + result() as $row) { + echo " + + + " . ' + + '; + } + } + ?> + +
MinMaxlang->line('rate'); ?> (%)Actions
" . $row->min . "" . $row->max . "" . $row->taux . " + + + +
+
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + + + result() as $row) { + echo " + + + " . ' + + '; + } + } + ?> + +
MinMaxlang->line('rate'); ?> (%)Actions
" . $row->min . "" . $row->max . "" . $row->taux . " + + + +
+
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + + + result() as $row) { + echo " + + + " . ' + + '; + } + } + ?> + +
MinMaxlang->line('rate'); ?> (%)Actions
" . $row->min . "" . $row->max . "" . $row->taux . " + + + +
+
+
+ + + +
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/agent/insurances_health_care_sheets.php b/application/views/nano_health/agent/insurances_health_care_sheets.php deleted file mode 100755 index 7da2bdeb..00000000 --- a/application/views/nano_health/agent/insurances_health_care_sheets.php +++ /dev/null @@ -1,206 +0,0 @@ - - - - - -
- - -
-

- lang->line('manage_health_care_sheets') ?> - - -

-
-
-
-
-
- -
- lang->line('Période') ?> - - - - - Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> -
-
-
- - -
-
-
-
-
-

lang->line('export_health_care_sheets_list') ?>

-
- -
-
-
- - - - - - - - - - - - - - - - - -
lang->line('health_care_sheet_id') ?>Typelang->line('insured_id') ?>lang->line('patient_lastname') ?>lang->line('patient_situation') ?>lang->line('institution_name') ?>lang->line('practitioner_lastname') ?>lang->line('care_condition') ?>lang->line('state') ?>DateAction
-
-
-
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/views/nano_health/hyper/insurances_health_care_sheets.php b/application/views/nano_health/hyper/insurances_health_care_sheets.php index dd02673f..898a7127 100755 --- a/application/views/nano_health/hyper/insurances_health_care_sheets.php +++ b/application/views/nano_health/hyper/insurances_health_care_sheets.php @@ -44,7 +44,9 @@

lang->line('export_health_care_sheets_list') ?>