コード例 #1
0
ファイル: OpOrderCardView.cs プロジェクト: fhis/order.client
        /// <summary>
        /// 单击多医疗单情况下的底下的索引序号
        /// </summary>
        /// <param name="sender">点的是哪个序号的控件</param>
        /// <param name="e"></param>
        private void orCom_MouseClick(object sender, MouseEventArgs e)
        {
            if (TMPrender != null)
            {
                TMPrender.Invalidate();
            }
            //splitContainer1.Panel1.Controls.Clear();

            XRoundRender render = sender as XRoundRender;

            //做校验的地方
            foreach (XRoundRender Pastrender in emsIndexAndButtonArea.IndexRenderList)
            {
                if (Pastrender.Equals(render))
                {
                    Pastrender.Crossflag = false;
                    Pastrender.Editflag  = true;
                    //currentEmsControl.OnRefreshData(this.UiEmsDict[Pastrender.ID] as EmsUIDTO, this.UiEmsDict[Pastrender.ID] as CiEmsDTO);
                    Pastrender.Ci.EmsHeadDO = this.UiEmsDict[Pastrender.ID] as EmsUIDTO;
                    Pastrender.Ci.CiEmsDTO  = this.CiEmsDict[Pastrender.ID] as CiEmsDTO;

                    this.emsDO = Pastrender.Ci.EmsHeadDO;
                    this.dto   = Pastrender.Ci.CiEmsDTO;
                    //this.splitContainer1.Panel1.Controls.Add(render.Ci);
                    render.Ci.Dock    = DockStyle.None;
                    currentEmsControl = Pastrender.Ci;
                    //界面更换完毕后要刷新界面,否则数据无法显示
                    currentEmsControl.OnRefreshData(this.UiEmsDict[Pastrender.ID] as EmsUIDTO, this.CiEmsDict[Pastrender.ID] as CiEmsDTO);
                    orderItemView.SetTabText(currentEmsControl.SheetName);
                    this.splitContainer1.AddControl(Pastrender.Ci, xap.cli.sdk.controls.ControlPosition.Center);
                }
                else
                {
                    if (Pastrender.Editflag)
                    {
                        Pastrender.Editflag = false;
                    }
                }
                // TMPrender = render; //zzj:这句没必要放循环里,因为每次都是一样的
            }
            TMPrender = render; //zzj:这句没必要放循环里,因为每次都是一样的
        }
