Package: openimis-be-contract
openIMIS Backend Contract reference moduleThis repository holds the files of the openIMIS Backend Contract reference module.
It is dedicated to be deployed as a module ofopenimis-be_py.ORM mapping:tblContract > ContracttblContractDetails > ContractDetailstblContractContributionPlanDetails > ContractContributionPlanDetailsListened Django Signalspost_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 QueriescontractcontractDetailscontractContributionPlanDetailsGraphQL Mutations - each mutation emits default signals and return standard error lists (cfr. openimis-be-core_py)createContractupdateContractdeleteContractsubmitContractapproveContractapproveBulkContract (works with Celery)counterContractamendContractrenewContractcreateContractDetailsupdateContractDetailsdeleteContractDetailscreateContractDetailsByPhInsureeAdditional 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 mutationsmore info about it and how it was implemented here in Contract module in models.py in class ObjectMutation in docs stringServicesContractcreateupdatesubmitapproveamendrenewdeleteget_negative_amount_amendmentterminate_contractContractDetailsupdate_from_ph_insureeph_insuree_to_contract_detailsContractContributionPlanDetails - CRUD services, replacecreate_ccpd (ccpd - acronym of contract contribution plan details)contract_valuationcreate_contributionPaymentServicecreate (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 Dependenciescore.models.HistoryModelcore.models.HistoryBusinessModelcore.models.ObjectMutationpolicyholder.models.PolicyHolderpolicyholder.models.PolicyHolderInsureecontribution_plan.models.ContributionPlancontribution_plan.models.ContributionPlanBundleDetailsinsuree.models.Insureeinsuree.models.InsureePolicycontribution.models.Premiumpayment.models.Paymentpayment.models.PaymentDetailpolicy.models.Policycalculation modulebulk operations - required configurationfor 'bulk approve contract' and 'bulk counter contract' graphQL mutationsrunning rabbitmq docker imagerunning celery within "{imis_directory}/openimis-be_py/venv/bin/celery":-A openIMIS worker --loglevel=DEBUG --without-gossip --without-mingle --without-heartbeat -Ofairwithout this required steps you won't be able to bulk counter/approve contract