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

项目:AvoinApotti    文件:AlertsCcImpl.java   
public ims.core.vo.PatientAlertLiteVoCollection listAlerts(ims.core.patient.vo.PatientRefVo patient)
{
    if(patient == null)
        throw new CodingRuntimeException("Cannot list Patient Alerts on null Patient Id.");

    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    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());

    hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);

    hql.append(" order by patAlrt.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString(), names,values);
    return(PatientAlertLiteVoAssembler.createPatientAlertLiteVoCollectionFromPatientAlert(list));
}
项目:openMAXIMS    文件:AlertsCcImpl.java   
public ims.core.vo.PatientAlertLiteVoCollection listAlerts(ims.core.patient.vo.PatientRefVo patient)
{
    if(patient == null)
        throw new CodingRuntimeException("Cannot list Patient Alerts on null Patient Id.");

    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    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());

    hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);

    hql.append(" order by patAlrt.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString(), names,values);
    return(PatientAlertLiteVoAssembler.createPatientAlertLiteVoCollectionFromPatientAlert(list));
}
项目:openmaxims-linux    文件:AlertsCcImpl.java   
public ims.core.vo.PatientAlertLiteVoCollection listAlerts(ims.core.patient.vo.PatientRefVo patient)
{
    if(patient == null)
        throw new CodingRuntimeException("Cannot list Patient Alerts on null Patient Id.");

    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    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());

    hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);

    hql.append(" order by patAlrt.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString(), names,values);
    return(PatientAlertLiteVoAssembler.createPatientAlertLiteVoCollectionFromPatientAlert(list));
}
项目:openMAXIMS    文件:AlertsCcImpl.java   
public ims.core.vo.PatientAlertLiteVoCollection listAlerts(ims.core.patient.vo.PatientRefVo patient, IAppRole role)
{
    if(patient == null)
        throw new CodingRuntimeException("Cannot list Patient Alerts on null Patient Id.");

    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    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());

    hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);

    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(")");

    hql.append(" order by patAlrt.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString(), names,values);
    return(PatientAlertLiteVoAssembler.createPatientAlertLiteVoCollectionFromPatientAlert(list));
}
项目:openMAXIMS    文件:PreAssessmentOutcomeDlgImpl.java   
public PatientAlertLiteVoCollection listAlerts(PatientRefVo patient, IAppRole role)
{
    if(patient == null)
        throw new CodingRuntimeException("Cannot list Patient Alerts on null Patient Id.");

    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    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());

    hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);

    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(")");

    hql.append (" and alertType.parent.id = :alertTypeH");
    names.add("alertTypeH");
    values.add(AlertType.ANAESTHETIC_HAZARDS.getID());

    hql.append(" order by patAlrt.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString(), names,values);
    return(PatientAlertLiteVoAssembler.createPatientAlertLiteVoCollectionFromPatientAlert(list));
}