Java 类ims.nursing.vo.lookups.AssessmentComponentType 实例源码

项目:AvoinApotti    文件:NurAssessmentComponentImpl.java   
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
    StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where this.assessment.id = :assessment");
    markers.add("assessment");
    values.add(assmnt.getId());
    hql.append(" and this.componentType = :compType");
    markers.add("compType");
    values.add(getDomLookup(componentType));
    hql.append(" and this.isRIE is null");
    return(factory.find(hql.toString(), markers, values));      
}
项目:AvoinApotti    文件:NurAssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
    DomainFactory factory = getDomainFactory();

    String hql = "select asmntComp " +
            " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
            " where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
            " and asmntComp.componentType = :compType"+ 
            " and asmntComp.isRIE is null"+
            " order by asmntComp.id desc";

    java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }

    return null;    
}
项目:AvoinApotti    文件:NurAssessmentComponentImpl.java   
public AssessmentComponent getAssessComponent(Integer admissionAssessId, AssessmentComponentType comptype) 
{
    if(admissionAssessId == null || comptype == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select a1_1 from AssessmentComponent as a1_1 left join a1_1.assessment as a2_1 where (a2_1.id = :admassesID and a1_1.componentType = :compType) and a1_1.isRIE is null";

    java.util.List components = factory.find(hql, new String[]{"admassesID", "compType"}, new Object[]{admissionAssessId,getDomLookup(comptype)});

    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        return (copyComp);              
    }

    return null;    

}
项目:AvoinApotti    文件:Logic.java   
private void loadCarePlanGrd()
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BREATHING);
    if (tempColl != null)
    {
         form.gridCarePlans().getRows().clear();
         GenForm.gridCarePlansRow tempRow;
         for (int i=0; i<tempColl.size(); i++)
         {
             CarePlanTemplateTitle template = tempColl.get(i);
             tempRow = form.gridCarePlans().getRows().newRow();
             tempRow.setValue(template);
             tempRow.setcolCarePlans(template.getTitle());
         }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadCarePlanGrd() 
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.COMMUNICATION);
    if (tempColl != null)
    {
        form.container1().gridCarePlan().getRows().clear();
        GenForm.container1Container.gridCarePlanRow tempRow;
        for (int i=0; i<tempColl.size(); i++)
        {
            CarePlanTemplateTitle template = tempColl.get(i);
            tempRow = form.container1().gridCarePlan().getRows().newRow();
            tempRow.setValue(template);
            tempRow.setcolCarePlans(template.getTitle());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateCarePlanGrd() 
{
    //Populate the Grid CarePlan Templates
    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.SPIRITUALITY);
    if (votempColl != null)
    {
        form.gridCarePlan().getRows().clear();
        GenForm.gridCarePlanRow tempRow;
        for (int i=0; i<votempColl.size(); i++)
        {
            CarePlanTemplateTitle votemplate = votempColl.get(i);
            tempRow = form.gridCarePlan().getRows().newRow();
            tempRow.setValue(votemplate);
            tempRow.setcolCarePlans(votemplate.getTitle());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadCarePlanGrd() 
{
    // Populate the Grid CarePlan Templates
    CarePlanTemplateTitleCollection voTempColl = domain.listCarePlanTemplates(AssessmentComponentType.SLEEPING);
    if (voTempColl != null)
    {
        form.gCarePlans().getRows().clear();
        GenForm.gCarePlansRow tempRow;
        for (int i=0; i<voTempColl.size(); i++)
        {
            CarePlanTemplateTitle voTemplate = voTempColl.get(i);
            tempRow = form.gCarePlans().getRows().newRow();
            tempRow.setValue(voTemplate);
            tempRow.setcolCarePlans(voTemplate.getTitle());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    prepareControls();

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setAssmnt(voAssmntHeader);
    if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
    {       
        AssessmentBladder voAssessBladder = (AssessmentBladder)domain.getComponent(voAssmntHeader,AssessmentComponentType.BLADDER);
        form.getLocalContext().setAssessBladder(voAssessBladder);
        populateInstanceControl(voAssessBladder);           
    }
    else
    {
        //check if there is a relevant component
        getLastAssessmentComponent();   
    }

    checkRequireAssistance();
}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateCarePlanGrd() 
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BLADDER);
    if (tempColl != null)
    {
        form.container1().gridCarePlan().getRows().clear();
        GenForm.container1Container.gridCarePlanRow tempRow;
        for (int i=0; i<tempColl.size(); i++)
        {
            CarePlanTemplateTitle template = tempColl.get(i);
            tempRow = form.container1().gridCarePlan().getRows().newRow();
            tempRow.setValue(template);
            tempRow.setcolCarePlans(template.getTitle());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open() 
{
    prepareControls();

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssessHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setAssmnt(voAssessHeader);
    if (voAssessHeader != null && voAssessHeader.getID_AssessmentIsNotNull())
    {       

        AssessmentBowels voAssessBowel = (AssessmentBowels)domain.getComponent(voAssessHeader,AssessmentComponentType.BOWELS);
        form.getLocalContext().setAssessBowels(voAssessBowel);
        populateInstanceControl(voAssessBowel);

    }
    else
    {
        //check if there is a relevant component
        getLastAssessmentComponent();   
    }

}
项目:AvoinApotti    文件:Logic.java   
private void loadCarePlanGrd() 
{
    //Populate the Grid CarePlan Templates
    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.BOWELS);
    if (votempColl != null)
    {
        form.container1().gridCarePlans().getRows().clear();
        GenForm.container1Container.gridCarePlansRow tempRow;
        for (int i=0; i<votempColl.size(); i++)
        {
            CarePlanTemplateTitle votemplate = votempColl.get(i);
            tempRow = form.container1().gridCarePlans().getRows().newRow();
            tempRow.setValue(votemplate);
            tempRow.setcolCarePlans(votemplate.getTitle());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open() 
{
    form.gridGrooming().setFocus();
    form.setMode(FormMode.EDIT);
    form.getLocalContext().setyesNoColl(ims.core.vo.lookups.LookupHelper.getYesNoUnknown(domain.getLookupService()));
    form.bSave().setEnabled(true);  
    form.gridCarePlan().setReadOnly(false);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssHeaderInfo = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setassmnt(voAssHeaderInfo);
    if (voAssHeaderInfo != null && voAssHeaderInfo.getID_AssessmentIsNotNull())
    {       
        //AssessmentDressingAndGrooming assessDG = (AssessmentDressingAndGrooming)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.DRESSING);
        AssessmentDressingAndGrooming voAssessDressAndGroom = (AssessmentDressingAndGrooming)domain.getComponent(voAssHeaderInfo,AssessmentComponentType.DRESSING);
        form.getLocalContext().setassmntDG(voAssessDressAndGroom);
        populateInstanceControl(voAssessDressAndGroom);         
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadCarePlanGrd() 
{
    // Populate the Grid CarePlan Templates
    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.DRESSING);
    if (votempColl != null)
    {
         form.gridCarePlan().getRows().clear();
         GenForm.gridCarePlanRow tempRow;
         for (int i=0; i<votempColl.size(); i++)
         {
              CarePlanTemplateTitle votemplate = votempColl.get(i);
              tempRow = form.gridCarePlan().getRows().newRow();
              tempRow.setValue(votemplate);
              tempRow.setcolCarePlans(votemplate.getTitle());
         }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open() 
{
    form.setMode(FormMode.EDIT);
    form.container1().gridCarePlan().setReadOnly(false);
    form.container1().bSave().setEnabled(true);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo assmnt = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setassmnt(assmnt);
    if (assmnt != null && assmnt.getID_AssessmentIsNotNull())
    {       
        //AssessmentPersonalHygiene assessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.PERSONAL_HYGIENE);
        AssessmentPersonalHygiene voAssessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt, AssessmentComponentType.PERSONAL_HYGIENE);
        form.getLocalContext().setassessPH(voAssessPH);
        populateInstanceControl(voAssessPH);            
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateCarePlanGrd() 
{
    // Populate the Grid CarePlan Templates
    form.container1().gridCarePlan().getRows().clear();
    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.PERSONAL_HYGIENE);
    if (votempColl != null)
    {
         form.container1().gridCarePlan().getRows().clear();
         GenForm.container1Container.gridCarePlanRow tempRow;
         for (int i=0; i<votempColl.size(); i++)
         {
             CarePlanTemplateTitle votemplate = votempColl.get(i);
             tempRow = form.container1().gridCarePlan().getRows().newRow();
             tempRow.setValue(votemplate);
             tempRow.setcolCarePlans(votemplate.getTitle());
         }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateCarePlanGrd()
{
    // Populate the Grid CarePlan Templates
        CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.EATING);
    if (votempColl != null)
    {
          form.container1().gridCarePlan().getRows().clear();
          GenForm.container1Container.gridCarePlanRow tempRow;
          for (int i=0; i<votempColl.size(); i++)
          {
               CarePlanTemplateTitle votemplate = votempColl.get(i);
               tempRow = form.container1().gridCarePlan().getRows().newRow();
               tempRow.setValue(votemplate);
               tempRow.setcolCarePlans(votemplate.getTitle());
          }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open() 
{
    form.container1().gridEmotional().setFocus();
    form.setMode(FormMode.EDIT);
    form.container1().bSave().setEnabled(true);
    form.container1().gridCarePlan().setReadOnly(false);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setAssmnt(voAssmntHeader);
    if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
    {       
        //AssessmentEmotionalState assessEM = (AssessmentEmotionalState)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.EMOTIONAL_STATE);
        AssessmentEmotionalState voAssessEM = (AssessmentEmotionalState)domain.getComponent(voAssmntHeader,AssessmentComponentType.EMOTIONAL_STATE);
        form.getLocalContext().setAssessEmotionalState(voAssessEM);
        populateInstanceControl(voAssessEM);            
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateCarePlanGrd() 
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.EMOTIONAL_STATE);
    if (tempColl != null)
    {
        form.container1().gridCarePlan().getRows().clear();
        GenForm.container1Container.gridCarePlanRow tempRow;

        for (int i=0; i<tempColl.size(); i++)
        {
            CarePlanTemplateTitle template = tempColl.get(i);
            tempRow = form.container1().gridCarePlan().getRows().newRow();
            tempRow.setValue(template);
            tempRow.setcolCarePlans(template.getTitle());
        }
    }
}
项目:AvoinApotti    文件:AssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, AssessmentComponentType componentTypeVo) 
{
    DomainFactory factory = getDomainFactory();

    String hql1 =  "select asmntComp " +
    " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
    " where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
    " and asmntComp.componentType = :compType" +
    " order by asmntComp.id desc";

    java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }
    return null;
}
项目:AvoinApotti    文件:AssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, CareContextRefVo careContextRefVo, AssessmentComponentType componentTypeVo) 
{

    DomainFactory factory = getDomainFactory();

    String hql1 =  "select asmntComp " +
    " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
    " where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
    " and asmntComp.componentType = :compType" +
    " order by asmntComp.id desc";

    java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    } 
    return null;            
}
项目:openmaxims-linux    文件:Logic.java   
private void prePopulateCarePlanGrd() 
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BLADDER);
    if (tempColl != null)
    {
        form.container1().gridCarePlan().getRows().clear();
        GenForm.container1Container.gridCarePlanRow tempRow;
        for (int i=0; i<tempColl.size(); i++)
        {
            CarePlanTemplateTitle template = tempColl.get(i);
            tempRow = form.container1().gridCarePlan().getRows().newRow();
            tempRow.setValue(template);
            tempRow.setcolCarePlans(template.getTitle());
        }
    }
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
    StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where this.assessment.id = :assessment");
    markers.add("assessment");
    values.add(assmnt.getId());
    hql.append(" and this.componentType = :compType");
    markers.add("compType");
    values.add(getDomLookup(componentType));
    hql.append(" and this.isRIE is null");
    return(factory.find(hql.toString(), markers, values));      
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
    DomainFactory factory = getDomainFactory();

    String hql = "select asmntComp " +
            " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
            " where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
            " and asmntComp.componentType = :compType"+ 
            " and asmntComp.isRIE is null"+
            " order by asmntComp.id desc";

    java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }

    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private void loadCarePlanGrd() 
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.COMMUNICATION);
    if (tempColl != null)
    {
        form.container1().gridCarePlan().getRows().clear();
        GenForm.container1Container.gridCarePlanRow tempRow;
        for (int i=0; i<tempColl.size(); i++)
        {
            CarePlanTemplateTitle template = tempColl.get(i);
            tempRow = form.container1().gridCarePlan().getRows().newRow();
            tempRow.setValue(template);
            tempRow.setcolCarePlans(template.getTitle());
        }
    }
}
项目:openmaxims-linux    文件:NurAssessmentComponentImpl.java   
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
    StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where this.assessment.id = :assessment");
    markers.add("assessment");
    values.add(assmnt.getId());
    hql.append(" and this.componentType = :compType");
    markers.add("compType");
    values.add(getDomLookup(componentType));
    hql.append(" and this.isRIE is null");
    return(factory.find(hql.toString(), markers, values));      
}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateCarePlanGrd() 
{
    CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BLADDER);
    if (tempColl != null)
    {
        form.container1().gridCarePlan().getRows().clear();
        GenForm.container1Container.gridCarePlanRow tempRow;
        for (int i=0; i<tempColl.size(); i++)
        {
            CarePlanTemplateTitle template = tempColl.get(i);
            tempRow = form.container1().gridCarePlan().getRows().newRow();
            tempRow.setValue(template);
            tempRow.setcolCarePlans(template.getTitle());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void open() 
{
    prepareControls();

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssessHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setAssmnt(voAssessHeader);
    if (voAssessHeader != null && voAssessHeader.getID_AssessmentIsNotNull())
    {       

        AssessmentBowels voAssessBowel = (AssessmentBowels)domain.getComponent(voAssessHeader,AssessmentComponentType.BOWELS);
        form.getLocalContext().setAssessBowels(voAssessBowel);
        populateInstanceControl(voAssessBowel);

    }
    else
    {
        //check if there is a relevant component
        getLastAssessmentComponent();   
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadCarePlanGrd() 
{
    //Populate the Grid CarePlan Templates
    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.BOWELS);
    if (votempColl != null)
    {
        form.container1().gridCarePlans().getRows().clear();
        GenForm.container1Container.gridCarePlansRow tempRow;
        for (int i=0; i<votempColl.size(); i++)
        {
            CarePlanTemplateTitle votemplate = votempColl.get(i);
            tempRow = form.container1().gridCarePlans().getRows().newRow();
            tempRow.setValue(votemplate);
            tempRow.setcolCarePlans(votemplate.getTitle());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadCarePlanGrd() 
{
    // Populate the Grid CarePlan Templates
    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.DRESSING);
    if (votempColl != null)
    {
         form.gridCarePlan().getRows().clear();
         GenForm.gridCarePlanRow tempRow;
         for (int i=0; i<votempColl.size(); i++)
         {
              CarePlanTemplateTitle votemplate = votempColl.get(i);
              tempRow = form.gridCarePlan().getRows().newRow();
              tempRow.setValue(votemplate);
              tempRow.setcolCarePlans(votemplate.getTitle());
         }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void open() 
{
    form.setMode(FormMode.EDIT);
    form.container1().gridCarePlan().setReadOnly(false);
    form.container1().bSave().setEnabled(true);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo assmnt = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setassmnt(assmnt);
    if (assmnt != null && assmnt.getID_AssessmentIsNotNull())
    {       
        //AssessmentPersonalHygiene assessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.PERSONAL_HYGIENE);
        AssessmentPersonalHygiene voAssessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt, AssessmentComponentType.PERSONAL_HYGIENE);
        form.getLocalContext().setassessPH(voAssessPH);
        populateInstanceControl(voAssessPH);            
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void open() 
{
    form.gridGrooming().setFocus();
    form.setMode(FormMode.EDIT);
    form.getLocalContext().setyesNoColl(ims.core.vo.lookups.LookupHelper.getYesNoUnknown(domain.getLookupService()));
    form.bSave().setEnabled(true);  
    form.gridCarePlan().setReadOnly(false);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssHeaderInfo = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setassmnt(voAssHeaderInfo);
    if (voAssHeaderInfo != null && voAssHeaderInfo.getID_AssessmentIsNotNull())
    {       
        //AssessmentDressingAndGrooming assessDG = (AssessmentDressingAndGrooming)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.DRESSING);
        AssessmentDressingAndGrooming voAssessDressAndGroom = (AssessmentDressingAndGrooming)domain.getComponent(voAssHeaderInfo,AssessmentComponentType.DRESSING);
        form.getLocalContext().setassmntDG(voAssessDressAndGroom);
        populateInstanceControl(voAssessDressAndGroom);         
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateCarePlanGrd()
{
    // Populate the Grid CarePlan Templates
        CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.EATING);
    if (votempColl != null)
    {
          form.container1().gridCarePlan().getRows().clear();
          GenForm.container1Container.gridCarePlanRow tempRow;
          for (int i=0; i<votempColl.size(); i++)
          {
               CarePlanTemplateTitle votemplate = votempColl.get(i);
               tempRow = form.container1().gridCarePlan().getRows().newRow();
               tempRow.setValue(votemplate);
               tempRow.setcolCarePlans(votemplate.getTitle());
          }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void open()
{
    prepareControls();

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setAssmnt(voAssmntHeader);
    if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
    {       
        AssessmentBladder voAssessBladder = (AssessmentBladder)domain.getComponent(voAssmntHeader,AssessmentComponentType.BLADDER);
        form.getLocalContext().setAssessBladder(voAssessBladder);
        populateInstanceControl(voAssessBladder);           
    }
    else
    {
        //check if there is a relevant component
        getLastAssessmentComponent();   
    }

    checkRequireAssistance();
}
项目:openMAXIMS    文件:Logic.java   
private void open() 
{
    form.container1().gridEmotional().setFocus();
    form.setMode(FormMode.EDIT);
    form.container1().bSave().setEnabled(true);
    form.container1().gridCarePlan().setReadOnly(false);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setAssmnt(voAssmntHeader);
    if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
    {       
        //AssessmentEmotionalState assessEM = (AssessmentEmotionalState)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.EMOTIONAL_STATE);
        AssessmentEmotionalState voAssessEM = (AssessmentEmotionalState)domain.getComponent(voAssmntHeader,AssessmentComponentType.EMOTIONAL_STATE);
        form.getLocalContext().setAssessEmotionalState(voAssessEM);
        populateInstanceControl(voAssessEM);            
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:openMAXIMS    文件:AssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, AssessmentComponentType componentTypeVo) 
{
    DomainFactory factory = getDomainFactory();

    String hql1 =  "select asmntComp " +
    " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
    " where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
    " and asmntComp.componentType = :compType" +
    " order by asmntComp.id desc";

    java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }
    return null;
}
项目:openmaxims-linux    文件:AssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, AssessmentComponentType componentTypeVo) 
{
    DomainFactory factory = getDomainFactory();

    String hql1 =  "select asmntComp " +
    " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
    " where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
    " and asmntComp.componentType = :compType" +
    " order by asmntComp.id desc";

    java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }
    return null;
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
    StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where this.assessment.id = :assessment");
    markers.add("assessment");
    values.add(assmnt.getId());
    hql.append(" and this.componentType = :compType");
    markers.add("compType");
    values.add(getDomLookup(componentType));
    hql.append(" and this.isRIE is null");
    return(factory.find(hql.toString(), markers, values));      
}
项目:openmaxims-linux    文件:Logic.java   
private void open() 
{
    form.setMode(FormMode.EDIT);
    form.container1().gridCarePlan().setReadOnly(false);
    form.container1().bSave().setEnabled(true);
    form.checkBoxCopy().setEnabled(false);

    // If there is an assessment in the global context, we want to call the get component domain method
    // Otherwise, it is a new assessment component
    AssessmentHeaderInfo assmnt = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
    form.getLocalContext().setassmnt(assmnt);
    if (assmnt != null && assmnt.getID_AssessmentIsNotNull())
    {       
        //AssessmentPersonalHygiene assessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.PERSONAL_HYGIENE);
        AssessmentPersonalHygiene voAssessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt, AssessmentComponentType.PERSONAL_HYGIENE);
        form.getLocalContext().setassessPH(voAssessPH);
        populateInstanceControl(voAssessPH);            
    }
    else
    {
        // check if there is a relevant component
        getLastAssessmentComponent();
    }
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
    DomainFactory factory = getDomainFactory();

    String hql = "select asmntComp " +
            " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
            " where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
            " and asmntComp.componentType = :compType"+ 
            " and asmntComp.isRIE is null"+
            " order by asmntComp.id desc";

    java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }

    return null;    
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
public AssessmentComponent getAssessComponent(Integer admissionAssessId, AssessmentComponentType comptype) 
{
    if(admissionAssessId == null || comptype == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select a1_1 from AssessmentComponent as a1_1 left join a1_1.assessment as a2_1 where (a2_1.id = :admassesID and a1_1.componentType = :compType) and a1_1.isRIE is null";

    java.util.List components = factory.find(hql, new String[]{"admassesID", "compType"}, new Object[]{admissionAssessId,getDomLookup(comptype)});

    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        return (copyComp);              
    }

    return null;    

}