diff --git a/providerwww/application/config/backend_defines.php b/providerwww/application/config/backend_defines.php index 9f4a791..6c094c5 100644 --- a/providerwww/application/config/backend_defines.php +++ b/providerwww/application/config/backend_defines.php @@ -22,6 +22,7 @@ define('MERMS_USER_REMINDERS', 120001); //define('', 120001); // PROVIDERS +define('MERMS_PROVIDERS_STARTPRACTICE', 150005); define('MERMS_PROVIDERS_BEFORESESSION', 150010); define('MERMS_PROVIDERS_CREATEACCOUNT', 150015); define('MERMS_PROVIDERS_RESETPASSWORD', 150010); @@ -38,7 +39,21 @@ define('MERMS_PROVIDERS_LINKMEMBER', 150057); /* +#define MERMS_PROVIDERS_START 150000 +// // -- +#define MERMS_PROVIDERS_STARTPRACTICE 150005 +#define MERMS_PROVIDERS_BEFORESESSION 150010 +#define MERMS_PROVIDERS_CREATEACCOUNT 150015 +#define MERMS_PROVIDERS_RESETPASSWORD 150020 +#define MERMS_PROVIDERS_LOGIN 150025 +#define MERMS_PROVIDERS_DASHLOAD 150030 +#define MERMS_PROVIDERS_LOADPROFILE 150035 +#define MERMS_PROVIDERS_UPDATEPROFILE 150040 +#define MERMS_PROVIDERS_REMINDERS 150045 +#define MERMS_PROVIDERS_CREATEMEMBER 150055 +#define MERMS_PROVIDERS_LINKMEMBER 150057 +#define MERMS_PROVIDERS_CREATECHART 150060 // USERS #define MERMS_USER_START 120000 diff --git a/providerwww/application/controllers/Login.php b/providerwww/application/controllers/Login.php index c4119a5..2001b02 100644 --- a/providerwww/application/controllers/Login.php +++ b/providerwww/application/controllers/Login.php @@ -1,12 +1,13 @@ input->get()); + $data = array(); $data['username'] = $data['pass'] = $data['error_message']=''; @@ -14,9 +15,7 @@ class Login extends Web_Controller { $data['username'] = trim($this->input->post('username')); $data['pass'] = htmlspecialchars($this->input->post('pass')); - //$this->load->view('provider/dash'); $outData = array(); - //print_r($data); $loginResult = $this->verifyLoginInput($data); // initial test if ($loginResult == true) { @@ -24,25 +23,21 @@ class Login extends Web_Controller { $loginResult = $this->loginUser($data, $outData); if (true == $loginResult) { $out = array(); - $this->load->model('patient_model'); - $out = $this->patient_model->getPatientList(); - $data["patient_list"] = $out["patient_list"]; - $this->renderProviderSecurePage('dash', $data); + redirect('provider'); // provider controller extend Provider_Controller- this check session valid } }// if valid input was supplied + else + { + $data['error_message']="Invalid Username or Password"; + } if (false == $loginResult) { $this->renderExternalPage('welcome_message', $data); // get here if login galis } } else { - //$this->load->view('welcome_message'); - // $this->load->view('provider/dash'); $this->renderExternalPage('welcome_message', $data); } - - //$this->load->view('provider/dash'); - //$this->load->view('welcome_message'); - } + } // end of index Login private function verifyLoginInput(&$data) { @@ -51,7 +46,6 @@ class Login extends Web_Controller { $data['error_message']="Username and password required"; } - if (trim($data['username']) != '' or trim($data['pass']) != '') { $ret = true; } @@ -59,14 +53,4 @@ class Login extends Web_Controller { return $ret; } - public function logout() { - $data = array(); - $this->destroySession(); - $this->renderExternalPage('welcome_message', $data); - } - - private function destroySession() { - - } - } diff --git a/providerwww/application/controllers/Logout.php b/providerwww/application/controllers/Logout.php index c2f2e9b..6a19a33 100644 --- a/providerwww/application/controllers/Logout.php +++ b/providerwww/application/controllers/Logout.php @@ -1,25 +1,28 @@ input->get()); $data = array(); - $this->logUserOut(); } - public function logUserOut() { + private function logUserOut() { $data = array(); $this->destroySession(); $this->renderExternalPage('welcome_message', $data); } - private function destroySession() { - + private function destroySession() { + $_SESSION['session_id'] =$_SESSION['username'] =$_SESSION['practice_name'] =$_SESSION['sessionpractice_code_id'] =$_SESSION['user_id'] =""; // ""; + $_SESSION['user_firstname'] =$_SESSION['user_lastname'] =$_SESSION['user_email'] =$_SESSION['practice_id'] =$_SESSION['user_provider'] =""; // ""; + $_SESSION['user_admin'] = ""; + unset($_SESSION); + return; } } diff --git a/providerwww/application/controllers/Provider.php b/providerwww/application/controllers/Provider.php index 5b0a99e..cc64122 100644 --- a/providerwww/application/controllers/Provider.php +++ b/providerwww/application/controllers/Provider.php @@ -11,6 +11,14 @@ class Provider extends Provider_Controller { $out = $this->patient_model->getPatientList(); $data["patient_list"] = $out["patient_list"]; $_SESSION['patient_count']=5; + + + + $this->load->model('encounter_model'); + $out = $this->encounter_model->getEncounterList(); + $data["encounter_list"] = $out["encounter_list"]; + + $this->renderProviderSecurePage('dash', $data); } @@ -56,6 +64,11 @@ class Provider extends Provider_Controller { $this->load->model('patient_model'); $out = $this->patient_model->getPatientList(); $data["patient_list"] = $out["patient_list"]; + + $this->load->model('encounter_model'); + $out = $this->encounter_model->getEncounterList(); + $data["encounter_list"] = $out["encounter_list"]; + $this->renderProviderSecurePage('dash', $data); } } diff --git a/providerwww/application/controllers/Register.php b/providerwww/application/controllers/Register.php index 441fa58..5c62f16 100644 --- a/providerwww/application/controllers/Register.php +++ b/providerwww/application/controllers/Register.php @@ -14,12 +14,12 @@ class Register extends Web_Controller { //#define MERMS_PROVIDERS_STARTPRACTICE 150005 // echo "xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "; - $data["practice_name"] = $this->input->post('practice_name'); + $data["practice_name"] = $this->input->post('practice_name').rand(100,999); $data["firstname"] = $this->input->post('firstname'); $data["lastname"] = $this->input->post('lastname'); $data["email"] = $this->input->post('email'); $data["password"] = $this->input->post('password'); - $data["username"] = $this->input->post('username'); + $data["username"] = $this->input->post('username').rand(100,999); $data['action'] = MERMS_PROVIDERS_STARTPRACTICE; @@ -28,9 +28,9 @@ class Register extends Web_Controller { $res = $this->backend_model->mermsemr_api($data, $out); $loginReturn = false; - - if ( $res==PHP_LOGIN_OK && isset($out["practice_id"]) && $out["practice_id"] > 0 ){ - + // echo $res; + if ( $res==PHP_API_OK && isset($out["practice_pending_id"]) && $out["practice_pending_id"] > 0 ){ + $data["loginReturn"] = true; } $this->renderExternalPage('register', $data); diff --git a/providerwww/application/models/Encounter_model.php b/providerwww/application/models/Encounter_model.php new file mode 100644 index 0000000..8bc3c86 --- /dev/null +++ b/providerwww/application/models/Encounter_model.php @@ -0,0 +1,41 @@ +db->query($mysql); + $num = $query->num_rows(); + $data["encounter_list"] = $query->result(); + return $data; + } + + public function LoadEncounter($practice_id, $patient_id) { + + $mysql = "SELECT pe.primary_complain AS reason, pe.appt_date AS appt,m.firstname,m.lastname,'F' AS gender , '35' AS age, pe.id,pe.id AS encounter_id FROM patient_encounters pe LEFT JOIN members m ON m.id=pe.member_id"; + $query = $this->db->query($mysql); + $num = $query->num_rows(); + $data["patient_return"] = $query->result(); + return $data; + } + +} +/* + + +mermsemr_dev=> SELECT pe.primary_complain AS reason, pe.appt_date AS appt,m.firstname,m.lastname,'F' AS gender , '35' AS age, pe.id,pe.id AS encounter_id FROM patient_encounters pe LEFT JOIN members m ON m.id=pe.member_id; + reason | appt | firstname | lastname | gender | age | id | encounter_id +----------------------------+----------------------------+-----------+----------+--------+-----+----+-------------- + Nighthly headache | 2020-12-20 16:36:45.143238 | Olutest | Ameytest | F | 35 | 1 | 1 + Sleepy and lazy all time | 2020-12-27 10:56:06 | Olutest | Ameytest | F | 35 | 2 | 2 + Broken bones need fix | 2020-12-28 11:56:06 | Pottie | Gloria | F | 35 | 3 | 3 + Too much food always | 2020-12-27 12:56:06 | fagbemi | Moore | F | 35 | 4 | 4 + Just like to visit and see | 2020-12-27 15:56:06 | Olutest | Ameytest | F | 35 | 5 | 5 +(5 rows) + +*/ diff --git a/providerwww/application/views/provider/components/encounter_listing.php b/providerwww/application/views/provider/components/encounter_listing.php new file mode 100644 index 0000000..7c58e11 --- /dev/null +++ b/providerwww/application/views/provider/components/encounter_listing.php @@ -0,0 +1,137 @@ + + +
+
+
+ PP +
+
+
+ firstname ?> lastname ?> +
reason ?>
+ +
+
+ + + \ No newline at end of file diff --git a/providerwww/application/views/provider/components/patient_listing.php b/providerwww/application/views/provider/components/patient_listing.php index 7edb660..6e81363 100644 --- a/providerwww/application/views/provider/components/patient_listing.php +++ b/providerwww/application/views/provider/components/patient_listing.php @@ -15,12 +15,12 @@ - + - - - - + + + + diff --git a/providerwww/application/views/provider/dash.php b/providerwww/application/views/provider/dash.php index 6389433..2d60f1d 100644 --- a/providerwww/application/views/provider/dash.php +++ b/providerwww/application/views/provider/dash.php @@ -24,113 +24,16 @@
-

