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

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

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

Obs.getDateCreated介绍

暂无

代码示例

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

/**
 * @param dateCreated
 * @see Auditable#setDateCreated(Date)
 */
@Override
public void setDateCreated(Date dateCreated) {
  markAsDirty(getDateCreated(), dateCreated);
  super.setDateCreated(dateCreated);
}

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

/**
 * @see ObsService#saveObs(Obs,String)
 */
@Test
public void saveObs_shouldSetCreatorAndDateCreatedOnNewObs() {
  Obs o = new Obs();
  o.setConcept(Context.getConceptService().getConcept(3));
  o.setPerson(new Patient(2));
  o.setEncounter(new Encounter(3));
  o.setObsDatetime(new Date());
  o.setLocation(new Location(1));
  o.setValueNumeric(50d);
  
  Context.getObsService().saveObs(o, null);
  assertNotNull(o.getDateCreated());
  assertNotNull(o.getCreator());
}

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

assertEquals(DateUtil.truncateToSeconds(date), createdObs.getDateCreated());
assertEquals(creator, createdObs.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-core

newObs.setEncounter(obsToCopy.getEncounter());
newObs.setCreator(obsToCopy.getCreator());
newObs.setDateCreated(obsToCopy.getDateCreated());
newObs.setVoided(obsToCopy.getVoided());
newObs.setVoidedBy(obsToCopy.getVoidedBy());

相关文章