Java 类ims.core.vo.lookups.MRNStatus 实例源码

项目:openMAXIMS    文件:Logic.java   
private boolean isNotValidMRN(TrackingVo trackingPatient, PatIdType identifierType)
{
    if( trackingPatient == null || identifierType == null)
        return false;

    if(trackingPatient.getPatient() != null && (MRNStatus.NONE.equals(trackingPatient.getPatient().getMRNStatus()) || MRNStatus.WAITING.equals(trackingPatient.getPatient().getMRNStatus())))
        return true;

    String mrNumber = null;

    if(trackingPatient.getPatientIsNotNull() && trackingPatient.getPatient().getIdentifiersIsNotNull())
    {
        for(int j=0; j<trackingPatient.getPatient().getIdentifiers().size(); j++)
        {
            if(identifierType.equals(trackingPatient.getPatient().getIdentifiers().get(j).getType()))
            {
                mrNumber = trackingPatient.getPatient().getIdentifiers().get(j).getValue();
            }
        }
    }

    if( mrNumber != null && mrNumber.length() > 0)
    {
        mrNumber  = mrNumber.trim();
        if(mrNumber.length() > 0 && mrNumber.charAt(0) == '9')
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:TrackingImpl.java   
private MRNStatus assembleMRNStatusLookupItem(LookupInstance mrnstatus) 
{
    if( mrnstatus == null)
        return null;

    ims.framework.utils.ImagePath img = null;
    ims.framework.utils.Color color = null;     
    img = null;

    if (mrnstatus.getImage() != null) 
    {
        img = new ims.framework.utils.ImagePath(mrnstatus.getImage().getImageId(), mrnstatus.getImage().getImagePath());
    }
    color = mrnstatus.getColor();

    if (color != null) 
        color.getValue();

    ims.core.vo.lookups.MRNStatus voLookup = new ims.core.vo.lookups.MRNStatus(mrnstatus.getId(),mrnstatus.getText(), mrnstatus.isActive(), null, img, color);
    ims.core.vo.lookups.MRNStatus parentVoLookup = voLookup;
    ims.domain.lookups.LookupInstance parent = mrnstatus.getParent();

    while (parent != null)
    {
        if (parent.getImage() != null) 
        {
            img = new ims.framework.utils.ImagePath(parent.getImage().getImageId(), parent.getImage().getImagePath() );
        }
        else 
        {
            img = null;
        }

        color = parent.getColor();

        if (color != null) 
            color.getValue();

        parentVoLookup.setParent(new ims.core.vo.lookups.MRNStatus(parent.getId(),parent.getText(), parent.isActive(), null, img, color));
        parentVoLookup = parentVoLookup.getParent();
        parent = parent.getParent();
    }           

    return voLookup;
}