Backend Service

This commit is contained in:
2019-03-09 17:57:10 +00:00
parent 12264bb5b7
commit ebb72d4d1d
2 changed files with 30 additions and 1 deletions
+2 -1
View File
@@ -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);
+28
View File
@@ -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;
}