Giter Club home page Giter Club logo

openmrs-ocl-client's Introduction

OpenMRS

Dictionary Manager Coverage Status

Automated Tests Workflows

Basic Dictionary Management Organization Management

OpenMRS Dictionary Manager

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.

Available Scripts

npm start

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.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

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.

Setup

Native Environment Setup

  • 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

Running the Docker Image

  • 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/.

Choosing an API server

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.

Running Cypress Tests

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.

Contributing to this project

  • Visit the project wiki for a layout of the project and how you can start contributing.

Gotchas

Things we've pulled our hair out for so you don't have to

  • Have an env-config file before running the e2e tests

Support

License

openmrs-ocl-client's People

Contributors

abulojoshua1 avatar agmeteor avatar alexkayabula avatar alexmochu avatar brucemakallan avatar collinewait avatar danuluma avatar desshub avatar dkayiwa avatar dotnesh avatar duncanian avatar eleisonc avatar emasys avatar emmabaye avatar godswillonuoha avatar hadijahkyampeire avatar ibacher avatar judeinno avatar jwamalwa avatar jwnasambu avatar karuhanga avatar michyjones avatar mrshinezee avatar muhozi avatar myrdstom avatar nk183 avatar rakesh-1010 avatar shakirandagire avatar suruchee avatar tittoh 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.