Payment plan calculation rule: Capitation
version = 1
status = active
UUID = 0a1b6d54-5681-4fa6-ac47-2a99c235eaa8
calculation_rule_name = “payment: capitation “
type = account_payable
sub_type = third_party_payment
dateValidTo = None
dateValidFrom = 2000-01-01
from_to: [{“from”:”BatchRun”,”to”:”Bill”}]
list of impacted parameters: NULL (will take data from product, claims … )
description = “ This calculation will, for the selected level and product, calculate how much the insurance need to pay the HF for the capitation financing “
Service
activeForObject(self, instance, context, type, sub_type)
instance.__class__ == PaymentPan and context IN (submit) and self.checkCalculation(instance)
check_calculation
BatchRUn → Location
if HF → locations
if location → ProductS (Product also related to Region if the location is a district)
if product → paymentPlans
if paymentPlan → check if UUID = this.UUID
calculate(cls, instance, *args[context, date_from, date_to, productid, location])
instance.__class__ == PaymentPlan
if context == “batchPayment“
get all valuated claims that should be evaluated with capitation that matches args (existing function develop in TZ scope)
create a bill through the converters from the calculation result (save the calculation result in bill notes/item details)
elseif context == “batchValuation“
Do nothing, relative pricing still par of the batchrun
elseif context == “individualPayment“
not implemented
elseif context == “individualValuation“
not implemented
convert(from, to, **argv)
if context == “batchPayment“
argv
product_id
batch_id
sub_type,
if active_for_object(<paymentplan>, 'submit', type, sub_type):
calculate(cls, <paymentplan>, *args[date_from, date_to, productid, location]
[to be updated]
[out of scope]two way of creating the accountPayableare possible for the capitation, in both case there will be one “accountPayable” per HF
one asset (line) per weighted indicator I for product P : Allocated contribution/ Sum(indicator for P) as unit price , indicator I as quantity, (1-weight) as discount;
Population living in catchments area of the health facility
Number of families living in catchments area of the health facility
Insured population living in catchments area of the health facility
Insured number of families living in catchments area of the health facility
Number of claims (contacts) with the health facility by insured in the catchment area
Adjusted amount
asset (line) per product with the detail of the calculation as asset description
bill:
field | type | comment |
subject_type | json | batch_run |
subject_id | json | run_id |
thirdparty_type | str | HF |
thirdparty_id | id/uuid | HFID |
code | str | CP-PaymentPlan_code-HFID-YYYYMM |
date_due | date | batch run date +30 days |
date_invoice | date | batch run date |
*dateValidFrom | date | validFrom: first day of batch run |
*dateValidTo | date | validTo: last first day of batch run |
amount_discount | float | N/A |
amount_net | float | Total without tax |
tax_analysis | json | N/A |
amount_total | float | total net |
status | int | validated |
currency_rcp_code | str | default-curency |
currency_code | str | default-curency-code |
note | bigttext |
|
terms | bigttext | Product: Product Name |
billItem
field | type | comment |
HistoryBusinessModel fields |
| validFrom: first day of batch validTo:last day of bacth |
line_id | b | batchPayment_id (renaming ) |
line_type |
| batchPayment |
code | str | Paymentplan-Code |
description | str | Capitation payment |
details | json | capitation payment details |
ledger_account | int | N/A |
quantity | float | 1 |
unit_price | type | total to be paid |
deduction | float | n/a |
discount | float | n/a |
tax_rate | Calculation uuid | N/A |
tax_analysis | json |
|
amount_total | float | net |
amount_net | float | total |
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/