Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into nishauriV2
  • Loading branch information
Ronald-pro committed Apr 29, 2024
2 parents 982469e + e207c32 commit ba575c9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions models/todays_appointment.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const TodayAppointments = sequelize.sequelize.define(
buddy_phone_no: Sequelize.STRING,
facility_id: Sequelize.INTEGER,
user_phone_no: Sequelize.STRING,
client_id: Sequelize.INTEGER,
created_at: Sequelize.STRING

}, {
Expand Down
5 changes: 4 additions & 1 deletion routes/processes/get_past_appointments_sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = async function getPastAppointment(phone_no) {
let appointment_date = appointments[i].appntmnt_date;
let file_no = appointments[i].file_no;
let buddy_phone_no = appointments[i].buddy_phone_no;
let client_id=appointments[i].client_id;
appointments[i].trmnt_buddy_phone_no = "";
if (isEmpty(buddy_phone_no)) {
appointments[i].trmnt_buddy_phone_no = "-1";
Expand Down Expand Up @@ -87,7 +88,9 @@ module.exports = async function getPastAppointment(phone_no) {
"*" +
appointments[i].trmnt_buddy_phone_no +
"*" +
appointment_date;
appointment_date +
"*" +
client_id;
let encrypted_msg = "TOAPP*" + (await base64.encode(outgoing_msg));

message.push(encrypted_msg);
Expand Down
7 changes: 6 additions & 1 deletion routes/processes/get_todays_appointments_sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ module.exports = async function getTodaysAppointment(phone_no) {
let appointment_date = appointments[i].appntmnt_date;
let file_no = appointments[i].file_no;
let buddy_phone_no = appointments[i].buddy_phone_no;
let client_id=appointments[i].client_id;


appointments[i].trmnt_buddy_phone_no = "";
if (isEmpty(buddy_phone_no)) {
appointments[i].trmnt_buddy_phone_no = "-1";
Expand Down Expand Up @@ -79,7 +82,9 @@ module.exports = async function getTodaysAppointment(phone_no) {
"*" +
appointments[i].trmnt_buddy_phone_no +
"*" +
appointment_date;
appointment_date
"*" +
client_id;;
let encrypted_msg = "TOAPP*" + (await base64.encode(outgoing_msg));

message.push(encrypted_msg);
Expand Down
14 changes: 11 additions & 3 deletions routes/processes/process_past_appointment.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ router.post("/", async (req, res) => {
let file_no = appointments[i].file_no;
let buddy_phone_no = appointments[i].buddy_phone_no;
let other_appointment_type = appointments[i].other_appointment_type;
let client_id=appointments[i].client_id;
//let hei_number = appointments[i].hei_number;
appointments[i].trmnt_buddy_phone_no = '';
if (isEmpty(buddy_phone_no)) {
Expand Down Expand Up @@ -156,7 +157,8 @@ router.post("/", async (req, res) => {
"*" + appointment_id +
"*" + file_no +
"*" + appointments[i].trmnt_buddy_phone_no +
"*" + appointment_date;
"*" + appointment_date +
"*" + client_id;
let encrypted_msg = "TOAPP*" + await base64.encode(outgoing_msg);
let innerMessage = {};
innerMessage.message = encrypted_msg;
Expand Down Expand Up @@ -189,6 +191,8 @@ router.post("/", async (req, res) => {
let file_no = appointments[i].file_no;
let buddy_phone_no = appointments[i].buddy_phone_no;
let other_appointment_type = appointments[i].other_appointment_type;
let client_id=appointments[i].client_id;

//let hei_number = appointments[i].hei_number;
appointments[i].trmnt_buddy_phone_no = '';
if (isEmpty(buddy_phone_no)) {
Expand Down Expand Up @@ -229,7 +233,8 @@ router.post("/", async (req, res) => {
"*" + appointment_id +
"*" + file_no +
"*" + appointments[i].trmnt_buddy_phone_no +
"*" + appointment_date;
"*" + appointment_date +
"*" + client_id;;
let encrypted_msg = "TOAPP*" + await base64.encode(outgoing_msg);
let innerMessage = {};
innerMessage.message = encrypted_msg;
Expand Down Expand Up @@ -312,6 +317,8 @@ router.post("/new", async (req, res) => {
let file_no = appointments[i].file_no;
let buddy_phone_no = appointments[i].buddy_phone_no;
let other_appointment_type = appointments[i].other_appointment_type;
let client_id=appointments[i].client_id;

//let hei_number = appointments[i].hei_number;
appointments[i].trmnt_buddy_phone_no = '';
if (isEmpty(buddy_phone_no)) {
Expand Down Expand Up @@ -352,7 +359,8 @@ router.post("/new", async (req, res) => {
"*" + appointment_id +
"*" + file_no +
"*" + appointments[i].trmnt_buddy_phone_no +
"*" + appointment_date;
"*" + appointment_date +
"*" + client_id;
let encrypted_msg = "TOAPP*" + await base64.encode(outgoing_msg);
let innerMessage = {};
innerMessage.message = encrypted_msg;
Expand Down
5 changes: 4 additions & 1 deletion routes/processes/process_today_appointment.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ router.post("/", async(req, res) => {
let appointment_date = appointments[i].appntmnt_date;
let file_no = appointments[i].file_no;
let buddy_phone_no = appointments[i].buddy_phone_no;
let client_id=appointments[i].client_id;

//let hei_number = appointments[i].hei_number;
appointments[i].trmnt_buddy_phone_no = "";
if (isEmpty(buddy_phone_no)) {
Expand Down Expand Up @@ -119,7 +121,8 @@ router.post("/", async(req, res) => {
"*" +
appointments[i].trmnt_buddy_phone_no +
"*" +
appointment_date;
appointment_date +
"*" + client_id;;
let encrypted_msg = "TOAPP*" + (await base64.encode(outgoing_msg));
let innerMessage = {};
innerMessage.message = encrypted_msg;
Expand Down

0 comments on commit ba575c9

Please sign in to comment.