Java 类ims.ocrr.vo.lookups.SpecimenCollectionTime 实例源码

项目:AvoinApotti    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:AvoinApotti    文件:Logic.java   
private SpecimenCollectionSettings getSettings(SpecimenCollectionMethod type)
{
    SpecimenCollectionSettings settings = new SpecimenCollectionSettings();
    settings.setSpecimenCollectionMethod(type);

    if (type.equals(SpecimenCollectionMethod.INPATIENT))
    {
        settings.setDate(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dteCollect().getValue());

        // date control has been cleared using the keyboard
        if (settings.getDate() == null)
            form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().clear();

        settings.setSelectedTime(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValue());

        if (form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size() > 0)
        {
            settings.setCollTimes(new SpecimenCollectionTimeCollection());
            for (int i = 0; i < form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size(); i++)
            {
                settings.getCollTimes().add((SpecimenCollectionTime) form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().get(i));
            }
        }
    }
    else if (type.equals(SpecimenCollectionMethod.OUTPATIENT))
    {
        settings.setUnits(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().intDuration().getValue());
        settings.setDuration(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbDuration().getValue());
    }

    return settings;
}
项目:AvoinApotti    文件:MyOrderImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    if (date == null || round == null || ward == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select pRound from PhlebotomyRound" + " as pRound left join pRound.wards as ward where pRound.date = :date and pRound.roundToCollect = :round and ward.id = :wardId";

    List items = factory.find(hql, new String[]{"date", "round", "wardId"}, new Object[]{date.getDate(), getDomLookup(round), ward.getID_Location()});
    if (items != null && items.size() > 0)
        return PhlebotomyRoundShortVoAssembler.createPhlebotomyRoundShortVoCollectionFromPhlebotomyRound(items);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:openMAXIMS    文件:Logic.java   
private SpecimenCollectionSettings getSettings(SpecimenCollectionMethod type)
{
    SpecimenCollectionSettings settings = new SpecimenCollectionSettings();
    settings.setSpecimenCollectionMethod(type);

    if (type.equals(SpecimenCollectionMethod.INPATIENT))
    {
        settings.setDate(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dteCollect().getValue());

        // date control has been cleared using the keyboard
        if (settings.getDate() == null)
            form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().clear();

        settings.setSelectedTime(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValue());

        if (form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size() > 0)
        {
            settings.setCollTimes(new SpecimenCollectionTimeCollection());
            for (int i = 0; i < form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size(); i++)
            {
                settings.getCollTimes().add((SpecimenCollectionTime) form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().get(i));
            }
        }
    }
    else if (type.equals(SpecimenCollectionMethod.OUTPATIENT))
    {
        settings.setUnits(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().intDuration().getValue());
        settings.setDuration(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbDuration().getValue());
    }

    return settings;
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    if (date == null || round == null || ward == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select pRound from PhlebotomyRound" + " as pRound left join pRound.wards as ward where pRound.date = :date and pRound.roundToCollect = :round and ward.id = :wardId";

    List items = factory.find(hql, new String[]{"date", "round", "wardId"}, new Object[]{date.getDate(), getDomLookup(round), ward.getID_Location()});
    if (items != null && items.size() > 0)
        return PhlebotomyRoundShortVoAssembler.createPhlebotomyRoundShortVoCollectionFromPhlebotomyRound(items);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:openMAXIMS    文件:Logic.java   
private SpecimenCollectionSettings getSettings(SpecimenCollectionMethod type)
{
    SpecimenCollectionSettings settings = new SpecimenCollectionSettings();
    settings.setSpecimenCollectionMethod(type);

    if (type.equals(SpecimenCollectionMethod.INPATIENT))
    {
        settings.setDate(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dteCollect().getValue());

        // date control has been cleared using the keyboard
        if (settings.getDate() == null)
            form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().clear();

        settings.setSelectedTime(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValue());

        if (form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size() > 0)
        {
            settings.setCollTimes(new SpecimenCollectionTimeCollection());
            for (int i = 0; i < form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size(); i++)
            {
                settings.getCollTimes().add((SpecimenCollectionTime) form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().get(i));
            }
        }
    }
    else if (type.equals(SpecimenCollectionMethod.OUTPATIENT))
    {
        settings.setUnits(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().intDuration().getValue());
        settings.setDuration(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbDuration().getValue());
    }

    return settings;
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    if (date == null || round == null || ward == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select pRound from PhlebotomyRound" + " as pRound left join pRound.wards as ward where pRound.date = :date and pRound.roundToCollect = :round and ward.id = :wardId";

    List items = factory.find(hql, new String[]{"date", "round", "wardId"}, new Object[]{date.getDate(), getDomLookup(round), ward.getID_Location()});
    if (items != null && items.size() > 0)
        return PhlebotomyRoundShortVoAssembler.createPhlebotomyRoundShortVoCollectionFromPhlebotomyRound(items);

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private SpecimenCollectionSettings getSettings(SpecimenCollectionMethod type)
{
    SpecimenCollectionSettings settings = new SpecimenCollectionSettings();
    settings.setSpecimenCollectionMethod(type);

    if (type.equals(SpecimenCollectionMethod.INPATIENT))
    {
        settings.setDate(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dteCollect().getValue());

        // date control has been cleared using the keyboard
        if (settings.getDate() == null)
            form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().clear();

        settings.setSelectedTime(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValue());

        if (form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size() > 0)
        {
            settings.setCollTimes(new SpecimenCollectionTimeCollection());
            for (int i = 0; i < form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().size(); i++)
            {
                settings.getCollTimes().add((SpecimenCollectionTime) form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().getValues().get(i));
            }
        }
    }
    else if (type.equals(SpecimenCollectionMethod.OUTPATIENT))
    {
        settings.setUnits(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().intDuration().getValue());
        settings.setDuration(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbDuration().getValue());
    }

    return settings;
}
项目:openmaxims-linux    文件:MyOrderImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    if (date == null || round == null || ward == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select pRound from PhlebotomyRound" + " as pRound left join pRound.wards as ward where pRound.date = :date and pRound.roundToCollect = :round and ward.id = :wardId";

    List items = factory.find(hql, new String[]{"date", "round", "wardId"}, new Object[]{date.getDate(), getDomLookup(round), ward.getID_Location()});
    if (items != null && items.size() > 0)
        return PhlebotomyRoundShortVoAssembler.createPhlebotomyRoundShortVoCollectionFromPhlebotomyRound(items);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
protected final SpecimenCollectionTime getSelectedTime()
{
    return selectedTime;
}
项目:AvoinApotti    文件:Logic.java   
protected final void setSelectedTime(SpecimenCollectionTime selectedTime)
{
    this.selectedTime = selectedTime;
}
项目:AvoinApotti    文件:PhelbotomyWorkListImpl.java   
public LocShortMappingsVoCollection listActiveWardsForHospital(LocationRefVo hospital, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    List locations = listLocations(LocationType.WARD,hospital,Boolean.TRUE,null,null,null, dateToCollect, roundToCollect);
    return  LocShortMappingsVoAssembler.createLocShortMappingsVoCollectionFromLocation(locations).sort();
}
项目:AvoinApotti    文件:PhelbotomyWorkListImpl.java   
private List listLocations(LocationType locType, LocationRefVo parentLocation, Boolean activeOnly, Boolean includeReferringHosp, Boolean includeTreatingHosp, String name, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    DomainFactory factory = getDomainFactory();

    List locations;

    String hql = " from Location loc ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if (locType != null)
    {
        condStr.append(andStr + " loc.type = :locType");
        markers.add("locType");
        values.add(getDomLookup(locType));
        andStr = " and ";
    }
    if (parentLocation != null)
    {
        condStr.append(andStr + " loc.parentLocation.id = :parentID");
        markers.add("parentID");
        values.add(parentLocation.getID_Location());
        andStr = " and ";
    }
    if (activeOnly != null && activeOnly.booleanValue())
    {
        condStr.append(andStr + " loc.isActive = :active");
        markers.add("active");
        values.add(activeOnly);
        andStr = " and ";
    }
    if (includeReferringHosp != null && includeReferringHosp.booleanValue())
    {
        condStr.append(andStr + " loc.referringHospital = :referring");
        markers.add("referring");
        values.add(includeReferringHosp);
        andStr = " and ";
    }
    if (includeTreatingHosp != null && includeTreatingHosp.booleanValue())
    {
        condStr.append(andStr + " loc.treatingHosp = :treating");
        markers.add("treating");
        values.add(includeTreatingHosp);
        andStr = " and ";
    }
    if (name != null)
    {
        condStr.append(andStr + " upper(loc.name) like :name");
        markers.add("name");
        values.add("%" + name.toUpperCase() + "%");
        andStr = " and ";
    }
    if(dateToCollect != null && roundToCollect != null)
    {
        condStr.append(andStr + " loc.id not in (select l1_1.id " + 
                " from PhlebotomyRound as p1_1 join p1_1.wards as l1_1" + //WDEV-12893
                " where " + 
                " p1_1.date = :DATE and p1_1.roundToCollect.id = :ROUND and p1_1.isRIE is null)");
        markers.add("DATE");
        values.add(dateToCollect.getDate());
        markers.add("ROUND");
        values.add(new Integer(roundToCollect.getID()));
        andStr = " and ";
    }

    if (andStr.equals(" and "))
    {
        hql += " where ";
    }

    hql += condStr.toString();
    locations = factory.find(hql, markers, values);
    return locations;
}
项目:AvoinApotti    文件:WardSpecimenMoveToImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    MyOrder myOrderImpl = (MyOrder) getDomainImpl(MyOrderImpl.class);
    return myOrderImpl.listClosedRounds(date, round, ward);

}
项目:openMAXIMS    文件:Logic.java   
protected final SpecimenCollectionTime getSelectedTime()
{
    return selectedTime;
}
项目:openMAXIMS    文件:Logic.java   
protected final void setSelectedTime(SpecimenCollectionTime selectedTime)
{
    this.selectedTime = selectedTime;
}
项目:openMAXIMS    文件:PhelbotomyWorkListImpl.java   
public LocShortMappingsVoCollection listActiveWardsForHospital(LocationRefVo hospital, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    List locations = listLocations(LocationType.WARD,hospital,Boolean.TRUE,null,null,null, dateToCollect, roundToCollect);
    return  LocShortMappingsVoAssembler.createLocShortMappingsVoCollectionFromLocation(locations).sort();
}
项目:openMAXIMS    文件:PhelbotomyWorkListImpl.java   
private List listLocations(LocationType locType, LocationRefVo parentLocation, Boolean activeOnly, Boolean includeReferringHosp, Boolean includeTreatingHosp, String name, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    DomainFactory factory = getDomainFactory();

    List locations;

    String hql = " from Location loc ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if (locType != null)
    {
        condStr.append(andStr + " loc.type = :locType");
        markers.add("locType");
        values.add(getDomLookup(locType));
        andStr = " and ";
    }
    if (parentLocation != null)
    {
        condStr.append(andStr + " loc.parentLocation.id = :parentID");
        markers.add("parentID");
        values.add(parentLocation.getID_Location());
        andStr = " and ";
    }
    if (activeOnly != null && activeOnly.booleanValue())
    {
        condStr.append(andStr + " loc.isActive = :active");
        markers.add("active");
        values.add(activeOnly);
        andStr = " and ";
    }
    if (includeReferringHosp != null && includeReferringHosp.booleanValue())
    {
        condStr.append(andStr + " loc.referringHospital = :referring");
        markers.add("referring");
        values.add(includeReferringHosp);
        andStr = " and ";
    }
    if (includeTreatingHosp != null && includeTreatingHosp.booleanValue())
    {
        condStr.append(andStr + " loc.treatingHosp = :treating");
        markers.add("treating");
        values.add(includeTreatingHosp);
        andStr = " and ";
    }
    if (name != null)
    {
        condStr.append(andStr + " loc.upperName like :name"); //WDEV-20219
        markers.add("name");
        values.add("%" + name.toUpperCase() + "%");
        andStr = " and ";
    }
    if(dateToCollect != null && roundToCollect != null)
    {
        condStr.append(andStr + " loc.id not in (select l1_1.id " + 
                " from PhlebotomyRound as p1_1 join p1_1.wards as l1_1" + //WDEV-12893
                " where " + 
                " p1_1.date = :DATE and p1_1.roundToCollect.id = :ROUND and p1_1.isRIE is null)");
        markers.add("DATE");
        values.add(dateToCollect.getDate());
        markers.add("ROUND");
        values.add(new Integer(roundToCollect.getID()));
        andStr = " and ";
    }

    if (andStr.equals(" and "))
    {
        hql += " where ";
    }

    hql += condStr.toString();
    locations = factory.find(hql, markers, values);
    return locations;
}
项目:openMAXIMS    文件:WardSpecimenMoveToImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    MyOrder myOrderImpl = (MyOrder) getDomainImpl(MyOrderImpl.class);
    return myOrderImpl.listClosedRounds(date, round, ward);

}
项目:openMAXIMS    文件:Logic.java   
protected final SpecimenCollectionTime getSelectedTime()
{
    return selectedTime;
}
项目:openMAXIMS    文件:Logic.java   
protected final void setSelectedTime(SpecimenCollectionTime selectedTime)
{
    this.selectedTime = selectedTime;
}
项目:openMAXIMS    文件:PhelbotomyWorkListImpl.java   
public LocShortMappingsVoCollection listActiveWardsForHospital(LocationRefVo hospital, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    List locations = listLocations(LocationType.WARD,hospital,Boolean.TRUE,null,null,null, dateToCollect, roundToCollect);
    return  LocShortMappingsVoAssembler.createLocShortMappingsVoCollectionFromLocation(locations).sort();
}
项目:openMAXIMS    文件:PhelbotomyWorkListImpl.java   
private List listLocations(LocationType locType, LocationRefVo parentLocation, Boolean activeOnly, Boolean includeReferringHosp, Boolean includeTreatingHosp, String name, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    DomainFactory factory = getDomainFactory();

    List locations;

    String hql = " from Location loc ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if (locType != null)
    {
        condStr.append(andStr + " loc.type = :locType");
        markers.add("locType");
        values.add(getDomLookup(locType));
        andStr = " and ";
    }
    if (parentLocation != null)
    {
        condStr.append(andStr + " loc.parentLocation.id = :parentID");
        markers.add("parentID");
        values.add(parentLocation.getID_Location());
        andStr = " and ";
    }
    if (activeOnly != null && activeOnly.booleanValue())
    {
        condStr.append(andStr + " loc.isActive = :active");
        markers.add("active");
        values.add(activeOnly);
        andStr = " and ";
    }
    if (includeReferringHosp != null && includeReferringHosp.booleanValue())
    {
        condStr.append(andStr + " loc.referringHospital = :referring");
        markers.add("referring");
        values.add(includeReferringHosp);
        andStr = " and ";
    }
    if (includeTreatingHosp != null && includeTreatingHosp.booleanValue())
    {
        condStr.append(andStr + " loc.treatingHosp = :treating");
        markers.add("treating");
        values.add(includeTreatingHosp);
        andStr = " and ";
    }
    if (name != null)
    {
        condStr.append(andStr + " upper(loc.name) like :name");
        markers.add("name");
        values.add("%" + name.toUpperCase() + "%");
        andStr = " and ";
    }
    if(dateToCollect != null && roundToCollect != null)
    {
        condStr.append(andStr + " loc.id not in (select l1_1.id " + 
                " from PhlebotomyRound as p1_1 join p1_1.wards as l1_1" + //WDEV-12893
                " where " + 
                " p1_1.date = :DATE and p1_1.roundToCollect.id = :ROUND and p1_1.isRIE is null)");
        markers.add("DATE");
        values.add(dateToCollect.getDate());
        markers.add("ROUND");
        values.add(new Integer(roundToCollect.getID()));
        andStr = " and ";
    }

    if (andStr.equals(" and "))
    {
        hql += " where ";
    }

    hql += condStr.toString();
    locations = factory.find(hql, markers, values);
    return locations;
}
项目:openMAXIMS    文件:WardSpecimenMoveToImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    MyOrder myOrderImpl = (MyOrder) getDomainImpl(MyOrderImpl.class);
    return myOrderImpl.listClosedRounds(date, round, ward);

}
项目:openmaxims-linux    文件:Logic.java   
protected final SpecimenCollectionTime getSelectedTime()
{
    return selectedTime;
}
项目:openmaxims-linux    文件:Logic.java   
protected final void setSelectedTime(SpecimenCollectionTime selectedTime)
{
    this.selectedTime = selectedTime;
}
项目:openmaxims-linux    文件:PhelbotomyWorkListImpl.java   
public LocShortMappingsVoCollection listActiveWardsForHospital(LocationRefVo hospital, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    List locations = listLocations(LocationType.WARD,hospital,Boolean.TRUE,null,null,null, dateToCollect, roundToCollect);
    return  LocShortMappingsVoAssembler.createLocShortMappingsVoCollectionFromLocation(locations).sort();
}
项目:openmaxims-linux    文件:PhelbotomyWorkListImpl.java   
private List listLocations(LocationType locType, LocationRefVo parentLocation, Boolean activeOnly, Boolean includeReferringHosp, Boolean includeTreatingHosp, String name, Date dateToCollect, SpecimenCollectionTime roundToCollect)
{
    DomainFactory factory = getDomainFactory();

    List locations;

    String hql = " from Location loc ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if (locType != null)
    {
        condStr.append(andStr + " loc.type = :locType");
        markers.add("locType");
        values.add(getDomLookup(locType));
        andStr = " and ";
    }
    if (parentLocation != null)
    {
        condStr.append(andStr + " loc.parentLocation.id = :parentID");
        markers.add("parentID");
        values.add(parentLocation.getID_Location());
        andStr = " and ";
    }
    if (activeOnly != null && activeOnly.booleanValue())
    {
        condStr.append(andStr + " loc.isActive = :active");
        markers.add("active");
        values.add(activeOnly);
        andStr = " and ";
    }
    if (includeReferringHosp != null && includeReferringHosp.booleanValue())
    {
        condStr.append(andStr + " loc.referringHospital = :referring");
        markers.add("referring");
        values.add(includeReferringHosp);
        andStr = " and ";
    }
    if (includeTreatingHosp != null && includeTreatingHosp.booleanValue())
    {
        condStr.append(andStr + " loc.treatingHosp = :treating");
        markers.add("treating");
        values.add(includeTreatingHosp);
        andStr = " and ";
    }
    if (name != null)
    {
        condStr.append(andStr + " upper(loc.name) like :name");
        markers.add("name");
        values.add("%" + name.toUpperCase() + "%");
        andStr = " and ";
    }
    if(dateToCollect != null && roundToCollect != null)
    {
        condStr.append(andStr + " loc.id not in (select l1_1.id " + 
                " from PhlebotomyRound as p1_1 join p1_1.wards as l1_1" + //WDEV-12893
                " where " + 
                " p1_1.date = :DATE and p1_1.roundToCollect.id = :ROUND and p1_1.isRIE is null)");
        markers.add("DATE");
        values.add(dateToCollect.getDate());
        markers.add("ROUND");
        values.add(new Integer(roundToCollect.getID()));
        andStr = " and ";
    }

    if (andStr.equals(" and "))
    {
        hql += " where ";
    }

    hql += condStr.toString();
    locations = factory.find(hql, markers, values);
    return locations;
}
项目:openmaxims-linux    文件:WardSpecimenMoveToImpl.java   
public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward)
{
    MyOrder myOrderImpl = (MyOrder) getDomainImpl(MyOrderImpl.class);
    return myOrderImpl.listClosedRounds(date, round, ward);

}