Open Web Application for managing patient observations data
JavaScript CSS HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nyc_output
app
coverage
tests
.babelrc
.bowerrc
.eslintrc.js
.gitignore
.travis.yml
LICENSE
README.md
bintray.json
bower.json
package-lock.json
package.json
webpack.config.js

README.md

Build Status

openmrs-owa-obsadmin

Open Web Application for managing patient observations data OpenMRS

Obsadmin

This repository contains the Obsadmin OpenMRS Open Web App.

This is a suite of tools for a Data Manager who might want to clean up a patient's data. So, don't think of this as "CRUD for visits, encounters, obs", but rather think like "As a Data Manager, I want to fix an incorrectly-recorded encounter so that I can fix the patient's medical record".

For further documentation about OpenMRS Open Web Apps see the wiki page.

Development

Production Build

You will need NodeJS 4+ installed to do this. See the install instructions here.

Once you have NodeJS installed, install the dependencies (first time only):

npm install

Then:

bower install

Build the distributable using Webpack as follows:

npm run build:prod

This will create a file called obsadmin.zip file in the dist directory, which can be uploaded to the OpenMRS Open Web Apps module.

Local Deploy

To deploy directly to your local Open Web Apps directory, run:

npm run build:deploy

This will build and deploy the app to the /Users/andeladeveloper/openmrs-standalone-2.4/appdata/owa directory. To change the deploy directory, edit the LOCAL_OWA_FOLDER entry in config.json. If this file does not exists, create one in the root directory that looks like:

{
  "LOCAL_OWA_FOLDER": "/Users/andeladeveloper/openmrs-standalone-2.4/appdata/owa"
}

Live Reload

To use Browersync to watch your files and reload the page, inject CSS or synchronize user actions across browser instances, you will need the APP_ENTRY_POINT entry in your config.json file:

{
  "LOCAL_OWA_FOLDER": "/Users/andeladeveloper/openmrs-standalone-2.4/appdata/owa",
  "APP_ENTRY_POINT": "http://localhost:8081/openmrs-standalone/owa/obsadmin/index.html"
}

Run Browsersync as follows:

npm run watch

Extending

Install npm packages dependencies as follows:

npm install --save <package>

To use the installed package, import it as follows:

//import and assign to variable
import variableName from 'package';

To contain package in vendor bundle, remember to add it to vendor entry point array, eg.:

entry: {
  app : `${__dirname}/app/js/owa.js`,
  css: `${__dirname}/app/css/owa.css`,
  vendor : [
    'package',
    ...//other packages in vendor bundle
  ]
},

Any files that you add manually must be added in the app directory.

Troubleshooting

HTTP access control (CORS)

You may experience problems due to the Access-Control-Allow-Origin header not being set by OpenMRS. To fix this you'll need to enable Cross-Origin Resource Sharing in Tomcat.

See instructions here for Tomcat 7 and here for Tomcat 6.

Releasing

In order to release, set a new version in package.json, bintray.json and app/manifest.webapp. Once you commit and push changes to github, go to https://github.com/openmrs/openmrs-owa-obsadmin/releases and create a new release named after the version you want to release. Travis CI should pick up a newly created tag and deploy the release to Bintray at https://bintray.com/openmrs/owa/openmrs-owa-obsadmin

License

MPL 2.0 w/ HD