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

Metadata

Release files for openimis-be-calculation 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openimis-be-calculation 1.3.0
File Size Uploaded
openimis-be-calculation-1.3.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openimis-be-calculation 1.3.0
File Interpreter ABI Platform
openimis_be_calculation-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / openimis-be-calculation-1.3.0.tar.gz

Download URL openimis-be-calculation-1.3.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6ac0b994c36ef71e11655254e763780a644a0f928275fd19ad8096154b5a799d
BLAKE2b-256 checksum
How to use checksums
859003b8a1b2829ce0c27f017fa2a6e53e39769a3b9582b39d5fd7f809d8a497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / openimis_be_calculation-1.3.0-py3-none-any.whl

Download URL openimis_be_calculation-1.3.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e42d66c369a14c20b72bdab893a757f63823b24d91bc8abf193c3925dec4e76
BLAKE2b-256 checksum
How to use checksums
40186bdf50e07a84f755e885b9faacd83910444436f4ecf5cd8a12624f636f53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.3.1

2 release files

This release

1.3.0 This release

2 release 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