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

项目:AvoinApotti    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    LocationLiteVo voLocation = form.cmbHospital().getValue();
    LocShortVoCollection voColl = domain.listActiveWardsForHospital(voLocation, value);
    form.qmbWard().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        form.qmbWard().newRow(voColl.get(i).getID_Location(), voColl.get(i).getName());
    }

    int wardCollSize = form.qmbWard().getValues().size();
    if (wardCollSize == 1)
    {
        if (form.qmbWard().getValues().get(0) instanceof Integer)
            form.qmbWard().setValue((Integer) form.qmbWard().getValues().get(0));
    }
    else if (wardCollSize > 1)
    {
        form.qmbWard().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listWards(LocationLiteVo hospital) 
{
    form.grdWards().getRows().clear();

    if(hospital == null || hospital.getID_Location() == null)
        return;

    LocationForVTEAssessmentVoCollection wards = domain.listWards(hospital);

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

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

        addWardRow(ward);
    }
}
项目: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   
@Override
protected void onQmbDestinationWardTextSubmited(String value) throws PresentationLogicException
{
    if (form.cmbDestHosp().getValue() == null)
    {
        engine.showMessage("Please select a Destination Hospital to find a Ward for.");
        return;
    }

    LocationLiteVoCollection wards = domain.listWards(form.cmbDestHosp().getValue().getID_Location(), value);
    if (wards != null)
    {
        form.qmbOtherWard().clear();//wdev-8431
        for (LocationLiteVo item : wards)
            form.qmbOtherWard().newRow(item, item.getName());
    }
    if (wards.size() == 1)
        form.qmbOtherWard().setValue(wards.get(0));
    else if (wards.size() > 1)
        form.qmbOtherWard().showOpened();

}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException
{
    if (form.cmbCurrentHosp().getValue() == null)
    {
        engine.showMessage("Please select a Current Hospital to find a Ward for.");
        return;
    }

    LocationLiteVoCollection wards = domain.listWards(form.cmbCurrentHosp().getValue().getID_Location(), value);
    if (wards != null)
    {
        form.qmbCurrentWard().clear();//wdev-8431
        for (LocationLiteVo item : wards)
            form.qmbCurrentWard().newRow(item, item.getName());
    }
    if (wards.size() == 1)
        form.qmbCurrentWard().setValue(wards.get(0));
    else if (wards.size() > 1)
        form.qmbCurrentWard().showOpened();

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

    LocationLiteVoCollection voCollLoc = null;

    if (ConfigFlag.UI.DISABLE_MULTI_SITE_CATS_FUNCTIONALITY.getValue()) {
        // single site
        voCollLoc = domain.listLocationLite();
    } else {
        // multi site
        voCollLoc = domain.listLocationLiteForReferralContract(form
                .getGlobalContext().RefMan.getCatsReferral());
    }

    if (voCollLoc != null) {
        for (LocationLiteVo item : voCollLoc)
            form.cmbLocation().newRow(item, item.getName());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadWards()
{
    form.cmbward().clear();

    if (form.cmbHospital().getValue()!=null)
    {
        LocationLiteVoCollection wards = domain.listWards(form.cmbHospital().getValue());
        if (wards!=null)
        {
            for (LocationLiteVo item : wards) 
            {
                form.cmbward().newRow(item, item.getName());
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setDefaultDepartmentValue()
{
    ILocation defaultLocation = engine.getCurrentLocation();
    if(defaultLocation == null)
        return;

    for (int i = 0; i < form.cmbDepartment().getValues().size(); i++)
    {
        if(defaultLocation.equals(form.cmbDepartment().getValues().get(i)))
        {
            if(form.cmbDepartment().getValues().get(i) instanceof LocationRefVo)
                form.cmbDepartment().setValue((LocationLiteVo)form.cmbDepartment().getValues().get(i));
        }
    }

    loadService(form.cmbDepartment().getValue());
}
项目:AvoinApotti    文件:Logic.java   
private void initialise()
{
    InpatientEpisodeVo epis = form.getLocalContext().getInpatEpis();

    form.txtWard().setValue(epis.getPasEvent().getLocation().getName());

    LocationLiteVo parentHosp = domain.getParentHospital(epis.getPasEvent().getLocation());
    if (parentHosp != null)
        form.txtHosp().setValue(parentHosp.getName());

    fillHospitalCombo();        
    form.cmbHosp().setValue(parentHosp);
    fillWardCombo();
    form.cmbWard().setValue(epis.getPasEvent().getLocation());
    form.dtimAdmission().setValue(epis.getAdmissionDateTime());

    form.dtimTransfer().setValue(new DateTime());
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbLocationTextSubmited(String value) throws PresentationLogicException
{
    form.qmbLocation().clear();

    LocationLiteVoCollection col = domain.listLocation(value);

    for(LocationLiteVo loc : col)
    {
        form.qmbLocation().newRow(loc, loc.getName());  
    }

    if(col.size() == 1)
    {
        form.qmbLocation().setValue(col.get(0));
        onQmbLocationValueChanged();
    }
    else
        form.qmbLocation().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.getLocalContext().setEventFired(null);

    if (form.cmbHospital().getValue() == null)
    {
        engine.showMessage("Please select a Hospital to find a Ward for.");
        return;
    }

    LocationLiteVoCollection wards = domain.listWards(form.cmbHospital().getValue().getID_Location(), value);
    if (wards != null)
    {
        for (LocationLiteVo item : wards)
            form.qmbWard().newRow(item, item.getName());
    }
    if (wards.size() == 1)
        form.qmbWard().setValue(wards.get(0));
    else if (wards.size() > 1)
        form.qmbWard().showOpened();
}
项目:AvoinApotti    文件:MyOrderImpl.java   
public LocationLiteVo getOutpatientDepartmentByClinic(ClinicRefVo clinic) 
{
    if(clinic == null || !clinic.getID_ClinicIsNotNull())
        throw new CodingRuntimeException("Can not get Outpatient Department on null Clinic Id.");

    DomainFactory factory = getDomainFactory();

    String query = "select c.outpatientDept from Clinic as c where c.id = :ClinicId";
    List<?> department = factory.find(query, new String[] {"ClinicId"}, new Object[] {clinic.getID_Clinic()});

    if(department != null && department.size() == 1)
    {
        return LocationLiteVoAssembler.create((Location) department.get(0));
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void loadHospitals()
{
    LocationLiteVoCollection hospitals = domain.getActiveHospitals(domain.getMosUser() instanceof MemberOfStaffRefVo ? (MemberOfStaffRefVo) domain.getMosUser() : null);

    if (hospitals != null)
    {
        for (LocationLiteVo item : hospitals)
        {
            form.cmbHospital().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue() && form.dteDate().getValue() != null)
                {
                    form.cmbHospital().setValue(item);
                    loadClinics(false);
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(SurgicalAuditOperationDetailVo record)
{
    if( record == null)
        return;

    populatePlannedProceduresGrid(record.getPreOpChecks());
    if( record.getPreOpChecksTheatreNurseIsNotNull())
    {


        ArrayList<LocationLiteVo> theatre = form.cmbTheatreNameNumber().getValues();
        if( theatre != null && record.getPreOpChecksTheatreNurse().getTheatreNameIsNotNull() && !theatre.contains(record.getPreOpChecksTheatreNurse().getTheatreName()))
            form.cmbTheatreNameNumber().newRow(record.getPreOpChecksTheatreNurse().getTheatreName(),record.getPreOpChecksTheatreNurse().getTheatreName().getName());

        form.cmbTheatreNameNumber().setValue(record.getPreOpChecksTheatreNurse().getTheatreName());
        form.txtComments().setValue(record.getPreOpChecksTheatreNurse().getComments());

        form.ccTheatreNurse().setValue(record.getPreOpChecksTheatreNurse().getAccompanyingTheatreNurse()); //wdev-15749
        form.chkLocumAccompanyingTheatreNurse().setValue(record.getPreOpChecksTheatreNurse().getAccompanyingTheatreNurseLocumBool()); //wdev-15749
        form.txtAccompanyingTheatreNurse().setValue(record.getPreOpChecksTheatreNurse().getAccompanyingTheatreNurseLocumNurse()); //wdev-15479

        form.cmbOperationType().setValue(record.getPreOpChecksTheatreNurse().getOperationType()); //wdev-15720
    }

}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch(menuItemID)
    {
        case GenForm.ContextMenus.CoreNamespace.WardBayConfigDialog.ADD:
            grdLayoutsRow row = form.grdLayouts().getRows().newRow();
            row.setBayValue(new LocationLiteVo());
            row.setValue(new BayConfigVo());
            addAvailableFloorLayouts(row);
        break;
        case GenForm.ContextMenus.CoreNamespace.WardBayConfigDialog.REMOVE:
            grdLayoutsRow lRow = form.grdLayouts().getSelectedRow();
            if(lRow != null)
            {
                form.grdLayouts().removeSelectedRow();
                //form.getContextMenus().Core.getWardBayConfigDialogREMOVEItem().setVisible(false);
            }
        break;
        default:
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadLocations(LocationLiteVoCollection voCollLoc)
    {
        form.cmbSite().clear();

        if(voCollLoc == null)
            return;

        for(LocationLiteVo item : voCollLoc)
            form.cmbSite().newRow(item, item.getName());

//      wdev-12682
        if( form.getGlobalContext().RefMan.getDiagnosticReferralForApplicationIsNotNull()
            && form.getGlobalContext().RefMan.getDiagnosticReferralForApplication())
        {           
            if(engine.getCurrentLocation() != null)
            {
                form.cmbSite().setValue(engine.getCurrentLocation());

                if(form.cmbSite().getValue() != null)
                    siteOrDateChanged(false);
            }
        }
    }
项目:AvoinApotti    文件:MOSQueryImpl.java   
private HcpCollection listMOSByPrimaryLocation(HcpCollection collHCPs, LocationLiteVo mosLocation) {

    HcpCollection collHCPsForLocation = new HcpCollection();
    MosAdmin impl = (MosAdmin)getDomainImpl(MosAdminImpl.class);
    for (int i = 0; i < collHCPs.size(); i++)
    {
        MemberOfStaffVo mos = impl.getMemberOfStaff(collHCPs.get(i).getMos());
        for (int j = 0; j < mos.getLocations().size(); j++)
        {
            HcpLocationVo hcpLocation = mos.getLocations().get(j);
            if(hcpLocation.getIsPrimaryIsNotNull() && hcpLocation.getIsPrimary()){

                if(mosLocation.getID_Location().equals(hcpLocation.getLocation().getID_Location()))
                    collHCPsForLocation.add(collHCPs.get(i));
            }
        }
    }

    return collHCPsForLocation;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2)
{
    String locName1 = null;
    String locName2 = null;
    if (ob1 instanceof LocationLiteVo)
    {
        LocationLiteVo loc1 = (LocationLiteVo) ob1;
        locName1 = loc1.getName();
    }
    if (ob2 instanceof LocationLiteVo)
    {
        LocationLiteVo loc2 = (LocationLiteVo) ob2;
        locName2 = loc2.getName();
    }
    if (locName1 != null)
        return locName1.compareTo(locName2) * direction;
    if (locName2 != null)
        return (-1) * direction;

    return 0;
}
项目: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    文件:Logic.java   
private void populateHospital() 
{
    form.cmbHospital().clear();

    LocationLiteVoCollection hospColl = domain.listHospitals();

    if(hospColl == null)
        return;

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

    LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
    form.cmbHospital().setValue(currentHospital);
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String pdate1 = null;
    String pdate2 = null;
    if(ob1 instanceof LocationLiteVo )
    {
        LocationLiteVo ps1 = (LocationLiteVo)ob1;
        pdate1 = ps1.getName();
    }
    if(ob2 instanceof LocationLiteVo)
    {
        LocationLiteVo ps2 = (LocationLiteVo)ob2;
        pdate2 = ps2.getName();
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
private void populateHospital() 
{
    form.cmbHospital().clear();

    LocationLiteVoCollection hospColl = domain.listHospitals();

    if(hospColl == null)
        return;

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

    LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
    form.cmbHospital().setValue(currentHospital);
}
项目:AvoinApotti    文件:Logic.java   
private TrackingForQuickRegistrationVo populateDataFromScreen(EmergencyAttendanceForPendingArrivalsVo selectedRecord)
{
    TrackingForQuickRegistrationVo trackingToSave = new TrackingForQuickRegistrationVo();

    trackingToSave.setPatient(form.getGlobalContext().Core.getPatientShort());

    EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave = form.getLocalContext().getselectedRecord();
    trackingToSave.setAttendance(emergencyAttendanceToSave);
    trackingToSave.setEpisode(emergencyAttendanceToSave.getEpisode());

    LocationLiteVo currentLocation = (LocationLiteVo) domain.getCurrentLocation();
    trackingToSave.setEDLocation(currentLocation);

    trackingToSave.setCurrentArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

    TrackingAttendanceStatusVo trackingStatusToSave = populateTrackingAttendanceStatus(ims.emergency.vo.lookups.TrackingStatus.WAITING_TO_BE_TRIAGED);
    trackingToSave.setCurrentStatus(trackingStatusToSave);
    trackingToSave.setDischargeLetterStatus(DischargeLetterStatus.IN_PROGRESS);//wdev-17266

    return trackingToSave;
}
项目:AvoinApotti    文件:Logic.java   
private void loadOPDSites() 
{
    form.cmbOPDSite().clear();

    LocationLiteVoCollection opdSites = domain.listOPDSite();

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

    for(int i=0; i<opdSites.size(); i++)
    {
        LocationLiteVo site = opdSites.get(i);

        if(site == null || site.getName() == null)
            continue;

        form.cmbOPDSite().newRow(site, site.getName());
    }
}
项目:AvoinApotti    文件:Logic.java   
private DischargeFuturePlanVo populateFollowDetails(DischargeFuturePlanVo voFuture)
{
    DischargeFuturePlanFollowUpVoCollection voColl = new DischargeFuturePlanFollowUpVoCollection();
    for (int i = 0; i < form.grdFuturePlan().getRows().size(); i++)
    {
        DischargeFuturePlanFollowUpVo voFutureFOllowup = new DischargeFuturePlanFollowUpVo();
        if (form.grdFuturePlan().getRows().get(i).getValue() != null)
            voFutureFOllowup = form.grdFuturePlan().getRows().get(i).getValue();

        voFutureFOllowup.setHospitalFollowUp(form.grdFuturePlan().getRows().get(i).getColHospFollowUp());
        voFutureFOllowup.setFollowUpInValue(form.grdFuturePlan().getRows().get(i).getColIN());
        voFutureFOllowup.setFollowUpInUnit(form.grdFuturePlan().getRows().get(i).getColPeriod());
        voFutureFOllowup.setFollowUpHCP((HcpLiteVo) form.grdFuturePlan().getRows().get(i).getColHCP().getValue());
        voFutureFOllowup.setFollowUpSpecialty(form.grdFuturePlan().getRows().get(i).getColSpec());
        voFutureFOllowup.setLocation((LocationLiteVo) form.grdFuturePlan().getRows().get(i).getColLoc().getValue());

        voColl.add(voFutureFOllowup);
    }
    voFuture.setFollowUpDetails(voColl);

    return voFuture;
}
项目: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   
private void setDepartmentValue()
{
    if (form.lyrDetails().tabGenDetails().qmbLocation().getValue() instanceof ClinicLiteVo)
    {
        LocationLiteVo department = domain.getOutpatientDepartmentByClinic((ClinicLiteVo) form.lyrDetails().tabGenDetails().qmbLocation().getValue());

        if (department == null)
            return;

        // WDEV-13890
        if (!form.lyrDetails().tabGenDetails().cmbDepartment().getValues().contains(department))
        {
            form.lyrDetails().tabGenDetails().cmbDepartment().newRow(department, department.getName());
        }
        form.lyrDetails().tabGenDetails().cmbDepartment().setValue(department);
    }
}
项目: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   
public int compare(Object ob1, Object ob2) 
{
    String pdate1 = null;
    String pdate2 = null;
    if(ob1 instanceof LocationLiteVo )
    {
        LocationLiteVo ps1 = (LocationLiteVo)ob1;
        pdate1 = ps1.getName();
    }
    if(ob2 instanceof LocationLiteVo)
    {
        LocationLiteVo ps2 = (LocationLiteVo)ob2;
        pdate2 = ps2.getName();
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目: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 open()
{
    clear();
    LocationLiteVoCollection locColl = domain.getLocations();
    DefaultEDLocationDeptTypeVoCollection defedlocColl = domain.getDefaultEDLocationDeptTypes();
    EmergencyDeptTypeCollection lkpEmergencyDeptTypeCollection  = getDefaultDeptType();
    if( locColl != null && locColl.size() > 0 )
    {
        for( LocationLiteVo locVo : locColl)
        {
            if( locVo != null )
            {
                addRow(locVo,defedlocColl,lkpEmergencyDeptTypeCollection);
            }
        }
    }
    form.setMode(FormMode.VIEW);
}
项目:AvoinApotti    文件:Logic.java   
private DefaultEDLocationDeptTypeVo getSavedefaultEDLocationDeptTypeVoForLocation(LocationLiteVo locVo, DefaultEDLocationDeptTypeVoCollection defedlocColl)
{
    if( locVo == null) 
        return null;
    if( defedlocColl == null || defedlocColl.size() == 0 )
        return null;

    for( DefaultEDLocationDeptTypeVo defualtVo : defedlocColl )
    {
         if( defualtVo != null )
         {
             if( locVo.getID_LocationIsNotNull() && defualtVo.getLocationIsNotNull() && defualtVo.getLocation().getID_LocationIsNotNull() && locVo.getID_Location().equals(defualtVo.getLocation().getID_Location()))
                 return defualtVo;
         }
    }

    return null;

}
项目:AvoinApotti    文件: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((LocationLiteVo)form.ctnDetails().grdHospitals().getRows().get(i).getColHospitals().getValue());

        collHosp.add(hosp);
    }

    return collHosp;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Add Instance - Adding a new clinic to a selected hospital selected in the tree  
 */
private void addInstance()
{
    if (form.treClinics().getSelectedNode() != null 
            && form.treClinics().getSelectedNode().getValue() != null
            && form.treClinics().getSelectedNode().getValue() instanceof LocationLiteVo)
    {
        prepareScreen(false);
        form.cmbClinicLoc().setValue((LocationLiteVo)form.treClinics().getSelectedNode().getValue());
        form.chkActive().setValue(true);
        form.getLocalContext().setSelectedRecord(null);

        //WDEV-11914 -  starts here
        loadOutpatientDepartment(form.cmbClinicLoc().getValue());
        form.setMode(FormMode.EDIT);
        //WDEV-11914 - ends here
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadLocations(Category value)
{
    LocationLiteVo backup = form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue();//WDEV-12979

    form.lyrInvestigations().tabGeneralDet().cmbProvider().clear();

    if (value == null)
        return;

    LocationLiteVoCollection coll = domain.listProvidersByCategory(value);
    for (int i = 0; i < coll.size(); i++)
    {
        form.lyrInvestigations().tabGeneralDet().cmbProvider().newRow(coll.get(i), coll.get(i).getName());
    }

    form.lyrInvestigations().tabGeneralDet().cmbProvider().setValue(backup);////WDEV-12979
}
项目:AvoinApotti    文件:Logic.java   
private void loadSearchOutpatientDepartment(LocationLiteVo hospital) 
{
    form.cmbSearchOutpatient().clear();

    if(hospital == null || !hospital.getID_LocationIsNotNull())
        return;

    LocationLiteVoCollection departments = domain.listActiveOutpatientDepartment(hospital);

    for(int i =0; i<departments.size(); i++)
    {
        LocationLiteVo department = departments.get(i);

        if(department == null)
            continue;

        form.cmbSearchOutpatient().newRow(department, department.getIItemText());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadOutpatientDepartment(LocationLiteVo hospital) 
{
    form.cmbOutpatient().clear();

    if(hospital == null || !hospital.getID_LocationIsNotNull())
        return;

    LocationLiteVoCollection departments = domain.listActiveOutpatientDepartment(hospital);

    for(int i =0; i<departments.size(); i++)
    {
        LocationLiteVo department = departments.get(i);

        if(department == null)
            continue;

        form.cmbOutpatient().newRow(department, department.getIItemText());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void refreshSearchCriteria(IPandOPSearchCriteriaVo searchCriteria)
{
    if (searchCriteria == null)
        return;

    form.cmbHospital().setValue((LocationLiteVo) searchCriteria.getHospital());
    form.dteDate().setValue(searchCriteria.getDate());

    if (form.cmbHospital().getValue() != null && form.dteDate().getValue() != null)
        loadClinics(searchCriteria.getClinicIsNotNull());

    form.cmbClinic().setValue((SessionShortVo) searchCriteria.getClinic());
    form.cmbAppOutcome().setValue(searchCriteria.getApptOutcome());
    form.cmbAction().setValue(searchCriteria.getAppointmentAction());
    form.chkComplete().setValue(searchCriteria.getComplete());
    form.dteFrom().setValue(searchCriteria.getApptDateFrom());
    form.dteTo().setValue(searchCriteria.getApptDateTo());

    search();

}