Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This page documents 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:

  1. Create a database structure to save the account payable

  2. Save the different account payable

  3. Convert the different account payable following that structure

  4. 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.

outInvoice

field

type

comment

source

json

referenceActor {
  "label":"",
  "code":"",
  "type": "batchRun/commissionOverview/capitationReport",
  "id":"UUID",
  "address":{"text":"",...}
}

 third_party

json 

referenceSource {
  "label":"",
  "code":"",
  "type": "HF/Insuree/PH/payer/user",
  "id":"UUID",
  "address":{"text":"",...}
}

 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

 date_due

 date 

date on which the payment is due

 date_invoice

 date 

Date of the “invoice“

 date_from

 date 

invoice covering service/item from

 date_to

 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 

tax details {

 “lines”: 

[

    {“label“:””, “rate“:””, “base“:””, “amount”:””}]

…

],

“total”:””

}

 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

outInvoiceDetails 

field

type

comment

 code

 str 

reference

invoiceId

UUID

reference to the outInvoice

 description

 str 

 details

 json 

depend of the type, TBD

 ledger_account

 int 

from config

 quantity

 float 

 unit_price

 type 

 discount

 float 

to document difference between the std price and the price to be paid, usefull for relative pricing

 tax_rate

 Calculation uuid 

Calculation to calculate the tax

 tax_analysis

json

tax details {

“lines”:

[

{“label“:””, “rate“:””, “base“:””, “amount”:””}]

],

“total”:””

}

amount_total

float

net +tax

amount_net

qty * unitprice - discount

Save the different account payable

  1. Claim valuation (batchRun):https://openimis.atlassian.net/browse/OTC-10

  2. Capitation payment: https://openimis.atlassian.net/browse/OTC-10

  3. Commission payment

  4. payment fees

  5. Fee-for-service

Convert the different account payable following the new structure

  1. Claim valuation (batchRun):​

  2. Capitation payment: ​

  3. Commission payment

  4. 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“]

  • No labels