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 "
|
||||
|
||||
@@ -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