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

项目:AvoinApotti    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateHospitalListCombo()
{
    LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
    if (voLocShortMapColl != null)
    {
        int currentLocName;
        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
            form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

            if (engine.getCurrentLocation() != null)
            {
                currentLocName = engine.getCurrentLocation().getID();
                if (currentLocName == voLocShortMap.getID())
                {
                    form.cmbHospital().setValue(voLocShortMap);
                }
            }
        }
        onCmbHospitalFilterValueChanged();
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbDestWardTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbDestWard().clear();
    LocShortMappingsVoCollection wards = domain.listWards(value);

    if (wards != null)
    {
        for (int i = 0; i < wards.size(); i++) 
        {
            form.ctnDetails().qmbDestWard().newRow(wards.get(i), wards.get(i).getName());
        }

        if (form.ctnDetails().qmbDestWard().getValues().size() == 1) 
        {
            form.ctnDetails().qmbDestWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
        }

        else if (form.ctnDetails().qmbDestWard().getValues().size() > 1) 
        {
            form.ctnDetails().qmbDestWard().showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbWard().clear();
    LocShortMappingsVoCollection wards = domain.listWards(value);

    if(wards != null)
    {
        for (int i = 0; i < wards.size(); i++)
        {
            form.ctnDetails().qmbWard().newRow(wards.get(i), wards.get(i).getName());
        }

        if(form.ctnDetails().qmbWard().getValues().size() == 1)
        {
            form.ctnDetails().qmbWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
        }

        else if(form.ctnDetails().qmbWard().getValues().size() > 1)
        {
            form.ctnDetails().qmbWard().showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:AvoinApotti    文件:PendingDischargesImpl.java   
public LocationLiteVoCollection getWards(Integer hospital) 
{
    DomainFactory factory = getDomainFactory();
    OrganisationAndLocation impl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
    LocationRefVo loc=new LocationRefVo();
    loc.setID_Location(hospital);
    LocShortMappingsVoCollection wards = impl.listActiveWardsForHospital(loc);
    LocationLiteVoCollection locations=new LocationLiteVoCollection();

    if (wards.size()>0)
    {
        for (int i=0;i<wards.size();i++)
        {
            LocationLiteVo location=new LocationLiteVo();
            location=wards.get(i);
            locations.add(location);
        }

    }
    return locations;

}
项目:AvoinApotti    文件:InpatientListImpl.java   
/**
* list all Wards for the supplied Hospital. For each Ward retrieved get the PAS Mapping. Return a delimiter string of Ward Mappings 
*/
private String listWardMappingsForHospital(LocationRefVo hospital)
{
    String strListLocalCodes = "";
    OrganisationAndLocation locImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
    LocShortMappingsVoCollection voLocShortColl = locImpl.listActiveWardsForHospital(hospital);

    if (voLocShortColl != null && voLocShortColl.size() > 0)
    {
        String delim = "|";

        for(int i=0; i<voLocShortColl.size(); i++)
        {
            LocShortMappingsVo voLocShort = voLocShortColl.get(i);
            strListLocalCodes += voLocShort.getPasMapping();
            if(voLocShortColl.size() - i == 2)
                strListLocalCodes += delim;
        }
    }
    return strListLocalCodes;
}
项目:AvoinApotti    文件:Logic.java   
private void populateLocationCombo()
{
    form.cmbLocation().clear();

    if (form.cmbHospital().getValue() == null)
        return;

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());

        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateHospitals()
{
    LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

    ILocation defaultLoc = domain.getCurrentLocation();
    LocationLiteVo hospital  = null;//  WDEV-14957

    if(defaultLoc != null)//    WDEV-14957
    {
        hospital = domain.getHospitalForCurrentLocation(defaultLoc);
    }

    for (int i = 0; i < coll.size(); i++)
    {
        form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
    }

    form.cmbHospital().setValue(hospital);//    WDEV-14957
}
项目:AvoinApotti    文件:Logic.java   
private void loadHospitalCombo()
{
    LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();

    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
        }
    }

    LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
    form.cmbHospital().setValue(currentHospital);

    hospitalValueChanged();
}
项目:AvoinApotti    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    LocShortMappingsVoCollection activeWards = null;
    activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
    if (activeWards != null)
    {
        for (int i = 0; i < activeWards.size(); i++)
        {
            LocShortMappingsVo activeWard = activeWards.get(i);
            form.cmbWard().newRow(activeWard, activeWard.getName());
        }
    }

    if (form.getLocalContext().getPasEventLocationIsNotNull())
    {
        LocMostVo location = form.getLocalContext().getPasEventLocation();

        if (location != null && LocationType.WARD.equals(location.getType()))
            form.cmbWard().setValue(location);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.getGlobalContext().Core.getHospitalLoc());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateHospitalListCombo()
{
    LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
    if (voLocShortMapColl != null)
    {
        int currentLocName;
        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
            form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

            if (engine.getCurrentLocation() != null)
            {
                currentLocName = engine.getCurrentLocation().getID();
                if (currentLocName == voLocShortMap.getID())
                {
                    form.cmbHospital().setValue(voLocShortMap);
                }
            }
        }
        onCmbHospitalFilterValueChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbWard().clear();
    LocShortMappingsVoCollection wards = domain.listWards(value);

    if(wards != null)
    {
        for (int i = 0; i < wards.size(); i++)
        {
            form.ctnDetails().qmbWard().newRow(wards.get(i), wards.get(i).getName());
        }

        if(form.ctnDetails().qmbWard().getValues().size() == 1)
        {
            form.ctnDetails().qmbWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
        }

        else if(form.ctnDetails().qmbWard().getValues().size() > 1)
        {
            form.ctnDetails().qmbWard().showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

    ILocation currentLocation = engine.getCurrentLocation();
    LocationLiteVo currentWard = domain.getWard((LocationRefVo) currentLocation);
    if (currentWard != null && LocationType.WARD.equals(currentWard.getType()))         // Check ward LocationType because the function "domain.getWard" will return any location passed as argument
    {                                                                                   // Whoever named & coded that function was a "GENIUS"
        form.cmbWard().setValue(currentWard);
    }
}
项目:openMAXIMS    文件:PendingDischargesImpl.java   
public LocationLiteVoCollection getWards(Integer hospital) 
{
    DomainFactory factory = getDomainFactory();
    OrganisationAndLocation impl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
    LocationRefVo loc=new LocationRefVo();
    loc.setID_Location(hospital);
    LocShortMappingsVoCollection wards = impl.listActiveWardsForHospital(loc);
    LocationLiteVoCollection locations=new LocationLiteVoCollection();

    if (wards.size()>0)
    {
        for (int i=0;i<wards.size();i++)
        {
            LocationLiteVo location=new LocationLiteVo();
            location=wards.get(i);
            locations.add(location);
        }

    }
    return locations;

}
项目:openMAXIMS    文件:InpatientListImpl.java   
/**
* list all Wards for the supplied Hospital. For each Ward retrieved get the PAS Mapping. Return a delimiter string of Ward Mappings 
*/
private String listWardMappingsForHospital(LocationRefVo hospital)
{
    String strListLocalCodes = "";
    OrganisationAndLocation locImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
    LocShortMappingsVoCollection voLocShortColl = locImpl.listActiveWardsForHospital(hospital);

    if (voLocShortColl != null && voLocShortColl.size() > 0)
    {
        String delim = "|";

        for(int i=0; i<voLocShortColl.size(); i++)
        {
            LocShortMappingsVo voLocShort = voLocShortColl.get(i);
            strListLocalCodes += voLocShort.getPasMapping();
            if(voLocShortColl.size() - i == 2)
                strListLocalCodes += delim;
        }
    }
    return strListLocalCodes;
}
项目:openMAXIMS    文件:InpatientListImpl.java   
private String getWardIds(LocShortMappingsVoCollection wards)
{
    if (wards == null || wards.size() == 0)
        return "";

    StringBuilder idList = new StringBuilder();
    idList.append("(");
    for (int i=0; i<wards.size();i++)
    {
        if (wards.get(i) == null)
            continue;
        idList.append(wards.get(i).getID_Location().toString()).append(i == wards.size() - 1 ? ")": ", ");          
    }

    return idList.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void populateLocationCombo()
{
    form.cmbLocation().clear();

    if (form.cmbHospital().getValue() == null)
        return;

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveLocationsForHospital(form.cmbHospital().getValue());

        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateLocationCombo()
{
    form.cmbLocation().clear();

    if (form.cmbHospital().getValue() == null)
        return;

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveLocationsForHospital(form.cmbHospital().getValue());

        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateHospitals()
{
    LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

    ILocation defaultLoc = domain.getCurrentLocation();
    LocationLiteVo hospital  = null;//  WDEV-14957

    if(defaultLoc != null)//    WDEV-14957
    {
        hospital = domain.getHospitalForCurrentLocation(defaultLoc);
    }

    for (int i = 0; i < coll.size(); i++)
    {
        form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
    }

    form.cmbHospital().setValue(hospital);//    WDEV-14957
}
项目:openMAXIMS    文件:Logic.java   
private void loadHospitalCombo()
{
    LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();

    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
        }
    }

    LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
    form.cmbHospital().setValue(currentHospital);

    hospitalValueChanged();
}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    LocShortMappingsVoCollection activeWards = null;
    activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
    if (activeWards != null)
    {
        for (int i = 0; i < activeWards.size(); i++)
        {
            LocShortMappingsVo activeWard = activeWards.get(i);
            form.cmbWard().newRow(activeWard, activeWard.getName());
        }
    }

    if (form.getLocalContext().getPasEventLocationIsNotNull())
    {
        LocMostVo location = form.getLocalContext().getPasEventLocation();

        if (location != null && LocationType.WARD.equals(location.getType()))
            form.cmbWard().setValue(location);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.getGlobalContext().Core.getHospitalLoc());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateHospitalListCombo()
{
    LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
    if (voLocShortMapColl != null)
    {
        int currentLocName;
        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
            form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

            if (engine.getCurrentLocation() != null)
            {
                currentLocName = engine.getCurrentLocation().getID();
                if (currentLocName == voLocShortMap.getID())
                {
                    form.cmbHospital().setValue(voLocShortMap);
                }
            }
        }
        onCmbHospitalFilterValueChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbDestWardTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbDestWard().clear();
    LocShortMappingsVoCollection wards = domain.listWards(value);

    if (wards != null)
    {
        for (int i = 0; i < wards.size(); i++) 
        {
            form.ctnDetails().qmbDestWard().newRow(wards.get(i), wards.get(i).getName());
        }

        if (form.ctnDetails().qmbDestWard().getValues().size() == 1) 
        {
            form.ctnDetails().qmbDestWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
        }

        else if (form.ctnDetails().qmbDestWard().getValues().size() > 1) 
        {
            form.ctnDetails().qmbDestWard().showOpened();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateHospitals()
{
    LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

    ILocation defaultLoc = domain.getCurrentLocation();
    LocationLiteVo hospital  = null;//  WDEV-14957

    if(defaultLoc != null)//    WDEV-14957
    {
        hospital = domain.getHospitalForCurrentLocation(defaultLoc);
    }

    for (int i = 0; i < coll.size(); i++)
    {
        form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
    }

    form.cmbHospital().setValue(hospital);//    WDEV-14957
}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:openMAXIMS    文件:PendingDischargesImpl.java   
public LocationLiteVoCollection getWards(Integer hospital) 
{
    DomainFactory factory = getDomainFactory();
    OrganisationAndLocation impl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
    LocationRefVo loc=new LocationRefVo();
    loc.setID_Location(hospital);
    LocShortMappingsVoCollection wards = impl.listActiveWardsForHospital(loc);
    LocationLiteVoCollection locations=new LocationLiteVoCollection();

    if (wards.size()>0)
    {
        for (int i=0;i<wards.size();i++)
        {
            LocationLiteVo location=new LocationLiteVo();
            location=wards.get(i);
            locations.add(location);
        }

    }
    return locations;

}
项目:openMAXIMS    文件:InpatientListImpl.java   
/**
* list all Wards for the supplied Hospital. For each Ward retrieved get the PAS Mapping. Return a delimiter string of Ward Mappings 
*/
private String listWardMappingsForHospital(LocationRefVo hospital)
{
    String strListLocalCodes = "";
    OrganisationAndLocation locImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
    LocShortMappingsVoCollection voLocShortColl = locImpl.listActiveWardsForHospital(hospital);

    if (voLocShortColl != null && voLocShortColl.size() > 0)
    {
        String delim = "|";

        for(int i=0; i<voLocShortColl.size(); i++)
        {
            LocShortMappingsVo voLocShort = voLocShortColl.get(i);
            strListLocalCodes += voLocShort.getPasMapping();
            if(voLocShortColl.size() - i == 2)
                strListLocalCodes += delim;
        }
    }
    return strListLocalCodes;
}
项目:openMAXIMS    文件:Logic.java   
private void populateHospitals()
{
    LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

    ILocation defaultLoc = domain.getCurrentLocation();
    LocationLiteVo hospital  = null;//  WDEV-14957

    if(defaultLoc != null)//    WDEV-14957
    {
        hospital = domain.getHospitalForCurrentLocation(defaultLoc);
    }

    for (int i = 0; i < coll.size(); i++)
    {
        form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
    }

    form.cmbHospital().setValue(hospital);//    WDEV-14957
}
项目:openMAXIMS    文件:Logic.java   
private void loadHospitalCombo()
{
    LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();

    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
        }
    }

    LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
    form.cmbHospital().setValue(currentHospital);

    hospitalValueChanged();
}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    LocShortMappingsVoCollection activeWards = null;
    activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
    if (activeWards != null)
    {
        for (int i = 0; i < activeWards.size(); i++)
        {
            LocShortMappingsVo activeWard = activeWards.get(i);
            form.cmbWard().newRow(activeWard, activeWard.getName());
        }
    }

    if (form.getLocalContext().getPasEventLocationIsNotNull())
    {
        LocMostVo location = form.getLocalContext().getPasEventLocation();

        if (location != null && LocationType.WARD.equals(location.getType()))
            form.cmbWard().setValue(location);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.getGlobalContext().Core.getHospitalLoc());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void loadHospitalCombo()
{
    LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();

    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
        }
    }

    LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
    form.cmbHospital().setValue(currentHospital);

    hospitalValueChanged();
}
项目:openmaxims-linux    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateHospitalListCombo()
{
    LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
    if (voLocShortMapColl != null)
    {
        int currentLocName;
        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
            form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

            if (engine.getCurrentLocation() != null)
            {
                currentLocName = engine.getCurrentLocation().getID();
                if (currentLocName == voLocShortMap.getID())
                {
                    form.cmbHospital().setValue(voLocShortMap);
                }
            }
        }
        onCmbHospitalFilterValueChanged();
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onQmbDestWardTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbDestWard().clear();
    LocShortMappingsVoCollection wards = domain.listWards(value);

    if (wards != null)
    {
        for (int i = 0; i < wards.size(); i++) 
        {
            form.ctnDetails().qmbDestWard().newRow(wards.get(i), wards.get(i).getName());
        }

        if (form.ctnDetails().qmbDestWard().getValues().size() == 1) 
        {
            form.ctnDetails().qmbDestWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
        }

        else if (form.ctnDetails().qmbDestWard().getValues().size() > 1) 
        {
            form.ctnDetails().qmbDestWard().showOpened();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbWard().clear();
    LocShortMappingsVoCollection wards = domain.listWards(value);

    if(wards != null)
    {
        for (int i = 0; i < wards.size(); i++)
        {
            form.ctnDetails().qmbWard().newRow(wards.get(i), wards.get(i).getName());
        }

        if(form.ctnDetails().qmbWard().getValues().size() == 1)
        {
            form.ctnDetails().qmbWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
        }

        else if(form.ctnDetails().qmbWard().getValues().size() > 1)
        {
            form.ctnDetails().qmbWard().showOpened();
        }
    }
}