public class OrderUtil extends Object
Constructor and Description |
---|
OrderUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
discontinueAllOrders(Patient patient,
Concept discontinueReason,
Date discontinueDate)
Discontinues all current orders for the given
patient |
static void |
discontinueDrugSet(Patient patient,
String drugSetId,
Concept discontinueReason,
Date discontinueDate)
Discontinue orders for the given patient with the given drug sets ...
|
static Map<String,String> |
getDrugSetHeadersByDrugSetIdList(String drugSetIds)
Associates the concept id of a drug set to a name of the drug set in the current locale
|
static Map<Concept,List<DrugOrder>> |
getDrugSetsByConcepts(List<DrugOrder> drugOrders,
List<Concept> drugSets)
Splits the drug orders into sublists based on which drug set the order's drug belongs to
|
static Map<String,List<DrugOrder>> |
getDrugSetsByDrugSetIdList(List<DrugOrder> orderList,
String drugSetIdList,
String delimiter)
Gets a map of DrugOrders that belong to a DrugSet concept ID
|
static void |
voidDrugSet(Patient patient,
String drugSetId,
String voidReason,
OrderService.ORDER_STATUS status)
Void all DrugOrders for drugs whose concepts are in the given set, and that have the given
status.
|
public static void discontinueAllOrders(Patient patient, Concept discontinueReason, Date discontinueDate)
patient
patient
- discontinueReason
- discontinueDate
- OrderService.discontinueOrder(org.openmrs.Order, Concept, Date)
public static void voidDrugSet(Patient patient, String drugSetId, String voidReason, OrderService.ORDER_STATUS status)
patient
- drugSetId
- voidReason
- status
- public static void discontinueDrugSet(Patient patient, String drugSetId, Concept discontinueReason, Date discontinueDate)
patient
- drugSetId
- discontinueReason
- discontinueDate
- public static Map<String,String> getDrugSetHeadersByDrugSetIdList(String drugSetIds)
drugSetIds
- a comma separated list with the concept id of the drug setsMap
of the drug headers for the given drugSetIdspublic static Map<String,List<DrugOrder>> getDrugSetsByDrugSetIdList(List<DrugOrder> orderList, String drugSetIdList, String delimiter)
orderList
- the Drug Order listdrugSetIdList
- a 'delimiter' separated list of drug setsdelimiter
- the delimiter of drug sets (defaults to a comma if set to null)public static Map<Concept,List<DrugOrder>> getDrugSetsByConcepts(List<DrugOrder> drugOrders, List<Concept> drugSets) throws APIException
drugOrders
- List of drugOrdersdrugSets
- List of drugSets conceptAPIException
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.