A Supervised Consumption Site (SCS), also referred to as a safe injection site or supervised injection facility, is a healthcare venue designed for individuals to consume drugs, often illicit substances, under the supervision of trained personnel. Presently, data collection from drug users at these sites involves a high degree of manual input, where staff members are required to manually enter information into Excel spreadsheets or fill out paper forms by hand. Subsequently, this data is transmitted to Health Canada via email, which poses inherent risks of data loss and inconsistencies due to the unstable nature of email communication.
A web-based data collection and management system for supervised consumption sites in Canada that can intake supervised consumption site data and securely report it to HC, accessed via the internet using a variety of devices. Data visibility determined by role-based authentication. Single line client data will be received and securely retrieved from the database by Site Users. Mean while, Health Canada users will see aggregated data through a dashboard analyzing overall trends.
All the REST APIs are available in this path backend/routes
Step 1: Make sure having PostgreSQL installed in the machine. Create a database called postgres-supervised-consumption
Step 2: The directory backend/config/config.json
has the connection information for PostgreSQL, make changed based on this config file
Step 3: Open terminal in backend
directory, run npm install
to install all dependencies and npm start
to start the system and generate the tables in the database
Step 4: Populate user and question data for demoing
- Navigate to
backend/models/roles.model.js
uncommented line 38populateRole()
to populate the roles. Then save the app and commented it out again - Repeat the step to
backend/models/question_type.model.js
line 27 - Repeat the step to
backend/utils/db_connection.js
uncommented line 340, 341, and 342, then save the new changes then uncommented them again
Step 5: Open terminal in frontend
directory, run npm install
to install all dependencies and npm start
to start UI
Step 6: You can now login to the system with these following credentials, after populate the data:
The password for all users is password
When the user update the question, the email will be sent to the recipients using Node mailer. For configurating email, follow this tutorial
Email credential: backend/utils/email_notification.js
. Notice you will need to create the .env file in the same directory for the EMAIL_PWD
Email recipients and sending information: backend/controllers/answer.controller.js
Team Member | Work Contribution |
---|---|
Bao Bobby Ngo | Backend, Architecture Design, Team Lead |
Stephnie Ughara | PowerBI - Dashboard, Database |
Mark Hamad | Frontend |