Java 类ims.clinical.vo.PatientAssessmentListVo 实例源码

项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to populate grid with search results
 */
private void populateAssessmentGrid(PatientAssessmentListVoCollection assessments)
{
    // Clear the grid
    form.grdAssessments().getRows().clear();
    form.getGlobalContext().Clinical.setReturnToFormName(null); //WDEV-17142

    // Check results collection
    if (assessments == null)
        return;


    // Iterate assessments collection and add them to grid
    for (PatientAssessmentListVo assessment : assessments)
    {
        // Create row for assessment
        grdAssessmentsRow row = form.grdAssessments().getRows().newRow();

        populateAssessmentGridRow(assessment, row);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function used to populate grid with search results
 */
private void populateAssessmentGrid(PatientAssessmentListVoCollection assessments)
{
    // Clear the grid
    form.grdAssessments().getRows().clear();
    form.getGlobalContext().Clinical.setReturnToFormName(null); //WDEV-17142

    // Check results collection
    if (assessments == null)
        return;


    // Iterate assessments collection and add them to grid
    for (PatientAssessmentListVo assessment : assessments)
    {
        // Create row for assessment
        grdAssessmentsRow row = form.grdAssessments().getRows().newRow();

        populateAssessmentGridRow(assessment, row);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function used to populate grid with search results
 */
private void populateAssessmentGrid(PatientAssessmentListVoCollection assessments)
{
    // Clear the grid
    form.grdAssessments().getRows().clear();
    form.getGlobalContext().Clinical.setReturnToFormName(null); //WDEV-17142

    // Check results collection
    if (assessments == null)
        return;


    // Iterate assessments collection and add them to grid
    for (PatientAssessmentListVo assessment : assessments)
    {
        // Create row for assessment
        grdAssessmentsRow row = form.grdAssessments().getRows().newRow();

        populateAssessmentGridRow(assessment, row);
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Function used to populate grid with search results
 */
private void populateAssessmentGrid(PatientAssessmentListVoCollection assessments)
{
    // Clear the grid
    form.grdAssessments().getRows().clear();
    form.getGlobalContext().Clinical.setReturnToFormName(null); //WDEV-17142

    // Check results collection
    if (assessments == null)
        return;


    // Iterate assessments collection and add them to grid
    for (PatientAssessmentListVo assessment : assessments)
    {
        // Create row for assessment
        grdAssessmentsRow row = form.grdAssessments().getRows().newRow();

        populateAssessmentGridRow(assessment, row);
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 *  Function used to prepare for edit selected assessment
 */
public void updateInstance()
{
    // Get the value of selected assessment
    PatientAssessmentListVo assessment = form.grdAssessments().getValue();

    // Set selected patient assessment
    form.getGlobalContext().Clinical.PatientAssessment.setSelectedAssessment(assessment);
    // Set form name where to return (name of this form) from Patient Assessment
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());

    // Set global contexts for Dynamic Assessment form
    form.getGlobalContext().Core.setEpisodeofCareShort(domain.getEpisodeOfCare(assessment.getEpisodeOfCare()));
    form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContext(assessment.getCareContext()));
    form.getGlobalContext().Core.setCurrentClinicalContact(domain.getClinicalContact(assessment.getClinicalContact()));


    // Determine what kind of assessment needs to be opened
    // Regular assessment or graphical assessment
    if (assessment != null && assessment.getAssessmentDataIsNotNull())
    {
        if (assessment.getAssessmentData().getUserAssessmentIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getUserAssessment()});
        }
        else if (assessment.getAssessmentData().getGraphicIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getGraphic()});
        }
    }
}
项目:AvoinApotti    文件:PatientAssessmentListAndSearchImpl.java   
public int compare(PatientAssessmentListVo o1, PatientAssessmentListVo o2)
{
    DateTime eventDate1 = null;
    DateTime eventDate2 = null;

    if (o1.getClinicalContactIsNotNull() && o1.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getClinicalContact().getStartDateTime();
    }
    else if (o1.getCareContextIsNotNull() && o1.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getCareContext().getStartDateTime();
    }

    if (o2.getClinicalContactIsNotNull() && o2.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getClinicalContact().getStartDateTime();
    }
    else if (o2.getCareContextIsNotNull() && o2.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getCareContext().getStartDateTime();
    }


    if (eventDate1 == null && eventDate2 != null)
    {
        return -1 * sortOrder;
    }

    if (eventDate1 != null && eventDate2 == null)
    {
        return sortOrder;
    }

    return sortOrder * eventDate1.compareTo(eventDate2);
}
项目:openMAXIMS    文件:Logic.java   
/**
 *  Function used to prepare for edit selected assessment
 */
public void updateInstance()
{
    // Get the value of selected assessment
    PatientAssessmentListVo assessment = form.grdAssessments().getValue();

    // Set selected patient assessment
    form.getGlobalContext().Clinical.PatientAssessment.setSelectedAssessment(assessment);
    // Set form name where to return (name of this form) from Patient Assessment
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());

    // Set global contexts for Dynamic Assessment form
    form.getGlobalContext().Core.setEpisodeofCareShort(domain.getEpisodeOfCare(assessment.getEpisodeOfCare()));
    form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContext(assessment.getCareContext()));
    form.getGlobalContext().Core.setCurrentClinicalContact(domain.getClinicalContact(assessment.getClinicalContact()));


    // Determine what kind of assessment needs to be opened
    // Regular assessment or graphical assessment
    if (assessment != null && assessment.getAssessmentDataIsNotNull())
    {
        if (assessment.getAssessmentData().getUserAssessmentIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getUserAssessment()});
        }
        else if (assessment.getAssessmentData().getGraphicIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getGraphic()});
        }
    }
}
项目:openMAXIMS    文件:PatientAssessmentListAndSearchImpl.java   
public int compare(PatientAssessmentListVo o1, PatientAssessmentListVo o2)
{
    DateTime eventDate1 = null;
    DateTime eventDate2 = null;

    if (o1.getClinicalContactIsNotNull() && o1.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getClinicalContact().getStartDateTime();
    }
    else if (o1.getCareContextIsNotNull() && o1.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getCareContext().getStartDateTime();
    }

    if (o2.getClinicalContactIsNotNull() && o2.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getClinicalContact().getStartDateTime();
    }
    else if (o2.getCareContextIsNotNull() && o2.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getCareContext().getStartDateTime();
    }


    if (eventDate1 == null && eventDate2 != null)
    {
        return -1 * sortOrder;
    }

    if (eventDate1 != null && eventDate2 == null)
    {
        return sortOrder;
    }

    return sortOrder * eventDate1.compareTo(eventDate2);
}
项目:openMAXIMS    文件:Logic.java   
/**
 *  Function used to prepare for edit selected assessment
 */
