Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The rules for the Formal Sector can be complex and evolving. Therefore, the "Formal Sector" solution should bring flexibility, to avoid complete redesign and databases change when a parameter to define the contribution value is changed.
To bring that flexibility, the solution described here uses a Calculation Rule (the Calculation Rules are defined in additional openIMIS modules extending the Calculation Module). This module is defining a framework to design calculations and to manage their activation and versioning in openIMIS. This solution will deliver a Calculation Module that takes the income (on the level of the Contract’s insuree) and a rate (on the level of the Contribution Plan) as parameters, make the calculation and updates the payment value of the Contract’s insuree.
The value of the parameters will be saved as a JSON string in the json_ext field.
Later, this module could be used as a framework to create event-based actions.

Business process

This module will use a "generic contribution" to get the required parameters and the ExtJson json_ext database field will be used to save the parameters (generic backend feature) finally . Finally, a signal will trigger the calculation /actionsaction

Plantumlcloud
filenameprocess.png
dataxVZti+IwEP41BffDQkzVbbattAEP0aUechoNrpBxglBT8UAsbQPpXV7sjeeLW77MWO/3foB098APBwsi3H1Mk1GzpklJUrXr4zK8mWYilN6UMLxoyluZw5Z2Zw9pD7wFyItcryNePBuGyZp89yyw9QA9prUUuND9BkHr84u//iaTptbd1nU5jgORtJmXZ555ZjR7yp1n1jeVyvIl497YbJ7TZ77me6gAz0tRSY0v8MgcfnH2wfZFewu1lS7YFwrsYWAPHO1BeF90sGBddKTf6HAHQf+nbaG1q0KufqzUwNEfdJChab2NBb35ttnir8oZHUCL9kUfYWQF8zEl48eJkJJC8LN3Jlp88giV1IQnHCChVjwqFqTRVDeBb98UCMHJMnavnhXTmAa7XOb399nqqQe0WqdiXu71NXaU1UWVChpypJrjzJYyI+ba3RHrSIF8nDyC1MovhWbK6D3aZxkOl2TWGRF5oODUngUnjUAsqfwQTdmh8ewEv+5SMH0ZcyuCCn501TY1vnmErdcDj90CoFW8U89LokJfAdzcIwcqy6a5qxTSGwSrn+eNjtnhJgBZLSubkTk9ErYxoFKU0wXQiNuL+XmimjN7h+ST9vg9XW4zAfXCmAmuw0ghEQwCGeMoOj2NH+KQSMh71jSxGXzgi3ZHTYZhXjLGpBfMgAtvEcEc+nQeEL8UlWs0sq8CDdcGeT1B5mELOjVLAUxlsB2MUpDiISxkmohhutuVdlkvQbFF8pGcLnl9agxRgQws8Sc1VIyR17zoRQtgzH4EQA12vk9okjY9CDfUdNuUbUMOlxknUPKSabTar54fwbhsac5bOh2xE9iQLbm9OPVgLCo6M+nlPJ0BIP9a6BPJKZFPtGFVV1fhEzpC2kUxHphoIhxmc/ZsjlxNrH97pLYlNmMQ+k56M4fytk+d4ka4pq0GZtxQ33A7dCM7zX18v+t7ZQ8V04zePT8UAXNEjW1MF/SROxi7G1U/SpPlmJOzLuKTZF7QyRdYv+kBvFwbx7HZgaXWl3YQ8Vdczl6yjCSPYLvjMGloiU/RT97Ow2x3lT4oxFbgkgU/7362nqc19tZ7aKpZ844fgHkmkC6hqZVoIx9//XSc/GqXaV9b+W6FEYAOhdH34G6HEdTkLj8ehWnA5NhaIe6MkbweSeMrxgP9f/gAkjOU/Gthy2sXBCsltGh2kox84KFkAQ14nfjvoR12txTWWZYzUEcJ6c+QyLxzFsltq2bA9T7fZhiEEZJlrZ3xHgDe/XlNmquCWigsCvImCzKF2BltRcRSGTTpNlUqe+U7SfKJlWROGcXHQ05Quk/qTGbdOcYhe73ebxjp5VRP+r9IEqJVZn+/cHc74AdaDgxHT4IOUgZJjSqAc5GqU5ISZnp46hJ2ZI2USlE1MRyFi8eKN/wishOrPmbmashLlZXB+A3nzuZnG6Vx/LetDtYMKGe9+t1zL//uet/uVeFUYpHAm0tgnqZb9ms04OIMZwloZ3eVuRrkx/RrDtNKhTp7B1YgmNp6hFTBt/dR9vUxIxozPsIU13J7ypwfdCflDF7qLMndrRUWnqtq+by90KO1zBN+L2MVBbZRog88c/VPxrVKp5Zs1/JTnZp6HoeKqiA/hEKaxRkjcDbR9yNPA/wy8=
width
compressedtrue
revision35

Use cases

...

UC14-1: add a new calculation Calculation rule (needs to change the openimis.json).
UC14-2: use the front end frontend contribution to select a calculation rule.
UC14-3: use the fron end fronend contribution to display the parameters required by multiple calculation for on an object.
UC14-4: replace a calculation ,rule.
UC14-5: remove a calculation ,rule.

Authorities

This module won't have ad-hoc authorities.

...

Backend management code

The back end backend management code will be used to register the calculation sub-module parameters, the sub-module status and the ReadUpdate right management on the database.
This code should have a function to clean the table from the remove calculation
This code should manage the uniqueness of the active version for a given UUID

...

Return the data contained on the JSON so the frontend can ask the parameters for a new object of the ClassName.

Events

contributionPlanUpdated ContributionPlanUpdated -

Calculations Frontend Module

...