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

Uploaded Source

Built Distribution

openimis_be_calculation-1.3.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file openimis-be-calculation-1.3.1.tar.gz.

File metadata

  • Download URL: openimis-be-calculation-1.3.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for openimis-be-calculation-1.3.1.tar.gz
Algorithm Hash digest
SHA256 934215e0c2befbd084f5dfc2ccf2efe0b814c37c10ef54c4b7edd636a96f880e
MD5 97f90060879cfdd0b8c2893e2805d9d7
BLAKE2b-256 456c02d9cbd69b2287c839e804b02caa64f16dc1dcd0d4a8225ba6111afb393c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openimis_be_calculation-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for openimis_be_calculation-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8744ae74351c418262812795c615784e89a5440a17f5dad5c3fc2456c663332f
MD5 218d8bcbda2569bd51e0b1349d178455
BLAKE2b-256 f767619b04e205708532e7589adbe7ee02835f283ff0f1685b377c16e9abc220

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