Java 类ims.core.vo.lookups.UserDefinedAssessmentType 实例源码

项目:AvoinApotti    文件:Logic.java   
private void prepopulateRecordBrowser()
{
    form.recbrAssessment().clear();
    PatientAssessmentListVoCollection voColl = domain.listPatientAssessments(form.getGlobalContext().Core.getCurrentCareContext(), UserDefinedAssessmentType.DPP, form.dteStart().getValue(), form.dteEnd().getValue());

    //start WDEV-13871
    if (voColl.size() == 0)
    {
        engine.showMessage("No records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
    }
    //end

    //Flag the Admission Assessment Record
    form.getGlobalContext().Nursing.setIsDppAdmissionAssessmentAdded(getIsDppAdmissionAssessmentAdded(voColl));
    for (int i = 0; i < voColl.size(); i++)
    {
        PatientAssessmentListVo voPatAssList = voColl.get(i);
        addItemToRecordBrowser(voPatAssList);
    }
}
项目:AvoinApotti    文件:NursingSummaryImpl.java   
public PatientAssessmentListVo getLastStructuredAssessment(UserDefinedAssessmentType type, CareContextRefVo careContext)
{
    List list = getDomainFactory().find("from PatientAssessment as p1_1 where p1_1.assessmentData.userAssessment.assessmentType.id = :TYPE and p1_1.careContext.id = :CARE_CONTEXT order by p1_1.authoringInformation.authoringDateTime desc", new String[] {"TYPE", "CARE_CONTEXT"}, new Object[] {new Integer(type.getID()), careContext.getID_CareContext()});

    //Get only the first record (to optimise the work of the assembler)
    if(list != null && list.size() > 1)
    {
        Object firstItem = list.get(0);
        list.removeAll(list);
        list.add(firstItem);
    }

    PatientAssessmentListVoCollection voColl = PatientAssessmentListVoAssembler.createPatientAssessmentListVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public PatientAssessmentVo getPatientAssessmentForCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null)
        throw new RuntimeException("Cannot get PatientAssessmentVo for null CareContext");

    StringBuffer query = new StringBuffer("from PatientAssessment as p1_1 where");
    query.append(" p1_1.careContext.id = :idCC");
    query.append(" and p1_1.assessmentData.graphic.assessmentType = :assessmentType");

    ArrayList<String> params = new ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();

    params.add("idCC");
    params.add("assessmentType");

    values.add(careContextRef.getID_CareContext());
    values.add(getDomLookup(UserDefinedAssessmentType.MEDICALNOTING));

    List list = getDomainFactory().find(query.toString(), params, values);
    PatientAssessmentVoCollection voColl = PatientAssessmentVoAssembler.createPatientAssessmentVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public PatientAssessmentListVo getLastStructuredAssessment(UserDefinedAssessmentType type, CareContextRefVo careContext)
{
    List list = getDomainFactory().find("from PatientAssessment as p1_1 where p1_1.assessmentData.userAssessment.assessmentType.id = :TYPE and p1_1.careContext.id = :CARE_CONTEXT order by p1_1.authoringInformation.authoringDateTime desc", new String[] {"TYPE", "CARE_CONTEXT"}, new Object[] {new Integer(type.getID()), careContext.getID_CareContext()});

    //Get only the first record (to optimise the work of the assembler)
    if(list != null && list.size() > 1)
    {
        Object firstItem = list.get(0);
        list.removeAll(list);
        list.add(firstItem);
    }

    PatientAssessmentListVoCollection voColl = PatientAssessmentListVoAssembler.createPatientAssessmentListVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean extraActiveDPPRecordExists(UserAssessmentVo assessment)
{
    UserDefinedAssessmentType assessType = getAssessmentType();
    boolean activeRecord = form.cmbActiveStatus().getValue() != null && form.cmbActiveStatus().getValue().equals(PreActiveActiveInactiveStatus.ACTIVE); 
    if(activeRecord && (isDppType(assessType) || isChildOf(UserDefinedAssessmentType.USERDEFINEDDATASHEET, assessType) || isChildOf(UserDefinedAssessmentType.ASSESSMENTTOOL, assessType) || isChildOf(UserDefinedAssessmentType.TURNING_POINT_ASSESSMENTS, assessType) ))
    {
        Boolean extraActiveDPPExists = domain.isExtraActiveThirdLevelAssessmentSaved(assessment, assessType);
        if(extraActiveDPPExists != null && extraActiveDPPExists.booleanValue())
        {
            engine.showErrors("Error", new String[]{"Cannot save this assessment as there can only be one 'Active' assessment of type '" + assessType + "' on the system."});
            return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private UserDefinedAssessmentTypeCollection getAssessmentTypes(UserDefinedAssessmentType value)
{
    UserDefinedAssessmentTypeCollection lkpColl = new UserDefinedAssessmentTypeCollection();
    if(value != null)
    {
        lkpColl.add(value);
        if(value.equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
        {
            lkpColl.add(UserDefinedAssessmentType.DISCHARGECHECKLIST);
        }
        if(value.equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
        {
            lkpColl.add(UserDefinedAssessmentType.DPP);
        }
    }

    return lkpColl;
}
项目:AvoinApotti    文件:Logic.java   
private void setInitialAssessment() throws PresentationLogicException
{
    if(form.getForms().Assessment.UserAssessmentInstantiationDischarge.equals(engine.getFormName()))
    {
        prepareAssessment(UserDefinedAssessmentType.DISCHARGE);
    }
    else if(form.getForms().Assessment.UserAssessmentInstantiationDischargePlanning.equals(engine.getFormName()))
    {
        prepareAssessment(UserDefinedAssessmentType.DISCHARGE_PLANNING);
    }
    else
        if(form.getGlobalContext().Clinical.PatientAssessment.getSelectedAssessment() != null)
            form.getLocalContext().setCurrentAssessment(domain.get(form.getGlobalContext().Clinical.PatientAssessment.getSelectedAssessment()));
        else
            throw new PresentationLogicException("Please select an assessment !");

}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public PatientAssessmentVo getPatientAssessment(ClinicalContactRefVo clinicalContactRefVo) 
{
    if(clinicalContactRefVo == null)
        throw new RuntimeException("Cannot get PatientAssessmentVo for null ClinicalContactRefVo");

    //WDEV-2432
    StringBuffer query = new StringBuffer("from PatientAssessment as p1_1 where");
    query.append(" p1_1.clinicalContact.id = :idCC");
    query.append(" and p1_1.assessmentData.graphic.assessmentType = :assessmentType");

    ArrayList<String> params = new ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();

    params.add("idCC");
    params.add("assessmentType");

    values.add(clinicalContactRefVo.getID_ClinicalContact());
    values.add(getDomLookup(UserDefinedAssessmentType.MEDICALNOTING));

    List list = getDomainFactory().find(query.toString(), params, values);
    PatientAssessmentVoCollection voColl = PatientAssessmentVoAssembler.createPatientAssessmentVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;    
}
项目:AvoinApotti    文件:Logic.java   
private void loadAvalilableImages()
{
    form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().clear();

    GraphicAssessmentVo graphicAssessment = domain.getActiveGraphicAssessment(UserDefinedAssessmentType.MEDICALNOTING);
    if (graphicAssessment == null)
        return;

    for (int i = 0; i < graphicAssessment.getImages().size(); i++)
    {
        DrawingGraphicImageVo image = graphicAssessment.getImages().get(i);
        if (image != null)
        {
            form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().newRow(image, image.getImageName() == null ? "Untitled" : image.getImageName());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addPainAssessment()
{
    /*
    GraphicAssessmentShortVo voGraphicAssessment = new GraphicAssessmentShortVo();
    voGraphicAssessment.setName(form.txtName().getValue());
    voGraphicAssessment.setActiveStatus(PreActiveActiveInactiveStatus.PREACTIVE);
    voGraphicAssessment.setAssessmentType(UserDefinedAssessmentType.PAINASSESSMENT);

    form.getGlobalContext().Core.setGraphicAssessmentShortVo(voGraphicAssessment);
    form.getGlobalContext().Core.setGraphicAssessmentFormMode(FormMode.EDIT);
    clearGraphicAssessmentSearchFilter();
    engine.open(form.getForms().Assessment.GraphicAssessmentNew);
    */


    GraphicAssessmentShortVo voGraphicAssessment = new GraphicAssessmentShortVo();
    voGraphicAssessment.setName(form.txtName().getValue());
    voGraphicAssessment.setActiveStatus(PreActiveActiveInactiveStatus.PREACTIVE);
    voGraphicAssessment.setAssessmentType(UserDefinedAssessmentType.PAINASSESSMENT);

    form.getGlobalContext().Core.setGraphicAssessmentShortVo(voGraphicAssessment);
    form.getGlobalContext().Core.setGraphicAssessmentFormMode(FormMode.EDIT);
    clearGraphicAssessmentSearchFilter();
    engine.open(form.getForms().Assessment.GraphicAssessmentNew);           

}
项目:AvoinApotti    文件:Logic.java   
private UserDefinedAssessmentTypeCollection getUserDefinedTypes(UserDefinedAssessmentType type)
{
    UserDefinedAssessmentTypeCollection assTypeColl = new UserDefinedAssessmentTypeCollection();
    if(type != null)
    {
        assTypeColl.add(type);

        UserDefinedAssessmentTypeCollection udfColl = LookupHelper.getUserDefinedAssessmentType(domain.getLookupService());

        for (int i = 0; i < udfColl.size(); i++)
        {
            UserDefinedAssessmentType lkpType = udfColl.get(i);
            if(type.equals(lkpType))
            {
                //Add the children (if any) to the collection
                for (int j = 0; lkpType.getChildInstances() != null && j < lkpType.getChildInstances().size(); j++)
                {
                    assTypeColl.add((UserDefinedAssessmentType)lkpType.getChildInstances().get(j));
                }
            }
        }
    }

    return assTypeColl;
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    Date now = new Date();
    now.addDay(-7);

    form.dteStart().setValue(now);
    form.dteEnd().setValue(new Date());

    UserAssessmentShortVoCollection udfList = domain.listUserAssessments(UserDefinedAssessmentType.DPP);

    for(int i = 0; i < udfList.size(); i++)
    {
        if(udfList.get(i).getActiveStatusIsNotNull() && udfList.get(i).getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
        {
            form.cmbUDF().newRow(udfList.get(i), udfList.get(i).getName() + " - " + udfList.get(i).getDescription(), Color.Green);
            form.cmbUDF().setValue(udfList.get(i));
        }
        else
            form.cmbUDF().newRow(udfList.get(i), udfList.get(i).getName() + " - " + udfList.get(i).getDescription());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialiseScreen()
{
    if(form.getForms().Assessment.PatientGraphicStages.equals(engine.getFormName()))
    {
        form.getLocalContext().setAssessmentType(UserDefinedAssessmentType.SKINASSESSMENT);
        form.lblAssessName().setValue(UserDefinedAssessmentType.SKINASSESSMENT.toString());
    }
    else if(form.getForms().Assessment.PatientGraphicStagesPain.equals(engine.getFormName()))
    {
        form.getLocalContext().setAssessmentType(UserDefinedAssessmentType.PAINASSESSMENT);
        form.lblAssessName().setValue("Pain Assessment");
    }

    form.lyrAssessments().tabPageGraphical().customAuthoringInfo().setIsRequiredPropertyToControls(Boolean.TRUE);
    if(form.lyrAssessments().tabPageFindings().cmbAnswers().getValue()== null)
    {

        form.lyrAssessments().tabPageFindings().btnUpdateAnswer().setEnabled(false);

    }


    enableHelpUrlImage();
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasToDisplayScore()
{
    if (form.getLocalContext().getCurrentAssessment() == null || form.getLocalContext().getCurrentAssessment().getAssessmentData() == null || form.getLocalContext().getCurrentAssessment().getAssessmentData().getUserAssessment() == null)
        return false;

    if (UserDefinedAssessmentType.ASSESSMENTTOOL.equals(form.getLocalContext().getCurrentAssessment().getAssessmentData().getUserAssessment().getAssessmentType()) || UserDefinedAssessmentType.PREOPPOSSUM.equals(form.getLocalContext().getCurrentAssessment().getAssessmentData().getUserAssessment().getAssessmentType()) || UserDefinedAssessmentType.OPERATIVEDETAILSPOSSUM.equals(form.getLocalContext().getCurrentAssessment().getAssessmentData().getUserAssessment().getAssessmentType()))
        // ||
        // (form.getLocalContext().getCurrentAssessment().getAssessmentData().getUserAssessment().getAssessmentType().getParent()
        // != null
        // &&
        // UserDefinedAssessmentType.ASSESSMENTTOOL.equals(form.getLocalContext().getCurrentAssessment().getAssessmentData().getUserAssessment().getAssessmentType().getParent()))
        // )
        return true;

    return false;
}
项目:AvoinApotti    文件:PatientGraphicStagesImpl.java   
public PatientAssessmentListVo getLastCompletedAssessment(UserDefinedAssessmentType type, CareContextRefVo careContext, Boolean isCurrentForType)
{
    List list = getDomainFactory().find("from PatientAssessment as p1_1 where p1_1.assessmentData.graphic.assessmentType.id = :TYPE and p1_1.careContext.id = :CARE_CONTEXT order by p1_1.authoringInformation.authoringDateTime desc", new String[] {"TYPE", "CARE_CONTEXT"}, new Object[] {new Integer(type.getID()), careContext.getID_CareContext()});

    //Get only the first record (to optimise the work of the assembler)
    if(list != null && list.size() > 1)
    {
        Object firstItem = list.get(0);
        list.removeAll(list);
        list.add(firstItem);
    }

    PatientAssessmentListVoCollection voColl = PatientAssessmentListVoAssembler.createPatientAssessmentListVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:PatientAssessmentImpl.java   
private PatientAssessmentListVoCollection listPatientAssessment(CareContextRefVo careContextRefVo, UserDefinedAssessmentType assessmentType)
{
    if(careContextRefVo == null || careContextRefVo.getID_CareContext() == null)
        throw new RuntimeException("Cannot list PatientAssessments for null CareContextRefVo");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from PatientAssessment pa where pa.careContext.id =:RefId");
    ArrayList values  = new ArrayList();
    ArrayList params  = new ArrayList();

    values.add(careContextRefVo.getID_CareContext());
    params.add("RefId");

    if(assessmentType != null)
    {
        hql.append(" and ");
        hql.append("pa.assessmentData.userAssessment.assessmentType =:assType");
        values.add(getDomLookup(assessmentType));
        params.add("assType");  
    }

    List list = factory.find(hql.toString(), params, values);
    return PatientAssessmentListVoAssembler.createPatientAssessmentListVoCollectionFromPatientAssessment(list).sort();
}
项目:AvoinApotti    文件:DynamicAssessmentsImpl.java   
@SuppressWarnings("unchecked")
public Patient_AssessmentListVo getLastStructuredAssessment(UserDefinedAssessmentType type, CareContextRefVo careContext)
{
    List list = getDomainFactory().find("from PatientAssessment as p1_1 where p1_1.assessmentData.userAssessment.assessmentType.id = :TYPE and p1_1.careContext.id = :CARE_CONTEXT order by p1_1.authoringInformation.authoringDateTime desc", new String[] {"TYPE", "CARE_CONTEXT"}, new Object[] {new Integer(type.getID()), careContext.getID_CareContext()});

    //Get only the first record (to optimise the work of the assembler)
    if(list != null && list.size() > 1)
    {
        Object firstItem = list.get(0);
        list.removeAll(list);
        list.add(firstItem);
    }

    Patient_AssessmentListVoCollection voColl = Patient_AssessmentListVoAssembler.createPatient_AssessmentListVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:PatientAssessmentCompImpl.java   
private PatientAssessmentListVoCollection listPatientAssessment(CareContextRefVo careContextRefVo, UserDefinedAssessmentType assessmentType)
{
    if(careContextRefVo == null || careContextRefVo.getID_CareContext() == null)
        throw new RuntimeException("Cannot list PatientAssessments for null CareContextRefVo");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from PatientAssessment pa where pa.careContext.id =:RefId");
    ArrayList values  = new ArrayList();
    ArrayList params  = new ArrayList();

    values.add(careContextRefVo.getID_CareContext());
    params.add("RefId");

    if(assessmentType != null)
    {
        hql.append(" and ");
        hql.append("pa.assessmentData.userAssessment.assessmentType =:assType");
        values.add(getDomLookup(assessmentType));
        params.add("assType");  
    }

    List list = factory.find(hql.toString(), params, values);
    return PatientAssessmentListVoAssembler.createPatientAssessmentListVoCollectionFromPatientAssessment(list).sort();
}
项目:AvoinApotti    文件:PatientICPImpl.java   
public PatientAssessmentListVo getLastStructuredAssessment(UserDefinedAssessmentType type, CareContextRefVo careContext)
{
    List list = getDomainFactory().find("from PatientAssessment as p1_1 where p1_1.assessmentData.userAssessment.assessmentType.id = :TYPE and p1_1.careContext.id = :CARE_CONTEXT order by p1_1.authoringInformation.authoringDateTime desc", new String[] {"TYPE", "CARE_CONTEXT"}, new Object[] {new Integer(type.getID()), careContext.getID_CareContext()});

    //Get only the first record (to optimise the work of the assembler)
    if(list != null && list.size() > 1)
    {
        Object firstItem = list.get(0);
        list.removeAll(list);
        list.add(firstItem);
    }

    PatientAssessmentListVoCollection voColl = PatientAssessmentListVoAssembler.createPatientAssessmentListVoCollectionFromPatientAssessment(list);
    if(voColl != null && voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private NeedsAssessmentComponentScoreVo getComponentScoreByType(NeedsAssessmentComponentScoreVoCollection scores, UserDefinedAssessmentType assessmentType)
{
    if(scores == null || assessmentType == null)
        return null;

    for (int i = 0; i < scores.size(); i++)
    {
        if(assessmentType.equals(scores.get(i).getComponentType()))
            return scores.get(i);
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void initializeCustomControl() 
{
    initializeCodingControl();

    form.getLocalContext().setPreOpPossumUserAssessment(domain.getAssessment(PreActiveActiveInactiveStatus.ACTIVE, UserDefinedAssessmentType.PREOPPOSSUM));
    form.getLocalContext().setOperativePossumUserAssessment(domain.getAssessment(PreActiveActiveInactiveStatus.ACTIVE, UserDefinedAssessmentType.OPERATIVEDETAILSPOSSUM));

    //WDEV-5193
    form.lyrSurgeryDetails().tabGenDet().customControlMosConsultant().initialize(MosType.HCP);
    form.lyrSurgeryDetails().tabProc().customControlMosSurgeon().initialize(MosType.HCP);
    form.lyrSurgeryDetails().tabProc().customControlMosAnaesthetist().initialize(MosType.HCP);
//  UserDefinedAssessmentType.PREOPPOSSUM
//  UserDefinedAssessmentType.OPERATIVEDETAILSPOSSUM
}
项目:AvoinApotti    文件:TheatreSessionImpl.java   
public UserAssessmentVo getAssessment(PreActiveActiveInactiveStatus status, UserDefinedAssessmentType assessmentType) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from UserAssessment u ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (status != null)
    {
        hql.append(andStr + " u.activeStatus =:status");
        markers.add("status");
        values.add(getDomLookup(status));
        andStr = " and ";
    }

    if (andStr != " ")
        hql.append(andStr);

    hql.append(" u.assessmentType.id =:assessmentType" );
    markers.add("assessmentType");
    values.add(new Integer(assessmentType.getId()));
    andStr = " or ";

    if (markers.size() > 0)
        query += " where ";

    query += hql.toString();

    List list = factory.find(query, markers, values);
    UserAssessmentVoCollection coll = UserAssessmentVoAssembler.createUserAssessmentVoCollectionFromUserAssessment(list);
    if(coll != null && coll.size() > 0)
        return coll.get(0);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populatePainAssessmentRecord()
{
    PatientAssessmentListVo painAssessment = domain.getLastCompletedAssessment(UserDefinedAssessmentType.PAINASSESSMENT, form.getGlobalContext().Core.getCurrentCareContext(), Boolean.TRUE);
    if (painAssessment != null)
    {
        addNewAssessmentRow(painAssessment, "Pain Assessment", painAssessment.getAuthoringInformationIsNotNull() ? painAssessment.getAuthoringInformation().getAuthoringDateTime() : null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateSkinAssessmentRecord()
{
    PatientAssessmentListVo skinAssessment = domain.getLastCompletedAssessment(UserDefinedAssessmentType.SKINASSESSMENT, form.getGlobalContext().Core.getCurrentCareContext(), Boolean.TRUE);
    if (skinAssessment != null)
    {
        addNewAssessmentRow(skinAssessment, UserDefinedAssessmentType.SKINASSESSMENT.toString(), skinAssessment.getAuthoringInformationIsNotNull() ? skinAssessment.getAuthoringInformation().getAuthoringDateTime() : null);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    //set in the context the current Assessment
    UserAssessmentVo voUserAssessment = domain.getCurrentDPPUserAssessment(UserDefinedAssessmentType.DPP);
    if(voUserAssessment == null)
    {
        engine.showMessage("No 'Active' Daily Patient Progress record exists on the system.");
        return;
    }

    clearControlsAndContext();

    //get the POC records based on Assessment Questions from Configuration
    PlanOfCareVoCollection planOfCareColl = listPOCRecords(voUserAssessment);

    //Get a copy of the new assessment - get the configured Questions
    PatientAssessmentVo voNewPatientAssessment = getNewPatientAssessment(voUserAssessment);
    if(voNewPatientAssessment != null)
    {
        setPOCData(planOfCareColl, voNewPatientAssessment);
    }

    form.getGlobalContext().Nursing.setPatientAssessmentVo(voNewPatientAssessment);
    form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
    form.getGlobalContext().Nursing.setUserAssessmentDPP(voUserAssessment);
    form.getGlobalContext().Nursing.setIsDppCompleted(Boolean.FALSE);

    form.setMode(FormMode.EDIT);

    openDPPDialog();
}
项目:AvoinApotti    文件:Logic.java   
private void populatePainAssessmentRecord()
{
    PatientAssessmentListVo painAssessment = domain.getLastCompletedAssessment(UserDefinedAssessmentType.PAINASSESSMENT, form.getGlobalContext().Core.getCurrentCareContext(), Boolean.TRUE);
    if (painAssessment != null)
    {
        addNewAssessmentRow(painAssessment, "Pain Assessment", painAssessment.getAuthoringInformationIsNotNull() ? painAssessment.getAuthoringInformation().getAuthoringDateTime() : null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateFallsAssessment()
{
    PatientAssessmentListVo fallAssessment = domain.getLastStructuredAssessment(UserDefinedAssessmentType.FALLSRISK, form.getGlobalContext().Core.getCurrentCareContext());
    if (fallAssessment != null)
    {
        addNewAssessmentRow(fallAssessment, UserDefinedAssessmentType.FALLSRISK.toString(), fallAssessment.getAuthoringInformationIsNotNull() ? fallAssessment.getAuthoringInformation().getAuthoringDateTime() : null);
    }   
}
项目:AvoinApotti    文件:Logic.java   
private void populateSkinAssessmentRecord()
{
    PatientAssessmentListVo skinAssessment = domain.getLastCompletedAssessment(UserDefinedAssessmentType.SKINASSESSMENT, form.getGlobalContext().Core.getCurrentCareContext(), Boolean.TRUE);
    if (skinAssessment != null)
    {
        addNewAssessmentRow(skinAssessment, UserDefinedAssessmentType.SKINASSESSMENT.toString(), skinAssessment.getAuthoringInformationIsNotNull() ? skinAssessment.getAuthoringInformation().getAuthoringDateTime() : null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void viewAssessmentRecord()
{
    Object value = form.grdSummary().getValue();
    if (value instanceof BradenScale)
    {
        engine.open(form.getForms().Nursing.BradenScaleVIEW);
    }
    if (value instanceof MUSTVo)
    {
        engine.open(form.getForms().Nursing.MUST);
    }

    if (value instanceof PatientAssessmentListVo)
    {
        PatientAssessmentListVo voPatAsssess = (PatientAssessmentListVo) value;
        UserDefinedAssessmentType userDefinedAssessmentType = null;
        if (voPatAsssess.getAssessmentDataIsNotNull() && voPatAsssess.getAssessmentData().getGraphicIsNotNull())
            userDefinedAssessmentType = voPatAsssess.getAssessmentData().getGraphic().getAssessmentType();
        if (userDefinedAssessmentType != null)
        {
            if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.PAINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStagesPain);
            else if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.SKINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStages);
        }
    }

    if(value instanceof RepositioningPlanVo)
    {
        engine.open(form.getForms().Nursing.RepositioningPlan);
    }
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public ims.assessment.vo.UserAssessmentVo getCurrentDPPUserAssessment(ims.core.vo.lookups.UserDefinedAssessmentType assessmentType)
{
    if(assessmentType == null)
        throw new CodingRuntimeException("Cannot get UserAssessmentVo for null UserDefinedAssessmentType");

    StringBuffer hql = new StringBuffer("from UserAssessment u ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " where ";

    hql.append(andStr + " u.activeStatus =:status");
    markers.add("status");
    values.add(getDomLookup(PreActiveActiveInactiveStatus.ACTIVE));
    andStr = " and ";

    if(assessmentType != null)
    {
        hql.append(andStr + " u.assessmentType =:assType");
        markers.add("assType");
        values.add(getDomLookup(assessmentType));
        andStr = " and ";
    }

    List list = getDomainFactory().find(hql.toString(), markers, values);
    if(list != null )
    {
        if(list.size() > 1)
            throw new CodingRuntimeException("More than one active DPP User Assessment found on the system.");
        else if(list.size() > 0)
            return UserAssessmentVoAssembler.createUserAssessmentVoCollectionFromUserAssessment(list).get(0);
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdListGridQueryComboBoxTextSubmited(int column, GenForm.grdListRow row, String text) throws ims.framework.exceptions.PresentationLogicException
{
    if (column == 0)
    {
        try 
        {
            ClinicalProblemShortVoCollection listProbs = domain.listActiveProblems(text);

            row.getcolProblem().clear();
            for( int i = 0 ; i < listProbs.size() ; i++)
                row.getcolProblem().newRow(listProbs.get(i), listProbs.get(i).getPCName());

            if (listProbs.size() == 1)
                row.getcolProblem().setValue(listProbs.get(0));
            else if (listProbs.size() > 1)
                row.getcolProblem().showOpened();
        } 
        catch (DomainInterfaceException e) 
        {
            engine.showMessage(e.toString());
        }
    }
    else
    {
        UserAssessmentShortVoCollection listAssessments = domain.listAssessments(text, null, UserDefinedAssessmentType.MANCHESTERTRIAGE);
        row.getcolAssessment().clear();
        for( int i = 0 ; i < listAssessments.size() ; i++)
            row.getcolAssessment().newRow(listAssessments.get(i), listAssessments.get(i).getName());

        if (listAssessments.size() == 1)
            row.getcolAssessment().setValue(listAssessments.get(0));
        else if (listAssessments.size() > 1)
            row.getcolAssessment().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean isNonScoringAssessment()
{
    UserDefinedAssessmentType assType = getAssessmentType();

    if(assType != null)
    {
        if(assType.equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET) 
            || isChildOf(UserDefinedAssessmentType.USERDEFINEDDATASHEET, assType)
            || isChildOf(UserDefinedAssessmentType.TURNING_POINT_ASSESSMENTS, assType))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private UserDefinedAssessmentType getAssessmentType()
{
    UserAssessmentShortVo assessmentShort = form.getGlobalContext().Core.getSelectedUserAssessment();
    if (assessmentShort != null)
        return assessmentShort.getAssessmentType();

    UserAssessmentVo voUserAssessment = form.getLocalContext().getUserAssessment();
    if (voUserAssessment != null && voUserAssessment.getAssessmentTypeIsNotNull())
        return voUserAssessment.getAssessmentType();

    // It should not get as far as here
    return UserDefinedAssessmentType.ASSESSMENTTOOL;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isChildOf(UserDefinedAssessmentType parentAssType, UserDefinedAssessmentType assType)
{
    if(assType != null && parentAssType != null)
    {
        UserDefinedAssessmentType parent = assType.getParent();
        //Check if parent is User Assessment 
        if(parent != null && parent.equals(parentAssType))
        {
            return true;
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void setDefaultName()
{
    if (isAssessmentThirdLevelChild())
    {
        UserDefinedAssessmentType assType = getAssessmentType();
        form.txtName().setValue(assType != null ? assType.toString() : "");
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateTabsStatus(GraphicAssessmentVo voGraphicAssessment)
{
    form.lyrDetails().tabQuestions().setHeaderVisible(false);
    form.lyrDetails().tabFindings().setHeaderVisible(false);
    form.lyrDetails().tabFindingsWithStages().setHeaderVisible(false);
    form.lyrDetails().tabImages().setHeaderVisible(true);
    form.lyrDetails().tabStages().setHeaderVisible(false);

    if(voGraphicAssessment != null && voGraphicAssessment.getAssessmentTypeIsNotNull())
    {
        if(voGraphicAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGE)
                || voGraphicAssessment.getAssessmentType().equals(UserDefinedAssessmentType.MEDICALNOTING))
        {
            form.lyrDetails().tabFindings().setHeaderVisible(true);
        }
        else if(voGraphicAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS) || voGraphicAssessment.getAssessmentType().equals(UserDefinedAssessmentType.PAINASSESSMENT))
        {
            form.lyrDetails().tabFindings().setHeaderVisible(true);
            form.lyrDetails().tabQuestions().setHeaderVisible(true);
        }
        else if(isAssessmentWithStages())
        {
            form.lyrDetails().tabStages().setHeaderVisible(true);
            if(form.getLocalContext().getStagesIsNotNull() && form.getLocalContext().getStages().size() > 0)
            {
                form.lyrDetails().tabFindingsWithStages().setHeaderVisible(true);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean isSkinAssessment()
{
    GraphicAssessmentShortVo voGraphicAssessment = form.getGlobalContext().Core.getGraphicAssessmentShortVo();

    if(voGraphicAssessment == null)
        return false;

    return UserDefinedAssessmentType.SKINASSESSMENT.equals(voGraphicAssessment.getAssessmentType());
}
项目:AvoinApotti    文件:Logic.java   
private boolean isPainAssessment()
{
    GraphicAssessmentShortVo voGraphicAssessment = form.getGlobalContext().Core.getGraphicAssessmentShortVo();

    if(voGraphicAssessment == null)
        return false;

    return UserDefinedAssessmentType.PAINASSESSMENT.equals(voGraphicAssessment.getAssessmentType());
}
项目:AvoinApotti    文件:Logic.java   
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
    if(voPatientAssessmentData != null)
    {
        StringBuffer text = new StringBuffer();
        if(voPatientAssessmentData.getUserAssessmentIsNotNull())
        {
            UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
            text.append(userAssessment.getName());
            text.append(" - (" );
            if(userAssessment.getAssessmentTypeIsNotNull())
            {
                if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
                    text.append("Non Scoring ");
                else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
                    text.append("Scoring ");
            }
            text.append("Assessment)");

            return text.toString();
        }
        else if(voPatientAssessmentData.getGraphicIsNotNull())
        {
            GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
            text.append(voGraphic.getName());
            text.append(" - (Graphical Assessment");
            if(voGraphic.getAssessmentTypeIsNotNull())
            {
                if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
                    text.append(" with Questions");
            }
            text.append(")");
            return text.toString();

        }
    }
    return "";
}
项目:AvoinApotti    文件:Logic.java   
private void addAnnotatedImageWithStages()
{
    GraphicAssessmentShortVo voGraphicAssessment = new GraphicAssessmentShortVo();
    voGraphicAssessment.setName(form.txtName().getValue());
    voGraphicAssessment.setActiveStatus(PreActiveActiveInactiveStatus.PREACTIVE);
    voGraphicAssessment.setAssessmentType(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHREVIEWS);

    form.getGlobalContext().Core.setGraphicAssessmentShortVo(voGraphicAssessment);
    form.getGlobalContext().Core.setGraphicAssessmentFormMode(FormMode.EDIT);
    clearGraphicAssessmentSearchFilter();
    engine.open(form.getForms().Assessment.GraphicAssessmentNew);
}