Exemplo n.º 1
0
        /// <summary>
        /// 查询就诊医嘱
        /// </summary>
        public void Reload()
        {
            if (string.IsNullOrEmpty(this.id_en) || string.IsNullOrEmpty(this.code_entp))
            {
                if (this.xapList != null)
                {
                    this.xapList.Clear();
                }
                return;
            }

            // 获取服务类型显示名称
            if (sdSrvtpDic.Count == 0)
            {
                sdSrvtpDic = this.GetSdSrvtpDic();
            }

            CiOrderDO[] ciOrders = this.orderItemMService.find(getSearchSql(), " a0.createdtime  " + OrderSequenceModel, FBoolean.False);

            ciOrders.ToList().ForEach(p =>
            {
                p.Str_long = p.Fg_long.Value == true ? "长期" : "临时";
                if (p.Emp_stop_name == null || p.Emp_stop_name == "")
                {
                    p.Dt_end = null;
                } //如果没有停止医生 则医嘱列表停止时间 不显示 王琦需求
                if (!p.Fg_long.Value)
                {
                    p.Emp_stop_name = null;
                }
                if (!string.IsNullOrEmpty(p.Id_emp_sign) && !p.Id_emp_sign.Equals(p.Id_emp_or))
                {
                    p.Emp_sign_name = p.Emp_sign_name + "/" + p.Emp_phy_name;
                }
                else
                {
                    p.Emp_sign_name = p.Emp_phy_name;
                }
            });
            xapList = new XapDataList <CiOrderDO>(orderItemMService, ciOrders);
            //设定医嘱状态
            bool isOp = this.code_entp.Equals("00") ? true : false;

            logic.setOrderDisplayStatus(xapList, isOp);
            this.stoptime = CommonExtentions.NowTime(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 就诊历史中显示的医嘱列表
        /// </summary>
        /// <param name="id_en"></param>
        /// <param name="code_entp"></param>
        public void loadOderItems(string id_en, string code_entp)
        {
            if (string.IsNullOrEmpty(id_en) || string.IsNullOrEmpty(code_entp))
            {
                this.xapList.Clear();
                return;
            }

            CiOrderDO[] ciOrders = null;

            //if (code_entp.Equals(BdFcDictCodeConst.SD_CODE_ENTP_IP))// 住院
            //{
            //    string whereStr = string.Format("a0.id_en='{0}' and a0.code_entp='{1}' and a0.fg_pres_outp='N' ", id_en, code_entp);
            //    ciOrders = this.orderItemMService.find(whereStr, "a0.createdtime  " + orderStr, FBoolean.False);
            //}
            //else if(BdFcDictCodeConst.SD_CODE_ENTP_OP.Equals(code_entp) || BdFcDictCodeConst.SD_CODE_ENTP_ET.Equals(code_entp))
            //{
            //    // 医嘱map结构,包含两项,orderList 医嘱list集合,orderPriMap 医嘱id与价格的map集合
            //    FMap2 map = ciOrdQryService.getEnHistoryCiOrders(id_en, code_entp, orderStr);
            //    FArrayList2 orderList = map["orderList"] as FArrayList2;
            //    ciOrders = orderList.Cast<CiOrderDO>().ToArray<CiOrderDO>();

            //    // 医嘱对应的价格 map中key=id_or,vlaue = 价格
            //    PriMap = map["orderPriMap"] as FMap2;
            //    OrdStatusMap = map["orderStatusMap"] as FMap2;
            //}

            // 医嘱map结构,包含两项,orderList 医嘱list集合,orderPriMap 医嘱id与价格的map集合
            FMap2       map       = ciOrdQryService.getEnHistoryCiOrders(id_en, code_entp, orderStr);
            FArrayList2 orderList = map["orderList"] as FArrayList2;

            ciOrders = orderList.Cast <CiOrderDO>().ToArray <CiOrderDO>();

            // 医嘱对应的价格 map中key=id_or,vlaue = 价格
            PriMap       = map["orderPriMap"] as FMap2;
            OrdStatusMap = map["orderStatusMap"] as FMap2;

            foreach (CiOrderDO ciOrder in ciOrders)
            {
                ciOrder.Str_long = ciOrder.Fg_long.Value == true ? "长期" : "临时";
                if (ciOrder.Emp_stop_name == null || ciOrder.Emp_stop_name == "")
                {
                    //如果没有停止医生 则医嘱列表停止时间 不显示 王琪需求
                    ciOrder.Dt_end = null;
                }
                if (ciOrder.Fg_long != FBoolean.True)
                { // 临时医嘱没有停止人
                    ciOrder.Emp_stop_name = null;
                }
                if (!string.IsNullOrEmpty(ciOrder.Id_emp_sign) && !ciOrder.Id_emp_sign.Equals(ciOrder.Id_emp_or))
                {   // 签署人与开立人不是同一人是,显示为 签署人/开立人
                    ciOrder.Emp_sign_name = ciOrder.Emp_sign_name + "/" + ciOrder.Emp_phy_name;
                }
                else
                {
                    ciOrder.Emp_sign_name = ciOrder.Emp_phy_name;
                }
            }

            xapList = new XapDataList <CiOrderDO>(orderItemMService, ciOrders);

            //设定医嘱状态
            bool isOp = code_entp.Equals("00") ? true : false;

            logic.setOrderDisplayStatus(xapList, isOp);
        }