Java 类ims.core.vo.domain.LocSiteShortVoAssembler 实例源码

项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

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

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

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

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

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

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

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

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

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

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

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

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:AvoinApotti    文件:AttendanceDetailsImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:AvoinApotti    文件:QuickRegistrationImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:AvoinApotti    文件:MyOrderImpl.java   
private LocSiteShortVo getHospital(Location doLocation)
{
    if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return LocSiteShortVoAssembler.create((LocSite) doLocation);

    while(doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return LocSiteShortVoAssembler.create((LocSite) doLocation);
    }

    return null;
}
项目:AvoinApotti    文件:MyOrderImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:openMAXIMS    文件:AttendanceDetailsImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:openMAXIMS    文件:QuickRegistrationImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:openMAXIMS    文件:MyOrderImpl.java   
private LocSiteShortVo getHospital(Location doLocation)
{
    if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return LocSiteShortVoAssembler.create((LocSite) doLocation);

    while(doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return LocSiteShortVoAssembler.create((LocSite) doLocation);
    }

    return null;
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:openMAXIMS    文件:AttendanceDetailsImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:openMAXIMS    文件:QuickRegistrationImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:openMAXIMS    文件:MyOrderImpl.java   
private LocSiteShortVo getHospital(Location doLocation)
{
    if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return LocSiteShortVoAssembler.create((LocSite) doLocation);

    while(doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return LocSiteShortVoAssembler.create((LocSite) doLocation);
    }

    return null;
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:openmaxims-linux    文件:EmergencyAttendanceDetailsCcImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:openmaxims-linux    文件:AttendanceDetailsImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:openmaxims-linux    文件:QuickRegistrationImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:openmaxims-linux    文件:MyOrderImpl.java   
private LocSiteShortVo getHospital(Location doLocation)
{
    if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return LocSiteShortVoAssembler.create((LocSite) doLocation);

    while(doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return LocSiteShortVoAssembler.create((LocSite) doLocation);
    }

    return null;
}
项目:openmaxims-linux    文件:MyOrderImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteShortByTaxonomyType(String extId, TaxonomyType taxType)
{
    return LocSiteShortVoAssembler.create(getDomLocSiteByTaxonomyType(extId, taxType));
}
项目:AvoinApotti    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:AvoinApotti    文件:OrderEntryTemplateListImpl.java   
public ims.core.vo.LocSiteShortVoCollection getLocations()
{
    DomainFactory factory = getDomainFactory();     
    return LocSiteShortVoAssembler.createLocSiteShortVoCollectionFromLocSite(factory.find("from LocSite loc where loc.type != :surgery", new String[]{"surgery"}, new Object[]{getDomLookup(LocationType.SURGERY)}));
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteShortByTaxonomyType(String extId, TaxonomyType taxType)
{
    return LocSiteShortVoAssembler.create(getDomLocSiteByTaxonomyType(extId, taxType));
}
项目:openMAXIMS    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:OrderEntryTemplateListImpl.java   
public ims.core.vo.LocSiteShortVoCollection getLocations()
{
    DomainFactory factory = getDomainFactory();     
    return LocSiteShortVoAssembler.createLocSiteShortVoCollectionFromLocSite(factory.find("from LocSite loc where loc.type != :surgery", new String[]{"surgery"}, new Object[]{getDomLookup(LocationType.SURGERY)}));
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteShortByTaxonomyType(String extId, TaxonomyType taxType)
{
    return LocSiteShortVoAssembler.create(getDomLocSiteByTaxonomyType(extId, taxType));
}
项目:openMAXIMS    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:OrderEntryTemplateListImpl.java   
public ims.core.vo.LocSiteShortVoCollection getLocations()
{
    DomainFactory factory = getDomainFactory();     
    return LocSiteShortVoAssembler.createLocSiteShortVoCollectionFromLocSite(factory.find("from LocSite loc where loc.type != :surgery", new String[]{"surgery"}, new Object[]{getDomLookup(LocationType.SURGERY)}));
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteShortByTaxonomyType(String extId, TaxonomyType taxType)
{
    return LocSiteShortVoAssembler.create(getDomLocSiteByTaxonomyType(extId, taxType));
}
项目:openmaxims-linux    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:openmaxims-linux    文件:OrderEntryTemplateListImpl.java   
public ims.core.vo.LocSiteShortVoCollection getLocations()
{
    DomainFactory factory = getDomainFactory();     
    return LocSiteShortVoAssembler.createLocSiteShortVoCollectionFromLocSite(factory.find("from LocSite loc where loc.type != :surgery", new String[]{"surgery"}, new Object[]{getDomLookup(LocationType.SURGERY)}));
}