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

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

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

Obs.setStatus介绍

暂无

代码示例

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

private void updateStatusIfNecessary(Obs newObs, Obs.Status originalStatus) {
  if (Obs.Status.FINAL.equals(originalStatus)) {
    newObs.setStatus(Obs.Status.AMENDED);
  }
}

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

@Test
public void saveObs_shouldLetYouChangeStatusFromPreliminaryToFinalWhenModifyingAnObs() throws Exception {
  Obs existing = obsService.getObs(9);
  existing.setValueNumeric(175.0);
  existing.setStatus(Obs.Status.FINAL);
  Obs newObs = obsService.saveObs(existing, "testing");
  assertThat(newObs.getValueNumeric(), is(175.0));
  assertThat(newObs.getStatus(), is(Obs.Status.FINAL));
}

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

@Test
public void newInstance_shouldCopyMostFields() throws Exception {
  Obs obs = new Obs();
  obs.setStatus(Obs.Status.PRELIMINARY);
  obs.setInterpretation(Obs.Interpretation.LOW);
  obs.setConcept(new Concept());
  obs.setValueNumeric(1.2);
  
  Obs copy = Obs.newInstance(obs);
  
  // these fields are not copied
  assertThat(copy.getObsId(), nullValue());
  assertThat(copy.getUuid(), not(obs.getUuid()));
  
  // other fields are copied
  assertThat(copy.getConcept(), is(obs.getConcept()));
  assertThat(copy.getValueNumeric(), is(obs.getValueNumeric()));
  assertThat(copy.getStatus(), is(obs.getStatus()));
  assertThat(copy.getInterpretation(), is(obs.getInterpretation()));
  // TODO test that the rest of the fields are set
}

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

newObs.setDateVoided(obsToCopy.getDateVoided());
newObs.setVoidReason(obsToCopy.getVoidReason());
newObs.setStatus(obsToCopy.getStatus());
newObs.setInterpretation(obsToCopy.getInterpretation());

相关文章

微信公众号

最新文章

更多