openIMIS Backend Calculation reference module
This repository holds the files of the openIMIS Backend Calculation reference module. It is dedicated to be deployed as a module of openimis-be_py.
Models
- None (using no database approach for CalculationRule) - Calculation Rule is saved by defining class extending the ABSCalculationClass from core module.
Listened Django Signals
- signal_get_rule_name
- signal_get_rule_details
- signal_get_param
- signal_get_linked_class
- signal_calculate_event
GraphQl Queries
- calculationRules
- allow frontend to fetch the all calculation rules data
- calculationRulesByClassName
- allow frontend to fetch the calculation data based on its name
- calculationParams
- allow frontend to fetch the calculation parameters
- linkedClass
- allow frontend to fetch the linked class related to chosen instance
Services
- get_rule_name(class_name)
- return the names of calculation rules
- get_rule_details(class_name)
- this function will send a signal and the rules will reply if they have object matching the classname in their list of object
- run_calculation_rules(instance, context, user)
- trigger calculations so as to calculate based on provided parameters
- get_parameters(class_name, instance)
- return the ruleDetails that are valid to classname and related to instance
- get_linked_class(class_name_list)
- List[ClassName] is send from FE, by checking the class used in page where the user have access
- return all the ListClass
Configuration options (can be changed via core.ModuleConfiguration)
- gql_query_calculation_rule_perms: required rights to call all graphQl queries defined for Calculation module (default: ["153001"])
- gql_mutation_update_calculation_rule_perms: required rights to update CalculationRule (default: ["153003"])
Metadata
Release files for openimis-be-calculation 1.4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openimis-be-calculation-1.4.0.0.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openimis_be_calculation-1.4.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.3 kB
Release files / openimis-be-calculation-1.4.0.0.tar.gz
| Download URL | openimis-be-calculation-1.4.0.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da70682d51a70378c89dfca205a7e1ae79cc5f0bcbe40d4c8d0b90a3593a59c8
|
|
BLAKE2b-256 checksum How to use checksums |
c55374bf3ca9400b8a150e60cc91dca28717536ca03fe8c41d2e7d46845215d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / openimis_be_calculation-1.4.0.0-py3-none-any.whl
| Download URL | openimis_be_calculation-1.4.0.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30b0b03dc5709e094c482a396016cc137643ec4f2e837426dbf354a3e2c638c8
|
|
BLAKE2b-256 checksum How to use checksums |
d44de17cb6f526372bc9f1e3d0eadc768fe8262e25ef42cd3bf6280fb24093a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|