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

项目:AvoinApotti    文件:Logic.java   
private void selectClinicalNoteInGlobalContext()
{

    ClinicalNotesVo clinicalNotesVoForContact = null;

    try
    {
        clinicalNotesVoForContact = domain.getClinicalNotesForContact((ClinicalContactRefVo) form.dyngrdList().getSelectedRow().getValue());
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.getMessage());
    }

    ClinicalNotesShortVo clinicalNotesForContact = null;

    if (clinicalNotesVoForContact != null)
        clinicalNotesForContact = domain.getClinicalNotesShort(clinicalNotesVoForContact.getID_ClinicalNotes());
    form.getGlobalContext().Core.setClinicalNotesShort(clinicalNotesForContact);

    if (clinicalNotesVoForContact != null)
        form.getGlobalContext().Clinical.setCurrentClinicalNote(clinicalNotesVoForContact);
    else
        form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
}
项目:AvoinApotti    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() &&
                        voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() &&
                            voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void setColStatus(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Status");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell statusCell = row.getCells().newCell(col, DynamicCellType.STRING);
    statusCell.setValue(note.getCurrentStatus().getStatus().getText());

    StringBuffer sb = new StringBuffer();
    sb.append("Status set by : ");
    sb.append(note.getCurrentStatus().getMOSIsNotNull() ? note.getCurrentStatus().getMOS().getName() : "");
    sb.append(" on ");
    sb.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : "");
    statusCell.setTooltip(sb.toString());
}
项目:AvoinApotti    文件:Logic.java   
private void setColAuthoringHCP(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording User");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingUserIsNotNull())
        value.append(note.getRecordingUser().toString());

    dateCell.setValue(value.toString());

    // Set cell tooltip
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param note
 * @return
 */
private String buildNoteTooltip(ClinicalNotesShortVo note)
{
    if(note == null) //WDEV-12766
        return null;

    StringBuilder tooltip = new StringBuilder();

    // Build "Recorded By"
    tooltip.append("<b>Authored By:</b> ");
    if (note.getAuthoringInfoIsNotNull() && note.getAuthoringInfo().getAuthoringHcpIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringHcp().toString()).append(" - "); 
    if (note.getAuthoringInfoIsNotNull() &&  note.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringDateTime().toString());
    // Build "Confirmed By"
    if(note.getCurrentStatusIsNotNull() && ClinicalNotesStatus.CONFIRMED.equals(note.getCurrentStatus().getStatus())) //WDEV-12766
    {
        tooltip.append("<br><b>Confirmed By:</b> ");
        tooltip.append(note.getCurrentStatus().getMOSIsNotNull() && note.getCurrentStatus().getMOS().getNameIsNotNull() ? note.getCurrentStatus().getMOS().getName().toString() : "").append(" - "); //WDEV-12766
        tooltip.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : ""); //WDEV-12766
    }

    return tooltip.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void setColAuthoringDate(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording Date");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingDateTimeIsNotNull())
    {
        value.append(note.getRecordingDateTime().toString());
    }

    dateCell.setValue(value.toString());
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:AvoinApotti    文件:Logic.java   
private void selectDynamicRow(DynamicGridRow row)
{
    if (row == null)
        return;

    form.getGlobalContext().Core.setClinicalNotesShort((ClinicalNotesShortVo) form.dyngrdNotes().getValue());

    form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote((ClinicalNotesShortVo) form.dyngrdNotes().getValue()));

    // WDEV-2511
    /*if (domain.getMosUser() == null)  //commented for WDEV-14624
        {
    clearContextMenu();
        form.getContextMenus().Clinical.getExtendedClinicalNotesVIEWItem().setVisible(true);//WDEV-14624
        return;
    }
    */ 
    updateContextMenu();

}
项目:AvoinApotti    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo) domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void selectClinicalNoteInGlobalContext()
{

    ClinicalNotesVo clinicalNotesVoForContact = null;

    try
    {
        clinicalNotesVoForContact = domain.getClinicalNotesForContact((ClinicalContactRefVo) form.dyngrdList().getSelectedRow().getValue());
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.getMessage());
    }

    ClinicalNotesShortVo clinicalNotesForContact = null;

    if (clinicalNotesVoForContact != null)
        clinicalNotesForContact = domain.getClinicalNotesShort(clinicalNotesVoForContact.getID_ClinicalNotes());
    form.getGlobalContext().Core.setClinicalNotesShort(clinicalNotesForContact);

    if (clinicalNotesVoForContact != null)
        form.getGlobalContext().Clinical.setCurrentClinicalNote(clinicalNotesVoForContact);
    else
        form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
}
项目:openMAXIMS    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() &&
                        voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() &&
                            voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void setColStatus(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Status");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell statusCell = row.getCells().newCell(col, DynamicCellType.STRING);
    statusCell.setValue(note.getCurrentStatus().getStatus().getText());

    StringBuffer sb = new StringBuffer();
    sb.append("Status set by : ");
    sb.append(note.getCurrentStatus().getMOSIsNotNull() ? note.getCurrentStatus().getMOS().getName() : "");
    sb.append(" on ");
    sb.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : "");
    statusCell.setTooltip(sb.toString());
}
项目:openMAXIMS    文件:Logic.java   
private void setColAuthoringHCP(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording User");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingUserIsNotNull())
        value.append(note.getRecordingUser().toString());

    dateCell.setValue(value.toString());

    // Set cell tooltip
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param note
 * @return
 */
private String buildNoteTooltip(ClinicalNotesShortVo note)
{
    if(note == null) //WDEV-12766
        return null;

    StringBuilder tooltip = new StringBuilder();

    // Build "Recorded By"
    tooltip.append("<b>Authored By:</b> ");
    if (note.getAuthoringInfoIsNotNull() && note.getAuthoringInfo().getAuthoringHcpIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringHcp().toString()).append(" - "); 
    if (note.getAuthoringInfoIsNotNull() &&  note.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringDateTime().toString());
    // Build "Confirmed By"
    if(note.getCurrentStatusIsNotNull() && ClinicalNotesStatus.CONFIRMED.equals(note.getCurrentStatus().getStatus())) //WDEV-12766
    {
        tooltip.append("<br><b>Confirmed By:</b> ");
        tooltip.append(note.getCurrentStatus().getMOSIsNotNull() && note.getCurrentStatus().getMOS().getNameIsNotNull() ? note.getCurrentStatus().getMOS().getName().toString() : "").append(" - "); //WDEV-12766
        tooltip.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : ""); //WDEV-12766
    }

    return tooltip.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void setColAuthoringDate(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording Date");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingDateTimeIsNotNull())
    {
        value.append(note.getRecordingDateTime().toString());
    }

    dateCell.setValue(value.toString());
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:openMAXIMS    文件:Logic.java   
private void selectDynamicRow(DynamicGridRow row)
{
    if (row == null)
        return;

    form.getGlobalContext().Core.setClinicalNotesShort((ClinicalNotesShortVo) form.dyngrdNotes().getValue());

    form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote((ClinicalNotesShortVo) form.dyngrdNotes().getValue()));

    // WDEV-2511
    /*if (domain.getMosUser() == null)  //commented for WDEV-14624
        {
    clearContextMenu();
        form.getContextMenus().Clinical.getExtendedClinicalNotesVIEWItem().setVisible(true);//WDEV-14624
        return;
    }
    */ 
    updateContextMenu();

}
项目:openMAXIMS    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo) domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void selectClinicalNoteInGlobalContext()
{

    ClinicalNotesVo clinicalNotesVoForContact = null;

    try
    {
        clinicalNotesVoForContact = domain.getClinicalNotesForContact((ClinicalContactRefVo) form.dyngrdList().getSelectedRow().getValue());
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.getMessage());
    }

    ClinicalNotesShortVo clinicalNotesForContact = null;

    if (clinicalNotesVoForContact != null)
        clinicalNotesForContact = domain.getClinicalNotesShort(clinicalNotesVoForContact.getID_ClinicalNotes());
    form.getGlobalContext().Core.setClinicalNotesShort(clinicalNotesForContact);

    if (clinicalNotesVoForContact != null)
        form.getGlobalContext().Clinical.setCurrentClinicalNote(clinicalNotesVoForContact);
    else
        form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
}
项目:openMAXIMS    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() &&
                        voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() &&
                            voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void setColStatus(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Status");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell statusCell = row.getCells().newCell(col, DynamicCellType.STRING);
    statusCell.setValue(note.getCurrentStatus().getStatus().getText());

    StringBuffer sb = new StringBuffer();
    sb.append("Status set by : ");
    sb.append(note.getCurrentStatus().getMOSIsNotNull() ? note.getCurrentStatus().getMOS().getName() : "");
    sb.append(" on ");
    sb.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : "");
    statusCell.setTooltip(sb.toString());
}
项目:openMAXIMS    文件:Logic.java   
private void setColAuthoringHCP(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording User");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingUserIsNotNull())
        value.append(note.getRecordingUser().toString());

    dateCell.setValue(value.toString());

    // Set cell tooltip
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param note
 * @return
 */
private String buildNoteTooltip(ClinicalNotesShortVo note)
{
    if(note == null) //WDEV-12766
        return null;

    StringBuilder tooltip = new StringBuilder();

    // Build "Recorded By"
    tooltip.append("<b>Authored By:</b> ");
    if (note.getAuthoringInfoIsNotNull() && note.getAuthoringInfo().getAuthoringHcpIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringHcp().toString()).append(" - "); 
    if (note.getAuthoringInfoIsNotNull() &&  note.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringDateTime().toString());
    // Build "Confirmed By"
    if(note.getCurrentStatusIsNotNull() && ClinicalNotesStatus.CONFIRMED.equals(note.getCurrentStatus().getStatus())) //WDEV-12766
    {
        tooltip.append("<br><b>Confirmed By:</b> ");
        tooltip.append(note.getCurrentStatus().getMOSIsNotNull() && note.getCurrentStatus().getMOS().getNameIsNotNull() ? note.getCurrentStatus().getMOS().getName().toString() : "").append(" - "); //WDEV-12766
        tooltip.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : ""); //WDEV-12766
    }

    return tooltip.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void setColAuthoringDate(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording Date");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingDateTimeIsNotNull())
    {
        value.append(note.getRecordingDateTime().toString());
    }

    dateCell.setValue(value.toString());
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:openMAXIMS    文件:Logic.java   
private void selectDynamicRow(DynamicGridRow row)
{
    if (row == null)
        return;

    form.getGlobalContext().Core.setClinicalNotesShort((ClinicalNotesShortVo) form.dyngrdNotes().getValue());

    form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote((ClinicalNotesShortVo) form.dyngrdNotes().getValue()));

    // WDEV-2511
    /*if (domain.getMosUser() == null)  //commented for WDEV-14624
        {
    clearContextMenu();
        form.getContextMenus().Clinical.getExtendedClinicalNotesVIEWItem().setVisible(true);//WDEV-14624
        return;
    }
    */ 
    updateContextMenu();

}
项目:openMAXIMS    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo) domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void selectClinicalNoteInGlobalContext()
{

    ClinicalNotesVo clinicalNotesVoForContact = null;

    try
    {
        clinicalNotesVoForContact = domain.getClinicalNotesForContact((ClinicalContactRefVo) form.dyngrdList().getSelectedRow().getValue());
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.getMessage());
    }

    ClinicalNotesShortVo clinicalNotesForContact = null;

    if (clinicalNotesVoForContact != null)
        clinicalNotesForContact = domain.getClinicalNotesShort(clinicalNotesVoForContact.getID_ClinicalNotes());
    form.getGlobalContext().Core.setClinicalNotesShort(clinicalNotesForContact);

    if (clinicalNotesVoForContact != null)
        form.getGlobalContext().Clinical.setCurrentClinicalNote(clinicalNotesVoForContact);
    else
        form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() &&
                        voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() &&
                            voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void setColStatus(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Status");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell statusCell = row.getCells().newCell(col, DynamicCellType.STRING);
    statusCell.setValue(note.getCurrentStatus().getStatus().getText());

    StringBuffer sb = new StringBuffer();
    sb.append("Status set by : ");
    sb.append(note.getCurrentStatus().getMOSIsNotNull() ? note.getCurrentStatus().getMOS().getName() : "");
    sb.append(" on ");
    sb.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : "");
    statusCell.setTooltip(sb.toString());
}
项目:openmaxims-linux    文件:Logic.java   
private void setColAuthoringHCP(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording User");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingUserIsNotNull())
        value.append(note.getRecordingUser().toString());

    dateCell.setValue(value.toString());

    // Set cell tooltip
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @param note
 * @return
 */
private String buildNoteTooltip(ClinicalNotesShortVo note)
{
    if(note == null) //WDEV-12766
        return null;

    StringBuilder tooltip = new StringBuilder();

    // Build "Recorded By"
    tooltip.append("<b>Authored By:</b> ");
    if (note.getAuthoringInfoIsNotNull() && note.getAuthoringInfo().getAuthoringHcpIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringHcp().toString()).append(" - "); 
    if (note.getAuthoringInfoIsNotNull() &&  note.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
        tooltip.append(note.getAuthoringInfo().getAuthoringDateTime().toString());
    // Build "Confirmed By"
    if(note.getCurrentStatusIsNotNull() && ClinicalNotesStatus.CONFIRMED.equals(note.getCurrentStatus().getStatus())) //WDEV-12766
    {
        tooltip.append("<br><b>Confirmed By:</b> ");
        tooltip.append(note.getCurrentStatus().getMOSIsNotNull() && note.getCurrentStatus().getMOS().getNameIsNotNull() ? note.getCurrentStatus().getMOS().getName().toString() : "").append(" - "); //WDEV-12766
        tooltip.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : ""); //WDEV-12766
    }

    return tooltip.toString();
}
项目:openmaxims-linux    文件:Logic.java   
private void setColAuthoringDate(ClinicalNotesShortVo note, DynamicGridRow row)
{
    DynamicGridColumn col = getCol("Recording Date");
    if (col == null)
        throw new DomainRuntimeException("No column for Identifier");

    DynamicGridCell dateCell = row.getCells().newCell(col, DynamicCellType.WRAPTEXT);
    StringBuffer value = new StringBuffer();

    if (note.getRecordingDateTimeIsNotNull())
    {
        value.append(note.getRecordingDateTime().toString());
    }

    dateCell.setValue(value.toString());
    dateCell.setTooltip(buildNoteTooltip(note));
}
项目:openmaxims-linux    文件:Logic.java   
private void selectDynamicRow(DynamicGridRow row)
{
    if (row == null)
        return;

    form.getGlobalContext().Core.setClinicalNotesShort((ClinicalNotesShortVo) form.dyngrdNotes().getValue());

    form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote((ClinicalNotesShortVo) form.dyngrdNotes().getValue()));

    // WDEV-2511
    /*if (domain.getMosUser() == null)  //commented for WDEV-14624
        {
    clearContextMenu();
        form.getContextMenus().Clinical.getExtendedClinicalNotesVIEWItem().setVisible(true);//WDEV-14624
        return;
    }
    */ 
    updateContextMenu();

}
项目:openmaxims-linux    文件:Logic.java   
private boolean testDiscipline(ClinicalNotesShortVo voNote)
{
    MemberOfStaffVo fullVo = null;
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo) domain.getMosUser();
    if (mos != null)
        fullVo = domain.getMemberOfStaff(mos);

    if (fullVo != null)
    {
        if (fullVo.getHcpIsNotNull())
        {
            if (fullVo.getHcp().getHcpTypeIsNotNull())
            {
                if (voNote.getAuthoringInfoIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
                {
                    if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType()))
                        return true;
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean rulesForReviewContexMenus (ClinicalNotesShortVo voNote, Hcp voHcp)
{
    if (voNote.getForReviewDisciplineIsNotNull() 
        && voNote.getSourceOfNoteIsNotNull()
            && voHcp != null
                && voHcp.getHcpTypeIsNotNull()
                    && voNote.getForReviewDiscipline().equals(voHcp.getHcpType()) )
                        return true;
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean rulesForValidationContexMenus (ClinicalNotesShortVo voNote, Hcp voHcp)
{
    if (voNote.getDisciplineIsNotNull() 
        && voHcp != null
            && voHcp.getHcpTypeIsNotNull()
                && voNote.getDiscipline().equals(voHcp.getHcpType()) 
                    && voNote.getCurrentStatusIsNotNull()
                        && voNote.getCurrentStatus().getStatusIsNotNull()
                            && voNote.getCurrentStatus().getStatus().equals(ClinicalNotesStatus.PREVALIDATION) )
                                return true;
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean rulesForCorrectContexMenus (ClinicalNotesShortVo voNote)
{
    if ( voNote.getCurrentStatusIsNotNull()
        && voNote.getCurrentStatus().getStatusIsNotNull()
            && voNote.getAuthoringInfoIsNotNull()
                && voNote.getAuthoringInfo().getAuthoringHcpIsNotNull()
                    && (voNote.getCurrentStatus().getStatus().equals(ClinicalNotesStatus.ACTIVE) || voNote.getCurrentStatus().getStatus().equals(ClinicalNotesStatus.CORRECTED) )
                        && domain.getHcpLiteUser() != null 
                            && /*domain.getHcpLiteUser().equals(voNote.getAuthoringInfo().getAuthoringHcp())*/ 
                                testDiscipline(voNote))
                                    return true;
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void checkForDiscipline(ClinicalNotesShortVo voClinNote)
{
    MemberOfStaffShortVo mos = null;
    if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
        mos = getDisciplineForLoggedInUser(domain.getClinicalNote((ClinicalNotesShortVo)form.dyngrdNotes().getValue()));
    else
        engine.showMessage("No discipline for logged in user");

    Hcp voHcp = (Hcp) domain.getHcpUser();

    if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull() )
        {
            if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
                    form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
                        mos != null &&
                            mos.getHcpIsNotNull())
                    {
                        if (!domain.getClinicalNote(voClinNote).getDiscipline().equals(mos.getHcp().getHcpType()))
                        {
                            form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
                        }


                        if (rulesForValidationContexMenus(voClinNote, voHcp))
                        {
                            form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
                        }

                        if (ClinicalNoteType.DISCHARGENOTE.equals(form.getGlobalContext().Clinical.getCurrentClinicalNote().getNoteType()) ||
                                ClinicalNoteType.SUMMARYATADMISSION.equals(form.getGlobalContext().Clinical.getCurrentClinicalNote().getNoteType()))
                        {
                            form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
                        }
                    }
        }
}
项目:AvoinApotti    文件:Logic.java   
private void selectClinicalNoteInGlobalContext()
{
    if (form.dyngrdNotes().getSelectedRow() != null)
    {
        form.getGlobalContext().Core.setClinicalNotesShort((ClinicalNotesShortVo)form.dyngrdNotes().getSelectedRow().getValue());
        form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote((ClinicalNotesShortVo)form.dyngrdNotes().getSelectedRow().getValue()));
    }
}
项目:AvoinApotti    文件:Logic.java   
private void selectClinicalNoteInGlobalContext()
{

    ClinicalNotesVo clinicalNotesVoForContact = null;

    try
    {
        clinicalNotesVoForContact = domain.getClinicalNotesForContact((ClinicalContactRefVo) form.grdList().getSelectedRow().getValue());

    }
    catch (RuntimeException e)
    {

        engine.showMessage(e.getMessage());

    }

    ClinicalNotesShortVo clinicalNotesForContact = null;

    if(clinicalNotesVoForContact != null)
        clinicalNotesForContact = domain.getClinicalNotesShort(clinicalNotesVoForContact.getID_ClinicalNotes());
    form.getGlobalContext().Core.setClinicalNotesShort(clinicalNotesForContact);

    if (clinicalNotesVoForContact != null)
        form.getGlobalContext().Clinical.setCurrentClinicalNote(clinicalNotesVoForContact);
    else
        form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
}
项目:AvoinApotti    文件:Logic.java   
private void setCurrentClinicalNote()
{
    if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) //WDEV-19027
    {
        ClinicalNotesVo clinicalNotesForContact;
        if(isDialog() && form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
        {
            clinicalNotesForContact = domain.getClinicalNotesForCareContext(form.getGlobalContext().Clinical.getCurrentClinicalNote().getCareContext());  //WDEV-19027
        }
        else
        {
            CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext(); //WDEV-19027 
            clinicalNotesForContact = domain.getClinicalNotesForCareContext(currentCareContext); //WDEV-19027 
        }

        if (clinicalNotesForContact != null)
        {
            ClinicalNotesShortVo clinicalNotesShort = domain.getClinicalNotesShort(clinicalNotesForContact.getID_ClinicalNotes());

            if (clinicalNotesShort != null)
                form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNotes(clinicalNotesShort.getID_ClinicalNotes()));
            else
                form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
        }
        else
        {
            form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateDynamicGrid(ClinicalNotesShortVoCollection voCollNotes)
{
    updateContextMenu();

    for (int i = 0; i < voCollNotes.size(); i++)
    {
        DynamicGridRow row = form.dyngrdNotes().getRows().newRow();

        ClinicalNotesShortVo note = voCollNotes.get(i);

        setColAuthoringDate(note, row);
        setColAuthoringHCP(note, row);

        if (note.getIsCorrectedIsNotNull() && note.getIsCorrected().booleanValue())
            setColCorrect(row);

        if (note.getDisciplineIsNotNull())
            setColDiscipline(note, row);

        if (note.getNoteClassificationIsNotNull())
            setColNoteType(note, row);

        if (note.getCurrentStatusIsNotNull() && note.getCurrentStatus().getStatusIsNotNull())
            setColStatus(note, row);

        setColNote(note, row);

        row.setValue(note);
    }
}