Giter Club home page Giter Club logo

edehr's Introduction

Project - EdEHR

Educational Electronic Health Record system: a BCcampus project

Description

EdEHR is an open source web application developed to teach medical students how to use an EHR before they enter the workforce. It can be accessed only through a learning management system (LMS) and requires a technical person to set it up. Once set up, users can access the system either as an instructor or a student. Credentials to try out either role are included below.

License

The master-bccampus branch is released under a copyright licence (MIT). This includes all work funded by BC Campus from project start, September 2018 to project end, January 31, 2020.

Work since the BC Campus project is released under a copyleft license (GNU Affero General Public License).

Blog Posts

BC Campus announcement By E Beattie, February 7, 2019

BC Campus Blog - An Education in Electronic Health Record By J Caldwell, January 7, 2020

Documentation

Public docs are available here https://bccampus.github.io/edehr

Demo

A demonstration mode is currently being implemented. This demo mode will mimic a learning management system so you can experience both the student's and the instructor's experiences. Until then reach out to [email protected]. You will be given login credentials to try out EdEHR

Getting started

Begin by installing an LMS (e.g. Moodle or Canvas). Only with an LMS installed can you access the EdEHR locally.

Installation

Git clone the repository

cd /your/development/area
git clone https://github.com/BCcampus/edehr.git

After cloning the repository or to update packages used by the server or client run this one-step install script:

npm run install

Start your development server

Method 1

This method starts the components one at a time. This is best for intensive development where you need to have a close contact with the code and the components.

Start the database server (in docker container)

npm run start:db

Start the API server. From project root:

npm run start:server

In another terminal session start the client. From project root:

npm run start:client

When done stop the database server. From project root:

npm run stop:db

Method 2

This method starts all the components with one script, each in their own docker container.

cd deployment

to build the containers and start attached to see debug logs

npm run dev:build

to run containers that were built in detached mode

npm run dev:run

to stop detached running containers

npm run dev:stop

Run Production

When all changes have been made locally and you wish to update your production server, follow the instructions below.

First build the client vue project.

# in project root
npm run build

Starts all the components with one script, each in their own docker container.

cd deployment
# to build the containers and start attached to see debug logs
npm run prod:build
# to run containers that were built in detached mode
npm run prod:run
# to stop detached running containers
npm run prod:stop

Lint

Run lint on both the client and server code base. From project root:

npm run lint

Test

Run test on both the client and server code base. From project root:

npm run test

EHR screen generation

There are over 40 EHR screens that are generated using a Google spreadsheet. This spreadsheet generates each screen's form layout, table layout, modal forms and can include option default data to include in the seed.

If you wish to make edits to the screens or the defaut data, copy a version of the spreadsheet to your own Google Drive account (downloading and opening in Excel is not supported) and make the edits there. Copy the data from the furthest right-hand columns into the respective file in the makeEhr directory.

Run the following command:

cd makeEhrV2

Then

./deploy.sh --lint

Pro tip: The --lint option can be replaced with -l.

You must use this lint option before submitting files. If you are making changes to view locally in multiple steps, you can shorten the time it takes to run the command by leaving lint out of the command.

Please remember to run the script with lint when you are done and ready to submit your code.

Backing Up and Restoring the Database

  1. Accessing the Mongo Shell

    As mentioned, the system is running MongoDB as the database, usually in a Docker instance. There might be, however, the need to access the shell in order to run scripts at the database level. This can be done by running:

    npm run shell:mongo
    
  2. Running the restore and backup scripts should be easy, since a volume has been implemented with the backup and restore scripts for all given databases (production and development), you access the scripts by accessing /data/.

    Inside the Mongo Shell, run:

    cd data/
    
  3. In order to run the backup script, please run ./backup.sh and then all the dump data will be set to data/dump/ (and, at the same time will be set to the volume, which is, by default in database/backup/dump). In order to run the restore script, simply run ./restore.sh and everything in the dump/ folder will be restored.

    Note: It might be needed to give permission to the script files. In case this happens, please, run:

     chmod +x *.sh 
    

Contributing

EdEHR is an open source project and we encourage contributions. Please read CONTRIBUTING.md before contributing.

Documentation

For more details about this project, view the documentation

Alternatively, you can run a local documentatiom server by running the following command in your terminal:

npm run docs:dev

Then visit http://localhost:8080/edehr See documentation in the docs directory.

Update SSL Cert on production with Certbot

# Stop the server
cd deployment
npm run prod:stop

# Run certbot to update the certs
sudo certbot

#Then find and stop all running nginx
# e.g. 
# sudo kill -QUIT 30708 

ps aux | grep nginx

# Then restart 
npm run prod:run

edehr's People

Contributors

bryan-gilbert avatar dependabot[bot] avatar dshaykewich avatar faisalsami avatar mandily-p avatar viniciusarre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.