Hi all,
I’ve been looking into working on FM2-476 which about adding support of searching MedicationRequests
based on status.
The OpenMRS data model has limited support for statuses in comparison with FHIR:
RECEIVED, IN_PROGRESS, EXCEPTION, COMPLETED
Plus “maybe” UNKNOWN
which is just implied at the translation layer.
FHIR on the other hand supports:
ACTIVE,
ONHOLD,
CANCELLED,
COMPLETED,
ENTERED_IN_ERROR,
STOPPED,
DRAFT,
UNKNOWN,
I’ve also peeked on FM2-480 which I suppose is about expanding the OMRS data model to support for the rest of the supported statuses by FHIR. Now considering our project goals for an MVP, we just need to support “Active”, “Complete”, “Cancelled” & “Returned” which can be achieved with the current data model except for “Returned” which isn’t a primitive status. That being said, for the MVP we are able work with the current data model in regards to MedicationRequest
statuses. (Incase of any objections, kindly share)
Evaluation for "complete" status
I assumed that it’s simple as listing all orders within an encounter that have status with value “COMPLETE”. Quoting @mseaton from: [O3-1213] - OpenMRS Issues
For this ticket, the dispensing app should indicate that a particular Order is COMPLETED if all associated Orders have a status of “COMPLETED”. This should be written in such a way to support easily changing this business logic across the entire dispensing app, and for easily adding business logic around other statuses as need, supporting notions like “PARTIALLY COMPLETED” in the future, etc.
By associated orders you meant the Order.previousOrder
tree? Or there is more to that including the Order.orderGroup
?
OMRS status | Can be Mapped to FHIR as |
---|---|
COMPLETED | COMPLETED |
IN_PROGRESS | Which FHIR status can we map this to? |
RECEIVED | Which FHIR status can we map this to? What does it even mean? |
EXCEPTION | Not sure of the original usecase but maybe it’s close to ENTERED_IN_ERROR? |
Calculated statuses
-
ACTIVE
In OpenMRS, the active status is evaluated on the fly basing on a couple of variables -
CANCELLED
This status is based on whether the underlying Order was discontinued or not -
UNKNOWN
The system doesn’t know which of the status values currently applies for this order
Any objections or comments on the above?