Java 类ims.nursing.vo.NursingClinicalNotesListVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void sortDates()
{
    NursingClinicalNotesListVoCollection gridContents = form.getLocalContext().getClinicalNotesColl();

    if (form.getLocalContext().getsortOrder() == 0)
    {
        form.getLocalContext().setsortOrder(1);
    }
    else if (form.getLocalContext().getsortOrder() == 1)
    {
        form.getLocalContext().setsortOrder(0);

    }

    gridContents.sort(new ClinicalNotesListVoComparator(form.getLocalContext().getsortOrder()));
    populateGrid(gridContents);
}
项目:openMAXIMS    文件:Logic.java   
private void sortDates()
{
    NursingClinicalNotesListVoCollection gridContents = form.getLocalContext().getClinicalNotesColl();

    if (form.getLocalContext().getsortOrder() == 0)
    {
        form.getLocalContext().setsortOrder(1);
    }
    else if (form.getLocalContext().getsortOrder() == 1)
    {
        form.getLocalContext().setsortOrder(0);

    }

    gridContents.sort(new ClinicalNotesListVoComparator(form.getLocalContext().getsortOrder()));
    populateGrid(gridContents);
}
项目:openMAXIMS    文件:Logic.java   
private void sortDates()
{
    NursingClinicalNotesListVoCollection gridContents = form.getLocalContext().getClinicalNotesColl();

    if (form.getLocalContext().getsortOrder() == 0)
    {
        form.getLocalContext().setsortOrder(1);
    }
    else if (form.getLocalContext().getsortOrder() == 1)
    {
        form.getLocalContext().setsortOrder(0);

    }

    gridContents.sort(new ClinicalNotesListVoComparator(form.getLocalContext().getsortOrder()));
    populateGrid(gridContents);
}
项目:openmaxims-linux    文件:Logic.java   
private void sortDates()
{
    NursingClinicalNotesListVoCollection gridContents = form.getLocalContext().getClinicalNotesColl();

    if (form.getLocalContext().getsortOrder() == 0)
    {
        form.getLocalContext().setsortOrder(1);
    }
    else if (form.getLocalContext().getsortOrder() == 1)
    {
        form.getLocalContext().setsortOrder(0);

    }

    gridContents.sort(new ClinicalNotesListVoComparator(form.getLocalContext().getsortOrder()));
    populateGrid(gridContents);
}
项目:AvoinApotti    文件:Logic.java   
private void listNotes()
{
    form.getLocalContext().setsortOrder(0);
    form.btnPrintReport().setEnabled(false);
    form.gridNotes().getRows().clear();

    CareContextShortVo careContextVo = form.getGlobalContext().Core.getCurrentCareContext();

    NursingClinicalNotesListVoCollection notesColl = domain.listClinicNotes(form.dateFrom().getValue(), form.dateTo().getValue(), new Boolean(form.chkActiveOnly().getValue()), careContextVo);
    form.getLocalContext().setClinicalNotesColl(notesColl);

    if (notesColl != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < notesColl.size(); i++)
        {
            notes = notesColl.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
            refreshSearchCriteriaFilter();  //wdev-10788
        }
        form.btnPrintReport().setEnabled(! engine.isRIEMode()); //WDEV-15079
        form.gridNotes().setSelectable(! engine.isRIEMode()); //WDEV-15114
    }
    if(form.gridNotes().getRows().size() < 1)
        form.getGlobalContext().Nursing.setClinicalNotesViewFilter(null);   //wdev-10788
}
项目:AvoinApotti    文件:Logic.java   
private void populateGrid(NursingClinicalNotesListVoCollection gridContents)
{
    form.gridNotes().getRows().clear();

    if (gridContents != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < gridContents.size(); i++)
        {
            notes = gridContents.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
        }

    }

}
项目:AvoinApotti    文件:ClinicalNotesViewImpl.java   
/**
 * Lists Clinic Notes for the given EpisodeId and Date Range - also receives
 * a filter for all or active only true = all false = active only
 */    
