Ejemplo n.º 1
0
        public void LoadZYFeeDoc(DateTime beginDate, DateTime endDate, string deptCode)
        {
            try
            {
                _docFeeDt.Rows.Clear();
                DataTable orderDocDt = ZY_Loader.LoadZYDocFee(beginDate, endDate, deptCode);
                if (orderDocDt.Rows.Count > 0)
                {
                    for (int index = 0; index < orderDocDt.Rows.Count; index++)
                    {
                        DataRow currentRow = orderDocDt.Rows[index];
                        string  codeName   = currentRow["codename"].ToString();
                        DataRow findRow    = _docFeeDt.Rows.Find(currentRow["presdoccode"]);
                        if (findRow == null)
                        {
                            DataRow newRow = _docFeeDt.NewRow();
                            for (int temp = 0; temp < _queryItemDt.Rows.Count; temp++)
                            {
                                DataRow queryTypeRow = _queryItemDt.Rows[temp];
                                newRow[queryTypeRow["item_name"].ToString()] = 0;
                            }
                            string docName = currentRow["docname"].ToString().Trim();
                            newRow["医生名称"]        = (docName == "" ? "未指定" : docName);
                            newRow["总收入"]         = Convert.ToDecimal(currentRow["totalfee"]);
                            newRow["presdoccode"] = currentRow["presdoccode"].ToString();
                            newRow[codeName]      = Convert.ToDecimal(currentRow["totalfee"]);
                            _docFeeDt.Rows.Add(newRow);
                        }
                        else
                        {
                            findRow["总收入"] = Convert.ToDecimal(findRow["总收入"]) +
                                             Convert.ToDecimal(currentRow["totalfee"]);
                            findRow[codeName] = Convert.ToDecimal(findRow[codeName]) +
                                                Convert.ToDecimal(currentRow["totalfee"]);
                        }
                    }
                    DataRow totalRow = _docFeeDt.NewRow();

                    totalRow["医生名称"] = "合计";
                    for (int temp = 1; temp < _docFeeDt.Columns.Count; temp++)
                    {
                        string columnName = _docFeeDt.Columns[temp].ColumnName;
                        totalRow[columnName] = 0;
                        for (int index = 0; index < _docFeeDt.Rows.Count; index++)
                        {
                            totalRow[columnName] = Convert.ToDecimal(totalRow[columnName])
                                                   + Convert.ToDecimal(_docFeeDt.Rows[index][columnName]);
                        }
                    }
                    totalRow["presdoccode"] = "-1";
                    _docFeeDt.Rows.Add(totalRow);
                }
                _frmzyfeequery.RefreshDocFee(_docFeeDt);
            }
            catch (Exception error)
            {
                throw error;
            }
        }
 public List <ZY_PatList> LoadPatBy(bool isInHospital, int deptId)
 {
     try
     {
         return(ZY_Loader.LoadZYPat(deptId, isInHospital));
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Ejemplo n.º 3
0
 public void LoadZYFeePat(DateTime beginDate, DateTime endDate, string docCode, string deptCode)
 {
     try
     {
         _patFeeDt = ZY_Loader.LoadZYPatFee(beginDate, endDate, docCode, deptCode);
         _frmzyfeequery.RefreshPatFee(_patFeeDt);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Ejemplo n.º 4
0
 private void LoadData()
 {
     try
     {
         MZ_Loader.SetManagerDiary(_managerDiary, cobBeginDate.Value, cobEndDate.Value);
         ZY_Loader.SetManagerDiary(_managerDiary, cobBeginDate.Value, cobEndDate.Value);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Ejemplo n.º 5
0
        public void LoadData(DateTime beginTime, DateTime endTime, string itemCode)
        {
            try
            {
                switch (_searchType)
                {
                case SearchType.门诊:
                    _presDeptFeeDt = MZ_Loader.LoadItemFeeByDept(beginTime, endTime, itemCode);
                    _presDocFeeDt  = MZ_Loader.LoadItemFeeByDoc(beginTime, endTime, itemCode);
                    break;

                case SearchType.住院:
                    _presDeptFeeDt = ZY_Loader.LoadItemFeeByDept(beginTime, endTime, itemCode);
                    _presDocFeeDt  = ZY_Loader.LoadItemFeeByDoc(beginTime, endTime, itemCode);
                    break;

                default:
                    DataTable dtMZDoc  = MZ_Loader.LoadItemFeeByDoc(beginTime, endTime, itemCode);
                    DataTable dtZYDoc  = ZY_Loader.LoadItemFeeByDoc(beginTime, endTime, itemCode);
                    DataTable dtMZDept = MZ_Loader.LoadItemFeeByDept(beginTime, endTime, itemCode);
                    DataTable dtZYDept = ZY_Loader.LoadItemFeeByDept(beginTime, endTime, itemCode);
                    for (int index = 0; index < dtMZDoc.Rows.Count; index++)
                    {
                        dtZYDoc.Rows.Add(dtMZDoc.Rows[index].ItemArray);
                    }
                    _presDocFeeDt = dtZYDoc;
                    for (int index = 0; index < dtMZDept.Rows.Count; index++)
                    {
                        dtZYDept.Rows.Add(dtMZDept.Rows[index].ItemArray);
                    }
                    _presDeptFeeDt = dtZYDept;
                    break;
                }
            }
            catch (Exception error)
            {
                throw error;
            }
        }
 public void LoadZYPatFee()
 {
     try
     {
         decimal patTotalFee  = 0;
         decimal patPrePayFee = 0;
         if (_currentPat != null)
         {
             _currentPatHSItemFee.Rows.Clear();
             _currentPatBigItemFee.Rows.Clear();
             _currentPatItemFee   = ZY_Loader.LoadZYPatFee(_currentPat._zyPatient);
             _currentPatPrePayFee = ZY_Loader.LoadZYPrePayFee(_currentPat._zyPatient);
             for (int index = 0; index < _currentPatPrePayFee.Rows.Count; index++)
             {
                 DataRow prePayFeeRow = _currentPatPrePayFee.Rows[index];
                 patPrePayFee += Convert.ToDecimal(prePayFeeRow["TOTAL_FEE"]);
             }
             for (int index = 0; index < _currentPatItemFee.Rows.Count; index++)
             {
                 DataRow currentRow  = _currentPatItemFee.Rows[index];
                 string  bigItemCode = currentRow["BIGITEMTYPE"].ToString();
                 string  hsCode      = currentRow["HSCODE"].ToString();
                 patTotalFee += Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                 DataRow findBigItemRow = _currentPatBigItemFee.Rows.Find(bigItemCode);
                 if (findBigItemRow != null)
                 {
                     findBigItemRow["PRJFEE"] = Convert.ToDecimal(findBigItemRow["PRJFEE"])
                                                + Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                 }
                 else
                 {
                     DataRow newRow = _currentPatBigItemFee.NewRow();
                     newRow["PRJCODE"] = currentRow["BIGITEMTYPE"].ToString();
                     newRow["PRJNAME"] = currentRow["BIGITEMNAME"].ToString();
                     newRow["PRJFEE"]  = Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                     _currentPatBigItemFee.Rows.Add(newRow);
                 }
                 DataRow findHSItemRow = _currentPatHSItemFee.Rows.Find(hsCode);
                 if (findHSItemRow != null)
                 {
                     findHSItemRow["PRJFEE"] = Convert.ToDecimal(findHSItemRow["PRJFEE"])
                                               + Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                 }
                 else
                 {
                     DataRow newRow = _currentPatHSItemFee.NewRow();
                     newRow["PRJCODE"] = currentRow["HSCODE"].ToString();
                     newRow["PRJNAME"] = currentRow["HSNAME"].ToString();
                     newRow["PRJFEE"]  = Convert.ToDecimal(currentRow["TOTAL_FEE"]);
                     _currentPatHSItemFee.Rows.Add(newRow);
                 }
             }
             _currentPat.TotalFee  = patTotalFee;
             _currentPat.PrePayFee = patPrePayFee;
             _formInterface.RefreshPatInfo(_currentPat);
         }
         _formInterface.RefreshPatFee(_currentPatItemFee,
                                      _currentPatBigItemFee, _currentPatHSItemFee);
     }
     catch (Exception error)
     {
         throw error;
     }
 }