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

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

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

Order.getScheduledDate介绍

暂无

代码示例

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

/**
 * A convenience method to return start of the schedule for order.
 * 
 * @since 1.10
 * @should return scheduledDate if Urgency is Scheduled
 * @should return dateActivated if Urgency is not Scheduled
 */
public Date getEffectiveStartDate() {
  return this.urgency == Urgency.ON_SCHEDULED_DATE ? this.getScheduledDate() : this.getDateActivated();
}

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

private void validateScheduledDate(Order order, Errors errors) {
  boolean isUrgencyOnScheduledDate = (order.getUrgency() != null && order.getUrgency().equals(
    Order.Urgency.ON_SCHEDULED_DATE));
  if (order.getScheduledDate() != null && !isUrgencyOnScheduledDate) {
    errors.rejectValue("urgency", "Order.error.urgencyNotOnScheduledDate");
  }
  if (isUrgencyOnScheduledDate && order.getScheduledDate() == null) {
    errors.rejectValue("scheduledDate", "Order.error.scheduledDateNullForOnScheduledDateUrgency");
  }
}

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

@Test
public void saveOrderWithScheduledDate_shouldAddANewOrderWithScheduledDateToTheDatabase() {
  Date scheduledDate = new Date();
  Order order = new Order();
  order.setAction(Action.NEW);
  order.setPatient(Context.getPatientService().getPatient(7));
  order.setConcept(Context.getConceptService().getConcept(5497));
  order.setCareSetting(orderService.getCareSetting(1));
  order.setOrderer(orderService.getOrder(1).getOrderer());
  order.setEncounter(encounterService.getEncounter(3));
  order.setDateActivated(new Date());
  order.setScheduledDate(scheduledDate);
  order.setUrgency(Order.Urgency.ON_SCHEDULED_DATE);
  order.setEncounter(encounterService.getEncounter(3));
  order.setOrderType(orderService.getOrderType(17));
  order = orderService.saveOrder(order, null);
  Order newOrder = orderService.getOrder(order.getOrderId());
  assertNotNull(order);
  assertEquals(DateUtil.truncateToSeconds(scheduledDate), order.getScheduledDate());
  assertNotNull(newOrder);
  assertEquals(DateUtil.truncateToSeconds(scheduledDate), newOrder.getScheduledDate());
}

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

target.setPatient(getPatient());
target.setOrderType(getOrderType());
target.setScheduledDate(getScheduledDate());
target.setInstructions(getInstructions());
target.setUrgency(getUrgency());

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

target.setChangedBy(getChangedBy());
target.setDateChanged(getDateChanged());
target.setScheduledDate(getScheduledDate());
target.setOrderGroup(getOrderGroup());
target.setSortWeight(getSortWeight());

相关文章