The OpenMRS Dictionary Manager is a tool to create and maintain OpenMRS concept dictionaries in the cloud, using both expert-curated concepts from sources such as CIEL as well as custom implementation-specific concepts.
Runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
-
Clone a forked version of the repository to your computer;
git clone https://github.com/yourusername/openmrs-ocl-client.git
-
In the root directory of the project install all the dependencies;
npm install
-
Build the Docker image using the provided Docker file in the root folder.
docker-compose build
. -
Run the docker image using docker-compose
docker-compose up
. -
Navigate to http://localhost:8080/.
The API accessed by this UI falls back to the OpenMRS demo environment.
To specify your own API server create a file called env-config.js
under the public directory containing;
var OCL_API_HOST = "<your endpoint, e.g https://api.staging.openconceptlab.org>";
var TRADITIONAL_OCL_HOST = "<your endpoint, e.g https://staging.openconceptlab.org>";
var OCL_SIGNUP_URL = "<your endpoint, e.g https://app.staging.openconceptlab.org/#/accounts/signup>"
These variables will automatically be injected into the app at runtime. This is the same strategy we use while deploying the application.
As opposed to the tests built into the package using Jest, we also supply some end-to-end tests written using Cypress. These are run automatically on each PR or commit. In the CI environments, we actually spin up a local instance of the OCL API and then the OpenMRS Dictionary Manager via Docker. This can be done locally by running the start_local_instance.sh
script. From there, the CI will run npm test:integration
which will run Cypress and all tests locally.
If Cypress fails to run on your local instance for whatever reason, you can use the run_e2e.sh
script to run the Cypress tests inside a Docker container. This is useful for running the tests locally, but if tests fail, it is easier to use the Cypress UI to diagnose the issues. To run Cypress with the UI (assuming Cypress works locally), you can run npx cypress open
. Unfortunately, it's not possible to run the Cypress UI in the Docker container to the best of my knowledge.
- Visit the project wiki for a layout of the project and how you can start contributing.
Things we've pulled our hair out for so you don't have to
- Have an env-config file before running the e2e tests
- Talk to us at OpenMRS Talk