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 in that document use a "calculation module"here uses a Calculation Module. This module will create is defining a framework to design calculations and to manage their activation and version on in openIMIS. The calculation rule themselves will be in the form of other modules, dependent on the " Calculation " moduleModule. This solution will deliver a calculation module Calculation Module that takes the income (on the level of the contribution collection details) and a rate (on the level of the contribution plan) as parameters.
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

...

Plantumlcloud
filenameprocess.png
dataxVZta9swEP41hvRDwUu6HxDSDfJhUCiB7aMsXRw1smQkOY3xVZti+IwEP41BffDQk/3foB098APBwsi3H1Mk1GzpklJUrX//U4ny1FTu80YY2CCHN3Lc889d0nxUDrPrO8aVZRrxr2xxbKkZ+n4ARrA81o0UuMXeGQOPzh7ZwvaW2itdMGeK7DHzB442qOF9H20Ni3o7Y/tM77trdEetIgXycPIPcz7VIwfJ1yq4IJPbU3X4jePsJc64PEHQsUU75j0Roe0hH24QARWVp2XdNUqpjEKFrks7++L1beEZ7WmXE7WOg/acTZ4NkZ0ihKaYDkTGlF/3WimjK7HMK1FV+6DF9XVgpVGIApKnOOoBhyOneCTCsh40jeSF33hhCxHKvMwTxhjJ5gHETgmXgfK6ZzRzMQlWMssa8CDdcGezzB4nAPOjVLAUxWshikGUhzEpQwTUQJ5i6+7cZXkErNYbd6TswfPD2NEZAD7uMGT1Fx1QlLTKI9KiRDBgfmIgwjI9CVpXhSqZuytqV6AWi01jp7msNjtto93cZTkPrTkLJ0PmYjnWQLcwbyOQC0oODHq5C1NACH9VNcSyDfymuvEpJ6azidicsomMp1wdiAcFnD2L45cXll/dyW1pDNhrocYzl8GZU4X6bqqycr8SGz5PhiGb1n+/POib526sDLj4C3j2yYDtxmRPVMF4xDOxt68EeSofJIlTTYjUV8mJU29oB0pinGzZwOEeOoaLG2rtJWQp2Z63KIJI9gu+Cy6NuyPOfqp+0VY5o7yJ8WYBlySwKf9HzbT3K5+s5n6Jpb8weq/RRLpAppWmR7C8dd/18n3Tqn+ifX/VigRWCaUoQ9/I5T4a7gIr6dcLbgcOwvEvVGS95kkHko84B+W3w==iaTptbd1nU5jgORtJmXZ555ZjR7yp1n1jeVyvIl497YbJ7TZ77me6gAz0tRSY0v8MgcfnH2wfZFewu1lS7YFwrsYWAPHO1Be+nbaG1q0KufqzU+ba3RHrSIF8nDyC1M+5SMH0ZcyuCCn501TY1vnmErdcDj90CoFW8U89LokJfAdzcIwcqy6a5qxTSGwSrn+eNjtnhJgBZLSubkTk9ErYxoFKU0wXQiNuL+XmimjN7h+ST9vg9XW4zAfXCmAmuw0ghEQwCGeMoOj2NH+KQSMh71jSxGXzgi3ZHTYZhXjLGpBfMgAtvEcEc+nQeEL8UlWs0sq8CDdcGeT1B5mELOjVLAUxlsB2MUpDiISxkmohhutuVdlkvQbFF8pGcLnl9agxRgQws8Sc1VIyR17zoRQtgzH4EQA12vk9okjY9CDfUdNuUbUMOlxknUPKSabTar54fwbhsac5bOh2xE9iQLbm9OPVgLCo6M+nlPJ0BIP9a6BPJKZFPtGFVV1fhEzpC2kUxHphoIhxmc/ZsjlxNrH97pLYlNmMQ+k56M4fytk+d4ka4pq0GZtxQ33A7dCM7zX18v+t7ZQ8V04zePT8UAXNEjW1MF/SROxi7G1U/SpPlmJOzLuKTZF7QyRdYv+kBvFwbx7HZgaXWl3YQ8Vdczl6yjCSPYLvjMGloiU/RT97Ow2x3lT4oxFbgkgU/7362nqc19tZ7aKpZ844fgHkmkC6hqZVoIx9//XSc/GqXaV9b+W6FEYAOhdH34G6HEdTkLj8ehWnA5NhaIe6MkbweSeMrxgP9f/gA=
width
compressedtrue
revision13

Use cases

Back-end

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

...

  • UUID (char(24) )

  • CalculationRulesUUID (varchar)

  • Status (int)

  • ClassName

  • Main (bool)

  • Params (Json)

  • ClassParams(json)

    • Type

    • rights

    • Relevance

    • conditions

  • Json_ext (json)

  • DateCreated(date)

  • DateUpdate(date)

  • UserUpdateUUID(fk users)

  • UserCreateUUID (fk users)

...


Detailed design

...

Calculations Backend Module

Backend management code

...

The back end 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 -

Calculations Frontend Module

Calculation management page

...