public NursingClinicalNotesListVoCollection listClinicNotes(Date fromDate,Date toDate, Boolean activeOnly, CareContextShortVo careContextVo) 
{
    DomainFactory factory = getDomainFactory();
    String filter = "from NursingClinicalNotes t ";
    String andStr = " ";
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    StringBuffer filterString = new StringBuffer();
    boolean conditionFound = false;

    if (fromDate != null && toDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate and t.recordingDateTime < :toDate ");
        conditionFound = true;

        markerNames.add("fromDate");
        markerValues.add(fromDate.getDate());

        // Adding a day to the toDate will ensure everything up to 23:59:59
        // recorded on toDate will be returned
        markerNames.add("toDate");
        markerValues.add(toDate.copy().addDay(1).getDate());

        andStr = " and ";
    }
    else if (fromDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate ");
        filterString.append(" and t.recordingDateTime < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");

        markerValues.add(fromDate.getDate());
        markerValues.add(fromDate.copy().addDay(1).getDate());

        andStr = " and ";
    }

    if (careContextVo != null)
    {
        if (conditionFound)
            filterString.append(" and ");

        filterString.append(" t.careContext.id = :CareContext ");
        markerNames.add("CareContext");
        markerValues.add(careContextVo.getID_CareContext());
        andStr = " and ";

        // commented out as attribute no longer part of BO
        if (activeOnly != null && activeOnly.booleanValue())
        {
            //filterString.append(andStr + " t.currentStatus.correctionConfirmed != :isActive");
            filterString.append(andStr + " t.isCorrected <> :isActive"); //WDEV-15049
            markerNames.add("isActive");
            markerValues.add(Boolean.TRUE);

        }   
    }
    // We only want to list Nursing Clinical notes here.
    // filterString.append(andStr + " t.class = NursingClinicalNotes");

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List notes = factory.find(filter, markerNames, markerValues,1000);
    return NursingClinicalNotesListVoAssembler.createNursingClinicalNotesListVoCollectionFromNursingClinicalNotes(notes).sort(SortOrder.DESCENDING);

}
项目:openMAXIMS    文件:Logic.java   
private void listNotes()
{
    form.getLocalContext().setsortOrder(0);
    form.btnPrintReport().setEnabled(false);
    form.gridNotes().getRows().clear();

    CareContextShortVo careContextVo = form.getGlobalContext().Core.getCurrentCareContext();

    NursingClinicalNotesListVoCollection notesColl = domain.listClinicNotes(form.dateFrom().getValue(), form.dateTo().getValue(), new Boolean(form.chkActiveOnly().getValue()), careContextVo);
    form.getLocalContext().setClinicalNotesColl(notesColl);

    if (notesColl != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < notesColl.size(); i++)
        {
            notes = notesColl.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
            refreshSearchCriteriaFilter();  //wdev-10788
        }
        form.btnPrintReport().setEnabled(! engine.isRIEMode()); //WDEV-15079
        form.gridNotes().setSelectable(! engine.isRIEMode()); //WDEV-15114
    }
    if(form.gridNotes().getRows().size() < 1)
        form.getGlobalContext().Nursing.setClinicalNotesViewFilter(null);   //wdev-10788
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(NursingClinicalNotesListVoCollection gridContents)
{
    form.gridNotes().getRows().clear();

    if (gridContents != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < gridContents.size(); i++)
        {
            notes = gridContents.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
        }

    }

}
项目:openMAXIMS    文件:ClinicalNotesViewImpl.java   
/**
 * Lists Clinic Notes for the given EpisodeId and Date Range - also receives
 * a filter for all or active only true = all false = active only
 */    
