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

项目:AvoinApotti    文件:AlertsImpl.java   
public PatientAlertCollection listPatientAlerts(ims.core.vo.PatientShort patient, Boolean active) 
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientAlert patAlrt ");
    hql.append(" where patAlrt.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (active.equals(Boolean.TRUE))
    {
        hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
        names.add("isActive");
        values.add(Boolean.TRUE);   
    }
    List list = factory.find(hql.toString(), names,values);
    return(PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort());

}
项目:openMAXIMS    文件:AlertsImpl.java   
public PatientAlertCollection listPatientAlerts(PatientRefVo patient, Boolean active) 
{
    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientAlert patAlrt ");
    hql.append(" where patAlrt.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (active.equals(Boolean.TRUE))
    {
        hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
        names.add("isActive");
        values.add(Boolean.TRUE);   
    }
    List list = factory.find(hql.toString(), names,values);
    return(PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort());
}
项目:openMAXIMS    文件:AlertsImpl.java   
public PatientAlertCollection listPatientAlerts(ims.core.vo.PatientShort patient, Boolean active) 
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientAlert patAlrt ");
    hql.append(" where patAlrt.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (active.equals(Boolean.TRUE))
    {
        hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
        names.add("isActive");
        values.add(Boolean.TRUE);   
    }
    List list = factory.find(hql.toString(), names,values);
    return(PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort());

}
项目:openmaxims-linux    文件:AlertsImpl.java   
public PatientAlertCollection listPatientAlerts(ims.core.vo.PatientShort patient, Boolean active) 
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientAlert patAlrt ");
    hql.append(" where patAlrt.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (active.equals(Boolean.TRUE))
    {
        hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
        names.add("isActive");
        values.add(Boolean.TRUE);   
    }
    List list = factory.find(hql.toString(), names,values);
    return(PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort());

}
项目:AvoinApotti    文件:AlertsImpl.java   
public PatientAlert getPatientAlert(PatientAlertRefVo patientalertRefVo) 
{
    if(patientalertRefVo == null)
        throw new DomainRuntimeException("PatientAlert Filter not provided for list call. ");

    DomainFactory factory = getDomainFactory();
    ims.core.clinical.domain.objects.PatientAlert doPA = (ims.core.clinical.domain.objects.PatientAlert)factory.getDomainObject(ims.core.clinical.domain.objects.PatientAlert.class, patientalertRefVo.getID_PatientAlert());
    return PatientAlertAssembler.create(doPA);      
}
项目:AvoinApotti    文件:NotificationsImpl.java   
@SuppressWarnings("unchecked")
public PatientAlertCollection getPatientAlerts(Integer patientId) 
{
    if(patientId == null)
        throw new CodingRuntimeException("Invalid patient Id.");

    DomainFactory factory = getDomainFactory();
    List list = factory.find("from PatientAlert patAlert where patAlert.patient.id = :patient and patAlert.isCurrentlyActiveAlert = true", new String[] {"patient"},new Object[] {patientId});

    return PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort();
}
项目:openMAXIMS    文件:AlertsImpl.java   
public PatientAlert getPatientAlert(PatientAlertRefVo patientalertRefVo) 
{
    if(patientalertRefVo == null)
        throw new DomainRuntimeException("PatientAlert Filter not provided for list call. ");

    DomainFactory factory = getDomainFactory();
    ims.core.clinical.domain.objects.PatientAlert doPA = (ims.core.clinical.domain.objects.PatientAlert)factory.getDomainObject(ims.core.clinical.domain.objects.PatientAlert.class, patientalertRefVo.getID_PatientAlert());
    return PatientAlertAssembler.create(doPA);      
}
项目:openMAXIMS    文件:AlertsImpl.java   
public PatientAlertCollection listPatientAlerts(PatientShort patient, Boolean active, IAppRole role)
{
    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("select patAlrt from PatientAlert patAlrt left join patAlrt.alertType as alertType ");
    hql.append(" where patAlrt.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    String alertCategoryIds = getAlertCategoryIds(role);

    if(alertCategoryIds == null || alertCategoryIds.length() == 0)
        return null;

    hql.append (" and alertType.parent is not null and alertType.parent.id in (");
    hql.append(alertCategoryIds);
    hql.append(")");

    if (active.equals(Boolean.TRUE))
    {
        hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
        names.add("isActive");
        values.add(Boolean.TRUE);   
    }

    List list = factory.find(hql.toString(), names,values);
    return(PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort());
}
项目:openMAXIMS    文件:NotificationsImpl.java   
@SuppressWarnings("unchecked")
public PatientAlertCollection getPatientAlerts(Integer patientId) 
{
    if(patientId == null)
        throw new CodingRuntimeException("Invalid patient Id.");

    DomainFactory factory = getDomainFactory();
    List list = factory.find("from PatientAlert patAlert where patAlert.patient.id = :patient and patAlert.isCurrentlyActiveAlert = true", new String[] {"patient"},new Object[] {patientId});

    return PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort();
}
项目:openMAXIMS    文件:AlertsImpl.java   
public PatientAlert getPatientAlert(PatientAlertRefVo patientalertRefVo) 
{
    if(patientalertRefVo == null)
        throw new DomainRuntimeException("PatientAlert Filter not provided for list call. ");

    DomainFactory factory = getDomainFactory();
    ims.core.clinical.domain.objects.PatientAlert doPA = (ims.core.clinical.domain.objects.PatientAlert)factory.getDomainObject(ims.core.clinical.domain.objects.PatientAlert.class, patientalertRefVo.getID_PatientAlert());
    return PatientAlertAssembler.create(doPA);      
}
项目:openMAXIMS    文件:NotificationsImpl.java   
@SuppressWarnings("unchecked")
public PatientAlertCollection getPatientAlerts(Integer patientId) 
{
    if(patientId == null)
        throw new CodingRuntimeException("Invalid patient Id.");

    DomainFactory factory = getDomainFactory();
    List list = factory.find("from PatientAlert patAlert where patAlert.patient.id = :patient and patAlert.isCurrentlyActiveAlert = true", new String[] {"patient"},new Object[] {patientId});

    return PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort();
}
项目:openmaxims-linux    文件:AlertsImpl.java   
public PatientAlert getPatientAlert(PatientAlertRefVo patientalertRefVo) 
{
    if(patientalertRefVo == null)
        throw new DomainRuntimeException("PatientAlert Filter not provided for list call. ");

    DomainFactory factory = getDomainFactory();
    ims.core.clinical.domain.objects.PatientAlert doPA = (ims.core.clinical.domain.objects.PatientAlert)factory.getDomainObject(ims.core.clinical.domain.objects.PatientAlert.class, patientalertRefVo.getID_PatientAlert());
    return PatientAlertAssembler.create(doPA);      
}
项目:openmaxims-linux    文件:NotificationsImpl.java   
@SuppressWarnings("unchecked")
public PatientAlertCollection getPatientAlerts(Integer patientId) 
{
    if(patientId == null)
        throw new CodingRuntimeException("Invalid patient Id.");

    DomainFactory factory = getDomainFactory();
    List list = factory.find("from PatientAlert patAlert where patAlert.patient.id = :patient and patAlert.isCurrentlyActiveAlert = true", new String[] {"patient"},new Object[] {patientId});

    return PatientAlertAssembler.createPatientAlertCollectionFromPatientAlert(list).sort();
}