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.9.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openimis_be_calculation-1.9.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openimis_be_calculation-1.9.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for openimis_be_calculation-1.9.1.tar.gz
Algorithm Hash digest
SHA256 3a0b8eba12c23594aced409dd1102ad5ca16ecc074eb76304e3a3463b7859d13
MD5 cdd39bc31f5d40bc28aa54220a2d77b5
BLAKE2b-256 5e870a9c93485c4b9a735200434860e12f5e968c99c6ecef91b284fd9bf03685

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openimis_be_calculation-1.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 faf3f3c42930203f616ba2bc32d0ac3de8ce6d1d7d8015f7647cb1a785d16f73
MD5 bd69135a1339ebdbccc2bedd61372917
BLAKE2b-256 7c131ff727353e15d5ca0492c4c9a5420ce5f4b71c8c3b52be3491f29ec692dc

See more details on using hashes here.

Supported by

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