Backend Service
This commit is contained in:
@@ -438,6 +438,7 @@ long setMemberReminders(CVars in, CVars &out) {
|
||||
}
|
||||
|
||||
/*
|
||||
members_reminders
|
||||
"sessionid" => $sessionid,
|
||||
"practice_id" => 0,
|
||||
"encounter_id"=> 0,
|
||||
@@ -459,7 +460,7 @@ long setMemberReminders(CVars in, CVars &out) {
|
||||
|
||||
out["total_record"] = "0";
|
||||
|
||||
const PGresult *res = pgsql_query("SELECT * FROM members_reminders WHERE member_id = %lu status = 1 ORDER BY agent_name ASC",in["member_id"].Long());
|
||||
const PGresult *res = pgsql_query("SELECT * FROM members_reminders WHERE member_id = %lu AND status = 1 ORDER BY start_date ASC",in["member_id"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
|
||||
|
||||
@@ -166,6 +166,34 @@ function processOutJson($in, $out) {
|
||||
|
||||
break;
|
||||
|
||||
case MERMS_USER_REMINDERS:
|
||||
if ( $in["task_mode"] == USER_LOADTASK )
|
||||
{
|
||||
$total = $out["total_record"];
|
||||
$res = array(
|
||||
"status" => $out["status"],
|
||||
"total_record" => ($total),
|
||||
"internal_return" => $out["internal_return"],
|
||||
"result_list" => array(),
|
||||
);
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
$key = sprintf("%05d", $i);
|
||||
$res["result_list"][] = array(
|
||||
"id" => $out["id_${key}"],
|
||||
"description" => $out["cost_${key}"],
|
||||
"reminder" => $out["reminder_${key}"],
|
||||
"start_date" => $out["start_date_${key}"],
|
||||
"end_date" => $out["end_date_${key}"]
|
||||
|
||||
);
|
||||
} // "request_id"
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
return $out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user