public void updateInstance()
{
    // Get the value of selected assessment
    PatientAssessmentListVo assessment = form.grdAssessments().getValue();

    // Set selected patient assessment
    form.getGlobalContext().Clinical.PatientAssessment.setSelectedAssessment(assessment);
    // Set form name where to return (name of this form) from Patient Assessment
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());

    // Set global contexts for Dynamic Assessment form
    form.getGlobalContext().Core.setEpisodeofCareShort(domain.getEpisodeOfCare(assessment.getEpisodeOfCare()));
    form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContext(assessment.getCareContext()));
    form.getGlobalContext().Core.setCurrentClinicalContact(domain.getClinicalContact(assessment.getClinicalContact()));


    // Determine what kind of assessment needs to be opened
    // Regular assessment or graphical assessment
    if (assessment != null && assessment.getAssessmentDataIsNotNull())
    {
        if (assessment.getAssessmentData().getUserAssessmentIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getUserAssessment()});
        }
        else if (assessment.getAssessmentData().getGraphicIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getGraphic()});
        }
    }
}
项目:openMAXIMS    文件:PatientAssessmentListAndSearchImpl.java   
public int compare(PatientAssessmentListVo o1, PatientAssessmentListVo o2)
{
    DateTime eventDate1 = null;
    DateTime eventDate2 = null;

    if (o1.getClinicalContactIsNotNull() && o1.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getClinicalContact().getStartDateTime();
    }
    else if (o1.getCareContextIsNotNull() && o1.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getCareContext().getStartDateTime();
    }

    if (o2.getClinicalContactIsNotNull() && o2.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getClinicalContact().getStartDateTime();
    }
    else if (o2.getCareContextIsNotNull() && o2.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getCareContext().getStartDateTime();
    }


    if (eventDate1 == null && eventDate2 != null)
    {
        return -1 * sortOrder;
    }

    if (eventDate1 != null && eventDate2 == null)
    {
        return sortOrder;
    }

    return sortOrder * eventDate1.compareTo(eventDate2);
}
项目:openmaxims-linux    文件:Logic.java   
/**
 *  Function used to prepare for edit selected assessment
 */
