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 @@ + + + + + + + + + + + +
= $this->lang->line('health_care_sheet_id') ?> | -Type | -= $this->lang->line('insured_id') ?> | -= $this->lang->line('patient_lastname') ?> | -= $this->lang->line('patient_situation') ?> | -= $this->lang->line('institution_name') ?> | -= $this->lang->line('practitioner_lastname') ?> | -= $this->lang->line('care_condition') ?> | -= $this->lang->line('state') ?> | -Date | -Action | -
---|