本文整理了Java中org.openmrs.Order.getDateVoided()
方法的一些代码示例,展示了Order.getDateVoided()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.getDateVoided()
方法的具体详情如下:
包路径:org.openmrs.Order
类名称:Order
方法名:getDateVoided
暂无
代码示例来源:origin: openmrs/openmrs-core
if (CollectionUtils.isNotEmpty(orders)) {
for (Order order : orders) {
if (order.getVoided() && order.getDateVoided().equals(origParentVoidedDate)
&& order.getVoidedBy().equals(originalVoidingUser)) {
os.unvoidOrder(order);
代码示例来源:origin: openmrs/openmrs-core
/**
* @see OrderService#voidOrder(org.openmrs.Order, String)
*/
@Test
public void voidOrder_shouldVoidAnOrder() {
Order order = orderService.getOrder(1);
assertFalse(order.getVoided());
assertNull(order.getDateVoided());
assertNull(order.getVoidedBy());
assertNull(order.getVoidReason());
orderService.voidOrder(order, "None");
assertTrue(order.getVoided());
assertNotNull(order.getDateVoided());
assertNotNull(order.getVoidedBy());
assertNotNull(order.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see OrderService#unvoidOrder(org.openmrs.Order)
*/
@Test
public void unvoidOrder_shouldUnvoidAnOrder() {
Order order = orderService.getOrder(8);
assertTrue(order.getVoided());
assertNotNull(order.getDateVoided());
assertNotNull(order.getVoidedBy());
assertNotNull(order.getVoidReason());
orderService.unvoidOrder(order);
assertFalse(order.getVoided());
assertNull(order.getDateVoided());
assertNull(order.getVoidedBy());
assertNull(order.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see OrderService#unvoidOrder(org.openmrs.Order)
*/
@Test
public void shouldUnvoidAnOrderAndFlushSuccessfully() {
Order order = orderService.getOrder(8);
assertTrue(order.getVoided());
assertNotNull(order.getDateVoided());
assertNotNull(order.getVoidedBy());
assertNotNull(order.getVoidReason());
orderService.unvoidOrder(order);
Context.flushSession();
assertFalse(order.getVoided());
assertNull(order.getDateVoided());
assertNull(order.getVoidedBy());
assertNull(order.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see OrderService#voidOrder(org.openmrs.Order, String)
*/
@Test
public void shouldVoidAnOrderAndFlushSuccessfully() {
Order order = orderService.getOrder(1);
assertFalse(order.getVoided());
assertNull(order.getDateVoided());
assertNull(order.getVoidedBy());
assertNull(order.getVoidReason());
orderService.voidOrder(order, "None");
//forces hibernate interceptors to get invoked
Context.flushSession();
assertTrue(order.getVoided());
assertNotNull(order.getDateVoided());
assertNotNull(order.getVoidedBy());
assertNotNull(order.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-module-htmlformentry
/**
* Calculates the date an encounter was last modified by checking the creation and voided times
* of all Obs and Orders associated with the Encounter
*
* @param encounter
* @return last modified time, as a Long
*/
public static long getEncounterModifiedDate(Encounter encounter) {
long ret = encounter.getDateCreated().getTime();
if (encounter.getDateVoided() != null)
ret = Math.max(ret, encounter.getDateVoided().getTime());
for (Obs o : encounter.getAllObs(true)) {
ret = Math.max(ret, o.getDateCreated().getTime());
if (o.getDateVoided() != null)
ret = Math.max(ret, o.getDateVoided().getTime());
}
for (Order o : encounter.getOrders()) {
ret = Math.max(ret, o.getDateCreated().getTime());
if (o.getDateVoided() != null)
ret = Math.max(ret, o.getDateVoided().getTime());
}
return ret;
}
代码示例来源:origin: openmrs/openmrs-core
assertNull(order.getDateVoided());
assertNull(order.getVoidedBy());
assertNull(order.getVoidReason());
assertNotNull(order.getDateVoided());
assertNotNull(order.getVoidedBy());
assertNotNull(order.getVoidReason());
代码示例来源:origin: openmrs/openmrs-core
assertNotNull(testOrder.getDateVoided());
assertNotNull(testOrder.getVoidedBy());
assertNotNull(testOrder.getVoidReason());
代码示例来源:origin: openmrs/openmrs-core
assertNotNull(order.getDateVoided());
assertNotNull(order.getVoidedBy());
assertNotNull(order.getVoidReason());
assertNull(order.getDateVoided());
assertNull(order.getVoidedBy());
assertNull(order.getVoidReason());
代码示例来源:origin: openmrs/openmrs-core
target.setVoided(getVoided());
target.setVoidedBy(getVoidedBy());
target.setDateVoided(getDateVoided());
target.setVoidReason(getVoidReason());
target.setUrgency(getUrgency());
内容来源于网络,如有侵权,请联系作者删除!