...
- What is the query logic for the table? All non-voided orders with date_activated before or equal to current date, ordered by date activated descending? (In this case would obviously needed to be paginated)
What are all the possible statuses and what do they mean? I could see the following:- See
for current thoughtsJira Legacy server OpenMRS Issues serverId 45c5771b-fa4b-3e43-b34a-c19dc45ccc95 key O3-1214 - Active prescription: order is active (current date is after or equal dateActivated, and current date before dateExpired or dateStopped, and type not DISCONTINUED... see complete logic here: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/Order.java#L447
- Completed: Curious what the business logic would be here. Does this mean that a single, complete dispensing event has occurred? Or that all the refills have been satisfied? Does this take precedence over all other status (ie, if an order is both "expired" and "completed" we display "completed") (We do have a field on Order, fulfiller_status, with values: RECEIVED, IN_PROGRESS, EXCEPTION and COMPLETED, so we could use "completed" for this)
- Returned: I assume this means that it is being returned to the prescriber? We do have a fulfiller_status of "EXCEPTION" (see above), which we can use to reflected
- Expired: Not pictured in the above, but I think needed, and would be any order that fulfills the isExpired logic: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/Order.java#L530
- Discontinued: Not pictured in the above, but I think needed, and would be any order the fulfills the isDiscontinued logic: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/Order.java#L510
- Any other states I missed?
- See
Will need to define how to display the Drug column based on name of underling drug and/or name of underlying concept, and/or drugNonCoded field.- Do we need to support "Change Date View" in phase 1, or just stick to the current date. In general, seems like setting a historical date would likely just be confusing for the user? Is this actually meant to limit to certain date?
Update:
- This is actually a row-per-encounter table, with potentially multiple orders per row.
- Relevant active tickets here:
Jira Legacy server OpenMRS Issues serverId 45c5771b-fa4b-3e43-b34a-c19dc45ccc95 key O3-1214 Jira Legacy server OpenMRS Issues serverId 45c5771b-fa4b-3e43-b34a-c19dc45ccc95 key FM2-480