Versions Compared

Key

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

...

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

BatchRUn → Prodcut

if HF → location

if location → ProductS

if claim → claim product (MAX Product id from item and services)

if product → paymentPlans

if paymentPlan → check if UUID = this.UUID

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

get all valuated “processed“ claims that should be evaluated with fee for service that matches args create a bill through the converters(should replace the batch run)

if instance.__class__ == Claim

fee-for-service evaluation

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

...

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

convert(from, to, obj_from, **argv)

to convert a “from” object (obj_from) to a to object

from = ‘HF' + claim queryset

to = 'bill'

obj_from HF

argv, claimlist queryset(claim) / claim

Batch run tacken from the first claim

convert_batch(from, to, **agrv)

argv : product/Paymentplan and dateStart, dateEnd, location or HF (optionnal, will take location from Product)

Create queryset to retrieve the claims per HF/Product

convert the queryset

Save the invoice in database

Converter

[to be updated]

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

    1. (Chosen)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

...