Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

the three dots menu will apply either to all selected line OR to all records filtered, once an option is selected a confirmation popup will precise the action and how many instance are concerned, the mutation result will show how many entity “update“ were successful and failed

  • Create invoice

Contract

Web application

  • (TBC, could work with scheduler)UC3-1: Add bulk "contract": Policy holder List > select policyholder(s) (or for all the PH part of the search result) > generate bulk contract (…) > enter the date on which the contract must be created if not already covered by previous contract.

  • UC3-10: add “Contract“: Contract search > “Add“ contract > fill the details on the contract page (draft) >save (mandatory fields required) > the insuree from the PH are imported with default calculation params

  • UC3-2: Add "contract" from PH: Policy holder List > Select a Policy Holder > Contract list> Generate contract (the insuree from the PH are imported with default calculation params) > fill the details on the contract page (draft)

  • UC3-11: Access to contract via contract search: Contract search > select contract

  • UC3-12: Access to a contract via PolicyHolder :Policy holder List > Select a Policy Holder > Contract list > Select contract

  • UC3-3: Update contract details: edit button on contract selected >update the details on the contract page (updatable fields will depend on the state) > save

  • UC3-3.1: add contractDetail : update contract > click on add ContractDetail (show Ph insuree) > enter the details in the popup > save

  • UC3-3.2: Update contractDetails: update contract > click the edit button of the ContractDetail (show Ph insuree)> confirm in the delete conf popup

  • UC3-3.3: Dupdate delete contract detail: update contract > click the delete button of the ContractDetail (show Ph insuree)> confirm in the delete conf popup

  • UC3-4: Submit (“sign PH)) "contract": contract selected >open contract > Submit/sign contract > conf popup

  • (TBC)UC3-5: Approve (“sign Insurance“) "Contract" bulk: Select contract(s) > Approve contract (…)(only for submitted contract) > conf pop up with the number of contract impacted

  • UC3-13: Approve (“sign Insurance“) "Contract": Select contract > open contract > contract Approved (only for submitted contract) > conf popup

  • UC3-13.1: see contribution details: "Contract": Select contract > open contract > open contribution details tab

  • UC3-6: Counter "Contract": Select contract > open contract > Counter contract / reject (only for submitted contract) > conf popup

  • UC3-7: Amend "contract": Select contract > open contract > Generate Amendment > confirmation with Amendment number > add details (if it is about a new employee, they should be added before on the employee list)

  • UC3-X: Delete"contract": Contract list > click on the delete button> conf popup (only available for contract in updatable or approvable status)

  • UCP-1: Create invoice via PolicyHolder :Policy holder List > tree dots menu ( > select contract(s)) > create invoice


Backend

  • UC3-8: send payment notification by email

  • UC3-9: send update required (from ask update) notification by email

  • UC3-14: (TBC replace UC3-1) create contract based on CPB periodicity / “renew-replace contract”

  • UC3-15: once approved (contract):

    • Check if there is a valid policy for the insure covered by the contract (+ grace period), if not then it will create such policy with the normal duration and a status "contracted."

    • matching contribution need to be created linked to the policie(s)

    • it the overall amount is > 0 ; create the related payment (payment status 3),

      • if there is an amendment with a null or negative amount and without payment, add the policy of that amendment to the payment

