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

...

  • ContractUUID (fk Contract)*

  • insureeeID (fk_insuree)*

  • PolicyHolderInsureeUUID (fk PolicyHolderInsuree)

  • ContributionPlanBundleUUID:Version(fk ContributionPlanBundle)*

  • Json_param ext (json fields part of HistoryModel)

    • PolicyHolderInsuree parameters

...

  • 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)create Contractcontribution (see createcontractContribution service)

    • 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
      • 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 “open/ouvert“ “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)

    • Activate the policy related to the contract (create policy 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

...

"value":"11",
"label":{
"fr":"révision demandé",
"en":"counter"

}
}

}

“updatable”:[1,2,11] (that corresponds to “draft”, “request for information“ ,and “counter”]),

“Approvable”:[ “Negotiable“]“payment4] (that corresponds to “negotiable“)

“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

Contract details tab

search criteria / filter

  • insuree picker (with sort option ASC/DESC)

    • Limited to PHInsuree

    • Nice to have : not limited to PHinsuree if PH not set

  • CBP picker (with sort option ASC/DESC)

    • Limited to PHCPB

    • Nice to have : not limited to PHCPB if PH not set

  • Apply search button

  • reset search button

  • Add new contract details button (top right)

will show the contract details

  • insuree picker readonly

  • CPB picker readonly

  • calculation parameters

  • edit and delete button only if

    • with update authority, updatable state

    • with Approve authority, updatable and approvable state

on add contract details

a popup will be display with

  • if PH is set (must have)

    • PHInsuree picker (Insuree, same fields as he Insuree picker )

    • CPB not editable per the user, auto update form Pinsuree (unless this can be add on the PH insuree picker)

  • if PH is not set (nice to have)

    • CPB picker restricted to the PHCPB if PH define on the contract *

    • Insuree picker restricted to the PHinsuree if PH define on the contract *

  • calculation parameters (Mandatory fields will be managed by the calculation contribution)

  • Save button

The relationship with the contract is not displayed because implicit

on delete contract details

confirmation popup

on edit contract details

  • only calculation parameters could be updated

confirmation popup

Contract contributiondetails tab

this that is readonly, availabable only in state NOT approvable or updatable

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)Contract payment tab

FIXME: Will be described later

Contract Tab on PolicyHolder

“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 (confirmation box with the number of contract to be countered)

  • (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) READ ONLY

  • DatePaymentDue (date ) READ ONLY, NICE TO HAVE update possible only with the approve/counter authority

  • 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

Nice to have:

  • with update/create authority,

    • Date payment due READ ONLY

  • with the authority “Approve/ask for change”

    • Editable

on contract update

PH Can be set but not edited once saved.

  • with update authority,

    • in updatable state only 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> }]}

on contract create invoice

Show how many invoice were created

Contract details tab

search criteria / filter

  • insuree picker (with sort option ASC/DESC)

    • Limited to PHInsuree

    • Nice to have : not limited to PHinsuree if PH not set

  • CBP picker (with sort option ASC/DESC)

    • Limited to PHCPB

    • Nice to have : not limited to PHCPB if PH not set

  • Apply search button

  • reset search button

  • Create new Contract Details button (top right) enabled only if

    • with Update authority, updatable state

    • with Approve authority, updatable and approvable state

will show the contract details

  • insuree picker readonly

  • CPB picker readonly

  • calculation parameters

  • Edit and Delete buttons enabled only if

    • with Update authority, updatable state

    • with Approve authority, updatable and approvable state

on add contract details

a popup will be display with (mandatory fields marked with *):

  • if PH is set (must have)

    • PHInsuree picker (Insuree, same fields as the Insuree picker) *

    • CPB not editable per the user, auto update form Pinsuree (unless this can be add on the PH insuree picker)

  • if PH is not set (nice to have)

    • CPB picker restricted to the PHCPB if PH define on the contract *

    • Insuree picker restricted to the PHinsuree if PH define on the contract *

  • calculation parameters (Mandatory fields will be managed by the calculation contribution)

  • Save button

The relationship with the contract is not displayed because implicit

on delete contract details

confirmation popup

on edit contract details

  • only calculation parameters could be updated

confirmation popup

Contract contributiondetails tab

this that is readonly, availabable only in state NOT approvable or updatable

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

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

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

should display only Contracts, which have this particular Policy Holder assigned

search options

it will be possible to search on:

...

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

...