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

项目: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());

}
项目:AvoinApotti    文件:Logic.java   
private void populatePatientAlerts(boolean bNew) {
    PatientAlertCollection voColl = domain.listPatientAlerts(form.getGlobalContext().Core.getPatientShort(), Boolean.TRUE);

    form.grdAlerts().getRows().clear();
    form.grdAlerts().setValue(null); //used to clear selection in grid bug                  

    if(voColl != null)
    {           
        grdAlertsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            row = form.grdAlerts().getRows().newRow();
            row.setColAlert(voColl.get(i).getAlertType().getText());
            if(bNew)
                row.setColInclude(true);
            row.setValue(voColl.get(i));
        }
    }       

}
项目: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    文件:Logic.java   
private void populatePatientAlerts(boolean bNew) {
    PatientAlertCollection voColl = domain.listPatientAlerts(form.getGlobalContext().Core.getPatientShort(), Boolean.TRUE, engine.getLoggedInRole());

    form.grdAlerts().getRows().clear();
    form.grdAlerts().setValue(null); //used to clear selection in grid bug                  

    if(voColl != null)
    {           
        grdAlertsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            row = form.grdAlerts().getRows().newRow();
            row.setColAlert(voColl.get(i).getAlertType().getText());
            if(bNew)
                row.setColInclude(true);
            row.setValue(voColl.get(i));
        }
    }       

}
项目: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    文件:Logic.java   
private void populatePatientAlerts(boolean bNew) {
    PatientAlertCollection voColl = domain.listPatientAlerts(form.getGlobalContext().Core.getPatientShort(), Boolean.TRUE);

    form.grdAlerts().getRows().clear();
    form.grdAlerts().setValue(null); //used to clear selection in grid bug                  

    if(voColl != null)
    {           
        grdAlertsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            row = form.grdAlerts().getRows().newRow();
            row.setColAlert(voColl.get(i).getAlertType().getText());
            if(bNew)
                row.setColInclude(true);
            row.setValue(voColl.get(i));
        }
    }       

}
项目: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());

}
项目:openmaxims-linux    文件:Logic.java   
private void populatePatientAlerts(boolean bNew) {
    PatientAlertCollection voColl = domain.listPatientAlerts(form.getGlobalContext().Core.getPatientShort(), Boolean.TRUE);

    form.grdAlerts().getRows().clear();
    form.grdAlerts().setValue(null); //used to clear selection in grid bug                  

    if(voColl != null)
    {           
        grdAlertsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            row = form.grdAlerts().getRows().newRow();
            row.setColAlert(voColl.get(i).getAlertType().getText());
            if(bNew)
                row.setColInclude(true);
            row.setValue(voColl.get(i));
        }
    }       

}
项目: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 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    文件: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    文件: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();
}
项目:AvoinApotti    文件:EDischargeClinicalInfoSTHKComponentImpl.java   
public PatientAlertCollection listPatientAlerts(PatientShort patient, Boolean active) {
    Alerts impl = (Alerts) getDomainImpl(AlertsImpl.class);
    return impl.listPatientAlerts(patient, active);
}
项目:openMAXIMS    文件:AlertsImpl.java   
public Boolean savePatientAlertCategories(PatientRefVo patientRef) throws StaleObjectException
{
    if (patientRef==null)
    {
        throw new CodingRuntimeException("Canot Save patient Alert Categories for null Patient");
    }

    DomainFactory factory = getDomainFactory();

    PatientAlertCollection collAlerts = listPatientAlerts(patientRef, true);

    PatientAlertCategoriesVo patientAlertcategories=getPatientAlertCategories(patientRef);

    PatientAlertCategoriesVo patientAlertcategoriesToSave=populatePatientAlertCategoriesData(patientAlertcategories, patientRef, collAlerts);

    patientAlertcategoriesToSave.validate();

    PatientAlertCategories doPatientAlertcategories = PatientAlertCategoriesVoAssembler.extractPatientAlertCategories(factory, patientAlertcategoriesToSave);

    factory.save(doPatientAlertcategories);

    return true;
}
项目:openMAXIMS    文件:AlertsImpl.java   
private PatientAlertCategoriesVo populatePatientAlertCategoriesData(PatientAlertCategoriesVo patientAlertcategories, PatientRefVo patientRef, PatientAlertCollection collAlerts)
{
    if (patientAlertcategories==null)
        patientAlertcategories=new PatientAlertCategoriesVo();
    else
        patientAlertcategories=(PatientAlertCategoriesVo) patientAlertcategories.clone();

    AlertPIDBarConfiguration impl=(AlertPIDBarConfiguration)getDomainImpl(AlertPIDBarConfigurationImpl.class);
    AlertPIDBarConfigVo alertPidBarConfig = impl.getAlertPIDBarConfig();

    patientAlertcategories.setPatient(patientRef);

    //initially set all PatientAlertCategory to false
    patientAlertcategories.setHasAlertCategory1(false);
    patientAlertcategories.setHasAlertCategory2(false);
    patientAlertcategories.setHasAlertCategory3(false);
    patientAlertcategories.setHasAlertCategory4(false);
    patientAlertcategories.setHasAlertCategoryOther(false);

    if (alertPidBarConfig==null)
    {
        patientAlertcategories.setHasAlertCategoryOther(true);
    }
    else
    {   
        for (int i=0;collAlerts!=null && i<collAlerts.size();i++)
        {
            AlertType alertCategory = collAlerts.get(i).getAlertType().getParent();
            if (alertCategory!=null )
            {
                if (alertCategory.equals(alertPidBarConfig.getAlertCategoryPosition1()))
                {
                    patientAlertcategories.setHasAlertCategory1(true);
                }
                else if (alertCategory.equals(alertPidBarConfig.getAlertCategoryPosition2()))
                {
                    patientAlertcategories.setHasAlertCategory2(true);
                }
                else if (alertCategory.equals(alertPidBarConfig.getAlertCategoryPosition3()))
                {
                    patientAlertcategories.setHasAlertCategory3(true);
                }
                else if (alertCategory.equals(alertPidBarConfig.getAlertCategoryPosition4()))
                {
                    patientAlertcategories.setHasAlertCategory4(true);
                }
                else
                {
                    patientAlertcategories.setHasAlertCategoryOther(true);
                }
            }
        }
    }

    return patientAlertcategories;
}
项目:openMAXIMS    文件:EDischargeClinicalInfoSTHKComponentImpl.java   
public PatientAlertCollection listPatientAlerts(PatientShort patient, Boolean active, IAppRole role) 
{
    Alerts impl = (Alerts) getDomainImpl(AlertsImpl.class);
    return impl.listPatientAlerts(patient, active, role);
}
项目:openMAXIMS    文件:EDischargeClinicalInfoSTHKComponentImpl.java   
public PatientAlertCollection listPatientAlerts(PatientShort patient, Boolean active) {
    Alerts impl = (Alerts) getDomainImpl(AlertsImpl.class);
    return impl.listPatientAlerts(patient, active);
}
项目:openmaxims-linux    文件:EDischargeClinicalInfoSTHKComponentImpl.java   
public PatientAlertCollection listPatientAlerts(PatientShort patient, Boolean active) {
    Alerts impl = (Alerts) getDomainImpl(AlertsImpl.class);
    return impl.listPatientAlerts(patient, active);
}