Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25bd22d245 | |||
| c9e4228bdd | |||
| 7ab058c575 | |||
| 147e2debde |
@@ -98,5 +98,6 @@ define('MERMSEMR_BKO_ADDCARD', 100028);
|
||||
define('MERMSEMR_BKO_LANGUAGE_STATUS', 100030);
|
||||
|
||||
define('MERMS_PROVIDERS_RESNDSTARTLNK', 150006);
|
||||
define('MERMS_PROVIDERS_CANCELPENDING', 150007);
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@ class Dash extends Admin_Controller {
|
||||
|
||||
|
||||
// Pending practice data
|
||||
$case_statement = "(CASE WHEN status=1 THEN 'Pending' WHEN status=0 THEN 'Deleted' WHEN status=3 THEN 'Deleted' WHEN status=5 THEN 'Acive' ELSE 'Unknown' END)";
|
||||
// $case_statement = "(CASE WHEN status=1 THEN 'Pending' WHEN status=0 THEN 'Deleted' WHEN status=3 THEN 'Cancelled' WHEN status=5 THEN 'Acive' ELSE 'Unknown' END)";
|
||||
$case_statement = "(CASE WHEN status=1 THEN 'Pending' WHEN status=0 THEN 'Deleted' WHEN status=3 THEN '<span style=\"color:red;\">Rejected</span>' WHEN status=5 THEN 'Acive' ELSE 'Unknown' END)";
|
||||
|
||||
$mysql = "SELECT '<a href=\"/practice/viewPendingPractice/'||id||'\"><button type=\"button\" class=\"btn btn-warning\"><i class=\"fa fa-check-circle\"></i></button></a>' AS process,
|
||||
'<button type=\"button\" class=\"btn btn-danger\" id=\"bremail'||id||'\" onclick=\"resendEmail('||id||');\"><i class=\"fa fa-bars\"></i></button>' AS semail,
|
||||
$case_statement AS status,
|
||||
|
||||
@@ -142,6 +142,18 @@ class Practice extends Admin_Controller {
|
||||
|
||||
public function rejectPracticeSignup(){
|
||||
|
||||
//
|
||||
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
|
||||
$data['pending_practice_id'] = trim($this->input->get('pending_practice_id'));
|
||||
echo "..Sending.."; // . $data['pending_practice_id'];
|
||||
$data['action'] = MERMS_PROVIDERS_CANCELPENDING;
|
||||
$data['practice_pending_id'] = $data['pending_practice_id'];
|
||||
$res = $this->backend_model->mermsemr_api($data, $out);
|
||||
echo "Completed " ;
|
||||
|
||||
echo 'User Rejected and Removed from Signup';
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ class Practice_model extends CI_Model {
|
||||
}
|
||||
|
||||
public function getPendingPractice() {
|
||||
$case_statement = "(CASE WHEN status=1 THEN 'Pending' WHEN status=0 THEN 'Deleted' WHEN status=3 THEN 'Deleted' WHEN status=5 THEN 'Acive' ELSE 'Unknown' END)";
|
||||
$case_statement = "(CASE WHEN status=1 THEN 'Pending' WHEN status=0 THEN 'Deleted' WHEN status=3 THEN '<span style=\"color:red;\">Rejected</span>' WHEN status=5 THEN 'Acive' ELSE 'Unknown' END)";
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"selectPendingPractice('||id||');\">Select</button>' AS process,
|
||||
'<button type=\"button\" class=\"btn btn-danger\" onclick=\"resendEmail('||id||');\">Email</button>' AS semail,
|
||||
$case_statement AS status,
|
||||
|
||||
@@ -95,6 +95,7 @@ enum {
|
||||
// // --
|
||||
#define MERMS_PROVIDERS_STARTPRACTICE 150005
|
||||
#define MERMS_PROVIDERS_RESNDSTARTLNK 150006
|
||||
#define MERMS_PROVIDERS_CANCELPENDING 150007
|
||||
#define MERMS_PROVIDERS_BEFORESESSION 150010
|
||||
#define MERMS_PROVIDERS_CREATEACCOUNT 150015
|
||||
#define MERMS_PROVIDERS_RESETPASSWORD 150020
|
||||
|
||||
@@ -25,10 +25,13 @@ long provider_acceptmember(CVars in, CVars &out);
|
||||
long provider_linkIdemember(CVars in, CVars &out);
|
||||
void GenerateLongID(char * number, int sz, int seed);
|
||||
long provider_startNewPractice(CVars in, CVars &out);
|
||||
long rejectPendingPractice(CVars in, CVars &out);
|
||||
|
||||
|
||||
long providers_call(CVars in, CVars &out) {
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
char vname[20];
|
||||
|
||||
logfmt(logINFO, "ERROR CALL long providers_call(CVars in, CVars &out)");
|
||||
try {
|
||||
REQ_LONG(in, "action", 0, -1);
|
||||
@@ -65,23 +68,50 @@ long providers_call(CVars in, CVars &out) {
|
||||
provider_email_calls(MERMS_PROVIDERS_STARTPRACTICE, in, out);
|
||||
break;
|
||||
|
||||
case INVOICED:
|
||||
const PGresult *res = pgsql_query("SELECT * FROM members WHERE invoiced =1 AND id=%lu", in["member_id"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
|
||||
|
||||
case MERMS_PROVIDERS_CANCELPENDING:
|
||||
|
||||
ret = rejectPendingPractice(in, out);
|
||||
/*
|
||||
resD = pgsql_query("SELECT * FROM practice_pending WHERE status NOT IN (0,3,5) AND id=%lu", in["practice_pending_id"].Long());
|
||||
if (resD != NULL && pgsql_num_rows(resD) == 1) {
|
||||
pgsql_query("UPDATE practice_pending SET status = 3 WHERE id = %lu AND status<>5", in["practice_pending_id"].Long()); // setting the password MD5 now
|
||||
out["error_status"] = " The Pending was cancelled";
|
||||
ret = PHP_API_OK;
|
||||
} else {
|
||||
out["error_status"] = "user not authorized to use invoice";
|
||||
out["error_status"] = " Not authorized to use adjust this type";
|
||||
}
|
||||
break;
|
||||
*/
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long providers_call(CVars in, CVars &out)");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
long rejectPendingPractice(CVars in, CVars &out){
|
||||
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
char vname[20];
|
||||
|
||||
const PGresult *resD = pgsql_query("SELECT * FROM practice_pending WHERE status NOT IN (0,3,5) AND id=%lu", in["practice_pending_id"].Long());
|
||||
if (resD != NULL && pgsql_num_rows(resD) == 1) {
|
||||
pgsql_query("UPDATE practice_pending SET status = 3 WHERE id = %lu AND status<>5", in["practice_pending_id"].Long()); // setting the password MD5 now
|
||||
out["error_status"] = " The Pending was cancelled";
|
||||
ret = PHP_API_OK;
|
||||
} else {
|
||||
out["error_status"] = " Not authorized to use adjust this type";
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
long provider_login(CVars in, CVars &out) {
|
||||
|
||||
long ret = -1;
|
||||
@@ -236,6 +266,7 @@ long provider_createmember(CVars in, CVars &out) {
|
||||
REQ_STRING(in, "password", 5, 49, "(.*)");
|
||||
OPTIONAL(in, "phone") REQ_STRING(in, "loc", 5, 16, "(.*)");
|
||||
OPTIONAL(in, "login") REQ_LONG(in, "login", 0, -1);
|
||||
REQ_STRING(in, "gender", 1, 2, "(.*)");
|
||||
|
||||
long member_id = 0;
|
||||
|
||||
@@ -266,10 +297,18 @@ long provider_createmember(CVars in, CVars &out) {
|
||||
x["email"].set_valid(true);
|
||||
// x["password"] = in["email"];
|
||||
// x["password"].set_valid(true);
|
||||
x["gender"] = in["gender"];
|
||||
x["gender"].set_valid(true);
|
||||
|
||||
out["member_id"] = insert_db_record(DBS_VALID, "members", "members_id_seq", x);
|
||||
|
||||
if (out["member_id"].Long() > 0) {
|
||||
pgsql_query("UPDATE members SET password = md5('%s') WHERE id = %lu", in["password"].c_str(), out["member_id"].Long()); // setting the password MD5 now
|
||||
|
||||
if (in["dob"] !=""){ // if dob was sent
|
||||
pgsql_query("UPDATE members SET dob = '%s' WHERE id = %lu", in["dob"].c_str(), out["member_id"].Long()); // setting dob now
|
||||
}
|
||||
|
||||
// Now Send Email
|
||||
ret = PHP_API_OK;
|
||||
//make your patient
|
||||
|
||||
@@ -28,13 +28,22 @@ class Patient extends Provider_Controller {
|
||||
$data['street2'] = trim($this->input->post('street2'));
|
||||
$data['city'] = trim($this->input->post('city'));
|
||||
$data['state'] = trim($this->input->post('state'));
|
||||
|
||||
$data['dob'] = trim($this->input->post('dob'));
|
||||
$data['gender'] = trim($this->input->post('gender'));
|
||||
|
||||
$data["loc"] = $_SERVER["REMOTE_ADDR"];
|
||||
|
||||
$data["action"] = MERMS_PROVIDERS_CREATEMEMBER;
|
||||
$out = array();
|
||||
$ret = $this->mermsemr_api($data, $out);
|
||||
$data["account_message"] = "This is the return " . $ret;
|
||||
echo "Posted";
|
||||
|
||||
if ($ret==0 && $out["member_id"]>0){
|
||||
$data["account_message"] = "<span style='color:green; font-size:12px;'>New patient added </span>";
|
||||
}
|
||||
else{
|
||||
$data["account_message"] = "<span style='color:red; font-size:12px;'>Error adding new patient </span>";
|
||||
}
|
||||
}
|
||||
|
||||
$out = array();
|
||||
@@ -46,7 +55,14 @@ class Patient extends Provider_Controller {
|
||||
}
|
||||
|
||||
public function selectPatient(){
|
||||
|
||||
if ($this->uri->segment(3) === FALSE) {
|
||||
$patient_id = 0;
|
||||
} else {
|
||||
$patient_id = $this->uri->segment(3);
|
||||
}
|
||||
|
||||
// echo $patient_id;
|
||||
$this->selectedPatientView($patient_id);
|
||||
}
|
||||
|
||||
public function findpatient(){
|
||||
@@ -61,17 +77,24 @@ class Patient extends Provider_Controller {
|
||||
|
||||
public function patientView() {
|
||||
$data['patient_id'] = trim($this->input->post('patientID'));
|
||||
$this->load->model('patient_model');
|
||||
$out = $this->patient_model->LoadPatient(0, $data['patient_id']);
|
||||
|
||||
// print_r($out);
|
||||
$data['firstname'] = $out["patient_return"][0]->firstname;
|
||||
$data['lastname'] = $out["patient_return"][0]->lastname;
|
||||
$data['email'] = $out["patient_return"][0]->email;
|
||||
|
||||
$this->renderProviderSecurePage('patient/thispatient', $data);
|
||||
$this->selectedPatientView($data['patient_id']);
|
||||
}
|
||||
|
||||
private function selectedPatientView($patient_id){
|
||||
|
||||
$data['patient_id'] =$patient_id;
|
||||
$this->load->model('patient_model');
|
||||
$out = $this->patient_model->LoadPatient(0, $data['patient_id']);
|
||||
|
||||
// print_r($out);
|
||||
$data['firstname'] = $out["patient_return"][0]->firstname;
|
||||
$data['lastname'] = $out["patient_return"][0]->lastname;
|
||||
$data['email'] = $out["patient_return"][0]->email;
|
||||
|
||||
$this->renderProviderSecurePage('patient/thispatient', $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 "
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="card card-statistics h-100 mb-0">
|
||||
<div class="card-header d-flex justify-content-between">
|
||||
<div class="card-heading">
|
||||
<h4 class="card-title">New Patient</h4>
|
||||
<h4 class="card-title">New Patient - <?= $account_message ?> </h4>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<!-- a class="btn btn-round btn-inverse-primary btn-xs" href="#">View all </a -->
|
||||
@@ -53,11 +53,11 @@
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputPassword4">Gendar</label>
|
||||
|
||||
<select class="form-control" aria-label="Default select example">
|
||||
<option selected>Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
<select class="form-control" aria-label="Select Gender" name ="gender">
|
||||
<option selected>Select</option>
|
||||
<option value="M">Male</option>
|
||||
<option value="F">Female</option>
|
||||
<option value="U">Unknown</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@@ -102,13 +102,13 @@
|
||||
<input type="text" class="form-control" id="zipcode" name="zipcode" value="<?= $zipcode ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- div class="form-group">
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
<?= $account_message ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</!-->
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-9">
|
||||
|
||||
@@ -32,45 +32,101 @@
|
||||
<div class="card card-statistics h-100 mb-0">
|
||||
<div class="card-header d-flex justify-content-between">
|
||||
<div class="card-heading">
|
||||
<h4 class="card-title">Edit Patient</h4>
|
||||
<h4 class="card-title"><?=$firstname?> <?=$lastname?></h4>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<!-- a class="btn btn-round btn-inverse-primary btn-xs" href="#">View all </a -->
|
||||
<button type="button" class="btn btn-primary btn-sm">Reminders</button>
|
||||
<button type="button" class="btn btn-outline-primary btn-sm">Tracking</button>
|
||||
<button type="button" class="btn btn-info btn-sm">Charts</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="/patient/addnew">
|
||||
<div class="form-row">
|
||||
|
||||
<form method="POST" action="/patient/updatepatient">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputEmail4">Firstname</label>
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" value="<?=$firstname?>" placeholder="Firstname">
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" value="<?= $firstname ?>" placeholder="Firstname">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputPassword4">Lastname</label>
|
||||
<input type="text" class="form-control" id="lastname" name="lastname" value="<?=$lastname?>" placeholder="Lastname">
|
||||
<input type="text" class="form-control" id="lastname" name="lastname" value="<?= $lastname ?>" placeholder="Lastname">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="inputEmail4">Email</label>
|
||||
<input type="email" class="form-control" id="inputEmail4" value="<?=$email?>" placeholder="Email">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputEmail4">DOB</label>
|
||||
<input type="text" class="form-control date-picker-default" value="" name="dob">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputPassword4">Gendar</label>
|
||||
|
||||
<select class="form-control" aria-label="Select Gender" name ="gender">
|
||||
<option selected>Select</option>
|
||||
<option value="M">Male</option>
|
||||
<option value="F">Female</option>
|
||||
<option value="U">Unknown</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputEmail4">Email</label>
|
||||
<input type="email" class="form-control" id="inputEmail4" placeholder="Email">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputPassword4">Password</label>
|
||||
<input type="password" class="form-control" id="password" value="" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputAddress">Address</label>
|
||||
<input type="text" class="form-control" id="street1" name="street1" value="" placeholder="1234 Main St">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputAddress2">Address 2</label>
|
||||
<input type="text" class="form-control" id="street2" name="street2" value="" placeholder="Apartment, studio, or floor">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputCity">City</label>
|
||||
<input type="text" class="form-control" id="city" name="city" value="">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputState">State</label>
|
||||
<select id="inputState" class="form-control" name="state">
|
||||
<option selected>Select State</option>
|
||||
<option value="OGUN">Ogun</option>
|
||||
<option value="OYO">Oyo</option>
|
||||
<option value="OSUN" selected>Osun</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="inputZip">Zip</label>
|
||||
<input type="text" class="form-control" id="zipcode" name="zipcode" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-9">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<button type="submit" class="btn btn-primary">Update</button>
|
||||
<button type="submit" class="btn btn-danger btn-block">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
@@ -80,7 +136,6 @@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user