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

项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void fillHospitalListCombo()
{
    LocMostVo locationFilter = new LocMostVo();
    locationFilter.setType(LocationType.HOSP);
    locationFilter.setIsActive(Boolean.TRUE);
    // Wards are used in 2 different tabs so if wards already retrieved dont
    // hit DB
    LocMostVoCollection voCollHospitals = null;
    voCollHospitals = domain.listLocations(locationFilter);
    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).getName());
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void fillWardListCombo()
{
    LocMostVo filter = new LocMostVo();
    filter.setType(LocationType.WARD);
    filter.setParentLocation(form.cmbHospital().getValue());
    filter.setIsActive(Boolean.TRUE);
    filter.setIsVirtual(Boolean.FALSE);


    LocMostVoCollection voColl = domain.listLocations(filter);
    for (int i = 0; i < voColl.size(); i++)
    {
        LocMostVo ward = voColl.get(i);
        form.cmbWard().newRow(ward, ward.getName());
    }

}
项目:AvoinApotti    文件:Logic.java   
private void fillHospitalListCombo()
{
    LocMostVo locationFilter = new LocMostVo();
    locationFilter.setType(LocationType.HOSP);
    locationFilter.setIsActive(Boolean.TRUE);
    // Wards are used in 2 different tabs so if wards already retrieved dont
    // hit DB
    LocMostVoCollection voCollHospitals = null;
    voCollHospitals = domain.listLocations(locationFilter);
    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).getName());
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onCmbHospitalValueChanged() throws PresentationLogicException
{
    form.cmbPatient().clear();
    form.cmbWard().clear();
    form.grdCarePlans().getRows().clear();
    if (form.cmbHospital().getValue() == null)
        return;

    LocMostVo voHospital = form.cmbHospital().getValue();
    form.getGlobalContext().Core.setHospital(voHospital);
    if (form.cmbHospital().getValue().getType() != null)
    {
        if (form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
        {
            fillWardListCombo();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void fillWardListCombo()
{
    form.imbRefresh().setEnabled(false);
    LocMostVo filter = new LocMostVo();
    filter.setType(LocationType.WARD);
    filter.setIsActive(Boolean.TRUE);
    filter.setParentLocation(form.cmbHospital().getValue());

    LocMostVoCollection voColl = domain.listLocations(filter);
    for (int i = 0; i < voColl.size(); i++)
    {
        LocMostVo ward = voColl.get(i);
        form.cmbWard().newRow(ward, ward.getName());
    }

}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    loadHospitals();

    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());

        if (voLoc != null && LocationType.WARD.equals(voLoc.getType()))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());
            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
    initializeDynamicGrid();
    updateControlsState();

}
项目:AvoinApotti    文件:Logic.java   
private void initialise()
{

    form.Tranfers().setValue(GenForm.TranfersEnumeration.rdoPendingTransfers);
    initializeDynamicGrid(true);
    loadHospitals();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    if (form.cmbCurrentHosp().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbCurrentHosp().setValue(voLoc.getParentLocation());

            form.qmbCurrentWard().newRow(voLoc, voLoc.getName());
            form.qmbCurrentWard().setValue(voLoc);
        }
    }

    loadAlerts();
}
项目:AvoinApotti    文件:Logic.java   
private void initialize() 
{
    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
    form.chkTCIOnly().setVisible(false);

    initializeDynamicGrid();
}
项目:AvoinApotti    文件:Logic.java   
private void initialize() 
{
    loadAlerts();
    initializeDynamicGrid();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialise()
{
    clearControls();
    //Load the list of active hospitals in order to fill the current hospital combo.
    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    loadHospitals();
    if (form.cmbCurrentHospital().getValue() == null && engine.getCurrentLocation() != null)

    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbCurrentHospital().setValue(voLoc.getParentLocation());

            form.cmbCurrentWard().newRow(voLoc, voLoc.getName());
            form.cmbCurrentWard().setValue(voLoc);
        }
    }


}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    form.getLocalContext().setbTimerOn(false);

    clearControls();
    loadHospitals();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    setWatchDefaultButtonState();
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasActiveChildren(OrganisationVo vo)
{
    if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
        (vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
        return false;

    for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
    {
        OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
        if (orgVo.getIsActive().booleanValue())
            return true;
        if (hasActiveChildren(orgVo))
            return true;            
    }
    for (int i = 0; i < vo.getLocationSites().size(); i++)
    {
        LocMostVo locVo = vo.getLocationSites().get(i);
        if (locVo.getIsActive().booleanValue())
            return true;
        if (hasActiveChildren(locVo))
            return true;            
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void editItem()
{
    TreeNode node = form.treOrgLoc().getSelectedNode();
    if (node == null)
        return;

    if (node.getValue() instanceof OrganisationVo)
    {
        form.getLocalContext().setEditObject((OrganisationVo) node.getValue());
        form.ctn1().lyr1().tabOrg().txtOrgName().setFocus();
    }
    else if (node.getValue() instanceof LocSiteVo)
    {
        form.getLocalContext().setEditObject((LocSiteVo) node.getValue());
        form.ctn1().lyr1().tabLocSite().txtLocSiteName().setFocus();
    }
    else if (node.getValue() instanceof LocMostVo)
    {
        form.getLocalContext().setEditObject((LocMostVo) node.getValue());
        form.ctn1().lyr1().tabLoc().txtLocName().setFocus();
    }

    hideContextMenus();
    setFormMode(FormMode.EDIT);
    form.getContextMenus().getGenericGridAddItem().setVisible(true);        
}
项目:AvoinApotti    文件:Logic.java   
private void save(OrganisationVo voOrg, LocSiteVo voLocSite, LocMostVo voLoc) throws UniqueKeyViolationException, StaleObjectException 
{
    if (voOrg != null)
    {   
        domain.saveOrganisation(voOrg);
    }
    else if (voLocSite != null)
    {   
        //wdev-12855
        if(form.getLocalContext().getEditObject() instanceof LocSiteVo && ((LocSiteVo)form.getLocalContext().getEditObject()).getID_LocationIsNotNull() && voLocSite.getVersion_Location() != ((LocSiteVo)form.getLocalContext().getEditObject()).getVersion_Location())
            throw new StaleObjectException(null);

        domain.saveLocationSite(voLocSite);
    }
    else if (voLoc != null)
    {
        //wdev-12855
        if(form.getLocalContext().getEditObject() instanceof LocMostVo && ((LocMostVo)form.getLocalContext().getEditObject()).getID_LocationIsNotNull() && voLoc.getVersion_Location() != ((LocMostVo)form.getLocalContext().getEditObject()).getVersion_Location())
            throw new StaleObjectException(null);
        domain.saveLocation(voLoc);
    }
    form.getLocalContext().setSavingRootOrg(null);
}
项目:AvoinApotti    文件:OrgTreeHelper.java   
private void populateLocations(LocMostVoCollection locations, TreeNode parentNode)
{
    if (locations == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locations.size(); i++)
    {
        LocMostVo voLoc = locations.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locImg: locDisImg;         

        //WDEV-6444 - if node is inactive disable drag dropping for that node
        if(voLoc.getIsActive().booleanValue() == false)
            locNode = parentNode.getNodes().add(voLoc, voLoc.getName());
        else
            locNode = parentNode.getNodes().add(voLoc, voLoc.getName(), LOC_NODE, new int[]{LS_NODE,LOC_NODE}, true);

        locNode.setCollapsedImage(img);
        locNode.setExpandedImage(img);  
        locNode.setCheckBoxVisible(showCheckBoxes);
        populateLocations(voLoc.getLocations().sort(), locNode);
    }       
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public LocMostVoCollection listLocation(LocMostVo locationFilter)
    {
        List locations;
        if (locationFilter == null)
        {
//          wdev-2730
            StringBuffer hql = new StringBuffer();
            hql.append(" from LocSite as ls");
            hql.append(" where");
            hql.append(" and ls.isActive =:active");
            hql.append(" and ls.isRIE is null");
            hql.append(" and ls.isVirtual =:virtual");

            locations = getDomainFactory().find(hql.toString(), new String[]{"active", "virtual"}, new Object[]{Boolean.TRUE, Boolean.FALSE});
        }
        else
        {
            locations = listLocationsByParentLocation(locationFilter.getType(),locationFilter.getParentLocation(),locationFilter.getIsActive(),locationFilter.getReferringHospital(),locationFilter.getTreatingHosp(), null);
        }

        return LocMostVoAssembler.createLocMostVoCollectionFromLocation(locations).sort();
    }
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public LocMostVo getLocationByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from Location l where l.address.postCode = :postCode ";

    List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

    if (locList != null && locList.size() == 1)
    {
        return LocMostVoAssembler.create((Location) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on Location by Post Code " + postCode);
    }
    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 admitPatient() 
{
    form.getGlobalContext().RefMan.setDayCaseAdmApptTime(form.grdResults().getSelectedRow().getcolApptTime());
    form.getGlobalContext().RefMan.setDayCaseAdmApptDate(form.grdResults().getSelectedRow().getValue().getAppointmentDate());
    form.getGlobalContext().RefMan.setDayCaseAdmClinicName(form.grdResults().getSelectedRow().getValue().getSession().getName());

    form.getGlobalContext().Scheduling.setBookingAppointmentRef(form.grdResults().getSelectedRow().getValue());

    if (form.grdResults().getSelectedRow().getValue().getSession().getSchLocation().getTypeIsNotNull()
        && form.grdResults().getSelectedRow().getValue().getSession().getSchLocation().getType().equals(LocationType.HOSP))
        form.getGlobalContext().Core.setHospitalLoc(form.grdResults().getSelectedRow().getValue().getSessionIsNotNull() ? form.grdResults().getSelectedRow().getValue().getSession().getSchLocation() : null);
    else 
        form.getGlobalContext().Core.setHospitalLoc(new LocMostVo(form.cmbHospital().getValue().getID_Location(), 0));

    engine.open(form.getForms().RefMan.DayCaseAdmissionDialog);
}
项目:AvoinApotti    文件:EDischargeListImpl.java   
private LocationRefVo getHospital(ims.core.resource.place.vo.LocationRefVo voRef)
{
    LocMostVo voLocation = LocMostVoAssembler.create((Location)getDomainFactory().getDomainObject(voRef));

    if(voLocation != null && voLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return (LocationRefVo) voLocation;

    while(voLocation != null && voLocation.getParentLocation() != null)
    {
        voLocation = voLocation.getParentLocation();
        if((voLocation instanceof LocMostVo) && (voLocation.getType().equals(LocationType.HOSP)))
            return (LocationRefVo) voLocation;
    }

    return voRef;
}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveComponentImpl.java   
private LocationRefVo getHospital(ims.core.resource.place.vo.LocationRefVo voRef)
{
    LocMostVo voLocation = LocMostVoAssembler.create((Location)getDomainFactory().getDomainObject(voRef));

    if(voLocation != null && voLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return (LocationRefVo) voLocation;

    while(voLocation != null && voLocation.getParentLocation() != null)
    {
        voLocation = voLocation.getParentLocation();
        if(voLocation instanceof LocMostVo && voLocation.getType().equals(LocationType.HOSP))
            return (LocationRefVo) voLocation;
    }

    return voRef;
}
项目:openMAXIMS    文件:Logic.java   
private void fillHospitalListCombo()
{
    LocMostVo locationFilter = new LocMostVo();
    locationFilter.setType(LocationType.HOSP);
    locationFilter.setIsActive(Boolean.TRUE);
    // Wards are used in 2 different tabs so if wards already retrieved dont
    // hit DB
    LocMostVoCollection voCollHospitals = null;
    voCollHospitals = domain.listLocations(locationFilter);
    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).getName());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbHospitalValueChanged() throws PresentationLogicException
{
    form.cmbPatient().clear();
    form.cmbWard().clear();
    form.grdCarePlans().getRows().clear();
    form.getGlobalContext().COE.CarePlanReview.setSearchCriteria(getSearchCriteria()); //WDEV-19389 
    if (form.cmbHospital().getValue() == null)
        return;

    LocMostVo voHospital = form.cmbHospital().getValue();
    form.getGlobalContext().Core.setHospital(voHospital);
    if (form.cmbHospital().getValue().getType() != null)
    {
        if (form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
        {
            fillWardListCombo();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void fillWardListCombo()
{
    form.imbRefresh().setEnabled(false);
    LocMostVo filter = new LocMostVo();
    filter.setType(LocationType.WARD);
    filter.setIsActive(Boolean.TRUE);
    filter.setParentLocation(form.cmbHospital().getValue());

    LocMostVoCollection voColl = domain.listLocations(filter);
    for (int i = 0; i < voColl.size(); i++)
    {
        LocMostVo ward = voColl.get(i);
        form.cmbWard().newRow(ward, ward.getName());
    }

}
项目:openmaxims-linux    文件:OrgTreeHelper.java   
private void populateLocations(LocMostVoCollection locations, TreeNode parentNode)
{
    if (locations == null)
        return;

    TreeNode locNode = null;
    for(int i=0; i < locations.size(); i++)
    {
        LocMostVo voLoc = locations.get(i); 
        if (voLoc.getIsActive().booleanValue() == false && !showInactive)
            continue;

        Image img = voLoc.getIsActive().booleanValue() ? locImg: locDisImg;         

        //WDEV-6444 - if node is inactive disable drag dropping for that node
        if(voLoc.getIsActive().booleanValue() == false)
            locNode = parentNode.getNodes().add(voLoc, voLoc.getName());
        else
            locNode = parentNode.getNodes().add(voLoc, voLoc.getName(), LOC_NODE, new int[]{LS_NODE,LOC_NODE}, true);

        locNode.setCollapsedImage(img);
        locNode.setExpandedImage(img);  
        locNode.setCheckBoxVisible(showCheckBoxes);
        populateLocations(voLoc.getLocations().sort(), locNode);
    }       
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasActiveChildren(OrganisationVo vo)
{
    if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
        (vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
        return false;

    for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
    {
        OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
        if (orgVo.getIsActive().booleanValue())
            return true;
        if (hasActiveChildren(orgVo))
            return true;            
    }
    for (int i = 0; i < vo.getLocationSites().size(); i++)
    {
        LocMostVo locVo = vo.getLocationSites().get(i);
        if (locVo.getIsActive().booleanValue())
            return true;
        if (hasActiveChildren(locVo))
            return true;            
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void initialize() 
{
    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
    form.chkTCIOnly().setVisible(false);

    initializeDynamicGrid();
}
项目:openmaxims-linux    文件:EDischargeListImpl.java   
private LocationRefVo getHospital(ims.core.resource.place.vo.LocationRefVo voRef)
{
    LocMostVo voLocation = LocMostVoAssembler.create((Location)getDomainFactory().getDomainObject(voRef));

    if(voLocation != null && voLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return (LocationRefVo) voLocation;

    while(voLocation != null && voLocation.getParentLocation() != null)
    {
        voLocation = voLocation.getParentLocation();
        if((voLocation instanceof LocMostVo) && (voLocation.getType().equals(LocationType.HOSP)))
            return (LocationRefVo) voLocation;
    }

    return voRef;
}
项目:openMAXIMS    文件:Logic.java   
private LocationLiteVo getHospitalForLocation(LocMostVo location)
{

    if (LocationType.HOSP.equals(location.getType()))
        return  location;

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

        if (LocationType.HOSP.equals(location.getType()))
            return  location;

    }

    return  null;
}
项目:openMAXIMS    文件:Logic.java   
private void initialise()
{

    form.Tranfers().setValue(GenForm.TranfersEnumeration.rdoPendingTransfers);
    initializeDynamicGrid(true);
    loadHospitals();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    if (form.cmbCurrentHosp().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());
        LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation()); //WDEV-20707
        if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD))
        {
            //form.cmbCurrentHosp().setValue(voLoc.getParentLocation());
            form.cmbCurrentHosp().setValue(currentHospital); //WDEV-20707

            form.qmbCurrentWard().newRow(voLoc, voLoc.getName());
            form.qmbCurrentWard().setValue(voLoc);
        }
    }

    loadAlerts();
}
项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation()); //WDEV-20707
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            //form.cmbHospital().setValue(voLoc.getParentLocation());
            form.cmbHospital().setValue(currentHospital); //WDEV-20707

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
    form.chkTCIOnly().setVisible(false);

    initializeDynamicGrid();
}
项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    loadAlerts();
    initializeDynamicGrid();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation()); //WDEV-20707

        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            //form.cmbHospital().setValue(voLoc.getParentLocation());
            form.cmbHospital().setValue(currentHospital);//WDEV-20707

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void initialise()
{

    form.Tranfers().setValue(GenForm.TranfersEnumeration.rdoPendingTransfers);
    initializeDynamicGrid(true);
    loadHospitals();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    if (form.cmbCurrentHosp().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbCurrentHosp().setValue(voLoc.getParentLocation());

            form.qmbCurrentWard().newRow(voLoc, voLoc.getName());
            form.qmbCurrentWard().setValue(voLoc);
        }
    }

    loadAlerts();
}
项目:openmaxims-linux    文件:Logic.java   
private void fillWardListCombo()
{
    LocMostVo filter = new LocMostVo();
    filter.setType(LocationType.WARD);
    filter.setParentLocation(form.cmbHospital().getValue());
    filter.setIsActive(Boolean.TRUE);
    filter.setIsVirtual(Boolean.FALSE);


    LocMostVoCollection voColl = domain.listLocations(filter);
    for (int i = 0; i < voColl.size(); i++)
    {
        LocMostVo ward = voColl.get(i);
        form.cmbWard().newRow(ward, ward.getName());
    }

}
项目:openMAXIMS    文件:Logic.java   
private boolean hasActiveChildren(OrganisationVo vo)
{
    if ((vo.getRelatedOrganisations() == null || vo.getRelatedOrganisations().size() == 0) &&
        (vo.getLocationSites() == null || vo.getLocationSites().size() == 0))
        return false;

    for (int i = 0; i < vo.getRelatedOrganisations().size(); i++)
    {
        OrganisationVo orgVo = vo.getRelatedOrganisations().get(i);
        if (orgVo.getIsActive().booleanValue())
            return true;
        if (hasActiveChildren(orgVo))
            return true;            
    }
    for (int i = 0; i < vo.getLocationSites().size(); i++)
    {
        LocMostVo locVo = vo.getLocationSites().get(i);
        if (locVo.getIsActive().booleanValue())
            return true;
        if (hasActiveChildren(locVo))
            return true;            
    }
    return false;
}
项目: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-linux    文件:Logic.java   
private void fillHospitalListCombo()
{
    LocMostVo locationFilter = new LocMostVo();
    locationFilter.setType(LocationType.HOSP);
    locationFilter.setIsActive(Boolean.TRUE);
    // Wards are used in 2 different tabs so if wards already retrieved dont
    // hit DB
    LocMostVoCollection voCollHospitals = null;
    voCollHospitals = domain.listLocations(locationFilter);
    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).getName());
        }
    }

}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocMostVo getLocationByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from Location l where l.address.postCode = :postCode ";

    List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

    if (locList != null && locList.size() == 1)
    {
        return LocMostVoAssembler.create((Location) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on Location by Post Code " + postCode);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void admitPatient() 
{
    form.getGlobalContext().RefMan.setDayCaseAdmApptTime(form.grdResults().getSelectedRow().getcolApptTime());
    form.getGlobalContext().RefMan.setDayCaseAdmApptDate(form.grdResults().getSelectedRow().getValue().getAppointmentDate());
    form.getGlobalContext().RefMan.setDayCaseAdmClinicName(form.grdResults().getSelectedRow().getValue().getSession().getName());

    form.getGlobalContext().Scheduling.setBookingAppointmentRef(form.grdResults().getSelectedRow().getValue());

    if (form.grdResults().getSelectedRow().getValue().getSession().getSchLocation().getTypeIsNotNull()
        && form.grdResults().getSelectedRow().getValue().getSession().getSchLocation().getType().equals(LocationType.HOSP))
        form.getGlobalContext().Core.setHospitalLoc(form.grdResults().getSelectedRow().getValue().getSessionIsNotNull() ? form.grdResults().getSelectedRow().getValue().getSession().getSchLocation() : null);
    else 
        form.getGlobalContext().Core.setHospitalLoc(new LocMostVo(form.cmbHospital().getValue().getID_Location(), 0));

    engine.open(form.getForms().RefMan.DayCaseAdmissionDialog);
}