Versions Compared

Key

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

...

  • 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)

  • 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 “open/ouvert“ 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 insuree that need to be covered by the contact (to get the dependants)

    • 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

...

“payment_notification“:{“en“:”Dear <CONTACT-NAME>\n The contract<CONTRACT-CODE> - <CONTRACT-NAME> was approved\n Please proceed to the payment of <CONTRACT-DUEAMOUNT> with the reference <CONTRACT-PAYMENT-REFERENCE>\n Best regards ” , “fr“:”Monsieur, Madame <CONTACT-NAME>\n le contract<CONTRACT-CODE> - <CONTRACT-NAME> à été apprové\n Veuillez faire un paiement de <CONTRACT-DUEAMOUNT> avec la référence <CONTRACT-PAYMENT-REFERENCE>\n Meilleurs Salutations ”}

Front end detail design

menu

  • below or above Policy Holders menu entry

  • use ReceiptIcon from Material UI library

    Image Removed

Contract search page

search options

it will be possible to search on:

  • code (varchar, Icontains lookup)

  • PolicyHolder

  • (nice to have) Insuree

  • AmountFrom - AmountTo (float)

    • Search in the 3 amounts

  • DatePaymentDue (date, datePaymentDue lookup)

  • State (ConfigEnum:ContractState)

  • PaymentReference (string, Icontains lookup)

    • used for reconciliation between IMIS and bank account statement: if you have a reference on the wire transfer and on IMIS you can know what this payment concerns

  • Amendment (int, min = 0, max is not specified)

    • int = 0 for the contract, int > 0 for an amendment

  • DateValidFrom

  • DateValidTo

  • Show deleted checkbox

  • search button

  • reset search button

search results column

  • Code

  • state

  • amount ( if not null amountDue else if not null amountRectified else AmountNotified )

    • Nice to have: hoover 3 amounts

  • Payment due date

    • Nice to have: hoover: PayementReference

  • dateValidFrom

  • dateValidTo

  • Amendement

  • update, delete button

… 3dot menu above the result table with action on single/multi select of contract (if no contract selected, the options applies to all contract from the search result)

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

  • counter contract

  • (nice to have): renew contract

  • (nice to have): Add payment

  • (nice to have): Activate policy

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

Contract card

the contract card will have the same layout as the PH page: a general information section and 3 tabs

General information

  • Code (varchar (64) )

  • PolicyHolderUUID (fk policyHolder)

  • AmountNotified (float)

  • AmountRectified (float)

  • AmountDue (float)

  • DateApproved (datetime)

  • DatePaymentDue (date)

  • State (ConfigEnum:ContractState, 2 (which corresponds to Draft) by default, read-only)

  • PayementReference(varchar 256)

  • Amendment (0 by default, read-only)*

  • DateValidFrom

  • DateValidTo

Material UI will have different function

  • Save if there is changed

  • if no changes

    • Submit from a “draft”/ “request for information“ / “counter” contract

    • Approve/Counter (reject as sub-option) for “Negotiable” contract

    • Amend(NTH: renew as sub-option) for other status but “terminated“

on contract amend (for contract not terminated, not Negociable nor updatable state )

Code, PH, DateValidFrom cannot be changed

on contract creation

Code, DateValidFrom and DateValidTo is mandatory

on contract update

PH Can be set but not edited once saved.

  • with update authority,

    • in updatable state only Code, PH, DateValidFrom and DateValidTo cannot be changed,

    • no changes possible in other status

  • with the authority “Approve/ask for change”

    • in updatable state all can be changed,

    • in “Approvable” changes are possible only Code, DateValidFrom and DateValidTo cannot be changed,

on contract submission

at least 1 contract detail must be present

“counter_notification“:{“en“:”Dear <CONTACT-NAME>\n The contract<CONTRACT-CODE> - <CONTRACT-NAME> was counter\n Please proceed recheck the information and correct the issues, in case of questions please check contact us\n Best regards ” , “fr“:”Monsieur, Madame <CONTACT-NAME>\n le contract<CONTRACT-CODE> - <CONTRACT-NAME> à été contré, veuillez verifier les information saisie, en cas de question veuillez nous contacter\n Meilleurs Salutations ”}

