Exemplo n.º 1
0
 /// <summary>
 /// 构造收费对象实例
 /// </summary>
 /// <param name="Patient">病人对象</param>
 /// <param name="OperatorId">操作员ID,取EmployeeId</param>
 /// <returns></returns>
 public static BaseCharge CreateChargeObject(OutPatient Patient, int OperatorId, ChargeType chargeType)
 {
     if (chargeType == ChargeType.一张处方一次结算)
     {
         return(new GeneralCharge(Patient, OperatorId, chargeType));
     }
     else
     {
         return(new GeneralChargeEx(Patient, OperatorId, chargeType));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 查找病人信息
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <returns></returns>
        public static OutPatient[] GetPatient(string strWhere)
        {
            List <HIS.Model.MZ_PatList> patList = BindEntity <Model.MZ_PatList> .CreateInstanceDAL(oleDb).GetListArray(strWhere);

            OutPatient[] patients = new OutPatient[patList.Count];

            for (int i = 0; i < patList.Count; i++)
            {
                patients[i] = new OutPatient(patList[i].PatListID);
            }

            return(patients);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 构造一个结算业务类,每个对象的实例对应一次业务操作
        /// 处理过程:保存处方->预算->正式结算->打印发票(可选)
        /// </summary>
        /// <param name="Patient">需要结算的病人对象</param>
        /// <param name="OperatorId">操作员</param>
        public ChargeControl(OutPatient Patient, int OperatorId)
        {
            patient = Patient;
            userId  = OperatorId;

            ChargeType chargeType = (ChargeType)Convert.ToInt32(OPDParamter.Parameters["014"]);


            //ChargeType chargeType = ChargeType.多张处方一次结算;//考虑使用参数

            //根据病人类型实例化结算对象
            chargeObject = ChargeFactory.CreateChargeObject(Patient, OperatorId, chargeType);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 退号
        /// </summary>
        /// <param name="RegInvoiceNo"></param>
        /// <returns></returns>
        public bool CancelRegister(string RegInvoiceNo, string PerfChar)
        {
            try
            {
                RegPatient Patient = GetPatientInfoByInvoiceNo(PerfChar, RegInvoiceNo);
                if (Patient == null)
                {
                    throw new OperatorException("没有找到挂号病人信息!\r\n1、请确认挂号收据号是否正确。\r\n2、如果发票有前缀字符,请确认是否输入前缀字符。\r\n3、确认该号是否已经退号");
                }
                OutPatient     patient = new OutPatient(Patient.PatListID);
                Prescription[] pres    = patient.GetPrescriptions(PresStatus.全部, true);
                if (pres.Length > 0)
                {
                    throw new OperatorException("该病人已经有就诊记录,不能退号");
                }


                register              = RegisterObject.RegisterFactory.CreateRegisterObject(Patient.PatType.Code);
                register.OperatorId   = this.operatorId;
                register.OperatorName = this.operatorName;
                try
                {
                    return(register.CancelRegister(RegInvoiceNo, PerfChar));
                }
                catch (OperatorException operr)
                {
                    throw operr;
                }
                catch (Exception e1)
                {
                    ErrorWriter.WriteLog(e1.Message);
                    throw new Exception("退号操作不成功!请重试");
                }
            }
            catch (Exception err)
            {
                throw err;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 判断挂号病人是否已经退号,如果挂号已经退费,返回true
        /// </summary>
        /// <param name="Patient"></param>
        /// <returns></returns>
        public static bool IsCancelRegister(OutPatient Patient)
        {
            string    sql = @"select record_flag from mz_costmaster where hang_flag =0 
                            and workid=" + EntityConfig.WorkID + " and patlistid=" + Patient.PatListID + "";
            DataTable tb  = oleDb.GetDataTable(sql);

            if (tb.Rows.Count == 0)
            {
                return(false);
            }
            else
            {
                int flag = Convert.ToInt32(tb.Rows[0]["record_flag"]);
                if (flag == 0)
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 根据发票号获取病人信息
        /// </summary>
        /// <param name="InvoiceSerialNo">发票号</param>
        /// <returns></returns>
        public static HIS.Model.MZ_PatList GetPatInfo(string InvoiceSerialNo)
        {
            OutPatient patient = new OutPatient(InvoiceSerialNo, OPDBillKind.门诊收费发票);

            HIS.Model.MZ_PatList model = new HIS.Model.MZ_PatList( );

            model.PatListID    = patient.PatListID;
            model.PatID        = patient.PatID;
            model.PatName      = patient.PatientName;
            model.PatSex       = patient.Sex;
            model.PYM          = patient.PYM;
            model.WBM          = patient.WBM;
            model.MediCard     = patient.MediCard;
            model.MediType     = patient.MediType;
            model.HpCode       = patient.HpCode;
            model.HpGrade      = patient.HpGrade;
            model.CureDeptCode = patient.CureDeptCode;
            model.CureEmpCode  = patient.CureEmpCode;
            model.DiseaseCode  = patient.DiseaseCode;
            model.DiseaseName  = patient.DiseaseName;
            model.CureDate     = patient.CureDate;

            return(model);
        }
Exemplo n.º 7
0
 /// <summary>
 /// 门诊结算对象,该对象实现多张处方一次结算的功能
 /// </summary>
 /// <param name="Patient">要结算的病人对象</param>
 /// <param name="OperatorId">操作员</param>
 public GeneralChargeEx(OutPatient Patient, int OperatorId, ChargeType _ChargeType)
     : base(Patient, OperatorId, _ChargeType)
 {
 }
Exemplo n.º 8
0
 /// <summary>
 /// 收费基类
 /// </summary>
 /// <param name="Patient"></param>
 /// <param name="OperatorId"></param>
 public BaseCharge(OutPatient Patient, int OperatorId, ChargeType _ChargeType)
 {
     _patient    = Patient;
     _operatorId = OperatorId;
     chargeType  = _ChargeType;
 }
Exemplo n.º 9
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="Patient">结算的病人对象</param>
 /// <param name="OperatorId">操作员ID</param>
 public NccmCharge(OutPatient Patient, int OperatorId, ChargeType _ChargeType)
     : base(Patient, OperatorId, _ChargeType)
 {
 }