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

项目:AvoinApotti    文件:Logic.java   
private void listAvailableStatuses(DocumentStatus currentStatus) 
{
    form.cmbNewStatus().clear();        
    DocumentStatusCollection lkpCollStatus = ims.core.vo.lookups.LookupHelper.getDocumentStatus(domain.getLookupService()); 
    boolean bHide = false;
    for (int i=0; i < lkpCollStatus.size(); i++)
    {
        if (StatusHelper.canUpdateStatus(currentStatus,lkpCollStatus.get(i)))
        {
            form.cmbNewStatus().newRow(lkpCollStatus.get(i), lkpCollStatus.get(i).toString());
            bHide = true;
        }
    }

    form.lblChangeTo().setVisible(bHide);
    form.cmbNewStatus().setVisible(bHide);
    form.btnChange().setVisible(bHide);
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param voDocumentDetails
 */
private void setCurrentStatusImage(ims.core.vo.lookups.DocumentStatus currentStatus)
{
    if (currentStatus != null)
    {
        form.imbCurrentStatus().setEnabledImage(currentStatus.getImage());
        form.imbCurrentStatus().setDisabledImage(currentStatus.getImage());
        form.imbCurrentStatus().setTooltip("Current Status : " + currentStatus.getText());
        form.lblStatusText().setValue(currentStatus.getText());
    }
    else
    {
        form.imbCurrentStatus().setEnabledImage(null);
        form.imbCurrentStatus().setDisabledImage(null);
        form.lblStatusText().setValue(null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveCorrespondence(ims.core.vo.lookups.DocumentStatus docStatus)
{
    CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
    if (null == voCorrespondenceDetails)
        return false;

    MemberOfStaffShortVo voMos = (MemberOfStaffShortVo) domain.getMosUser();

    if (null == voMos)
        return false;

    populateDataFromScreen(voCorrespondenceDetails);

    // WDEV-2774
    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, voCorrespondenceDetails.getCurrentStatus()));

    // update the current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param voDocumentDetails
 */
private void setCurrentStatusImage(ims.core.vo.lookups.DocumentStatus currentStatus)
{
    if (currentStatus != null)
    {
        form.btnDocStatHist().setImage(currentStatus.getImage());
        form.btnDocStatHist().setTooltip("Current Status : " + currentStatus.getText());
        int l_i = form.pnlTitle().getValue().indexOf("Current");
        if (l_i > -1)
        {
            String[] sTitleLeft = form.pnlTitle().getValue().split("Current Status");
            if (sTitleLeft != null)
            {
                String lTitle = sTitleLeft[0] += "Current Status of " + form.getLocalContext().getcorrespondenceDetails().getCurrentDocument().getTemplate().getName().toString() + " : " + currentStatus.getText();
                form.pnlTitle().setValue(lTitle);
            }
        }
    }
    else
    {
        form.btnDocStatHist().setImage(null);
        form.btnDocStatHist().setTooltip("Current Status : None");
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnUpdateClick() throws PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    if (!(form.getLocalContext().getcorrespondenceDetails().getCurrentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE)))
    {

        form.lyrCorrespondenceDetail().tabCorrespondence().qmbSignedBy().setEnabled(false);
        form.lyrCorrespondenceDetail().tabCorrespondence().chkSpecialInterest().setEnabled(false);
        form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().setEnabled(true);
        updateContextMenusState();

        return;

    }
    form.lyrCorrespondenceDetail().tabCorrespondence().qmbSignedBy().setEnabled(true);
    form.lyrCorrespondenceDetail().tabCorrespondence().chkSpecialInterest().setEnabled(true);
    form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().setEnabled(true);

}
项目:AvoinApotti    文件:Logic.java   
private void updateDocumentStatus(DocumentStatus value)
{

    if (value.equals(DocumentStatus.SUPLEMENTRY))
    {

        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        DocumentVo nuDoc = new DocumentVo();
        nuDoc.setTemplate(form.getGlobalContext().Correspondence.getReportTemplate());
        nuDoc.setPatient(form.getGlobalContext().Core.getPatientShort());
        nuDoc.setStatus(DocumentStatus.GENNOTPRINTED);
        nuDoc.setContent(voCorrespondenceDetails.getCurrentDocument().getContent());
        nuDoc.setCreationDate(new Date());
        voCorrespondenceDetails.setCurrentDocument(nuDoc);
        voCorrespondenceDetails.setCurrentStatus(DocumentStatus.GENNOTPRINTED);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);
        form.getLocalContext().getcorrespondenceDetails();

    }
    else
    {

        form.getLocalContext().getcorrespondenceDetails().getCurrentDocument().setStatus(value);

    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveStatus(ims.core.vo.lookups.DocumentStatus docStatus, CorrespondenceDetailsVo voCorrespondenceDetails, byte[] resultPdf)
{
    if (null != resultPdf)
        voCorrespondenceDetails.getCurrentDocument().setContent(new String(resultPdf));

    // update current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);

    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, docStatus));

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void initialise() {
    PatientListsFilterVo voPatientListsFilter = form.getGlobalContext().Correspondence.getPatientListSearchCriteria();
    OutPatientListSearchCriteriaVo  voOutPatientList = form.getGlobalContext().Core.getOutPatientSearchCriteria();
    DocumentStatus newDocumentStatus = form.getGlobalContext().Correspondence.getPatientListsBatchUpdateType();
    if(newDocumentStatus == DocumentStatus.DICTATED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'Dictated'");
    else if(newDocumentStatus == DocumentStatus.NOLETTERREQUIRED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'No Letter Required'");
    else if(newDocumentStatus == DocumentStatus.SIGNED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'Signed'");

    if(voPatientListsFilter!=null)
        populateListControl(domain.listInPatients(voPatientListsFilter,(newDocumentStatus==DocumentStatus.DICTATED)));
    else if(voOutPatientList!=null)
        populateListControl(domain.listOutpatients(voOutPatientList, (newDocumentStatus==DocumentStatus.DICTATED)));
}
项目:AvoinApotti    文件:Logic.java   
private void batchPrintAndEmail(DocumentStatus status) 
{
    if (!areDocumentsSelected())
    {
        engine.showMessage("Please select some documents first");
        return;
    }

    DocumentAndPatientWrapperVoCollection docs = getSelectedDocsWithPatient();

    PatientDocumentErrorVoCollection errors = lockDraftDocuments(docs, status);

    errors = email(docs, errors);
    errors = savePatientDocuments(docs, errors, false);//   WDEV-15599
    print(docs, errors);
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlState() 
{
    //WDEV-12643

    boolean isDocumentFinal = form.getLocalContext().getSelectedDocumentIsNotNull() 
                                && !(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatusIsNotNull() 
                                    && (DocumentStatus.DRAFT.equals(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatus().getCorrespondenceStatus()) 
                                    || DocumentStatus.FOR_REVIEW.equals(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatus().getCorrespondenceStatus()) 
                                    || DocumentStatus.FOR_UPDATE.equals(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatus().getCorrespondenceStatus())));

    form.getContextMenus().Core.getPatientDocumentsMenuNEW_DOCUMENTItem().setVisible(true);
    form.getContextMenus().Core.getPatientDocumentsMenuVIEWItem().setVisible(isDocumentFinal);  //  WDEV-12723
    form.getContextMenus().Core.getPatientDocumentsMenuPRINTItem().setVisible(isDocumentFinal); //  WDEV-12723

    form.cmbEpisodes().setVisible(ConfigFlag.UI.PATIENT_DOCUMENTS_DISPLAY_EPISODEOFCARE_IN_SEARCH_CRITERIA.getValue()); //WDEV-12724
    form.lblEC().setVisible(ConfigFlag.UI.PATIENT_DOCUMENTS_DISPLAY_EPISODEOFCARE_IN_SEARCH_CRITERIA.getValue()); //WDEV-12724
}
项目:AvoinApotti    文件:Logic.java   
private void newPatDocRow(PatientDocumentSearchListVo patientDocument)
{
    if (patientDocument == null)
        return;

    grdDetailsRow newRow = form.grdDetails().getRows().newRow();
    newRow.setValue(patientDocument);
    newRow.setDate(patientDocument.getDocumentDate());
    newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
    newRow.setAuthor(AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) ? patientDocument.getAuthoringHCP() : patientDocument.getResponsibleHCP());//WDEV-13337
    newRow.setGeneratedDate(patientDocument.getRecordingDateTimeIsNotNull()?patientDocument.getRecordingDateTime().toString():null);
    newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
    newRow.setDocSource(SOURCE.equals(ConfigFlag.UI.PATIENT_DOCUMENT_DISPLAY_STATUS_COLUMN.getValue()) ? (patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null) : getStatus(patientDocument));//WDEV-13414

    //WDEV-12723
    if(patientDocument.getCurrentDocumentStatusIsNotNull() 
        && (DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()) 
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()) 
            || DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())))
    {
        newRow.setTextColor(Color.Gray);
    }
}
项目:AvoinApotti    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:openmaxims-linux    文件:Logic.java   
private void initialise() {
    PatientListsFilterVo voPatientListsFilter = form.getGlobalContext().Correspondence.getPatientListSearchCriteria();
    OutPatientListSearchCriteriaVo  voOutPatientList = form.getGlobalContext().Core.getOutPatientSearchCriteria();
    DocumentStatus newDocumentStatus = form.getGlobalContext().Correspondence.getPatientListsBatchUpdateType();
    if(newDocumentStatus == DocumentStatus.DICTATED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'Dictated'");
    else if(newDocumentStatus == DocumentStatus.NOLETTERREQUIRED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'No Letter Required'");
    else if(newDocumentStatus == DocumentStatus.SIGNED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'Signed'");

    if(voPatientListsFilter!=null)
        populateListControl(domain.listInPatients(voPatientListsFilter,(newDocumentStatus==DocumentStatus.DICTATED)));
    else if(voOutPatientList!=null)
        populateListControl(domain.listOutpatients(voOutPatientList, (newDocumentStatus==DocumentStatus.DICTATED)));
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param voDocumentDetails
 */
private void setCurrentStatusImage(ims.core.vo.lookups.DocumentStatus currentStatus)
{
    if (currentStatus != null)
    {
        form.imbCurrentStatus().setEnabledImage(currentStatus.getImage());
        form.imbCurrentStatus().setDisabledImage(currentStatus.getImage());
        form.imbCurrentStatus().setTooltip("Current Status : " + currentStatus.getText());
        form.lblStatusText().setValue(currentStatus.getText());
    }
    else
    {
        form.imbCurrentStatus().setEnabledImage(null);
        form.imbCurrentStatus().setDisabledImage(null);
        form.lblStatusText().setValue(null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveCorrespondence(ims.core.vo.lookups.DocumentStatus docStatus)
{
    CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
    if (null == voCorrespondenceDetails)
        return false;

    MemberOfStaffShortVo voMos = (MemberOfStaffShortVo) domain.getMosUser();

    if (null == voMos)
        return false;

    populateDataFromScreen(voCorrespondenceDetails);

    // WDEV-2774
    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, voCorrespondenceDetails.getCurrentStatus()));

    // update the current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void batchPrintAndEmail(DocumentStatus status) 
{
    if (!areDocumentsSelected())
    {
        engine.showMessage("Please select some documents first");
        return;
    }

    DocumentAndPatientWrapperVoCollection docs = getSelectedDocsWithPatient();

    PatientDocumentErrorVoCollection errors = lockDraftDocuments(docs, status);

    errors = email(docs, errors);
    errors = savePatientDocuments(docs, errors, false);//   WDEV-15599
    print(docs, errors);
}
项目:openMAXIMS    文件:Logic.java   
private void initialise() {
    PatientListsFilterVo voPatientListsFilter = form.getGlobalContext().Correspondence.getPatientListSearchCriteria();
    OutPatientListSearchCriteriaVo  voOutPatientList = form.getGlobalContext().Core.getOutPatientSearchCriteria();
    DocumentStatus newDocumentStatus = form.getGlobalContext().Correspondence.getPatientListsBatchUpdateType();
    if(newDocumentStatus == DocumentStatus.DICTATED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'Dictated'");
    else if(newDocumentStatus == DocumentStatus.NOLETTERREQUIRED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'No Letter Required'");
    else if(newDocumentStatus == DocumentStatus.SIGNED)
        form.pnlBatchUpdate().setValue("Batch Update Of Status To 'Signed'");

    if(voPatientListsFilter!=null)
        populateListControl(domain.listInPatients(voPatientListsFilter,(newDocumentStatus==DocumentStatus.DICTATED)));
    else if(voOutPatientList!=null)
        populateListControl(domain.listOutpatients(voOutPatientList, (newDocumentStatus==DocumentStatus.DICTATED)));
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnUpdateClick() throws PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    if (!(form.getLocalContext().getcorrespondenceDetails().getCurrentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE)))
    {

        form.lyrCorrespondenceDetail().tabCorrespondence().qmbSignedBy().setEnabled(false);
        form.lyrCorrespondenceDetail().tabCorrespondence().chkSpecialInterest().setEnabled(false);
        form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().setEnabled(true);
        updateContextMenusState();

        return;

    }
    form.lyrCorrespondenceDetail().tabCorrespondence().qmbSignedBy().setEnabled(true);
    form.lyrCorrespondenceDetail().tabCorrespondence().chkSpecialInterest().setEnabled(true);
    form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().setEnabled(true);

}
项目:openMAXIMS    文件:Logic.java   
private boolean saveStatus(ims.core.vo.lookups.DocumentStatus docStatus, CorrespondenceDetailsVo voCorrespondenceDetails, byte[] resultPdf)
{
    if (null != resultPdf)
        voCorrespondenceDetails.getCurrentDocument().setContent(new String(resultPdf));

    // update current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);

    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, docStatus));

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void updateDocumentStatus(DocumentStatus value)
{

    if (value.equals(DocumentStatus.SUPLEMENTRY))
    {

        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        DocumentVo nuDoc = new DocumentVo();
        nuDoc.setTemplate(form.getGlobalContext().Correspondence.getReportTemplate());
        nuDoc.setPatient(form.getGlobalContext().Core.getPatientShort());
        nuDoc.setStatus(DocumentStatus.GENNOTPRINTED);
        nuDoc.setContent(voCorrespondenceDetails.getCurrentDocument().getContent());
        nuDoc.setCreationDate(new Date());
        voCorrespondenceDetails.setCurrentDocument(nuDoc);
        voCorrespondenceDetails.setCurrentStatus(DocumentStatus.GENNOTPRINTED);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);
        form.getLocalContext().getcorrespondenceDetails();

    }
    else
    {

        form.getLocalContext().getcorrespondenceDetails().getCurrentDocument().setStatus(value);

    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @param voDocumentDetails
 */
private void setCurrentStatusImage(ims.core.vo.lookups.DocumentStatus currentStatus)
{
    if (currentStatus != null)
    {
        form.imbCurrentStatus().setEnabledImage(currentStatus.getImage());
        form.imbCurrentStatus().setDisabledImage(currentStatus.getImage());
        form.imbCurrentStatus().setTooltip("Current Status : " + currentStatus.getText());
        form.lblStatusText().setValue(currentStatus.getText());
    }
    else
    {
        form.imbCurrentStatus().setEnabledImage(null);
        form.imbCurrentStatus().setDisabledImage(null);
        form.lblStatusText().setValue(null);
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @param voDocumentDetails
 */
private void setCurrentStatusImage(ims.core.vo.lookups.DocumentStatus currentStatus)
{
    if (currentStatus != null)
    {
        form.btnDocStatHist().setImage(currentStatus.getImage());
        form.btnDocStatHist().setTooltip("Current Status : " + currentStatus.getText());
        int l_i = form.pnlTitle().getValue().indexOf("Current");
        if (l_i > -1)
        {
            String[] sTitleLeft = form.pnlTitle().getValue().split("Current Status");
            if (sTitleLeft != null)
            {
                String lTitle = sTitleLeft[0] += "Current Status of " + form.getLocalContext().getcorrespondenceDetails().getCurrentDocument().getTemplate().getName().toString() + " : " + currentStatus.getText();
                form.pnlTitle().setValue(lTitle);
            }
        }
    }
    else
    {
        form.btnDocStatHist().setImage(null);
        form.btnDocStatHist().setTooltip("Current Status : None");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void batchPrintAndEmail(DocumentStatus status) 
{
    if (!areDocumentsSelected())
    {
        engine.showMessage("Please select some documents first");
        return;
    }

    DocumentAndPatientWrapperVoCollection docs = getSelectedDocsWithPatient();

    PatientDocumentErrorVoCollection errors = lockDraftDocuments(docs, status);

    errors = email(docs, errors);
    errors = savePatientDocuments(docs, errors, false);//   WDEV-15599
    print(docs, errors);
}
项目:openmaxims-linux    文件:Logic.java   
private void newPatDocRow(PatientDocumentSearchListVo patientDocument)
{
    if (patientDocument == null)
        return;

    grdDetailsRow newRow = form.grdDetails().getRows().newRow();
    newRow.setValue(patientDocument);
    newRow.setDate(patientDocument.getDocumentDate());
    newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
    newRow.setAuthor(AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) ? patientDocument.getAuthoringHCP() : patientDocument.getResponsibleHCP());//WDEV-13337
    newRow.setGeneratedDate(patientDocument.getRecordingDateTimeIsNotNull()?patientDocument.getRecordingDateTime().toString():null);
    newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
    newRow.setDocSource(SOURCE.equals(ConfigFlag.UI.PATIENT_DOCUMENT_DISPLAY_STATUS_COLUMN.getValue()) ? (patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null) : getStatus(patientDocument));//WDEV-13414

    //WDEV-12723
    if(patientDocument.getCurrentDocumentStatusIsNotNull() 
        && (DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()) 
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()) 
            || DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())))
    {
        newRow.setTextColor(Color.Gray);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlState() 
{
    //WDEV-12643

    boolean isDocumentFinal = form.getLocalContext().getSelectedDocumentIsNotNull() 
                                && !(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatusIsNotNull() 
                                    && (DocumentStatus.DRAFT.equals(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatus().getCorrespondenceStatus()) 
                                    || DocumentStatus.FOR_REVIEW.equals(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatus().getCorrespondenceStatus()) 
                                    || DocumentStatus.FOR_UPDATE.equals(form.getLocalContext().getSelectedDocument().getCurrentDocumentStatus().getCorrespondenceStatus())));

    form.getContextMenus().Core.getPatientDocumentsMenuNEW_DOCUMENTItem().setVisible(true);
    form.getContextMenus().Core.getPatientDocumentsMenuVIEWItem().setVisible(isDocumentFinal);  //  WDEV-12723
    form.getContextMenus().Core.getPatientDocumentsMenuPRINTItem().setVisible(isDocumentFinal); //  WDEV-12723

    form.cmbEpisodes().setVisible(ConfigFlag.UI.PATIENT_DOCUMENTS_DISPLAY_EPISODEOFCARE_IN_SEARCH_CRITERIA.getValue()); //WDEV-12724
    form.lblEC().setVisible(ConfigFlag.UI.PATIENT_DOCUMENTS_DISPLAY_EPISODEOFCARE_IN_SEARCH_CRITERIA.getValue()); //WDEV-12724
}
项目:openMAXIMS    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:openmaxims-linux    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:openmaxims-linux    文件:Logic.java   
private void listAvailableStatuses(DocumentStatus currentStatus) 
{
    form.cmbNewStatus().clear();        
    DocumentStatusCollection lkpCollStatus = ims.core.vo.lookups.LookupHelper.getDocumentStatus(domain.getLookupService()); 
    boolean bHide = false;
    for (int i=0; i < lkpCollStatus.size(); i++)
    {
        if (StatusHelper.canUpdateStatus(currentStatus,lkpCollStatus.get(i)))
        {
            form.cmbNewStatus().newRow(lkpCollStatus.get(i), lkpCollStatus.get(i).toString());
            bHide = true;
        }
    }

    form.lblChangeTo().setVisible(bHide);
    form.cmbNewStatus().setVisible(bHide);
    form.btnChange().setVisible(bHide);
}
项目:openMAXIMS    文件:Logic.java   
private void listAvailableStatuses(DocumentStatus currentStatus) 
{
    form.cmbNewStatus().clear();        
    DocumentStatusCollection lkpCollStatus = ims.core.vo.lookups.LookupHelper.getDocumentStatus(domain.getLookupService()); 
    boolean bHide = false;
    for (int i=0; i < lkpCollStatus.size(); i++)
    {
        if (StatusHelper.canUpdateStatus(currentStatus,lkpCollStatus.get(i)))
        {
            form.cmbNewStatus().newRow(lkpCollStatus.get(i), lkpCollStatus.get(i).toString());
            bHide = true;
        }
    }

    form.lblChangeTo().setVisible(bHide);
    form.cmbNewStatus().setVisible(bHide);
    form.btnChange().setVisible(bHide);
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveCorrespondence(ims.core.vo.lookups.DocumentStatus docStatus)
{
    CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
    if (null == voCorrespondenceDetails)
        return false;

    MemberOfStaffShortVo voMos = (MemberOfStaffShortVo) domain.getMosUser();

    if (null == voMos)
        return false;

    populateDataFromScreen(voCorrespondenceDetails);

    // WDEV-2774
    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, voCorrespondenceDetails.getCurrentStatus()));

    // update the current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean saveStatus(ims.core.vo.lookups.DocumentStatus docStatus, CorrespondenceDetailsVo voCorrespondenceDetails, byte[] resultPdf)
{
    if (null != resultPdf)
        voCorrespondenceDetails.getCurrentDocument().setContent(new String(resultPdf));

    // update current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);

    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, docStatus));

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:AvoinApotti    文件:Logic.java   
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull() && getPasContact() != null)
    {
        switch (menuItemID)
        {
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.VIEWCONTACTS :
                viewPASContacts();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.ViewDemographics :
                viewDemographics();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.PreviewLetter :
                previewDischargeLetter();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.Add :
                addDocumentDetails();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.View :
                viewDocumentDetails();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.DocumentStatus :
                viewDocumentStatusHistory();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.EditDocumentStatusHistory :
                viewDocumentStatusHistory();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.SetLetterRequired :
                setLetterRequired();
            break;
            case GenForm.ContextMenus.CorrespondenceNamespace.CorrespondenceDetails.SetNoLetterRequired :
                setNoLetterRequired();
            break;

        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void open() 
{       
    CorrespondenceStatusHistoryVoCollection voCollCspStatusHistory = form.getGlobalContext().Correspondence.getcurrentCspStatusHistory().sort(SortOrder.DESCENDING);

    if (voCollCspStatusHistory.size() > 0)
    {           
        DocumentStatus currentStatus = voCollCspStatusHistory.get(0).getStatus();
        form.lblCurrentStatus().setValue(currentStatus.getIItemText());

        form.grdHistory().getRows().clear();
        for (int i= 0; i < voCollCspStatusHistory.size(); i++)
        {
            GenForm.grdHistoryRow row = form.grdHistory().getRows().newRow();
            row.setValue(voCollCspStatusHistory.get(i));
            row.setcolStatus(voCollCspStatusHistory.get(i).getStatus().getText());
            row.setcolImage(voCollCspStatusHistory.get(i).getStatus().getImage());
            row.setcolTemplate(voCollCspStatusHistory.get(i).getTemplateName());                

            if (voCollCspStatusHistory.get(i).getSysInfoIsNotNull())
            {
                if (voCollCspStatusHistory.get(i).getMosIsNotNull())
                    row.setcolChangedBy(voCollCspStatusHistory.get(i).getMos().getNameIsNotNull() ? voCollCspStatusHistory.get(i).getMos().getName().toString() : "");
                if (voCollCspStatusHistory.get(i).getSysInfo().getCreationDateTime() != null)
                    row.setcoldteChanged(voCollCspStatusHistory.get(i).getSysInfo().getCreationDateTime().getDate() + " " + voCollCspStatusHistory.get(i).getSysInfo().getCreationDateTime().getTime());
            }
        }

        listAvailableStatuses(currentStatus);
    }   
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveLetterClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.ctnRecipient().grdAdressee().getRows().size() <= 0)
    {
        engine.showMessage("Please select an addressee before generating.");
        return;
    }

    saveCorrespondence(DocumentStatus.GENNOTPRINTED);
    form.setMode(FormMode.VIEW);
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveStatus(ims.core.vo.lookups.DocumentStatus docStatus, CorrespondenceDetailsVo voCorrespondenceDetails, byte[] resultPdf)
{
    if (null != resultPdf)
        voCorrespondenceDetails.getCurrentDocument().setContent(new String(resultPdf));

    // update current status
    voCorrespondenceDetails.setCurrentStatus(docStatus);
    // update Status History
    voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, docStatus));

    if (!saveDocumentDetails(voCorrespondenceDetails))
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void setStatusCaption()
{
    if (form.getLocalContext().getcorrespondenceDetailsIsNotNull() && form.getLocalContext().getcorrespondenceDetails().getCurrentDocumentIsNotNull() && form.getLocalContext().getcorrespondenceDetails().getCurrentDocument().getStatusIsNotNull())
        setCurrentStatusImage(form.getLocalContext().getcorrespondenceDetails().getCurrentStatus());
    else
        setCurrentStatusImage(DocumentStatus.LETTERREQUIRED);
}
项目:AvoinApotti    文件:Logic.java   
private void printCorrespondence()
{
    if (form.lblStatusText().getValue() == null)
        return;

    if (form.getMode().equals(FormMode.VIEW))
    {

        if (!form.getLocalContext().getcorrespondenceDetails().getCurrentStatus().equals(DocumentStatus.SIGNED))
            if (prepairPrintCorrespondenceDoc() != null)
                showPrintDialog();
        return;
    }

    // this code for if we are printing from Edit mode.
    if (form.ctnRecipient().grdAdressee().getRows().size() <= 0)
    {
        engine.showMessage("Please select an addressee before generating.");
        return;
    }

    /*
     * if (form.lblStatusText().getValue().equals(DocumentStatus.SIGNED) == false) { boolean l_printed = true; if (!form.getLocalContext().getcorrespondenceDetails().getCurrentStatus().equals(DocumentStatus.SIGNED)) l_printed = prepairPrintCorrespondenceDoc(DocumentStatus.PRINTEDNOSIGNATURE);
     * 
     * if (!l_printed) return; }
     */

    if (form.getLocalContext().getLastDocGeneratedIsNotNull())
        showPrintDialog();
}