diff --git a/providerwww/application/controllers/Patient.php b/providerwww/application/controllers/Patient.php index 74e281a..7c12d25 100644 --- a/providerwww/application/controllers/Patient.php +++ b/providerwww/application/controllers/Patient.php @@ -121,10 +121,10 @@ class Patient extends Provider_Controller { case "REMINDERS": //Reminder_model $this->load->model('reminder_model'); - $out = $this->reminder_model->getPatientReminderList($_SESSION['practice_id'], $data['patient_id']); + $out = $this->reminder_model->getPatientReminderList($_SESSION['practice_id'], $data['patient_id']); $data["patient_reminder_list"] = $out["patient_reminder_list"]; - $this->load->view('provider/patient/patientActions/view_reminder_action',$data); + $this->load->view('provider/patient/patientActions/view_reminder_action', $data); break; case "TRACKING": $this->load->view('provider/patient/patientActions/view_tracking_action'); @@ -163,6 +163,46 @@ class Patient extends Provider_Controller { } } + public function addPatientReminder() { + + $data['reminder_text'] = trim($this->input->get('reminder_text')); + $data['start_date'] = trim($this->input->get('start_date')); + $data['end_date'] = trim($this->input->get('end_date')); + $data['reminder_type'] = trim($this->input->get('reminder_type')); + $data['patient_id'] = trim($this->input->get('patient_id')); + + echo "Ameye"; + + + } +/* + + var reminder_text = document.reminderaddform.reminder_text.value; + var start_date = document.reminderaddform.start_date.value; + var end_date = document.reminderaddform.end_date.value; + var reminder_type = document.reminderaddform.reminder_type.value; + var patient_id = document.reminderaddform.patient_id.value; + // alert(patient_link_id); + + if (reminder_text === '' || start_date === '' || end_date === '' || reminder_type === '') { + alert('All felids are required to add a reminder!'); + return false; + } + + // alert(job_description); + $('#link_result').html('Processing...'); + $('#rem_link_submit').prop('disabled', true); + $.ajax({ + url: "/patient/addPatientReminder?reminder_text=" + reminder_text + "&patient_id=" + patient_id +"&reminder_text=" + reminder_text +"&start_date=" + start_date +"&end_date=" + end_date + "&reminder_type="+reminder_type + }).done(function (data) { + $('#link_result').html(data); + document.linkform.patient_link_id.value = ''; + $('#rem_link_submit').prop('disabled', false); + }); + return false; + } + + */ public function linkpatient() { // echo 'Ameye'; diff --git a/providerwww/application/models/Reminder_model.php b/providerwww/application/models/Reminder_model.php index c12f8de..dd314cc 100644 --- a/providerwww/application/models/Reminder_model.php +++ b/providerwww/application/models/Reminder_model.php @@ -8,7 +8,7 @@ class Reminder_model extends CI_Model { public function getPatientReminderList($practice_id, $patient_id) { - $mysql = "SELECT description, start_date,end_date FROM members_reminders WHERE member_id =1 AND practice_id = 0 AND status = 1 ORDER BY added DESC LIMIT 5"; + $mysql = "SELECT r.id, r.description, r.start_date,r.end_date FROM members_reminders r LEFT JOIN patients p ON p.id=r.member_id WHERE p.id = $patient_id AND r.practice_id = 0 AND r.status = 1 ORDER BY r.added DESC LIMIT 5"; $query = $this->db->query($mysql); $num = $query->num_rows(); $data["patient_reminder_list"] = $query->result(); diff --git a/providerwww/application/views/provider/dash.php b/providerwww/application/views/provider/dash.php index c86adac..6ccbb8c 100644 --- a/providerwww/application/views/provider/dash.php +++ b/providerwww/application/views/provider/dash.php @@ -13,11 +13,11 @@
- + - +
@@ -31,7 +31,7 @@
- +
@@ -113,7 +113,7 @@
- +
diff --git a/providerwww/application/views/provider/patient/patientActions/view_reminder_action.php b/providerwww/application/views/provider/patient/patientActions/view_reminder_action.php index fdb5656..343782f 100644 --- a/providerwww/application/views/provider/patient/patientActions/view_reminder_action.php +++ b/providerwww/application/views/provider/patient/patientActions/view_reminder_action.php @@ -7,9 +7,9 @@
-
- + +
@@ -20,11 +20,11 @@
- +
- +
@@ -43,10 +43,10 @@
- +
- +
@@ -76,3 +76,35 @@
+ + diff --git a/providerwww/application/views/provider/patient/thispatient.php b/providerwww/application/views/provider/patient/thispatient.php index cfd430e..86c7c2e 100644 --- a/providerwww/application/views/provider/patient/thispatient.php +++ b/providerwww/application/views/provider/patient/thispatient.php @@ -16,7 +16,7 @@
@@ -154,9 +154,9 @@
- -
-
+ +
+
@@ -253,43 +253,11 @@
-

Attach Record

+

Section

- - - -
-
- -
-
- - -
- -
- - - - - - -
    - -
  • -
    -
    Complete milestone 3 and update.
    - - Mon, 14 Jun - -
    -
  • - - -

diff --git a/providerwww/application/views/template/topstrip.php b/providerwww/application/views/template/topstrip.php index 77bc407..28c5fc1 100644 --- a/providerwww/application/views/template/topstrip.php +++ b/providerwww/application/views/template/topstrip.php @@ -10,7 +10,7 @@