fix
This commit is contained in:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user