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

项目: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    文件: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    文件:OrganisationAndLocationImpl.java   
/**
* Gets the Active Hospital mapping for a particular location by walking up the Location tree until it hits a Hospital.
* http://jira/browse/WDEV-11637
*/

public String getActiveHospitalCodeForLoc(LocShortMappingsVo loc,TaxonomyType taxonomyType) {
    DomainFactory factory = getDomainFactory();
    Location location = (Location)factory.getDomainObject(loc);
    if (location==null)
        return null;

    while (location!=null&&
            (location.isIsActive()&&location.getType()!=null&&!location.getType().equals(getDomLookup(LocationType.HOSP)))
            )
    {
        location=location.getParentLocation();
    }
    if(location!=null)
        return location.getExtCode(taxonomyType.getID());
    return null;
}
项目:AvoinApotti    文件:MoveToWardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目:AvoinApotti    文件:WardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目: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());
            }
        }
    }

}
项目:AvoinApotti    文件:TheatreAdmissionImpl.java   
public LocShortMappingsVo getBookingApptSessionLocation(Integer apptId) 
{
    if (apptId == null)
        return null;
    DomainFactory factory = getDomainFactory();     

    ArrayList<String> marques = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    marques.add("id");
    values.add(apptId); 
    marques.add("locTypeWardID");
    values.add(LocationType.WARD.getID());

    String query = " select sessionLocation from Booking_Appointment as apptDetails left join apptDetails.session as sessionDetails left join sessionDetails.schLocation as sessionLocation left join sessionLocation.type as locationType where ( apptDetails.id = :id and sessionLocation.isActive = 1 and locationType.id = :locTypeWardID ) ";
    List<?> sessionLoc = factory.find(query, marques, values);

    if(sessionLoc != null && sessionLoc.size() > 0 && sessionLoc.get(0) instanceof Location)
        return LocShortMappingsVoAssembler.create((Location) sessionLoc.get(0));

    return null;
}
项目: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 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    文件: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    文件: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 LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目: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 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    文件:MoveToWardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目:openMAXIMS    文件:WardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目: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    文件:TheatreAdmissionImpl.java   
public LocShortMappingsVo getBookingApptSessionLocation(Integer apptId) 
{
    if (apptId == null)
        return null;
    DomainFactory factory = getDomainFactory();     

    ArrayList<String> marques = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    marques.add("id");
    values.add(apptId); 
    marques.add("locTypeWardID");
    values.add(LocationType.WARD.getID());

    String query = " select sessionLocation from Booking_Appointment as apptDetails left join apptDetails.session as sessionDetails left join sessionDetails.schLocation as sessionLocation left join sessionLocation.type as locationType where ( apptDetails.id = :id and sessionLocation.isActive = 1 and locationType.id = :locTypeWardID ) ";
    List<?> sessionLoc = factory.find(query, marques, values);

    if(sessionLoc != null && sessionLoc.size() > 0 && sessionLoc.get(0) instanceof Location)
        return LocShortMappingsVoAssembler.create((Location) sessionLoc.get(0));

    return null;
}
项目: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 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    文件: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());
            }
        }
    }

}
项目: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 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());
            }
        }
    }

}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
/**
* Gets the Active Hospital mapping for a particular location by walking up the Location tree until it hits a Hospital.
* http://jira/browse/WDEV-11637
*/

public String getActiveHospitalCodeForLoc(LocShortMappingsVo loc,TaxonomyType taxonomyType) {
    DomainFactory factory = getDomainFactory();
    Location location = (Location)factory.getDomainObject(loc);
    if (location==null)
        return null;

    while (location!=null&&
            (location.isIsActive()&&location.getType()!=null&&!location.getType().equals(getDomLookup(LocationType.HOSP)))
            )
    {
        location=location.getParentLocation();
    }
    if(location!=null)
        return location.getExtCode(taxonomyType.getID());
    return null;
}
项目:openMAXIMS    文件:MoveToWardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目:openMAXIMS    文件:WardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目: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());
            }
        }
    }

}