public void updateInstance()
{
    // Get the value of selected assessment
    PatientAssessmentListVo assessment = form.grdAssessments().getValue();

    // Set selected patient assessment
    form.getGlobalContext().Clinical.PatientAssessment.setSelectedAssessment(assessment);
    // Set form name where to return (name of this form) from Patient Assessment
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());

    // Set global contexts for Dynamic Assessment form
    form.getGlobalContext().Core.setEpisodeofCareShort(domain.getEpisodeOfCare(assessment.getEpisodeOfCare()));
    form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContext(assessment.getCareContext()));
    form.getGlobalContext().Core.setCurrentClinicalContact(domain.getClinicalContact(assessment.getClinicalContact()));


    // Determine what kind of assessment needs to be opened
    // Regular assessment or graphical assessment
    if (assessment != null && assessment.getAssessmentDataIsNotNull())
    {
        if (assessment.getAssessmentData().getUserAssessmentIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getUserAssessment()});
        }
        else if (assessment.getAssessmentData().getGraphicIsNotNull())
        {
            engine.open(form.getForms().Assessment.DynamicAssessments, new Object[] {assessment.getAssessmentData().getGraphic()});
        }
    }
}
项目:openmaxims-linux    文件:PatientAssessmentListAndSearchImpl.java   
public int compare(PatientAssessmentListVo o1, PatientAssessmentListVo o2)
{
    DateTime eventDate1 = null;
    DateTime eventDate2 = null;

    if (o1.getClinicalContactIsNotNull() && o1.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getClinicalContact().getStartDateTime();
    }
    else if (o1.getCareContextIsNotNull() && o1.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate1 = o1.getCareContext().getStartDateTime();
    }

    if (o2.getClinicalContactIsNotNull() && o2.getClinicalContact().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getClinicalContact().getStartDateTime();
    }
    else if (o2.getCareContextIsNotNull() && o2.getCareContext().getStartDateTimeIsNotNull())
    {
        eventDate2 = o2.getCareContext().getStartDateTime();
    }


    if (eventDate1 == null && eventDate2 != null)
    {
        return -1 * sortOrder;
    }

    if (eventDate1 != null && eventDate2 == null)
    {
        return sortOrder;
    }

    return sortOrder * eventDate1.compareTo(eventDate2);
}
项目:AvoinApotti    文件:Logic.java   
/**
 *  Function used to populate rows with assessment values
 */
