This application forms part of my final Disseration Project for the MSc Computer Science I am studying.
The project brief:
As part of an ongoing research study at the School of Computing and Mathematics, we have developed a mobile device application to deliver clinical information to NHS clinicians. This MSc project aims to build a prototype clinical guideline authoring and editing platform based on existing web frameworks. The goals are to: produce a web- based application where users can utilise CRUD functions (Create, Read, Update, Delete) with exiting guideline documents; Implement multi-level user admin system; Utilise HTML, CSS, JS and other web-based languages; Test the system to ensure it meets usability guidelines; and conduct literature review/research/testing to ensure the system is efficient."
This is the Back End Web Server, Database & API which connects to the Front End user application, which can be found in the following repo: Clinical Guideline Authoring App: Front End.
This application makes use of REST endpoints.
Warning
All data is excluded from this repo, as it is commercially sensitive, subject to license agreements with NICE.
Warning
Database name ignored, requires a .env file as part of dotenv
.
Note
This University project relies on and is subject to a license with NICE (National Institute for Health and Care Excellence). Below is a formal acknowledgement for use of their data and materials as part of the project.
© National Institute for Health and Care Excellence 2018
This content is made available by NICE (National Institute for Health and Care Excellence) but distributed by a third-party distributor. NICE takes no responsibility for the format in which this content is delivered. The distributor is responsible for incorporating updates from NICE and cannot alter NICE content in any way. Any content delivered alongside content provided by NICE will not necessarily reflect the views of either NICE or those organisations commissioned to develop NICE guidance.
- Web Server: Express.js
- Testing: Jest & Supertest
- Database: MongoDB & Mongoose
To seed the database locally:
$ npm run seed
To run the application locally:
$ npm run dev
To run the two test suites individually:
$ npm test api
$ npm test integration
There are 5 main routes and corresponding endpoints which the API can receive requests on:
- /api
GET /api
: Responds with a string.
- /api/guidelines
GET /api/guidelines
- Responds with all existing GuidelinesPOST /api/guidelines
- Creates a new GuldeineGET /api/guidelines/:guideline_id
- Responds with a single existing Guideline by IDPATCH /api/guidelines/:guideline_id
- Responds with an updated single existing Guideline by IDDELETE /api/guidelines/:guideline_id
- Deletes a single existing Guideline by ID
- /api/users
GET /api/users
- Reponds with all UsersGET /api/users/:username
- Responds with a single User by Username
- /api/branches
GET /api/branches
- Reponds with all existing BranchesPOST /api/branches
- Creates a new BranchGET /api/branches/:branch_name
- Responds with a single existing Branch by Branch NamePATCH /api/branches/:branch_name
- Responds with an updated single existing Branch by Branch NameDELETE /api/branches/:branch_name
- Deletes a single existing Branch by Branch NamePATCH /api/branches/:branch_name/addusers
- Adds a new user (collaborator) to an existing Branch by Branch NamePATCH /api/branches/:branch_name/addsection
- Adds a new section to a Guideline within an existing Branch by Branch NamePATCH /api/branches/:branch_name/lockbranch
- Locks the existing Branch by Branch NamePATCH /api/branches/:branch_name/unlockbranch
- Unlocks the existing Branch by Branch NameGET /api/branches/:branch_name/comments
- Responds with all user comments associated with a Branch by Branch NamePOST /api/branches/:branch_name/comments
- Adds a new comment to a Branch by Branch Name
- /api/approvals
GET /api/approvals
- Responds with all existing ApprovalsPOST /api/approvals
- Creates a new ApprovalGET /api/approvals/:approval_name
- Responds with a single existing Approval by Approval NameDELETE /api/approvals/:approval_name
- Deletes a single existing Approval by Approval Name