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

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

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

Order.getDateCreated介绍

暂无

代码示例

代码示例来源:origin: openmrs/openmrs-module-webservices.rest

private static Date getActiveOrderSortDate(Order order) {
  return order.getDateActivated() != null ? order.getDateActivated() : order.getDateCreated();
}

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

assertEquals(DateUtil.truncateToSeconds(date), createdOrder.getDateCreated());
assertEquals(creator, createdOrder.getCreator());

代码示例来源: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-module-webservices.rest

private static Date getUsableDate(Order order) {
  return order.getDateStopped() != null ? order.getDateStopped() : (order.getAutoExpireDate() != null ? order
      .getAutoExpireDate() : order.getDateCreated());
}

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

target.setOrderer(getOrderer());
target.setCreator(getCreator());
target.setDateCreated(getDateCreated());
target.dateStopped = getDateStopped();
target.setOrderReason(getOrderReason());

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

protected void enterStandardRegimen(FormEntrySession session, HttpServletRequest submission, String regCode, Date startDate,
    Date discontinuedDate, String discontinuedReasonStr) {
  RegimenSuggestion rs = RegimenUtil.getStandardRegimenByCode(possibleRegimens, regCode);
  //create new drugOrders
  Set<Order> ords = RegimenUtil.standardRegimenToDrugOrders(rs, startDate, session.getPatient());    
  for (Order o: ords){
    if (o.getDateCreated() == null)
      o.setDateCreated(new Date());
    if (o.getCreator() == null)
      o.setCreator(Context.getAuthenticatedUser());
    if (o.getUuid() == null)
      o.setUuid(UUID.randomUUID().toString());
    if (!StringUtils.isEmpty(discontinuedReasonStr))
      o.setDiscontinuedReason(HtmlFormEntryUtil.getConcept(discontinuedReasonStr));
    if (discontinuedDate != null){
      o.setDiscontinuedDate(discontinuedDate);
      o.setDiscontinued(true);
      o.setDiscontinuedBy(Context.getAuthenticatedUser());
    }    
    session.getSubmissionActions().getCurrentEncounter().addOrder(o);
  }
}

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

if (o.getDateCreated() == null)
  o.setDateCreated(new Date());
if (o.getCreator() == null)

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

Set<Order> ords = RegimenUtil1_10.standardRegimenToDrugOrders(rs, startDate, session.getPatient());
for (Order o : ords) {
  if (o.getDateCreated() == null)
    o.setDateCreated(new Date());
  if (o.getCreator() == null)

相关文章