org.openmrs.Order.getVoidReason()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.openmrs.Order.getVoidReason()方法的一些代码示例,展示了Order.getVoidReason()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.getVoidReason()方法的具体详情如下:
包路径:org.openmrs.Order
类名称:Order
方法名:getVoidReason

Order.getVoidReason介绍

暂无

代码示例

代码示例来源:origin: openmrs/openmrs-core

if (voidReason.equals(o.getVoidReason())) {
  orderService.unvoidOrder(o);

代码示例来源:origin: openmrs/openmrs-core

/**
 * @see EncounterService#voidEncounter(Encounter,String)
 */
@Test
public void voidEncounter_shouldCascadeToOrders() {
  EncounterService encounterService = Context.getEncounterService();
  
  // get a nonvoided encounter that has some obs
  Encounter encounter = encounterService.getEncounter(1);
  encounterService.voidEncounter(encounter, "Just Testing");
  
  Order order = Context.getOrderService().getOrder(1);
  assertTrue(order.getVoided());
  assertEquals("Just Testing", order.getVoidReason());
}

代码示例来源:origin: openmrs/openmrs-core

/**
 * @see EncounterService#unvoidEncounter(Encounter)
 */
@Test
public void unvoidEncounter_shouldCascadeUnvoidToOrders() {
  EncounterService encounterService = Context.getEncounterService();
  
  // get a voided encounter that has some voided obs
  Encounter encounter = encounterService.getEncounter(2);
  encounterService.unvoidEncounter(encounter);
  
  Order order = Context.getOrderService().getOrder(2);
  assertFalse(order.getVoided());
  assertNull(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#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 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-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.setVoidedBy(getVoidedBy());
target.setDateVoided(getDateVoided());
target.setVoidReason(getVoidReason());
target.setUrgency(getUrgency());
target.setCommentToFulfiller(getCommentToFulfiller());

代码示例来源:origin: openmrs/openmrs-module-htmlformentry

for (Order o : e.getOrders()) {
  Assert.assertTrue(o.isVoided());
  Assert.assertTrue(o.getVoidReason().equals("test void reason"));

相关文章