...
field | type | comment | |||||
HistoryBusinessModel fields | |||||||
subject | json |
| |||||
recipient | json |
| |||||
id | UUID | code | str | or reference for the insurance | |||
code_rcp | str | or reference for the recipient | |||||
code_ext | str | if required for external system integration such as payment systems | |||||
date_due | date | date on which the payment is due | |||||
date_invoice | date | Date of the “invoice“ | |||||
date_from *dateValidFrom | date | invoice covering service/item from | |||||
date_to *dateValidTo | date | invoice covering service/item to | |||||
date_payed | date | Date on which the payment was actually documented as Done | |||||
amount_discount | float | total of the detail discount | |||||
amount_net | float | Total without tax | |||||
tax_analysis | json |
| |||||
amount_total | float | total net + tax total | |||||
status | int | ENUM: draft, validated, payed, cancelled, deleted | |||||
currency_rcp_code | str | currency of the recipient (if different) | |||||
currency_code | str | currency of insurance | |||||
note | bigttext | ||||||
terms | bigttext | conditions |
...
field | type | comment | |||||
code | str | reference | |||||
HistoryModel HistoryBusinessModel fields | |||||||
inboundInvoiceIdinvoiceId | UUID | reference to invoice | |||||
description | str | ||||||
details | json | depend of the type, TBD | |||||
ledger_account | int | from configspecific payment module | |||||
quantity | float | ||||||
unit_price | type | ||||||
discount | float | to document difference between the std price and the price to be paid, useful for relative pricing | |||||
tax_rate | Calculation uuid | Calculation to calculate the tax | |||||
tax_analysis | json |
| |||||
amount_total | float | net +tax | |||||
amount_net | qty * unitprice - discount |
...
InvoicePayments
To document the payment done on the invoice. out of scope: a payment done for 2 invoice, to support such scenario an “generalPayment“ table need to be created, this table will have sub table with relationships to inboundInvoicePaymentsinvoicePayments, once the reconciliation between the different invoice will be done.
...
field | type | comment |
HistoryModel fields |
| |
invoiceId | UUID | reference to invoice |
type | int | (Message / Status / Warning / Payment / Payment error) module configuation |
data | json | Payload linked to type (TODO) |
[Nice to have]
...
invoicedocuments
field | type | comment |
HistoryModel fields |
| |
invoiceId | UUID | reference to invoice |
type | int | (invoice, receipt, other)Module configuration |
pathType | int | local/Hyperlink/other (sdb, s3, nfs… ) |
path | json | Payload linked to type (TODO) |
...
Integration:
Services
invoicePaymentRefRecieved
invoicePaymentRejected
invoicePaymentRecieved
invoicePaymentRefunded
invoiceCreate (called on save)
invoiceUpdate (called on save)
invoiceDelete
invoiceItemCreate
invoiceItemUpdate
invoiceItemDelete
invoiceAmend
invoiceValidateItems
invoiceMatchItems
Payment specific module(s)
Contribution:
the grouping will be done per Head of family, therefore such invoice will have only 1 detail.
Registration on signals from other module(existing or not):
contributionCreated
Converters:
Contract:
the invoice of a contract will match the contract value and details.
Registration on signals from other module(existing or not)
contractApproved
Converters:
[out of scope]Claim Co-paiment:
Registration on signals from other module(existing or not)
claimSubmitted
Converters:
TBC - (Product payment module)Funding:
Manually filled invoice for a payer, the details of the pool/product to be funded will be in the details
Converters: Convert the different account receivable following the new structure
Contribution:
Contract:
...
new signals are use to trigger action in another module:
[one signal per service]
invoiceValidated (all invoiceItemMatched and invoiceItemAmountValidated)
invoiceFullyPaid
invoicePaymentRefRequested
Create a FHIR interface for the accounting systems (change FHIR_R4 ?)
...
Insurance clerk generates informal sector insurance invoice per head of family for a given time period
Insurance clerk generates formal sector insurance invoice per Policyholder for a given time period
Insurance clerk generates a funding invoice for a product/pool
Insurance clerk display the invoice with details
Insurance clerk add a payment on the invoice
Insurance clerk print the invoice
Insurance clerk delete an invoice (this won’t delete the generating Item)
[should have] access invoice via FHIR invoice resource. (read only)
Front end
The front end will have the same layout as the contract
Search page
search criteria
type for invoice
recipients (NTH: Ideally contribution from the specific payment module based on type)
code
date_invoice
amount_total
status
search result
type for invoice
recipients (NTH: display only the recipient attached )
code
date_invoice
amount_total
status
No add new button , All invoice MUST be generated using specific payment module
card page
general information
...
All schema fields but UUID
if not payed:
Delete button
if payed show no button
tabs
invoiceLines
read only, All invoice MUST be generated using specific payment module
search filters on All schema fields but UUID
colunm to show All schema fields but UUID
invoicePayment
search filters on All schema fields but UUID
Add Payment button near the search (see add contract insuree)
colunm to show All schema fields but UUID
on each line:
delete payment
edit payment (modal popup), all fields but UUID can be modified
invoiceEvent
search filters on All schema fields but UUID
Add Comment button near the search (see add contract insuree) modal popup with a text field
colunm to show All schema fields but UUID
[Nice to have]InvoiceDocument
search filters on All schema fields but UUID
upload document button near the search (see add contract insuree)
add linked document button near the search (see add contract insuree)
colunm to show All schema fields but UUID
Account receivable, using the same structure as account receivable, when associated to the contract might also replace the “contribution/premium“
...