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

项目: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;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getAuthoringHCPIsNotNull() && o2 != null && o2.getAuthoringHCPIsNotNull())
            return order*o1.getAuthoringHCP().compareTo(o2.getAuthoringHCP());
    }
    else if(!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getResponsibleHCPIsNotNull() && o2 != null && o2.getResponsibleHCPIsNotNull())
            return order*o1.getResponsibleHCP().compareTo(o2.getResponsibleHCP());
    }

    if (o1 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getResponsibleHCPIsNotNull()))
        return -1 * order;

    if (o2 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getResponsibleHCPIsNotNull()))
        return order;

    return 0;
}
项目: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    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getAuthoringHCPIsNotNull() && o2 != null && o2.getAuthoringHCPIsNotNull())
            return order*o1.getAuthoringHCP().compareTo(o2.getAuthoringHCP());
    }
    else if(!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getResponsibleHCPIsNotNull() && o2 != null && o2.getResponsibleHCPIsNotNull())
            return order*o1.getResponsibleHCP().compareTo(o2.getResponsibleHCP());
    }

    if (o1 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getResponsibleHCPIsNotNull()))
        return -1 * order;

    if (o2 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getResponsibleHCPIsNotNull()))
        return order;

    return 0;
}
项目:openMAXIMS    文件: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    文件: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    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getAuthoringHCPIsNotNull() && o2 != null && o2.getAuthoringHCPIsNotNull())
            return order*o1.getAuthoringHCP().compareTo(o2.getAuthoringHCP());
    }
    else if(!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getResponsibleHCPIsNotNull() && o2 != null && o2.getResponsibleHCPIsNotNull())
            return order*o1.getResponsibleHCP().compareTo(o2.getResponsibleHCP());
    }

    if (o1 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getResponsibleHCPIsNotNull()))
        return -1 * order;

    if (o2 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getResponsibleHCPIsNotNull()))
        return order;

    return 0;
}
项目: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   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getAuthoringHCPIsNotNull() && o2 != null && o2.getAuthoringHCPIsNotNull())
            return order*o1.getAuthoringHCP().compareTo(o2.getAuthoringHCP());
    }
    else if(!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()))
    {
        if(o1 != null && o1.getResponsibleHCPIsNotNull() && o2 != null && o2.getResponsibleHCPIsNotNull())
            return order*o1.getResponsibleHCP().compareTo(o2.getResponsibleHCP());
    }

    if (o1 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o1.getResponsibleHCPIsNotNull()))
        return -1 * order;

    if (o2 == null || (AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getAuthoringHCPIsNotNull()) || (!AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue()) && !o2.getResponsibleHCPIsNotNull()))
        return order;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdDetailsSellectionChanged() throws PresentationLogicException
{
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
        form.getGlobalContext().Core.setPatientCorrespondence(form.getLocalContext().getSelectedDocument());
    }

    updateControlState();
}
项目:AvoinApotti    文件:Logic.java   
private void newPatDocRow(PatientDocumentSearchListVo patientDocument)
    {
        if (patientDocument == null)
            return;

        grdDetailsRow newRow = form.grdDetails().getRows().newRow();
        newRow.setValue(patientDocument);
        newRow.setDate(patientDocument.getRecordingDateTimeIsNotNull() ? patientDocument.getRecordingDateTime().toString() : null);
        newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
        newRow.setAuthor(patientDocument.getAuthoringHCPIsNotNull() ? patientDocument.getAuthoringHCP().getIMosName() : null);
        newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
//      newRow.setDocStatus(patientDocument.getCorrespondenceStatusIsNotNull() ? patientDocument.getCorrespondenceStatus().getIItemText() : null);
        newRow.setDocSource(patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null);
    }
