Java 类ims.core.vo.MemberOfStaffShortVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbMemberOfStaffTextSubmited(String value) throws PresentationLogicException
{
    if (value != null)
    {
        MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo();
        PersonName name = new PersonName();
        name.setSurname(value);
        voMemberOfStaffFilter.setName(name);
        voMemberOfStaffFilter.setIsAppUser(new Boolean(true));

        MemberOfStaffShortVoCollection voCollMemberOfStaff = domain.listStaff(voMemberOfStaffFilter);

        voCollMemberOfStaff.sort();
        form.lyrActivity().tabNtpf().qmbMemberOfStaff().clear();
        for (int i = 0; i < voCollMemberOfStaff.size(); i++)
        {
            form.lyrActivity().tabNtpf().qmbMemberOfStaff().newRow(voCollMemberOfStaff.get(i), voCollMemberOfStaff.get(i).getName().getForename() + " " + voCollMemberOfStaff.get(i).getName().getSurname());
        }
        if (voCollMemberOfStaff.size() == 1)
            form.lyrActivity().tabNtpf().qmbMemberOfStaff().setValue(voCollMemberOfStaff.get(0));
        else if (voCollMemberOfStaff.size() > 1)
            form.lyrActivity().tabNtpf().qmbMemberOfStaff().showOpened();
    }

}
项目:AvoinApotti    文件:MosSearchImpl.java   
public MemberOfStaffShortVoCollection listMembersOfStaffWithPrimaryLocations(MemberOfStaffShortVo filter)
{
    List mosList = listDomMos(filter);
    MemberOfStaffVoCollection voCollMos = MemberOfStaffVoAssembler.createMemberOfStaffVoCollectionFromMemberOfStaff(mosList);
    MemberOfStaffShortVoCollection voCollReturn = new MemberOfStaffShortVoCollection();
    if (voCollMos != null)
    {
        for (int i = 0; i < voCollMos.size(); i++)
        {
            MemberOfStaffShortVo voShortMos = new MemberOfStaffShortVo();
            voShortMos = voCollMos.get(i);
            for (int j = 0; j < voCollMos.get(i).getLocations().size(); j++)
            {
                if ( voCollMos.get(i).getLocations().get(j).getIsPrimary() != null &&
                     voCollMos.get(i).getLocations().get(j).getIsPrimary().equals(Boolean.TRUE))
                    voShortMos.setPrimaryLocation(voCollMos.get(i).getLocations().get(j).getLocation());
            }
            voCollReturn.add(voShortMos);
        }
    }

    return voCollReturn;
}
项目:AvoinApotti    文件:MosAdminImpl.java   
public HcpCollection listHcps(HcpFilter filter)
{
    if (filter.getQueryName() == null)
    {           
        MemberOfStaffShortVo voMos = new MemberOfStaffShortVo();
        voMos.setStaffType(StaffType.HCP);
        MemberOfStaffShortVoCollection coll = this.listMembersOfStaff(voMos);           
        HcpCollection voCollHcp = new HcpCollection();

        for (int i = 0; i < coll.size(); i++) 
        {
            MemberOfStaffShortVo voLocalMos = coll.get(i);
            voCollHcp.add(voLocalMos.getHcp());             
        }
        return voCollHcp;
    }
    else
    {
        HcpAdmin hcpAdmin = (HcpAdmin) getDomainImpl(HcpAdminImpl.class);
        return hcpAdmin.listHCPs(filter);
    }
}
项目:AvoinApotti    文件:MosAdminImpl.java   
public MemberOfStaffShortVoCollection listMosForLocation(LocationRefVo voLocation)
{
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();


    String hql = " from MemberOfStaff mos join fetch mos.locations loc where loc.location.id = :Location and mos.isActive = 1 order by mos.name.upperSurname,mos.name.upperForename"; //WDEV-15662
    if (voLocation != null)
    {
        markers.add("Location");
        values.add(voLocation.getID_Location());
    }

    DomainFactory factory = getDomainFactory();
    List mosList = factory.find(hql, markers, values);
    return MemberOfStaffShortVoAssembler.createMemberOfStaffShortVoCollectionFromMemberOfStaff(mosList);
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addMosToGrid(MemberOfStaffShortVoCollection memberOfStaffShortVoCollection)
{
    for(int i = 0; i < memberOfStaffShortVoCollection.size(); i++)
    {
        MemberOfStaffShortVo mosVo = memberOfStaffShortVoCollection.get(i);
        if(isAddedToGrid(mosVo) == false)
        {
            grdRecipientsRow row = form.lyrDetails().tabRecipents().grdRecipients().getRows().newRow();
            ClinicalCorrespondenceRecipientsVo recipient = new ClinicalCorrespondenceRecipientsVo();

            recipient.setMemberOfStaff(mosVo);
            recipient.setPatient(Boolean.FALSE);

            row.setValue(recipient);
            row.setcolName(getMosText(mosVo));
            row.setcolPrimary(false);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.lyr().tabReferralDetails().qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.lyr().tabReferralDetails().qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());            

        if (coll.size() == 1)
            form.lyr().tabReferralDetails().qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.lyr().tabReferralDetails().qmbReferredTo().showOpened();       
    }       
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}
项目:openmaxims-linux    文件:Logic.java   
private void addMosToGrid(MemberOfStaffShortVoCollection memberOfStaffShortVoCollection)
{
    for(int i = 0; i < memberOfStaffShortVoCollection.size(); i++)
    {
        MemberOfStaffShortVo mosVo = memberOfStaffShortVoCollection.get(i);
        if(isAddedToGrid(mosVo) == false)
        {
            grdRecipientsRow row = form.lyrDetails().tabRecipents().grdRecipients().getRows().newRow();
            ClinicalCorrespondenceRecipientsVo recipient = new ClinicalCorrespondenceRecipientsVo();

            recipient.setMemberOfStaff(mosVo);
            recipient.setPatient(Boolean.FALSE);

            row.setValue(recipient);
            row.setcolName(getMosText(mosVo));
            row.setcolPrimary(false);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbMemberOfStaffTextSubmited(String value) throws PresentationLogicException
{
    if (value != null)
    {
        MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo();
        PersonName name = new PersonName();
        name.setSurname(value);
        voMemberOfStaffFilter.setName(name);
        voMemberOfStaffFilter.setIsAppUser(new Boolean(true));

        MemberOfStaffShortVoCollection voCollMemberOfStaff = domain.listStaff(voMemberOfStaffFilter);

        voCollMemberOfStaff.sort();
        form.lyrActivity().tabNtpf().qmbMemberOfStaff().clear();
        for (int i = 0; i < voCollMemberOfStaff.size(); i++)
        {
            form.lyrActivity().tabNtpf().qmbMemberOfStaff().newRow(voCollMemberOfStaff.get(i), voCollMemberOfStaff.get(i).getName().getForename() + " " + voCollMemberOfStaff.get(i).getName().getSurname());
        }
        if (voCollMemberOfStaff.size() == 1)
            form.lyrActivity().tabNtpf().qmbMemberOfStaff().setValue(voCollMemberOfStaff.get(0));
        else if (voCollMemberOfStaff.size() > 1)
            form.lyrActivity().tabNtpf().qmbMemberOfStaff().showOpened();
    }

}
项目:openmaxims-linux    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:MosSearchImpl.java   
public MemberOfStaffShortVoCollection listMembersOfStaffWithPrimaryLocations(MemberOfStaffShortVo filter)
{
    List mosList = listDomMos(filter);
    MemberOfStaffVoCollection voCollMos = MemberOfStaffVoAssembler.createMemberOfStaffVoCollectionFromMemberOfStaff(mosList);
    MemberOfStaffShortVoCollection voCollReturn = new MemberOfStaffShortVoCollection();
    if (voCollMos != null)
    {
        for (int i = 0; i < voCollMos.size(); i++)
        {
            MemberOfStaffShortVo voShortMos = new MemberOfStaffShortVo();
            voShortMos = voCollMos.get(i);
            for (int j = 0; j < voCollMos.get(i).getLocations().size(); j++)
            {
                if ( voCollMos.get(i).getLocations().get(j).getIsPrimary() != null &&
                     voCollMos.get(i).getLocations().get(j).getIsPrimary().equals(Boolean.TRUE))
                    voShortMos.setPrimaryLocation(voCollMos.get(i).getLocations().get(j).getLocation());
            }
            voCollReturn.add(voShortMos);
        }
    }

    return voCollReturn;
}
项目:openMAXIMS    文件:MosAdminImpl.java   
public HcpCollection listHcps(HcpFilter filter)
{
    if (filter.getQueryName() == null)
    {           
        MemberOfStaffShortVo voMos = new MemberOfStaffShortVo();
        voMos.setStaffType(StaffType.HCP);
        MemberOfStaffShortVoCollection coll = this.listMembersOfStaff(voMos);           
        HcpCollection voCollHcp = new HcpCollection();

        for (int i = 0; i < coll.size(); i++) 
        {
            MemberOfStaffShortVo voLocalMos = coll.get(i);
            voCollHcp.add(voLocalMos.getHcp());             
        }
        return voCollHcp;
    }
    else
    {
        HcpAdmin hcpAdmin = (HcpAdmin) getDomainImpl(HcpAdminImpl.class);
        return hcpAdmin.listHCPs(filter);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openmaxims-linux    文件:MosAdminImpl.java   
public MemberOfStaffShortVoCollection listMosForLocation(LocationRefVo voLocation)
{
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();


    String hql = " from MemberOfStaff mos join fetch mos.locations loc where loc.location.id = :Location and mos.isActive = 1 order by mos.name.upperSurname,mos.name.upperForename"; //WDEV-15662
    if (voLocation != null)
    {
        markers.add("Location");
        values.add(voLocation.getID_Location());
    }

    DomainFactory factory = getDomainFactory();
    List mosList = factory.find(hql, markers, values);
    return MemberOfStaffShortVoAssembler.createMemberOfStaffShortVoCollectionFromMemberOfStaff(mosList);
}
项目:openMAXIMS    文件:Logic.java   
private void addMosToGrid(MemberOfStaffShortVoCollection memberOfStaffShortVoCollection)
{
    for(int i = 0; i < memberOfStaffShortVoCollection.size(); i++)
    {
        MemberOfStaffShortVo mosVo = memberOfStaffShortVoCollection.get(i);
        if(isAddedToGrid(mosVo) == false)
        {
            grdRecipientsRow row = form.lyrDetails().tabRecipents().grdRecipients().getRows().newRow();
            ClinicalCorrespondenceRecipientsVo recipient = new ClinicalCorrespondenceRecipientsVo();

            recipient.setMemberOfStaff(mosVo);
            recipient.setPatient(Boolean.FALSE);

            row.setValue(recipient);
            row.setcolName(getMosText(mosVo));
            row.setcolPrimary(false);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.lyr().tabReferralDetails().qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.lyr().tabReferralDetails().qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());            

        if (coll.size() == 1)
            form.lyr().tabReferralDetails().qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.lyr().tabReferralDetails().qmbReferredTo().showOpened();       
    }       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}
项目:openmaxims-linux    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.lyr().tabReferralDetails().qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.lyr().tabReferralDetails().qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());            

        if (coll.size() == 1)
            form.lyr().tabReferralDetails().qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.lyr().tabReferralDetails().qmbReferredTo().showOpened();       
    }       
}
项目:openMAXIMS    文件:MosSearchImpl.java   
public MemberOfStaffShortVoCollection listMembersOfStaffWithPrimaryLocations(MemberOfStaffShortVo filter)
{
    List mosList = listDomMos(filter);
    MemberOfStaffVoCollection voCollMos = MemberOfStaffVoAssembler.createMemberOfStaffVoCollectionFromMemberOfStaff(mosList);
    MemberOfStaffShortVoCollection voCollReturn = new MemberOfStaffShortVoCollection();
    if (voCollMos != null)
    {
        for (int i = 0; i < voCollMos.size(); i++)
        {
            MemberOfStaffShortVo voShortMos = new MemberOfStaffShortVo();
            voShortMos = voCollMos.get(i);
            for (int j = 0; j < voCollMos.get(i).getLocations().size(); j++)
            {
                if ( voCollMos.get(i).getLocations().get(j).getIsPrimary() != null &&
                     voCollMos.get(i).getLocations().get(j).getIsPrimary().equals(Boolean.TRUE))
                    voShortMos.setPrimaryLocation(voCollMos.get(i).getLocations().get(j).getLocation());
            }
            voCollReturn.add(voShortMos);
        }
    }

    return voCollReturn;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}
项目:openMAXIMS    文件:MosAdminImpl.java   
public HcpCollection listHcps(HcpFilter filter)
{
    if (filter.getQueryName() == null)
    {           
        MemberOfStaffShortVo voMos = new MemberOfStaffShortVo();
        voMos.setStaffType(StaffType.HCP);
        MemberOfStaffShortVoCollection coll = this.listMembersOfStaff(voMos);           
        HcpCollection voCollHcp = new HcpCollection();

        for (int i = 0; i < coll.size(); i++) 
        {
            MemberOfStaffShortVo voLocalMos = coll.get(i);
            voCollHcp.add(voLocalMos.getHcp());             
        }
        return voCollHcp;
    }
    else
    {
        HcpAdmin hcpAdmin = (HcpAdmin) getDomainImpl(HcpAdminImpl.class);
        return hcpAdmin.listHCPs(filter);
    }
}
项目:openMAXIMS    文件:MosAdminImpl.java   
public MemberOfStaffShortVoCollection listMosForLocation(LocationRefVo voLocation)
{
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();


    String hql = " from MemberOfStaff mos join fetch mos.locations loc where loc.location.id = :Location and mos.isActive = 1 order by mos.name.upperSurname,mos.name.upperForename"; //WDEV-15662
    if (voLocation != null)
    {
        markers.add("Location");
        values.add(voLocation.getID_Location());
    }

    DomainFactory factory = getDomainFactory();
    List mosList = factory.find(hql, markers, values);
    return MemberOfStaffShortVoAssembler.createMemberOfStaffShortVoCollectionFromMemberOfStaff(mosList);
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
    if (cell.getColumn().equals(getColumn(QUERY_COL)))
    {
        cell.getItems().clear();
        String value = cell.getTypedText();
        PersonName name = new PersonName();
        MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
        name.setSurname(value);
        filter.setIsActive(Boolean.TRUE);
        filter.setName(name);
        MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
        for (int i = 0; i < voColl.size(); i++)
        {
            cell.getItems().newItem(voColl.get(i));
        }
        int cellItemSize = cell.getItems().size();
        if (cellItemSize > 0)
        {
            if (cellItemSize == 1)
                cell.setValue(cell.getItems().get(0));
            cell.showOpened();
        }
    }
}
项目:openmaxims-linux    文件:MosSearchImpl.java   
public MemberOfStaffShortVoCollection listMembersOfStaffWithPrimaryLocations(MemberOfStaffShortVo filter)
{
    List mosList = listDomMos(filter);
    MemberOfStaffVoCollection voCollMos = MemberOfStaffVoAssembler.createMemberOfStaffVoCollectionFromMemberOfStaff(mosList);
    MemberOfStaffShortVoCollection voCollReturn = new MemberOfStaffShortVoCollection();
    if (voCollMos != null)
    {
        for (int i = 0; i < voCollMos.size(); i++)
        {
            MemberOfStaffShortVo voShortMos = new MemberOfStaffShortVo();
            voShortMos = voCollMos.get(i);
            for (int j = 0; j < voCollMos.get(i).getLocations().size(); j++)
            {
                if ( voCollMos.get(i).getLocations().get(j).getIsPrimary() != null &&
                     voCollMos.get(i).getLocations().get(j).getIsPrimary().equals(Boolean.TRUE))
                    voShortMos.setPrimaryLocation(voCollMos.get(i).getLocations().get(j).getLocation());
            }
            voCollReturn.add(voShortMos);
        }
    }

    return voCollReturn;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbReferredTo().clear();

    MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
    PersonName personName = new PersonName();
    personName.setSurname(value);
    voMOS.setName(personName);
    voMOS.setIsActive(Boolean.TRUE);

    MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());           

        if (coll.size() == 1)
            form.qmbReferredTo().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbReferredTo().showOpened();      
    }       
}