本文整理了Java中org.openmrs.Order.getOrderGroup()
方法的一些代码示例,展示了Order.getOrderGroup()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.getOrderGroup()
方法的具体详情如下:
包路径:org.openmrs.Order
类名称:Order
方法名:getOrderGroup
暂无
代码示例来源:origin: openmrs/openmrs-core
/**
* Takes in a list of orders and filters out the orders which have orderGroups
*
* @since 1.12
* @return list of orders not having orderGroups
*/
public List<Order> getOrdersWithoutOrderGroups() {
return orders.stream()
.filter(o -> o.getOrderGroup() == null)
.collect(Collectors.toList());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* Takes in a list of orders and pulls out the orderGroups within them
*
* @since 1.12
* @return list of orderGroups
*/
public List<OrderGroup> getOrderGroups() {
Map<String, OrderGroup> orderGroups = new HashMap<>();
for (Order order : orders) {
if (order.getOrderGroup() != null) {
orderGroups.computeIfAbsent(order.getOrderGroup().getUuid(), k -> order.getOrderGroup());
order.getOrderGroup().addOrder(order, null);
}
}
return new ArrayList<>(orderGroups.values());
}
代码示例来源:origin: openmrs/openmrs-core
private void validateOrderGroupEncounter(Order order, Errors errors) {
if (order.getOrderGroup() != null && !(order.getEncounter().equals(order.getOrderGroup().getEncounter()))) {
errors.rejectValue("encounter", "Order.error.orderEncounterAndOrderGroupEncounterMismatch");
}
}
代码示例来源:origin: openmrs/openmrs-core
private void validateOrderGroupPatient(Order order, Errors errors) {
if (order.getOrderGroup() != null && !(order.getPatient().equals(order.getOrderGroup().getPatient()))) {
errors.rejectValue("patient", "Order.error.orderPatientAndOrderGroupPatientMismatch");
}
}
}
代码示例来源:origin: openmrs/openmrs-core
@Test
public void addOrder_shouldSetTheOrderGroupOnTheAddedOrder() {
OrderGroup orderGroup = new OrderGroup();
Order firstOrder = new Order();
Order secondOrder = new Order();
orderGroup.addOrder(firstOrder);
orderGroup.addOrder(secondOrder);
List<Order> orders = orderGroup.getOrders();
Assert.assertNotNull("should have orderGroup in order", orders.get(0).getOrderGroup());
Assert.assertNotNull("should have orderGroup in order", orders.get(1).getOrderGroup());
}
}
代码示例来源:origin: openmrs/openmrs-core
Context.getEncounterService().getEncounterByUuid(encounter.getUuid()).getOrders());
assertNotNull("OrderGroup is saved", orders.get(0).getOrderGroup());
assertEquals("OrderGroup isa same for both the orders ", true, orders.get(0).getOrderGroup().equals(
orders.get(1).getOrderGroup()));
代码示例来源:origin: openmrs/openmrs-core
if (order.getOrderGroup() != null) {
orderGroups.put(order.getOrderGroup().getId(), order.getOrderGroup());
代码示例来源:origin: openmrs/openmrs-core
target.setOrderReason(getOrderReason());
target.setOrderReasonNonCoded(getOrderReasonNonCoded());
target.setOrderGroup(getOrderGroup());
target.setSortWeight(getSortWeight());
target.setFulfillerStatus(getFulfillerStatus());
代码示例来源:origin: openmrs/openmrs-core
assertNull("Discontinued order should not have orderGroup", orderThatCanDiscontinueTheOrder.getOrderGroup());
代码示例来源:origin: openmrs/openmrs-core
target.setDateChanged(getDateChanged());
target.setScheduledDate(getScheduledDate());
target.setOrderGroup(getOrderGroup());
target.setSortWeight(getSortWeight());
target.setFulfillerComment(getFulfillerComment());
内容来源于网络,如有侵权,请联系作者删除!