Ember frontend for HospitalRun
To run the development environment for this frontend you will need to have Git, Node.js, Ember CLI, Bower and CouchDB installed.
To install the frontend please do the following:
npm install -g npmnpm install -g ember-cli@1.13.13npm install -g bowergit clone https://github.com/HospitalRun/hospitalrun-frontend, go to the cloned folder and:
npm install to install needed node modules.bower install to install needed bower modules.npm install -g phantomjs2 to install PhantomJS2, which is needed to run tests.initcouch.sh. A user hradmin will be created with password: test.initcouch.sh USER PASS where USER and PASS are the CouchDB admin user credentials.server/config-example.js to server/config.js.To start the frontend please do the following:
ember serve in the repo folder.hradmin and password test.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:

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.
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');
});
});
});
Contributions are welcome via pull requests and issues. Please see our contributing guide for more details.