Front end detail design

menu

  • below or above Policy Holders menu entry

  • use ReceiptIcon from Material UI library

    Image Added

Contract search page

search options

it will be possible to search on:

  • code (varchar, Icontains lookup)

  • PolicyHolder

  • (nice to have) Insuree

  • AmountFrom - AmountTo (float)

    • Search in the 3 amounts

  • DatePaymentDue (date, datePaymentDue lookup)

  • State (ConfigEnum:ContractState)

  • PaymentReference (string, Icontains lookup)

    • used for reconciliation between IMIS and bank account statement: if you have a reference on the wire transfer and on IMIS you can know what this payment concerns

  • Amendment (int, min = 0, max is not specified)

    • int = 0 for the contract, int > 0 for an amendment

  • DateValidFrom

  • DateValidTo

  • Show deleted checkbox

  • search button

  • reset search button

search results column

  • Code

  • state

  • amount ( if not null amountDue else if not null amountRectified else AmountNotified )

    • Nice to have: hoover 3 amounts

  • Payment due date

    • Nice to have: hoover: PayementReference

  • dateValidFrom

  • dateValidTo

  • Amendement

  • update, delete button

… 3dot menu above the result table with action on single/multi select of contract (if no contract selected, the options applies to all contract from the search result)

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

  • counter contract

  • (nice to have): renew contract

  • (nice to have): Add payment

  • (nice to have): Activate policy

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

Contract card

the contract card will have the same layout as the PH page: a general information section and 3 tabs

General information

  • Code (varchar (64) )

  • PolicyHolderUUID (fk policyHolder)

  • AmountNotified (float)

  • AmountRectified (float)

  • AmountDue (float)

  • DateApproved (datetime)

  • DatePaymentDue (date)

  • State (ConfigEnum:ContractState, 2 (which corresponds to Draft) by default, read-only)

  • PayementReference(varchar 256)

  • Amendment (0 by default, read-only)*

  • DateValidFrom

  • DateValidTo

Material UI will have different function

  • Save if there is changed

  • if no changes

    • Submit from a “draft”/ “request for information“ / “counter” contract

    • Approve/Counter (reject as sub-option) for “Negotiable” contract

    • Amend(NTH: renew as sub-option) for other status but “terminated“

on contract amend (for contract not terminated, not Negociable nor updatable state )

Code, PH, DateValidFrom cannot be changed

NICE TO HAVE: text box that will be save a comment json_ext

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

on contract creation

Code, DateValidFrom and DateValidTo is mandatory

on contract update

PH Can be set but not edited once saved.

  • with update authority,

    • in updatable state only Code, PH, DateValidFrom and DateValidTo cannot be changed,

    • no changes possible in other status

  • with the authority “Approve/ask for change”

    • in updatable state all can be changed,

    • in “Approvable” changes are possible only Code, DateValidFrom and DateValidTo cannot be changed,

NICE TO HAVE: text box that will be save a comment json_ext

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

on contract submission

at least 1 contract detail must be present

on contract counter

NICE TO HAVE: text box that will be save a comment json_ext

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

Contract details tab

search criteria / filter

...

  • insuree picker (with sort option ASC/DESC)

  • CPB picker (with sort option ASC/DESC)

  • CP picker (with sort option ASC/DESC)

  • Product (with sort option ASC/DESC)

  • Search button

  • reset search button

will show the contract details

  • insuree picker readonly

  • CP picker readonly

  • calculation param

(Nice to have)

...

Product (with sort option ASC/DESC)

...

Search button

...

reset search button

will show the contract details

  • insuree picker readonly

  • CP picker readonly

  • calculation param

(Nice to have)Contract payment tab

...

Contract payment tab

Will display the payments that concern contribution linked to CCPD

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

NICE TO HAVE: Contract comment tab

Will dispaly the comments entered on the contact, comment are saved as a list in the json_ext

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

a input box will be available at the bottom of the list to add a new comment

Contract Tab on PolicyHolder

...