当前位置: 首页>>代码示例>>Java>>正文


Java Measurement.getType方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:39,代码来源:CDADocumentUtil.java

示例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;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:13,代码来源:MeasurementUtil.java

示例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";
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:10,代码来源:MeasurementUtil.java

示例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;
	}
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:9,代码来源:MeasurementUtil.java

示例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;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:56,代码来源:EctMeasurementsDataBeanHandler.java


注:本文中的org.oscarehr.common.model.Measurement.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。