本文整理了Java中org.openmrs.Obs.getValueDatetime()
方法的一些代码示例,展示了Obs.getValueDatetime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Obs.getValueDatetime()
方法的具体详情如下:
包路径:org.openmrs.Obs
类名称:Obs
方法名:getValueDatetime
暂无
代码示例来源:origin: openmrs/openmrs-core
return (getValueDatetime() == null ? "" : dateFormat.format(getValueDatetime()));
} else if ("TM".equals(abbrev)) {
return (getValueDatetime() == null ? "" : Format.format(getValueDatetime(), locale, FORMAT_TYPE.TIME));
} else if ("TS".equals(abbrev)) {
return (getValueDatetime() == null ? "" : Format.format(getValueDatetime(), locale, FORMAT_TYPE.TIMESTAMP));
} else if ("ST".equals(abbrev)) {
return getValueText();
} else if (getValueDatetime() != null) {
return Format.format(getValueDatetime(), locale, FORMAT_TYPE.DATE);
} else if (getValueText() != null) {
return getValueText();
代码示例来源:origin: openmrs/openmrs-core
cal.setTime(firstObs.getValueDatetime());
Date firstObsValueDatetime = cal.getTime();
assertEquals("The date should be the 29th", returnVisitDate.toString(), firstObsValueDatetime.toString());
代码示例来源:origin: openmrs/openmrs-core
Obs firstObs = (Obs) returnVisitDateObsForPatient2.toArray()[0];
cal.setTime(firstObs.getValueDatetime());
cal.clear(Calendar.HOUR);
cal.clear(Calendar.MINUTE);
代码示例来源:origin: openmrs/openmrs-core
this(obs.getObsDatetime(), null, obs.getValueAsBoolean(), obs.getValueCoded(), obs.getValueDatetime(), obs
.getValueNumeric(), obs.getValueText(), obs);
代码示例来源:origin: org.motechproject/motech-server-core
public Date getActivePregnancyDueDate(Integer patientId) {
Obs pregnancy = getActivePregnancy(patientId);
Obs dueDateObs = getActivePregnancyDueDateObs(patientId, pregnancy);
if (dueDateObs != null) {
return dueDateObs.getValueDatetime();
}
return null;
}
代码示例来源:origin: openmrs/openmrs-module-htmlformentry
/**
*
* format the obs value
*
* @param locale
* @param o
* @return
*/
public static String getObsValueAsString(Locale locale, Obs o){
String ret = "";
if (o.getConcept() != null){
String abbrev = o.getConcept().getDatatype().getHl7Abbreviation();
if (abbrev.equals("DT")){
return (o.getValueDatetime() == null ? "" : Context.getDateFormat().format(o.getValueDatetime()));
} else if (abbrev.equals("TS") && o.getValueDatetime() != null){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(o.getValueDatetime());
} else {
ret = o.getValueAsString(locale);
}
}
return ret;
}
代码示例来源:origin: org.motechproject/motech-server-core
public Patient[] dueDatesToWebServicePatients(List<Obs> dueDates) {
List<Patient> wsPatients = new ArrayList<Patient>();
for (Obs dueDate : dueDates) {
Integer patientId = dueDate.getPersonId();
org.openmrs.Patient patient = registrarBean.getPatientById(patientId);
if (patient != null) {
Patient wsPatient = patientToWebService(patient, true);
wsPatient.setEstimateDueDate(dueDate.getValueDatetime());
wsPatients.add(wsPatient);
}
}
return wsPatients.toArray(new Patient[wsPatients.size()]);
}
代码示例来源:origin: openmrs/openmrs-core
if (obs.getValueDatetime() != null) {
errors.rejectValue("valueDatetime", "error.not.null");
&& obs.getValueComplex() == null && obs.getValueDatetime() == null && obs.getValueDrug() == null
&& obs.getValueModifier() == null && obs.getValueNumeric() == null && obs.getValueText() == null
&& obs.getComplexData() == null) {
errors.rejectValue("groupMembers", "Obs.error.inGroupMember");
} else if ((dt.isDateTime() || dt.isDate() || dt.isTime()) && obs.getValueDatetime() == null) {
if (atRootNode) {
errors.rejectValue("valueDatetime", "error.null");
代码示例来源:origin: openmrs/openmrs-core
assertEquals(location, saved.getLocation());
assertEquals(valueGroupId, saved.getValueGroupId());
assertEquals(DateUtil.truncateToSeconds(valueDatetime), saved.getValueDatetime());
assertEquals(valueCoded, saved.getValueCoded());
assertEquals(valueNumeric, saved.getValueNumeric());
代码示例来源:origin: openmrs/openmrs-core
newObs.setValueDrug(obsToCopy.getValueDrug());
newObs.setValueGroupId(obsToCopy.getValueGroupId());
newObs.setValueDatetime(obsToCopy.getValueDatetime());
newObs.setValueNumeric(obsToCopy.getValueNumeric());
newObs.setValueModifier(obsToCopy.getValueModifier());
代码示例来源:origin: openmrs/openmrs-module-htmlformentry
valueWidget.setInitialValue(existingObs.getValueDatetime());
} else if (defaultValue != null && Mode.ENTER.equals(context.getMode())) {
valueWidget.setInitialValue(HtmlFormEntryUtil
代码示例来源:origin: org.motechproject/motech-server-core
for (Obs encounterObs : encounterObsSet) {
if (encounterObs.getConcept().isNamed(obsConceptName)) {
nextANCDate = encounterObs.getValueDatetime();
break;
代码示例来源:origin: openmrs/openmrs-module-webservices.rest
return null;
if (obs.getValueDatetime() != null) {
return ConversionUtil.convert(obs.getValueDatetime(), Date.class);
代码示例来源:origin: org.motechproject/motech-openmrs-api
MRSObservation convertOpenMRSToMRSObservation(Obs obs) {
ConceptDatatype datatype = obs.getConcept().getDatatype();
if (datatype.isAnswerOnly()) {
return createMRSObservation(obs, null);
} else if (datatype.isBoolean()) {
return createMRSObservation(obs, obs.getValueAsBoolean());
} else if (datatype.isDateTime()) {
return createMRSObservation(obs, obs.getValueDatetime());
} else if (datatype.isNumeric()) {
return createMRSObservation(obs, obs.getValueNumeric());
} else if (datatype.isText()) {
return createMRSObservation(obs, obs.getValueText());
} else if (datatype.isCoded()) {
return createMRSObservation(obs, new OpenMRSConcept(new OpenMRSConceptName(obs.getValueCoded().getName().getName())));
} else {
throw new IllegalArgumentException("Invalid value of the createMRSObservation from DB-" + obs);
}
}
代码示例来源:origin: openmrs/openmrs-module-htmlformentry
if (o.getValueCoded() != null || o.getValueComplex() != null || o.getValueDatetime() != null
|| o.getValueDrug() != null || o.getValueNumeric() != null || o.getValueText() != null) {
Assert
内容来源于网络,如有侵权,请联系作者删除!