Java 类ims.nursing.vo.LastHeightMetricRecordVo 实例源码

项目:AvoinApotti    文件:MetricImpl.java   
public LastHeightMetricRecordVo getLastRecordedHeight(PatientRefVo patientRef)
{
    if (!patientRef.getID_PatientIsNotNull())
    {
        throw new DomainRuntimeException("Invalid patient provided");
    }
    String hql = "select metr from Metrics as metr left join metr.patient as pat where (pat.id = :patId"+ 
            " and metr.isRIE is null) order by metr.authoringInformation.authoringDateTime desc";
    DomainObject dObj = getDomainFactory().findFirst(hql,new String[]{"patId"},new Object[]{patientRef.getID_Patient()});
    if (dObj instanceof Metrics)
    {
        Metrics x = (Metrics) dObj;
        LastHeightMetricRecordVo result = new LastHeightMetricRecordVo();
        result.setValue(x.getHeightValue());
        result.setMeasured(x.isHeightEstimatedMeasured());
        return result;
    }
    return null;
}
项目:openMAXIMS    文件:MetricImpl.java   
public LastHeightMetricRecordVo getLastRecordedHeight(PatientRefVo patientRef)
{
    if (!patientRef.getID_PatientIsNotNull())
    {
        throw new DomainRuntimeException("Invalid patient provided");
    }
    String hql = "select metr from Metrics as metr left join metr.patient as pat where (pat.id = :patId"+ 
            " and metr.isRIE is null) order by metr.authoringInformation.authoringDateTime desc";
    DomainObject dObj = getDomainFactory().findFirst(hql,new String[]{"patId"},new Object[]{patientRef.getID_Patient()});
    if (dObj instanceof Metrics)
    {
        Metrics x = (Metrics) dObj;
        LastHeightMetricRecordVo result = new LastHeightMetricRecordVo();
        result.setValue(x.getHeightValue());
        result.setMeasured(x.isHeightEstimatedMeasured());
        return result;
    }
    return null;
}
项目:openMAXIMS    文件:MetricImpl.java   
public LastHeightMetricRecordVo getLastRecordedHeight(PatientRefVo patientRef)
{
    if (!patientRef.getID_PatientIsNotNull())
    {
        throw new DomainRuntimeException("Invalid patient provided");
    }
    String hql = "select metr from Metrics as metr left join metr.patient as pat where (pat.id = :patId"+ 
            " and metr.isRIE is null) order by metr.authoringInformation.authoringDateTime desc";
    DomainObject dObj = getDomainFactory().findFirst(hql,new String[]{"patId"},new Object[]{patientRef.getID_Patient()});
    if (dObj instanceof Metrics)
    {
        Metrics x = (Metrics) dObj;
        LastHeightMetricRecordVo result = new LastHeightMetricRecordVo();
        result.setValue(x.getHeightValue());
        result.setMeasured(x.isHeightEstimatedMeasured());
        return result;
    }
    return null;
}
项目:openmaxims-linux    文件:MetricImpl.java   
public LastHeightMetricRecordVo getLastRecordedHeight(PatientRefVo patientRef)
{
    if (!patientRef.getID_PatientIsNotNull())
    {
        throw new DomainRuntimeException("Invalid patient provided");
    }
    String hql = "select metr from Metrics as metr left join metr.patient as pat where (pat.id = :patId"+ 
            " and metr.isRIE is null) order by metr.authoringInformation.authoringDateTime desc";
    DomainObject dObj = getDomainFactory().findFirst(hql,new String[]{"patId"},new Object[]{patientRef.getID_Patient()});
    if (dObj instanceof Metrics)
    {
        Metrics x = (Metrics) dObj;
        LastHeightMetricRecordVo result = new LastHeightMetricRecordVo();
        result.setValue(x.getHeightValue());
        result.setMeasured(x.isHeightEstimatedMeasured());
        return result;
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    form.getLocalContext().setSelectedInstance(null);
    clearInstanceControls();
    form.ccRecording().initializeComponent(true);
    LastHeightMetricRecordVo lastHeight = domain.getLastRecordedHeight(form.getGlobalContext().Core.getPatientShort());
    if (lastHeight != null)
    {
        form.decHeight().setValue(lastHeight.getValue());
        form.GroupH().setValue(lastHeight.getMeasuredIsNotNull()?(lastHeight.getMeasured().booleanValue()?GroupHEnumeration.rdoHM:GroupHEnumeration.rdoHE):GroupHEnumeration.None);
    }
    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    form.getLocalContext().setSelectedInstance(null);
    clearInstanceControls();
    form.ccRecording().initializeComponent(true, null); //WDEV-18846
    LastHeightMetricRecordVo lastHeight = domain.getLastRecordedHeight(form.getGlobalContext().Core.getPatientShort());
    if (lastHeight != null)
    {
        form.decHeight().setValue(lastHeight.getValue());
        form.GroupH().setValue(lastHeight.getMeasuredIsNotNull()?(lastHeight.getMeasured().booleanValue()?GroupHEnumeration.rdoHM:GroupHEnumeration.rdoHE):GroupHEnumeration.None);
    }
    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    form.getLocalContext().setSelectedInstance(null);
    clearInstanceControls();
    form.ccRecording().initializeComponent(true);
    LastHeightMetricRecordVo lastHeight = domain.getLastRecordedHeight(form.getGlobalContext().Core.getPatientShort());
    if (lastHeight != null)
    {
        form.decHeight().setValue(lastHeight.getValue());
        form.GroupH().setValue(lastHeight.getMeasuredIsNotNull()?(lastHeight.getMeasured().booleanValue()?GroupHEnumeration.rdoHM:GroupHEnumeration.rdoHE):GroupHEnumeration.None);
    }
    form.setMode(FormMode.EDIT);
}
项目:openmaxims-linux    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    form.getLocalContext().setSelectedInstance(null);
    clearInstanceControls();
    form.ccRecording().initializeComponent(true);
    LastHeightMetricRecordVo lastHeight = domain.getLastRecordedHeight(form.getGlobalContext().Core.getPatientShort());
    if (lastHeight != null)
    {
        form.decHeight().setValue(lastHeight.getValue());
        form.GroupH().setValue(lastHeight.getMeasuredIsNotNull()?(lastHeight.getMeasured().booleanValue()?GroupHEnumeration.rdoHM:GroupHEnumeration.rdoHE):GroupHEnumeration.None);
    }
    form.setMode(FormMode.EDIT);
}