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

项目:AvoinApotti    文件:Logic.java   
protected void onGrdSmokingDetailsGridComboBoxSelectionChanged(int column, grdSmokingDetailsRow row, Object value) throws PresentationLogicException
{
    if (column == 0)
    {
        if (form.cmbSmokingStatus().getValue() == null || value == null || row == null)
            return;

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
            row.setColStatus(SmokingCurrentHistoric.HISTORIC);

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStopped(null);

        if (row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStoppedReadOnly(true);
        else if (row.getColStatus().equals(SmokingCurrentHistoric.HISTORIC))
            row.setColWhenStoppedReadOnly(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdSmokingDetailsGridComboBoxSelectionChanged(int column, grdSmokingDetailsRow row, Object value) throws PresentationLogicException
{
    if (column == 0)
    {
        if (form.cmbSmokingStatus().getValue() == null || value == null || row == null)
            return;

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
            row.setColStatus(SmokingCurrentHistoric.HISTORIC);

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStopped(null);

        if (row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStoppedReadOnly(true);
        else if (row.getColStatus().equals(SmokingCurrentHistoric.HISTORIC))
            row.setColWhenStoppedReadOnly(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdSmokingDetailsGridComboBoxSelectionChanged(int column, grdSmokingDetailsRow row, Object value) throws PresentationLogicException
{
    if (column == 0)
    {
        if (form.cmbSmokingStatus().getValue() == null || value == null || row == null)
            return;

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
            row.setColStatus(SmokingCurrentHistoric.HISTORIC);

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStopped(null);

        if (row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStoppedReadOnly(true);
        else if (row.getColStatus().equals(SmokingCurrentHistoric.HISTORIC))
            row.setColWhenStoppedReadOnly(false);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdSmokingDetailsGridComboBoxSelectionChanged(int column, grdSmokingDetailsRow row, Object value) throws PresentationLogicException
{
    if (column == 0)
    {
        if (form.cmbSmokingStatus().getValue() == null || value == null || row == null)
            return;

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
            row.setColStatus(SmokingCurrentHistoric.HISTORIC);

        if (column == 0 && form.cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStopped(null);

        if (row.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
            row.setColWhenStoppedReadOnly(true);
        else if (row.getColStatus().equals(SmokingCurrentHistoric.HISTORIC))
            row.setColWhenStoppedReadOnly(false);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdSmokingGridComboBoxSelectionChanged(int column, grdSmokingRow row, Object value) throws PresentationLogicException 
{
    if(form.ctnBreathing().cmbSmokingStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);

}
项目:AvoinApotti    文件:Logic.java   
protected void onGridSmokingGridComboBoxSelectionChanged(int column, gridSmokingRow row, Object value) throws PresentationLogicException
{
    if(form.comboBoxStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.comboBoxStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.comboBoxStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdSmokingGridComboBoxSelectionChanged(int column, grdSmokingRow row, Object value) throws PresentationLogicException 
{
    if(form.ctnBreathing().cmbSmokingStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);

}
项目:openMAXIMS    文件:Logic.java   
protected void onGridSmokingGridComboBoxSelectionChanged(int column, gridSmokingRow row, Object value) throws PresentationLogicException
{
    if(form.comboBoxStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.comboBoxStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.comboBoxStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdSmokingGridComboBoxSelectionChanged(int column, grdSmokingRow row, Object value) throws PresentationLogicException 
{
    if(form.ctnBreathing().cmbSmokingStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);

}
项目:openMAXIMS    文件:Logic.java   
protected void onGridSmokingGridComboBoxSelectionChanged(int column, gridSmokingRow row, Object value) throws PresentationLogicException
{
    if(form.comboBoxStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.comboBoxStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.comboBoxStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdSmokingGridComboBoxSelectionChanged(int column, grdSmokingRow row, Object value) throws PresentationLogicException 
{
    if(form.ctnBreathing().cmbSmokingStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.ctnBreathing().cmbSmokingStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);

}
项目:openmaxims-linux    文件:Logic.java   
protected void onGridSmokingGridComboBoxSelectionChanged(int column, gridSmokingRow row, Object value) throws PresentationLogicException
{
    if(form.comboBoxStatus().getValue() == null || value == null || row == null)
        return;

    if(column == 0 && form.comboBoxStatus().getValue().equals(SmokingStatus.EXSMOKER) && !value.equals(SmokingCurrentHistoric.HISTORIC))
        row.setColStatus(SmokingCurrentHistoric.HISTORIC);

    if(column == 0  && form.comboBoxStatus().getValue().equals(SmokingStatus.SMOKER) && value.equals(SmokingCurrentHistoric.CURRENT))
        row.setColWhenStopped(null);
}
项目:AvoinApotti    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.SocialHistoryVo value, Boolean authoring)
{
    if (value == null)
        return;


    super.populateScreenFromData(value);
    if(authoring == true)
        form.customControlAuth().setValue(value.getAuthoringInformation()); 
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    //wdev-12650
    this.form.cmbOccupationStatus().setRequired(form.cmbOccupation().getValue() != null);
    //------------
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

    if(value.getRecordingInformationIsNotNull()){
        MemberOfStaffLiteVo mos = value.getRecordingInformation().getRecordingUser();
        if(mos!=null){
            form.cmbRecordingHCP().newRow(mos, mos.toString());
            form.cmbRecordingHCP().setValue(mos);   
        }
        form.dtimRecordingDateTime().setValue(value.getRecordingInformation().getRecordingDateTime());
    }



}
项目:AvoinApotti    文件:Logic.java   
private void populateRestScreenFromData(SocialHistoryVo value)
{
    if(value == null)
        return;
    super.populateScreenFromData(value);
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

}
项目:openMAXIMS    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.SocialHistoryVo value, Boolean authoring)
{
    if (value == null)
        return;


    super.populateScreenFromData(value);
    if(authoring == true)
        form.customControlAuth().setValue(value.getAuthoringInformation()); 
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    //wdev-12650
    this.form.cmbOccupationStatus().setRequired(form.cmbOccupation().getValue() != null);
    //------------
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

    if(value.getRecordingInformationIsNotNull()){
        MemberOfStaffLiteVo mos = value.getRecordingInformation().getRecordingUser();
        if(mos!=null){
            form.cmbRecordingHCP().newRow(mos, mos.toString());
            form.cmbRecordingHCP().setValue(mos);   
        }
        form.dtimRecordingDateTime().setValue(value.getRecordingInformation().getRecordingDateTime());
    }



}
项目:openMAXIMS    文件:Logic.java   
private void populateRestScreenFromData(SocialHistoryVo value)
{
    if(value == null)
        return;
    super.populateScreenFromData(value);
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

}
项目:openMAXIMS    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.SocialHistoryVo value, Boolean authoring)
{
    if (value == null)
        return;


    super.populateScreenFromData(value);
    if(authoring == true)
        form.customControlAuth().setValue(value.getAuthoringInformation()); 
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    //wdev-12650
    this.form.cmbOccupationStatus().setRequired(form.cmbOccupation().getValue() != null);
    //------------
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

    if(value.getRecordingInformationIsNotNull()){
        MemberOfStaffLiteVo mos = value.getRecordingInformation().getRecordingUser();
        if(mos!=null){
            form.cmbRecordingHCP().newRow(mos, mos.toString());
            form.cmbRecordingHCP().setValue(mos);   
        }
        form.dtimRecordingDateTime().setValue(value.getRecordingInformation().getRecordingDateTime());
    }



}
项目:openMAXIMS    文件:Logic.java   
private void populateRestScreenFromData(SocialHistoryVo value)
{
    if(value == null)
        return;
    super.populateScreenFromData(value);
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

}
项目:openmaxims-linux    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.SocialHistoryVo value, Boolean authoring)
{
    if (value == null)
        return;


    super.populateScreenFromData(value);
    if(authoring == true)
        form.customControlAuth().setValue(value.getAuthoringInformation()); 
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    //wdev-12650
    this.form.cmbOccupationStatus().setRequired(form.cmbOccupation().getValue() != null);
    //------------
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

    if(value.getRecordingInformationIsNotNull()){
        MemberOfStaffLiteVo mos = value.getRecordingInformation().getRecordingUser();
        if(mos!=null){
            form.cmbRecordingHCP().newRow(mos, mos.toString());
            form.cmbRecordingHCP().setValue(mos);   
        }
        form.dtimRecordingDateTime().setValue(value.getRecordingInformation().getRecordingDateTime());
    }



}
项目:openmaxims-linux    文件:Logic.java   
private void populateRestScreenFromData(SocialHistoryVo value)
{
    if(value == null)
        return;
    super.populateScreenFromData(value);
    // ----- Start of grdSmokingDetails Grid --------------------------
    ims.core.vo.SmokingDetailsCollection fieldgrdSmokingDetails = value.getSmokingDetailsIsNotNull() ? value.getSmokingDetails() : null;
    if (fieldgrdSmokingDetails != null)
    {
        GenForm.grdSmokingDetailsRow rowgrdSmokingDetails;
        for (int x = 0; x < fieldgrdSmokingDetails.size(); x++)
        {
            if (fieldgrdSmokingDetails.get(x) != null)
            {
                rowgrdSmokingDetails = this.form.grdSmokingDetails().getRows().newRow();

                rowgrdSmokingDetails.setColStatus(fieldgrdSmokingDetails.get(x).getStatus());
                rowgrdSmokingDetails.setColWhat(fieldgrdSmokingDetails.get(x).getSmokingWhat());
                rowgrdSmokingDetails.setColAmt(fieldgrdSmokingDetails.get(x).getAmountPerDay());
                rowgrdSmokingDetails.setColNrYrs(fieldgrdSmokingDetails.get(x).getNumberOfYears());
                rowgrdSmokingDetails.setColWhenStopped(fieldgrdSmokingDetails.get(x).getWhenStopped());

                if (rowgrdSmokingDetails.getColStatus() != null)
                {
                    if (rowgrdSmokingDetails.getColStatus().equals(SmokingCurrentHistoric.CURRENT))
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(true);
                    else
                        rowgrdSmokingDetails.setColWhenStoppedReadOnly(false);
                }

                rowgrdSmokingDetails.setValue(fieldgrdSmokingDetails.get(x));
            }
        }
    }
    // ----- End of grdSmokingDetails Grid ----------------------------

    this.form.txtIllicitDrugs().setValue(value.getIllicitDrugs());
    this.form.cmbSmokingStatus().setValue(value.getSmokingStatus());
    this.form.cmbOccupation().setValue(value.getOccupation());
    this.form.cmbOccupationStatus().setValue(value.getOccupationStatus());
    this.form.cmbLivesWith().setValue(value.getLivesWith());

    AlcoholVo voAlcohol = value.getAlcohol();
    if (voAlcohol != null)
    {
        form.cmbAlcoholStatus().setValue(voAlcohol.getDoYouDrinkAlcohol());
        form.intUnitsPerDay().setValue(voAlcohol.getUnitsPerDay());
        form.txtTakenLastWeek().setValue(voAlcohol.getDescriptiveHistory());
    }

    SocialHistoryMaritalStatusVo voMaritalStatus = value.getMaritalStatus();
    if (voMaritalStatus != null)
    {
        form.cmbMaritalStat().setValue(voMaritalStatus.getMaritalStatus());
        form.pdtMaritalStatus().setValue(voMaritalStatus.getStatusDate());
    }
    populateIllicitDrugsGrid(value);
    if(value.getIllicitDrugsList() != null)
        form.ansIVUser().setValue(value.getIllicitDrugsList().getDrugsUsedIntravenously());

}