diff --git a/mermsemr/src/include/mermsemr_api.h b/mermsemr/src/include/mermsemr_api.h index bace789..c8a72d3 100644 --- a/mermsemr/src/include/mermsemr_api.h +++ b/mermsemr/src/include/mermsemr_api.h @@ -96,6 +96,7 @@ enum { #define MERMS_PROVIDERS_LOADPROFILE 150035 #define MERMS_PROVIDERS_UPDATEPROFILE 150040 #define MERMS_PROVIDERS_REMINDERS 150045 +#define MERMS_PROVIDERS_CREATEMEMBER 150055 // //#define 120001 // // -- #define MERMS_PROVIDERS_END 159999 diff --git a/mermsemr/src/shared_tool/function_members.cc b/mermsemr/src/shared_tool/function_members.cc index acfb74f..f4e2df4 100644 --- a/mermsemr/src/shared_tool/function_members.cc +++ b/mermsemr/src/shared_tool/function_members.cc @@ -298,7 +298,7 @@ long medTrUpdateProfile(CVars in, CVars &out) { OPTIONAL(in, "street2") REQ_STRING(in, "street2", 1, 49, "(.*)"); REQ_STRING(in, "city", 5, 49, "(.*)"); // OPTIONAL(in, "phone") REQ_STRING(in, "phone", 5, 23, "(.*)"); - REQ_STRING(in, "zipcode", 1, 12, "(.*)"); + OPTIONAL(in, "zipcode") REQ_STRING(in, "zipcode", 1, 12, "(.*)"); REQ_STRING(in, "state", 1, 59, "(.*)"); REQ_STRING(in, "country", 1, 3, "(.*)"); REQ_STRING(in, "loc", 5, 16, "(.*)"); diff --git a/mermsemr/src/shared_tool/providers.cc b/mermsemr/src/shared_tool/providers.cc index f76950e..0bf4d68 100644 --- a/mermsemr/src/shared_tool/providers.cc +++ b/mermsemr/src/shared_tool/providers.cc @@ -18,6 +18,7 @@ long provider_login(CVars in, CVars &out); long PracticeLogin(CVars in, CVars &out); long PracticeSessionCheck(long practice_id, long practice_users_id, const char *sessionid, int create); +long provider_createmember(CVars in, CVars &out); long providers_call(CVars in, CVars &out) { @@ -33,6 +34,10 @@ long providers_call(CVars in, CVars &out) { return provider_login(in, out); break; + case MERMS_PROVIDERS_CREATEMEMBER: + return provider_createmember(in, out); + break; + case EXISTING_CARD: REQ_LONG(in, "paymentid", 0, -1); // now we have to make sure the payment id is valid for this customer @@ -57,6 +62,17 @@ long providers_call(CVars in, CVars &out) { return ret; } + + +long provider_createmember(CVars in, CVars &out){ +logfmt(logINFO, "ENTER CALL long providers_createmember(CVars in, CVars &out)"); + +return 0; +} + + + + long provider_login(CVars in, CVars &out) { long ret = -1; diff --git a/providerwww/application/config/autoload.php b/providerwww/application/config/autoload.php index 35370cd..2f85862 100644 --- a/providerwww/application/config/autoload.php +++ b/providerwww/application/config/autoload.php @@ -59,7 +59,7 @@ $autoload['packages'] = array(); | $autoload['libraries'] = array('user_agent' => 'ua'); */ //$autoload['libraries'] = array(); -$autoload['libraries'] = array('session','form_validation'); +$autoload['libraries'] = array('database','session','form_validation'); /* | ------------------------------------------------------------------- | Auto-load Drivers diff --git a/providerwww/application/config/backend_defines.php b/providerwww/application/config/backend_defines.php index 72319cb..7bd3627 100644 --- a/providerwww/application/config/backend_defines.php +++ b/providerwww/application/config/backend_defines.php @@ -30,6 +30,7 @@ define('MERMS_PROVIDERS_DASHLOAD', 150010); define('MERMS_PROVIDERS_LOADPROFILE', 150010); define('MERMS_PROVIDERS_UPDATEPROFILE', 150010); define('MERMS_PROVIDERS_REMINDERS', 150010); +define('MERMS_PROVIDERS_CREATEMEMBER', 150055); //define('', 120001); @@ -70,4 +71,4 @@ define('MERMS_PROVIDERS_REMINDERS', 150010); #define MERMS_PROVIDERS_END 159999 // - */ \ No newline at end of file + */ diff --git a/providerwww/application/config/database.php b/providerwww/application/config/database.php index d22321e..6ab8d54 100644 --- a/providerwww/application/config/database.php +++ b/providerwww/application/config/database.php @@ -73,7 +73,40 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $active_group = 'default'; $query_builder = TRUE; +require_once('backend.php'); + +$show_database_error = true; +$is_live = $mermsemr->cfgReadChar("system.live"); +if ($is_live == false) { + $show_database_error = false; +} + + $db['default'] = array( + 'dsn' => '', + 'hostname' => $mermsemr->cfgReadChar("database.host"), + 'username' => $mermsemr->cfgReadChar("database.user"), + 'password' => $mermsemr->cfgReadChar("database.pass"), + 'database' => $mermsemr->cfgReadChar("database.name"), + 'dbdriver' => 'postgre', + 'dbprefix' => '', + 'pconnect' => FALSE, + 'db_debug' => $show_database_error, + 'db_debug2' => (ENVIRONMENT !== 'production'), + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'encrypt' => FALSE, + 'compress' => FALSE, + 'stricton' => FALSE, + 'failover' => array(), + 'save_queries' => TRUE +); + + +$db['default_out'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => '', diff --git a/providerwww/application/controllers/Patient.php b/providerwww/application/controllers/Patient.php index 6023042..4199a6d 100644 --- a/providerwww/application/controllers/Patient.php +++ b/providerwww/application/controllers/Patient.php @@ -11,9 +11,42 @@ class Patient extends Provider_Controller { public function addnew() { $data = array(); + $data["account_message"] = ""; + $data["firstname"] = $data["lastname"] = $data["email"] = $data["password"]= $data["street1"] = $data["street2"]= $data["city"] = $data["zipcode"]=""; + if ($_POST){ + $data['firstname'] = trim($this->input->post('firstname')); + $data['lastname'] = trim($this->input->post('lastname')); + $data['email'] = trim($this->input->post('email')); + $data['password'] = trim($this->input->post('password')); + $data['street1'] = trim($this->input->post('street1')); + $data['street2'] = trim($this->input->post('street2')); + $data['city'] = trim($this->input->post('city')); + $data['state'] = trim($this->input->post('state')); + + $data["action"] = MERMS_PROVIDERS_CREATEMEMBER; + $out = array(); + $ret = $this->mermsemr_api($data, $out); + $data["account_message"] = "This is the return ".$ret; + echo "Posted"; + } + + $out = array(); + $out = $this->getPatientList(); + $data["patient_list"] = $out["patient_list"]; + + $this->renderProviderSecurePage('patient/newpatient', $data); } + private function getPatientList(){ + + $mysql = "SELECT p.practice_id,p.id AS patient_id,p.member_id,p.long_id,m.firstname,m.lastname,m.phone,p.added " + ." FROM patients p LEFT JOIN members m ON m.id=p.member_id ORDER BY p.added DESC"; + $query = $this->db->query($mysql); + $num = $query->num_rows(); + $data["patient_list"] = $query->result(); + return $data; + } public function report() { $data = array(); $this->renderProviderSecurePage('patient/patientreport', $data); diff --git a/providerwww/application/controllers/Provider.php b/providerwww/application/controllers/Provider.php index 13ec2be..e1d1dc3 100644 --- a/providerwww/application/controllers/Provider.php +++ b/providerwww/application/controllers/Provider.php @@ -9,4 +9,24 @@ class Provider extends Provider_Controller { $this->renderProviderSecurePage('dash', $data); } + public function alerts() { + $data = array(); + $this->renderProviderSecurePage('dash', $data); + } + + public function todo() { + $data = array(); + $this->renderProviderSecurePage('dash', $data); + } + + public function tasks() { + $data = array(); + $this->renderProviderSecurePage('dash', $data); + } + + public function calendar() { + $data = array(); + $this->renderProviderSecurePage('dash', $data); + } + } diff --git a/providerwww/application/controllers/Reports.php b/providerwww/application/controllers/Reports.php new file mode 100644 index 0000000..93ba1fe --- /dev/null +++ b/providerwww/application/controllers/Reports.php @@ -0,0 +1,12 @@ +renderProviderSecurePage('dash', $data); + } + +} diff --git a/providerwww/application/views/provider/components/patient_listing.php b/providerwww/application/views/provider/components/patient_listing.php index 31b2011..09bd448 100644 --- a/providerwww/application/views/provider/components/patient_listing.php +++ b/providerwww/application/views/provider/components/patient_listing.php @@ -18,13 +18,29 @@ # Name - Price - In stock + Phone + Chart Status Action + + + + 1 + firstname?> lastname?> + phone?> + + Active + + + 1 Cold Shoulder Bling Dress diff --git a/providerwww/application/views/provider/patient/newpatient.php b/providerwww/application/views/provider/patient/newpatient.php index 2b41187..f6f3033 100644 --- a/providerwww/application/views/provider/patient/newpatient.php +++ b/providerwww/application/views/provider/patient/newpatient.php @@ -30,15 +30,15 @@
-
-
+ +
- +
- +
@@ -49,40 +49,40 @@
- +
- +
- + placeholder="Apartment, studio, or floor">
- +
- - - + + +
- +
- -