本文整理了Java中org.openmrs.Obs.getVoidReason()
方法的一些代码示例,展示了Obs.getVoidReason()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Obs.getVoidReason()
方法的具体详情如下:
包路径:org.openmrs.Obs
类名称:Obs
方法名:getVoidReason
暂无
代码示例来源:origin: openmrs/openmrs-core
if (voidReason.equals(o.getVoidReason())) {
os.unvoidObs(o);
代码示例来源:origin: openmrs/openmrs-core
/**
* @see ObsService#saveObs(Obs,String)
*/
@Test
public void saveObs_shouldSetVoidReasonMessageToChangeMessage() {
// Set changeMessage arg to saveObs() method - should equal void reason on new Obs
String changeMessage = "Testing TRUNK-3701";
int obsId = 7;
ObsService obsService = Context.getObsService();
Obs obs = obsService.getObs(obsId);
// change something on the obs and save it again
obs.setComment("Comment to make sure obs changes");
obsService.saveObs(obs, changeMessage);
obs = obsService.getObs(obsId); //refetch original (now voided) obs
// check
assertEquals(changeMessage, obs.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see EncounterService#voidEncounter(Encounter,String)
*/
@Test
public void voidEncounter_shouldCascadeToObs() {
EncounterService encounterService = Context.getEncounterService();
// get a nonvoided encounter that has some obs
Encounter encounter = encounterService.getEncounter(1);
encounterService.voidEncounter(encounter, "Just Testing");
Obs obs = Context.getObsService().getObs(1);
assertTrue(obs.getVoided());
assertEquals("Just Testing", obs.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-core
/**
* @see EncounterService#unvoidEncounter(Encounter)
*/
@Test
public void unvoidEncounter_shouldCascadeUnvoidToObs() {
EncounterService encounterService = Context.getEncounterService();
// get a voided encounter that has some voided obs
Encounter encounter = encounterService.getEncounter(2);
encounterService.unvoidEncounter(encounter);
Obs obs = Context.getObsService().getObs(4);
assertFalse(obs.getVoided());
assertNull(obs.getVoidReason());
}
代码示例来源:origin: openmrs/openmrs-core
assertNotNull(alreadyVoidedObs.getVoidedBy());
assertNotNull(alreadyVoidedObs.getDateVoided());
assertNotNull(alreadyVoidedObs.getVoidReason());
assertNull(toBeVoidedObs.getVoidReason());
assertNull(unVoidedObsToUpdate.getVoidReason());
assertNull(unVoidedObs.getVoidReason());
assertNotNull(unVoidedObsToUpdate.getVoidedBy());
assertNotNull(unVoidedObsToUpdate.getDateVoided());
assertNotNull(unVoidedObsToUpdate.getVoidReason());
assertNull(unVoidedObs.getVoidedBy());
assertNull(unVoidedObs.getDateVoided());
assertNull(unVoidedObs.getVoidReason());
代码示例来源:origin: openmrs/openmrs-core
assertNull(obs.getDateVoided());
assertNull(obs.getVoidedBy());
assertNull(obs.getVoidReason());
assertNotNull(obs.getDateVoided());
assertNotNull(obs.getVoidedBy());
assertNotNull(obs.getVoidReason());
代码示例来源:origin: openmrs/openmrs-core
newObs.setVoidedBy(obsToCopy.getVoidedBy());
newObs.setDateVoided(obsToCopy.getDateVoided());
newObs.setVoidReason(obsToCopy.getVoidReason());
newObs.setStatus(obsToCopy.getStatus());
newObs.setInterpretation(obsToCopy.getInterpretation());
代码示例来源:origin: openmrs/openmrs-module-htmlformentry
Assert.assertTrue(o.getVoidReason().equals("test void reason"));
内容来源于网络,如有侵权,请联系作者删除!