• This repository has been archived on 19/Nov/2020
  • Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
    Java
  • License
    GNU Affero Genera...
  • Created about 12 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

-PREVIOUS VERSION- OpenLMIS (Open Logistics Management Information System) version 2 core software for a shared, open source solution for managing medical commodity distribution in low- and middle-income countries. Technical forum: https://groups.google.com/forum/#!forum/openlmis-dev.
Stable Development
Master Build Status Dev Build Status

OpenLMIS (Open Logistics Management Information System) is software for a shared, open source solution for managing medical commodity distribution in low- and middle-income countries. For more information, see http://openlmis.org/.

Project Links:

System Requirements

  • JDK 7
  • Postgresql 9.2+
  • Git
  • Firefox
  • Gradle 2.3
    • For Linux users
      • Download the source binary directly from the gradle website.
      • Copy the downloaded folder to /usr/bin
      • Add the path to gradle bin folder to your /etc/profile file export PATH="$PATH:/usr/bin/gradle-2.3/bin"
    • For Mac users
      • Install HomeBrew
      • Run brew install gradle
  • Node.js
    • For Linux users
      • Install Node.js as described here based on your Linux flavour.
    • For Mac users
      • Install Node.js directly or using homebrew using brew install nodejs

      • Those who install Node.js using Homebrew should export the following (or include in $HOME/.bash_profile or $HOME/.profile or $HOME/.bashrc or $HOME/.zshrc, depending on your shell.

        export NODE_PATH="/usr/local/bin/node"
        export PATH="/usr/local/share/npm/bin:$PATH"
  • NPM dependencies (used for linting JS, LESS files, minifying JS files & running jasmine specs etc.)
    • Install Grunt command-line runner by running (after installing Node.js) > npm install -g grunt-cli
    • Install karma test runner with karma coverage by running > npm install -g karma karma-coverage
    • Install karma command line with: > npm install -g karma-cli
    • You may need to install further karma dependencies for FireFox: > npm install -g karma-firefox-install
    • And for jasmine: > npm install -g karma-jasmine
    • Grunt tasks available can be found in modules/openlmis-web/Gruntfile.js

Source code

  1. Get the source code using git clone https://github.com/openlmis/open-lmis.git.

  2. By default you'll checkout the master branch. This is the latest stable code. For the latest development code checkout the dev branch.

  3. Set up dependencies on submodules & Grunt using:

    > cd open-lmis
    > git submodule init
    > git submodule update
    > cd modules/openlmis-web
    > npm install

Contributing

If you're intending to contribute to the OpenLMIS project, please read through CONTRIBUTING.md.
note that new features should be placed in modules and should be managed using git-repo.

IntelliJ IDEA Setup

  1. Run gradle idea to create the IntelliJ project files (may take some time downloading dependencies).
  2. Open the open-lmis.ipr file (may take some time indexing files, first time only).
  3. Install Lombok plugin according to the IntelliJ version.
  4. To run individual tests in IntelliJ, configure your IntelliJ preferences to enable "annotation processing"

Jasmine Tests

  1. To run jasmine tests headlessly: gradle karmaRun

Feature Toggle (for 2.0)

A number of country-specific features (eLMIS, VIMS, Moz) are integrated into the project. These are turned off by default. To turn them on, edit the gradle.properties file by setting toggleOnCustom = true.

See https://openlmis.atlassian.net/wiki/display/OP/2.0+Feature+Toggle+Mechanism for more details.

To add features to the toggling mechanism, see Feature Toggle.md in the docs folder.

Running App on embedded Jetty server

  1. Clone the project repository using git.
  2. Setup postgres user with password as configured in gradle.properties file.
  3. Add psql command to your PATH
  4. You can use gradle clean setupdb seed build testseed run to start the app.
  5. You can use gradle clean setupdb seed build to just run all of the tests.
  6. There are bunch of gradle tasks that you can see by running gradle tasks:
  • build is to build the app.
  • setupdb is to recreate the database and schema.
  • seed is to seed in the reference data.
  • testseed puts in some test data which can be used to browse through basic functionality in the system.
  • run is to start the embedded jetty server.
  1. If you wish to run the app using supplied demo data, you can do so by running the following two commands in succession:
  • gradle clean setupdb seed build to build the WAR.
  • gradle setupdb baseseed demoseed run to initialize the database and run the server.

Once the system is running, you can access the home page at http://localhost:9091/. You can log into the default instance with: user: Admin123, pass: Admin123 (case sensitive)

Code analysis

Analysis of Java and Javascript sources can be reported on and visualized using a SonarQube server and the included sonarRunner task.

  1. Install and run the SonarQube server.
  2. Configure the Sonar properties in gradle.properties to point to your Sonar server and database.
  3. Build the project and run the analysis:
  • Basic analysis: gradle build sonarRunner
  • With coverage reports install the Sonar Cobertura plugin and run cobertura report before sonar analysis. e.g. gradle build cobertura sonarRunner

Server setup

See SonarQube.org for official documentation. For more information on how the OpenLMIS project configures SonarQube see the OpenLMIS sonar-configuration repository.

Issues

  1. If a few integration tests fail, like this: org.openlmis.core.repository.mapper.FacilityMapperIT > shouldUpdateFacilityWithSuppliedModifiedTime FAILED java.lang.AssertionError at FacilityMapperIT.java:292 This can be caused by the timezone in postgresql.conf being different than your operating system timezone. To fix, stop the postgresql server, and edit the following line: timezone = 'US/Pacific' to match your current operating system timezone, then restart the postgresql server.

Tech Stack

  • Java 1.7
  • Gradle 2.3
  • Postgres 9.2
  • Spring
  • Mybatis
  • Angularjs
  • Jasmine
  • Node.js
  • Grunt.js

License Terms

This program is part of the OpenLMIS logistics management information system platform software. Copyright © 2013, 2014, 2015 VillageReach, JSI, and ThoughtWorks.

This site contains code and related material necessary to implement a configuration of the OpenLMIS logistics management information system platform. See https://github.com/OpenLMIS/open-lmis/ for details of OpenLMIS.

This site contains free software: you can redistribute it and/or modify it under the terms of the appropriate license. As this site contains code developed by more than one organization and licensed under different terms you should refer to the license terms stated in each component for details.

The programs and documents on this site are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the applicable License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses.

More Repositories

1

openlmis-ref-distro

OpenLMIS v3+ Reference Distribution. Last mile health commodity information system.
Python
65
star
2

openlmis-stockmanagement

Stock Managment Service for OpenLMIS v3.1+ http://openlmis.org
Java
16
star
3

indexed-db-angular-service

AngularJS service to connect and work upon indexedDB
JavaScript
5
star
4

openlmis-template-service

Template from which to start development of a new Service in OpenLMIS v3
Java
5
star
5

openlmis-hapifhir

Java
4
star
6

openlmis-referencedata

Reference Data Service for OpenLMIS v3+
Java
3
star
7

openlmis-requisition

Requisition Service for OpenLMIS v3+
Java
3
star
8

openlmis-contract-tests

Contract tests for OpenLMIS v3
Java
3
star
9

openlmis-stockmanagement-ui

UI Repository for Stock Mangement
JavaScript
2
star
10

docker-dev

Dockerized development tools (JDK & Gradle)
Shell
2
star
11

openlmis-auth

Auth (Security) Service for OpenLMIS v3+
Java
2
star
12

openlmis-ui-components

Interface components used in the OpenLMIS-UI
JavaScript
2
star
13

openlmis-deployment

Scripts for provision and deployment of OpenLMIS v3+ CI/CD
Python
2
star
14

openlmis-example

Example Independent Service in the OpenLMIS v3 Architecture
Java
2
star
15

postgres

Standard docker postgres images for OpenLMIS v3+
Shell
1
star
16

dev-ui

OpenLMIS User Interface Development Tooling for v3+
JavaScript
1
star
17

openlmis-fulfillment

Fulfillment Service for OpenLMIS v3+
Java
1
star
18

stockout

Scala
1
star
19

openlmis-cce-ui

UI repository for OpenLMIS Cold Chain Equipment service
JavaScript
1
star
20

openlmis-blue

Legacy - DO NOT USE. OpenLMIS v3+ Reference Distribution now at: https://github.com/OpenLMIS/openlmis-ref-distro
Shell
1
star
21

openlmis-nginx

API Gateway service for OpenLMIS v3+
Shell
1
star
22

openlmis-fhir-servers-performance

The following repository contains information about FHIR servers performance: Hearth and HAPI FHIR. Tests contain create, update and read actions on a location resource.
Shell
1
star
23

benin-SIIL

PLEASE NOTE that this repository exists for historical reasons. New development should take place in an appropriate branch within https://github.com/villagereach/open-lmis.git
Java
1
star
24

moz-SELV

PLEASE NOTE that this repository exists for historical reasons. New development should take place in an appropriate branch within https://github.com/villagereach/open-lmis.git
Java
1
star