The openIMIS Backend Calculation reference module.
Project description
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"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openimis_be_calculation-1.7.0.tar.gz
.
File metadata
- Download URL: openimis_be_calculation-1.7.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cac8c6a589f0b931083d42f8e311a04d298b44b616ceff39fbc6aba86961597 |
|
MD5 | 3ae4832dea65943078477e74111d4f60 |
|
BLAKE2b-256 | 16b3c60c583e96d57b220e733d753aff90292a0d28cc024ca08651aa9ae38e87 |
File details
Details for the file openimis_be_calculation-1.7.0-py3-none-any.whl
.
File metadata
- Download URL: openimis_be_calculation-1.7.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967d77883d0aac4ce2333de954c5046293cf7f20d093c4411802b2225ff6926f |
|
MD5 | 46efc5bf22ac64d9bb81affdd3946e37 |
|
BLAKE2b-256 | ba197c42bdca14b07f014f3c8d7af073bd345fda14831f6f6fa59e0853eba284 |