The Pain Reporting Portal consists of four major pieces.
The dashboard is a website that allows medical researchers to manage clinical trials. Providing up-to-date information on patient participation.
The dashboard is organized using the MVC pattern. It leverages Sequelize to power the model, Hapi to provide controller services, and Handlebars to render the views.
Relevant Folders
controller
model
view
The API is a RESTful service that powers the application that patients use to complete surveys.
The API leverages the same model used by the dashboard, and sends survey information to the companion application in JSON format. The model is powered by Sequelize and the API is handled by Hapi.
Relevant Folders
api
view
The CLI is a collection of tools to help administrators and developers manage all the Pain Reporting Portal components.
The CLI leverages NPM for running tasks, JSDoc for documentation, Bower to manage UI libraries, and PM2 for production server management.
The CLI also handles testing and code smell detection for the code base. It uses AVA for testing, Proxyquire for mock dependency injection, Sinon for function mocking and stubbing, ESLint for Javascript lint checking, JSONlint for configuration validation, Remark Lint for markdown documentation lint checking, and Stylelint for Cascading Style Sheet lint checking.
Relevant Files and Folder
package.json
.eslintrc.yml
.remarkrc
.stylelintrc.yml
task
The rules engine responds to events, then looks at patient and trial information and determines when surveys should be offered to a patient. It implements a small expert system in Javascript.
Relevant Folder
rule