Versions Compared

Key

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

version = 1
status = active
UUID = 0a1b6d54-eef4-4ee6-ac47-2a99cfa5e9a8
calculation_rule_name = “payment: fee for service “

type = account_payable

sub_type = third_party_payment

dateValidTo = None

dateValidFrom = 2000-01-01

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 fee for service health financing “

Service

activeForObject(self, instance, context, type, sub_type)
instance.__class__ == PaymentPan and context IN (submit) and self.checkCalculation(instance)

check_calculation

return true (to be updated once real payment plan will be in place)

calculate(cls, instance, *args[date_from, date_to, productid, location])
instance.__class__ == PaymentPlan

get all valuated claims that should be evaluated with fee for service that matches args

create a bill through the converters

billCreationFromCalculation(date_from, date_to, type, sub_type, product_id, location)

Registration on signals from other module(existing or not):

  • billCreationFromCalculation

Only the “valuated“ claims are eligible for bill generation meaning that the batch run might be triggered before in case .

Batchrun will trigger billCreationFromCalculation and will send: when the payment plan would be deliver the batch run page could be replaced by payment plan (this page could call billCreationFromCalculation service on selected payment plans) page and bill page.

  • date_from

  • date_to

  • type

  • if active_for_object(<fakepaymentplan>, 'submit', type, sub_type

    billCreationFromCalculation will have a variable that will tell the signal listener to be activated or not: this will be activated based on type and subtype):

    calculate(cls, <fakepaymentplan>, *args[date_from, date_to, productid, location])

    Converter

    [to be updated]

    1. two way of creating the accountPayable are possible for the valuation, in both case there will be one “accountPayable” per HF

      1. One asset (line) per claim, claim details as asset description: claimed amount as unit price, net amount as net price, discount calculated based on net and unit price

      2. one asset (line) per item or service with claim detail as asset description: item/service claimed unit price as unit price, net as valuated price, quantity as quantity, discount calculated based on net and unit price