Bill appointments with Odoo integration


CCing @mksd @ruhanga @nuhuhmutebi @achachiez

Based on information I got from @mksd on Slack, right now there’s two “billables” that would end up becoming ERP order lines on Odoo:

  1. Lab tests
  2. Drug order lines

I’d like to know how add another “billable” for appointments. Basically, appointments created in OpenMRS can be billed automatically in Odoo, along with any procedures that took place during that appointment. Example: Patient goes to a dermatologist appointment, and gets a mole removed during the appointment. The patient would then go to the front-desk, and the secretary would ideally be able to see an automatically generated bill for the appointment and the procedure (the mole removal).

How can I do that? Appreciate any responses and support.

FYI you can tag the whole team with the mention @MekomSolutions, maybe easier at this point :wink:

I think you’re not using the right terminology, or I didn’t understand your use case. When you say this:

What you seem to describe here is an encounter (or maybe even a visit), not an appointment, and it is this provider-patient encounter (or visit) that might be billable.

A couple of questions:

  • What happens if the patient never turns up to their booked appointment, do they owe anything on the bill? (This is to understand if the sole appointment itself is billable.)
  • What happens if the patient turns up to their booked appointment, and whilst the encounter is taking place with the provider during the visit, no procedure is actually performed? (This is to understand if encounters (or visits) by themselves are billable, even if “nothing” happens.)
  • If the patient doesn’t turn up to their booked appointment/encounter, it will get canceled and no charge will be generated.
  • Encounters/visits are billable by themselves. If no procedure is performed, then just the encounter should be billed.

Now we need to understand the triggers for line items to appear on the patient bill (outside of the obvious recording of procedures being performed):

  • Is it automatic when the patient turns up and is being registered?
  • Is it automatic when the visit is started? Or ended?
  • Is it a manual step taken by someone from the UI saying “charge a visit fee to this patient”?
  • Is it automatic each time a patient-provider encounter occurs?

Automatic when the visit is started. This brings the question: how/where will I specify the amount to be charged? This will vary by provider.

Any deviation from that default pricing can be handled manually by the secretary on Odoo. Like a free encounter, a differently priced follow-up encounter, etc…

And ideally, the “invoices” (I don’t know what Odoo calls them) would be a draft by default, which would need to be confirmed/committed by the secretary when the patient finishes his encounter and goes to the front desk to pay for the services.

What we want is to save as much time as possible. We expect to have significant patient traffic, and we will be working with short encounters (up to 30min per patient) and automatically generating an invoice could save, say, 5min, which is a considerable amount of time per patient.

What do you mean by provider here? Is it an actual physician or clinician providing care or the institution where healthcare is provided?

That’s already the case. It is a quotation that is created at first by the EMR→ERP sync process. Then that quotation document keeps being filled up until it is transitioned to become a sales order, at which point the sync process doesn’t touch it anymore. At that point any additional billables would end up on a new quotation, etc etc.

Sorry, the terms can be a little confusing.

I mean that the price of an encounter will vary by physician.

You need to provide more information about your use case in order for us to keep brainstorming as to where/how exactly to implement it in Ozone.

There are many ways to address situations like this. If this is very dynamic and that there are many providers with many different prices (worst case, each provider has their own price grid), then this is most likely better automated in Odoo itself. If this is rather static and that there aren’t many providers, then this could be baked into a piece of the EIP configuration.

In short: tell us more.

1 Like

It’s not very dynamic. Each Physician will have a fixed price to charge per encounter. Any variations like discounts, free follow-up encounters, etc… will be manually handled on Odoo.

Is it a case where each provider needs to have their own price list in Odoo?

I’m not sure what you mean with the provider. If you mean physician, then no, other than the encounter price, nothing else will vary based on the physician.

You mean that for example Dr. Smith charges $50 for a general consultation and Dr. Doe charges $55 for a general consultation, etc etc?

Yes, that’s pretty much it.

The Odoo routes will have to be modified so that encounters of certain types end up as items on the quotation when they are saved in OpenMRS. That’s fairly trivial, but requires some dev work.

Then there is some Odoo logic that will need to be implemented in the routes. That’s to apply a certain price list when the encounter’s provider is Dr. Smith or another when the encounter’s provider is Dr. Doe, etc etc. This requires some dev work and Odoo implementation skills.

Are you in a position to take up that kind of work?

1 Like

Sure. I’m not very familiar with Java/Python, but pointing me in the right direction should be enough. I’ve been reading a little bit about Camel.

Will that work for billing procedures as well?

The procedures are already handled as it is. @nuhuhmutebi could you describe the business flow of billing of procedures, and of the required configurations?

My opinion is that middleware development isn’t entry material, but if you’re an experienced developer in other frameworks/languages then it would be ok. Good programming is more about patterns than details about a specific tech. The latter does matter but in this case the whole EIP framework is in place already.

1 Like

@hmouhtar before I create an EIP ticket, could you confirm the following part of your use case:

  • Is it patient visits that are billable?
  • Is it patient-provider encounters that are billable?

A post was split to a new topic: What’s the difference between a visit and an encounter?

Alright, having read about the difference between visits and encounters, what we are looking to bill for are individual patient-provider encounters.

I created this ticket on your behalf and have tentatively assigned you to it:

  • EIP-122: Encounters to be line items on Odoo quotations

@ruhanga could you kindly fill the dev notes section as a way to give pointers to the assignee?

1 Like