Recent Encounters

+

Upcoming Encounters

-
-
-
- PP -
-
-
- Car dealer -
Unread utf-8 in more quick overview
-
    -
  • - Created by Lizzy Halfman -
  • -
  • |
  • -
  • - Saturday, March 17 2019 -
  • -
-
-
-
-
-
- SL -
-
-
- Webster HTML5 -
I get an error "No Direct Access Allowed!" when I enter purchase
-
    -
  • - Created by Samuel Woods -
  • -
  • |
  • -
  • - Sunday, March 19 2019 -
  • -
-
-
-
-
-
- MP -
-
-
- The corps -
OAuth Credentials not generating the key
-
    -
  • - Created by Andrew nico -
  • -
  • |
  • -
  • - Monday, March 21 2019 -
  • -
-
-
-
-
-
- SP -
-
-
- Sam martin vCard -
Pre-Buy Questions : For bakery Shop (Mentor Android Application)
-
    -
  • - Created by Jimmy Falicon -
  • -
  • |
  • -
  • - Friday, March 22 2019 -
  • -
-
-
-
-
-
- AP -
-
-
- Mentor admin -
I need a payment option, for each seller per item
-
    -
  • - Created by Brian Joedon -
  • -
  • |
  • -
  • - Saturday, March 17 2019 -
  • -
