Exemplo n.º 1
0
        //费用计算
        /// <summary>
        /// 设置默认费用信息
        /// </summary>
        private clsFirstPageVO m_mthLoadChargeInfo(clsEmrSvc objSvc, clsFirstPageVO p_lstFirstPage)
        {
            clsInHospitalMainCharge[] objChargeArr = null;
            string    m_DblSelf         = null;
            DataTable m_strBBRegisterID = null;
            long      lngRes            = 0;

            //入院时间大于更新时间,采用新版获取费用方式否则手填
            m_strBBRegisterID = objSvc.m_lngGetRgisterIDByInpatientID(p_lstFirstPage.m_strfzyid);
            if (m_strBBRegisterID.Rows.Count < 1)
            {
                lngRes = objSvc.m_lngGetCHRCATE(null, p_lstFirstPage.m_strfzyid, out objChargeArr);
            }
            else
            {
                lngRes = objSvc.m_lngGetChargeChanKe(null, p_lstFirstPage.m_strfzyid, m_strBBRegisterID, out objChargeArr);
            }
            lngRes = objSvc.m_lngGetSelfPay(null, p_lstFirstPage.m_strfzyid, out m_DblSelf);
            if (objChargeArr != null && objChargeArr.Length > 0)
            {
                double dblSum = 0D;
                for (int i = 0; i < objChargeArr.Length; i++)
                {
                    p_lstFirstPage = m_mthSetMoneyValueToUI(objChargeArr[i].m_dblMoney, objChargeArr[i].m_strTypeName, ref dblSum, p_lstFirstPage);
                }
                p_lstFirstPage.m_Dblfsum1 = dblSum;
                if (string.IsNullOrEmpty(m_DblSelf))
                {
                    p_lstFirstPage.m_Dblfzfje = Convert.ToDouble(m_DblSelf);
                }
            }

            return(p_lstFirstPage);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 读取住院信息
        /// </summary>
        /// <param name="p_dtmStartDate">起始日期</param>
        /// <param name="p_dtmEndDate">截止日期</param>
        /// <returns></returns>
        public long m_lngGetInHospitalInfo(DateTime p_dtmStartDate, DateTime p_dtmEndDate, out List <clsFirstPageVO> p_lstFirstPage, out List <clsOperationVO> p_lstOperation)
        {
            long lngRes = -1;

            p_lstFirstPage = new List <clsFirstPageVO>();
            p_lstOperation = new List <clsOperationVO>();
            //Start====读取数据
            clsEmrSvc             objSvc       = (clsEmrSvc)clsObjectGenerator.objCreatorObjectByType(typeof(clsEmrSvc));
            List <clsFirstPageVO> lstFirstPage = null;
            List <clsOperationVO> lstOperation = null;

            objSvc.m_lngGetFirstPageInfo(p_dtmStartDate.ToString(), p_dtmEndDate.ToString(), out lstFirstPage);
            objSvc.m_lngGetOperationInfo(p_dtmStartDate.ToString(), p_dtmEndDate.ToString(), out lstOperation);
            //End====读取数据

            //Start====数据整理
            #region 数据整理
            if (lstFirstPage != null)
            {
                for (int i = 0; i < lstFirstPage.Count; i++) //病案首页
                {
                    lstFirstPage[i].m_strfage       = s_strGetAge(lstFirstPage[i].m_strfbirthday);
                    lstFirstPage[i].m_strfcountrybh = s_strSetCounty()[lstFirstPage[i].m_strfcountry];
                    if (s_strSetNation().ContainsKey(lstFirstPage[i].m_strfnationality))
                    {
                        lstFirstPage[i].m_strfnationalitybh = s_strSetNation()[lstFirstPage[i].m_strfnationality];
                    }
                    else
                    {
                        lstFirstPage[i].m_strfnationalitybh = "99";
                    }

                    //lstFirstPage[i].m_strffbbh = lstFirstPage[i].m_strffb; //付款方式编码

                    if (lstFirstPage[i].m_strfzkdate == DateTime.MinValue)//首次专科时间
                    {
                        lstFirstPage[i].m_strfzkdate = Convert.ToDateTime("1900-01-01");
                    }
                    else
                    {
                        lstFirstPage[i].m_strfzktime = lstFirstPage[i].m_strfzkdate.ToString("HHmmssffff");
                    }

                    if (lstFirstPage[i].m_strDateTime == DateTime.MinValue)//输入时间
                    {
                        lstFirstPage[i].m_strDateTime = Convert.ToDateTime("1900-01-01");
                    }

                    //lstFirstPage[i].m_strfzkdate = lstFirstPage[i].m_strfzkdate; //首次专科日期
                    //lstFirstPage[i].m_strfjobbh = lstFirstPage[i].m_strfjob; //职业编号
                    lstFirstPage[i].m_Intfryqhmmins  = lstFirstPage[i].m_Intfryqhmdays * 24 + lstFirstPage[i].m_Intfryqhmhours * 24 + lstFirstPage[i].m_Intfryqhmmins; //入院前昏迷总分钟
                    lstFirstPage[i].m_Intfryhmcounts = lstFirstPage[i].m_Intfryhmdays * 24 + lstFirstPage[i].m_Intfryhmhours * 24 + lstFirstPage[i].m_Intfryhmmins;    //入院后昏迷总分钟'

                    lstFirstPage[i].m_strfcytime = lstFirstPage[i].m_strfcydate.ToString("HHmmssffff");
                    lstFirstPage[i].m_strfrytime = lstFirstPage[i].m_strfrydate.ToString("HHmmssffff");
                }
                p_lstFirstPage.AddRange(lstFirstPage);
            }
            if (lstOperation != null)
            {
                for (int i = 0; i < lstOperation.Count; i++) //手术
                {
                    string[] strQkYhArr = lstOperation[i].m_strfqiekou.Split('/');
                    if (strQkYhArr.Length == 2)
                    {
                        lstOperation[i].m_strfqiekoubh = strQkYhArr[0];
                        lstOperation[i].m_strfyuhe     = strQkYhArr[1];
                        switch (strQkYhArr[1])
                        {
                        case "甲":
                            lstOperation[i].m_strfyuhebh = "1";
                            break;

                        case "乙":
                            lstOperation[i].m_strfyuhebh = "2";
                            break;

                        case "丙":
                            lstOperation[i].m_strfyuhebh = "3";
                            break;

                        case "其他":
                            lstOperation[i].m_strfyuhebh = "4";
                            break;
                        }
                    }
                }
                p_lstOperation.AddRange(lstOperation);
            }
            #endregion
            //End====数据整理

            lstFirstPage = null;
            lstOperation = null;


            objSvc = null;
            return(lngRes);
        }