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

项目:AvoinApotti    文件:Logic.java   
private boolean hasAllowedLocations(LocSiteLiteVo location, IAppUser user)
{
    LocationLiteVoCollection locationList = domain.listLocationsByLocationSite(location);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadData(TreeNode parentNode, LocSiteLiteVo locationSite)
{
    if (parentNode == null || locationSite == null)
        return;

    LocationLiteVoCollection locations = domain.listLocationsByLocationSite(locationSite);
    if (locations != null)
    {
        for (int x = 0; x < locations.size(); x++)
        {
            // ----------------------------------------
            if (locations.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locations.get(x));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(JobType.CENTRAL_BATCH_PRINT.equals(form.cmbType().getValue()) && !(form.qmbLocation().getValue() instanceof LocSiteLiteVo))
    {
        uiErrors.add("Location is mandatory.");     
    }
    else if(JobType.ORDERING_LOCATION_BATCH_PRINT.equals(form.cmbType().getValue()) && (form.grdReportsToPrint().getValues().length == 0))
    {
        uiErrors.add("Reports to be printed is mandatory.");        
    }

    if(JobType.DNA_BATCH_JOB.equals(form.cmbType().getValue()) && form.intHrs().getValue() == null)
    {
        uiErrors.add("Appts within last is mandatory.");    
    }

    String[] voValidate = new String[uiErrors.size()];
    uiErrors.toArray(voValidate);

    return voValidate;
}
项目:AvoinApotti    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:AvoinApotti    文件:Logic.java   
private void initialize() 
{
    populateHospitalCombo();

    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);

    form.cmbHospital().setValue(currentHospiptal);
    if(form.cmbHospital().getValue() != null && currentLocation instanceof LocationLiteVo)
    {
        listCurrentWards(form.cmbHospital().getValue(), null, false);
        form.qmbCurrentWard().setValue((LocationLiteVo) currentLocation);
    }

    form.ccConsultant().initialize(MosType.MEDIC);

    bindVTEAssessmentStatusCombo();

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

    form.getLocalContext().setWasTimerOn(false);
    form.getTimers().gettimerRefresh().setInterval(ConfigFlag.UI.VTE_RISK_ASSESSMENT_AUTO_REFRESH_TIME_SECONDS.getValue());
}
项目:AvoinApotti    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();

    form.chkNewAndActive().setValue(true);

    bindHospitalCombo();
    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);
    form.cmbHospital().setValue(currentHospiptal);
    setSearchCriteriaDates();

    bindWardCombo(currentHospiptal);
    if(currentLocation instanceof LocationLiteVo)
        form.cmbWard().setValue((LocationLiteVo) currentLocation);

    Object hcp = domain.getHcpLiteUser();
    if(hcp instanceof HcpLiteVo)
    {
        form.getLocalContext().setLoggedHCP((HcpLiteVo) hcp);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

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

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void bindWardCombo(LocSiteLiteVo locSiteLite) 
{
    form.cmbWard().clear();

    if(locSiteLite != null)
    {
        LocationLiteVoCollection wards = domain.listWards(locSiteLite);

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

        for(LocationLiteVo ward : wards)
        {
            if(ward == null)
                continue;

            form.cmbWard().newRow(ward, ward.getName());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(LocSiteLiteVo location, IAppUser user)
{
    LocationLiteVoCollection locationList = domain.listLocationsByLocationSite(location);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, LocSiteLiteVo locationSite)
{
    if (parentNode == null || locationSite == null)
        return;

    LocationLiteVoCollection locations = domain.listLocationsByLocationSite(locationSite);
    if (locations != null)
    {
        for (int x = 0; x < locations.size(); x++)
        {
            // ----------------------------------------
            if (locations.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locations.get(x));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(JobType.CENTRAL_BATCH_PRINT.equals(form.cmbType().getValue()) && !(form.qmbLocation().getValue() instanceof LocSiteLiteVo))
    {
        uiErrors.add("Location is mandatory.");     
    }
    else if(JobType.ORDERING_LOCATION_BATCH_PRINT.equals(form.cmbType().getValue()) && (form.grdReportsToPrint().getValues().length == 0))
    {
        uiErrors.add("Reports to be printed is mandatory.");        
    }

    if(JobType.DNA_BATCH_JOB.equals(form.cmbType().getValue()) && form.intHrs().getValue() == null)
    {
        uiErrors.add("Appts within last is mandatory.");    
    }

    String[] voValidate = new String[uiErrors.size()];
    uiErrors.toArray(voValidate);

    return voValidate;
}
项目:openMAXIMS    文件:Logic.java   
private ElectiveListHospitalConfigurationVoCollection getHospitalsFromGrid()
{
    if (form.ctnDetails().grdHospitals().getRows().size()==0)
        return null;

    ElectiveListHospitalConfigurationVoCollection collHosp = new ElectiveListHospitalConfigurationVoCollection();
    for (int i=0;i<form.ctnDetails().grdHospitals().getRows().size();i++)
    {
        if (form.ctnDetails().grdHospitals().getRows().get(i).getColHospitals().getValue()==null)
            continue;

        ElectiveListHospitalConfigurationVo hosp = new ElectiveListHospitalConfigurationVo();
        hosp.setListLocation((LocSiteLiteVo)form.ctnDetails().grdHospitals().getRows().get(i).getColHospitals().getValue());//WDEV-20064
        hosp.setCaseNoteFolderLocation((LocationLiteVo)form.ctnDetails().grdHospitals().getRows().get(i).getColCaseNote().getValue());//WDEV-20064
        collHosp.add(hosp);
    }

    return collHosp;
}
项目:openMAXIMS    文件:Logic.java   
private LocSiteLiteVoCollection getExistentHospitalsFromGrid() //WDEV-20064
{
    if (form.ctnDetails().grdHospitals().getRows().size()==0)
        return null;

    LocSiteLiteVoCollection collHosp = new LocSiteLiteVoCollection();

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

        collHosp.add((LocSiteLiteVo) form.ctnDetails().grdHospitals().getRows().get(i).getColHospitals().getValue());
    }

    return collHosp;
}
项目:openMAXIMS    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:openMAXIMS    文件:Logic.java   
private void defaultLocation() 
{
    if( form.getGlobalContext().RefMan.getDiagnosticReferralForApplicationIsNotNull() && form.getGlobalContext().RefMan.getDiagnosticReferralForApplication())
    {
        LocationLiteVo loc = null;

        if(engine.getCurrentLocation() instanceof LocationLiteVo)
        {
            loc = (LocationLiteVo) engine.getCurrentLocation();
        }
        else if(engine.getCurrentLocation() instanceof LocSiteLiteVo)
        {
            loc = domain.getLocationLite((LocSiteLiteVo) engine.getCurrentLocation());
        }

        if(loc != null)
        {
            form.qmbLocation().newRow(loc, loc.getName());
        }

        form.qmbLocation().setValue(loc);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addSectorToCombo(LocSiteLiteVo locSiteLiteVo) 
{
    LocationLiteVoCollection sectors = domain.listSectors(locSiteLiteVo);

    if(sectors == null)
        return;

    form.cmbSector().clear();
    for(int i=0; i<sectors.size(); i++)
    {
        if(sectors.get(i) != null)
        {
            form.cmbSector().newRow(sectors.get(i), sectors.get(i).getName());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addCCAToCombo(OrgLiteVo orgLiteVo) 
{
    LocSiteLiteVoCollection coll = null;

    coll = domain.listCCAs(orgLiteVo); 

    if(coll == null)
        return;

    form.cmbCCA().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        LocSiteLiteVo vo = coll.get(i);
        if(vo != null)
        {
            form.cmbCCA().newRow(vo, vo.getName());
        }
    }
}
项目:openMAXIMS    文件:ClientAddressImpl.java   
public LocationLiteVoCollection listSectors(LocSiteLiteVo cca)
{
    if (cca == null)
        return null;

    DomainFactory factory = getDomainFactory();

    // WDEV-12550 - Added query condition to list back only active sectors
    String query = "select loc from LocSite as ls left join ls.locations as loc where (ls.name = :CCANAME and loc.type.id = :VALUE and loc.isActive = 1) order by loc.name asc";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    markers.add("CCANAME");
    values.add(cca.getName());

    markers.add("VALUE");
    values.add(new Integer(LocationType.SECTOR.getID()));

    return LocationLiteVoAssembler.createLocationLiteVoCollectionFromLocation(factory.find(query, markers, values));
}
项目:openMAXIMS    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();

    form.chkNewAndActive().setValue(true);

    bindHospitalCombo();
    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);
    form.cmbHospital().setValue(currentHospiptal);
    setSearchCriteriaDates();

    bindWardCombo(currentHospiptal);
    if(currentLocation instanceof LocationLiteVo)
        form.cmbWard().setValue((LocationLiteVo) currentLocation);

    Object hcp = domain.getHcpLiteUser();
    if(hcp instanceof HcpLiteVo)
    {
        form.getLocalContext().setLoggedHCP((HcpLiteVo) hcp);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

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

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindWardCombo(LocSiteLiteVo locSiteLite) 
{
    form.cmbWard().clear();

    if(locSiteLite != null)
    {
        LocationLiteVoCollection wards = domain.listWards(locSiteLite);

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

        for(LocationLiteVo ward : wards)
        {
            if(ward == null)
                continue;

            form.cmbWard().newRow(ward, ward.getName());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(LocSiteLiteVo location, IAppUser user)
{
    LocationLiteVoCollection locationList = domain.listLocationsByLocationSite(location);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, LocSiteLiteVo locationSite)
{
    if (parentNode == null || locationSite == null)
        return;

    LocationLiteVoCollection locations = domain.listLocationsByLocationSite(locationSite);
    if (locations != null)
    {
        for (int x = 0; x < locations.size(); x++)
        {
            // ----------------------------------------
            if (locations.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locations.get(x));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(JobType.CENTRAL_BATCH_PRINT.equals(form.cmbType().getValue()) && !(form.qmbLocation().getValue() instanceof LocSiteLiteVo))
    {
        uiErrors.add("Location is mandatory.");     
    }
    else if(JobType.ORDERING_LOCATION_BATCH_PRINT.equals(form.cmbType().getValue()) && (form.grdReportsToPrint().getValues().length == 0))
    {
        uiErrors.add("Reports to be printed is mandatory.");        
    }

    if(JobType.DNA_BATCH_JOB.equals(form.cmbType().getValue()) && form.intHrs().getValue() == null)
    {
        uiErrors.add("Appts within last is mandatory.");    
    }

    String[] voValidate = new String[uiErrors.size()];
    uiErrors.toArray(voValidate);

    return voValidate;
}
项目:openMAXIMS    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    populateHospitalCombo();

    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);

    form.cmbHospital().setValue(currentHospiptal);
    if(form.cmbHospital().getValue() != null && currentLocation instanceof LocationLiteVo)
    {
        listCurrentWards(form.cmbHospital().getValue(), null, false);
        form.qmbCurrentWard().setValue((LocationLiteVo) currentLocation);
    }

    form.ccConsultant().initialize(MosType.MEDIC);

    bindVTEAssessmentStatusCombo();

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

    form.getLocalContext().setWasTimerOn(false);
    form.getTimers().gettimerRefresh().setInterval(ConfigFlag.UI.VTE_RISK_ASSESSMENT_AUTO_REFRESH_TIME_SECONDS.getValue());
}
项目:openMAXIMS    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();

    form.chkNewAndActive().setValue(true);

    bindHospitalCombo();
    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);
    form.cmbHospital().setValue(currentHospiptal);
    setSearchCriteriaDates();

    bindWardCombo(currentHospiptal);
    if(currentLocation instanceof LocationLiteVo)
        form.cmbWard().setValue((LocationLiteVo) currentLocation);

    Object hcp = domain.getHcpLiteUser();
    if(hcp instanceof HcpLiteVo)
    {
        form.getLocalContext().setLoggedHCP((HcpLiteVo) hcp);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

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

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindWardCombo(LocSiteLiteVo locSiteLite) 
{
    form.cmbWard().clear();

    if(locSiteLite != null)
    {
        LocationLiteVoCollection wards = domain.listWards(locSiteLite);

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

        for(LocationLiteVo ward : wards)
        {
            if(ward == null)
                continue;

            form.cmbWard().newRow(ward, ward.getName());
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean hasAllowedLocations(LocSiteLiteVo location, IAppUser user)
{
    LocationLiteVoCollection locationList = domain.listLocationsByLocationSite(location);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadData(TreeNode parentNode, LocSiteLiteVo locationSite)
{
    if (parentNode == null || locationSite == null)
        return;

    LocationLiteVoCollection locations = domain.listLocationsByLocationSite(locationSite);
    if (locations != null)
    {
        for (int x = 0; x < locations.size(); x++)
        {
            // ----------------------------------------
            if (locations.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locations.get(x));
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private String[] validateUIRules() 
{
    List<String> uiErrors = new ArrayList<String>();

    if(JobType.CENTRAL_BATCH_PRINT.equals(form.cmbType().getValue()) && !(form.qmbLocation().getValue() instanceof LocSiteLiteVo))
    {
        uiErrors.add("Location is mandatory.");     
    }
    else if(JobType.ORDERING_LOCATION_BATCH_PRINT.equals(form.cmbType().getValue()) && (form.grdReportsToPrint().getValues().length == 0))
    {
        uiErrors.add("Reports to be printed is mandatory.");        
    }

    if(JobType.DNA_BATCH_JOB.equals(form.cmbType().getValue()) && form.intHrs().getValue() == null)
    {
        uiErrors.add("Appts within last is mandatory.");    
    }

    String[] voValidate = new String[uiErrors.size()];
    uiErrors.toArray(voValidate);

    return voValidate;
}
项目:openmaxims-linux    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:openmaxims-linux    文件:Logic.java   
private void initialize() 
{
    populateHospitalCombo();

    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);

    form.cmbHospital().setValue(currentHospiptal);
    if(form.cmbHospital().getValue() != null && currentLocation instanceof LocationLiteVo)
    {
        listCurrentWards(form.cmbHospital().getValue(), null, false);
        form.qmbCurrentWard().setValue((LocationLiteVo) currentLocation);
    }

    form.ccConsultant().initialize(MosType.MEDIC);

    bindVTEAssessmentStatusCombo();

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

    form.getLocalContext().setWasTimerOn(false);
    form.getTimers().gettimerRefresh().setInterval(ConfigFlag.UI.VTE_RISK_ASSESSMENT_AUTO_REFRESH_TIME_SECONDS.getValue());
}
项目:openmaxims-linux    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();

    form.chkNewAndActive().setValue(true);

    bindHospitalCombo();
    ILocation currentLocation = engine.getCurrentLocation();
    LocSiteLiteVo currentHospiptal = domain.getCurrentHospital(currentLocation);
    form.cmbHospital().setValue(currentHospiptal);
    setSearchCriteriaDates();

    bindWardCombo(currentHospiptal);
    if(currentLocation instanceof LocationLiteVo)
        form.cmbWard().setValue((LocationLiteVo) currentLocation);

    Object hcp = domain.getHcpLiteUser();
    if(hcp instanceof HcpLiteVo)
    {
        form.getLocalContext().setLoggedHCP((HcpLiteVo) hcp);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

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

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}