-
-
+ + +
@@ -138,7 +41,7 @@
-

Activities

+

Active Encounters

diff --git a/providerwww/application/views/register.php b/providerwww/application/views/register.php index a6f4ade..c88b335 100644 --- a/providerwww/application/views/register.php +++ b/providerwww/application/views/register.php @@ -6,6 +6,9 @@ if (!isset($facility_image) || $facility_image == '') { if (!isset($facility_text) || $facility_text == '') { $facility_text = "Merms Providers"; } + +$registeration_completed = isset($loginReturn)?$loginReturn :false; + ?>
@@ -28,8 +31,33 @@ if (!isset($facility_text) || $facility_text == '') {
+ + +
-

Merms Providers

+

Merms Providers

+ + +
+
+
+ + +
+
+
+

Welcome, Please create your account.

@@ -87,6 +115,14 @@ if (!isset($facility_text) || $facility_text == '') {
+ + + + + +
diff --git a/providerwww/application/views/template/menu/sidemain.php b/providerwww/application/views/template/menu/sidemain.php index eb20a98..e9240b0 100644 --- a/providerwww/application/views/template/menu/sidemain.php +++ b/providerwww/application/views/template/menu/sidemain.php @@ -22,7 +22,7 @@ $menu = array(
## NamePhoneChartStatusActionPhoneChartStatusAction