public NursingClinicalNotesListVoCollection listClinicNotes(Date fromDate,Date toDate, Boolean activeOnly, CareContextShortVo careContextVo) 
{
    DomainFactory factory = getDomainFactory();
    String filter = "from NursingClinicalNotes t ";
    String andStr = " ";
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    StringBuffer filterString = new StringBuffer();
    boolean conditionFound = false;

    if (fromDate != null && toDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate and t.recordingDateTime < :toDate ");
        conditionFound = true;

        markerNames.add("fromDate");
        markerValues.add(fromDate.getDate());

        // Adding a day to the toDate will ensure everything up to 23:59:59
        // recorded on toDate will be returned
        markerNames.add("toDate");
        markerValues.add(toDate.copy().addDay(1).getDate());

        andStr = " and ";
    }
    else if (fromDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate ");
        filterString.append(" and t.recordingDateTime < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");

        markerValues.add(fromDate.getDate());
        markerValues.add(fromDate.copy().addDay(1).getDate());

        andStr = " and ";
    }

    if (careContextVo != null)
    {
        if (conditionFound)
            filterString.append(" and ");

        filterString.append(" t.careContext.id = :CareContext ");
        markerNames.add("CareContext");
        markerValues.add(careContextVo.getID_CareContext());
        andStr = " and ";

        // commented out as attribute no longer part of BO
        if (activeOnly != null && activeOnly.booleanValue())
        {
            //filterString.append(andStr + " t.currentStatus.correctionConfirmed != :isActive");
            filterString.append(andStr + " t.isCorrected <> :isActive"); //WDEV-15049
            markerNames.add("isActive");
            markerValues.add(Boolean.TRUE);

        }   
    }
    // We only want to list Nursing Clinical notes here.
    // filterString.append(andStr + " t.class = NursingClinicalNotes");

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List notes = factory.find(filter, markerNames, markerValues,1000);
    return NursingClinicalNotesListVoAssembler.createNursingClinicalNotesListVoCollectionFromNursingClinicalNotes(notes).sort(SortOrder.DESCENDING);

}
项目:openMAXIMS    文件:Logic.java   
private void listNotes()
{
    form.getLocalContext().setsortOrder(0);
    form.btnPrintReport().setEnabled(false);
    form.gridNotes().getRows().clear();

    CareContextShortVo careContextVo = form.getGlobalContext().Core.getCurrentCareContext();

    NursingClinicalNotesListVoCollection notesColl = domain.listClinicNotes(form.dateFrom().getValue(), form.dateTo().getValue(), new Boolean(form.chkActiveOnly().getValue()), careContextVo);
    form.getLocalContext().setClinicalNotesColl(notesColl);

    if (notesColl != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < notesColl.size(); i++)
        {
            notes = notesColl.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
            refreshSearchCriteriaFilter();  //wdev-10788
        }
        form.btnPrintReport().setEnabled(! engine.isRIEMode()); //WDEV-15079
        form.gridNotes().setSelectable(! engine.isRIEMode()); //WDEV-15114
    }
    if(form.gridNotes().getRows().size() < 1)
        form.getGlobalContext().Nursing.setClinicalNotesViewFilter(null);   //wdev-10788
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(NursingClinicalNotesListVoCollection gridContents)
{
    form.gridNotes().getRows().clear();

    if (gridContents != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < gridContents.size(); i++)
        {
            notes = gridContents.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
        }

    }

}
项目:openMAXIMS    文件:ClinicalNotesViewImpl.java   
/**
 * Lists Clinic Notes for the given EpisodeId and Date Range - also receives
 * a filter for all or active only true = all false = active only
 */    
public NursingClinicalNotesListVoCollection listClinicNotes(Date fromDate,Date toDate, Boolean activeOnly, CareContextShortVo careContextVo) 
{
    DomainFactory factory = getDomainFactory();
    String filter = "from NursingClinicalNotes t ";
    String andStr = " ";
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    StringBuffer filterString = new StringBuffer();
    boolean conditionFound = false;

    if (fromDate != null && toDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate and t.recordingDateTime < :toDate ");
        conditionFound = true;

        markerNames.add("fromDate");
        markerValues.add(fromDate.getDate());

        // Adding a day to the toDate will ensure everything up to 23:59:59
        // recorded on toDate will be returned
        markerNames.add("toDate");
        markerValues.add(toDate.copy().addDay(1).getDate());

        andStr = " and ";
    }
    else if (fromDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate ");
        filterString.append(" and t.recordingDateTime < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");

        markerValues.add(fromDate.getDate());
        markerValues.add(fromDate.copy().addDay(1).getDate());

        andStr = " and ";
    }

    if (careContextVo != null)
    {
        if (conditionFound)
            filterString.append(" and ");

        filterString.append(" t.careContext.id = :CareContext ");
        markerNames.add("CareContext");
        markerValues.add(careContextVo.getID_CareContext());
        andStr = " and ";

        // commented out as attribute no longer part of BO
        if (activeOnly != null && activeOnly.booleanValue())
        {
            //filterString.append(andStr + " t.currentStatus.correctionConfirmed != :isActive");
            filterString.append(andStr + " t.isCorrected <> :isActive"); //WDEV-15049
            markerNames.add("isActive");
            markerValues.add(Boolean.TRUE);

        }   
    }
    // We only want to list Nursing Clinical notes here.
    // filterString.append(andStr + " t.class = NursingClinicalNotes");

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List notes = factory.find(filter, markerNames, markerValues,1000);
    return NursingClinicalNotesListVoAssembler.createNursingClinicalNotesListVoCollectionFromNursingClinicalNotes(notes).sort(SortOrder.DESCENDING);

}
项目:openmaxims-linux    文件:Logic.java   
private void listNotes()
{
    form.getLocalContext().setsortOrder(0);
    form.btnPrintReport().setEnabled(false);
    form.gridNotes().getRows().clear();

    CareContextShortVo careContextVo = form.getGlobalContext().Core.getCurrentCareContext();

    NursingClinicalNotesListVoCollection notesColl = domain.listClinicNotes(form.dateFrom().getValue(), form.dateTo().getValue(), new Boolean(form.chkActiveOnly().getValue()), careContextVo);
    form.getLocalContext().setClinicalNotesColl(notesColl);

    if (notesColl != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < notesColl.size(); i++)
        {
            notes = notesColl.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
            refreshSearchCriteriaFilter();  //wdev-10788
        }
        form.btnPrintReport().setEnabled(! engine.isRIEMode()); //WDEV-15079
        form.gridNotes().setSelectable(! engine.isRIEMode()); //WDEV-15114
    }
    if(form.gridNotes().getRows().size() < 1)
        form.getGlobalContext().Nursing.setClinicalNotesViewFilter(null);   //wdev-10788
}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrid(NursingClinicalNotesListVoCollection gridContents)
{
    form.gridNotes().getRows().clear();

    if (gridContents != null)
    {

        GenForm.gridNotesRow row;
        NursingClinicalNotesListVo notes;
        for (int i = 0; i < gridContents.size(); i++)
        {
            notes = gridContents.get(i);
            row = form.gridNotes().getRows().newRow();
            if (notes.getAuthoringInformationIsNotNull())
            {
                if (notes.getAuthoringInformation().getAuthoringHcpIsNotNull())
                    row.setcolBy(notes.getAuthoringInformation().getAuthoringHcp().toString());
            }
            if (notes.getRecordingDateTime() != null)
            {
                row.setcolDate(notes.getRecordingDateTime().toString());
            }

            if (notes.getIsCorrected() != null && notes.getIsCorrected().booleanValue() == true && notes.getCurrentStatus().getCorrectionReasonIsNotNull() && notes.getCurrentStatus().getCorrectedByIsNotNull() && notes.getCurrentStatus().getDateTimeIsNotNull()) // Correction has been added
            {
                String strHCPCorrection = "";

                if (notes.getCurrentStatusIsNotNull())
                {
                    if (notes.getCurrentStatus().getCorrectedByIsNotNull())

                        strHCPCorrection = notes.getCurrentStatus().getCorrectedBy().getName().toString();
                }
                row.setcolNote(notes.getClinicalNote() + "\nCorrected By: " + strHCPCorrection + " on " + notes.getCurrentStatus().getDateTime().getDate() + " at " + notes.getCurrentStatus().getDateTime().getTime() + " for the following reason:\n" + notes.getCurrentStatus().getCorrectionReason());
            }
            else
            {
                row.setcolNote(notes.getClinicalNote());
            }

            row.setValue(notes);
        }

    }

}
项目:openmaxims-linux    文件:ClinicalNotesViewImpl.java   
/**
 * Lists Clinic Notes for the given EpisodeId and Date Range - also receives
 * a filter for all or active only true = all false = active only
 */    
