Ejemplo n.º 1
0
        /// <summary>
        /// 查询医保规则
        /// </summary>
        /// <param name="id_srv"></param>
        /// <param name="id_mm"></param>
        /// <param name="patinfo"></param>
        /// <returns></returns>
        public BdHpIndicationDTO[] getBdHpIndicationDTO(string[] id_srvs, string[] id_mms, Ent4BannerDTO patinfo)
        {
            if (id_srvs == null || patinfo == null || string.IsNullOrEmpty(patinfo.Id_hp) || true != patinfo.Fg_hpfundpay)
            {
                return(null);
            }
            CiEnContextDTO   contextdto = CiEnContextUtil.GetCiEnContext(patinfo);
            ICiOrdQryService service    = XapServiceMgr.find <ICiOrdQryService>();

            BdHpIndicDTO[] bdhpindic = service.getBdHpIndicationDTOs(id_srvs, id_mms, contextdto);
            if (bdhpindic != null)
            {
                BdHpIndicationDTO[] bdHpIndications = new BdHpIndicationDTO[bdhpindic.Length];
                for (int i = 0; i < bdhpindic.Length; i++)
                {
                    BdHpIndicationDTO bdHpIndication = new BdHpIndicationDTO();
                    LogicEx.GetInstance().CopyTo(bdhpindic[i], bdHpIndication);
                    bdHpIndications[i] = bdHpIndication;
                }
                return(bdHpIndications);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 允许编辑医保列
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 private Boolean DisableEditHP(string propName, CiOrdFeeSrvDTO dataSource, bool def)
 {
     if (propName.Equals("Fg_selfpay"))
     {
         FArrayList bdhpdtos = dataSource.BdHpIndicationList;
         if (bdhpdtos == null)
         {
             bdhpdtos = new FArrayList();
             BdHpIndicationDTO dto = HpJudgeUtil.getInstance().getBdHpIndicationDTO(dataSource.Id_srv, dataSource.Id_mm,
                                                                                    this.GetModel().GetEnt4BannerDTO());
             if (dto != null)
             {
                 bdhpdtos.Add(dto);
             }
             dataSource.BdHpIndicationList = bdhpdtos;
         }
         //符合医保判断条件,并且医保使用症为true的时候才可以操作
         if (CanEditHp() && dataSource.BdHpIndicationList == null || dataSource.BdHpIndicationList.Count == 0 || string.IsNullOrEmpty((dataSource.BdHpIndicationList[0] as BdHpIndicationDTO).Code_hpindicjudged))
         {
             return(true);
         }
         else
         {
             return(dataSource.Fg_indic == null ? true : !(bool)dataSource.Fg_indic);
         }
     }
     return(def);
 }
Ejemplo n.º 3
0
        private void showHpDialog(EmsOrDrug emsordrug)
        {
            BdHpIndicationDTO bdhpdto = emsordrug.BdHpIndicationDTO[0] as BdHpIndicationDTO;
            var  code_hpindicjudged   = bdhpdto.Code_hpindicjudged;
            bool?isDefault            = null;

            if (code_hpindicjudged == "12")
            {
                isDefault = emsordrug.Fg_treat;
            }
            using (BdHpIndicationDTOForm dialog = new BdHpIndicationDTOForm(emsordrug.Limit, emsordrug.Name_srv, isDefault))
            {
                DialogResult dialogResult = dialog.ShowDialog();
                if (dialogResult == DialogResult.OK)
                {
                    emsordrug.Fg_treat         = true;
                    emsordrug.Fg_selfpay       = false;
                    emsordrug.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;//0不需要判断,1待判断,2已判断;
                }
                else if (dialogResult == DialogResult.No)
                {
                    emsordrug.Fg_treat         = false;
                    emsordrug.Fg_selfpay       = true;
                    emsordrug.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;//0不需要判断,1待判断,2已判断
                }
            }
        }
Ejemplo n.º 4
0
        public override void Cell_MouseClick(object sender)
        {
            var       row       = sender as XDataRow;
            EmsOrDrug emsordrug = row.DataSource as EmsOrDrug;

            if (emsordrug != null)
            {
                if (row.ClickCell.FieldName.Equals("Fg_treat"))
                {
                    FArrayList bdhpdtos = emsordrug.BdHpIndicationDTO;
                    if (bdhpdtos != null && bdhpdtos.Count > 0)
                    {
                        BdHpIndicationDTO bdhpdto            = bdhpdtos[0] as BdHpIndicationDTO;
                        string            code_hpindicjudged = bdhpdto.Code_hpindicjudged;
                        if (code_hpindicjudged != null)
                        {
                            switch (code_hpindicjudged)
                            {
                            case "12":
                            case "21":
                                showHpDialog(emsordrug);
                                break;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public virtual ExpenseModel LoadEmsOrDrug(EmsOrDrug newDrug)
        {
            // if (nCurrentSelIndex >= 0 && nCurrentSelIndex < tableDataSource.Count(p=>!p.IsDELETED))
            {
                // 填充默认值
                newDrug.Use_days       = 1;
                newDrug.Id_unit_sale   = newDrug.Id_unit_med;
                newDrug.Name_unit_sale = newDrug.Name_unit_med;
                newDrug.Fg_or          = false;
                newDrug.Fg_bl          = true;
                newDrug.Eu_sourcemd    = (int)OrSrvSourceFromEnum.PHYSIANFEEADD;
                #region 计算总量和价格
                newDrug.Quan_cur = this.GetLogicEx().getNotDrugTotal(
                    newDrug.Quan_med.ToDouble(),
                    newDrug.Id_freq,
                    newDrug.Freqct == null ? 1 : newDrug.Freqct.Value,
                    newDrug.Use_days == null ? 1 : newDrug.Use_days.Value);

                newDrug.Price      = this.GetLogicEx().getSrvNotMMPri(newDrug.Id_srv, newDrug.Id_pri);
                newDrug.Totalprice = newDrug.Price * newDrug.Quan_cur;
                #endregion
                FArrayList list = new FArrayList();
                //判断是否是保外诊断
                CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO;
                //保外诊断标识
                string eu_hpbeyond = ciEnContextDTO.Eu_hpbeyond;

                if (ent4BannerDTO != null && true == ent4BannerDTO.Fg_hpfundpay && HpBeyondEnum.HPDIAG.Equals(ciEnContextDTO.Eu_hpbeyond) /*保内诊断*/)
                {
                    BdHpIndicationDTO bdhpindication = HpJudgeUtil.getInstance().getBdHpIndicationDTO(newDrug.Id_srv, newDrug.Id_mm, this.ent4BannerDTO);
                    if (bdhpindication != null)
                    {
                        newDrug.Fg_treat   = bdhpindication.Fg_indic;
                        newDrug.Id_hp      = bdhpindication.Id_hp;
                        newDrug.Sd_hpsrvtp = bdhpindication.Sd_hpsrvtp;
                        newDrug.Id_hpsrvtp = bdhpindication.Id_hpsrvtp;
                        if (string.IsNullOrEmpty(bdhpindication.Id_hpsrvtp))
                        {
                            newDrug.Id_hpsrvtp = HpJudgeUtil.IdHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                        }
                        newDrug.Name_hpsrvtp     = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                        newDrug.Fg_selfpay       = HpJudgeUtil.getInstance().isSelfPay(bdhpindication);
                        newDrug.Fg_hpindicjudged = HpJudgeUtil.getInstance().getFg_hpindicjudged(bdhpindication);
                        list.Add(bdhpindication);
                    }
                }
                else if (ciEnContextDTO.Fg_hpfundpay == null || !(bool)ciEnContextDTO.Fg_hpfundpay || (ciEnContextDTO.Eu_hpbeyond != null && !ciEnContextDTO.Eu_hpbeyond.Equals(HpBeyondEnum.HPDIAG)))
                {
                    newDrug.Fg_treat   = false;
                    newDrug.Fg_selfpay = true;
                }
                newDrug.BdHpIndicationDTO = list;
                #region 计算执行科室
                CalculateDeptMp(newDrug);
                #endregion
            }
            return(this);
        }
Ejemplo n.º 6
0
        public void ShowHpDialog(object sender)
        {
            var       row       = sender as XDataRow;
            EmsOrDrug emsordrug = row.DataSource as EmsOrDrug;

            if (emsordrug != null)
            {
                if (row.ClickCell.FieldName.Equals("Fg_treat"))
                {
                    FArrayList bdhpdtos = emsordrug.BdHpIndicationDTO;
                    if (bdhpdtos == null)
                    {
                        bdhpdtos = new FArrayList();
                        BdHpIndicationDTO dto = HpJudgeUtil.getInstance().getBdHpIndicationDTO(emsordrug.Id_srv, emsordrug.Id_mm, this.GetModel().getEnt4BannerDTO());
                        if (dto != null)
                        {
                            bdhpdtos.Add(dto);
                        }
                        emsordrug.BdHpIndicationDTO = bdhpdtos;
                    }
                    if (bdhpdtos != null && bdhpdtos.Count > 0)
                    {
                        BdHpIndicationDTO bdhpdto            = bdhpdtos[0] as BdHpIndicationDTO;
                        string            code_hpindicjudged = bdhpdto.Code_hpindicjudged;
                        bool?isDefault = null;
                        if (code_hpindicjudged == "12")
                        {
                            isDefault = emsordrug.Fg_treat;
                        }
                        if (code_hpindicjudged != null)
                        {
                            switch (code_hpindicjudged)
                            {
                            case "12":
                            case "21":
                                BdHpIndicationDTOForm dialog       = new BdHpIndicationDTOForm(emsordrug.Limit, emsordrug.Name_srv, isDefault);
                                DialogResult          dialogResutl = dialog.ShowDialog();
                                if (dialogResutl == DialogResult.OK)
                                {
                                    emsordrug.Fg_treat         = true;
                                    emsordrug.Fg_selfpay       = false;
                                    emsordrug.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;    //0不需要判断,1待判断,2已判断;
                                }
                                else if (dialogResutl == DialogResult.No)
                                {
                                    emsordrug.Fg_treat         = false;
                                    emsordrug.Fg_selfpay       = true;
                                    emsordrug.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;    //0不需要判断,1待判断,2已判断;
                                }
                                break;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 装载费用项目信息
        /// </summary>
        /// <param name="newDrug"></param>
        /// <returns></returns>
        public virtual EmsFeebillViewModel LoadEmsFeeSrv(CiOrdFeeSrvDTO newDrug)
        {
            {
                // 填充默认值
                newDrug.setAttrVal <int>("Use_days", 1);
                newDrug.Id_unit_sale   = newDrug.Id_unit_med;
                newDrug.Name_unit_sale = newDrug.Name_unit_med;
                newDrug.Fg_or          = false;
                newDrug.Fg_bl          = true;
                newDrug.Eu_sourcemd    = (int)OrSrvSourceFromEnum.PHYSIANFEEADD;
                #region 计算总量和价格
                newDrug.Quan_total_medu = this.GetLogicEx().getNotDrugTotal(
                    newDrug.Quan_med.ToDouble(),
                    newDrug.Id_freq,
                    newDrug.Freqct == null ? 1 : newDrug.Freqct.Value,
                    newDrug.getAttrVal <int>("Use_days"));

                newDrug.Price   = this.GetLogicEx().getSrvNotMMPri(newDrug.Id_srv, newDrug.Id_primd, null, GetEnt4BannerDTO().Id_pripat);
                newDrug.Amt_cur = newDrug.Price * newDrug.Quan_cur;
                #endregion
                FArrayList list = new FArrayList();
                //判断是否是保外诊断
                CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO;
                //保外诊断标识
                string eu_hpbeyond = ciEnContextDTO.Eu_hpbeyond;

                if (ent4BannerDTO != null && true == ent4BannerDTO.Fg_hpfundpay && HpBeyondEnum.HPDIAG.Equals(ciEnContextDTO.Eu_hpbeyond) /*保内诊断*/)
                {
                    BdHpIndicationDTO bdhpindication = HpJudgeUtil.getInstance().getBdHpIndicationDTO(newDrug.Id_srv, newDrug.Id_mm, this.ent4BannerDTO);
                    if (bdhpindication != null)
                    {
                        newDrug.Fg_treat   = bdhpindication.Fg_indic;
                        newDrug.Id_hp      = bdhpindication.Id_hp;
                        newDrug.Sd_hpsrvtp = bdhpindication.Sd_hpsrvtp;
                        newDrug.Id_hpsrvtp = bdhpindication.Id_hpsrvtp;
                        if (string.IsNullOrEmpty(bdhpindication.Id_hpsrvtp))
                        {
                            newDrug.Id_hpsrvtp = HpJudgeUtil.IdHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                        }
                        newDrug.Name_hpsrvtp = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                        newDrug.Fg_selfpay   = HpJudgeUtil.getInstance().isSelfPay(bdhpindication);
                        list.Add(bdhpindication);
                    }
                }
                else if (ciEnContextDTO.Fg_hpfundpay == null || !(bool)ciEnContextDTO.Fg_hpfundpay || (ciEnContextDTO.Eu_hpbeyond != null && !ciEnContextDTO.Eu_hpbeyond.Equals(HpBeyondEnum.HPDIAG)))
                {
                    newDrug.Fg_treat   = false;
                    newDrug.Fg_selfpay = true;
                }
                newDrug.setAttrVal <FArrayList>("BdHpIndicationDTO", list);
                #region 计算执行科室
                CalculateDeptMp(newDrug);
                #endregion
            }
            return(this);
        }
Ejemplo n.º 8
0
        public void showHpDialog(object sender)
        {
            var            row       = sender as XDataRow;
            CiOrdFeeSrvDTO emsordrug = row.DataSource as CiOrdFeeSrvDTO;

            if (emsordrug != null)
            {
                if (row.ClickCell.FieldName.Equals("Fg_indic"))
                {
                    FArrayList bdhpdtos = emsordrug.BdHpIndicationList;
                    if (bdhpdtos == null)
                    {
                        bdhpdtos = new FArrayList();
                        BdHpIndicationDTO dto = HpJudgeUtil.getInstance().getBdHpIndicationDTO(emsordrug.Id_srv, emsordrug.Id_mm, this.GetModel().GetEnt4BannerDTO());
                        if (dto != null)
                        {
                            bdhpdtos.Add(dto);
                        }
                        emsordrug.BdHpIndicationList = bdhpdtos;
                    }
                    if (bdhpdtos != null && bdhpdtos.Count > 0)
                    {
                        BdHpIndicationDTO bdhpdto            = bdhpdtos[0] as BdHpIndicationDTO;
                        string            code_hpindicjudged = bdhpdto.Code_hpindicjudged;
                        bool?isDefault = null;
                        if (code_hpindicjudged == "12")
                        {
                            isDefault = emsordrug.Fg_treat;
                        }
                        if (code_hpindicjudged != null)
                        {
                            switch (code_hpindicjudged)
                            {
                            case "12":
                            case "21":
                                BdHpIndicationDTOForm dialog = new BdHpIndicationDTOForm(emsordrug.Limit, emsordrug.Name_srv, isDefault);
                                if (dialog.ShowDialog() == DialogResult.OK)
                                {
                                    emsordrug.Fg_indic   = true;
                                    emsordrug.Fg_selfpay = false;
                                }
                                else
                                {
                                    emsordrug.Fg_indic   = false;
                                    emsordrug.Fg_selfpay = true;
                                }
                                break;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 判断自费标识(保内、保外)
        /// </summary>
        /// <param name="hpdto"></param>
        /// <returns></returns>
        public bool?isSelfPay(BdHpIndicationDTO hpdto)
        {
            if (hpdto == null)
            {
                return(true);
            }
            string sd_hpsrvtp         = hpdto.Sd_hpsrvtp;         //医保类型
            string code_hpindicjudged = hpdto.Code_hpindicjudged; //判断方式

            //丙类
            if (string.IsNullOrEmpty(sd_hpsrvtp) || sd_hpsrvtp.Equals(HpDicCodeConst.SD_HPSRVTP_CLASS_C))
            {
                return(true);
            }
            else
            {
                if (string.IsNullOrEmpty(code_hpindicjudged))
                {
                    return(true);
                }
                else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_NO_CONTROL))
                { //不控制
                    return(false);
                }
                else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_CONFIRM))
                {
                    if (hpdto.Fg_indic != null && (bool)hpdto.Fg_indic)
                    {
                        return(false);
                    }
                    else
                    {
                        return(true);
                    }
                }
                else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_JUD_DOCCONFIRM))
                {
                    return(true);//默认为自费
                }
                else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_DOC_CONFIRM))
                {
                    return(true);//默认为自费
                }
            }
            return(true);
        }
Ejemplo n.º 10
0
        public override bool OnEventHandle(object sender, DictionaryEventArgs e)
        {
            switch (AssToolEx.EventCodeOfEventArgs(e))
            {
            case EventCodeType.EVENT_EMS_ORSRV_DATACHANGED:
                int count = GetHerBalMedicineCtr().dispCount;

                for (int index = 0; index < count; ++index)
                {
                }
                break;

            case EventCodeType.EVENT_EMS_DRUG_USAGE:
                (AssXapFormUtils.GetUserRender(this.GetXapFormControl(), "drugsUse.name_routedes") as XLabelBaseUserRender).UserRender.Focus();
                break;

            case EventCodeType.EVENT_EMS_REFRESULT:
                if (hpCanEdit())
                {
                    EmsOrDrug emsordrug = this.GetViewModel().GetSelectedObject() as EmsOrDrug;
                    var       bdhpdtos  = emsordrug.BdHpIndicationDTO;
                    if (bdhpdtos != null && bdhpdtos.Count > 0)
                    {
                        BdHpIndicationDTO bdhpdto = bdhpdtos[0] as BdHpIndicationDTO;
                        var code_hpindicjudged    = bdhpdto.Code_hpindicjudged;
                        if (code_hpindicjudged != null && (code_hpindicjudged == "12" || code_hpindicjudged == "21"))
                        {
                            showHpDialog(emsordrug);
                        }
                    }
                }
                break;

            case EventCodeType.EVENT_EMS_CARDFOCUS:
                getControlByName("drugsUse", "orders").UserRender.Focus();
                break;

            default:
                break;
            }
            return(base.OnEventHandle(sender, e));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 查询医保规则
        /// </summary>
        /// <param name="id_srv"></param>
        /// <param name="id_mm"></param>
        /// <param name="patinfo"></param>
        /// <returns></returns>
        public BdHpIndicationDTO getBdHpIndicationDTO(string id_srv, string id_mm, Ent4BannerDTO patinfo)
        {
            if (string.IsNullOrEmpty(id_srv) || patinfo == null || string.IsNullOrEmpty(patinfo.Id_hp) || true != patinfo.Fg_hpfundpay)
            {
                return(null);
            }
            CiEnContextDTO   contextdto = CiEnContextUtil.GetCiEnContext(patinfo);
            ICiOrdQryService service    = XapServiceMgr.find <ICiOrdQryService>();
            BdHpIndicDTO     bdhpindic  = service.getBdHpIndicationDTO(id_srv, id_mm, contextdto);

            if (bdhpindic != null)
            {
                BdHpIndicationDTO bdHpIndication = new BdHpIndicationDTO();
                LogicEx.GetInstance().CopyTo(bdhpindic, bdHpIndication);
                return(bdHpIndication);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 12
0
        private void drugHpShow()
        {
            if (hpCanEdit())
            {
                EmsOrDrug drugitem = this.GetViewModel().GetSelectedObject() as EmsOrDrug;
                var       bdhpdtos = drugitem.BdHpIndicationDTO;
                if (bdhpdtos != null && bdhpdtos.Count > 0)
                {
                    BdHpIndicationDTO bdhpdto = bdhpdtos[0] as BdHpIndicationDTO;
                    var code_hpindicjudged    = bdhpdto.Code_hpindicjudged;
                    if (code_hpindicjudged != null && (code_hpindicjudged == HpIndicationRuleEnum.SYS_JUD_DOCCONFIRM || code_hpindicjudged == HpIndicationRuleEnum.DOC_CONFIRM))
                    {
                        showFgTreatDialog(null);
                    }

                    // 确认为非适应症时是否提醒医生 ,true 提醒,false 不提醒
                    String ishp = SysParamUtils.getSysParam().SYS_PARAM_IsRemind4FgIndicFalseConfirmed.OrgParam;
                    if (bdhpdto.Fg_indic != FBoolean.True && code_hpindicjudged != null && ishp != null && ishp.StartsWith("true") && code_hpindicjudged == HpIndicationRuleEnum.SYS_CONFIRM)
                    {
                        string limitMsg = drugitem.Limit;
                        if (string.IsNullOrEmpty(limitMsg))
                        {
                            limitMsg = "医保规则校验结果为自费,但未设置限制条件";
                        }
                        BizAssMessageBoxUtil.ShowInforMsg(limitMsg);
                    }
                }

                // 特殊病患者校验
                CiEnContextDTO ctx            = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO;
                string         specialDisease = ((EmsDrugsViewModel)this.GetViewModel()).GetSpecialDiseaseJudgeRst(ctx, new List <EmsOrDrug> {
                    drugitem
                });
                if (!string.IsNullOrEmpty(specialDisease))
                {
                    BizAssMessageBoxUtil.ShowWarningMsg(specialDisease);
                }
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 根据医保适应症细则DTO,获得医生是否已经判断过标识,0 不需要判断,1已判断,2待判断
        /// </summary>
        /// <param name="hpdto"></param>
        /// <returns></returns>
        public int?getFg_hpindicjudged(BdHpIndicationDTO hpdto)
        {
            if (hpdto == null)
            {
                return(null);
            }
            string sd_hpsrvtp = hpdto.Sd_hpsrvtp;//医保类型

            //丙类
            if (string.IsNullOrEmpty(sd_hpsrvtp) || sd_hpsrvtp.Equals(HpDicCodeConst.SD_HPSRVTP_CLASS_C))
            {
                return((int)HpIndicJudgeEnum.NONEEDJUDGE);        //0不需要判断,1待判断,2已判断;
            }
            string code_hpindicjudged = hpdto.Code_hpindicjudged; //判断方式

            if (string.IsNullOrEmpty(code_hpindicjudged))
            {
                return((int)HpIndicJudgeEnum.NONEEDJUDGE);//0不需要判断,1待判断,2已判断;
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_NO_CONTROL))
            {                                              //不控制
                return((int)HpIndicJudgeEnum.NONEEDJUDGE); //0不需要判断,1待判断,2已判断;
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_CONFIRM))
            {
                return((int)HpIndicJudgeEnum.NONEEDJUDGE);//0不需要判断,1待判断,2已判断;
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_JUD_DOCCONFIRM))
            {
                return((int)HpIndicJudgeEnum.WAITINGJUDGE);//0不需要判断,1待判断,2已判断;
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_JUD_DOCCONFIRM))
            {
                return((int)HpIndicJudgeEnum.WAITINGJUDGE); //0不需要判断,1待判断,2已判断;
            }
            return((int)HpIndicJudgeEnum.WAITINGJUDGE);     //0不需要判断,1待判断,2已判断;
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 判断控件是否能编辑
        /// </summary>
        /// <param name="hpdto"></param>
        /// <returns></returns>
        public bool isCanEdit(BdHpIndicationDTO hpdto)
        {
            if (hpdto == null)
            {
                return(false);
            }
            string sd_hpsrvtp = hpdto.Sd_hpsrvtp;//医保类型

            //丙类
            if (string.IsNullOrEmpty(sd_hpsrvtp) || sd_hpsrvtp.Equals(HpDicCodeConst.SD_HPSRVTP_CLASS_C))
            {
                return(false);
            }
            string code_hpindicjudged = hpdto.Code_hpindicjudged;//判断方式

            if (string.IsNullOrEmpty(code_hpindicjudged))
            {
                return(false);
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_NO_CONTROL))
            { //不控制
                return(false);
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_CONFIRM))
            {
                return(false);
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_JUD_DOCCONFIRM))
            {
                return(true);
            }
            else if (code_hpindicjudged.Equals(HpDicCodeConst.SD_HP_JUDGE_METHOD_SYS_JUD_DOCCONFIRM))
            {
                return(true);
            }
            return(true);
        }
Ejemplo n.º 15
0
        private void SetHpControlEnabled()
        {
            if (this.GetXapFormControl() == null)
            {
                return;
            }
            var drugitem = this.GetViewModel().GetSelectedObject() as EmsOrDrug;

            if (drugitem == null)
            {
                return;
            }
            var bdhpdtos = drugitem.BdHpIndicationDTO;
            var fg_treat = AssXapFormUtils.GetUserRender(GetXapFormControl(), "card.fg_treat") as XLabelBaseUserRender;

            if (fg_treat == null)
            {
                return;
            }
            fg_treat.ReadOnly = true;
            var label      = AssXapFormUtils.GetUserRender(GetXapFormControl(), "card.label") as XLabel;
            var fg_selfpay = AssXapFormUtils.GetUserRender(GetXapFormControl(), "card.fg_selfpay") as XLabelBaseUserRender;

            if (bdhpdtos != null && bdhpdtos.Count > 0)
            {
                BdHpIndicationDTO bdhpdto = bdhpdtos[0] as BdHpIndicationDTO;
                var  code_hpindicjudged   = bdhpdto.Code_hpindicjudged;
                bool?fg_indic             = drugitem.Fg_treat;
                if (code_hpindicjudged != null)
                {
                    switch (code_hpindicjudged)
                    {
                    case HpIndicationRuleEnum.NO_CONTROL:
                    case HpIndicationRuleEnum.SYS_CONFIRM:
                        if (bdhpdto.Fg_indic == null || !(bool)bdhpdto.Fg_indic)
                        {
                            setHpBaseUserRender(false);
                        }
                        else
                        {
                            fg_selfpay.Enabled = true;
                        }
                        label.MouseClick    -= fg_treat_MouseClick;
                        fg_treat.MouseClick -= fg_treat_MouseClick;
                        break;

                    case HpIndicationRuleEnum.SYS_JUD_DOCCONFIRM:
                        label.MouseClick    -= fg_treat_MouseClick;
                        label.MouseClick    += fg_treat_MouseClick;
                        fg_treat.MouseClick -= fg_treat_MouseClick;
                        fg_treat.MouseClick += fg_treat_MouseClick;
                        Font f = new Font(label.Font.FontFamily, label.Font.Size, FontStyle.Underline, GraphicsUnit.Pixel);
                        label.Font = f;
                        setFgSefPayRenderEnable(fg_indic == null ? false : (bool)fg_indic);
                        break;

                    case HpIndicationRuleEnum.DOC_CONFIRM:
                        label.MouseClick    -= fg_treat_MouseClick;
                        label.MouseClick    += fg_treat_MouseClick;
                        fg_treat.MouseClick -= fg_treat_MouseClick;
                        fg_treat.MouseClick += fg_treat_MouseClick;
                        Font f1 = new Font(label.Font.FontFamily, label.Font.Size, FontStyle.Underline, GraphicsUnit.Pixel);
                        label.Font = f1;
                        setFgSefPayRenderEnable(fg_indic == null ? false : (bool)fg_indic);
                        break;
                    }

                    return;
                }
            }
            label.MouseClick    -= fg_treat_MouseClick;
            fg_treat.MouseClick -= fg_treat_MouseClick;
            fg_selfpay.Enabled   = false;
        }
Ejemplo n.º 16
0
        public virtual bool LoadFeeSrv(CiOrdFeeSrvDTO newDrug)
        {
            #region  效性检查
            if (CheckRepeatFeeSrv(newDrug))
            {
                this.errorMsgString = String.Format("【{0}】 在该医嘱中存在,请选择其它服务", newDrug.Name_srv);
                return(false);
            }
            #endregion

            #region 填充默认值
            int nUseDays = GetOrderDO(newDrug.Id_or).Days_or ?? 1;
            newDrug.Id_unit_sale   = newDrug.Id_unit_med;
            newDrug.Name_unit_sale = newDrug.Name_unit_med;
            newDrug.Fg_or          = false;
            newDrug.Fg_bl          = true;
            newDrug.Eu_sourcemd    = (int)OrSrvSourceFromEnum.PHYSIANFEEADD;
            #endregion

            #region 计算总量和价格
            newDrug.Price = this.GetLogicEx().getSrvNotMMPri(newDrug.Id_srv, newDrug.Id_primd);

            #endregion

            #region 计算总量
            this.CalculateAmtCur(newDrug);
            #endregion

            #region 总价
            if (newDrug.Fg_mm != null && newDrug.Fg_mm.Value)
            {
                newDrug.Amt_total = newDrug.Price * newDrug.Quan_cur;
            }
            else
            {
                newDrug.Amt_total = newDrug.Price * newDrug.Quan_total_medu;
            }
            #endregion
            FArrayList list = new FArrayList();
            //判断是否是保外诊断
            CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO;
            //保外诊断标识
            string eu_hpbeyond = ciEnContextDTO.Eu_hpbeyond;

            if (ent4BannerDTO != null && true == ent4BannerDTO.Fg_hpfundpay && HpBeyondEnum.HPDIAG.Equals(ciEnContextDTO.Eu_hpbeyond) /*保内诊断*/)
            {
                BdHpIndicationDTO bdhpindication = HpJudgeUtil.getInstance().getBdHpIndicationDTO(newDrug.Id_srv, newDrug.Id_mm, this.ent4BannerDTO);
                if (bdhpindication != null)
                {
                    newDrug.Fg_treat   = bdhpindication.Fg_indic;
                    newDrug.Fg_indic   = bdhpindication.Fg_indic;
                    newDrug.Id_hp      = bdhpindication.Id_hp;
                    newDrug.Sd_hpsrvtp = bdhpindication.Sd_hpsrvtp;
                    newDrug.Id_hpsrvtp = bdhpindication.Id_hpsrvtp;
                    if (string.IsNullOrEmpty(bdhpindication.Id_hpsrvtp))
                    {
                        newDrug.Id_hpsrvtp = HpJudgeUtil.IdHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                    }
                    newDrug.Name_hpsrvtp     = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                    newDrug.Name_hp          = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp);
                    newDrug.Fg_selfpay       = HpJudgeUtil.getInstance().isSelfPay(bdhpindication);
                    newDrug.Fg_hpindicjudged = HpJudgeUtil.getInstance().getFg_hpindicjudged(bdhpindication);
                    list.Add(bdhpindication);
                }
            }
            else if (ciEnContextDTO.Fg_hpfundpay == null || !(bool)ciEnContextDTO.Fg_hpfundpay || (ciEnContextDTO.Eu_hpbeyond != null && !ciEnContextDTO.Eu_hpbeyond.Equals(HpBeyondEnum.HPDIAG)))
            {
                newDrug.Fg_treat   = false;
                newDrug.Fg_selfpay = true;
            }
            newDrug.setAttrVal <FArrayList>("BdHpIndicationDTO", list);
            #region 计算执行科室
            CalculateFeeDeptMp(newDrug);
            #endregion

            return(true);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 医保适应症弹窗处理
        /// </summary>
        private void showFgTreatDialog(EmsOrDrug drug)
        {
            EmsOrDrug drugitem = null;

            if (drug != null)
            {
                drugitem = drug;
            }
            else
            {
                drugitem = this.GetViewModel().GetSelectedObject() as EmsOrDrug;
            }

            BdHpIndicationDTO bdhpdto     = drugitem.BdHpIndicationDTO[0] as BdHpIndicationDTO;
            FArrayList        bdhpdtolist = new FArrayList();

            bdhpdtolist.Add(bdhpdto);
            drugitem.BdHpIndication = bdhpdtolist;
            var  code_hpindicjudged = bdhpdto.Code_hpindicjudged;
            bool?isDefault          = null;

            if (code_hpindicjudged == HpIndicationRuleEnum.SYS_JUD_DOCCONFIRM)
            {
                isDefault = drugitem.Fg_treat;
            }

            using (dialog = new BdHpIndicationDTOForm(drugitem.Limit, drugitem.Name_srv, isDefault))
            {
                // 适应症复选框
                var fg_treat = this.GetXapFormControl().GetUserRender(FORM_CARD_PAGECODE, "fg_treat") as XLabelBaseUserRender;
                // 自费复选框
                var    fg_selfpay = this.GetXapFormControl().GetUserRender(FORM_CARD_PAGECODE, "fg_selfpay") as XLabelBaseUserRender;
                String ishp       = SysParamUtils.getSysParam().SYS_PARAM_IsRemind4FgIndicFalseConfirmed.OrgParam;
                if (bdhpdto.Fg_indic != FBoolean.True && code_hpindicjudged != null && ishp != null &&
                    ishp.StartsWith("true") && code_hpindicjudged == HpIndicationRuleEnum.SYS_CONFIRM)
                {
                    dialog.saveButton.Visible  = false;
                    dialog.saveButton1.Visible = false;
                    dialog.saveButton2.Visible = false;
                    DialogResult dialogResult = dialog.ShowDialog();

                    if (dialogResult == DialogResult.OK)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked   = true;
                            fg_selfpay.Checked = false;
                        }
                        drugitem.Fg_treat         = true;
                        drugitem.Fg_selfpay       = false;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;  //0不需要判断,1待判断,2已判断;
                    }
                    else if (dialogResult == DialogResult.No)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked = false;
                            // 执行完fg_treat.Checked 后,fg_selfpay.Enabled = false 导致赋值的时候,没有处方datachange事件,费用列表中的fg_selfpay状态不改变,导致后续保存自费标识错误
                            // 先修改自费服复选框可用,在设置选中状态
                            fg_selfpay.Enabled = true;
                            fg_selfpay.Checked = true;
                        }
                        drugitem.Fg_treat         = false;
                        drugitem.Fg_selfpay       = true;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;  //0不需要判断,1待判断,2已判断;
                    }
                }
                else if (code_hpindicjudged == HpIndicationRuleEnum.SYS_JUD_DOCCONFIRM)
                {
                    dialog.saveButton1.Visible = false;
                    dialog.saveButton2.Visible = false;
                    drugitem.Fg_selfpay        = false;
                    DialogResult dialogResult = dialog.ShowDialog();
                    dialog.saveButton1.Visible = false;
                    dialog.saveButton2.Visible = false;

                    if (dialogResult == DialogResult.OK)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked   = true;
                            fg_selfpay.Checked = false;
                        }
                        drugitem.Fg_treat         = true;
                        drugitem.Fg_selfpay       = false;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED; //0不需要判断,1待判断,2已判断;
                    }
                    else if (dialogResult == DialogResult.No)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked = false;
                            // 执行完fg_treat.Checked 后,fg_selfpay.Enabled = false 导致赋值的时候,没有处方datachange事件,费用列表中的fg_selfpay状态不改变,导致后续保存自费标识错误
                            // 先修改自费服复选框可用,在设置选中状态
                            fg_selfpay.Enabled = true;
                            fg_selfpay.Checked = true;
                        }
                        drugitem.Fg_treat         = false;
                        drugitem.Fg_selfpay       = true;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED; //0不需要判断,1待判断,2已判断;
                    }
                }
                else if (code_hpindicjudged == HpIndicationRuleEnum.DOC_CONFIRM)
                {
                    Dictionary <String, MPayRatioDfDO> dic = new Dictionary <string, MPayRatioDfDO>();

                    FArrayList list = bdhpdto.Mutipayratio_list;

                    if (list != null && list.Count > 0)
                    {
                        int i = 1;
                        foreach (MPayRatioDfDO mPayRatio in list)
                        {
                            dic.Add(i + "", mPayRatio);
                            i++;
                        }
                        dialog.dic = dic;
                        if (dic != null && dic.Count > 0)
                        {
                            if (dic != null && dic.Count == 2)
                            {
                                dialog.saveButton1.Text = dic["1"].Name;
                                dialog.saveButton2.Text = dic["2"].Name;
                            }
                            else if (dic != null && dic.Count == 1)
                            {
                                dialog.saveButton1.Text    = dic["1"].Name;
                                dialog.saveButton2.Visible = false;
                            }
                            dialog.saveButton.Visible = false;
                        }
                        else
                        {
                            dialog.saveButton1.Visible = false;
                            dialog.saveButton2.Visible = false;
                        }
                    }
                    else
                    {
                        dialog.saveButton1.Visible = false;
                        dialog.saveButton2.Visible = false;
                    }

                    drugitem.Fg_selfpay = false;
                    DialogResult dialogResult = dialog.ShowDialog();

                    if (dialogResult == DialogResult.OK)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked   = true;
                            fg_selfpay.Checked = false;
                        }

                        drugitem.Fg_treat         = true;
                        drugitem.Fg_selfpay       = false;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED; //0不需要判断,1待判断,2已判断;
                    }
                    else if (dialogResult == DialogResult.Retry)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked   = true;
                            fg_selfpay.Checked = false;
                        }
                        drugitem.Indicitemid      = dic["1"].Id_hpmpayratiodf;
                        drugitem.Fg_treat         = true;
                        drugitem.Fg_selfpay       = false;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;  //0不需要判断,1待判断,2已判断;
                    }
                    else if (dialogResult == DialogResult.Yes)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked   = true;
                            fg_selfpay.Checked = false;
                        }
                        if (dic.Count == 2)
                        {
                            drugitem.Indicitemid = dic["2"].Id_hpmpayratiodf;
                        }
                        drugitem.Fg_treat         = true;
                        drugitem.Fg_selfpay       = false;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED; //0不需要判断,1待判断,2已判断
                    }
                    else if (dialogResult == DialogResult.No)
                    {
                        if (!this.GetXapFormControl().IsLoading)
                        {
                            fg_treat.Checked = false;
                            // 执行完fg_treat.Checked 后,fg_selfpay.Enabled = false 导致赋值的时候,没有处方datachange事件,费用列表中的fg_selfpay状态不改变,导致后续保存自费标识错误
                            // 先修改自费服复选框可用,在设置选中状态
                            fg_selfpay.Enabled = true;
                            fg_selfpay.Checked = true;
                        }
                        drugitem.Fg_treat         = false;
                        drugitem.Fg_selfpay       = true;
                        drugitem.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;  //0不需要判断,1待判断,2已判断;
                    }
                }
                setFgSefPayRenderEnable(!fg_selfpay.Checked);
            }
        }