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

项目:AvoinApotti    文件:OcsIfInboundImpl.java   
public ServiceShortVo getServiceByTaxonomy(String externalCode, TaxonomyType taxonomy)
{
    if (externalCode == null || taxonomy == null)
        throw new DomainRuntimeException("Invalid parameters supplied to getDisciplineServiceByTaxonomy");

    DomainFactory factory = getDomainFactory();

    String hql = " from Service s " +
        " join s.taxonomyMap as cm" +
        " where cm.taxonomyName = :taxType " + 
        " and cm.taxonomyCode = :extId ";

    List svcList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomy),externalCode});

    if (svcList != null && svcList.size() > 1)
    {
        throw new DomainRuntimeException("Duplicate data found for taxonomy type " + taxonomy + " and External Code = " + externalCode);
    }
    else if (svcList != null && svcList.size() == 1)
    {
        return ServiceShortVoAssembler.create((Service) svcList.get(0));
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void loadFunctions()
{
    form.grdFunctions().getRows().clear();

    ServiceShortVo voService = form.cmbService().getValue();
    if (voService == null)
        return;

    ServiceFunctionVoCollection voCollFunction = domain.listServiceFunctions(voService);
    if (voCollFunction != null)
    {
        GenForm.grdFunctionsRow fRow;
        for (int i = 0; i < voCollFunction.size(); i++)
        {
            fRow = form.grdFunctions().getRows().newRow();
            if (voCollFunction.get(i).getFunctionIsNotNull())
                fRow.setColName(voCollFunction.get(i).getFunction().getText());
            fRow.setValue(voCollFunction.get(i));
        }
    }
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public SessionShortVoCollection listSession(ServiceShortVo service, ServiceFunctionVoCollection functionColl, ProfileShortVo profile, Date sessionDate) 
{
    DomainFactory factory = getDomainFactory();
    SessionShortVoCollection voCollSessionShort = new SessionShortVoCollection();

    List sessions;
    if(service != null)
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                    " session.service.id = :serviceId",
                                    new String[]{"sessionDate","serviceId"},
                                    new Object[]{sessionDate.getDate(), service.getID_Service()});
    }
    else
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                " session.sch_Profile.id = :profileId",
                                new String[]{"sessionDate","profileId"},
                                new Object[]{sessionDate.getDate(), profile.getID_Sch_Profile()});
    }

    voCollSessionShort = SessionShortVoAssembler.createSessionShortVoCollectionFromSch_Session(sessions);

    return voCollSessionShort;  
}
项目:AvoinApotti    文件:Logic.java   
/**
 * populates the screen from data from specified Vo Collection
 * 
 * @param ServiceVoCollection
 * @return void
 */
