Skip to main content

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"])

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.7.1.tar.gz (11.8 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.7.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openimis_be_calculation-1.7.1.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

Hashes for openimis_be_calculation-1.7.1.tar.gz
Algorithm Hash digest
SHA256 aa87c06dbb2c99cb120c77d7faade576c4799e9f212114a3428c3716ae3cf7cf
MD5 447611597223fca835b98f1cb9a0424d
BLAKE2b-256 e6ddb714cf82349e523b857fb5fbf2e2569ce0538f1af41cfe82c6f90451663a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openimis_be_calculation-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30459752d2b69abe23fc8b3dd5dd7bbb75e71505c1b564f704e18f0868fe2c57
MD5 66cde85d9345ee8aa6f0be0270834932
BLAKE2b-256 2b6af074005bda0c890d5c671a6b7720df5a54087011c32e8dc8e27a8e5e706a

See more details on using hashes here.

Release history Release notifications | RSS feed

1.10.0

2 files

1.9.1

2 files

1.9.0

2 files

1.8.0

2 files

This release

1.7.1 This release

2 files

1.7.0

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.1

2 files

1.4.0.0

2 files

1.3.1

2 files

1.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page