Enhance OpenMRS Orders model to support storing intent

Hello Community,

Summary

We would like to propose a schema change to the orders table by adding an intent column. This column would align with the FHIR ServiceRequest.intent (and MedicationRequest.intent) attribute, allowing to distinguish between a formal order, a proposal, a plan, and other stages of the clinical decision-making process.

Background

Currently, the OpenMRS orders table primarily assumes that every entry is a “directive” to be carried out (effectively intent = order). However, as we move toward deeper FHIR integration and to support more complex clinical workflows—such as resident-to-consultant sign-offs, future orders like planned procedures —the lack of an “intent” field becomes a limitation.

The Proposal

Add a new column intent to the orders table:

  • Column Name: intent

  • Type: VARCHAR(50)

  • Value: Enum (same as RequestIntent Valueset.)

  • Default Value: order (to ensure backward compatibility for all existing orders).

Why is this needed?

  1. Support for “Proposed” Orders: Currently, there is no clean way in our systems for a junior clinician to “propose” an order that requires a signature before it becomes “active.” Another scenario is a physician provides a proposal to conduct a procedure and it goes through planning and then the order becomes active.

  2. FHIR Mapping: To be fully FHIR-compliant, the ServiceRequest and MedicationRequest resources require an intent. Currently, every order by default translates to intent as order.

  3. Complex Workflows: It allows for “Plan” orders (e.g., part of a standard protocol) vs. “Original” orders.

Examples & Use Cases

  • The Proposal (intent: proposal): A physician proposes a procedure to be performed, but it cannot be an order yet. The proposal goes through review / planning to become an order to be acted upon.

  • The Plan (intent: plan): A TB treatment regimen generates a set of “Plan” orders. These aren’t executed yet but exist as a roadmap for the patient’s care.

  • The Directive (intent: order): The current standard workflow where a clinician authorises a medication or test to be performed.

  • The Filler (intent: filler-order): Used in lab integrations where a Lab Information System (LIS) needs to create internal sub-orders to fulfill a clinician’s request.

I look forward to hearing the community’s thoughts on this addition to the OpenMRS Core.

@dkayiwa @ibacher @mseaton @burke @angshuonline @binduak @soorya @sumazmrs @akhilmalhotra @abhinab

This addition makes lots of sense to me. :+1:

1 Like

Created a JIRA ticket: Jira

@dkayiwa @ibacher What are your thoughts about back-porting this to previous versions ? What are the versions should we target ?

We generally try, as much as possible, to avoid back porting new features. But once in a while, we have done this to address real implementers needs. Which exact version would you like to see this backported to?

1 Like

I default to being opposed to backporting data model changes as it adds a fair bit of maintenance burden that I haven’t seen the community pull off well. I especially think that this particular change (which is not just a field, but implies a whole set of functionality around treating intent since orders in “proposal” or “plan” state have different validation rules that orders in “order” state—which is roughly what the system handles today) makes for a bad candidate for backporting.