...

  • create

    • run service updateFromPHInsuree

    • NotifiedAmount = ContractValuation(false)

    • Contract state will become “Draft”

  • edit/update

    • check rights for contract / amendments

    • check status

      • if in “draft”/ “request for information“ / “counter“ only the code cannot be changed,

      • if in “Negotiable” changes are possible only with the authority “Approve/ask for change”

  • delete

    • check rights

    • block deleting contract not in Updateable or Approvable state

  • submit

    • check right

    • RectifiedAmount = ContractValuation(false)

    • send signal

    • Contract state will become “Negotiable”

  • approved

    • check rights (Approve/ask for change)

    • send signal

    • RectifiedAmount = ContractValuation(true)

    • Contract state will become “Executable”

    • createContribution

    • createcontractPayment

  • counter

    • check right (Approve/ask for change)

    • Contract state will become “counter”,

  • renew

    • create a new contract that follow the existing active contract (if not yet existing)

      • Date to (the previous contract) became date From of the new contract (TBC if we need to add 1 day)

      • Date To of the new contract is calculated by DateFrom new contract + “Duration in month of previous contract“

  • amend

    • check rights

    • create a new “amendment“ contract from the last amendement

    • increment Amendment of 1 (i.e. 1st amendment will have 1, 2nd: 2 … )

    • change status of the previous contract/amendement to 6 “addendum“ (Nice to have: 4 and 6 when addendum approved)

    • NotifiedAmount = ContractValuation(false)

    • Amendement state will become “Draft”

  • ContractValuation(bool save)

    • create the ContractContributionPlanDetails based on the ContractDetails (nice to have: if periodicity of the contribution plan is smaller that the contract datevalidFrom-datevalidTo then create enough ContractContributionPlanDetails to cover for the contract duration)

      • if the save param is true

        • use GetContributionLength to get the dateValidFrom DateValidTo of ContractContributionPlanDetails

        • createCCPDetails

      • if amendement: Contract value = value of the contributionplandetails - amount already payed for that contract (contract in state 7-8)

    • return the total amount

  • createCCPDetails

    • Check if there is a policy to cover from the dateValidFrom DateValidTo

      • if none: create one using the duration from the product with the status “contracted“ 32

      • if there is one that cover the full duration: use it

      • if there is one that does NOT cover the full duration: create a new policy to cover the missing part and split the ContractContributionPlanDetails and linked to the matching policies (dates of ContractContributionPlanDetails ) must be within policy dates.

    • create the matching CCPDetail (C: contract, P: policy CCPD Contract contributionplanDetails)

      • 1 policy: CCPD.DateVaildFrom = C.DateVaildFrom CCPD.DateVaildTo = C.DateVaildFrom + Duration

      • 2 policies:

        • CCPD1.DateVaildFrom = C.DateVaildFrom & CCPD.DateVaildTo = p1.expiry_date / P2.startdate

        • CCPD2.DateVaildFrom = p1.expiry_date / P2.startdate & CCPD2.DateVaildTo = C.DateVaildFrom + Duration

  • createContribution

    • create the contributions (from openimis-be-contribuiton_py) based on the ContractContributionPlanDetails

  • createcontractPayment

    • create a payment that cover all contributions related to the contract

  • updateFromPHInsuree

    • if PH is set, Update the ContractDetails based on the PHInsuree

  • getNegativeAmountAmendement (creditnote)

    • look for approved contract (amendement) for that PH that have a negative AmountDue

  • activateContractedPolicies (listen to payment signal)

    • NICE TO HAVE: this function will call a function for the contributionplan to retrieve the list of dependant that need to be covered by the contact (in addition to the insuree )

    • Activate the policy related to the contract (create policy insuree for the contract period + grace period)

    • Contract state will become “effective”,

    • change status to 7 - Effective

  • TerminateContract

    • previous contract of the (DateValidTo) will become “terminated“

  • PHInsureToCDetatils

    • Takes a PHinsuree as input and a contractDetails as output where the insuree and the CPB from the PH insureee will be used

    • This is likely to be called by the mutation to create details from front end when the PH is set

  • createInvoice

    • will try to run convert the ContractContributionPlanDetails of the contract to invoice lines

    • will save the invoice and the converted lines

Signal

ApprovedContract

  • Use Django Email to send payment notificaiton (it means that the setting in code should use Env var for the EMAIL settings)

  • Use text from configuration using django LANGUAGE CODE

...

  • {“comments”:[{“From”:”Portal/webapp”, “user“:<userid>, “date“:<datetime>,”msg”<message> }]}

on contract create invoice

Show how many invoice were created

Contract details tab

search criteria / filter

...

the material UI button can create a payment for the remaining amount not covered by the payment.

...

Insureepolicy tab

Will dispaly the list of insuree impacted by the contract (as primary insuree or dependant)

Search criteria

Insuree (search box popup with name .. )

Result page

read only lines

columns

  • insuree label (as defined by insuree contribution)

  • Nice to have: start_date, effective_date, expiry_date

INSUREEPOLICY_SEARCH perms = 101500

NICE TO HAVE: Contract comment tab

...

  • approve contract (confirmation box with the number of contract to be approved)

  • (nice to have: renew contract)

  • Create invoice

Material UI “add” to add a new contract (redirect to new contract page)

...