Order Entry API Scenarios
This page is a work in progress and subject to (drastic) change.
PurposeThis page is an attempt to use stories (use cases) to drive our order entry API design. Initial use cases will focus on the more fundamental features of the order service. Subsequent scenarios can expand on desired functionality.
Scenarios
Find Orderable Concepts
Retrieve a list of the things that can be ordered that start with "AMP".
Get the List of Active Medications
Retrieve a list of "active" orders (started, but not yet ended/expired/discontinued) of a specific type (medications).
List<Order> activeOrders = Context.getOrderService().getActiveOrders(myPatient);
or
Date date = // date for 15 June, 2010
List<Order> activeOrdersAsOf15June2010 = Context.getOrderService().getActiveOrdersAtPointInTime(myPatient, date);
Also want to be able to get orders by user, by order number.
Creating a Medication Order With Unstructured Dosing
Order AMPICILLIN 500 MG AS DIRECTED.
Concept drugConcept = conceptService.getConcept("AMPICILLIN");
DrugOrder order1 = new DrugOrder(drugConcept);
order1.setUnstructuredDosing("500 MG AS DIRECTED");
try {
orderEntryService.signAndActivateOrder(patient, drugOrder);
} catch (APIException e) {
// deal with failure
}
Creating a Medication Order With Structured Dosing
In this scenario, we just want to add a (new) medication order to a patient's list of active orders.
When the order is first signed, it gets a new (next available) order number.
Revise an Order
TBD
Discontinue an Order
TBD
Define a Medication Regimen
Define a regimen of two drugs that can be ordered together. For example, ATAZANAVIR 300 MG ONCE DAILY + RITONAVIR 100 MG ONCE DAILY ordered as a single HIV TREATMENT REGIMEN.
Order a Medication Regimen
Order the regimen defined above (HIV TREATMENT REGIMEN) and have the individual drug orders become active orders that are linked through the regimen.