...
The process bellow will respect the location scope of the users, meaning that to add a policyholder for a region the scheme clerk must have access to that very region.
First the contract will need to be created and approved the payment on a contract will update the status of the contract and the underlying policies
Use cases
...
Contract
(…) means actions for selected item in the list (cf HF claims)
...
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
Payment
The new policy state "contracted" indicate that the insuree policy doesn't have the same dates as the policy because it is renewable contract payment that defines the validity of the insureepolicy
on payment, a script will:
retrieve the policies attached the “paid“ contribution (payment is for a contribution)
check that total payment for each contribution match the contribution value
Create or update the policyinsure up to the end of the grace period, two insurees policies could be created if two policies are required to cover the contract period.
Web application
UC4-1(Nice to have): add payment for several contract > contract(s) selected > create payment (…) > enter value > save > confirmation giving the contract status
UC4-7(should have): add payment for a single contract selected > open contract page >create payment > enter value > save > confirmation giving the contract status
UC4-2(Nice to have): update payment: Policy holder List > Select a Policy Holder > payment list > Select payment > update value > save > confirmation giving the contract status
UC4-3(should have): delete payment: Policy holder List > Select a Policy Holder > payment list > Select payment > delete payment > confirmation giving the contract status
UC4-5: add credit note from contract or amendment: Policy holder List > Select a Policy Holder > payment list > add credit note (negative payment)
Back end
UC4-6: assign a credit note to contract: On contract approval, if there is a credit note not assigned to a contract, it will be assigned to the newly approved contract as a payment.
UC5-1: When a full payment is received for a contract, the policy of the policyholder insuree part of the contact will be renewed if needed
UC5-2: When a full payment is received for a contract, the insureepolicy of the policyholder insuree part of the contact will be activated
...
Contract (Contribution Collection)(HistoryBusinessModel)
Code (varchar (64) )*
PolicyHolderUUID (fk policyHolder)
AmountNotified (float)
Upon Automatic creation
AmountRectified (float)
Manual update from the policy holder, saved on submit
AmountDue (float)
Value approved by the Scheme admins
DateApproved (datedatetime)
DatePaymentDue (date)
State (ConfigEnum:ContractState)
PayementReference(stringvarchar 256)
Amendment ( int 0 for the contract)*
Communications on the contract will be saved on the jsonExt fields with that structure:
{“comments”:[{“From”:”Portal/webapp”, “user“:<userid>, “date“:<datetime>,”msg”<message> }]}
Entity ContractDetails (input) - under Contract (HistoryModel)
ContractUUID (fk Contract)*
insureeeID (fk_insuree)*
PolicyHolderInsureeUUID (fk PolicyHolderInsuree)ContributionPlanBundleUUID:Version(fk ContributionPlanBundle)*
Json_param (json)
PolicyHolderInsuree parameters
Json_param_history (json)
Entity ContractContributionPlanDetails (output) - under ContractDetails (HistoryModel)
ContributionPlanUUID (fk_contributionPlan)*
PolicyID (fk_policy)*
ContractDetailsUUID (fk_contractdetails)*
ContributionId (fk_contribution)
ContributionPlan parameters will be stored in the json_ext part of the HistoryModel
Payment table already exist tblPayment. in scope in BS migration (TBC)
https://github.com/openimis/openimis-be-payment_py
Payment status
-1 Error when saving Intent to pay (see RejectedReason)
0 Intent to pay saved without errors
1 Control Number request sent
2 Control Number request sent
3 Control Number received without error
-3 Error related to Control Number request or Payment confirmation (should have different values per post)
4 Received Payment
5 Payment matched
RejectedReason
2 Insurance number missing Not valid insurance or missing product code
3 Invalid Officer Code Not valid enrolment officer code
4 Missing product or Product does not exists Not valid insurance or missing product code
4 Wrong match of Enrollment Officer agaists Product Enrolment officer code and insurance product code are not compatible
5 The family doesn't contain this product for renewal Beneficiary has no policy of specified insurance product for renewal
5 Proxy family can not renew Beneficiary has no policy of specified insurance product for renewal
7 Insurance number not existing in system Insuree not enrolled and prior enrollment mandatory
Authorities
To manage the group insurance several authorities will be added, the existing authorities have a "*" :
PolicyHolderContract
C/R/U/D (4 authorities)
SubmitSearch → 152101
Create → 152102
Update → 152103
Delete → 152104
Renew → 152106
Submit → 152107
Approve/ask for change → 152108
Amend
PolicyHolderContractDetails
C/R/U/D (4 authorities)
Approve
Payment
C*/R*/U*/D*(4 authorities)
Submit (TBC)
Validate
CreditNote
the Prefix will be 1521
Services
edit/update
delete
submit
approved
counter
renew
amend
createcontractContribution
updateFromPHInsuree
assignCreditNote
AddCreditNote
activateContractedPolicies (listen to payment signal)
(create amendment) → 152109
Payment, Prefix will be 1014 ( * existing in core)
Search → 101401*
Create/Submit → 101402*
Update → 101403*
Delete → 101404*
Approve/Validate → 101408
(*) ContractDetails don’t have rights anymore because they inherit from contract
Services
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
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)
create Contractpayment (see createcontractPayment service)
Contract state will become “Executable”
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“
ContractValuation(bool save)
create the ContractContributionPlanDetails based on the ContractDetails
save them only if the save param is true
return the total amount
createContribution
create the contributions 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 insuree for the contract period + grace period)
Contract state will become “effective”,
launch TerminateContract
TerminateContract
previous contract of the (DateValidTo) will become “terminated“
Config
"ContractState":[
{
"value":"1",
"label":{
"fr":"Demande d'information",
"en":"Request for information"
}
}, {
"value":"2",
"label":{
"fr":"Brouillon",
"en":"Draft"
}
}, {
"value":"3",
"label":{
"fr":"Offre",
"en":"offer"
}
}, {
"value":"4",
"label":{
"fr":"En negociation",
"en":"
...
Negotiable"
}
}, {
"value":"5",
"label":{
"fr":"Apprové",
"en":"executable"
}
}, {
"value":"6",
"label":{
"fr":"addendum",
"en":"addendum"
}
}, {
"value":"7",
"label":{
"fr":"En cours",
"en":"effective"
}
}, {
"value":"8",
"label":{
"fr":"Appliqué",
"en":"executed"
}
}, {
"value":"9",
"label":{
"fr":"Suspendu",
"en":"Disputed"
}
}, {
"value":"10",
"label":{
"fr":"Terminé",
"en":"terminated"
}
}
}
“updatable”:[“draft”,“request for information“,“counter”],
“Approvable”:[ “Negotiable“]
Front end detail design
Contract search page
search options
it will be possible to search on:
code (varchar icontain, istart)
AmountFrom - AmountTo (float)
Search in the 3 amounts
DatePaymentDue (date)
State (ConfigEnum:ContractState)
PayementReference(string)
Amendment ( int 0 for the contract)
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 and 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)
(nice to have: renew contract)
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)
PayementReference(varchar 256)
Amendment ( int 0 for the contract)*
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 (reject as sub-option) for “Negotiable” contract
Amend(NTH: renew as sub-option) for other status but “terminated“
on contract creation
Code, DateValidFrom and DateValidTo is mandatory
on contract update
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 presenttab as a frontend contribution
Contract details tab
search criteria / filter
insuree picker (with sort option ASC/DESC)
CBP picker (with sort option ASC/DESC)
Apply search button
reset search button
Add new contract details button (top right)
will show the contract details
insuree picker readonly
CBP 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:
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
Save button
confirmation popup
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 status 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)
will show the contract details
insuree picker readonly
CP picker readonly
calculation param