Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="disClientRpt"></param>
        /// <returns></returns>
        public EntityClientReport GneralPersonalReport(EntitymModelAccessRecord mdAccessRecord, out List <EntityModelParamCalc> lstMdParamCalcData, out List <EntityRiskFactorsResult> lstRiskFactorsResult)
        {
            EntityClientReport rpt = new EntityClientReport();

            rpt.clientName = mdAccessRecord.clientName;
            rpt.clientNo   = mdAccessRecord.clientNo;
            rpt.reportDate = mdAccessRecord.reportDateStr;
            rpt.reportNo   = mdAccessRecord.regNo;
            rpt.sex        = mdAccessRecord.sex;
            rpt.company    = mdAccessRecord.company;
            rpt.age        = mdAccessRecord.age;
            if (!string.IsNullOrEmpty(mdAccessRecord.strQnDate))
            {
                rpt.qnDate = mdAccessRecord.strQnDate;
            }
            rpt.image01  = ReadImageFile("pic01.png");
            rpt.image02  = ReadImageFile("pic02.jpg");
            rpt.image03  = ReadImageFile("pic03.png");
            rpt.image04  = ReadImageFile("pic04.png");
            rpt.image05  = ReadImageFile("pic05.png");
            rpt.imageTip = ReadImageFile("picTip.png");
            rpt.image07  = ReadImageFile("pic07.png");


            rpt.lstRptModelAcess = new List <EntityRptModelAcess>();
            lstMdParamCalcData   = new List <EntityModelParamCalc>();
            List <EntityModelParamCalc> lstMdParamCalc = new List <EntityModelParamCalc>();

            lstRiskFactorsResult = new List <EntityRiskFactorsResult>();
            List <EntityModelAccess> lstMdAcess = GetModelAccess(mdAccessRecord);

            #region 健康汇总及重要指标
            rpt.lstMainItem = GetMainIndicate(mdAccessRecord);
            if (tjjljyVo != null)
            {
                rpt.tjSumup = tjjljyVo.sumup;
            }
            #endregion

            #region 疾病评估
            if (lstMdAcess != null)
            {
                foreach (var mdAcess in lstMdAcess)
                {
                    rpt.lstRptModelAcess.Add(GetRptModelParam(mdAcess.modelId, mdAccessRecord, out lstMdParamCalc));

                    if (lstMdParamCalc != null && lstMdParamCalc.Count > 0)
                    {
                        lstMdParamCalcData.AddRange(lstMdParamCalc);
                    }
                }
            }
            #endregion

            #region 危险要素
            lstRiskFactorsResult = GetRiskFactorsResults(mdAccessRecord);
            #endregion

            return(rpt);
        }
Esempio n. 2
0
        public override void Edit()
        {
            try
            {
                this.BeginLoading();
                EntitymModelAccessRecord       mdAccessRecord       = GetRowObject();
                List <EntityModelParamCalc>    lstMdParamCalc       = null;
                List <EntityRiskFactorsResult> lstRiskFactorsResult = null;
                if (mdAccessRecord.qnRecId <= 0)
                {
                    DialogBox.Msg("请选择问卷");
                    return;
                }

                EntityClientReport rpt = GneralPersonalReport(mdAccessRecord, out lstMdParamCalc, out lstRiskFactorsResult);
                frmPopup2030101    frm = new frmPopup2030101(rpt);
                frm.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                this.CloseLoading();
            }
        }
Esempio n. 3
0
        private void btnLoadReport_Click(object sender, EventArgs e)
        {
            List <EntityModelParamCalc>    lstMdParamCalc        = null;
            List <EntityRiskFactorsResult> lstRiskFactorsResults = null;
            frm20301 frm = new frm20301();
            EntitymModelAccessRecord mdAccessRecord = GetRowObject();

            if (mdAccessRecord != null)
            {
                if (mdAccessRecord.qnRecId <= 0)
                {
                    DialogBox.Msg("请在个人报告选择问卷,并生成报告!");
                    return;
                }
                frm.Init();
                EntityClientReport rpt    = frm.GneralPersonalReport(mdAccessRecord, out lstMdParamCalc, out lstRiskFactorsResults);
                frmPopup2030101    frmRpt = new frmPopup2030101(rpt);
                frmRpt.ShowDialog();
            }
        }
Esempio n. 4
0
 public frmPopup2030101(EntityClientReport _rpt = null)
 {
     InitializeComponent();
     rpt = _rpt;
 }
Esempio n. 5
0
        /// <summary>
        /// 审核
        /// </summary>
        public override void Confirm()
        {
            try
            {
                this.BeginLoading();
                int affect = -1;
                EntitymModelAccessRecord       mdAccessRecord       = GetRowObject();
                List <EntityModelParamCalc>    lstMdParamCalc       = null;
                List <EntityRiskFactorsResult> lstRiskFactorsResult = null;
                if (mdAccessRecord.qnRecId <= 0)
                {
                    DialogBox.Msg("请选择问卷");
                    return;
                }

                if (mdAccessRecord.status == 1)
                {
                    DialogBox.Msg("该报告已审核,重新生成请先取消审核!");
                    return;
                }

                EntityClientReport             rpt         = GneralPersonalReport(mdAccessRecord, out lstMdParamCalc, out lstRiskFactorsResult);
                List <EntityClientModelResult> lstMdResult = null;

                if (rpt != null)
                {
                    mdAccessRecord.status      = 1;
                    mdAccessRecord.confirmDate = DateTime.Now;
                    if (rpt.lstRptModelAcess != null)
                    {
                        lstMdResult = new List <EntityClientModelResult>();
                        foreach (var mdAVo in rpt.lstRptModelAcess)
                        {
                            EntityClientModelResult vo = new EntityClientModelResult();
                            vo.clientId    = rpt.clientNo;
                            vo.reportId    = rpt.reportNo;
                            vo.qnRecId     = mdAccessRecord.qnRecId;
                            vo.modelId     = mdAVo.modelId;
                            vo.modelResult = mdAVo.resultStr;
                            vo.modelScore  = mdAVo.df;
                            vo.createDate  = DateTime.Now;

                            lstMdResult.Add(vo);
                        }
                    }
                }

                if (lstMdResult != null && lstMdParamCalc != null)
                {
                    using (ProxyHms proxy = new ProxyHms())
                    {
                        affect = proxy.Service.SaveModelResultAndParamCalc(mdAccessRecord, lstMdResult, lstMdParamCalc, lstRiskFactorsResult);
                    }
                }

                if (affect > 0)
                {
                    DialogBox.Msg("报告审核完成!");
                }
            }
            //catch (Exception ex)
            //{
            //    ExceptionLog.OutPutException(ex);
            //}
            finally
            {
                this.CloseLoading();
            }
        }