Ejemplo n.º 1
0
        public ServiceResponseData GetRegPatListByCardNo()
        {
            OP_Enum.MemberQueryType queryType = requestData.GetData <OP_Enum.MemberQueryType>(0); //查找类型
            string            content         = requestData.GetData <string>(1);                  //卡号
            List <OP_PatList> patlist         = NewObject <OutPatient>().GetPatlist(queryType, content);

            responseData.AddData(patlist);
            return(responseData);
        }
Ejemplo n.º 2
0
        public ServiceResponseData GetBackFeeByInvoiceNO()
        {
            try
            {
                OP_Enum.MemberQueryType queryType = requestData.GetData <OP_Enum.MemberQueryType>(0); //查找类型
                string content = requestData.GetData <string>(1);                                     //退费发票号
                List <OP_FeeRefundHead> listRefundHead = NewObject <OP_FeeRefundHead>().getlist <OP_FeeRefundHead>(" invoicenum='" + content + "' and flag=0 and RefundPayFlag=0");
                if (listRefundHead == null || listRefundHead.Count == 0)
                {
                    throw new Exception("查不到该票号对应的退费消息");
                }

                List <OP_FeeRefundDetail> refundDetailList = NewObject <OP_FeeRefundDetail>().getlist <OP_FeeRefundDetail>(" ReHeadID=" + listRefundHead[0].ReHeadID);
                foreach (OP_FeeRefundDetail feerefundDetail in refundDetailList)
                {
                    if (feerefundDetail.RefundAmount > 0 && feerefundDetail.DistributeFlag == 1 && feerefundDetail.RefundFlag == 0)
                    {
                        throw new Exception("已经发药处方要先退药才能退费");
                    }
                }

                OP_PatList patlist = NewObject <OP_PatList>().getmodel(listRefundHead[0].PatListID) as OP_PatList;
                responseData.AddData(patlist);
                List <Prescription> preslist = NewObject <PrescriptionProcess>().GetPrescriptionByInvoiceNo(content, patlist.PatListID);
                DataTable           dtRefund = EFWCoreLib.CoreFrame.Common.ConvertExtend.ToDataTable <Prescription>(preslist);// EFWCoreLib.CoreFrame.Common.ConvertExtend.ToDataTable(preslist);
                responseData.AddData(dtRefund);

                int         costheadid = preslist[0].CostHeadID;
                OP_CostHead costHead   = NewObject <OP_CostHead>().getmodel(costheadid) as OP_CostHead;
                responseData.AddData(costHead.PatTypeID);
                return(responseData);
            }
            catch (Exception err)
            {
                throw new Exception(err.Message);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 通过指定查询类别和内容获取挂号病人信息
        /// </summary>
        /// <param name="queryType">查询类别</param>
        /// <param name="content">查询内容</param>
        /// <returns>病人信息</returns>
        public List <OP_PatList> GetPatlist(OP_Enum.MemberQueryType queryType, string content)
        {
            List <OP_PatList> patlist = new List <OP_PatList>();

            if (queryType == OP_Enum.MemberQueryType.门诊就诊号)
            {
                if (content.Length <= 3)
                {
                    content = DateTime.Now.ToString("yyyyMMdd") + content;
                }

                patlist = NewObject <OP_PatList>().getlist <OP_PatList>(" visitno='" + content + "'").OrderByDescending(p => p.RegDate).ToList();
            }
            else if (queryType == OP_Enum.MemberQueryType.退费发票号)
            {
            }
            else
            {
                DataTable dtPatlist = NewObject <IOPManageDao>().GetRegPatList(queryType, content);
                patlist = EFWCoreLib.CoreFrame.Common.ConvertExtend.ToList <OP_PatList>(dtPatlist).OrderByDescending(p => p.RegDate).ToList();
            }

            return(patlist);
        }