本文整理了Java中org.openmrs.Obs.setDateCreated()
方法的一些代码示例,展示了Obs.setDateCreated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Obs.setDateCreated()
方法的具体详情如下:
包路径:org.openmrs.Obs
类名称:Obs
方法名:setDateCreated
暂无
代码示例来源:origin: openmrs/openmrs-core
private void unsetVoidedAndCreationProperties(Obs newObs,Obs obs) {
newObs.setVoided(false);
newObs.setVoidReason(null);
newObs.setDateVoided(null);
newObs.setVoidedBy(null);
newObs.setCreator(null);
newObs.setDateCreated(null);
newObs.setPreviousVersion(obs);
}
代码示例来源:origin: openmrs/openmrs-core
obs.setDateCreated(new Date());
代码示例来源:origin: openmrs/openmrs-core
obs.setLocation(encounter.getLocation());
obs.setCreator(encounter.getCreator());
obs.setDateCreated(encounter.getDateCreated());
代码示例来源:origin: openmrs/openmrs-core
ob.setDateCreated(new Date());
ob.setObsDatetime(cp.getEncounter().getEncounterDatetime());
ob.setLocation(cp.getEncounter().getLocation());
代码示例来源:origin: openmrs/openmrs-core
o.setDateCreated(new Date());
o.setLocation(new Location(1));
o.setObsDatetime(new Date());
oSibling.setDateCreated(new Date());
oSibling.setLocation(new Location(1));
oSibling.setObsDatetime(new Date());
oParent.setDateCreated(new Date());
oParent.setLocation(new Location(1));
oParent.setObsDatetime(new Date());
oGrandparent.setDateCreated(new Date());
oGrandparent.setLocation(new Location(1));
oGrandparent.setObsDatetime(new Date());
o2.setDateCreated(new Date());
o2.setLocation(new Location(1));
o2.setObsDatetime(new Date());
oGGP.setDateCreated(new Date());
oGGP.setLocation(new Location(1));
oGGP.setObsDatetime(new Date());
oGGPleaf.setDateCreated(new Date());
oGGPleaf.setLocation(new Location(1));
oGGPleaf.setObsDatetime(new Date());
代码示例来源:origin: openmrs/openmrs-core
o1.setDateCreated(newDate);
o1.setCreator(Context.getAuthenticatedUser());
o1.setLocation(new Location(1));
代码示例来源:origin: openmrs/openmrs-core
@Test
public void saveEncounter_shouldUpdateExistingEncounterWhenNewObsIsAddedToParentObs() {
executeDataSet(ENC_OBS_HIERARCHY_DATA_XML);
ConceptService cs = Context.getConceptService();
EncounterService es = Context.getEncounterService();
ObsService os = Context.getObsService();
Encounter enc = es.getEncounter(100);
Obs o3 = new Obs();
o3.setConcept(cs.getConcept(3));
o3.setDateCreated(new Date());
o3.setCreator(Context.getAuthenticatedUser());
o3.setLocation(new Location(1));
o3.setObsDatetime(new Date());
o3.setPerson(Context.getPersonService().getPerson(3));
o3.setValueText("third obs value text");
o3.setEncounter(enc);
Obs oParent = os.getObs(100);
oParent.addGroupMember(o3);
es.saveEncounter(enc);
Context.flushSession();
Context.clearSession();
enc = es.getEncounter(100);
Set<Obs> obsAtTopLevelUpdated = enc.getObsAtTopLevel(true);
assertEquals(1,obsAtTopLevelUpdated.size());
assertEquals(3, obsAtTopLevelUpdated.iterator().next().getGroupMembers(true).size());
oParent = os.getObs(100);
assertTrue(oParent.getGroupMembers(true).contains(os.getObs(101)));
assertTrue(oParent.getGroupMembers(true).contains(os.getObs(102)));
assertTrue(oParent.getGroupMembers(true).contains(os.getObs(o3.getObsId())));
}
代码示例来源:origin: openmrs/openmrs-core
obs.setDateCreated(date);
obs.setCreator(creator);
obs.setValueNumeric(50d);
代码示例来源:origin: openmrs/openmrs-core
o.setDateCreated(new Date());
o.setCreator(Context.getAuthenticatedUser());
o.setLocation(new Location(1));
o2.setDateCreated(new Date());
o2.setCreator(Context.getAuthenticatedUser());
o2.setLocation(new Location(1));
oParent.setDateCreated(new Date());
oParent.setCreator(Context.getAuthenticatedUser());
oParent.setLocation(new Location(1));
oGP.setDateCreated(new Date());
oGP.setCreator(Context.getAuthenticatedUser());
oGP.setLocation(new Location(1));
o3.setDateCreated(new Date());
o3.setCreator(Context.getAuthenticatedUser());
o3.setLocation(new Location(1));
oGGP.setDateCreated(new Date());
oGGP.setCreator(Context.getAuthenticatedUser());
oGGP.setLocation(new Location(1));
oGGGP.setDateCreated(new Date());
oGGGP.setCreator(Context.getAuthenticatedUser());
oGGGP.setLocation(new Location(1));
oVoidTest.setConcept(cs.getConcept(1));
代码示例来源:origin: openmrs/openmrs-core
newObs.setEncounter(obsToCopy.getEncounter());
newObs.setCreator(obsToCopy.getCreator());
newObs.setDateCreated(obsToCopy.getDateCreated());
newObs.setVoided(obsToCopy.getVoided());
newObs.setVoidedBy(obsToCopy.getVoidedBy());
代码示例来源:origin: openmrs/openmrs-module-htmlformentry
/**
*
* Utility to give us a ready-to-save (without violating foreign-key constraints) Obs
*
* @param encounter
* @param conceptId
* @param value
* @param date
* @return
*/
public static Obs createObs(Encounter encounter, Integer conceptId, Object value, Date date){
Obs obs = new Obs(encounter.getPatient(), Context.getConceptService().getConcept(conceptId), date, encounter.getLocation());
if (value != null) {
if (value instanceof Number)
obs.setValueNumeric(((Number) value).doubleValue());
else if (value instanceof String)
obs.setValueText((String) value);
else if (value instanceof Date)
obs.setValueDatetime((Date) value);
else if (value instanceof Concept)
obs.setValueCoded((Concept) value);
}
obs.setDateCreated(new Date());
return obs;
}
内容来源于网络,如有侵权,请联系作者删除!