private void populateAssessmentGridRow(PatientAssessmentListVo assessment, grdAssessmentsRow row)
{
    // These are values for Config Flag
    final String AUTHORING_HCP      = "Authoring HCP";
    final String RESPONSIBLE_HCP    = "Responsible HCP";

    // Check row & assessment
    if (row == null || assessment == null)
        throw new CodingRuntimeException("Logical error - must populate valid rows, with valid values.");

    // Populate row cells

    // 'Event Date' - attempt to populate form Clinical Contact, second option is Care Context
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getClinicalContact().getStartDateTime().getDate());
    }
    else if (assessment.getCareContextIsNotNull() && assessment.getCareContext().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getCareContext().getStartDateTime().getDate());
    }

    // 'Generated Date' - the date the UDA was started
    if (assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringDateTimeIsNotNull())
    {
        row.setColGeneratedDate(assessment.getSystemInformation().getCreationDateTime().getDate());
    }

    // 'Speciality' - from Clinical Contact, second option is Episode of Care
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
    }
    else if (assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
    }

    // 'Authoring HCP' / 'Responsible HCP' - depending on the ConfigFlag fill in appropriate value
    if (AUTHORING_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringHcpIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
        row.setTooltipForColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
    }
    else if (RESPONSIBLE_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getResponsibleHCPIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
        row.setTooltipForColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
    }

    // 'Assessment Name' - name of the assessment
    if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getUserAssessmentIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
    }
    else if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getGraphicIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
    }

    // 'Status' - status of the patient assessment
    if (assessment.getStatusIsNotNull())
    {
        row.setColAssessmentStatus(assessment.getStatus().getText());
    }


    // Set row value
    row.setValue(assessment);
}
项目:openMAXIMS    文件:Logic.java   
/**
 *  Function used to populate rows with assessment values
 */
private void populateAssessmentGridRow(PatientAssessmentListVo assessment, grdAssessmentsRow row)
{
    // These are values for Config Flag
    final String AUTHORING_HCP      = "Authoring HCP";
    final String RESPONSIBLE_HCP    = "Responsible HCP";

    // Check row & assessment
    if (row == null || assessment == null)
        throw new CodingRuntimeException("Logical error - must populate valid rows, with valid values.");

    // Populate row cells

    // 'Event Date' - attempt to populate form Clinical Contact, second option is Care Context
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getClinicalContact().getStartDateTime().getDate());
    }
    else if (assessment.getCareContextIsNotNull() && assessment.getCareContext().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getCareContext().getStartDateTime().getDate());
    }

    // 'Generated Date' - the date the UDA was started
    if (assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringDateTimeIsNotNull())
    {
        row.setColGeneratedDate(assessment.getSystemInformation().getCreationDateTime().getDate());
    }

    // 'Speciality' - from Clinical Contact, second option is Episode of Care
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
    }
    else if (assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
    }

    // 'Authoring HCP' / 'Responsible HCP' - depending on the ConfigFlag fill in appropriate value
    if (AUTHORING_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringHcpIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
        row.setTooltipForColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
    }
    else if (RESPONSIBLE_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getResponsibleHCPIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
        row.setTooltipForColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
    }

    // 'Assessment Name' - name of the assessment
    if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getUserAssessmentIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
    }
    else if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getGraphicIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
    }

    // 'Status' - status of the patient assessment
    if (assessment.getStatusIsNotNull())
    {
        row.setColAssessmentStatus(assessment.getStatus().getText());
    }


    // Set row value
    row.setValue(assessment);
}
项目:openMAXIMS    文件:Logic.java   
/**
 *  Function used to populate rows with assessment values
 */
