예제 #1
0
        /// <summary>
        /// Init
        /// </summary>
        internal void Init()
        {
            try
            {
                Viewer.Location = new Point(Viewer.Location.X, 0);
                Viewer.Height   = Screen.PrimaryScreen.WorkingArea.Height;
                uiHelper.BeginLoading(Viewer);

                #region 参数
                using (ProxyEntityFactory proxy = new ProxyEntityFactory())
                {
                    EventParmData = EntityTools.ConvertToEntityList <EntityRptEventParm>(proxy.Service.SelectFullTable(new EntityRptEventParm()));
                }
                #endregion

                // 不良事件报表
                if (EventParmData != null)
                {
                    if (EventParmData.Any(t => t.eventId == this.EventDisplayVo.eventId && t.keyId == "templateId"))
                    {
                        this.formId = Function.Dec(EventParmData.FirstOrDefault(t => t.eventId == this.EventDisplayVo.eventId && t.keyId == "templateId").keyValue);
                    }
                }
                if (this.formId > 0)
                {
                    using (ProxyFormDesign proxy = new ProxyFormDesign())
                    {
                        proxy.Service.GetForm((int)this.formId, out FormDesignVo);
                    }
                }
                if (FormDesignVo == null)
                {
                    FormDesignVo = new EntityFormDesign();
                }
                if (Function.Dec(this.EventDisplayVo.rptId) > 0)
                {
                    using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                    {
                        EntityRptEvent vo = proxy.Service.GetEvent(Function.Dec(this.EventDisplayVo.rptId));

                        #region patientInfo
                        Viewer.rdoFlag.SelectedIndex       = vo.patType - 1;
                        Viewer.rdoFlag.Properties.ReadOnly = true;
                        Viewer.txtCardNo.Text = vo.patNo;
                        GetPatient();
                        #endregion

                        LoadForm(FormDesignVo.Layout, vo.xmlData);
                    }
                }
                else
                {
                    LoadForm(FormDesignVo.Layout, null);
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
예제 #2
0
        /// <summary>
        /// ConfirmRpt
        /// </summary>
        /// <param name="flg">1 审核通过 2 审核未通过 0 反审核</param>
        #region
        void ConfirmRpt(int flg)
        {
            vo = GetRowObject();
            if (vo.rptId <= 0)
            {
                return;
            }
            if ((flg == 1 && vo.status == 1) || (flg == 2 && vo.status == 2))
            {
                DialogBox.Msg("已审核");
            }
            else
            {
                vo.status = flg;
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    if (proxy.Service.ComfirmRpt(vo) > 0)
                    {
                        if (flg == 1)
                        {
                            if (this.gvReport.FocusedRowHandle > 0)
                            {
                                this.gvReport.Appearance.SelectedRow.ForeColor = Color.Green;
                            }
                            DialogBox.Msg("审核成功");
                        }
                        else if (flg == 2)
                        {
                            if (this.gvReport.FocusedRowHandle > 0)
                            {
                                this.gvReport.Appearance.SelectedRow.ForeColor = Color.Red;
                            }
                            DialogBox.Msg("审核成功");
                        }
                        else
                        {
                            if (this.gvReport.FocusedRowHandle > 0)
                            {
                                this.gvReport.Appearance.SelectedRow.ForeColor = Color.Black;
                            }
                            DialogBox.Msg("反审核成功");
                        }

                        vo = null;
                    }
                    else
                    {
                        if (flg == 1)
                        {
                            DialogBox.Msg("审核失败");
                        }
                        else
                        {
                            DialogBox.Msg("反审核失败");
                        }
                        vo = null;
                    }
                }
            }
        }
예제 #3
0
 /// <summary>
 /// DeleteRpt
 /// </summary>
 #region
 void DeleteRpt()
 {
     vo = GetRowObject();
     if (vo.rptId <= 0)
     {
         return;
     }
     else
     {
         vo.status = -1;
         using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
         {
             if (proxy.Service.ComfirmRpt(vo) > 0)
             {
                 DialogBox.Msg("删除成功");
                 vo = null;
             }
             else
             {
                 DialogBox.Msg("删除失败");
                 vo = null;
             }
         }
     }
 }
예제 #4
0
        /// <summary>
        /// GetPatient
        /// </summary>
        internal void GetPatient()
        {
            string cardNo = Viewer.txtCardNo.Text.Trim();

            if (cardNo != string.Empty)
            {
                if (Viewer.rdoFlag.SelectedIndex == 0 && cardNo.Length < 10)
                {
                    cardNo = cardNo.PadLeft(10, '0');
                    Viewer.txtCardNo.Text = cardNo;
                }
                string deptCode = string.Empty;

                List <EntityPatientInfo> lstPat = null;
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    //lstPat = proxy.Service.GetPatient(cardNo, Viewer.rdoFlag.SelectedIndex + 1, deptCode);
                    lstPat = proxy.Service.GetPatient(cardNo, 2, deptCode);
                }
                if (lstPat == null || lstPat.Count == 0)
                {
                    DialogBox.Msg("查无此人.");
                    return;
                }
                if (lstPat.Count == 1)
                {
                    SetPatValue(lstPat[0]);
                }
                else if (lstPat.Count > 1)
                {
                    SetPatValue(lstPat[0]);
                }
            }
        }
예제 #5
0
        /// <summary>
        /// PopupForm
        /// </summary>
        /// <param name="vo"></param>
        void PopupForm(EntityEventDisplay vo)
        {
            if (vo == null)
            {
                vo       = new EntityEventDisplay();
                vo.isNew = true;
            }
            vo.eventId      = Viewer.EventId;
            vo.owerDeptCode = this.OwerDeptCode;
            vo.pubRoleId    = this.PubRoleId;
            frmEventEdit frm = new frmEventEdit(vo);

            frm.Text = Viewer.Text;

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                if (Function.Int(vo.rptId) > 0)
                {
                    string RoleEdit = proxy.Service.GetEventRoleEdit(GlobalLogin.objLogin.EmpNo);
                    string RoleDel  = proxy.Service.GetEventRoleDel(GlobalLogin.objLogin.EmpNo);
                    frm.blbiSave.Enabled = false;
                    if (RoleEdit != string.Empty || RoleDel != string.Empty)
                    {
                        frm.blbiSave.Enabled = true;
                    }
                }
            }

            frm.ShowDialog();
            if (frm.IsSave)
            {
                this.Query();
            }
        }
