this page is to document the change that will be performed in the scope of the Tanzanian project to make openIMIS ready for interfacing with an accounting system, this work will be divided in several steps:
Create a database structure to save the account payable
savethe different account payable
convert the different account payable following that structure
create a FHIR interface for the accounting systems
Create a database structure to save the account payable
The concept is to use a widely use format as base, we chose SAGE API Invoices; openIMIS is not an accounting system therefore generating book and ledger is not in the project scope but invoice are a good representation for the payable mentioned above, to bring flexibility, a json fields was added to the invoice line in case a structured details is required.
The link with the Source and actor won’t be in a form a database foreign keys because those could be from different table
https://developer.sage.com/api/accounting/guides/invoicing/
outInvoice
field | type | comment |
third_party | json | referenceActor { “label“:””, “code“:””, “type”: “batchRun/commissionOverview/capitationReport“, “id“:”UUID” } |
source | json | referenceSource { “label“:””, “code“:””, “type”: “HF/Insuree/PH/payer/user“, “id“:”UUID” } |
id | UUID | |
code | str | |
code_rcp | str | |
code_ext | str | |
date_due | date | |
date_invoice | date | |
date_from | type | |
date_to | date | |
date_payed | date | |
amount_discount | float | |
amount_net | float | |
tax_analysis | json | |
amount_total | float | |
status | int | |
currency_rcp_code | str | |
currency_code | str | |
note | bigttext | |
terms | bigttext | |
method(type) | type | |
method(type) | type |
outInvoiceDetails
field | type | comment |
code | str | |
description | str | |
details | json | |
ledger_account | int | |
quantity | float | |
unit_price | type | |
discount | float | |
tax_rate | Calculation uuid | |
tax_analisis | json | |
amount_total | float |
Save the different account payable
Claim valuation (batchRun):https://openimis.atlassian.net/browse/OTC-10
Capitation payment: https://openimis.atlassian.net/browse/OTC-10
Commission payment
payment fees
Convert the different account payable following the new structure
Claim valuation (batchRun):
Capitation payment:
Commission payment
payment fees
Create a FHIR interface for the accounting systems
Here the Fhir ressource to be used:
https://www.hl7.org/fhir/invoice.html
Note : Account receivable, using the same structure as Account payable, when associated to the contract might also replace the “contribution/premium“]