This module processes mailing requests and organises the data that
is then used in email sender. It also updates the DB accordingly.
- Version:
-
- 1.0
Methods
-
<async, inner> recoverPassword(username)
-
Recover password of user
Parameters:
Name Type Description username
String user to recover password -
<async, inner> send(testIDs, actionUsername)
-
Send reminders for overdue tests.
Parameters:
Name Type Description testIDs
Array List of all the overdue tests' IDs actionUsername
string The user who issued the request. Returns:
result of the query. success is true only if all the emails were successfully sent. Some emails might fail to be sent for various reasons. It can be that the patient was sent an email but the hospital was not or vice versa, or maybe both emails failed to send. Response format: {success: true, response: "All emails sent successfully."} The three "failed" lists are disjoint. {success: false, response: { failedBoth: [] // might be empty failedPatient: [] // might be empty failedHospital: [] // might be empty } }- Type
- JSON
-
<async, inner> sendNormalReminders(testIDs, actionUsername)
-
Send reminders for tests (not overdue).
Parameters:
Name Type Description testIDs
Array List of all the overdue tests' IDs actionUsername
string The user who issued the request. Returns:
result of the query. success is true only if all the emails were successfully sent. Some emails might fail to be sent for various reasons. It can be that the patient was sent an email but the hospital was not or vice versa, or maybe both emails failed to send. Response format: {success: true, response: "All emails sent successfully."} The three "failed" lists are disjoint. {success: false, response: { failedBoth: [] // might be empty failedPatient: [] // might be empty failedHospital: [] // might be empty } }- Type
- JSON
-
<async, inner> sendOverdueReminders(testIDs, actionUsername)
-
Send reminders for overdue tests.
Parameters:
Name Type Description testIDs
Array List of all the overdue tests' IDs actionUsername
string The user who issued the request. Returns:
result of the query. success is true only if all the emails were successfully sent. Some emails might fail to be sent for various reasons. It can be that the patient was sent an email but the hospital was not or vice versa, or maybe both emails failed to send. Response format: {success: true, response: "All emails sent successfully."} The three "failed" lists are disjoint. {success: false, response: { failedBoth: [] // might be empty failedPatient: [] // might be empty failedHospital: [] // might be empty } }- Type
- JSON