private void populateAssessmentGridRow(PatientAssessmentListVo assessment, grdAssessmentsRow row)
{
    // These are values for Config Flag
    final String AUTHORING_HCP      = "Authoring HCP";
    final String RESPONSIBLE_HCP    = "Responsible HCP";

    // Check row & assessment
    if (row == null || assessment == null)
        throw new CodingRuntimeException("Logical error - must populate valid rows, with valid values.");

    // Populate row cells

    // 'Event Date' - attempt to populate form Clinical Contact, second option is Care Context
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getClinicalContact().getStartDateTime().getDate());
    }
    else if (assessment.getCareContextIsNotNull() && assessment.getCareContext().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getCareContext().getStartDateTime().getDate());
    }

    // 'Generated Date' - the date the UDA was started
    if (assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringDateTimeIsNotNull())
    {
        row.setColGeneratedDate(assessment.getSystemInformation().getCreationDateTime().getDate());
    }

    // 'Speciality' - from Clinical Contact, second option is Episode of Care
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
    }
    else if (assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
    }

    // 'Authoring HCP' / 'Responsible HCP' - depending on the ConfigFlag fill in appropriate value
    if (AUTHORING_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringHcpIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
        row.setTooltipForColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
    }
    else if (RESPONSIBLE_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getResponsibleHCPIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
        row.setTooltipForColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
    }

    // 'Assessment Name' - name of the assessment
    if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getUserAssessmentIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
    }
    else if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getGraphicIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
    }

    // 'Status' - status of the patient assessment
    if (assessment.getStatusIsNotNull())
    {
        row.setColAssessmentStatus(assessment.getStatus().getText());
    }


    // Set row value
    row.setValue(assessment);
}
项目:openmaxims-linux    文件:Logic.java   
/**
 *  Function used to populate rows with assessment values
 */
private void populateAssessmentGridRow(PatientAssessmentListVo assessment, grdAssessmentsRow row)
{
    // These are values for Config Flag
    final String AUTHORING_HCP      = "Authoring HCP";
    final String RESPONSIBLE_HCP    = "Responsible HCP";

    // Check row & assessment
    if (row == null || assessment == null)
        throw new CodingRuntimeException("Logical error - must populate valid rows, with valid values.");

    // Populate row cells

    // 'Event Date' - attempt to populate form Clinical Contact, second option is Care Context
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getClinicalContact().getStartDateTime().getDate());
    }
    else if (assessment.getCareContextIsNotNull() && assessment.getCareContext().getStartDateTimeIsNotNull())
    {
        row.setColEventDate(assessment.getCareContext().getStartDateTime().getDate());
    }

    // 'Generated Date' - the date the UDA was started
    if (assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringDateTimeIsNotNull())
    {
        row.setColGeneratedDate(assessment.getSystemInformation().getCreationDateTime().getDate());
    }

    // 'Speciality' - from Clinical Contact, second option is Episode of Care
    if (assessment.getClinicalContactIsNotNull() && assessment.getClinicalContact().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getClinicalContact().getSpecialty().getText());
    }
    else if (assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getSpecialtyIsNotNull())
    {
        row.setColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
        row.setTooltipForColSpecialty(assessment.getEpisodeOfCare().getSpecialty().getText());
    }

    // 'Authoring HCP' / 'Responsible HCP' - depending on the ConfigFlag fill in appropriate value
    if (AUTHORING_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getAuthoringInformationIsNotNull() && assessment.getAuthoringInformation().getAuthoringHcpIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
        row.setTooltipForColAuthoringHCP(assessment.getAuthoringInformation().getAuthoringHcp().toString());
    }
    else if (RESPONSIBLE_HCP.equals(ConfigFlag.UI.PATIENT_ASSESSMENT_SEARCH_DISPLAY_HCP_COLUMN_TYPE.getValue())
            && assessment.getEpisodeOfCareIsNotNull() && assessment.getEpisodeOfCare().getResponsibleHCPIsNotNull())
    {
        row.setColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
        row.setTooltipForColAuthoringHCP(assessment.getEpisodeOfCare().getResponsibleHCP().toString());
    }

    // 'Assessment Name' - name of the assessment
    if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getUserAssessmentIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getUserAssessment().getName());
    }
    else if (assessment.getAssessmentDataIsNotNull() && assessment.getAssessmentData().getGraphicIsNotNull())
    {
        row.setColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
        row.setTooltipForColAssessmentName(assessment.getAssessmentData().getGraphic().getName());
    }

    // 'Status' - status of the patient assessment
    if (assessment.getStatusIsNotNull())
    {
        row.setColAssessmentStatus(assessment.getStatus().getText());
    }


    // Set row value
    row.setValue(assessment);
}