예제 #6
0
        /// <summary>
        /// GetXR
        /// </summary>
        /// <returns></returns>
        XtraReport GetXR(decimal rptId)
        {
            EntityOutpatientInterview Vo = null;

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                Vo = proxy.Service.GetInterviewVo(rptId);
            }
            EntityFormDesign       formVo  = null;
            EntityEmrPrintTemplate printVo = null;

            using (ProxyFormDesign proxy = new ProxyFormDesign())
            {
                proxy.Service.GetForm(64, out formVo);
                if (formVo == null)
                {
                    return(null);
                }
                printVo = proxy.Service.GetFormPrintTemplate(1, formVo.Printtemplateid.ToString());
            }
            DataTable printDataSource = FormTool.GetPrintDataTable(formVo.Layout, Vo.xmlData);

            if (printVo.templateFile != null && printVo.templateFile.Length > 0)
            {
                XtraReport   xr     = new XtraReport();
                MemoryStream stream = new MemoryStream(printVo.templateFile);
                xr.LoadLayout(stream);
                xr.DataSource = printDataSource;
                return(xr);
            }
            else
            {
                return(null);
            }
        }
예제 #7
0
        /// <summary>
        ///
        /// </summary>
        void Init()
        {
            string xmlData = string.Empty;

            try
            {
                uiHelper.BeginLoading(this);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    xmlData = proxy.Service.GetRegisterZrbygfk(this.RptId);
                    bool isChecked = (!string.IsNullOrEmpty(xmlData) ? false : true);
                }
                if (!string.IsNullOrEmpty(xmlData))
                {
                    SetXmlData(xmlData);
                }
                else
                {
                    SetXmlData(null);
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
예제 #8
0
        /// <summary>
        /// Stat
        /// </summary>
        void Stat()
        {
            if (Function.Datetime(this.StartDate) > Function.Datetime(this.EndDate))
            {
                DialogBox.Msg("开始时间不能大于结束时间。");
                this.dteStartDate.Focus();
                return;
            }

            try
            {
                uiHelper.BeginLoading(this);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    xr.DataSource = proxy.Service.GetStatEventLevel(this.StartDate, this.EndDate);
                    XRControl xc; //报表上的组件
                    xc = xr.FindControl("lblDate", true);
                    if (xc != null)
                    {
                        (xc as XRLabel).Text = " " + this.StartDate + " ~ " + this.EndDate;
                    }
                    xr.CreateDocument();
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
예제 #9
0
        ///<summary>
        /// GetDataSource
        ///</summary>
        #region
        void GetDataSource()
        {
            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                lstinfectSource    = proxy.Service.GetInfectionSiteSource();
                lstCausationSource = proxy.Service.GetCausationSource();
                lstDeptList        = proxy.Service.getDeptList();

                for (int i = 0; i < lstinfectSource.Count; i++)
                {
                    this.cboInfectionSite01.Properties.Items.Add(lstinfectSource[i]);
                    this.cboInfectionSite02.Properties.Items.Add(lstinfectSource[i]);
                }

                for (int i = 0; i < lstCausationSource.Count; i++)
                {
                    this.cboCausation.Properties.Items.Add(lstCausationSource[i]);
                }
                for (int i = 0; i < lstDeptList.Count; i++)
                {
                    this.cboPatDept.Properties.Items.Add(lstDeptList[i].deptName);
                    this.cboDept.Properties.Items.Add(lstDeptList[i].deptName);
                }
            }
        }
예제 #10
0
 /// <summary>
 /// 新报告
 /// </summary>
 public override void New()
 {
     using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
     {
         this.gvSampleBindingSource.DataSource = proxy.Service.GetPathogeny(-1);
     }
     ClearCntrValue(this.pcConent);
 }
예제 #11
0
        /// <summary>
        /// Init
        /// </summary>
        internal void Init()
        {
            try
            {
                Viewer.Location = new System.Drawing.Point(Viewer.Location.X, 0);
                Viewer.Height   = Screen.PrimaryScreen.WorkingArea.Height;
                uiHelper.BeginLoading(Viewer);

                #region 参数

                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    InterviewParmData = proxy.Service.GetInterviewParm();
                }
                #endregion

                this.formId = 64;

                if (this.formId > 0)
                {
                    using (ProxyFormDesign proxy = new ProxyFormDesign())
                    {
                        proxy.Service.GetForm((int)this.formId, out FormDesignVo);
                    }
                }
                if (FormDesignVo == null)
                {
                    FormDesignVo = new EntityFormDesign();
                }


                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    EntityOutpatientInterview vo = proxy.Service.GetInterviewVo(Function.Dec(this.InterviewVo.rptId));

                    if (vo != null)
                    {
                        #region patientInfo
                        Viewer.txtCardNo.Text = vo.patNo;
                        GetPatient();
                        #endregion
                        LoadForm(FormDesignVo.Layout, vo.xmlData);
                    }
                    else
                    {
                        Viewer.txtCardNo.Text = this.InterviewVo.patNo;
                        GetPatient();
                        LoadForm(FormDesignVo.Layout, null);
                    }
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
예제 #12
0
        /// <summary>
        /// SetPatValue
        /// </summary>
        #region
        void SetPatValue(EntityPatientInfo pat)
        {
            ClearCntrValue(this.pcConent);
            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                this.gvSampleBindingSource.DataSource = proxy.Service.GetPathogeny(-1);

            if (this.txtIpNo.Visible == true)
            {
                this.txtIpNo.Visible    = false;
                this.txtInpatid.Visible = true;
            }
            else
            {
                this.txtIpNo.Visible    = true;
                this.txtInpatid.Visible = false;
            }

            if (this.txtInpatid.Visible == false)
            {
                this.txtInpatid.Visible = true;
                this.txtIpNo.Visible    = true;
            }


            this.txtName.Tag     = pat;
            this.txtInpatid.Text = pat.ipNo;
            this.txtIpNo.Text    = pat.ipNo;
            this.txtName.Text    = pat.name;
            this.txtSex.Text     = pat.sexCH;
            this.cboPatDept.Text = pat.deptName;
            this.cboPatDept.Properties.Items.Clear();
            this.txtBedNo.Text         = pat.bedNo;
            this.txtAge.Text           = pat.age;
            this.txtDoctor.Text        = pat.doctName;
            this.dteInDate.Text        = pat.inDate.ToString();
            this.mmtDiagnose.Text      = pat.email;
            this.txtOperationName.Text = pat.upFlag;
            this.dteOperationDate.Text = pat.zip.ToString();

            if (pat.tremType == "0")
            {
                this.chk01.Checked = true;
            }
            else if (pat.tremType == "I")
            {
                this.chk02.Checked = true;
            }
            else if (pat.tremType == "II")
            {
                this.chk03.Checked = true;
            }
            else if (pat.tremType == "III")
            {
                this.chk04.Checked = true;
            }
        }
예제 #13
0
        /// <summary>
        /// Query
        /// </summary>
        void Query()
        {
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = this.dteStart.Text.Trim();
            string            endDate   = this.dteEnd.Text.Trim();

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
                {
                    DialogBox.Msg("开始时间不能大于结束时间。");
                    return;
                }

                dicParm.Add(Function.GetParm("reportDate", beginDate + "|" + endDate));
            }

            if (!string.IsNullOrEmpty(this.cboDept.Text))
            {
                dicParm.Add(Function.GetParm("deptCode", dicDept.FirstOrDefault(q => q.Value == this.cboDept.Text).Key.Trim()));
            }

            if (!string.IsNullOrEmpty(this.cboType.Text))
            {
                string typeCode = dicType.FirstOrDefault(q => q.Value == this.cboType.Text).Key.Trim();
                //string typeName = this.cboType.Text;
                dicParm.Add(Function.GetParm("TypeCode", dicType.FirstOrDefault(q => q.Value == this.cboType.Text).Key.Trim()));
            }

            if (!string.IsNullOrEmpty(this.cboPart.Text))
            {
                string partCode = this.cboPart.Text;
                dicParm.Add(Function.GetParm("PartCode", partCode));
            }

            if (!string.IsNullOrEmpty(this.cboFQ.Text))
            {
                string fqCode = this.cboFQ.Text;
                dicParm.Add(Function.GetParm("FqCode", fqCode));
            }

            try
            {
                uiHelper.BeginLoading(this);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    dateScope = beginDate + " ~ " + endDate;
                    this.gcData.DataSource = proxy.Service.GetStatSkinEventInstrument(dicParm);
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
예제 #14
0
        /// <summary>
        /// Print
        /// </summary>
        internal void Print()
        {
            frmPrintDocumentSimple frm = new frmPrintDocumentSimple(GetXR());

            frm.ShowDialog();

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                proxy.Service.UpdateZrbbgPrintFlg(Function.Dec(this.ZrbbgDisplayVo.rptId));
            }
        }
예제 #15
0
        /// <summary>
        ///
        /// </summary>
        internal void Query()
        {
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = Viewer.dteStart.Text.Trim();
            string            endDate   = Viewer.dteEnd.Text.Trim();

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
                {
                    DialogBox.Msg("开始时间不能大于结束时间。");
                    return;
                }

                dicParm.Add(Function.GetParm("reportDate", beginDate + "|" + endDate));
            }

            if (!string.IsNullOrEmpty(Viewer.ucDept.DeptName) && !string.IsNullOrEmpty(Viewer.ucDept.DeptVo.deptCode))
            {
                dicParm.Add(Function.GetParm("deptCode", Viewer.ucDept.DeptVo.deptCode));
            }

            if (!string.IsNullOrEmpty(Viewer.lueReporter.Text))
            {
                dicParm.Add(Function.GetParm("reporter", Viewer.lueReporter.Text));
            }

            if (!string.IsNullOrEmpty(Viewer.cboEventType.Text))
            {
                string typeCode = dicEventType.FirstOrDefault(q => q.Value == Viewer.cboEventType.Text).Key.Trim();
                dicParm.Add(Function.GetParm("eventId", dicEventType.FirstOrDefault(q => q.Value == Viewer.cboEventType.Text).Key.Trim()));
            }

            if (!string.IsNullOrEmpty(Viewer.cboLevel.Text))
            {
                dicParm.Add(Function.GetParm("level", Viewer.cboLevel.Text));
            }

            try
            {
                uiHelper.BeginLoading(Viewer);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    dateScope  = beginDate + " ~ " + endDate;
                    datasource = proxy.Service.GetEventListAll(dicParm);
                    Viewer.gcReport.DataSource = datasource;
                    Viewer.lblTip.Text         = "事件数:" + datasource.Count.ToString();
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
예제 #16
0
        /// <summary>
        /// EditRpt
        /// </summary>
        #region
        void EditRpt()
        {
            EntityPatientInfo pat = new EntityPatientInfo();

            vo = GetRowObject();
            decimal rptId = vo.rptId;

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                this.gvSampleBindingSource.DataSource = proxy.Service.GetPathogeny(rptId);
            }

            this.txtAge.Text     = vo.patAge;
            this.txtBedNo.Text   = vo.bedNo;
            this.txtInpatid.Text = vo.inpatNo;
            this.txtIpNo.Text    = vo.inpatNo;
            this.cboPatDept.Text = vo.deptName;
            this.cboPatDept.Properties.Items.Clear();
            this.txtName.Text     = vo.patName;
            this.txtSex.Text      = vo.patSex;
            this.dteInDate.Text   = vo.dateIn.ToString();
            this.mmtDiagnose.Text = vo.inDiagnosis;
            if (vo.incisionType == 1)
            {
                this.chk01.Checked = true;
            }
            if (vo.incisionType == 2)
            {
                this.chk02.Checked = true;
            }
            if (vo.incisionType == 3)
            {
                this.chk03.Checked = true;
            }
            if (vo.incisionType == 4)
            {
                this.chk04.Checked = true;
            }

            this.cboInfectionSite01.Text = vo.infectionSite01;
            this.cboInfectionSite01.Properties.Items.Clear();
            this.cboInfectionSite02.Text = vo.infectionSite02;
            this.cboInfectionSite02.Properties.Items.Clear();
            this.dteInfection01.Text = vo.infectionDate01.ToString();
            this.dteInfection02.Text = vo.infectionDate02.ToString();
            this.cboCausation.Text   = vo.infectionReason;
            this.cboCausation.Properties.Items.Clear();
            this.txtDoctor.Text        = vo.doctName;
            this.dteOperationDate.Text = vo.operationDate.ToString();
            this.txtOperationName.Text = vo.operationName;
            this.txtName.Tag           = pat;
        }
예제 #17
0
        /// <summary>
        /// Init
        /// </summary>
        void Init()
        {
            this.rptId = 15;
            this.cboDept.Properties.Items.Add("");
            this.cboType.Properties.Items.Add("");

            this.cboPart.Properties.Items.Add("");
            this.cboPart.Properties.Items.Add("骶尾椎骨处");
            this.cboPart.Properties.Items.Add("坐骨处");
            this.cboPart.Properties.Items.Add("股骨粗隆处");
            this.cboPart.Properties.Items.Add("跟骨处");
            this.cboPart.Properties.Items.Add("足踝处");
            this.cboPart.Properties.Items.Add("肩胛处");
            this.cboPart.Properties.Items.Add("枕骨处");
            this.cboPart.Properties.Items.Add("肘部");
            this.cboPart.Properties.Items.Add("多部位");
            this.cboPart.Properties.Items.Add("其它部位");

            this.cboFQ.Properties.Items.Add("");
            this.cboFQ.Properties.Items.Add("1期");
            this.cboFQ.Properties.Items.Add("2期");
            this.cboFQ.Properties.Items.Add("3期");
            this.cboFQ.Properties.Items.Add("4期");
            this.cboFQ.Properties.Items.Add("无法分期");
            this.cboFQ.Properties.Items.Add("深部组织损伤");

            DateTime dtmNow = DateTime.Now;

            this.dteStart.DateTime = new DateTime(dtmNow.Year, dtmNow.Month, 1);
            this.dteEnd.DateTime   = dtmNow;

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                dicDept = proxy.Service.GetAdversDept();
                if (dicDept != null)
                {
                    foreach (var dic in dicDept)
                    {
                        this.cboDept.Properties.Items.Add(dic.Value);
                    }
                }

                dicType = proxy.Service.GetAdversSkinType();
                if (dicType != null)
                {
                    foreach (var dic in dicType)
                    {
                        this.cboType.Properties.Items.Add(dic.Value);
                    }
                }
            }
        }
예제 #18
0
        /// <summary>
        /// Init
        /// </summary>
        internal void Init()
        {
            Viewer.cboEventType.Properties.Items.Add("");
            Viewer.cboLevel.Properties.Items.AddRange(new object[] { "", "I", "II", "III", "IV" });

            this.Viewer.lueReporter.Properties.SetSize();
            this.Viewer.lueReporter.Properties.PopupWidth          = 155;
            this.Viewer.lueReporter.Properties.PopupHeight         = 250;
            this.Viewer.lueReporter.Properties.ValueColumn         = EntityCodeOperator.Columns.operCode;
            this.Viewer.lueReporter.Properties.DisplayColumn       = EntityCodeOperator.Columns.operName;
            this.Viewer.lueReporter.Properties.Essential           = false;
            this.Viewer.lueReporter.Properties.IsShowColumnHeaders = true;
            this.Viewer.lueReporter.Properties.ColumnWidth.Add(EntityCodeOperator.Columns.operCode, 70);
            this.Viewer.lueReporter.Properties.ColumnWidth.Add(EntityCodeOperator.Columns.operName, 85);
            this.Viewer.lueReporter.Properties.ColumnHeaders.Add(EntityCodeOperator.Columns.operCode, "编码");
            this.Viewer.lueReporter.Properties.ColumnHeaders.Add(EntityCodeOperator.Columns.operName, "名称");
            this.Viewer.lueReporter.Properties.ShowColumn   = EntityCodeOperator.Columns.operCode + "|" + EntityCodeOperator.Columns.operName;
            this.Viewer.lueReporter.Properties.FilterColumn = string.Concat(new string[]
            {
                EntityCodeOperator.Columns.operCode,
                "|",
                EntityCodeOperator.Columns.operName,
                "|",
                EntityCodeOperator.Columns.pyCode,
                "|",
                EntityCodeOperator.Columns.wbCode
            });
            this.Viewer.lueReporter.Properties.IsUseShowColumn = true;

            if (GlobalDic.DataSourceEmployee != null && GlobalDic.DataSourceEmployee.Count > 0)
            {
                this.Viewer.lueReporter.Properties.DataSource = GlobalDic.DataSourceEmployee.ToArray();
            }
            this.Viewer.lueReporter.Properties.SetSize();

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                dicEventType = proxy.Service.GetEventDicparm(29);
                if (dicEventType != null)
                {
                    foreach (var dic in dicEventType)
                    {
                        Viewer.cboEventType.Properties.Items.Add(dic.Value);
                    }
                }
            }

            DateTime dtmNow = DateTime.Now;

            Viewer.dteStart.DateTime = new DateTime(dtmNow.Year, dtmNow.Month, 1);
            Viewer.dteEnd.DateTime   = dtmNow;
        }
예제 #19
0
        /// <summary>
        /// Print
        /// </summary>
        internal void Print()
        {
            frmPrintDocumentSimple frm = new frmPrintDocumentSimple(GetXR());

            frm.ShowDialog();

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                if (GlobalLogin.objLogin.lstRoleID.Contains("34"))
                {
                    proxy.Service.UpdateZrbbgPrintFlg(Function.Dec(this.ZrbbgDisplayVo.rptId));
                }
            }
        }
예제 #20
0
        //#region Query
        ///// <summary>
        /////
        ///// </summary>
        //internal void Query()
        //{
        //    List<EntityParm> dicParm = new List<EntityParm>();
        //    string beginDate = Viewer.dteDateStart.Text.Trim();
        //    string endDate = Viewer.dteDateEnd.Text.Trim();
        //    if (beginDate != string.Empty && endDate != string.Empty)
        //    {
        //        if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
        //        {
        //            DialogBox.Msg("开始时间不能大于结束时间。");
        //            return;
        //        }
        //        dicParm.Add(Function.GetParm("interviewDate", beginDate + "|" + endDate));
        //    }

        //    if (Viewer.txtCardNo.Text.Trim() != string.Empty)
        //    {
        //        dicParm.Add(Function.GetParm("cardNo", Viewer.txtCardNo.Text.Trim()));
        //    }
        //    if (Viewer.txtPatName.Text.Trim() != string.Empty)
        //    {
        //        dicParm.Add(Function.GetParm("patName", Viewer.txtPatName.Text.Trim()));
        //    }

        //    try
        //    {
        //        uiHelper.BeginLoading(Viewer);
        //        if (dicParm.Count > 0)
        //        {
        //            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
        //            {
        //                List<EntityOutpatientInterview> dataSource = proxy.Service.GetInterviewList(dicParm);
        //                Viewer.gcReport.DataSource = dataSource;
        //            }
        //        }
        //        else
        //            DialogBox.Msg("请输入查询条件。");
        //    }
        //    finally
        //    {
        //        uiHelper.CloseLoading(Viewer);
        //    }
        //}
        //#endregion

        #region Query
        /// <summary>
        ///
        /// </summary>
        internal void Query()
        {
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = Viewer.dteDateStart.Text.Trim();
            string            endDate   = Viewer.dteDateEnd.Text.Trim();

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
                {
                    DialogBox.Msg("开始时间不能大于结束时间。");
                    return;
                }
                dicParm.Add(Function.GetParm("outDate", beginDate + "|" + endDate));
            }

            if (Viewer.txtCardNo.Text.Trim() != string.Empty)
            {
                dicParm.Add(Function.GetParm("cardNo", Viewer.txtCardNo.Text.Trim()));
            }
            if (Viewer.txtPatName.Text.Trim() != string.Empty)
            {
                dicParm.Add(Function.GetParm("patName", Viewer.txtPatName.Text.Trim()));
            }

            try
            {
                uiHelper.BeginLoading(Viewer);
                if (dicParm.Count > 0)
                {
                    using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                    {
                        List <EntityOutpatientInterview> dataSource = proxy.Service.GetPatInterviewInfo(dicParm);
                        Viewer.gcReport.DataSource = dataSource;
                    }
                }
                else
                {
                    DialogBox.Msg("请输入查询条件。");
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
예제 #21
0
 private void blbiDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (DialogBox.Msg("确定是否删除当前记录??", MessageBoxIcon.Question) == DialogResult.Yes)
     {
         using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
         {
             if (proxy.Service.RegisterZrbygfk(this.RptId, null) > 0)
             {
                 this.IsSave = true;
                 this.SetXmlData(string.Empty);
                 DialogBox.Msg("删除记录成功!");
             }
             else
             {
                 DialogBox.Msg("删除记录失败。");
             }
         }
     }
 }
예제 #22
0
        /// <summary>
        /// Query
        /// </summary>
        internal void Query()
        {
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = this.dteStart.Text.Trim();
            string            endDate   = this.dteEnd.Text.Trim();

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
                {
                    DialogBox.Msg("开始时间不能大于结束时间。");
                    return;
                }
                dicParm.Add(Function.GetParm("reportDate", beginDate + "|" + endDate));
            }
            if (this.ucDept.DeptVo != null && !string.IsNullOrEmpty(this.ucDept.DeptVo.deptCode))
            {
                dicParm.Add(Function.GetParm("deptCode", this.ucDept.DeptVo.deptCode));
            }

            try
            {
                uiHelper.BeginLoading(this);
                if (dicParm.Count > 0)
                {
                    using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                    {
                        List <EntityOccupationexp> dataSource = proxy.Service.GetStatOccupationexp(dicParm);;
                        this.gcData.DataSource = dataSource;
                    }
                }
                else
                {
                    DialogBox.Msg("请输入查询条件。");
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
예제 #23
0
        /// <summary>
        /// GetPatient
        /// </summary>
        internal void GetPatient()
        {
            string cardNo = Viewer.txtCardNo.Text.Trim();

            if (cardNo != string.Empty)
            {
                if (Viewer.rdoFlag.SelectedIndex == 0 && cardNo.Length < 10)
                {
                    cardNo = cardNo.PadLeft(10, '0');
                    Viewer.txtCardNo.Text = cardNo;
                }
                string deptCode = string.Empty;
                if (this.ZrbbgDisplayVo.pubRoleId != string.Empty && GlobalLogin.objLogin.lstRoleID.IndexOf(this.ZrbbgDisplayVo.pubRoleId) >= 0)
                {
                }
                else
                {
                    deptCode = this.ZrbbgDisplayVo.owerDeptCode;
                }
                List <EntityPatientInfo> lstPat = null;
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    lstPat = proxy.Service.GetPatient(cardNo, Viewer.rdoFlag.SelectedIndex + 1, deptCode);
                }
                if (lstPat == null || lstPat.Count == 0)
                {
                    DialogBox.Msg("查无此人.");
                    return;
                }
                if (lstPat.Count == 1)
                {
                    SetPatValue(lstPat[0]);
                }
                else if (lstPat.Count > 1)
                {
                    SetPatValue(lstPat[0]);
                }
            }
        }
예제 #24
0
        /// <summary>
        /// GetPatient  获取病人信息
        /// </summary>
        #region
        internal void GetPatient(string inpatId)
        {
            List <EntityPatientInfo> lstPat = null;

            using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
            {
                lstPat = proxy.Service.GetPatInfo(inpatId);
            }
            if (lstPat == null || lstPat.Count == 0)
            {
                DialogBox.Msg("查无此人.");
                return;
            }
            if (lstPat.Count == 1)
            {
                SetPatValue(lstPat[0]);
            }
            else if (lstPat.Count > 1)
            {
                SetPatValue(lstPat[0]);
            }
        }
예제 #25
0
        /// <summary>
        /// Stat
        /// </summary>
        void Stat()
        {
            #region 条件
            if (this.dteStart.DateTime.Date > this.dteEnd.DateTime.Date)
            {
                DialogBox.Msg("开始时间不能大于结束时间。");
                this.dteStart.Focus();
                return;
            }
            string startDate = this.dteStart.Text;
            string endDate   = this.dteEnd.Text;
            string deptCode  = string.Empty;
            if (this.ucDept.DeptVo != null && !string.IsNullOrEmpty(this.ucDept.DeptName) && !string.IsNullOrEmpty(this.ucDept.DeptVo.deptCode))
            {
                deptCode = this.ucDept.DeptVo.deptCode;
            }
            #endregion

            try
            {
                uiHelper.BeginLoading(this);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    xr.DataSource = proxy.Service.GetStatInstrument(startDate, endDate, deptCode);
                    XRControl xc; //报表上的组件
                    xc = xr.FindControl("lblDate", true);
                    if (xc != null)
                    {
                        (xc as XRLabel).Text = " " + startDate + " ~ " + endDate;
                    }
                    xr.CreateDocument();
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }
예제 #26
0
 private void blbiSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         uiHelper.BeginLoading(this);
         using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
         {
             if (proxy.Service.RegisterZrbygfk(this.RptId, GetXmlData()) > 0)
             {
                 this.IsSave = true;
                 DialogBox.Msg("保存成功!");
             }
             else
             {
                 DialogBox.Msg("保存失败。");
             }
         }
     }
     finally
     {
         uiHelper.CloseLoading(this);
     }
 }
예제 #27
0
        /// <summary>
        /// DelEvent
        /// </summary>
        internal void DelInterview()
        {
            EntityOutpatientInterview vo = GetRowObject();

            if (vo != null && Function.Dec(vo.rptId) > 0)
            {
                if (DialogBox.Msg("确定是否删除当前记录??", MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                    {
                        if (proxy.Service.DelInterview(Function.Dec(vo.rptId)) > 0)
                        {
                            DialogBox.Msg("删除记录成功!");
                            this.Query();
                        }
                        else
                        {
                            DialogBox.Msg("删除记录失败。");
                        }
                    }
                }
            }
        }
예제 #28
0
        /// <summary>
        /// 打印
        /// </summary>
        public override void Preview()
        {
            InitXr();

            try
            {
                uiHelper.BeginLoading(this);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    xr.DataSource = proxy.Service.GetXrDataSource(vo.rptId);
                    xr.CreateDocument();
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }

            if (xr != null && xr.DataSource != null)
            {
                xr.Print();
            }
        }
예제 #29
0
        /// <summary>
        /// Save
        /// </summary>
        internal void Save()
        {
            if (Viewer.txtPatName.Tag == null)
            {
                DialogBox.Msg("请先调出患者信息。");
                return;
            }
            EntityPatientInfo patVo = Viewer.txtPatName.Tag as EntityPatientInfo;

            try
            {
                uiHelper.BeginLoading(Viewer);
                string         fieldName = string.Empty;
                DateTime       dtmNow    = Utils.ServerTime();
                EntityRptZrbbg vo        = new EntityRptZrbbg();

                vo.xmlData = Viewer.showPanelForm.XmlData();
                if (Viewer.showPanelForm.IsAllowSave == false)
                {
                    DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + Viewer.showPanelForm.HintInfo);
                    return;
                }
                vo.rptId      = Function.Dec(this.ZrbbgDisplayVo.rptId);
                vo.reportId   = this.ZrbbgDisplayVo.reportId;
                vo.reportDate = this.ZrbbgDisplayVo.reportDate;
                vo.bcDate     = this.ZrbbgDisplayVo.bcDate;
                vo.skDate     = this.ZrbbgDisplayVo.skDate;
                //vo.contactAddr = this.ZrbbgDisplayVo.contactAddr;

                // 报告时间
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "reportDate"))
                {
                    string reportDate = string.Empty;
                    fieldName  = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "reportDate").keyValue;
                    reportDate = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (string.IsNullOrEmpty(reportDate) && string.IsNullOrEmpty(vo.reportDate))
                    {
                        vo.reportDate = dtmNow.ToString("yyyy-MM-dd HH:mm");
                    }
                    else if (!string.IsNullOrEmpty(reportDate))
                    {
                        vo.reportDate = reportDate;
                    }
                }
                else
                {
                    vo.reportDate = dtmNow.ToString("yyyy-MM-dd HH:mm");
                }

                // 编号
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "registerCode"))
                {
                    fieldName       = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "registerCode").keyValue;
                    vo.registerCode = Viewer.showPanelForm.GetItemInfo(fieldName);
                }
                else
                {
                    vo.registerCode = Function.Datetime(vo.reportDate).ToString("MMdd") + patVo.pid;
                }
                // 报告人
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "reportOperCode"))
                {
                    fieldName         = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "reportOperCode").keyValue;
                    vo.reportOperName = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (GlobalDic.DataSourceEmployee.Any(t => t.operName == vo.reportOperName))
                    {
                        vo.reportOperCode = GlobalDic.DataSourceEmployee.FirstOrDefault(t => t.operName == vo.reportOperName).operCode;
                    }
                }
                else
                {
                    vo.reportOperCode = GlobalLogin.objLogin.EmpNo;
                    vo.reportOperName = GlobalLogin.objLogin.EmpName;
                }

                // 上报科室
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "reportDept"))
                {
                    fieldName = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "reportDept").keyValue;
                    string reportDeptName = Viewer.showPanelForm.GetItemInfo(fieldName);
                    using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                    {
                        vo.reportDeptCode = proxy.Service.GetDeptCode(reportDeptName);
                    }
                }
                else
                {
                    vo.reportDeptCode = patVo.deptCode;
                }

                // 户籍地址
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "fimalyAddr"))
                {
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "fimalyAddr");
                    // 计算类
                    if (parm.flag == 3)
                    {
                        string   addr       = string.Empty;
                        string[] fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            addr += Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (fieldSub == "ADDR1" && !string.IsNullOrEmpty(addr))
                            {
                                vo.familyAddr += addr + "省";
                            }
                            if (fieldSub == "ADDR2" && !string.IsNullOrEmpty(addr))
                            {
                                vo.familyAddr += addr + "市";
                            }
                            if (fieldSub == "ADDR3" && !string.IsNullOrEmpty(addr))
                            {
                                vo.familyAddr += addr + "县";
                            }
                            if (fieldSub == "ADDR4" && !string.IsNullOrEmpty(addr))
                            {
                                vo.familyAddr += addr + "镇";
                            }
                            if (fieldSub == "ADDR5" && !string.IsNullOrEmpty(addr))
                            {
                                vo.familyAddr += addr + "村";
                            }
                            if (fieldSub == "ADDR6" && !string.IsNullOrEmpty(addr))
                            {
                                vo.familyAddr += addr;
                            }
                            addr = string.Empty;
                        }
                    }
                    else if (parm.flag == 1)
                    {
                        string[] fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            vo.familyAddr += Viewer.showPanelForm.GetItemInfo(fieldSub);
                        }
                    }
                    else
                    {
                        fieldName     = parm.keyValue;
                        vo.familyAddr = Viewer.showPanelForm.GetItemInfo(fieldName);
                    }
                }

                // 现地址
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "contactAddr"))
                {
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "contactAddr");
                    // 计算类
                    if (parm.flag == 3)
                    {
                        string   addr       = string.Empty;
                        string[] fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            addr += Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (fieldSub == "ADDR1" && !string.IsNullOrEmpty(addr))
                            {
                                vo.contactAddr += addr + "省";
                            }
                            if (fieldSub == "ADDR2" && !string.IsNullOrEmpty(addr))
                            {
                                vo.contactAddr += addr + "市";
                            }
                            if (fieldSub == "ADDR3" && !string.IsNullOrEmpty(addr))
                            {
                                vo.contactAddr += addr + "县";
                            }
                            if (fieldSub == "ADDR4" && !string.IsNullOrEmpty(addr))
                            {
                                vo.contactAddr += addr + "镇";
                            }
                            if (fieldSub == "ADDR5" && !string.IsNullOrEmpty(addr))
                            {
                                vo.contactAddr += addr + "村";
                            }
                            if (fieldSub == "ADDR6" && !string.IsNullOrEmpty(addr))
                            {
                                vo.contactAddr += addr;
                            }
                            addr = string.Empty;
                        }
                    }
                    else if (parm.flag == 1)
                    {
                        string[] fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            vo.contactAddr += Viewer.showPanelForm.GetItemInfo(fieldSub);
                        }
                    }
                    else
                    {
                        fieldName      = parm.keyValue;
                        vo.contactAddr = Viewer.showPanelForm.GetItemInfo(fieldName);
                    }
                }

                // 诊断病名
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "diagnoseName"))
                {
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "diagnoseName");
                    // 计算类
                    if (parm.flag == 2)
                    {
                        string[] fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            if (fieldSub.Contains("|"))
                            {
                                string[] str = fieldSub.Split('|');
                                string   flg = Viewer.showPanelForm.GetItemInfo(str[0]);
                                if (flg == "1")
                                {
                                    vo.diagnoseName += str[1] + "、";
                                }
                            }
                            else
                            {
                                vo.diagnoseName += Viewer.showPanelForm.GetItemInfo(fieldSub);
                            }
                        }
                        if (!string.IsNullOrEmpty(vo.diagnoseName))
                        {
                            vo.diagnoseName = vo.diagnoseName.TrimEnd('、');
                        }
                        else
                        {
                            DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + "诊断病名必须勾选或填写");
                            return;
                        }
                    }
                    else
                    {
                        fieldName       = parm.keyValue;
                        vo.diagnoseName = Viewer.showPanelForm.GetItemInfo(fieldName);
                    }
                }

                // 诊断日期
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "diagnoseDate"))
                {
                    fieldName       = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "diagnoseDate").keyValue;
                    vo.diagnoseDate = Viewer.showPanelForm.GetItemInfo(fieldName);

                    if (vo.diagnoseDate.IndexOf("00:00") > 0)
                    {
                        DialogBox.Msg("诊断日期时间不能为 00:00,请检查。项目:\r\n");
                        return;
                    }
                }

                // 发病日期
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "infectiveDate"))
                {
                    fieldName        = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "infectiveDate").keyValue;
                    vo.infectiveDate = Viewer.showPanelForm.GetItemInfo(fieldName);
                }

                // 收卡日期
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "skDate"))
                {
                    fieldName = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "skDate").keyValue;
                    vo.skDate = Viewer.showPanelForm.GetItemInfo(fieldName);
                }

                // 网报日期
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "bcDate"))
                {
                    string bcDate = string.Empty;
                    fieldName = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "bcDate").keyValue;
                    bcDate    = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (string.IsNullOrEmpty(bcDate) && string.IsNullOrEmpty(vo.bcDate))
                    {
                        vo.bcDate = dtmNow.ToString("yyyy-MM-dd HH:mm");
                    }
                    else if (!string.IsNullOrEmpty(bcDate))
                    {
                        vo.bcDate = bcDate;
                    }
                }
                else
                {
                    vo.bcDate = dtmNow.ToString("yyyy-MM-dd HH:mm");
                }


                // 收卡日期
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "skDate"))
                {
                    string skDate = string.Empty;
                    fieldName = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "skDate").keyValue;
                    skDate    = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (string.IsNullOrEmpty(skDate) && string.IsNullOrEmpty(vo.skDate))
                    {
                        vo.skDate = dtmNow.ToString("yyyy-MM-dd HH:mm");
                    }
                    else if (!string.IsNullOrEmpty(skDate))
                    {
                        vo.skDate = skDate;
                    }
                }
                else
                {
                    vo.bcDate = dtmNow.ToString("yyyy-MM-dd HH:mm");
                }

                // 家长姓名
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "parentName"))
                {
                    fieldName     = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "parentName").keyValue;
                    vo.parentName = Viewer.showPanelForm.GetItemInfo(fieldName);
                }

                // 有效证件号
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "idCard"))
                {
                    fieldName = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "idCard").keyValue;
                    vo.idCard = Viewer.showPanelForm.GetItemInfo(fieldName);
                }

                // 备注
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "bz"))
                {
                    fieldName = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "bz").keyValue;
                    vo.BZ     = Viewer.showPanelForm.GetItemInfo(fieldName);
                }

                // 人群分类
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "rqfl"))
                {
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "rqfl");
                    // 计算类
                    if (parm.flag == 2)
                    {
                        string[] fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            string[] str = fieldSub.Split('|');
                            string   flg = Viewer.showPanelForm.GetItemInfo(str[0]);
                            if (flg == "1")
                            {
                                vo.RQFL += str[1] + "、";
                            }
                        }
                        if (!string.IsNullOrEmpty(vo.RQFL))
                        {
                            vo.RQFL = vo.RQFL.TrimEnd('、');
                        }
                    }
                    else
                    {
                        fieldName = parm.keyValue;
                        vo.RQFL   = Viewer.showPanelForm.GetItemInfo(fieldName);
                    }

                    if (string.IsNullOrEmpty(vo.RQFL))
                    {
                        DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + "人群分类或职业不能为空");
                        return;
                    }
                }

                // 必填项目
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "required"))
                {
                    EntityRptZrbbgParm parm     = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "required");
                    string             required = string.Empty;
                    bool     flg = false;
                    string[] fieldNames;
                    // 计算类
                    if (parm.flag != 0)
                    {
                        fieldNames = parm.keyValue.Split('+');
                        for (int i = 0; i < parm.flag; i++)
                        {
                            required = Viewer.showPanelForm.GetItemInfo(fieldNames[i]);
                            if (required == "1")
                            {
                                flg = true;
                                break;
                            }
                        }

                        if (flg)
                        {
                            string str       = string.Empty;
                            string strRequer = string.Empty;
                            for (int i = Function.Int(parm.flag); i < fieldNames.Length; i++)
                            {
                                string[] strNames = fieldNames[i].Split('|');
                                str = Viewer.showPanelForm.GetItemInfo(strNames[0]);
                                if (string.IsNullOrEmpty(str))
                                {
                                    strRequer += strNames[1] + Environment.NewLine;
                                }
                            }

                            if (!string.IsNullOrEmpty(strRequer))
                            {
                                DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + strRequer);
                                return;
                            }
                        }
                    }
                }

                //肿瘤诊断依据必填
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "zdyj"))
                {
                    EntityRptZrbbgParm parm     = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "zdyj");
                    string             required = string.Empty;
                    bool     flg = false;
                    string[] fieldNames;
                    if (parm.flag != 0)
                    {
                        fieldNames = parm.keyValue.Split('+');

                        foreach (string fieldSub in fieldNames)
                        {
                            required = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (required == "1")
                            {
                                flg = true;
                                break;
                            }
                        }
                    }

                    if (!flg)
                    {
                        DialogBox.Msg("存在必填项目没有处理,诊断依据必选。");
                        return;
                    }
                }


                // 提示
                string lbTips = string.Empty;
                string mdTips = string.Empty;
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "lbTips"))
                {
                    EntityRptZrbbgParm parm       = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "lbTips");
                    string             lbFlg      = string.Empty;
                    string[]           fieldNames = parm.keyValue.Split('+');
                    if (parm.flag == 1)
                    {
                        foreach (string fieldSub in fieldNames)
                        {
                            lbFlg = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (lbFlg == "1")
                            {
                                break;
                            }
                        }
                    }
                    else
                    {
                        fieldName = parm.keyValue;
                        lbFlg     = Viewer.showPanelForm.GetItemInfo(fieldName);
                    }

                    if (lbFlg == "1")
                    {
                        lbTips = "请填写\r\n传染病报告卡艾滋病性病附卡。 \r\n";
                    }
                }

                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "mdTips"))
                {
                    EntityRptZrbbgParm parm       = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "mdTips");
                    string             mdFlg      = string.Empty;
                    string[]           fieldNames = parm.keyValue.Split('+');
                    if (parm.flag == 1)
                    {
                        foreach (string fieldSub in fieldNames)
                        {
                            mdFlg = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (mdFlg == "1")
                            {
                                break;
                            }
                        }
                    }
                    else
                    {
                        fieldName = parm.keyValue;
                        mdFlg     = Viewer.showPanelForm.GetItemInfo(fieldName);
                    }

                    if (mdFlg == "1")
                    {
                        mdTips = "传染病报告卡(梅毒)附卡。 \r\n";
                    }
                }
                if (!string.IsNullOrEmpty(lbTips) || !string.IsNullOrEmpty(mdTips))
                {
                    DialogBox.Msg(lbTips + mdTips);
                }

                //性别
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "sex"))
                {
                    string[]           fieldNames;
                    string             sex  = string.Empty;
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "sex");
                    if (parm.flag != 0)
                    {
                        fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            sex = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (sex != "0")
                            {
                                break;
                            }
                        }

                        if (sex == "0")
                        {
                            DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + "性别");
                            return;
                        }
                    }
                }
                //TRUST/RPR
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "TRUST/RPR"))
                {
                    string[]           fieldNames;
                    string             tFlg = string.Empty;
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "TRUST/RPR");
                    if (parm.flag != 0)
                    {
                        fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            tFlg = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (tFlg != "0")
                            {
                                break;
                            }
                        }

                        if (tFlg == "0")
                        {
                            DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + "TRUST/RPR");
                            return;
                        }
                    }
                }
                //TPPA/TPHA
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "TPPA/TPHA"))
                {
                    string[]           fieldNames;
                    string             tFlg = string.Empty;
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "TPPA/TPHA");
                    if (parm.flag != 0)
                    {
                        fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            tFlg = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (tFlg != "0")
                            {
                                break;
                            }
                        }

                        if (tFlg == "0")
                        {
                            DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + "TPPA/TPHA");
                            return;
                        }
                    }
                }

                //传染来源
                if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "zrly"))
                {
                    string[]           fieldNames;
                    string             zrly = string.Empty;
                    EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "zrly");
                    if (parm.flag != 0)
                    {
                        fieldNames = parm.keyValue.Split('+');
                        foreach (string fieldSub in fieldNames)
                        {
                            zrly = Viewer.showPanelForm.GetItemInfo(fieldSub);
                            if (zrly != "0")
                            {
                                break;
                            }
                        }

                        if (zrly == "0")
                        {
                            DialogBox.Msg("存在必填项目没有处理,请检查。项目:\r\n" + "传染来源");
                            return;
                        }
                    }
                }

                if (!string.IsNullOrEmpty(patVo.ipNo) && patVo.ipTimes > 0)
                {
                    vo.patNo = patVo.ipNo;
                }
                else
                {
                    vo.patNo = patVo.cardNo;
                }
                vo.patName = patVo.name;
                vo.patSex  = patVo.sex;
                if (!string.IsNullOrEmpty(patVo.birth))
                {
                    vo.birthday = Function.Datetime(patVo.birth);
                }
                vo.contactTel = patVo.contTel;
                //vo.deptCode = patVo.deptCode;
                vo.xmlData    = Viewer.showPanelForm.XmlData();
                vo.formId     = this.formId;
                vo.operCode   = GlobalLogin.objLogin.EmpNo;
                vo.recordDate = dtmNow;
                vo.status     = 1;
                vo.patType    = Viewer.rdoFlag.SelectedIndex + 1;
                string reqNo = patVo.clNo;

                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    decimal rptId = 0;
                    if (proxy.Service.SaveZrbbg(vo, out rptId) > 0)
                    {
                        Viewer.IsSave = true;
                        if (this.ZrbbgDisplayVo.isNew)
                        {
                            this.ZrbbgDisplayVo.rptId = rptId;
                        }
                        Viewer.txtCardNo.Properties.ReadOnly = true;

                        //病毒性肝炎

                        if (ZrbbgParmData.Any(t => t.reportId == vo.reportId && t.keyId == "ygfk"))
                        {
                            string[]           fieldNames;
                            EntityRptZrbbgParm parm = ZrbbgParmData.FirstOrDefault(t => t.reportId == vo.reportId && t.keyId == "ygfk");
                            string             ygfk = string.Empty;
                            if (parm.flag != 0)
                            {
                                fieldNames = parm.keyValue.Split('+');
                                foreach (string fieldSub in fieldNames)
                                {
                                    ygfk = Viewer.showPanelForm.GetItemInfo(fieldSub);
                                    if (ygfk != "0")
                                    {
                                        frmZrbygfk frm = new frmZrbygfk(vo.rptId);
                                        frm.ShowDialog();
                                        break;
                                    }
                                }
                                if (ygfk == "0")
                                {
                                    proxy.Service.RegisterZrbygfk(vo.rptId, null);
                                }
                            }
                        }

                        DialogBox.Msg("数据保存成功!");
                    }
                    else
                    {
                        DialogBox.Msg("数据保存失败。");
                    }
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }
예제 #30
0
        /// <summary>
        /// Query
        /// </summary>
        void Query()
        {
            List <EntityParm> dicParm   = new List <EntityParm>();
            string            beginDate = this.dteStart.Text.Trim();
            string            endDate   = this.dteEnd.Text.Trim();

            if (beginDate != string.Empty && endDate != string.Empty)
            {
                if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00"))
                {
                    DialogBox.Msg("开始时间不能大于结束时间。");
                    return;
                }

                dicParm.Add(Function.GetParm("reportDate", beginDate + "|" + endDate));
            }

            if (!string.IsNullOrEmpty(this.cboDept.Text))
            {
                dicParm.Add(Function.GetParm("deptCode", dicDept.FirstOrDefault(q => q.Value == this.cboDept.Text).Key.Trim()));
            }

            if (!string.IsNullOrEmpty(this.cboType.Text))
            {
                string typeCode = dicType.FirstOrDefault(q => q.Value == this.cboType.Text).Key.Trim();
                //string typeName = this.cboType.Text;
                dicParm.Add(Function.GetParm("TypeCode", dicType.FirstOrDefault(q => q.Value == this.cboType.Text).Key.Trim()));
            }

            if (!string.IsNullOrEmpty(this.cboLevel.Text))
            {
                dicParm.Add(Function.GetParm("level", this.cboLevel.Text));
            }

            if (!string.IsNullOrEmpty(this.cboHepenSpan.Text))
            {
                dicParm.Add(Function.GetParm("tspan", this.cboHepenSpan.Text.Split('|')[1]));
            }

            if (!string.IsNullOrEmpty(this.cboRank.Text))
            {
                dicParm.Add(Function.GetParm("Rank", dicRank.FirstOrDefault(q => q.Value == this.cboRank.Text).Value.Trim()));
            }

            if (!string.IsNullOrEmpty(this.cboShcd.Text))
            {
                dicParm.Add(Function.GetParm("Shcd", dicShcd.FirstOrDefault(q => q.Value == this.cboShcd.Text).Key.Trim()));
            }

            if (!string.IsNullOrEmpty(this.cboSbyy.Text))
            {
                dicParm.Add(Function.GetParm("Sbyy", dicSbyy.FirstOrDefault(q => q.Value == this.cboSbyy.Text).Key.Trim()));
            }

            try
            {
                uiHelper.BeginLoading(this);
                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    dateScope = beginDate + " ~ " + endDate;
                    this.gcData.DataSource = proxy.Service.GetStatNursEventInstrument(dicParm);
                }
            }
            finally
            {
                uiHelper.CloseLoading(this);
            }
        }