public function getMails($data) { global $pid; if (UserService::valid($data[0]) == 'existingpatient') { require_once "../../library/pnotes.inc"; if ($data[2] == "inbox") { if ($data[3] && $data[4]) { $result_notes = getPatientNotes($pid, '', '0', $data[3]); $result_notifications = getPatientNotifications($pid, '', '0', $data[4]); $result = array_merge((array) $result_notes, (array) $result_notifications); } else { $result_notes = getPatientNotes($pid); $result_notifications = getPatientNotifications($pid); $result = array_merge((array) $result_notes, (array) $result_notifications); } return $result; } elseif ($data[2] == "sent") { if ($data[3]) { $result_sent_notes = getPatientSentNotes($pid, '', '0', $data[3]); } else { $result_sent_notes = getPatientSentNotes($pid); } return $result_sent_notes; } } else { throw new SoapFault("Server", "credentials failed"); } }
$xml_array['Patient']['dentallist']['status'] = 1; $xml_array['Patient']['dentallist']['reason'] = 'No Dental data found'; } $list_data_s = getListByType($p_id, 'surgery'); if ($list_data_s) { $xml_array['Patient']['surgerylist']['status'] = 0; foreach ($list_data_s as $key => $list_data1_s) { $xml_array['Patient']['surgerylist']['surgery-' . $key] = $list_data1_s; $diagnosis_title = getDrugTitle($list_data1_s['diagnosis'], $db); $xml_array['Patient']['surgerylist']['surgery-' . $key]['diagnosis_title'] = $diagnosis_title; } } else { $xml_array['Patient']['surgerylist']['status'] = 1; $xml_array['Patient']['surgerylist']['reason'] = 'No surgery data found'; } $patient_data = getPatientNotes($p_id); if ($patient_data) { $xml_array['Patient']['notelist']['status'] = 0; foreach ($patient_data as $key => $patient_data_a) { $xml_array['Patient']['notelist']['note-' . $key] = $patient_data_a; } } else { $xml_array['Patient']['notelist']['status'] = 1; $xml_array['Patient']['notelist']['reason'] = 'No Patient Data found'; } $strQuery8 = "select date as vitalsdate, bps, bpd, weight, height, temperature, temp_method,\n\t\t\t\tpulse, respiration, note as vitalnote, bmi, bmi_status, waist_circ, head_circ,\n\t\t\t\toxygen_saturation \n\t\t\t\tFROM form_vitals\n\t\t\t\tWHERE pid = ?\n\t\t\t\tORDER BY DATE DESC"; $dbresult8 = sqlStatement($strQuery8, array($p_id)); if ($dbresult8) { $counter8 = 0; $xml_array['Patient']['vitalslist']['status'] = 0; while ($row8 = sqlFetchArray($dbresult8)) {