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

项目:AvoinApotti    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromUserAssessmentShort(UserAssessmentVo voUA) 
{
    if(voUA == null)
        throw new CodingRuntimeException("No UserAssessmentVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();
    voPatientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort()); //WDEV-13127
    voPatientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort()); //WDEV-13127
    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    voPatientAssessment.setAuthoringInformation(form.lyrDetails().tabGenDetails().customControlAuthoring().getValue());

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(null);
    voPatientAssessmentData.setUserAssessment(voUA);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:AvoinApotti    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromUserAssessmentShort(UserAssessmentVo voUA) 
{
    if(voUA == null)
        throw new CodingRuntimeException("No UserAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();

    //WDEV-12555
    voPatientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort());
    voPatientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    voPatientAssessment.setAuthoringInformation(form.lyrSurgeryDetails().tabGenDet().customControlAuthoringInfo().getValue());

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(null);
    voPatientAssessmentData.setUserAssessment(voUA);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:AvoinApotti    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromGraphicalUserAssessmentShort(GraphicAssessmentVo voGA) 
{
    if(voGA == null)
        throw new CodingRuntimeException("No GraphicAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();

    //WDEV-12555
    voPatientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort());
    voPatientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    voPatientAssessment.setAuthoringInformation(form.lyrSurgeryDetails().tabGenDet().customControlAuthoringInfo().getValue());

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(voGA);
    voPatientAssessmentData.setUserAssessment(null);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isNonApplicableForCompletedDPP()
{
    if(wasDialogDisplayed() == false)
    {
        PatientAssessmentStatusReason status = form.lyrTabs().tabCurrent().cmbStatus().getValue();
        if(status != null && status.equals(PatientAssessmentStatusReason.COMPLETED))
        {
            String nonAppQuestions = getNotApplicableQuestions();
            if(nonAppQuestions != null)
            {
                form.getGlobalContext().Core.setYesNoDialogMessage(nonAppQuestions);
                form.getLocalContext().setYesNoDisplayed(Boolean.TRUE);
                engine.open(form.getForms().Core.YesNoDialog);
                return true;
            }
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void loadReasonCombo(PatientAssessmentStatusReason parent)
{
    form.lyrTabs().tabCurrent().cmbStatusReason().clear();
    if (parent == null)
        return;

    PatientAssessmentStatusReasonCollection lookupColl = LookupHelper.getPatientAssessmentStatusReason(domain.getLookupService());
    for (int i = 0; i < lookupColl.size(); i++)
    {
        PatientAssessmentStatusReason reasonLkp = lookupColl.get(i);
        if (reasonLkp.getParent() != null && reasonLkp.getParent().equals(parent))
        {
            form.lyrTabs().tabCurrent().cmbStatusReason().newRow(reasonLkp, reasonLkp.toString());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void prepopulateStatusCombo()
{
    form.lyrTabs().tabCurrent().cmbStatus().clear();
    if (isNewRecord() == false)
    {
        PatientAssessmentStatusReasonCollection lookupColl = LookupHelper.getPatientAssessmentStatusReason(domain.getLookupService());
        for (int i = 0; i < lookupColl.size(); i++)
        {
            PatientAssessmentStatusReason reasonLkp = lookupColl.get(i);
            if (reasonLkp.getParent() == null)
            {
                if (isNewRecord() == false && reasonLkp.equals(PatientAssessmentStatusReason.NOTCOMMENCED))
                    continue;

                form.lyrTabs().tabCurrent().cmbStatus().newRow(reasonLkp, reasonLkp.toString());
            }
        }
    }
}
项目:AvoinApotti    文件:NursingSummaryImpl.java   
public PatientAssessmentVo getLastDPPAssessment(UserDefinedAssessmentType type, CareContextRefVo careContext)
{
    if(type == null)
        throw new CodingRuntimeException("The 'type' parameter cannot be null !");
    if(careContext == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();
    hql = "select p1_1 from PatientAssessment as p1_1 left join p1_1.assessmentData as p2_1 left join p2_1.userAssessment as u1_1 left join u1_1.assessmentType as l1_1 left join p1_1.careContext as c1_1 left join p1_1.status as l2_1\r\n" + 
            "where\r\n" + 
            "(l2_1 = :STATUS and l1_1.id = :ASSTYPE and c1_1.id = :CONTEXT)\r\n" + 
            "order by p1_1.systemInformation.creationDateTime desc ";

    PatientAssessmentVoCollection coll = PatientAssessmentVoAssembler.createPatientAssessmentVoCollectionFromPatientAssessment(
            factory.find(hql, new String[] {"STATUS","ASSTYPE","CONTEXT"}, 
                    new Object[] {getDomLookup(PatientAssessmentStatusReason.COMPLETED), new Integer(type.getId()), careContext.getID_CareContext()}));

    return coll.size() > 0 ? coll.get(0) : null;
}
项目:AvoinApotti    文件:Logic.java   
private void loadStatusCombo(boolean removeNonCommenced)
{
    //Status - has to load only parents
    form.cmbStatus().clear();
    PatientAssessmentStatusReasonCollection voColl = LookupHelper.getPatientAssessmentStatusReason(domain.getLookupService());
    for(int i = 0; voColl != null && i < voColl.size(); i++)
    {
        if(voColl.get(i).getParent() == null)
        {
            if(removeNonCommenced && voColl.get(i).equals(PatientAssessmentStatusReason.NOTCOMMENCED))
                continue;

            form.cmbStatus().newRow(voColl.get(i), voColl.get(i).toString());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateCombos(PatientAssessmentVo patientAssessment)
{
    if(patientAssessment == null)
        return;

    PatientAssessmentStatusReason status = patientAssessment.getStatus();
    boolean isEditMode = form.getMode().equals(FormMode.EDIT);
    if (isEditMode)
    {
        loadStatusCombo(true);
        if(status != null && status.equals(PatientAssessmentStatusReason.NOTCOMMENCED))
            status = PatientAssessmentStatusReason.INPROGRESS;
    }
    form.cmbStatus().setValue(status);
    cmbStatusValueChanged();
    form.cmbReason().setValue(patientAssessment.getStatusReason());
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdAssessmentsCellValueChanged(DynamicGridCell cell)
{
    //Refresh Reason Column
    DynamicGridColumn col = cell.getColumn();
    if(col != null && col.getIdentifier().equals(STATUS_COLUMN))
    {
        DynamicGridRow row = cell.getRow();
        if(row != null)
        {
            DynamicGridCell reasonCell = row.getCells().get(getDynGridColumn(REASON_COLUMN));
            Object statusValue = cell.getValue();
            if(reasonCell != null )
            {
                if(statusValue instanceof PatientAssessmentStatusReason)
                {
                    populateReasonCell(reasonCell, (PatientAssessmentStatusReason)statusValue);
                }
                else
                {
                    reasonCell.getItems().clear();
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected ims.assessment.vo.PatientAssessmentDataVo populateDataFromScreen(ims.assessment.vo.PatientAssessmentDataVo voPatientAssessmentData, PatientAssessmentVo voPatientAssessment)
{
    populateAssociatedQuestionsData(voPatientAssessmentData);

    PatientAssessmentStatusReason status = form.cmbStatus().getValue();
    voPatientAssessment.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
    voPatientAssessment.setStatus(status);
    voPatientAssessment.setStatusReason(form.cmbReason().getValue());
    if(status != null && status.equals(PatientAssessmentStatusReason.COMPLETED))
    {
        AuthoringInformationVo confirmingInfo = form.customControlCompleted().getValue();
        if(confirmingInfo != null)
        {
            voPatientAssessment.setCompletedHCP(confirmingInfo.getAuthoringHcp());
            voPatientAssessment.setCompletedDateTime(confirmingInfo.getAuthoringDateTime());
        }
    }

    return voPatientAssessmentData;
}
项目:AvoinApotti    文件:Logic.java   
private void loadStatusCombo(boolean removeNonCommenced)
{
    //Status
    form.cmbStatus().clear();
    PatientAssessmentStatusReasonCollection voColl = LookupHelper.getPatientAssessmentStatusReason(domain.getLookupService());
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        if (voColl.get(i).getParent() == null)
        {
            if(removeNonCommenced && voColl.get(i).equals(PatientAssessmentStatusReason.NOTCOMMENCED))
                continue;

            form.cmbStatus().newRow(voColl.get(i), voColl.get(i).toString());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState()
{
    PatientAssessmentVo voPatientAssessment = form.getLocalContext().getCurrentPatientAssessment();
    boolean isCompleted = voPatientAssessment != null && voPatientAssessment.getStatusIsNotNull() && voPatientAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED);
    if (form.getMode().equals(FormMode.EDIT))
    {
        if (isCompleted)
        {
            setControlsReadOnly(true);
        }
        else
        {
            setControlsReadOnly(false);
            setStatusToInProgress(voPatientAssessment);
        }
    }
    else
    {
        form.btnUpdate().setVisible(isCompleted == false);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateUserAssessment(PatientAssessmentDataVo data, PatientAssessmentStatusReason status, AnswerStatus answerStatus) throws PresentationLogicException
{
    checkDataIntegrity(data);
    boolean isFlatView = data.getUserAssessment().getIsFlatView().booleanValue();
    boolean isMultiGroup = data.getUserAssessment().getIsMultipleGroup().booleanValue();
    prepareGrid(isFlatView, data.getGroupQuestionWidth(), isCompleted(status));
    populateGridHeaderAndFooter(data.getUserAssessment());

    if (isDPP)
    {
        populateQuestionsFlat(data, answerStatus);
        setAnswersFlat(data.getAnswerGroups());
    }
    else
    {
        if (isMultiGroup && isFlatView)
            populateQuestionsFlat(data, null);
        else
            populateQuestionsHierarchical(data);

        if (isFlatView)
            setAnswersFlat(data.getAnswerGroups());
        else
            setAnswersHierarchical(data.getAnswerGroups());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateUserAssessment(Patient_AssessmentDataVo data, PatientAssessmentStatusReason status, AnswerStatus answerStatus) throws PresentationLogicException
{
    checkDataIntegrity(data);
    boolean isFlatView = data.getUserAssessment().getIsFlatView().booleanValue();
    boolean isMultiGroup = data.getUserAssessment().getIsMultipleGroup().booleanValue();
    prepareGrid(isFlatView, data.getGroupQuestionWidth(), isCompleted(status));
    populateGridHeaderAndFooter(data.getUserAssessment());

    if (isDPP)
    {
        populateQuestionsFlat(data, answerStatus);
        setAnswersFlat(data.getAnswerGroups());
    }
    else
    {
        if (isMultiGroup && isFlatView)
            populateQuestionsFlat(data, null);
        else
            populateQuestionsHierarchical(data);

        if (isFlatView)
            setAnswersFlat(data.getAnswerGroups());
        else
            setAnswersHierarchical(data.getAnswerGroups());
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdAssessmentsCellValueChanged(DynamicGridCell cell)
{
    //Refresh Reason Column
    DynamicGridColumn col = cell.getColumn();
    if(col != null && col.getIdentifier().equals(STATUS_COLUMN))
    {
        DynamicGridRow row = cell.getRow();
        if(row != null)
        {
            DynamicGridCell reasonCell = row.getCells().get(getDynGridColumn(REASON_COLUMN));
            Object statusValue = cell.getValue();
            if(reasonCell != null )
            {
                if(statusValue instanceof PatientAssessmentStatusReason)
                {
                    populateReasonCell(reasonCell, (PatientAssessmentStatusReason)statusValue);
                }
                else
                {
                    reasonCell.getItems().clear();
                }
            }
        }
    }
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private void populateUserAssessment(PatientAssessmentDataVo data, PatientAssessmentStatusReason status, AnswerStatus answerStatus) throws PresentationLogicException
{
    checkDataIntegrity(data);       
    boolean isFlatView = data.getUserAssessment().getIsFlatView().booleanValue();
    boolean isMultiGroup = data.getUserAssessment().getIsMultipleGroup().booleanValue();                

    prepareGrid(isFlatView, data.getGroupQuestionWidth(), isCompleted(status));

    if(isDPP)
    {
        populateQuestionsFlat(data, answerStatus);
        setAnswersFlat(data.getAnswerGroups());
    }
    else
    {
        if(isMultiGroup && isFlatView)
            populateQuestionsFlat(data, null);
        else
            populateQuestionsHierarchical(data);        

        if(isFlatView)
            setAnswersFlat(data.getAnswerGroups());
        else
            setAnswersHierarchical(data.getAnswerGroups());
    }
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private void populateUserAssessment(Patient_AssessmentDataVo data, PatientAssessmentStatusReason status, AnswerStatus answerStatus) throws PresentationLogicException
{
    checkDataIntegrity(data);       
    boolean isFlatView = data.getUserAssessment().getIsFlatView().booleanValue();
    boolean isMultiGroup = data.getUserAssessment().getIsMultipleGroup().booleanValue();                

    prepareGrid(isFlatView, data.getGroupQuestionWidth(), isCompleted(status));

    if(isDPP)
    {
        populateQuestionsFlat(data, answerStatus);
        setAnswersFlat(data.getAnswerGroups());
    }
    else
    {
        if(isMultiGroup && isFlatView)
            populateQuestionsFlat(data, null);
        else
            populateQuestionsHierarchical(data);        

        if(isFlatView)
            setAnswersFlat(data.getAnswerGroups());
        else
            setAnswersHierarchical(data.getAnswerGroups());
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to populate Patient Assessment to screen
 */
protected void populateInstanceControlsFromData(PatientAssessmentVo patientAssessment)
{
    // Clear instance controls
    clearInstanceControls();

    // Test parameter
    if (patientAssessment == null || patientAssessment.getAssessmentData() == null)
        return;

    // Populate instance controls with data
    if (patientAssessment.getAssessmentData().getGraphic() != null)
    {
        form.ctnGraphical().ccGraphical().setPatientAssessment(patientAssessment, PatientAssessmentInfoVo.getInstance(form.getGlobalContext().Core.getPatientShort()));
        form.getLocalContext().setEditingGraphicalAssessment(Boolean.TRUE);
    }
    else
    {
        form.ctnStructural().ccStructuralAssessment().setPatientAssessment(patientAssessment, true, PatientAssessmentInfoVo.getInstance(form.getGlobalContext().Core.getPatientShort()));
        form.getLocalContext().setEditingGraphicalAssessment(Boolean.FALSE);
    }

    form.chkCompleted().setValue(PatientAssessmentStatusReason.COMPLETED.equals(patientAssessment.getStatus()));
}
项目:AvoinApotti    文件:Logic.java   
private void populateCombos(PatientAssessmentVo patientAssessment)
{
    if(patientAssessment == null)
        return;

    PatientAssessmentStatusReason status = patientAssessment.getStatus();
    boolean isEditMode = form.getMode().equals(FormMode.EDIT);
    if (isEditMode)
    {
        loadStatusCombo(true);
        //if(status != null && status.equals(PatientAssessmentStatusReason.NOTCOMMENCED))
            //status = PatientAssessmentStatusReason.INPROGRESS;
    }
    form.cmbStatus().setValue(status);
    cmbStatusValueChanged();
    form.cmbReason().setValue(patientAssessment.getStatusReason());
}
项目:AvoinApotti    文件:Logic.java   
private void cmbStatusValueChanged()
{
    boolean editMode = form.getMode().equals(FormMode.EDIT);

    form.cmbReason().clear();
    loadReasonCombo();  


    if(editMode)
    {
        form.customControlCompleted().initializeComponent();
        form.setcustomControlCompletedEnabled(true);    
    } 

    if (editMode)
    {
        if (PatientAssessmentStatusReason.COMPLETED.equals(form.cmbStatus().getValue()))
            form.customControlCompleted().initializeComponent();
        else
            form.customControlCompleted().setValue(null);
    }

    //enableConfirmingHCPComponent();
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (save())
    {
        //WDEV-14724
        if(form.getLocalContext().getCurentSurgicalOpNotes() != null && form.getLocalContext().getCurentSurgicalOpNotes().getDiagram() != null && PatientAssessmentStatusReason.COMPLETED.equals(form.getLocalContext().getCurentSurgicalOpNotes().getDiagram().getStatus()) 
                && form.getLocalContext().getCurentSurgicalOpNotes().getDiagram().getAssessmentData() != null && form.getLocalContext().getCurentSurgicalOpNotes().getDiagram().getAssessmentData().getGraphic() != null 
                && form.getLocalContext().getCurentSurgicalOpNotes().getDiagram().getAssessmentData().getGraphic().getAssociatedReportForPrinting() != null
                && Boolean.TRUE.equals(ConfigFlag.UI.SAVE_PATIENTDOCUMENT_ON_ASSESSMENTCOMPLETED.getValue()))
        {
            createAndSavePatientDocument();
        }

        open();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadStatusCombo(boolean removeNonCommenced)
{
    //Status - has to load only parents
    form.cmbStatus().clear();
    PatientAssessmentStatusReasonCollection voColl = LookupHelper.getPatientAssessmentStatusReason(domain.getLookupService());
    for(int i = 0; voColl != null && i < voColl.size(); i++)
    {
        if(voColl.get(i).getParent() == null)
        {
            if(removeNonCommenced && voColl.get(i).equals(PatientAssessmentStatusReason.NOTCOMMENCED))
                continue;

            form.cmbStatus().newRow(voColl.get(i), voColl.get(i).toString());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnEditClick() throws ims.framework.exceptions.PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    if (form.getLocalContext().getDischargeDetailsIsNotNull()
        && form.getLocalContext().getDischargeDetails().getPatientAssessment() == null)
    {
        if ( !initializeCustomControl())
            return;

        // WDEV-13973
        form.cmbStatus().setValue(PatientAssessmentStatusReason.INPROGRESS);
        // WDEV-14068
        cmbStatusValueChanged();
    }
    else
        form.ccAssessment().setPatientAssessment(form.getLocalContext().getDischargeDetails().getPatientAssessment(), form.getMode().equals(FormMode.VIEW));
    form.getGlobalContext().Clinical.seteDischargeDisableTabs(true);
    form.cmbStatus().setEnabled(true);
    form.cmbReason().setEnabled(true);
    form.setcustomControlAuthoringEnabled(true);
    form.customControlAuthoring().initializeComponent();
    form.fireCustomControlValueChanged();
}
项目:AvoinApotti    文件:Logic.java   
private void populateCombos(PatientAssessmentVo patientAssessment)
{
    if(patientAssessment == null)
        return;

    PatientAssessmentStatusReason status = patientAssessment.getStatus();
    boolean isEditMode = form.getMode().equals(FormMode.EDIT);
    if (isEditMode)
    {
        loadStatusCombo(true);
        if(status != null && status.equals(PatientAssessmentStatusReason.NOTCOMMENCED))
            status = PatientAssessmentStatusReason.INPROGRESS;
    }
    form.cmbStatus().setValue(status);
    cmbStatusValueChanged();
    form.cmbReason().setValue(patientAssessment.getStatusReason());
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdAssessmentsCellValueChanged(DynamicGridCell cell)
{
    // Refresh Reason Column
    DynamicGridColumn col = cell.getColumn();
    if (col != null && col.getIdentifier().equals(STATUS_COLUMN))
    {
        DynamicGridRow row = cell.getRow();
        if (row != null)
        {
            DynamicGridCell reasonCell = row.getCells().get(getDynGridColumn(REASON_COLUMN));
            Object statusValue = cell.getValue();
            if (reasonCell != null)
            {
                if (statusValue instanceof PatientAssessmentStatusReason)
                    populateReasonCell(reasonCell, (PatientAssessmentStatusReason) statusValue);
            }
            else
            {
                reasonCell.getItems().clear();
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromGraphicalUserAssessmentShort(GraphicAssessmentVo voGA) {
    if(voGA == null)
        throw new CodingRuntimeException("No GraphicAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();
    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); 
    voAuthoringInformation.setAuthoringDateTime(new DateTime());
    if (domain.getHcpUser() != null)
    {
        Hcp hcpVo = (Hcp) domain.getHcpUser();
        HcpLiteVo liteVo = domain.getHcpLiteById(hcpVo);
        voAuthoringInformation.setAuthoringHcp(liteVo);
    }
    voPatientAssessment.setAuthoringInformation(voAuthoringInformation);

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(voGA);
    voPatientAssessmentData.setUserAssessment(null);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:AvoinApotti    文件:Logic.java   
/**
 *  Function used to initialize the form
 *  Initialize the MosQuery components, clear the global contexts
 */
public void initialize() throws ims.framework.exceptions.PresentationLogicException
{
    // Initialize MosQuery components
    form.ccAuthoringHCP().initialize(MosType.HCP);
    form.ccResponsibleHCP().initialize(MosType.HCP);

    // Check system flag and set appropriate column name
    form.grdAssessments().setColAuthoringHCPCaption(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue());

    // Remove statuses different from "In Progress" or "Completed"
    ArrayList<?> values = form.cmbAssessmentStatus().getValues();

    for (int i = values.size() - 1; i >= 0; i--)
    {
        if (!PatientAssessmentStatusReason.COMPLETED.equals(values.get(i)) && !PatientAssessmentStatusReason.INPROGRESS.equals(values.get(i)))
        {
            form.cmbAssessmentStatus().removeRow((PatientAssessmentStatusReason) values.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromUserAssessmentShort(UserAssessmentVo voUA) 
{
    if(voUA == null)
        throw new CodingRuntimeException("No UserAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();

    //WDEV-12555
    voPatientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort());
    voPatientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    voPatientAssessment.setAuthoringInformation(form.lyrSurgeryDetails().tabGenDet().customControlAuthoringInfo().getValue());

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(null);
    voPatientAssessmentData.setUserAssessment(voUA);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:openmaxims-linux    文件:Logic.java   
protected ims.assessment.vo.PatientAssessmentDataVo populateDataFromScreen(ims.assessment.vo.PatientAssessmentDataVo voPatientAssessmentData, PatientAssessmentVo voPatientAssessment)
{
    populateAssociatedQuestionsData(voPatientAssessmentData);

    PatientAssessmentStatusReason status = form.cmbStatus().getValue();
    voPatientAssessment.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
    voPatientAssessment.setStatus(status);
    voPatientAssessment.setStatusReason(form.cmbReason().getValue());
    if(status != null && status.equals(PatientAssessmentStatusReason.COMPLETED))
    {
        AuthoringInformationVo confirmingInfo = form.customControlCompleted().getValue();
        if(confirmingInfo != null)
        {
            voPatientAssessment.setCompletedHCP(confirmingInfo.getAuthoringHcp());
            voPatientAssessment.setCompletedDateTime(confirmingInfo.getAuthoringDateTime());
        }
    }

    return voPatientAssessmentData;
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromGraphicalUserAssessmentShort(GraphicAssessmentVo voGA) 
{
    if(voGA == null)
        throw new CodingRuntimeException("No GraphicAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();

    //WDEV-12555
    voPatientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort());
    voPatientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    voPatientAssessment.setAuthoringInformation(form.lyrSurgeryDetails().tabGenDet().customControlAuthoringInfo().getValue());

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(voGA);
    voPatientAssessmentData.setUserAssessment(null);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:openMAXIMS    文件:Logic.java   
private void newPatientAssessmentInstance(UserAssessmentVo referralAssessment) throws PresentationLogicException 
{
    if(referralAssessment == null)
        return;

    // Create a new PatientAssessment
    PatientAssessmentVo patientAssessment = new PatientAssessmentVo();

    patientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    patientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    patientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort());

    patientAssessment.setAssessmentData(new PatientAssessmentDataVo());
    patientAssessment.getAssessmentData().setUserAssessment(referralAssessment);
    patientAssessment.getAssessmentData().setGroupQuestionWidth(referralAssessment.getGroupQuestionWidth());

    patientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    patientAssessment.setStatusReason(PatientAssessmentStatusReason.NOTCOMMENCED);

    form.lyrMain().tabPageReferralDetails().ccReferralAssessment().setPatientAssessment(patientAssessment, false, PatientAssessmentInfoVo.getInstance(form.getGlobalContext().Core.getPatientShort()));
}
项目:openmaxims-linux    文件:Logic.java   
private void populateCombos(PatientAssessmentVo patientAssessment)
{
    if(patientAssessment == null)
        return;

    PatientAssessmentStatusReason status = patientAssessment.getStatus();
    boolean isEditMode = form.getMode().equals(FormMode.EDIT);
    if (isEditMode)
    {
        loadStatusCombo(true);
        if(status != null && status.equals(PatientAssessmentStatusReason.NOTCOMMENCED))
            status = PatientAssessmentStatusReason.INPROGRESS;
    }
    form.cmbStatus().setValue(status);
    cmbStatusValueChanged();
    form.cmbReason().setValue(patientAssessment.getStatusReason());
}
项目:openMAXIMS    文件:Logic.java   
private void loadReasonCombo(PatientAssessmentStatusReason parent)
{
    form.lyrTabs().tabCurrent().cmbStatusReason().clear();
    if (parent == null)
        return;

    PatientAssessmentStatusReasonCollection lookupColl = LookupHelper.getPatientAssessmentStatusReason(domain.getLookupService());
    for (int i = 0; i < lookupColl.size(); i++)
    {
        PatientAssessmentStatusReason reasonLkp = lookupColl.get(i);
        if (reasonLkp.getParent() != null && reasonLkp.getParent().equals(parent))
        {
            form.lyrTabs().tabCurrent().cmbStatusReason().newRow(reasonLkp, reasonLkp.toString());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromGraphicalUserAssessmentShort(GraphicAssessmentVo voGA) 
{
    if(voGA == null)
        throw new CodingRuntimeException("No GraphicAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();

    //WDEV-12555
    voPatientAssessment.setPatient(form.getGlobalContext().Core.getPatientShort());
    voPatientAssessment.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    voPatientAssessment.setAuthoringInformation(form.lyrSurgeryDetails().tabGenDet().customControlAuthoringInfo().getValue());

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(voGA);
    voPatientAssessmentData.setUserAssessment(null);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:openmaxims-linux    文件:Logic.java   
private void cmbStatusValueChanged()
{
    boolean editMode = form.getMode().equals(FormMode.EDIT);

    form.cmbReason().clear();
    loadReasonCombo();  


    if(editMode)
    {
        form.customControlCompleted().initializeComponent();
        form.setcustomControlCompletedEnabled(true);    
    } 

    if (editMode)
    {
        if (PatientAssessmentStatusReason.COMPLETED.equals(form.cmbStatus().getValue()))
            form.customControlCompleted().initializeComponent();
        else
            form.customControlCompleted().setValue(null);
    }

    //enableConfirmingHCPComponent();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnEditClick() throws ims.framework.exceptions.PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    if (form.getLocalContext().getDischargeDetailsIsNotNull()
        && form.getLocalContext().getDischargeDetails().getPatientAssessment() == null)
    {
        if ( !initializeCustomControl())
            return;

        // WDEV-13973
        form.cmbStatus().setValue(PatientAssessmentStatusReason.INPROGRESS);
        // WDEV-14068
        cmbStatusValueChanged();
    }
    else
        form.ccAssessment().setPatientAssessment(form.getLocalContext().getDischargeDetails().getPatientAssessment(), form.getMode().equals(FormMode.VIEW));
    form.getGlobalContext().Clinical.seteDischargeDisableTabs(true);
    form.cmbStatus().setEnabled(true);
    form.cmbReason().setEnabled(true);
    form.setcustomControlAuthoringEnabled(true);
    form.customControlAuthoring().initializeComponent();
    form.fireCustomControlValueChanged();
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentVo populatePatientAssessmentFromGraphicalUserAssessmentShort(GraphicAssessmentVo voGA) {
    if(voGA == null)
        throw new CodingRuntimeException("No GraphicAssessmentShortVo provided");

    PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();
    voPatientAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    voPatientAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voPatientAssessment.setStatus(PatientAssessmentStatusReason.NOTCOMMENCED);
    AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); 
    voAuthoringInformation.setAuthoringDateTime(new DateTime());
    if (domain.getHcpUser() != null)
    {
        Hcp hcpVo = (Hcp) domain.getHcpUser();
        HcpLiteVo liteVo = domain.getHcpLiteById(hcpVo);
        voAuthoringInformation.setAuthoringHcp(liteVo);
    }
    voPatientAssessment.setAuthoringInformation(voAuthoringInformation);

    //Patient Assessment Data
    PatientAssessmentDataVo voPatientAssessmentData = new PatientAssessmentDataVo();
    voPatientAssessmentData.setGraphic(voGA);
    voPatientAssessmentData.setUserAssessment(null);
    voPatientAssessment.setAssessmentData(voPatientAssessmentData);

    return voPatientAssessment;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateUserAssessment(PatientAssessmentDataVo data, PatientAssessmentStatusReason status, AnswerStatus answerStatus) throws PresentationLogicException
{
    checkDataIntegrity(data);
    boolean isFlatView = data.getUserAssessment().getIsFlatView().booleanValue();
    boolean isMultiGroup = data.getUserAssessment().getIsMultipleGroup().booleanValue();
    prepareGrid(isFlatView, data.getGroupQuestionWidth(), isCompleted(status));
    populateGridHeaderAndFooter(data.getUserAssessment());

    if (isDPP)
    {
        populateQuestionsFlat(data, answerStatus);
        setAnswersFlat(data.getAnswerGroups());
    }
    else
    {
        if (isMultiGroup && isFlatView)
            populateQuestionsFlat(data, null);
        else
            populateQuestionsHierarchical(data);

        if (isFlatView)
            setAnswersFlat(data.getAnswerGroups());
        else
            setAnswersHierarchical(data.getAnswerGroups());
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnEditClick() throws ims.framework.exceptions.PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    if (form.getLocalContext().getDischargeDetailsIsNotNull()
        && form.getLocalContext().getDischargeDetails().getPatientAssessment() == null)
    {
        if ( !initializeCustomControl())
            return;

        // WDEV-13973
        form.cmbStatus().setValue(PatientAssessmentStatusReason.INPROGRESS);
        // WDEV-14068
        cmbStatusValueChanged();
    }
    else
        form.ccAssessment().setPatientAssessment(form.getLocalContext().getDischargeDetails().getPatientAssessment(), form.getMode().equals(FormMode.VIEW));
    form.getGlobalContext().Clinical.seteDischargeDisableTabs(true);
    form.cmbStatus().setEnabled(true);
    form.cmbReason().setEnabled(true);
    form.setcustomControlAuthoringEnabled(true);
    form.customControlAuthoring().initializeComponent();
    form.fireCustomControlValueChanged();
}