Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openimis_be_calculation-1.8.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

openimis_be_calculation-1.8.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file openimis_be_calculation-1.8.0.tar.gz.

File metadata

File hashes

Hashes for openimis_be_calculation-1.8.0.tar.gz
Algorithm Hash digest
SHA256 80a4e9df266d1fc22f47bd81d3dbebdadf0b6cf8fce4266957b4045622b6ea7d
MD5 a06eef6a8c2ecc67b3e4758121b42608
BLAKE2b-256 93be99fc3e77b0e2075d744ddd58eaba219add08cf26504b7d7cc7af16cd9a9b

See more details on using hashes here.

File details

Details for the file openimis_be_calculation-1.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openimis_be_calculation-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b93630d3d1e11ed012aad9d47e6de75e1baa7c3f1a3dbe9edeb6f552c41cbc41
MD5 f9ac376891a5322e4249a70e381ba5fc
BLAKE2b-256 9fcca54cdb01b30b93abf3565af688ab842b7f8a70ca36384744a4beaa76f54c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page