public NursingClinicalNotesListVoCollection listClinicNotes(Date fromDate,Date toDate, Boolean activeOnly, CareContextShortVo careContextVo) 
{
    DomainFactory factory = getDomainFactory();
    String filter = "from NursingClinicalNotes t ";
    String andStr = " ";
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    StringBuffer filterString = new StringBuffer();
    boolean conditionFound = false;

    if (fromDate != null && toDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate and t.recordingDateTime < :toDate ");
        conditionFound = true;

        markerNames.add("fromDate");
        markerValues.add(fromDate.getDate());

        // Adding a day to the toDate will ensure everything up to 23:59:59
        // recorded on toDate will be returned
        markerNames.add("toDate");
        markerValues.add(toDate.copy().addDay(1).getDate());

        andStr = " and ";
    }
    else if (fromDate != null)
    {
        filterString.append(" t.recordingDateTime >= :fromDate ");
        filterString.append(" and t.recordingDateTime < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");

        markerValues.add(fromDate.getDate());
        markerValues.add(fromDate.copy().addDay(1).getDate());

        andStr = " and ";
    }

    if (careContextVo != null)
    {
        if (conditionFound)
            filterString.append(" and ");

        filterString.append(" t.careContext.id = :CareContext ");
        markerNames.add("CareContext");
        markerValues.add(careContextVo.getID_CareContext());
        andStr = " and ";

        // commented out as attribute no longer part of BO
        if (activeOnly != null && activeOnly.booleanValue())
        {
            //filterString.append(andStr + " t.currentStatus.correctionConfirmed != :isActive");
            filterString.append(andStr + " t.isCorrected <> :isActive"); //WDEV-15049
            markerNames.add("isActive");
            markerValues.add(Boolean.TRUE);

        }   
    }
    // We only want to list Nursing Clinical notes here.
    // filterString.append(andStr + " t.class = NursingClinicalNotes");

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List notes = factory.find(filter, markerNames, markerValues,1000);
    return NursingClinicalNotesListVoAssembler.createNursingClinicalNotesListVoCollectionFromNursingClinicalNotes(notes).sort(SortOrder.DESCENDING);

}