npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nhs-app

v1.0.0

Published

![App picture](https://github.com/margiki/NHS-nodejs-webapp/blob/master/github_readme_photos/main_picture.jpg)

Downloads

2

Readme

App picture

Description :point_left:

It's a web application for managing hospitals rooms and determining the patient's priority for isolation. The app provides a centralised hub for managing the patients and planning their distribution across hospital’s rooms.

It allows nurses to keep track of the patients and their diseases in real time and to have an overview over the patients and rooms, and better manage the rooms assignment across patients.

Live demo :rocket:

https://nhs-app.herokuapp.com/

  • username: admin
  • password: admin

Youtube video

Prerequisites

  • [x] Node.js 6.9.1 or later - install from https://nodejs.org/

Installing - easy :electric_plug:

  1. Download the repository
git clone https://github.com/margiki/NHS-nodejs-webapp
  1. Open the Terminal (Linux & MacOS) or PowerShell (Windows) and change directory to the project folder.
  2. Type ‘npm install’ in the Terminal (PowerShell) and press Enter. All the dependencies would be installed.
  3. Go back to the Terminal (PowerShell) and be sure that you are pointing inside the project folder. To open the application, type ‘node app.js’ and press Enter.
  4. The application should be live on the local port 3000.
  5. Type http://localhost:3000/ into a browser.
  6. To login use the username: admin and the password: admin
  7. Now you should be inside the application

How to use it :book:

Dashboard

Data about patients and rooms is available here. The page is split into three tables.

Dashboard

Dashboard

To clear the red warning sign you need to go on the patient’s personal page. To do that, you have to double click on his name. By clicking on the ‘Update button’ on the bottom of the page, the patient’s diagnosis in updated for the next 24 hours (consequently, the red warning sign disappears).

Add patient page

You can add a new patient in the system with his personal details and his diseases. The application automatically computes the score of the patient based on the entered diseases

Add patient page

Patient page

Double click on a patient name on the dashboard to get here. Patient page

System settings

The control center of the application. It allows users to manage the diseases & rooms of the Hospital and create new accounts

System Settings

App Modules and Code organisation

Modules

Module|Core |Patients|Diseases|Rooms ------|-----|--------|--------|---- Functionality |- login system | - add / delete patients | - add / delete diseases | - assign rooms to patients .|- add users | - update patient's diagnosis | - assign disease to patients | - add / remove rooms .|- view dashboard | - view patient’s page | .|.| - retrieve patient's information

Code organisation :open_file_folder:

Folder | Content | Responsability ------|-----|-------- /public | | Contains the public files, such as CSS, fonts and scripts. /routes | | Manage the HTTP requests. Is divided into smaller modules responsible for disjoint tasks. . |/app.js| Renders dashboard page . |/disease.js| Responsible for diseases . |/login.js| Responsible for logging in . |/patients.js| Responsible for patients . |/rooms.js| Responsible for rooms . |/settings.js| Renders settings page . |/users.js| Add new users and logout /server | | Defines the database and Schemas . |/db/mongoose.js| Database settings . |/models| Defines Schemas /views | |Render pages . |/layouts| The core layout; each page is rendered inside the layout . |/(other files)| Contains specific visual changes for every page

Technologies

Backend

Nodejs - ExpressJS

Frontend

jQuery

Database

MongoDB - Mongoose

Databse Schema

Database schema

The available application is connected to a MongoDB database online. If you want to change the database to another one, you need to go: NHS app folder -> server -> db -> mongoose.js

Inside the file, you need to change the database link from mongoose.connect("mongodb://admin:[email protected]:45220/nhs-app"); to mongoose.connect("your-database-link");

REST Apis

The backend and frontend communicate through REST Apis. On the frontend, we make Ajax requests using jQuery to the following routes:

URI | Returns ----|---- /app/getdiseases | returns information about all diseases in the system /app/getpatients | returns information about all patients in the system /app/getpatient/:hospitalNumber | returns information about a specific patient /app/getrooms | returns information about the rooms in the system

Known bugs :bug:

  1. On some mobiles devices (iPhone, iPad) assigning rooms to patients is not working because mobile browsers doesn’t interpret the double-click. Also, the user can’t enter the patient's page because of the same reason. However, on LG mobile devices this feature works.

License

Free to use, copy and distribute. :money_with_wings: