Code Monkey home page Code Monkey logo

hospitalrun-frontend's Introduction

HospitalRun frontend

Ember frontend for HospitalRun

Build Status

To run the development environment for this frontend you will need to have Git, Node.js, Ember CLI, Bower and CouchDB installed.

Install

To install the frontend please do the following:

  • Make sure you have installed Git
  • Make sure you have installed Node.js. Versions after 0.10.0 should work, but please note if you encounter errors using 5.x it may be necessary to upgrade your npm version. Versions after 3.5.x should work:
    1. npm install -g npm
  • Install ember-cli v1.13.14: npm install -g [email protected]
  • Install bower: npm install -g bower
  • Clone this repo with git clone https://github.com/HospitalRun/hospitalrun-frontend, go to the cloned folder and:
    1. npm install to install needed node modules.
    2. bower install to install needed bower modules.
    3. npm install -g phantomjs2 to install PhantomJS2, which is needed to run tests. If you are using Linux, you will need to build PhantomJS from source following directions here: http://phantomjs.org/download.html.
  • Install and configure CouchDB
    1. Download and install CouchDB from http://couchdb.apache.org/#download
    2. Create admin user:
    3. If you have just installed CouchDB and have no admin user, please run initcouch.sh. A user hradmin will be created with password: test.
    4. If you already have a CouchDB admin user, please run initcouch.sh USER PASS where USER and PASS are the CouchDB admin user credentials.
  • Copy the server/config-example.js to server/config.js.

Start

To start the frontend please do the following:

  • Start the server by running ember serve in the repo folder.
  • Go to http://localhost:4200/ in a browser and login with username hradmin and password test.

Loading sample data

If you would like to load sample data, you can do so by navigating to Load DB under the Adminstration menu. You should see the following screen: Load DB screenshot

Click on Choose File and select the file sample-data.txt which is included in root directory of the repo at sample-data.txt. Next, click on Load File. When the database load is complete a message will appear indicating if the load was successful.

Testing

Fixtures for Acceptance Tests

Fixtures are PouchDB dumps that are generated with pouchdb-dump-cli.

To create a fixture, run pouchdb-dump http://localhost:5984/main -u hradmin -p test | cat > tests/fixtures/${name_of_fixture}.txt.

To use a fixture, use runWithPouchDump(${name_of_fixture}, function(){..}); in your acceptance test. For example,

test('visiting /patients', function(assert) {
  runWithPouchDump('default', function() {
    //Actual test code here
    authenticateUser();
    visit('/patients');
    andThen(function() {
      assert.equal(currentURL(), '/patients');
    });
  });
});

Contributing

Contributions are welcome via pull requests and issues. Please see our contributing guide for more details.

Further Reading / Useful Links

hospitalrun-frontend's People

Contributors

jkleinsc avatar tangollama avatar taras avatar greenkeeperio-bot avatar turbomack avatar simonhfrost avatar billybonks avatar codecounselor avatar richchurcher avatar zinyando avatar alexpelan avatar mitchellcash avatar

Watchers

James Cloos avatar  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.