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

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

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

Obs.setValueCodedName介绍

[英]Sets the specific name used for the coded value.
[中]设置用于编码值的特定名称。

代码示例

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

obsExit.setValueCodedName(cause.getName()); // ABKTODO: presume current locale?
obsExit.setObsDatetime(exitDate);
Context.getObsService().saveObs(obsExit, "updated by PatientService.saveReasonForExit");

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

log.debug("Current cause is not null, setting to value_coded");
obsDeath.setValueCoded(currCause);
obsDeath.setValueCodedName(currCause.getName()); // ABKTODO: presume current locale?

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

log.debug("    value concept-name = " + valueConceptName.getName());
      obs.setValueCodedName(valueConceptName);
try {
  obs.setValueCoded(getConcept(value, uid));
  obs.setValueCodedName(getConceptName(value));

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

ob.setValueCoded(cp.getMappedConcept());
if (cp.getState().equals(OpenmrsConstants.CONCEPT_PROPOSAL_SYNONYM)) {
  ob.setValueCodedName(conceptName);

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

o.setLocation(new Location(1));
ConceptName cn1 = new ConceptName(1847);
o.setValueCodedName(cn1);
os.saveObs(o, null);
o2.setLocation(new Location(1));
ConceptName cn2 = new ConceptName(2453);
o2.setValueCodedName(cn2);
os.saveObs(o2, null);

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

o.setLocation(new Location(1));
ConceptName cn1 = new ConceptName(1847);
o.setValueCodedName(cn1);
os.saveObs(o, null);
o2.setLocation(new Location(1));
ConceptName cn2 = new ConceptName(2453);
o2.setValueCodedName(cn2);
o2.setVoided(true);
os.saveObs(o2, null);

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

@Test
public void getValueAsString_shouldReturnLocalizedCodedConcept() throws Exception {
  ConceptDatatype cdt = new ConceptDatatype();
  cdt.setHl7Abbreviation("CWE");
  
  Concept cn = new Concept();
  cn.setDatatype(cdt);
  cn.addName(new ConceptName(VERO, Locale.ITALIAN));
  
  Obs obs = new Obs();
  obs.setValueCoded(cn);
  obs.setConcept(cn);
  obs.setValueCodedName(new ConceptName("True", Locale.US));
  
  Assert.assertEquals(VERO, obs.getValueAsString(Locale.ITALIAN));
}

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

/**
 * @see ConceptService#purgeConcept(Concept)
 */
@Test(expected = ConceptNameInUseException.class)
public void purgeConcept_shouldFailIfAnyOfTheConceptNamesOfTheConceptIsBeingUsedByAnObs() {
  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));
  ConceptName conceptName = new ConceptName(1847);
  o.setValueCodedName(conceptName);
  Context.getObsService().saveObs(o, null);
  //ensure that the association between the conceptName and the obs has been established
  Assert.assertEquals(true, conceptService.hasAnyObservation(conceptName));
  
  Concept concept = conceptService.getConceptByName("cd4 count");
  //make sure the name concept name exists
  Assert.assertNotNull(concept);
  conceptService.purgeConcept(concept);
}

代码示例来源:origin: openmrs/openmrs-module-htmlformentry

obs.setValueCoded(((Drug) value).getConcept());
} else if (value instanceof ConceptName) {
  obs.setValueCodedName((ConceptName) value);
  obs.setValueCoded(obs.getValueCodedName().getConcept());
} else if (value instanceof Concept) {

相关文章