GithubHelp home page GithubHelp logo

avni-health-modules's People

Contributors

1t5j0y avatar himeshr avatar hithacker avatar petmongrels avatar vinayvenu avatar vindeolal avatar

Watchers

 avatar  avatar  avatar

avni-health-modules's Issues

Throw proper error when common.getDays() and common.copyDate() functions are invoked with invalid date params

This issue was raised as part of a ticket

Fix needed:

  1. Throw proper error when common.getDays() and common.copyDate() functions are invoked with invalid date params.
  2. In the various organisations that have been impacted,
    • Check the ruleTelemetry to find instances
    • correct the rules if needed to invoke the function with valid date for common.getDays() and common.copyDate() functions
  3. Check data passed to these methods from health-modules code. Fields under focus: DOB, enrolmentDateTime, LastMenstrualPeriod, etc..
  4. upgrade avni-health-modules versions in webapp, client and rules-server

Acceptance criteria

Instead of a generic non-meaningful message such as

undefined is not an object (evaluating 't.getTime')

Ensure that error message shown is readable and helps implementers understand the root cause of an issue:

Invalid date value \'${date}\' specified for mandatory concept \'${fieldName}\' for entity \'${entity}\' with uuid \'${entityUUID}\'`

Add core module rules to avni-health-modules repo

Motivation

As an Avni developer, I want to be able to use core rules from avni-webapp. To do this we need to move core rule files from our mono repo avni-client to our npm package avni-health-modules. We need to copy all the tests also.

Acceptance Criteria

  • Check that all the health module files in avni-client/openchs-health-modules are moved to the avni-health-modules repo.
  • Test that running make build generates compiled javascript for the added core module rule files in the dist folder.
  • Check that all the tests are also copied and passes.
  • Check that all the existing rules using common and motherCalculations modules work as it is in avni-webapp.

Tech Tasks

  • Copy core rule files to the avni-health-modules repo from avni-client. Add the required babel plugins to the avni-health-modules repo.
  • Copy the tests also and make sure that they pass.
  • Add test job in CircleCI pipeline. Make publish job dependent on test job.
  • Publish a new version of avni-health-modules.
  • Upgrade to new version of avni-health-modules version in avni-webapp and avni-rules.

Testing senarios

  • Check the test cases in avni-health-modules.
  • Updated version of avni-health-modules in webapp should work as it used to earlier (test if common functions are available).

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.