Overview

Since we have finished the basic dashboard page for patients, we seek more improvements in functionalities. This week we concentrated on the personalized treatment plan, last modified time and add patient function.

Target

In the change treatment plan form, we tried to add a new function to allow the clinicians to set Target Feed Volume, Target Energy Intake, and enable the targets to be visualized on the patient’s dashboard. With this function, the clinicians can directly know if their setting targets are reasonable.

After filling in the inputs Target Feed Volume and Target Energy Intake and submitting the form, the database will update the treatment plan details. Specifically, the back-end server will perform pool.query, and then the treatment information inputs will be kept in the table treatments. In this progress, if any errors are caught, the system will inform “Treatment Plan Change Failed!”. Otherwise, it would be “Treatment Plan Change Successful!”.

Last Modified Time

PostgreSQL provides two types of timestamp, which are TIMESTAMP and TIMESTAMPZ. Both of them can store the date and exact time, however, the biggest difference between them is TIMESTAMP cannot memory the time zone, which means if the time zone of the database server has changed, the time stored in it will not change. But in this project, since we think that the server’s time zone will be changed frequently, using TIMESTAMP is still a good choice.

After submitting the form of change treatment plan and saving the information to the table treatments in the database, the database server will automatically record the time of data input by timestamp.

Treatment History

Add Patients

In our service for clinicians version, we also support the function that adds patients. On the clinician dashboard page, there are is a button at the bottom Add Patients, After clicking it, the system will return a search bar and a list of patients registered. Similar to other functions mentioned, the system uses pool.query to update the clinician’s patients scope. As a patient is added, the user_perms will update, user_id is the id of the clinician and patient_scope is the id of the patient. In this way, the clinician can manage their patients conveniently.

Add Patient1

Add Patient2

Add Patient3

Next Steps

For the next step, we will continually seek improvements in term of functionalities, specifically, make the search bar for the clinicians available and create a checkbox selecting system to make the whole system more functional.