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

项目:AvoinApotti    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:openMAXIMS    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:openMAXIMS    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:openmaxims-linux    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}