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


Java Measurement.getDateObserved方法代码示例

本文整理汇总了Java中org.oscarehr.common.model.Measurement.getDateObserved方法的典型用法代码示例。如果您正苦于以下问题:Java Measurement.getDateObserved方法的具体用法?Java Measurement.getDateObserved怎么用?Java Measurement.getDateObserved使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.oscarehr.common.model.Measurement的用法示例。


在下文中一共展示了Measurement.getDateObserved方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLabWorkInDateRange

import org.oscarehr.common.model.Measurement; //导入方法依赖的package包/类
public List getLabWorkInDateRange( String patientId, String startDate, String endDate, String visitDate) 
{
 List<Hsfo2Visit> pList = new ArrayList<Hsfo2Visit>();
 Hsfo2Visit visitData = new Hsfo2Visit();
 //Retrieve results and store into registrationData object
    Date obrDate = new Date();
    int count = 0;
 List<Measurement> measurements = measurementDao.findByDemographicIdObservedDate(Integer.valueOf(patientId), oscar.util.DateUtils.toDate(startDate), oscar.util.DateUtils.toDate(endDate));
 for(Measurement m : measurements) {
 if(m.getDateObserved().before(oscar.util.DateUtils.toDate(visitDate)))
		 continue;
 if(count!=0 && !m.getDateObserved().equals(obrDate)) {
	 pList.add(visitData);
	 //reset and clear data:
	 obrDate = m.getDateObserved();
	 visitData = new Hsfo2Visit();
 }
 setLabWorkField( visitData, m.getType(), m.getDataField(), m.getDateObserved());
 count ++;
 }
 
 return pList;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:24,代码来源:HSFODAO.java

示例2: 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.getDateObserved方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。