Giter Club home page Giter Club logo

search-reports's Introduction

SEARCH Hospital Reports

Report repository for SEARCH specific reports (using Jasper). You can access these reports in Bahmni at the following URL: http://<IP>:8080/jasperserver

Folder Structure

  • conf: DB Connection settings.
  • db: Liquibase migration file for report specific lookup tables, etc.
  • jasperRepository: Jasper folder which contains all the reports (exported using the sample-export.sh script).
  • jrxml : Shortcuts for each report (generated using the create_symlinks.sh script).
  • lib : Jars for mysql and liquibase.
  • script : Wrapper scripts over jasper scripts.

Working with Jasper

Note: SEARCH Reports only works with iReport 4.7.1. Do not use a newer version of iReport or Jaspersoft Studio.

We are using Jasper Server deployed as a WAR in the Webapps folder of Tomcat. Jasper internally uses a DB to store all configuration, report templates, meta-data, etc and provides with tooling to export / import the reports. In Bahmni, we use MySQL Db as backend for Jasper.

When we create a report in Jasper using the JasperSoft iReport 4.7.1 tool, we upload the report to the Jasper Reporting Server from iReport. Once we are satisfied with the report, then using the export command, we dump all reports from the Jasper server, and check them into the jasperRepository folder.

The build process imports the contents of the jasperRepository folder into the machine on which deployment is happening.

The main commands used in this process are:

Puppet commands

  • ./scripts/run-puppet-module.sh jasperserver : Run this command from bahmni-environment to create the jasperserver war file in tomcat. This will create a fresh jasper server instance with no reports or data. This is typically a first-time setup command.
  • ./scripts/run-puppet-module.sh bahmni-jasperreports : Run this command from bahmni-environment to deploy the reports from jasperRepository into jasperserver war file. This command will pull the reports from GITHUB. This command will typically need to be run on each deployment and internally uses the js-import.sh command of Jasper to populate the Jasper DB.

Local Scripts

  • EXPORT: ./scripts/sample-export.sh : Wrapper over the js-export.sh Jasper command for exporting the whole Japser Database into the jasperRepository folder. This command will overwrite the current jasperRepository folder with appropriate files.
  • IMPORT: ./scripts/deploy.sh : Wrapper over the js-import.sh and db_deploy.sh Jasper command for importing all data and reports from jasperRepository folder into jasperserver database. Exact command /deploy.sh -j /usr/local/jasperreports-server-cp-5.0.0-bin -p ../conf/reports_default.properties
  • LIQUIBASE: ./scripts/db_deploy.sh : For running liquibase migrations.
  • SYM LINKS: ./scripts/create_symlinks.sh : For each report in jasperRepository, this command creats a shortcut file in jrxml folder.

Process to follow to publish a report from QA Server

Once you are OK with a report on the QA box, to publish it into GITHUB, follow these steps:

  1. Log onto the box via SSH.
  2. Go to search-reports folder on the machine.
  3. Perform a git pull --rebase to get latest.
  4. Go to the scripts folder and execute the command: ./sample_export.sh /usr/local/jasperreports-server-cp-5.0.0-bin/buildomatic/
  5. Perform a git status. We need to commit 3 files from this list. See this commit to understand which files need to be added (one .folder.xml, and 2 new ones).
  6. Once committed, perform a git reset --hard to undo all other changes.
  7. Then, create a symlink jrxml file for future iReport editing using the command (from scripts folder): create_symlinks.sh.
  8. Commit this symlink file. and
  9. Push the 2 commits to the repository on Github.
  10. Trigger the CI pipeline to ensure that everything is OK with reports repository.

Fresh Jasper (For Implementation)

The Tag Baseline_Jasper can be extracted from this repo to get a Fresh Japser instance for starting out with a new implementation.

search-reports's People

Contributors

pkanchankar avatar sushmitharaos avatar endeepak avatar arathyjan avatar shruthidipali avatar nningego avatar mihirk avatar indraneelr avatar sadiaghazal16 avatar vinkesh avatar hemantheverest avatar vinayvenu avatar rohanpoddar avatar sandye avatar

Watchers

James Cloos 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.