Skip to main content

The openIMIS Backend Contract reference module.

Project description

openIMIS Backend Contract reference module

This repository holds the files of the openIMIS Backend Contract reference module. It is dedicated to be deployed as a module of openimis-be_py.

ORM mapping:

  • tblContract > Contract
  • tblContractDetails > ContractDetails
  • tblContractContributionPlanDetails > ContractContributionPlanDetails

Listened Django Signals

  • post_save - Payment: handles service activate_contracted_policies - only when payment is related to the contract/contracts. (it is verified by this post save) Another payments are omitted in processing.

GraphQl Queries

  • contract
  • contractDetails
  • contractContributionPlanDetails

GraphQL Mutations - each mutation emits default signals and return standard error lists (cfr. openimis-be-core_py)

  • createContract
  • updateContract
  • deleteContract
  • submitContract
  • approveContract
  • approveBulkContract (works with Celery)
  • counterContract
  • amendContract
  • renewContract
  • createContractDetails
  • updateContractDetails
  • deleteContractDetails
  • createContractDetailsByPhInsuree

Additional mutation log helper in Create graphQl mutations - ObjectMutation from core

  • "ObjectMutation" from openimis-be-core_py - models.py
  • "object_mutated" method allows the creation of an object to update the xxxMutation easily.
  • dedicated for createContract and createContractDetails graphQl mutations
  • more info about it and how it was implemented here in Contract module in models.py in class ObjectMutation in docs string

Services

  • Contract
    • create
    • update
    • submit
    • approve
    • amend
    • renew
    • delete
    • get_negative_amount_amendment
    • terminate_contract
  • ContractDetails
    • update_from_ph_insuree
    • ph_insuree_to_contract_details
  • ContractContributionPlanDetails - CRUD services, replace
    • create_ccpd (ccpd - acronym of contract contribution plan details)
    • contract_valuation
    • create_contribution
  • PaymentService
    • create (with creating payment details for that newly created payment)
    • collect_payment_details (collect data from all contributions to assign it to the payment details)

Configuration options (can be changed via core.ModuleConfiguration)

  • gql_query_contract_perms: required rights to call createContract GraphQL Query (default: ["152101"])

  • gql_query_contract_admins_perms: required rights to call contribution_plan_bundle_admin GraphQL Query (default: [])

  • gql_mutation_create_contract_perms: required rights to call createContract, createContractDetails GraphQL Mutations (default: ["152102"])

  • gql_mutation_update_contract_perms: required rights to call updateContract, updateContractDetails GraphQL Mutations (default: ["152103"])

  • gql_mutation_delete_contract_perms: required rights to call deleteContract, deleteContractDetails GraphQL Mutations (default: ["152104"])

  • gql_mutation_renew_contract_perms: required rights to call renewContract GraphQL Mutation (default: ["152106"])

  • gql_mutation_submit_contract_perms: required rights to call submitContract GraphQL Mutation (default: ["152107"])

  • gql_mutation_approve_ask_for_change_contract_perms: required rights to call approveContract, approveBulkContract and counterContract GraphQL Mutations (default: ["152108"])

  • gql_mutation_amend_contract_perms: required rights to call amendContract GraphQL Mutation (default: ["152109"])

openIMIS Modules Dependencies

  • core.models.HistoryModel
  • core.models.HistoryBusinessModel
  • core.models.ObjectMutation
  • policyholder.models.PolicyHolder
  • policyholder.models.PolicyHolderInsuree
  • contribution_plan.models.ContributionPlan
  • contribution_plan.models.ContributionPlanBundleDetails
  • insuree.models.Insuree
  • insuree.models.InsureePolicy
  • contribution.models.Premium
  • payment.models.Payment
  • payment.models.PaymentDetail
  • policy.models.Policy
  • calculation module

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-contract-1.3.0.tar.gz (33.7 kB view details)

Uploaded Source

Built Distribution

openimis_be_contract-1.3.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file openimis-be-contract-1.3.0.tar.gz.

File metadata

  • Download URL: openimis-be-contract-1.3.0.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for openimis-be-contract-1.3.0.tar.gz
Algorithm Hash digest
SHA256 59164d7cf97804d1bf7242266e44592c3fadaa38a5afc4788a2adf307becafd5
MD5 2485d608f553eb7ab9050787d95e1b9b
BLAKE2b-256 33913a5cad706ef4280b3a42605afe73886fdc3a38f43470dc12fd10544a4f06

See more details on using hashes here.

File details

Details for the file openimis_be_contract-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: openimis_be_contract-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for openimis_be_contract-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5fe8bdcf6c50afdb7e89b57be91535ec1e1e476dce008e58d3efabffb80ef31
MD5 680cccdd54d546cd76d16b6e54ed4f76
BLAKE2b-256 9a3c1f26ebb7c89445ba8c328b0816b9066a9fe9307765d6d04c6e6ee7dea5f7

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