项目:AvoinApotti    文件:Logic.java   
private void updateLocalContext()
{
    form.getLocalContext().setSelectedDocument(null);
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdDetailsGridHeaderClicked(int column) throws PresentationLogicException
{
    PatientDocumentSearchListVo back = form.grdDetails().getValue();
    PatientDocumentSearchListVoCollection values = form.grdDetails().getValues();

    form.grdDetails().getRows().clear();
    switch (column)
    {
        case GENERATED_DATE_COLUMN:
            form.getLocalContext().setGeneratedDateSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getGeneratedDateSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new PatientDocGeneratedDateComparator(form.getLocalContext().getGeneratedDateSortOrder()));
        break;

        //WDEV-13534
        case AUTHORING_HCP_COLUMN:
            form.getLocalContext().setAuthoringSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getAuthoringSortOrder()) ? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new PatientDocAuthoringComparator(form.getLocalContext().getAuthoringSortOrder()));
        break;

        default:
        break;
    }

    populatePatientDocumentsGrid(values);
    form.grdDetails().setValue(back);
}
项目:AvoinApotti    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (o1 != null && o1.getRecordingDateTimeIsNotNull() && o2!=null && o2.getRecordingDateTimeIsNotNull())
    {
        return order*o1.getRecordingDateTime().compareTo(o2.getRecordingDateTime());
    }
    if (o1 == null || !o1.getRecordingDateTimeIsNotNull())
        return -1*order;
    if (o2 == null || !o2.getRecordingDateTimeIsNotNull())
        return order;

    return 0;
}
项目:AvoinApotti    文件:PatientDocumentSearchImpl.java   
public PatientDocumentSearchListVo getPatientDocumentSearchListVo(PatientDocumentRefVo patientDocumentId) 
{
    if(patientDocumentId == null || !patientDocumentId.getID_PatientDocumentIsNotNull())
    {
        throw new CodingRuntimeException("Cannot get PatientDocument on null PatientDocumentId.");
    }

    return PatientDocumentSearchListVoAssembler.create((PatientDocument) getDomainFactory().getDomainObject(PatientDocument.class, patientDocumentId.getID_PatientDocument()));
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdDetailsSellectionChanged() throws PresentationLogicException
{
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
        form.getGlobalContext().Core.setPatientCorrespondence(form.getLocalContext().getSelectedDocument());
    }

    updateControlState();
}
项目:openMAXIMS    文件:Logic.java   
private void newPatDocRow(PatientDocumentSearchListVo patientDocument)
{
    if (patientDocument == null)
        return;

    grdDetailsRow newRow = form.grdDetails().getRows().newRow();
    newRow.setValue(patientDocument);
    newRow.setDate(patientDocument.getRecordingDateTimeIsNotNull() ? patientDocument.getRecordingDateTime().toString() : null);
    newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
    newRow.setAuthor(patientDocument.getAuthoringHCPIsNotNull() ? patientDocument.getAuthoringHCP().getIMosName() : null);
    newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
    newRow.setDocStatus(patientDocument.getCorrespondenceStatusIsNotNull() ? patientDocument.getCorrespondenceStatus().getIItemText() : null);
    newRow.setDocSource(patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null);
}
项目:openMAXIMS    文件:Logic.java   
private void updateLocalContext()
{
    form.getLocalContext().setSelectedDocument(null);
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentSearchListVo getRowValueFromGrid(PatientDocumentVo selectedDocument)
{
    for (int i = 0; i < form.grdDetails().getRows().size(); i++)
    {
         PatientDocumentSearchListVo value = form.grdDetails().getRows().get(i).getValue();
        if (value.equals(selectedDocument))
            return value;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void newPatDocRow(PatientDocumentSearchListVo patientDocument) 
{
    if (patientDocument == null)
        return;
    //WDEV-18815
    grdDetailsRow newRow = form.grdDetails().getRows().newRow();
    newRow.setValue(patientDocument);
    newRow.setDate(patientDocument.getDocumentDate());
    newRow.setTooltipForDate(patientDocument.getDocumentDate()!=null ? patientDocument.getDocumentDate().toString() : null);
    newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
    newRow.setTooltipForSpecialty(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.setTooltipForAuthor(AUTHORING_HCP.equals(ConfigFlag.UI.DISPLAYED_HCP_ON_PATIENT_DOCUMENT_FORM.getValue())  ? (patientDocument.getAuthoringHCPIsNotNull()? patientDocument.getAuthoringHCP().getIHcpName() : null) : (patientDocument.getResponsibleHCPIsNotNull() ? patientDocument.getResponsibleHCP().getIHcpName() : null));//WDEV-13337
    newRow.setGeneratedDate(patientDocument.getRecordingDateTimeIsNotNull()?patientDocument.getRecordingDateTime().toString():null);
    newRow.setTooltipForGeneratedDate(patientDocument.getRecordingDateTimeIsNotNull()?patientDocument.getRecordingDateTime().toString():null);
    newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
    newRow.setTooltipForDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
    newRow.setDocName(patientDocument.getName());
    newRow.setTooltipForDocName(patientDocument.getName());
    newRow.setDocSource(SOURCE.equals(ConfigFlag.UI.PATIENT_DOCUMENT_DISPLAY_STATUS_COLUMN.getValue()) ? (patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null) : getStatus(patientDocument));//WDEV-13414
    newRow.setTooltipForDocSource(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    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Date rez1 = null;
    Date rez2 = null;

    if(ob1 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps1 = (PatientDocumentSearchListVo)ob1;
        rez1 =  ps1.getDocumentDate();
    }
    if(ob2 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps2 = (PatientDocumentSearchListVo)ob2;
        rez2 = ps2.getDocumentDate();
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareTo(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (o1 != null && o1.getRecordingDateTimeIsNotNull() && o2!=null && o2.getRecordingDateTimeIsNotNull())
    {
        return order*o1.getRecordingDateTime().compareTo(o2.getRecordingDateTime());
    }
    if (o1 == null || !o1.getRecordingDateTimeIsNotNull())
        return -1*order;
    if (o2 == null || !o2.getRecordingDateTimeIsNotNull())
        return order;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps1 = (PatientDocumentSearchListVo)ob1;
        rez1 = ps1.getSpecialty() != null ? ps1.getSpecialty().getText():null;
    }
    if(ob2 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps2 = (PatientDocumentSearchListVo)ob2;
        rez2 = ps2.getSpecialty() != null ? ps2.getSpecialty().getText():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps1 = (PatientDocumentSearchListVo)ob1;
        rez1 = ps1.getCategory() != null ? ps1.getCategory().getText():null;
    }
    if(ob2 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps2 = (PatientDocumentSearchListVo)ob2;
        rez2 = ps2.getCategory() != null ? ps2.getCategory().getText():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps1 = (PatientDocumentSearchListVo)ob1;

        if (SOURCE.equals(ConfigFlag.UI.PATIENT_DOCUMENT_DISPLAY_STATUS_COLUMN.getValue()))
            rez1 = ps1.getCreationType() != null ? ps1.getCreationType().getText():null;
        else getStatus(ps1);

    }
    if(ob2 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps2 = (PatientDocumentSearchListVo)ob2;

        if (SOURCE.equals(ConfigFlag.UI.PATIENT_DOCUMENT_DISPLAY_STATUS_COLUMN.getValue()))
            rez2 = ps2.getCategory() != null ? ps2.getCategory().getText():null;
        else getStatus(ps2);
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String name1 = null;
    String name2 = null;

    if(ob1 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps1 = (PatientDocumentSearchListVo)ob1;
        name1 = ps1.getName();
    }
    if(ob2 instanceof PatientDocumentSearchListVo)
    {
        PatientDocumentSearchListVo ps2 = (PatientDocumentSearchListVo)ob2;
        name2 = ps2.getName();
    }

    if(name1 != null && name2 != null)
        return  name1.compareToIgnoreCase(name2)*direction;

    if(name1 != null && name2 == null)
        return  direction;

    if(name2 != null && name1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:PatientDocumentSearchImpl.java   
public PatientDocumentSearchListVo getPatientDocumentSearchListVo(PatientDocumentRefVo patientDocumentId) 
{
    if(patientDocumentId == null || !patientDocumentId.getID_PatientDocumentIsNotNull())
    {
        throw new CodingRuntimeException("Cannot get PatientDocument on null PatientDocumentId.");
    }

    return PatientDocumentSearchListVoAssembler.create((PatientDocument) getDomainFactory().getDomainObject(PatientDocument.class, patientDocumentId.getID_PatientDocument()));
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdDetailsSellectionChanged() throws PresentationLogicException
{
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
        form.getGlobalContext().Core.setPatientCorrespondence(form.getLocalContext().getSelectedDocument());
    }

    updateControlState();
}
项目:openMAXIMS    文件:Logic.java   
private void newPatDocRow(PatientDocumentSearchListVo patientDocument)
    {
        if (patientDocument == null)
            return;

        grdDetailsRow newRow = form.grdDetails().getRows().newRow();
        newRow.setValue(patientDocument);
        newRow.setDate(patientDocument.getRecordingDateTimeIsNotNull() ? patientDocument.getRecordingDateTime().toString() : null);
        newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
        newRow.setAuthor(patientDocument.getAuthoringHCPIsNotNull() ? patientDocument.getAuthoringHCP().getIMosName() : null);
        newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
//      newRow.setDocStatus(patientDocument.getCorrespondenceStatusIsNotNull() ? patientDocument.getCorrespondenceStatus().getIItemText() : null);
        newRow.setDocSource(patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null);
    }
项目:openMAXIMS    文件:Logic.java   
private void updateLocalContext()
{
    form.getLocalContext().setSelectedDocument(null);
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdDetailsGridHeaderClicked(int column) throws PresentationLogicException
{
    PatientDocumentSearchListVo back = form.grdDetails().getValue();
    PatientDocumentSearchListVoCollection values = form.grdDetails().getValues();

    form.grdDetails().getRows().clear();
    switch (column)
    {
        case GENERATED_DATE_COLUMN:
            form.getLocalContext().setGeneratedDateSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getGeneratedDateSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new PatientDocGeneratedDateComparator(form.getLocalContext().getGeneratedDateSortOrder()));
        break;

        //WDEV-13534
        case AUTHORING_HCP_COLUMN:
            form.getLocalContext().setAuthoringSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getAuthoringSortOrder()) ? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new PatientDocAuthoringComparator(form.getLocalContext().getAuthoringSortOrder()));
        break;

        default:
        break;
    }

    populatePatientDocumentsGrid(values);
    form.grdDetails().setValue(back);
}
项目:openMAXIMS    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (o1 != null && o1.getRecordingDateTimeIsNotNull() && o2!=null && o2.getRecordingDateTimeIsNotNull())
    {
        return order*o1.getRecordingDateTime().compareTo(o2.getRecordingDateTime());
    }
    if (o1 == null || !o1.getRecordingDateTimeIsNotNull())
        return -1*order;
    if (o2 == null || !o2.getRecordingDateTimeIsNotNull())
        return order;

    return 0;
}
项目:openMAXIMS    文件:PatientDocumentSearchImpl.java   
public PatientDocumentSearchListVo getPatientDocumentSearchListVo(PatientDocumentRefVo patientDocumentId) 
{
    if(patientDocumentId == null || !patientDocumentId.getID_PatientDocumentIsNotNull())
    {
        throw new CodingRuntimeException("Cannot get PatientDocument on null PatientDocumentId.");
    }

    return PatientDocumentSearchListVoAssembler.create((PatientDocument) getDomainFactory().getDomainObject(PatientDocument.class, patientDocumentId.getID_PatientDocument()));
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onGrdDetailsSellectionChanged() throws PresentationLogicException
{
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
        form.getGlobalContext().Core.setPatientCorrespondence(form.getLocalContext().getSelectedDocument());
    }

    updateControlState();
}
项目: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.getRecordingDateTimeIsNotNull() ? patientDocument.getRecordingDateTime().toString() : null);
        newRow.setSpecialty(patientDocument.getSpecialtyIsNotNull() ? patientDocument.getSpecialty().getText() : null);
        newRow.setAuthor(patientDocument.getAuthoringHCPIsNotNull() ? patientDocument.getAuthoringHCP().getIMosName() : null);
        newRow.setDocType(patientDocument.getCategoryIsNotNull() ? patientDocument.getCategory().getText() : null);
//      newRow.setDocStatus(patientDocument.getCorrespondenceStatusIsNotNull() ? patientDocument.getCorrespondenceStatus().getIItemText() : null);
        newRow.setDocSource(patientDocument.getCreationTypeIsNotNull() ? patientDocument.getCreationType().getIItemText() : null);
    }
项目:openmaxims-linux    文件:Logic.java   
private void updateLocalContext()
{
    form.getLocalContext().setSelectedDocument(null);
    if(form.grdDetails().getValue() instanceof PatientDocumentSearchListVo)
    {
        form.getLocalContext().setSelectedDocument(domain.getPatientDocument(form.grdDetails().getValue()));
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onGrdDetailsGridHeaderClicked(int column) throws PresentationLogicException
{
    PatientDocumentSearchListVo back = form.grdDetails().getValue();
    PatientDocumentSearchListVoCollection values = form.grdDetails().getValues();

    form.grdDetails().getRows().clear();
    switch (column)
    {
        case GENERATED_DATE_COLUMN:
            form.getLocalContext().setGeneratedDateSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getGeneratedDateSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new PatientDocGeneratedDateComparator(form.getLocalContext().getGeneratedDateSortOrder()));
        break;

        //WDEV-13534
        case AUTHORING_HCP_COLUMN:
            form.getLocalContext().setAuthoringSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getAuthoringSortOrder()) ? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new PatientDocAuthoringComparator(form.getLocalContext().getAuthoringSortOrder()));
        break;

        default:
        break;
    }

    populatePatientDocumentsGrid(values);
    form.grdDetails().setValue(back);
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(PatientDocumentSearchListVo o1, PatientDocumentSearchListVo o2)
{
    if (o1 != null && o1.getRecordingDateTimeIsNotNull() && o2!=null && o2.getRecordingDateTimeIsNotNull())
    {
        return order*o1.getRecordingDateTime().compareTo(o2.getRecordingDateTime());
    }
    if (o1 == null || !o1.getRecordingDateTimeIsNotNull())
        return -1*order;
    if (o2 == null || !o2.getRecordingDateTimeIsNotNull())
        return order;

    return 0;
}