Skip to content

Odoo-OpenMRS Flows

Flows Overview

    sequenceDiagram
        participant OpenMRS
        participant Ozone
        participant Odoo
        OpenMRS->>Ozone: Patients
        Ozone->>Odoo: Customers
        OpenMRS->>Ozone: Drug orders
        OpenMRS->>Ozone: Lab test orders
        Ozone->>Odoo: Quotations
        Ozone->>Odoo: Order lines

Flows List

Source Element Target Element
OpenMRS Patient Odoo Customer
OpenMRS Billable item Odoo Quotation
OpenMRS Billable item Odoo Order line

What are the OpenMRS billable items?

The supported billable items are:

  • OpenMRS drug orders
  • OpenMRS lab test orders

Flows Details

1   OpenMRS Patient → Odoo Customer

A patient in OpenMRS is synchronized as a corresponding customer in Odoo.

flowchart LR
    a["OpenMRS patient"]-- 1-to-1 -->b["Odoo customer"]

Options

default option   An OpenMRS patient is synchronised as an Odoo customer when the first billable item is ordered from OpenMRS.

option 1   An OpenMRS patient is always synchronised as an Odoo customer.

2   OpenMRS Billable Items ⭆ Odoo Quotation

As soon as the first billable item is ordered for a patient in OpenMRS a draft quotation is created in Odoo for the Odoo customer corresponding to that patient.

flowchart LR
    a["OpenMRS billable items"]-- many-to-1 -->b["Odoo quotation"]

3   OpenMRS Billable Item → Odoo Quotation Item

Each billable item ordered for an OpenMRS patient is synchronized in Odoo as an order line in the corresponding customer's quotation.

flowchart LR
    a["OpenMRS billable item"]-- 1-to-1 -->b["Odoo order line"]