コード例 #2
0
ファイル: OpOrderCardView.cs プロジェクト: fhis/order.client
        /// <summary>
        /// 将服务或者医嘱上的数据设置到医疗单上
        /// </summary>
        /// <param name="e">具体的一条医嘱</param>
        /// <param name="dto">患者信息</param>
        private void SetEmsFromOrdOrSrv(Object e, Ent4BannerDTO dto)
        {
            this.bannerDto        = dto;
            this.orDataBing.patDo = dto;
            this.emsDO            = cof.CreatEmsIntance();
            this.emsDO.PatInfo    = dto;

            ClearCurrentEms();

            emsIndexAndButtonArea.RenderEnabled = true;

            // 服务选择
            if (e is EmsOrSrvSc)//这是新增
            {
                status = DOStatus.NEW;
                MedSrvDO med = (e as EmsOrSrvSc).MedSrvDO;
                this.dto = cof.CreatEmsDTO();
                LoadOrderView(med.Sd_srvtp, med);
                if (emsIndexAndButtonArea != null)
                {
                    emsIndexAndButtonArea.RenderEnabled = true;
                }
            }
            else if (e is RegularOrRelSrvDO) //医嘱助手 常用模板348112
            {
                status = DOStatus.NEW;
                String   id_srv = (e as RegularOrRelSrvDO).Id_srv;
                MedSrvDO med    = this.dtoSaveViewModel.getMedSrvDO(id_srv);
                this.dto = cof.CreatEmsDTO();
                LoadOrderView(med.Sd_srvtp, med);
                if (emsIndexAndButtonArea != null)
                {
                    emsIndexAndButtonArea.RenderEnabled = true;
                }
            }
            else if (e is EntHisDiDTO)
            {
                //医嘱助手 患者既往
                status = DOStatus.NEW;
                String   id_srv = (e as RegularOrRelSrvDO).Id_srv;
                MedSrvDO med    = this.dtoSaveViewModel.getMedSrvDO(id_srv);
                this.dto = cof.CreatEmsDTO();
                LoadOrderView(med.Sd_srvtp, med);
                if (emsIndexAndButtonArea != null)
                {
                    emsIndexAndButtonArea.RenderEnabled = true;
                }
            }
            else if (e is OrTplItmDtDO)
            {
                //医嘱助手 协定处方
                status = DOStatus.NEW;
                string   id_srv = (e as OrTplItmDtDO).Id_srv;
                MedSrvDO med    = this.dtoSaveViewModel.getMedSrvDO(id_srv);
                this.dto = cof.CreatEmsDTO();
                LoadOrderView(med.Sd_srvtp, med);
                if (emsIndexAndButtonArea != null)
                {
                    emsIndexAndButtonArea.RenderEnabled = true;
                }
            }
            else if (e is SrvortplitemAggDO)
            {
                //医嘱助手 医嘱模板
                status = DOStatus.NEW;

                MedSrvDO med = new MedSrvDO();
                this.dto = cof.CreatEmsDTO();
                LoadOrderView(med.Sd_srvtp, med);

                if (emsIndexAndButtonArea != null)
                {
                    emsIndexAndButtonArea.RenderEnabled = true;
                }
            }
            else if (e is MedSrvDO)
            {
                // 医嘱助手 分类选取?
                status = DOStatus.NEW;
                MedSrvDO med = e as MedSrvDO;
                this.dto = cof.CreatEmsDTO();
                LoadOrderView(med.Sd_srvtp, med);
                if (emsIndexAndButtonArea != null)
                {
                    emsIndexAndButtonArea.RenderEnabled = true;
                }
            }

            else if (e is CiOrderDO) //已经存在要进行修改
            {
                status = DOStatus.UPDATED;
                CiOrderDO ciDO = e as CiOrderDO;
                if (orderDataFromStr == "patipast" && ciDO != null)
                {
                    ciDO.Sd_su_or = "0"; //既往数据可以编辑
                }
                ciorderDO = ciDO;
                emsDO.SetUpdated();
                CiEmsDTO ciEmsDTO = this.model.getCiEmsDTO(ciDO.Id_or);

                this.dto = ciEmsDTO;
                this.dto.SetUpdated();
                emsDO.PatInfo      = bannerDto;
                emsDO.Funcclassstr = this.dto.Funcclassstr;
                emsDO.Id_srvof     = this.dto.Id_srvof;
                MedSrvDO med = new MedSrvDO();
                med.Id_srv    = this.dto.Id_srv;
                med.Sd_srvtp  = this.dto.Sd_srvtp;
                this.dto.Name = this.dto.Name;
                LoadOrderView(ciDO.Sd_srvtp, med);
                SheetName = ciDO.Name_or;
                //viewEditState是通过患者的状态判断得到,当viewEditState为false,医疗单不可编辑;当viewEditState为True,通过医嘱的状态判断医疗单是否可编辑;
                currentEmsControl.IsReadOnly = this.viewEditState == true ? !(ciDO.Sd_su_or == "0") : this.viewEditState;
                //ci.IsReadOnly = !(ciDO.Sd_su_or == "0"); //只有开立的可以修改
                if (emsIndexAndButtonArea != null)
                {
                    if (ciDO.Sd_su_or != null && ciDO.Sd_su_or != "0")
                    {
                        emsIndexAndButtonArea.RenderEnabled = false;
                    }
                    else
                    {
                        emsIndexAndButtonArea.RenderEnabled = true;
                    }
                }
            }

            if (emsDO != null)
            {
                ciControl = new Dictionary <CiorderBaseControl, Object>();

                ////ciControl.Add(ci, cardName);
                ////ssci.Enabled = this.bEnabled;
                ////if (!this.CiFlag)
                ////{
                ////    this.splitContainer1.Panel1.Controls.Add(ci);
                ////    this.CiFlag = true;
                ////}

                //emsDO.IsOpData = false;
                //if (orderItemView != null)
                //    orderItemView.SetTabText(currentEmsControl.SheetName);
                //emsDO.PatInfo = dto;
                //currentEmsControl.OnRefreshData(emsDO, this.dto);//数据传递给 医嘱表单
                ////为医疗单传Context对象
                //currentEmsControl.Context = this.Context;
                //currentEmsControl.EmsHeadDO = emsDO;
                //currentEmsControl.CiEmsDTO = this.dto;
                //ciControl.Add(currentEmsControl, SheetName);
                //currentEmsControl.Dock = DockStyle.None;
                //this.splitContainer1.AddControl(currentEmsControl, xap.cli.sdk.controls.ControlPosition.Center);

                emsDO.IsOpData = false;
                if (orderItemView != null)
                {
                    orderItemView.SetTabText(currentEmsControl.SheetName);
                }
                emsDO.PatInfo = dto;
                currentEmsControl.OnRefreshData(emsDO, this.dto);//数据传递给 医嘱表单
                //为医疗单传Context对象
                currentEmsControl.Context   = this.Context;
                currentEmsControl.EmsHeadDO = emsDO;
                currentEmsControl.CiEmsDTO  = this.dto;
                ciControl.Add(currentEmsControl, emsDO);
                currentEmsControl.Dock = DockStyle.None;
                this.splitContainer1.AddControl(currentEmsControl, xap.cli.sdk.controls.ControlPosition.Center);
            }
            else
            {
                emsIndexAndButtonArea.RenderEnabled = false;
            }
        }