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

项目:AvoinApotti    文件:Logic.java   
protected void onCmbTypeValueChanged() throws PresentationLogicException
{
    if (form.cmbType().getValue() != null)
    {
        form.cmbHcpDiciplineDetails().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));
        form.imbHCPDlg().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));

        if (form.cmbType().getValue().equals(StaffType.HCP) == false)
            synchroniseStaffTypeWithHcpType();
    }
    else
    {
        synchroniseStaffTypeWithHcpType();
        form.cmbHcpDiciplineDetails().setEnabled(false);
        form.imbHCPDlg().setEnabled(false);
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void synchroniseStaffTypeWithHcpType()
{
    if (form.cmbHcpDiciplineDetails().getValue() != null)
    {
        if (form.getGlobalContext().Admin.getSelectedMos().getID_MemberOfStaffIsNotNull())
        {
            form.cmbType().setValue(StaffType.HCP);
            form.cmbHcpDiciplineDetails().setEnabled(true);
            form.imbHCPDlg().setEnabled(true);
        }
        else
        {
            form.cmbHcpDiciplineDetails().setValue(null);
            form.imbHCPDlg().setVisible(false);
            form.htmHcpDetails().setHTML("");
            form.getGlobalContext().setHcp(null);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean validateFields()
{

    if (form.txtSurname().getValue() == null)
    {
        engine.showMessage("Please enter a Surname for the member of staff.");
        return false;
    }

    if (form.cmbType().getValue() != null)
    {
        if (form.cmbType().getValue().equals(StaffType.HCP))
        {
            if (form.cmbHcpDiciplineDetails().getValue() == null)
            {
                engine.showMessage("Please enter HCP details or select another staff type.");
                return false;
            }
        }
    }

    return true;
}
项目: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);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbTypeValueChanged() throws PresentationLogicException
{
    if (form.cmbType().getValue() != null)
    {
        form.cmbHcpDiciplineDetails().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));
        form.imbHCPDlg().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));

        if (form.cmbType().getValue().equals(StaffType.HCP) == false)
            synchroniseStaffTypeWithHcpType();
    }
    else
    {
        synchroniseStaffTypeWithHcpType();
        form.cmbHcpDiciplineDetails().setEnabled(false);
        form.imbHCPDlg().setEnabled(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void synchroniseStaffTypeWithHcpType()
{
    if (form.cmbHcpDiciplineDetails().getValue() != null)
    {
        if (form.getGlobalContext().Admin.getSelectedMos().getID_MemberOfStaffIsNotNull())
        {
            form.cmbType().setValue(StaffType.HCP);
            form.cmbHcpDiciplineDetails().setEnabled(true);
            form.imbHCPDlg().setEnabled(true);
        }
        else
        {
            form.cmbHcpDiciplineDetails().setValue(null);
            form.imbHCPDlg().setVisible(false);
            form.htmHcpDetails().setHTML("");
            form.getGlobalContext().setHcp(null);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean validateFields()
{

    if (form.txtSurname().getValue() == null)
    {
        engine.showMessage("Please enter a Surname for the member of staff.");
        return false;
    }

    if (form.cmbType().getValue() != null)
    {
        if (form.cmbType().getValue().equals(StaffType.HCP))
        {
            if (form.cmbHcpDiciplineDetails().getValue() == null)
            {
                engine.showMessage("Please enter HCP details or select another staff type.");
                return false;
            }
        }
    }

    return true;
}
项目: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    文件:Logic.java   
protected void onCmbTypeValueChanged() throws PresentationLogicException
{
    if (form.cmbType().getValue() != null)
    {
        form.cmbHcpDiciplineDetails().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));
        form.imbHCPDlg().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));

        if (form.cmbType().getValue().equals(StaffType.HCP) == false)
            synchroniseStaffTypeWithHcpType();
    }
    else
    {
        synchroniseStaffTypeWithHcpType();
        form.cmbHcpDiciplineDetails().setEnabled(false);
        form.imbHCPDlg().setEnabled(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void synchroniseStaffTypeWithHcpType()
{
    if (form.cmbHcpDiciplineDetails().getValue() != null)
    {
        if (form.getGlobalContext().Admin.getSelectedMos().getID_MemberOfStaffIsNotNull())
        {
            form.cmbType().setValue(StaffType.HCP);
            form.cmbHcpDiciplineDetails().setEnabled(true);
            form.imbHCPDlg().setEnabled(true);
        }
        else
        {
            form.cmbHcpDiciplineDetails().setValue(null);
            form.imbHCPDlg().setVisible(false);
            form.htmHcpDetails().setHTML("");
            form.getGlobalContext().setHcp(null);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean validateFields()
{

    if (form.txtSurname().getValue() == null)
    {
        engine.showMessage("Please enter a Surname for the member of staff.");
        return false;
    }

    if (form.cmbType().getValue() != null)
    {
        if (form.cmbType().getValue().equals(StaffType.HCP))
        {
            if (form.cmbHcpDiciplineDetails().getValue() == null)
            {
                engine.showMessage("Please enter HCP details or select another staff type.");
                return false;
            }
        }
    }

    return true;
}
项目: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 onCmbTypeValueChanged() throws PresentationLogicException
{
    if (form.cmbType().getValue() != null)
    {
        form.cmbHcpDiciplineDetails().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));
        form.imbHCPDlg().setEnabled(form.cmbType().getValue().equals(StaffType.HCP));

        if (form.cmbType().getValue().equals(StaffType.HCP) == false)
            synchroniseStaffTypeWithHcpType();
    }
    else
    {
        synchroniseStaffTypeWithHcpType();
        form.cmbHcpDiciplineDetails().setEnabled(false);
        form.imbHCPDlg().setEnabled(false);
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * 
 */
private void synchroniseStaffTypeWithHcpType()
{
    if (form.cmbHcpDiciplineDetails().getValue() != null)
    {
        if (form.getGlobalContext().Admin.getSelectedMos().getID_MemberOfStaffIsNotNull())
        {
            form.cmbType().setValue(StaffType.HCP);
            form.cmbHcpDiciplineDetails().setEnabled(true);
            form.imbHCPDlg().setEnabled(true);
        }
        else
        {
            form.cmbHcpDiciplineDetails().setValue(null);
            form.imbHCPDlg().setVisible(false);
            form.htmHcpDetails().setHTML("");
            form.getGlobalContext().setHcp(null);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean validateFields()
{

    if (form.txtSurname().getValue() == null)
    {
        engine.showMessage("Please enter a Surname for the member of staff.");
        return false;
    }

    if (form.cmbType().getValue() != null)
    {
        if (form.cmbType().getValue().equals(StaffType.HCP))
        {
            if (form.cmbHcpDiciplineDetails().getValue() == null)
            {
                engine.showMessage("Please enter HCP details or select another staff type.");
                return false;
            }
        }
    }

    return true;
}
项目:openmaxims-linux    文件: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    文件:Logic.java   
public void initializeGrid()
{
    form.dyngrdOrganisationLocation().clear();
    form.dyngrdOrganisationLocation().setSelectable(true);
    form.dyngrdOrganisationLocation().showCheckBoxes(true);

    DynamicGridColumn column = form.dyngrdOrganisationLocation().getColumns().newColumn("Organisation / Location");
    column.setIdentifier(COL_ORGANISATION_LOCATION);
    column.setWidth(400);

    MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
    if (mos.getStaffTypeIsNotNull() && mos.getStaffType().equals(StaffType.HCP))
    {
        column.setWidth(360);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Accreditation");
        column.setIdentifier(COL_ACCREDITATION);
        column.setWidth(230);

        if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
        {
            column.setWidth(170);

            column = form.dyngrdOrganisationLocation().getColumns().newColumn("Case Types");
            column.setIdentifier(COL_ACCREDITATION_CASETYPES);
            column.setWidth(70);
        }

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Start Date");
        column.setIdentifier(COL_ACCREDITATION_ST_DATE);
        column.setWidth(120);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("End Date");
        column.setIdentifier(COL_ACCREDITATION_END_DATE);
        column.setWidth(-1);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateHCPDisciplineCombo()
{
    form.cmbHcpDiscipline().clear();        
    if ((form.cmbStaffType().getValue() != null) && form.cmbStaffType().getValue().equals(StaffType.HCP))
    {
        ims.core.vo.lookups.HcpDisTypeCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getHcpDisType(domain.getLookupService());
        for(int x = 0; x < lookupCollection.size(); x++)
        {
            if (lookupCollection.get(x).isActive() == true && lookupCollection.get(x).getParent() == null)
                form.cmbHcpDiscipline().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateStaffTypeCombo(Boolean boolHCP)
{
    form.getLocalContext().setboolHCP(boolHCP);
    if (boolHCP.equals(Boolean.TRUE))       // If we are ONLY listing HCP's then exclude the other staff types.
    {           
        form.cmbStaffType().newRow(StaffType.HCP, StaffType.HCP.toString());
        form.cmbStaffType().setValue(StaffType.HCP);
        populateHCPDisciplineCombo();
        form.cmbStaffType().setEnabled(false);
    }
    else            
        form.cmbStaffType().setEnabled(true);
}
项目:openMAXIMS    文件:Logic.java   
public void initializeGrid()
{
    form.dyngrdOrganisationLocation().clear();
    form.dyngrdOrganisationLocation().setSelectable(true);
    form.dyngrdOrganisationLocation().showCheckBoxes(true);

    DynamicGridColumn column = form.dyngrdOrganisationLocation().getColumns().newColumn("Organisation / Location");
    column.setIdentifier(COL_ORGANISATION_LOCATION);
    column.setWidth(400);

    MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
    if (mos.getStaffTypeIsNotNull() && mos.getStaffType().equals(StaffType.HCP))
    {
        column.setWidth(360);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Accreditation");
        column.setIdentifier(COL_ACCREDITATION);
        column.setWidth(230);

        if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
        {
            column.setWidth(170);

            column = form.dyngrdOrganisationLocation().getColumns().newColumn("Case Types");
            column.setIdentifier(COL_ACCREDITATION_CASETYPES);
            column.setWidth(70);
        }

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Start Date");
        column.setIdentifier(COL_ACCREDITATION_ST_DATE);
        column.setWidth(120);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("End Date");
        column.setIdentifier(COL_ACCREDITATION_END_DATE);
        column.setWidth(-1);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateHCPDisciplineCombo()
{
    form.cmbHcpDiscipline().clear();        
    if ((form.cmbStaffType().getValue() != null) && form.cmbStaffType().getValue().equals(StaffType.HCP))
    {
        ims.core.vo.lookups.HcpDisTypeCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getHcpDisType(domain.getLookupService());
        for(int x = 0; x < lookupCollection.size(); x++)
        {
            if (lookupCollection.get(x).isActive() == true && lookupCollection.get(x).getParent() == null)
                form.cmbHcpDiscipline().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateStaffTypeCombo(Boolean boolHCP)
{
    form.getLocalContext().setboolHCP(boolHCP);
    if (boolHCP.equals(Boolean.TRUE))       // If we are ONLY listing HCP's then exclude the other staff types.
    {           
        form.cmbStaffType().newRow(StaffType.HCP, StaffType.HCP.toString());
        form.cmbStaffType().setValue(StaffType.HCP);
        populateHCPDisciplineCombo();
        form.cmbStaffType().setEnabled(false);
    }
    else            
        form.cmbStaffType().setEnabled(true);
}
项目:openMAXIMS    文件:Logic.java   
public void initializeGrid()
{
    form.dyngrdOrganisationLocation().clear();
    form.dyngrdOrganisationLocation().setSelectable(true);
    form.dyngrdOrganisationLocation().showCheckBoxes(true);

    DynamicGridColumn column = form.dyngrdOrganisationLocation().getColumns().newColumn("Organisation / Location");
    column.setIdentifier(COL_ORGANISATION_LOCATION);
    column.setWidth(400);

    MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
    if (mos.getStaffTypeIsNotNull() && mos.getStaffType().equals(StaffType.HCP))
    {
        column.setWidth(360);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Accreditation");
        column.setIdentifier(COL_ACCREDITATION);
        column.setWidth(230);

        if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
        {
            column.setWidth(170);

            column = form.dyngrdOrganisationLocation().getColumns().newColumn("Case Types");
            column.setIdentifier(COL_ACCREDITATION_CASETYPES);
            column.setWidth(70);
        }

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Start Date");
        column.setIdentifier(COL_ACCREDITATION_ST_DATE);
        column.setWidth(120);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("End Date");
        column.setIdentifier(COL_ACCREDITATION_END_DATE);
        column.setWidth(-1);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateHCPDisciplineCombo()
{
    form.cmbHcpDiscipline().clear();        
    if ((form.cmbStaffType().getValue() != null) && form.cmbStaffType().getValue().equals(StaffType.HCP))
    {
        ims.core.vo.lookups.HcpDisTypeCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getHcpDisType(domain.getLookupService());
        for(int x = 0; x < lookupCollection.size(); x++)
        {
            if (lookupCollection.get(x).isActive() == true && lookupCollection.get(x).getParent() == null)
                form.cmbHcpDiscipline().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateStaffTypeCombo(Boolean boolHCP)
{
    form.getLocalContext().setboolHCP(boolHCP);
    if (boolHCP.equals(Boolean.TRUE))       // If we are ONLY listing HCP's then exclude the other staff types.
    {           
        form.cmbStaffType().newRow(StaffType.HCP, StaffType.HCP.toString());
        form.cmbStaffType().setValue(StaffType.HCP);
        populateHCPDisciplineCombo();
        form.cmbStaffType().setEnabled(false);
    }
    else            
        form.cmbStaffType().setEnabled(true);
}
项目:openmaxims-linux    文件:Logic.java   
public void initializeGrid()
{
    form.dyngrdOrganisationLocation().clear();
    form.dyngrdOrganisationLocation().setSelectable(true);
    form.dyngrdOrganisationLocation().showCheckBoxes(true);

    DynamicGridColumn column = form.dyngrdOrganisationLocation().getColumns().newColumn("Organisation / Location");
    column.setIdentifier(COL_ORGANISATION_LOCATION);
    column.setWidth(400);

    MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
    if (mos.getStaffTypeIsNotNull() && mos.getStaffType().equals(StaffType.HCP))
    {
        column.setWidth(360);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Accreditation");
        column.setIdentifier(COL_ACCREDITATION);
        column.setWidth(230);

        if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
        {
            column.setWidth(170);

            column = form.dyngrdOrganisationLocation().getColumns().newColumn("Case Types");
            column.setIdentifier(COL_ACCREDITATION_CASETYPES);
            column.setWidth(70);
        }

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("Start Date");
        column.setIdentifier(COL_ACCREDITATION_ST_DATE);
        column.setWidth(120);

        column = form.dyngrdOrganisationLocation().getColumns().newColumn("End Date");
        column.setIdentifier(COL_ACCREDITATION_END_DATE);
        column.setWidth(-1);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateHCPDisciplineCombo()
{
    form.cmbHcpDiscipline().clear();        
    if ((form.cmbStaffType().getValue() != null) && form.cmbStaffType().getValue().equals(StaffType.HCP))
    {
        ims.core.vo.lookups.HcpDisTypeCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getHcpDisType(domain.getLookupService());
        for(int x = 0; x < lookupCollection.size(); x++)
        {
            if (lookupCollection.get(x).isActive() == true && lookupCollection.get(x).getParent() == null)
                form.cmbHcpDiscipline().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void populateStaffTypeCombo(Boolean boolHCP)
{
    form.getLocalContext().setboolHCP(boolHCP);
    if (boolHCP.equals(Boolean.TRUE))       // If we are ONLY listing HCP's then exclude the other staff types.
    {           
        form.cmbStaffType().newRow(StaffType.HCP, StaffType.HCP.toString());
        form.cmbStaffType().setValue(StaffType.HCP);
        populateHCPDisciplineCombo();
        form.cmbStaffType().setEnabled(false);
    }
    else            
        form.cmbStaffType().setEnabled(true);
}
项目:AvoinApotti    文件:TriageProtocolAssessmentImpl.java   
public HcpLiteVoCollection listNurses(String personName)
{
    if (personName == null)
        return null;


    String query = "SELECT hcp FROM Hcp AS hcp WHERE hcp.mos.name.upperSurname LIKE :NAME and hcp.mos.staffType.id = :staffType AND hcp.isActive = 1 ORDER BY hcp.mos.name.upperSurname ASC"; //WDEV-17240

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();


    paramNames.add("NAME");             paramValues.add(personName.toUpperCase() + "%");//WDEV-17240
    paramNames.add("staffType");        paramValues.add(StaffType.HCP.getID()); //WDEV-17240

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:MosSearchImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    hql += " order by h.mos.name.upperSurname,h.mos.name.upperForename";
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:AvoinApotti    文件:MosAdminImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:openMAXIMS    文件:TriageProtocolAssessmentImpl.java   
public HcpLiteVoCollection listNurses(String personName)
{
    if (personName == null)
        return null;


    String query = "SELECT hcp FROM Hcp AS hcp WHERE hcp.mos.name.upperSurname LIKE :NAME and hcp.mos.staffType.id = :staffType AND hcp.isActive = 1 ORDER BY hcp.mos.name.upperSurname ASC"; //WDEV-17240

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();


    paramNames.add("NAME");             paramValues.add(personName.toUpperCase() + "%");//WDEV-17240
    paramNames.add("staffType");        paramValues.add(StaffType.HCP.getID()); //WDEV-17240

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:MosSearchImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    hql += " order by h.mos.name.upperSurname,h.mos.name.upperForename";
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:openMAXIMS    文件:MosAdminImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:openMAXIMS    文件:TriageProtocolAssessmentImpl.java   
public HcpLiteVoCollection listNurses(String personName)
{
    if (personName == null)
        return null;


    String query = "SELECT hcp FROM Hcp AS hcp WHERE hcp.mos.name.upperSurname LIKE :NAME and hcp.mos.staffType.id = :staffType AND hcp.isActive = 1 ORDER BY hcp.mos.name.upperSurname ASC"; //WDEV-17240

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();


    paramNames.add("NAME");             paramValues.add(personName.toUpperCase() + "%");//WDEV-17240
    paramNames.add("staffType");        paramValues.add(StaffType.HCP.getID()); //WDEV-17240

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:MosSearchImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    hql += " order by h.mos.name.upperSurname,h.mos.name.upperForename";
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:openMAXIMS    文件:MosAdminImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:openmaxims-linux    文件:TriageProtocolAssessmentImpl.java   
public HcpLiteVoCollection listNurses(String personName)
{
    if (personName == null)
        return null;


    String query = "SELECT hcp FROM Hcp AS hcp WHERE hcp.mos.name.upperSurname LIKE :NAME and hcp.mos.staffType.id = :staffType AND hcp.isActive = 1 ORDER BY hcp.mos.name.upperSurname ASC"; //WDEV-17240

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();


    paramNames.add("NAME");             paramValues.add(personName.toUpperCase() + "%");//WDEV-17240
    paramNames.add("staffType");        paramValues.add(StaffType.HCP.getID()); //WDEV-17240

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openmaxims-linux    文件:MosSearchImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    hql += " order by h.mos.name.upperSurname,h.mos.name.upperForename";
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
项目:openmaxims-linux    文件:MosAdminImpl.java   
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
    {
        condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
        markers.add("mosSname");
        values.add(voFilter.getName().getSurname().toUpperCase() + "%");
        andStr = " and ";
    }
    if (voFilter.getStaffTypeIsNotNull())
    {
        condStr.append(andStr + " h.mos.staffType = :staffType");
        markers.add("staffType");
        values.add(getDomLookup(StaffType.HCP));
        andStr = " and ";
    }

    if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
    {
        condStr.append(andStr + " h.isActive = :isActive");
        markers.add("isActive");
        values.add(voFilter.getIsActive());
        andStr = " and ";
    }

    if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
    {
        if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
        {
            condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
            markers.add("hcpType1");
            values.add(getDomLookup(HcpDisType.MEDICAL));
            markers.add("hcpType2");
            values.add(getDomLookup(HcpDisType.NURSING));
            markers.add("hcpType3");
            values.add(getDomLookup(HcpDisType.THERAPY));
            andStr = " and ";
        }
        else
        {
            condStr.append(andStr + " h.hcpType = :hcpType");
            markers.add("hcpType");
            values.add(getDomLookup(voFilter.getHcp().getHcpType()));
            andStr = " and ";
        }
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    List lstHCPs = factory.find(hql, markers, values);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}