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

项目:AvoinApotti    文件:Logic.java   
private void loadHcpsIntoGridColumnCombo(grdOtherHcpRow row)
{
    HcpLiteVoCollection collHcps = form.getLocalContext().getvoHcpColl();

    if(collHcps == null)
        return;

    for(int i=0;i<collHcps.size();i++)
    {
        //WDEV-193 Don't include the Responsible Medical Officer in the list of 'other' HCP's  
        if (form.qmbRecordingHCP().getValue() != null)
        //{
        //  if (collHcps.get(i).getID_Hcp().equals(form.qmbRecordingHCP().getValue().getID_Hcp()))
        //      continue;
        //}
            row.getcolHcps().newRow(collHcps.get(i), collHcps.get(i).toString());

        //for(int i=0;i<collHcps.size();i++)
        //  row.getColHcp().newRow(collHcps.get(i),collHcps.get(i).toString());                 


    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbRecordingHCPTextSubmited(String value) throws PresentationLogicException
{
    form.qmbRecordingHCP().clear();

    HcpLiteVoCollection coll = domain.listHcpLiteByName(value);
    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.qmbRecordingHCP().newRow(med, med.toString());         
    }
    if (coll.size() == 1)
    {
        form.qmbRecordingHCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbRecordingHCP().showOpened();        
    }               

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbSeenByTextSubmited(String value) throws PresentationLogicException
{
    form.qmbSeenBy().clear();

    HcpLiteVoCollection coll = domain.listHcpLiteByName(value);
    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.qmbSeenBy().newRow(med, med.toString());           
    }
    if (coll.size() == 1)
    {
        form.qmbSeenBy().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbSeenBy().showOpened();      
    }               
}
项目:AvoinApotti    文件:Logic.java   
private void setAuthoringCP(String value) 
{
    form.ctnUltra().lyrUltra().tabHeader().qmbAuthoringCP().clear();

    HcpLiteVoCollection coll = domain.listHcpLiteByName(value);
    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.ctnUltra().lyrUltra().tabHeader().qmbAuthoringCP().newRow(med, med.toString());            
    }

    if (coll.size() == 1)
        form.ctnUltra().lyrUltra().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
    else if (coll.size() > 1)
        form.ctnUltra().lyrUltra().tabHeader().qmbAuthoringCP().showOpened();
}
项目:AvoinApotti    文件:WaitingListConfigurationImpl.java   
public HcpLiteVoCollection listConsultants(String name)
{
    if(name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Can not search on null name.");

    StringBuffer hqlConditions = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hql = "select hcp from Hcp as hcp where hcp.isActive = 1 and (hcp.mos.name.upperSurname like :hcpSname or hcp.mos.name.upperForename like :hcpFname) ";
    markers.add("hcpSname");
    values.add(name.toUpperCase() + "%");

    markers.add("hcpFname");
    values.add(name.toUpperCase() + "%");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find((hql + hqlConditions.toString() + " order by hcp.mos.name.upperSurname , hcp.mos.name.upperForename asc").toString(), markers, values);

    if (list != null && list.size() > 0)
        return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(list);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdAssistantGridQueryComboBoxTextSubmited(int column, grdAssistantRow row, String text) throws PresentationLogicException 
{
    row.getColAssistant().clear();

    HcpLiteVoCollection coll = domain.listHcpLiteByName(text);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
            row.getColAssistant().newRow(coll.get(i), coll.get(i).toString());          

        if (coll.size() == 1)
            row.getColAssistant().setValue(coll.get(0));
        else if (coll.size() > 1)
            row.getColAssistant().showOpened();     
    }       
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbConsultant().clear();
    HcpLiteVoCollection voHCPColl = domain.listHcps(value);

    if(voHCPColl != null)
    {
        for (int i = 0; i < voHCPColl.size(); i++)
        {
            form.qmbConsultant().newRow(voHCPColl.get(i), voHCPColl.get(i).toString());
        }
        if (voHCPColl.size() == 1)
        {
            form.qmbConsultant().setValue(voHCPColl.get(0));
        }
        else if (voHCPColl.size() > 1)
        {
            form.qmbConsultant().showOpened();      
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbOpSurgeonTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{

    HcpLiteVoCollection listHcpLite = domain.listHcpLite(value,HcpDisType.MEDICAL);
    form.qmbOpSurgeon().clear();
    if (listHcpLite == null || listHcpLite.size() == 0)
        return;
    for (int i = 0; i < listHcpLite.size(); i++)
    {
        form.qmbOpSurgeon().newRow(listHcpLite.get(i), listHcpLite.get(i).getIMosName());
    }
    if (listHcpLite.size() == 1)
    {
        form.qmbOpSurgeon().setValue(listHcpLite.get(0));
    }
    else
    {
        form.qmbOpSurgeon().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-13999 Function used to populate HCPs to 'Responsible HCP' query combo-box (on Clinical Details tab)
 */
private void populateResponsibleHCP(HcpLiteVoCollection hcpCollection)
{
    // Clear 'Responsible HCP' query combo-box
    form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().clear();

    // If HCP collection is null end function
    if (hcpCollection == null)
        return;

    // Add each HCP to query combo box
    for (HcpLiteVo hcp : hcpCollection)
    {
        form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().newRow(hcp, hcp.toString());
    }

    // Default in single values or expand if none or more than one HCP is in the collection
    if (hcpCollection.size() == 1)
    {
        form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().setValue(hcpCollection.get(0));
    }
    else
    {
        form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().showOpened();
    }
}
项目:AvoinApotti    文件:StoolScaleImpl.java   
public HcpLiteVoCollection listHCP(String name)
{
    // Check parameter
    if (name == null)
        return null;

    String hqlQuery = "from Hcp hcp where hcp.mos.name.upperSurname like :NAME or hcp.mos.name.upperForename like :NAME order by hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");

    ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(hqlQuery, paramNames, paramValues));
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbResponsibleHCPTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbResponsibleHCP().clear();

    HcpLiteVoCollection coll = domain.listHCP(value);
    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.qmbResponsibleHCP().newRow(med, med.toString());           
    }
    if (coll.size() == 1)
    {
        form.qmbResponsibleHCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbResponsibleHCP().showOpened();      
    }               

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringHCPTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbAuthoringHCP().clear();

    HcpLiteVoCollection coll = domain.listHCP(value);
    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.qmbAuthoringHCP().newRow(med, med.toString());         
    }
    if (coll.size() == 1)
    {
        form.qmbAuthoringHCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbAuthoringHCP().showOpened();        
    }               

}
项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-13876
 * @param reviewingHCPs
 */
private void populateReviweingHCP(HcpLiteVoCollection reviewingHCPs)
{
    // Clear the query combobox for reviewing HCP
    form.qmbReviewingHCP().clear();

    // Check list of reviewing HCPs
    if (reviewingHCPs == null)
        return;

    // Add HCPs from list
    for (HcpLiteVo hcp : reviewingHCPs)
    {
        form.qmbReviewingHCP().newRow(hcp, hcp.getName() != null ? hcp.getName().toString() : "<unknown HCP>");
    }

    if (reviewingHCPs.size() != 1)
    {
        form.qmbReviewingHCP().showOpened();
    }
    else if (reviewingHCPs.size() == 1)
    {
        form.qmbReviewingHCP().setValue(reviewingHCPs.get(0));
        form.chkReview().setValue(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException
{
    if (value != null)
    {
        HcpFilter voHCPFilter = new HcpFilter();
        PersonName name = new PersonName();
        name.setSurname(value);
        voHCPFilter.setQueryName(name);
        voHCPFilter.setHcpType(HcpDisType.MEDICAL);

        HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter);

        voColl.sort();
        form.qmbConsultant().clear();
        for (int i = 0; i < voColl.size(); i++)
        {
            form.qmbConsultant().newRow(voColl.get(i), voColl.get(i).getIHcpName());
        }
        if (voColl.size() == 1)
            form.qmbConsultant().setValue(voColl.get(0));
        else if (voColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdAssistantsGridQueryComboBoxTextSubmited(int column, grdAssistantsRow row, String text) throws PresentationLogicException 
{
    HcpLiteVoCollection collHcps = domain.listHcpLiteByName(text);

    row.getColHcp().clear();
    row.getColHcp().setValue(null);

    if(collHcps == null)
        return;

    for(int i=0;i<collHcps.size();i++)
        row.getColHcp().newRow(collHcps.get(i),collHcps.get(i).toString());                 

    if (collHcps.size() == 1)
        row.getColHcp().setValue(collHcps.get(0));
    else if(collHcps.size() > 1)
        row.getColHcp().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
protected void onCustomControlSearchHCPsValueChanged() throws PresentationLogicException
{
    HcpLiteVoCollection voCollHCPLites = form.ctnDetails().lyrDetails().tabDetailsMembers().customControlSearchHCPs().listHCPLites();
    form.ctnDetails().lyrDetails().tabDetailsMembers().grdTeamMembers().getRows().clear();
    if (voCollHCPLites != null)
    {
        for (int i = 0; i < voCollHCPLites.size(); i++)
        {
            // Remove the Lead Hcp and any other current team members..
            if (!inTeam(voCollHCPLites.get(i)))
            {               
                GenForm.ctnDetailsContainer.lyrDetailsLayer.tabDetailsMembersContainer.grdTeamMembersRow row = form.ctnDetails().lyrDetails().tabDetailsMembers().grdTeamMembers().getRows().newRow();
                row.setcolHcp(voCollHCPLites.get(i).getMos().getName().toString());
                row.setValue(voCollHCPLites.get(i));
            }
        }           
    }       
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringHcpTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{   
    //WDEV-18301
    if (value == null || (value != null && value.length() == 0))
        return;

    HcpLiteVoCollection coll = listHCPs(value);

    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.qmbAuthoringHcp().newRow(med, med.toString());
    }
    if (coll.size() == 1)
    {
        form.qmbAuthoringHcp().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbAuthoringHcp().showOpened();
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbConsultantsTextSubmited(String value) throws PresentationLogicException 
{
    if (value != null)
    {
        HcpFilter voHCPFilter = new HcpFilter();
        PersonName name = new PersonName();
        name.setSurname(value);
        voHCPFilter.setQueryName(name);
        voHCPFilter.setHcpType(HcpDisType.MEDICAL);

        HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter);

        form.qmbConsultants().clear();
        for (int i = 0; i < voColl.size(); i++)
        {
            form.qmbConsultants().newRow(voColl.get(i), voColl.get(i).getName().toString());
        }
        if (voColl.size() == 1)
            form.qmbConsultants().setValue(voColl.get(0));
        else if (voColl.size() > 1)
            form.qmbConsultants().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbHCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if (value != null)
    {
        HcpFilter voHCPFilter = new HcpFilter();
        PersonName name = new PersonName();
        name.setSurname(value);
        voHCPFilter.setQueryName(name);
        voHCPFilter.setHcpType(HcpDisType.MEDICAL);

        HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter);

        voColl.sort();
        form.qmbHCP().clear();
        for (int i = 0; i < voColl.size(); i++)
        {
            form.qmbHCP().newRow(voColl.get(i), voColl.get(i).getIHcpName());
        }
        if (voColl.size() == 1)
            form.qmbHCP().setValue(voColl.get(0));
        else if (voColl.size() > 1)
            form.qmbHCP().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringHcpTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    HcpLiteVoCollection coll = listHCPs(value);

    for (int i = 0; i < coll.size(); i++)
    {
        HcpLiteVo med = coll.get(i);
        form.qmbAuthoringHcp().newRow(med, med.toString());
    }
    if (coll.size() == 1)
    {
        form.qmbAuthoringHcp().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbAuthoringHcp().showOpened();
    }

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

    HcpFilter filter = new HcpFilter();
    PersonName voName = new PersonName();
    voName.setSurname(value);
    filter.setQueryName(voName);

    HcpLiteVoCollection voCollHcp = domain.listClinicsListOwners(filter);
    if (voCollHcp.size() == 0) {
        engine.showMessage("No matching records found");
        return;
    }

    for (int i = 0; i < voCollHcp.size(); i++) {
        form.qmbListOwner().newRow(voCollHcp.get(i),
                voCollHcp.get(i).getName().toString());
    }

    if (voCollHcp.size() == 1)
        form.qmbListOwner().setValue(voCollHcp.get(0));
    else
        form.qmbListOwner().showOpened();
}
项目:AvoinApotti    文件:AuthoringInfoImpl.java   
public HcpLiteVoCollection listHcpLiteByNameAndDisciplineType(String hcpName, HcpDisType hcpDisciplineType)
{
    //WDEV-8356
    if (hcpName == null || hcpName.length() == 0)
        throw new DomainRuntimeException("Name not supplied");

    HcpAdmin hcpImpl = (HcpAdmin) getDomainImpl(HcpAdminImpl.class);
    return hcpImpl.listHcpLiteByNameAndDisciplineType(hcpName, hcpDisciplineType);
    /*
    HcpFilter filter = new HcpFilter();
    filter.setQueryName(new PersonName());
    filter.getQueryName().setSurname(hcpName);
    if(hcpDisciplineType != null)
        filter.setHcpType(hcpDisciplineType);

    List l = this.listHCPList(filter);
    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(l);*/
}
项目:AvoinApotti    文件:Logic.java   
private void populateReviweingHCP(HcpLiteVoCollection reviewingHCPs)
{
    form.qmbReviewingHCP().clear();

    if (reviewingHCPs == null)
        return;

    for (HcpLiteVo hcp : reviewingHCPs)
    {
        form.qmbReviewingHCP().newRow(hcp, hcp.getName() != null ? hcp.getName().toString() : "<unknown HCP>");
    }

    if (reviewingHCPs.size() != 1)
    {
        form.qmbReviewingHCP().showOpened();
    }
    else if (reviewingHCPs.size() == 1)
    {
        form.qmbReviewingHCP().setValue(reviewingHCPs.get(0));
        form.chkReview().setValue(true);
    }
}
项目:AvoinApotti    文件:FunctionalTransfersImpl.java   
public HcpLiteVoCollection listHcps(String value)
{
    // Check parameter
    if (value == null || value.length() <= 0)
        throw new DomainRuntimeException("Provide at least 3 character for HCP search");

    String query = "from Hcp as hcp where hcp.mos.name.upperSurname like :SURNAME or hcp.mos.name.upperForename like :FORENAME";

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

    paramNames.add("SURNAME");
    paramValues.add(value.toUpperCase());
    paramNames.add("FORENAME");
    paramValues.add(value.toUpperCase());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbVerifyingHCPTextSubmited(String value) throws PresentationLogicException
{
    form.lyrDetails().tabRecipents().qmbVerifyingHCP().clear();
    HcpLiteVoCollection list = domain.listHCP(value);

    for (int i = 0; i < list.size(); i++)
    {
        HcpLiteVo med = list.get(i);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().newRow(med, med.toString()); 
    }

    if(list.size() == 1)
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(list.get(0));
    else if(list.size() > 1)
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().showOpened();

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbNurseTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbNurse().clear();

    HcpLiteVoCollection hcpColl = domain.listHcpLiteByName(value);
    for (int i = 0; i < hcpColl.size(); i++)
    {
        HcpLiteVo hcp = hcpColl.get(i);
        form.qmbNurse().newRow(hcp, hcp.toString());            
    }
    if (hcpColl.size() == 1)
    {
        form.qmbNurse().setValue(hcpColl.get(0));
    }
    else if (hcpColl.size() > 1)
    {
        form.qmbNurse().showOpened();       
    }       
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbPerfByTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.qmbPerfBy().clear();

    HcpLiteVoCollection hcpColl = domain.listHcpLiteByName(value);
    for (int i = 0; i < hcpColl.size(); i++)
    {
        HcpLiteVo hcp = hcpColl.get(i);
        form.qmbPerfBy().newRow(hcp, hcp.toString());           
    }
    if (hcpColl.size() == 1)
    {
        form.qmbPerfBy().setValue(hcpColl.get(0));
    }
    else if (hcpColl.size() > 1)
    {
        form.qmbPerfBy().showOpened();      
    }       
}
项目:AvoinApotti    文件:NewResultsImpl.java   
/**
 * WDEV-13876
 * List reviewing HCP (only active HCP marked as responsible HCP)
 */
public HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

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

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE mos.name.upperSurname LIKE :HCP_NAME AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:ProceduresPerformedByHCPImpl.java   
private void removeAlreadyUsedHcps(HcpLiteVoCollection hcps)
{
    HcpLiteVoCollection voCollToRemove = new HcpLiteVoCollection();
    if(hcps != null)
    {
        for(HcpLiteVo hcp : hcps)
        {
            List count =getDomainFactory().find("select count(ppbh.id)from ProceduresPerformedByHCP as ppbh where ppbh.performingHCP.id = " + hcp.getID_Hcp());
            if(count != null)
            {
                Long val = (Long) count.get(0);
                if(val.intValue() > 0)
                    voCollToRemove.add(hcp);
            }
        }
    }

    for(HcpLiteVo removeHcp :voCollToRemove)
        hcps.remove(removeHcp); 
}
项目:AvoinApotti    文件:Logic.java   
private void loadHcps(grdFollowUpRow row, String text)
{
    HcpFilter voFilter = new HcpFilter();
    PersonName voName = new PersonName();
    voName.setSurname(text);
    voFilter.setQueryName(voName);
    voFilter.setHcpType(HcpDisType.MEDICAL);
    HcpLiteVoCollection voColl = domain.listHCPs(voFilter);
    row.getColHCP().clear();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
        row.getColHCP().newRow(voColl.get(i), voColl.get(i).getName().toString());

    if (voColl != null && voColl.size() == 1)
        row.getColHCP().setValue(voColl.get(0));
    else if (voColl != null && voColl.size() > 1)
        row.getColHCP().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
private void populateHcpQueryComboBox(grdFuturePlanRow row, HcpLiteVoCollection hcpCollection)
{
    // Clear the QueryCombobox
    row.getColHCP().clear();
    row.getColHCP().setEditedText(null);

    // Terminate function if HCP collection is null
    if (hcpCollection == null || hcpCollection.size() == 0)
        return;

    for (HcpLiteVo value : hcpCollection)
    {
        row.getColHCP().newRow(value, value.getName().toString());
    }

    if (hcpCollection.size() == 1)
    {
        row.getColHCP().setValue(hcpCollection.get(0));
    }
    else
    {
        row.getColHCP().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateDataFromGrid()
{
    form.getGlobalContext().Scheduling.setSelectedHCPs(null);

    if (form.grdSelectedHcps().getRows().size() == 0)
        return;

    HcpLiteVoCollection hcpColl = new HcpLiteVoCollection();

    for (int i = 0; i < form.grdSelectedHcps().getRows().size(); i++)
    {
        grdSelectedHcpsRow row = form.grdSelectedHcps().getRows().get(i);

        if (Boolean.TRUE.equals(row.getColSelected()))
        {
            hcpColl.add(row.getValue());
        }
    }

    form.getGlobalContext().Scheduling.setSelectedHCPs(hcpColl);

}
项目:AvoinApotti    文件:Logic.java   
private String getSelectedHcpsIds(HcpLiteVoCollection selectedHCPs)
{
    if (selectedHCPs == null || selectedHCPs.size() ==0)
        return null;
    StringBuilder iDS = new StringBuilder();
    String commaStr = "";
    for (int i=0;i<selectedHCPs.size();i++)
    {
        if (selectedHCPs.get(i) != null)
        {
            iDS.append(commaStr + selectedHCPs.get(i).getMos().getID_MemberOfStaff());
            commaStr = ", ";
        }
    }
    return iDS.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void populateHcpToSelectGrid(HcpLiteVoCollection hcpColl)
{
    form.grdHcpToSelect().getRows().clear();        

    if (hcpColl == null || hcpColl.size() == 0)
        return;

    for (int i = 0; i < hcpColl.size(); i++)
    {
        grdHcpToSelectRow newRow = form.grdHcpToSelect().getRows().newRow();

        HcpLiteVo hcp = hcpColl.get(i);

        if (hcp == null)
            continue;

        newRow.setColName(hcp.getName() != null ? hcp.getName().toString() : "");
        newRow.setColSelect(false);

        newRow.setValue(hcp);       
    }   
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdListOwnerGridQueryComboBoxTextSubmited(int column, grdListOwnerRow row, String text) throws PresentationLogicException
{
    row.getColHcp().clear();

    HcpFilter filter = new HcpFilter();
    PersonName voName = new PersonName();
    voName.setSurname(text);
    filter.setQueryName(voName);

    HcpLiteVoCollection voCollHcp = domain.listHcpLite(filter);
    if (voCollHcp.size() == 0)
    {
        engine.showMessage("No matching records found");
        return;
    }

    for (int i = 0; i < voCollHcp.size(); i++)
    {
        row.getColHcp().newRow(voCollHcp.get(i), voCollHcp.get(i).getName().toString());
    }

    if (voCollHcp.size() == 1)
        row.getColHcp().setValue(voCollHcp.get(0));
    else
        row.getColHcp().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbPerfByTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
      form.qmbPerfBy().clear();

      HcpLiteVoCollection hcpColl = domain.listHcpLiteByName(value);

    if(hcpColl != null)
    {
      for (int i = 0; i < hcpColl.size(); i++)
      {
            HcpLiteVo hcp = hcpColl.get(i);
            form.qmbPerfBy().newRow(hcp, hcp.toString());           
       }

       if (hcpColl.size() == 1)
       {
            form.qmbPerfBy().setValue(hcpColl.get(0));
        }
        else if (hcpColl.size() > 1)
       {
        form.qmbPerfBy().showOpened();      
       }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbSurgeonTextSubmited(String value) throws PresentationLogicException {
    if (value != null)
    {
        HcpFilter voHCPFilter = new HcpFilter();
        PersonName name = new PersonName();
        name.setSurname(value);
        voHCPFilter.setQueryName(name);
        voHCPFilter.setHcpType(HcpDisType.MEDICAL);

        HcpLiteVoCollection voColl = domain.listHCPs(voHCPFilter);

        voColl.sort();
        form.qmbSurgeon().clear();
        for (int i = 0; i < voColl.size(); i++)
        {
            form.qmbSurgeon().newRow(voColl.get(i), voColl.get(i).getIHcpName());
        }
        if (voColl.size() == 1)
            form.qmbSurgeon().setValue(voColl.get(0));
        else if (voColl.size() > 1)
            form.qmbSurgeon().showOpened();
    }       
}
项目:AvoinApotti    文件:Logic.java   
private void populateReviweingHCP(HcpLiteVoCollection reviewingHCPs)
{
    form.qmbReviewingHCP().clear();

    if (reviewingHCPs == null)
        return;

    for (HcpLiteVo hcp : reviewingHCPs)
    {
        form.qmbReviewingHCP().newRow(hcp, hcp.getName() != null ? hcp.getName().toString() : "<unknown HCP>");
    }

    if (reviewingHCPs.size() != 1)
    {
        form.qmbReviewingHCP().showOpened();
    }
    else if (reviewingHCPs.size() == 1)
    {
        form.qmbReviewingHCP().setValue(reviewingHCPs.get(0));
        form.chkReview().setValue(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbClinicianTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    HcpLiteVoCollection coll = domain.listClinicians("%" + value + "%");

    form.qmbClinician().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        //   WDEV-8204
        form.qmbClinician().newRow(coll.get(i), coll.get(i).getName().toString());//.getSurname() + " " + coll.get(i).getName().getForename());
    }

    if(coll.size() == 1)
    {
        form.qmbClinician().setValue(coll.get(0));
    }
    else if(coll.size() > 1)
    {
        form.qmbClinician().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private HcpLiteVoCollection getExistentConsultantsFromGrid()
{
    if (form.ctnDetails().grdConsultants().getRows().size()==0)
        return null;

    HcpLiteVoCollection collCons = new HcpLiteVoCollection();

    for (int i=0;i<form.ctnDetails().grdConsultants().getRows().size();i++)
    {
        if (form.ctnDetails().grdConsultants().getRows().get(i).getColConsultants().getValue()==null)
            continue;

        collCons.add((HcpLiteVo) form.ctnDetails().grdConsultants().getRows().get(i).getColConsultants().getValue());
    }

    return collCons;
}