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

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

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

Obs.setCreator介绍

暂无

代码示例

代码示例来源: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

obsGrouper.setCreator(encounter.getCreator());
      obs.setCreator(getEnterer(orc));
      obs.setDateCreated(new Date());

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

obs.setObsDatetime(datetime);
obs.setLocation(encounter.getLocation());
obs.setCreator(encounter.getCreator());
obs.setDateCreated(encounter.getDateCreated());

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

ob.setValueCodedName(conceptName);
ob.setCreator(Context.getAuthenticatedUser());
ob.setDateCreated(new Date());
ob.setObsDatetime(cp.getEncounter().getEncounterDatetime());

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

o1.setConcept(cs.getConcept(3));
o1.setDateCreated(newDate);
o1.setCreator(Context.getAuthenticatedUser());
o1.setLocation(new Location(1));
o1.setObsDatetime(newDate);

代码示例来源: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.setCreator(creator);
obs.setValueNumeric(50d);
encounter.addObs(obs);

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

o.setConcept(cs.getConcept(3));
o.setDateCreated(new Date());
o.setCreator(Context.getAuthenticatedUser());
o.setLocation(new Location(1));
o.setObsDatetime(new Date());
o2.setConcept(cs.getConcept(3));
o2.setDateCreated(new Date());
o2.setCreator(Context.getAuthenticatedUser());
o2.setLocation(new Location(1));
o2.setObsDatetime(new Date());
oParent.setConcept(cs.getConcept(23)); //in the concept set table as a set
oParent.setDateCreated(new Date());
oParent.setCreator(Context.getAuthenticatedUser());
oParent.setLocation(new Location(1));
oParent.setObsDatetime(new Date());
oGP.setConcept(cs.getConcept(3));
oGP.setDateCreated(new Date());
oGP.setCreator(Context.getAuthenticatedUser());
oGP.setLocation(new Location(1));
oGP.setObsDatetime(new Date());
o3.setConcept(cs.getConcept(3));
o3.setDateCreated(new Date());
o3.setCreator(Context.getAuthenticatedUser());
o3.setLocation(new Location(1));
o3.setObsDatetime(new Date());

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

newObs.setComment(obsToCopy.getComment());
newObs.setEncounter(obsToCopy.getEncounter());
newObs.setCreator(obsToCopy.getCreator());
newObs.setDateCreated(obsToCopy.getDateCreated());
newObs.setVoided(obsToCopy.getVoided());

代码示例来源:origin: org.motechproject/motech-server-core

public Obs done() {
    Obs obs = new Obs();
    obs.setConcept(concept);
    obs.setObsDatetime(observationDate);
    obs.setPerson(person);
    obs.setLocation(location);
    if (encounter != null) {
      obs.setEncounter(encounter);
    }
    if (recordedBy != null) {
      obs.setCreator(recordedBy);
    }
    return type.setValue(obs,value);
  }
}

代码示例来源:origin: org.motechproject/motech-openmrs-api

<T> Obs createOpenMRSObservationForEncounter(MRSObservation<T> mrsObservation, Encounter encounter, Patient patient, Location location, User staff) {
  Obs openMrsObservation = new Obs();
  openMrsObservation.setConcept(openMRSConceptAdapter.getConceptByName(mrsObservation.getConceptName()));
  openMrsObservation.setPerson(patient);
  openMrsObservation.setLocation(location);
  openMrsObservation.setCreator(staff);
  openMrsObservation.setEncounter(encounter);
  openMrsObservation.setObsDatetime(mrsObservation.getDate().toDate());
  if (mrsObservation.getDependantObservations() != null && !mrsObservation.getDependantObservations().isEmpty()) {
    for (MRSObservation observation : mrsObservation.getDependantObservations()) {
      openMrsObservation.addGroupMember(createOpenMRSObservationForEncounter(observation, encounter, patient, location, staff));
    }
  }
  writeValueToOpenMRSObservation(mrsObservation.getValue(), openMrsObservation);
  return openMrsObservation;
}

相关文章