本文整理汇总了Java中org.oscarehr.common.model.Measurement.getType方法的典型用法代码示例。如果您正苦于以下问题:Java Measurement.getType方法的具体用法?Java Measurement.getType怎么用?Java Measurement.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscarehr.common.model.Measurement
的用法示例。
在下文中一共展示了Measurement.getType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMeasurements
import org.oscarehr.common.model.Measurement; //导入方法依赖的package包/类
private static void createMeasurements(int demographicNo) {
List<Measurement> measurements = MeasurementUtil.getMeasurements(demographicNo);
VitalSignsSection vitalSignsSection = phrExtractDocument.getVitalSignsSection();
for (Measurement measurement : measurements) {
String displayName = measurement.getType();
Code result;
double value;
String unit;
Calendar dateObserved = Calendar.getInstance();
dateObserved.setTime(measurement.getDateObserved());
if (displayName.equals("WT")) {
result = new Code("3141-9", "2.16.840.1.113883.6.1", "BODY WEIGHT (MEASURED)", "LOINC");
value = Double.parseDouble(measurement.getDataField());
unit = MeasurementUtil.getMeasurementUnits(measurement);
} else if (displayName.equals("HT")) {
result = new Code("8302-2", "2.16.840.1.113883.6.1", "BODY HEIGHT (MEASURED)", "LOINC");
value = Double.parseDouble(measurement.getDataField());
unit = MeasurementUtil.getMeasurementUnits(measurement);
} else if (displayName.equals("BP")) {
String[] bpSplit = measurement.getDataField().split("/");
result = new Code("8480-6", "2.16.840.1.113883.6.1", "INTRAVASCULAR SYSTOLIC", "LOINC");
value = Double.parseDouble(bpSplit[0]);
unit = "mmHg";
vitalSignsSection.addVitalSign(new Time(dateObserved)).setResultObservation(result, value, unit);
result = new Code("8462-4", "2.16.840.1.113883.6.1", "INTRAVASCULAR DIASTOLIC", "LOINC");
value = Double.parseDouble(bpSplit[1]);
vitalSignsSection.addVitalSign(new Time(dateObserved)).setResultObservation(result, value, unit);
continue;
} else {
continue;
}
vitalSignsSection.addVitalSign(new Time(dateObserved)).setResultObservation(result, value, unit);
}
}
示例2: codeFromMeasurement
import org.oscarehr.common.model.Measurement; //导入方法依赖的package包/类
public static Code codeFromMeasurement(Measurement measurement) {
String displayName = measurement.getType();
Code result;
if (displayName.equals("WT")) {
result = new Code("3141-9", "2.16.840.1.113883.6.1", "BODY WEIGHT (MEASURED)", "LOINC");
} else if (displayName.equals("HT")) {
result = new Code("8302-2", "2.16.840.1.113883.6.1", "BODY HEIGHT (MEASURED)", "LOINC");
} else {
result = Code.unavailable(NullFlavor.Other, displayName);
}
return result;
}
示例3: getMeasurementUnits
import org.oscarehr.common.model.Measurement; //导入方法依赖的package包/类
public static String getMeasurementUnits(Measurement measurement) {
String displayName = measurement.getType();
if (displayName.equals("WT")) {
return "kg";
} else if (displayName.equals("HT")) {
return "cm";
}
return "units";
}
示例4: isMeasurementVitalSign
import org.oscarehr.common.model.Measurement; //导入方法依赖的package包/类
public static boolean isMeasurementVitalSign(Measurement measurement) {
String displayName = measurement.getType();
if (displayName.equals("WT") || displayName.equals("HT")) {
return true;
} else {
return false;
}
}
示例5: init
import org.oscarehr.common.model.Measurement; //导入方法依赖的package包/类
public boolean init(Integer demo, String type) {
MeasurementTypes mt = MeasurementTypes.getInstance();
EctMeasurementTypesBean mBean = mt.getByType(type);
if ( mBean != null){
ValidationsDao dao = SpringUtils.getBean(ValidationsDao.class);
ProviderDao providerDao = SpringUtils.getBean(ProviderDao.class);
Provider provider = null;
for(Object[] o : dao.findValidationsBy(demo, type, ConversionUtils.fromIntString(mBean.getValidation()))) {
Validations v = (Validations) o[0];
Measurement m = (Measurement) o[1];
provider = providerDao.getProvider(m.getProviderNo());
String canPlot = null;
String firstName = null;
String lastName = null;
boolean isNumeric = v.isNumeric() != null && v.isNumeric();
if (isNumeric || v.getName().equalsIgnoreCase("Blood Pressure"))
canPlot = "true";
else
canPlot = null;
if( provider != null ) {
firstName = provider.getFirstName();
lastName = provider.getLastName();
}
if (firstName == null && lastName == null){
firstName = "Automatic";
lastName = "";
}
//log.debug("canPlot value: " + canPlot);
EctMeasurementsDataBean data = new EctMeasurementsDataBean(
m.getId().intValue(),
m.getType(),
mBean.getTypeDisplayName(),
mBean.getTypeDesc(),
"" + m.getDemographicId(),
firstName, lastName,
m.getDataField(),
m.getMeasuringInstruction(),
m.getComments(),
ConversionUtils.toDateString(m.getDateObserved()),
ConversionUtils.toDateString(m.getCreateDate()),
canPlot,
m.getDateObserved(),
m.getCreateDate());
measurementsDataVector.add(data);
}
}
return true;
}