avni-health-modules's People
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:
- Throw proper error when common.getDays() and common.copyDate() functions are invoked with invalid date params.
- 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
- Check data passed to these methods from health-modules code. Fields under focus: DOB, enrolmentDateTime, LastMenstrualPeriod, etc..
- 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 theavni-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).
Add function to calculate the growth status for adolescent.
Introduce new function to calculate the growth status for adolescent.
Function name: calculateGrowthStatusForAdolescent({individual, weight, height, asOnDate})
Expected return: {zScore: <Value>}
data sheet link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.