public void populateListControl(ServiceShortVoCollection voColl)
{
    form.lyr1().Edit().grdService().getRows().clear();

    if (voColl != null)
    {
        grdServiceRow row;
        for (int i = 0; i < voColl.size(); i++)
        {
            ServiceShortVo voService = voColl.get(i);
            // check service compatibility to Location

            if (voService.getServiceNameIsNotNull())
            {
                row = form.lyr1().Edit().grdService().getRows().newRow();
                row.setValue(voColl.get(i));
                row.setService(voColl.get(i).getServiceName());
                row.setTooltip(formatServicevoTooltip(voService));
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdServiceGridCheckBoxClicked(int column, grdServiceRow row, boolean isChecked) throws PresentationLogicException
{
    // clearout all other selections and set current selection
    for (int i = 0; i < form.lyr1().Edit().grdService().getRows().size(); i++)
    {
        if (!row.getValue().equals(form.lyr1().Edit().grdService().getRows().get(i).getValue()))
        {
            form.lyr1().Edit().grdService().getRows().get(i).setSelect(false);
            form.lyr1().Edit().grdService().getRows().get(i).setActive(false);
        }
        else
            form.lyr1().Edit().grdService().getRows().get(i).setActive(isChecked);
    }

    if (row.getValue() != null)
    {
        ServiceShortVo voShortService = row.getValue();
        form.lyr1().Edit().grdService().setValue(row.getValue());
        if (voShortService.getID_ServiceIsNotNull())
        {
            populateScreenDataServiceFunction(voShortService.getID_Service());
            populateScreenDataServiceActivity(voShortService.getID_Service());
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private String formatServicevoTooltip(ServiceShortVo voService)
{
    String out = makeTextile("*" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + ": *", "DarkRed", "tahoma", "14");
    out += makeTextile(voService.getServiceNameIsNotNull() ? voService.getServiceName() : "", "black", "tahoma", "12");
    if (voService.getServiceDescriptionIsNotNull())
    {
        out += makeNewLine(new Integer(1));
        out += makeTextile("*Description: *", "DarkRed", "tahoma", "12");
        out += makeTextile(voService.getServiceDescription(), "black", "tahoma", "12");
    }
    if (voService.getIsActiveIsNotNull())
    {
        out += makeNewLine(new Integer(1));
        out += makeTextile("*Active: *", "DarkRed", "tahoma", "12");
        out += makeTextile(voService.getIsActive().toString(), "black", "tahoma", "12");
    }
    return new TextileString(out).toString();
}
项目:AvoinApotti    文件:Logic.java   
private void initialize() 
{
    ReferralServiceFullVo services = domain.getReferralServices();
    if (services != null && services.getReferralServicesIsNotNull())
    {
        for (ServiceShortVo service : services.getReferralServices())
        {
            if (!service.getID_Service().equals(form.getGlobalContext().RefMan.getCurrentServiceLiteVo().getID_Service()))
                form.cmbService().newRow(service,service.getServiceName());
        }
    }

    form.cmbOldService().newRow(form.getGlobalContext().RefMan.getCurrentServiceLiteVo(), form.getGlobalContext().RefMan.getCurrentServiceLiteVo().getServiceName().toString());
    form.cmbOldService().setValue(form.getGlobalContext().RefMan.getCurrentServiceLiteVo());

    form.dtimChanging().setValue(new DateTime());
    if (domain.getMosUser() != null)
    {
        form.qmbChangingUser().newRow((MemberOfStaffShortVo)domain.getMosUser(), ((MemberOfStaffShortVo)domain.getMosUser()).getName().toString());
        form.qmbChangingUser().setValue((MemberOfStaffShortVo)domain.getMosUser()); 
    }
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public SessionShortVoCollection listSession(ServiceShortVo service, ServiceFunctionVoCollection functionColl, ProfileShortVo profile, Date sessionDate) 
{
    DomainFactory factory = getDomainFactory();
    SessionShortVoCollection voCollSessionShort = new SessionShortVoCollection();

    List<?> sessions;
    if(service != null)
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                    " session.service.id = :serviceId",
                                    new String[]{"sessionDate","serviceId"},
                                    new Object[]{sessionDate.getDate(), service.getID_Service()});
    }
    else
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                " session.sch_Profile.id = :profileId",
                                new String[]{"sessionDate","profileId"},
                                new Object[]{sessionDate.getDate(), profile.getID_Sch_Profile()});
    }

    voCollSessionShort = SessionShortVoAssembler.createSessionShortVoCollectionFromSch_Session(sessions).sort();

    return voCollSessionShort;  
}
项目:openMAXIMS    文件:OcsIfInboundImpl.java   
public ServiceShortVo getServiceByTaxonomy(String externalCode, TaxonomyType taxonomy)
{
    if (externalCode == null || taxonomy == null)
        throw new DomainRuntimeException("Invalid parameters supplied to getDisciplineServiceByTaxonomy");

    DomainFactory factory = getDomainFactory();

    String hql = " from Service s " +
        " join s.taxonomyMap as cm" +
        " where cm.taxonomyName = :taxType " + 
        " and cm.taxonomyCode = :extId ";

    List svcList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomy),externalCode});

    if (svcList != null && svcList.size() > 1)
    {
        throw new DomainRuntimeException("Duplicate data found for taxonomy type " + taxonomy + " and External Code = " + externalCode);
    }
    else if (svcList != null && svcList.size() == 1)
    {
        return ServiceShortVoAssembler.create((Service) svcList.get(0));
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdServiceGridCheckBoxClicked(int column, grdServiceRow row, boolean isChecked) throws PresentationLogicException
{
    // clearout all other selections and set current selection
    for (int i = 0; i < form.lyr1().Edit().grdService().getRows().size(); i++)
    {
        if (!row.getValue().equals(form.lyr1().Edit().grdService().getRows().get(i).getValue()))
        {
            form.lyr1().Edit().grdService().getRows().get(i).setSelect(false);
            form.lyr1().Edit().grdService().getRows().get(i).setActive(false);
        }
        else
            form.lyr1().Edit().grdService().getRows().get(i).setActive(isChecked);
    }

    if (row.getValue() != null)
    {
        ServiceShortVo voShortService = row.getValue();
        form.lyr1().Edit().grdService().setValue(row.getValue());
        if (voShortService.getID_ServiceIsNotNull())
        {
            populateScreenDataServiceFunction(voShortService.getID_Service());
            populateScreenDataServiceActivity(voShortService.getID_Service());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadFunctions()
{
    form.grdFunctions().getRows().clear();

    ServiceShortVo voService = form.cmbService().getValue();
    if (voService == null)
        return;

    ServiceFunctionVoCollection voCollFunction = domain.listServiceFunctions(voService);
    if (voCollFunction != null)
    {
        GenForm.grdFunctionsRow fRow;
        for (int i = 0; i < voCollFunction.size(); i++)
        {
            fRow = form.grdFunctions().getRows().newRow();
            if (voCollFunction.get(i).getFunctionIsNotNull())
                fRow.setColName(voCollFunction.get(i).getFunction().getText());
            fRow.setValue(voCollFunction.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadDos(ServiceShortVo voService, boolean showSelected)
{
    DirectoryOfServiceVo voDirService = new DirectoryOfServiceVo();
    if (voService != null)
    {
        voDirService.setService(voService);
        // WDEV-5584
        voDirService.setLocation(form.lyrDetails().tabGeneralDetails().cmbHospital().getValue());   //wdev-20074
        voDirService.setIsActive(Boolean.TRUE);


        //WDEV-20896 the DOS will now be populated will all records depending only on service
        populateDOSGrid(domain.listDOS(voDirService, null), showSelected);

        //ims.core.vo.lookups.ServiceFunctionCollection tempColl = getFunctionsCollFromGeneralDetailsTab(); //wdev-20262
        //populateDOSGrid(domain.listDOS(voDirService,tempColl), showSelected); //wdev-20262
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addTheatre()
{
    if(ConfigFlag.GEN.THEATRE_PROFILE_PROCEDURES.getValue().equals(SERVICE_PROCEDURES))
    {
        ServiceShortVo service = form.lyrDetails().tabGeneralDetails().cmbSpeciality().getValue();
        if(service == null)
        {
            engine.showErrors(new String[] {"Service is mandatory."});
            return;
        }

        engine.open(form.getForms().Admin.ProcedureSpecialtyHotlist, new Object[] {service.getSpecialty(),Boolean.FALSE, Boolean.TRUE});    //wdev-20233 WDEV-21233 //WDEV-22034

    }
    else if(ConfigFlag.GEN.THEATRE_PROFILE_PROCEDURES.getValue().equals(LIST_OWNER_PROCEDURES))
    {
        GenForm.lyrDetailsLayer.tabTheatreContainer.grdTheatreRow tRow = form.lyrDetails().tabTheatre().grdTheatre().getRows().newRow(true);
        tRow.setValue(new TheatreDetailLiteVo());
        //WDEV-9907
        tRow.setcolActive(true);
        tRow.setReadOnly(false);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadFunctions()
{
    form.grdFunctions().getRows().clear();

    ServiceShortVo voService = form.cmbService().getValue();
    if (voService == null)
        return;

    ServiceFunctionVoCollection voCollFunction = domain.listServiceFunctions(voService);
    if (voCollFunction != null)
    {
        GenForm.grdFunctionsRow fRow;
        for (int i = 0; i < voCollFunction.size(); i++)
        {
            fRow = form.grdFunctions().getRows().newRow();
            if (voCollFunction.get(i).getFunctionIsNotNull())
                fRow.setColName(voCollFunction.get(i).getFunction().getText());
            fRow.setValue(voCollFunction.get(i));
        }
    }
}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
/**
 * retrieve a list of functions for this service from ServiceFunction
 */
public ServiceFunctionVoCollection listServiceFunctions(ServiceShortVo serviceShort) 
{
    /*DomainFactory factory = getDomainFactory();

    List<?> funcs = factory.find("from ServiceFunction serviceFunc where serviceFunc.service.id = :serviceId",new String[]{"serviceId"},new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(funcs);*/


    //wdev-20262
    if(serviceShort == null || serviceShort.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService and servFunc.isActive = 1",new String[]{"idService"}, new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdServiceGridCheckBoxClicked(int column, grdServiceRow row, boolean isChecked) throws PresentationLogicException
{
    // clearout all other selections and set current selection
    for (int i = 0; i < form.lyr1().Edit().grdService().getRows().size(); i++)
    {
        if (!row.getValue().equals(form.lyr1().Edit().grdService().getRows().get(i).getValue()))
        {
            form.lyr1().Edit().grdService().getRows().get(i).setSelect(false);
            form.lyr1().Edit().grdService().getRows().get(i).setActive(false);
        }
        else
            form.lyr1().Edit().grdService().getRows().get(i).setActive(isChecked);
    }

    if (row.getValue() != null)
    {
        ServiceShortVo voShortService = row.getValue();
        form.lyr1().Edit().grdService().setValue(row.getValue());
        if (voShortService.getID_ServiceIsNotNull())
        {
            populateScreenDataServiceFunction(voShortService.getID_Service());
            populateScreenDataServiceActivity(voShortService.getID_Service());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private String listServices() 
{
    if (form.getGlobalContext().RefMan.getReferralServiceSearchList() == null 
            || form.getGlobalContext().RefMan.getReferralServiceSearchList().size() == 0)
        return null;

    StringBuffer displayText = new StringBuffer();

    for (ServiceShortVo serviceReferral : form.getGlobalContext().RefMan.getReferralServiceSearchList())
    {
        if (serviceReferral == null)
            continue;

        if (displayText.length() > 0)
            displayText.append(", ");

        displayText.append(serviceReferral.getServiceName());
    }

    if (displayText.length() > 0)
        displayText.insert(0, "Services:       ");

    return displayText.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void bindRedirectServiceCombo()
{
    form.lyrTriage().tabPageRedirectReferral().cmbRedirectedService().clear();

    //WDEV-20976
    if (form.getGlobalContext().RefMan.getCatsReferralIsNotNull())
    {
        ServiceShortVoCollection servicesColl = domain.getServicesForCatsReferral(form.getGlobalContext().RefMan.getCatsReferral());
        if (servicesColl != null && servicesColl.size() > 0)
        {
            for (ServiceShortVo serviceShortVo : servicesColl)
            {
                if (form.getLocalContext().getCurrentService() == null || !serviceShortVo.getID_Service().equals(form.getLocalContext().getCurrentService().getID_Service()))
                {
                    form.lyrTriage().tabPageRedirectReferral().cmbRedirectedService().newRow(serviceShortVo, serviceShortVo.getServiceName());
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String listServices() 
{
    if(form.getGlobalContext().RefMan.getReferralServiceSearchList() == null || form.getGlobalContext().RefMan.getReferralServiceSearchList().size() == 0)
        return null;

    StringBuffer displayText = new StringBuffer();

    for( ServiceShortVo servicrReferral : form.getGlobalContext().RefMan.getReferralServiceSearchList())
    {
        if( servicrReferral == null)
            continue;

        if(displayText.length() > 0)
            displayText.append(", ");

        displayText.append(servicrReferral.getServiceName());
    }

    if( displayText.length() > 0)
        displayText.insert(0, "Service(s):       ");

    return displayText.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(ServiceShortVoCollection services)
{
    form.grdReferralService().getRows().clear();

    if(services == null)
        return;

    for(int i = 0 ; i < services.size(); i++ )
    {
        ServiceShortVo servVo = services.get(i);

        if( servVo == null || !Boolean.TRUE.equals(servVo.getIsActive()))
            continue;

        grdReferralServiceRow row = form.grdReferralService().getRows().newRow();
        row.setColService(servVo.getServiceName());
        row.setValue(servVo);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateSelectedGrid(ServiceShortVoCollection services)
{
    form.grdSelected().getRows().clear();

    if(services == null)
        return;

    for(int i = 0 ; i < services.size(); i++ )
    {
        ServiceShortVo servVo = services.get(i);

        if(servVo == null)
            continue;

        grdSelectedRow row = form.grdSelected().getRows().newRow();
        row.setColService(servVo.getServiceName());
        row.setValue(servVo);

        row.setColSelect(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private String listServices() 
{
    if(form.getGlobalContext().RefMan.getReferralServiceSearchList() == null || form.getGlobalContext().RefMan.getReferralServiceSearchList().size() == 0)
        return null;

    StringBuffer displayText = new StringBuffer();

    for( ServiceShortVo servicrReferral : form.getGlobalContext().RefMan.getReferralServiceSearchList())
    {
        if( servicrReferral == null)
            continue;

        if(displayText.length() > 0)
            displayText.append(", ");

        displayText.append(servicrReferral.getServiceName());
    }

    if( displayText.length() > 0)
        displayText.insert(0, "Services:       ");

    return displayText.toString();
}
项目:openmaxims-linux    文件:Logic.java   
private String formatServicevoTooltip(ServiceShortVo voService)
{
    String out = makeTextile("*" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + ": *", "DarkRed", "tahoma", "14");
    out += makeTextile(voService.getServiceNameIsNotNull() ? voService.getServiceName() : "", "black", "tahoma", "12");
    if (voService.getServiceDescriptionIsNotNull())
    {
        out += makeNewLine(new Integer(1));
        out += makeTextile("*Description: *", "DarkRed", "tahoma", "12");
        out += makeTextile(voService.getServiceDescription(), "black", "tahoma", "12");
    }
    if (voService.getIsActiveIsNotNull())
    {
        out += makeNewLine(new Integer(1));
        out += makeTextile("*Active: *", "DarkRed", "tahoma", "12");
        out += makeTextile(voService.getIsActive().toString(), "black", "tahoma", "12");
    }
    return new TextileString(out).toString();
}
项目:openMAXIMS    文件:OcsIfInboundImpl.java   
public ServiceShortVo getServiceByTaxonomy(String externalCode, TaxonomyType taxonomy)
{
    if (externalCode == null || taxonomy == null)
        throw new DomainRuntimeException("Invalid parameters supplied to getDisciplineServiceByTaxonomy");

    DomainFactory factory = getDomainFactory();

    String hql = " from Service s " +
        " join s.taxonomyMap as cm" +
        " where cm.taxonomyName = :taxType " + 
        " and cm.taxonomyCode = :extId ";

    List svcList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomy),externalCode});

    if (svcList != null && svcList.size() > 1)
    {
        throw new DomainRuntimeException("Duplicate data found for taxonomy type " + taxonomy + " and External Code = " + externalCode);
    }
    else if (svcList != null && svcList.size() == 1)
    {
        return ServiceShortVoAssembler.create((Service) svcList.get(0));
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * populates the screen from data from specified Vo Collection
 * 
 * @param ServiceVoCollection
 * @return void
 */
public void populateListControl(ServiceShortVoCollection voColl)
{
    form.lyr1().Edit().grdService().getRows().clear();

    if (voColl != null)
    {
        grdServiceRow row;
        for (int i = 0; i < voColl.size(); i++)
        {
            ServiceShortVo voService = voColl.get(i);
            // check service compatibility to Location

            if (voService.getServiceNameIsNotNull())
            {
                row = form.lyr1().Edit().grdService().getRows().newRow();
                row.setValue(voColl.get(i));
                row.setService(voColl.get(i).getServiceName());
                row.setTooltip(formatServicevoTooltip(voService));
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdServiceGridCheckBoxClicked(int column, grdServiceRow row, boolean isChecked) throws PresentationLogicException
{
    // clearout all other selections and set current selection
    for (int i = 0; i < form.lyr1().Edit().grdService().getRows().size(); i++)
    {
        if (!row.getValue().equals(form.lyr1().Edit().grdService().getRows().get(i).getValue()))
        {
            form.lyr1().Edit().grdService().getRows().get(i).setSelect(false);
            form.lyr1().Edit().grdService().getRows().get(i).setActive(false);
        }
        else
            form.lyr1().Edit().grdService().getRows().get(i).setActive(isChecked);
    }

    if (row.getValue() != null)
    {
        ServiceShortVo voShortService = row.getValue();
        form.lyr1().Edit().grdService().setValue(row.getValue());
        if (voShortService.getID_ServiceIsNotNull())
        {
            populateScreenDataServiceFunction(voShortService.getID_Service());
            populateScreenDataServiceActivity(voShortService.getID_Service());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private String formatServicevoTooltip(ServiceShortVo voService)
{
    String out = makeTextile("*" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + ": *", "DarkRed", "tahoma", "14");
    out += makeTextile(voService.getServiceNameIsNotNull() ? voService.getServiceName() : "", "black", "tahoma", "12");
    if (voService.getServiceDescriptionIsNotNull())
    {
        out += makeNewLine(new Integer(1));
        out += makeTextile("*Description: *", "DarkRed", "tahoma", "12");
        out += makeTextile(voService.getServiceDescription(), "black", "tahoma", "12");
    }
    if (voService.getIsActiveIsNotNull())
    {
        out += makeNewLine(new Integer(1));
        out += makeTextile("*Active: *", "DarkRed", "tahoma", "12");
        out += makeTextile(voService.getIsActive().toString(), "black", "tahoma", "12");
    }
    return new TextileString(out).toString();
}
项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    ReferralServiceFullVo services = domain.getReferralServices();
    if (services != null && services.getReferralServicesIsNotNull())
    {
        for (ServiceShortVo service : services.getReferralServices())
        {
            if (!service.getID_Service().equals(form.getGlobalContext().RefMan.getCurrentServiceLiteVo().getID_Service()))
                form.cmbService().newRow(service,service.getServiceName());
        }
    }

    form.cmbOldService().newRow(form.getGlobalContext().RefMan.getCurrentServiceLiteVo(), form.getGlobalContext().RefMan.getCurrentServiceLiteVo().getServiceName().toString());
    form.cmbOldService().setValue(form.getGlobalContext().RefMan.getCurrentServiceLiteVo());

    form.dtimChanging().setValue(new DateTime());
    if (domain.getMosUser() != null)
    {
        form.qmbChangingUser().newRow((MemberOfStaffShortVo)domain.getMosUser(), ((MemberOfStaffShortVo)domain.getMosUser()).getName().toString());
        form.qmbChangingUser().setValue((MemberOfStaffShortVo)domain.getMosUser()); 
    }
}
项目:openmaxims-linux    文件:ClinicListImpl.java   
public SessionShortVoCollection listSession(ServiceShortVo service, ServiceFunctionVoCollection functionColl, ProfileShortVo profile, Date sessionDate) 
{
    DomainFactory factory = getDomainFactory();
    SessionShortVoCollection voCollSessionShort = new SessionShortVoCollection();

    List sessions;
    if(service != null)
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                    " session.service.id = :serviceId",
                                    new String[]{"sessionDate","serviceId"},
                                    new Object[]{sessionDate.getDate(), service.getID_Service()});
    }
    else
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                " session.sch_Profile.id = :profileId",
                                new String[]{"sessionDate","profileId"},
                                new Object[]{sessionDate.getDate(), profile.getID_Sch_Profile()});
    }

    voCollSessionShort = SessionShortVoAssembler.createSessionShortVoCollectionFromSch_Session(sessions);

    return voCollSessionShort;  
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public SessionShortVoCollection listSession(ServiceShortVo service, ServiceFunctionVoCollection functionColl, ProfileShortVo profile, Date sessionDate) 
{
    DomainFactory factory = getDomainFactory();
    SessionShortVoCollection voCollSessionShort = new SessionShortVoCollection();

    List<?> sessions;
    if(service != null)
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                    " session.service.id = :serviceId",
                                    new String[]{"sessionDate","serviceId"},
                                    new Object[]{sessionDate.getDate(), service.getID_Service()});
    }
    else
    {
        sessions = factory.find(" from Sch_Session session where session.sessionDate = :sessionDate and " +
                                " session.sch_Profile.id = :profileId",
                                new String[]{"sessionDate","profileId"},
                                new Object[]{sessionDate.getDate(), profile.getID_Sch_Profile()});
    }

    voCollSessionShort = SessionShortVoAssembler.createSessionShortVoCollectionFromSch_Session(sessions).sort();

    return voCollSessionShort;  
}
项目:AvoinApotti    文件:OcsIfImpl.java   
public ServiceShortVo getService(InvestigationRefVo invVo)
{
    if (invVo == null)
        return null;

    DomainFactory factory = getDomainFactory();
    Investigation domInv = (Investigation)factory.getDomainObject(Investigation.class, invVo.getID_Investigation());
    return ServiceShortVoAssembler.create(domInv.getProviderService().getLocationService().getService());
}
项目:AvoinApotti    文件:Logic.java   
private ServiceShortVoCollection listServices(String value)
{
    ServiceShortVo voService = new ServiceShortVo();
    voService.setServiceName(value);
    voService.setIsActive(Boolean.TRUE);
    return domain.listService(voService);
}
项目:AvoinApotti    文件:Logic.java   
private void loadDos(ServiceShortVo voService, boolean showSelected)
{
    DirectoryOfServiceVo voDirService = new DirectoryOfServiceVo();
    if (voService != null)
    {
        voDirService.setService(voService);
        // WDEV-5584
        voDirService.setLocation(form.getLocalContext().getCurrentProfileIsNotNull() ? form.getLocalContext().getCurrentProfile().getSchLocation() : null);
        voDirService.setIsActive(Boolean.TRUE);

        if (form.getMode().equals(FormMode.EDIT))
            populateDOSGrid(domain.listDOS(voDirService), showSelected);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateRecord()
{
    form.setMode(FormMode.EDIT);
    form.lyrDetails().tabGeneralDetails().chkProfileActive().setEnabled(true);

    if (ConfigFlag.DOM.SCHEDULING_SLOTS_CREATION.getValue().equals("Choose and Book"))
    {
        // Load the dos not selected
        ServiceShortVo voService = form.lyrDetails().tabGeneralDetails().cmbSpeciality().getValue();
        if (voService != null)
            loadDos(voService, true);
    }
}
项目:AvoinApotti    文件:BookAppointmentImpl.java   
public ims.core.vo.ServiceShortVoCollection listActiveService()
{
    DirectoryOfServiceAdmin impl = (DirectoryOfServiceAdmin) getDomainImpl(DirectoryOfServiceAdminImpl.class);
    ServiceShortVo voService = new ServiceShortVo();
    voService.setIsActive(Boolean.TRUE);
    return impl.listService(voService);
}
项目:AvoinApotti    文件:DirectoryOfServiceAdminImpl.java   
/**
 * retrieve a list of functions for this service from ServiceFunction
 */
public ServiceFunctionVoCollection listServiceFunctions(ServiceShortVo serviceShort) 
{
    DomainFactory factory = getDomainFactory();

    List<?> funcs = factory.find("from ServiceFunction serviceFunc where serviceFunc.service.id = :serviceId",new String[]{"serviceId"},new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(funcs);
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkServiceExists(ServiceShortVo voServiceShort, LocationServiceVo voLocationService)
{
    ServiceVo voService = new ServiceVo();
    voService.setID_Service(voServiceShort.getID_Service());
    voLocationService.setService(voService);
    return (domain.listLocationService(voLocationService).size() > 0);
}
项目:AvoinApotti    文件:Logic.java   
private String formatServicevoTooltip(ServiceShortVo voService)
{
    String out = makeTextile("*Service *", "SlateBlue", "tahoma", "14");
    out += makeTextile("*Name: *", "SlateBlue", "tahoma", "12");
    out += makeTextile(voService.getServiceName(), "black", "tahoma", "12");
    out += makeNewLine(1);
    out += makeTextile("*Description:*", "SlateBlue", "tahoma", "12");
    out += makeTextile(voService.getServiceDescriptionIsNotNull() ? voService.getServiceDescription() : "", "black", "tahoma", "12");
    out += makeNewLine(1);
    return new TextileString(out).toString();
}
项目:AvoinApotti    文件:Logic.java   
private void searchService(String searchText, boolean activeOnly)
{
    ServiceShortVo voServiceFilter = new ServiceShortVo();
    voServiceFilter.setServiceName(searchText);
    if (activeOnly)
        voServiceFilter.setIsActive(Boolean.TRUE);
    else
        voServiceFilter.setIsActive(null);
    populateListControl(domain.listService(voServiceFilter));
}
项目:AvoinApotti    文件:ServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(ServiceShortVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (voService == null)
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.listDomainObjects(ServiceActivity.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}