public long m_lngUpdateLIMITRATE(clsBIHPatientInfo objPatient) { long lngAff = 0; long lngRes = 0; com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] arrParams = null; DataTable dtbResult = new DataTable(); string strSQL = ""; strSQL = @" update T_Opr_BIH_Register set LIMITRATE_MNY=? where REGISTERID_CHR=? "; int n = -1; objHRPSvc.CreateDatabaseParameter(2, out arrParams); n++; arrParams[n].Value = objPatient.m_dblLIMITRATE_MNY; n++; arrParams[n].Value = objPatient.m_strRegisterID; try { lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAff, arrParams); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
private void m_mthGetPatientInfoFromDateTable(DataRow objRow, out clsBIHPatientInfo objPatient) { objPatient = null; if (objRow == null) { return; } objPatient = new clsBIHPatientInfo(); objPatient.m_strRegisterID = Convert.ToString(objRow["RegisterID_Chr"]).Trim(); objPatient.m_strPatientID = Convert.ToString(objRow["PatientID_Chr"]).Trim(); objPatient.m_strInHospitalNo = Convert.ToString(objRow["InPatientID_Chr"]).Trim(); if (!objRow["InPatient_Dat"].ToString().Trim().Equals("")) { objPatient.m_dtInHospital = Convert.ToDateTime(objRow["InPatient_Dat"]); } objPatient.m_strDeptID = Convert.ToString(objRow["DeptID_Chr"]).Trim(); objPatient.m_strAreaID = Convert.ToString(objRow["AreaID_Chr"]).Trim(); objPatient.m_strAreaName = Convert.ToString(objRow["AreaName"]).Trim(); objPatient.m_strBedID = Convert.ToString(objRow["BedID_Chr"]).Trim(); objPatient.m_strBedName = Convert.ToString(objRow["BedName"]).Trim(); /** update by xzf (05-09-29) */ //@ objPatient.m_strDiagnose=Convert.ToString(objRow["Diagnose_Vchr"]).Trim(); objPatient.m_strDiagnose = Convert.ToString(objRow["ICD10DIAGTEXT_VCHR"]).Trim(); /* <<============================= */ if (!objRow["InPatientCount_Int"].ToString().Trim().Equals("")) { objPatient.m_intInTimes = int.Parse(objRow["InPatientCount_Int"].ToString()); } objPatient.m_strPatientName = Convert.ToString(objRow["Name_VChr"]).Trim(); objPatient.m_strSex = Convert.ToString(objRow["Sex_Chr"]).Trim(); if (!objRow["Birth_Dat"].ToString().Trim().Equals("")) { objPatient.m_dtBorn = Convert.ToDateTime(objRow["Birth_Dat"]); } objPatient.m_strPayTypeID = Convert.ToString(objRow["PayTypeID_Chr"]).Trim(); objPatient.m_strPayTypeName = Convert.ToString(objRow["PayTypeName_VChr"]).Trim(); objPatient.m_strInpatientState = Convert.ToString(objRow["PSTATUS_Name"]).Trim(); objPatient.m_strSTATE_INT = Convert.ToString(objRow["state_Name"]).Trim(); objPatient.m_strMzdiagnose_vchr = Convert.ToString(objRow["mzdiagnose_vchr"]).Trim(); objPatient.m_strDiagnose_vchr = Convert.ToString(objRow["diagnose_vchr"]).Trim(); if (objRow["limitrate_mny"] != System.DBNull.Value) { objPatient.m_dblLIMITRATE_MNY = double.Parse(objRow["limitrate_mny"].ToString()); } TimeSpan span1 = Convert.ToDateTime(objRow["today"].ToString().Trim()) - objPatient.m_dtBorn; objPatient.m_intAge = span1.Days / 365; objPatient.m_strREMARKNAME_VCHR = objRow["REMARKNAME_VCHR"].ToString().Trim(); objPatient.m_strDES_VCHR = objRow["DES_VCHR"].ToString().Trim(); objPatient.m_strDOCTORID_CHR = objRow["DOCTORID_CHR"].ToString().Trim(); objPatient.m_strDOCTOR_VCHR = objRow["DOCTOR_VCHR"].ToString().Trim(); objPatient.m_strEatdiccate = objRow["eatdiccate"].ToString().Trim(); objPatient.m_strNursecate = objRow["nursecate"].ToString().Trim(); }
/// <summary> /// 获取病人对象 根据病区ID、病床ID /// </summary> /// <param name="p_strAreaID">病区ID</param> /// <param name="p_strBedID">病床ID</param> /// <param name="p_objResult"></param> /// <returns></returns> public long m_lngGetPatientByAreaBed(string p_strAreaID, string p_strBedID, out clsBIHPatientInfo p_objResult) { long lngRes = 0; com.digitalwave.iCare.middletier.BIHOrderServer.clsBIHOrderService objSvc = (com.digitalwave.iCare.middletier.BIHOrderServer.clsBIHOrderService)clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.BIHOrderServer.clsBIHOrderService)); lngRes = objSvc.m_lngGetPatientByAreaBed(p_strAreaID, p_strBedID, out p_objResult); objSvc.Dispose(); objSvc = null; return(lngRes); }
internal void ViewTheDataWindow() { try { m_objViewer.dw_1.Reset(); int newRow; //DateTime executedate_dat, INPATIENT_DAT; //m_objViewer.dw_1.Modify("area_name.text='" + this.m_objViewer.LoginInfo.m_strInpatientAreaName + "'"); //m_objViewer.dw_1.Modify("execute_dat.text='" + DateTime.Now.ToString("yyyy.MM.dd") + "'"); for (int i = 0; i < this.m_objViewer.m_dgvPatientList.RowCount; i++) { newRow = m_objViewer.dw_1.InsertRow(); clsBIHPatientInfo m_objPatient = (clsBIHPatientInfo)this.m_objViewer.m_dgvPatientList.Rows[i].Tag; m_objViewer.dw_1.SetItemString(newRow, "column1", m_objPatient.m_strPatientName); m_objViewer.dw_1.SetItemString(newRow, "column2", m_objPatient.m_strInHospitalNo); m_objViewer.dw_1.SetItemString(newRow, "column3", m_objPatient.m_strAreaName); m_objViewer.dw_1.SetItemString(newRow, "column4", m_objPatient.m_strSTATE_INT); m_objViewer.dw_1.SetItemString(newRow, "column5", m_objPatient.m_strInpatientState); m_objViewer.dw_1.SetItemString(newRow, "column6", m_objPatient.m_strDOCTOR_VCHR); m_objViewer.dw_1.SetItemString(newRow, "column7", m_objPatient.m_strSex); m_objViewer.dw_1.SetItemString(newRow, "column8", m_objPatient.m_strEatdiccate); m_objViewer.dw_1.SetItemString(newRow, "column9", m_objPatient.m_strNursecate); m_objViewer.dw_1.SetItemString(newRow, "column10", m_objPatient.m_strPayTypeName); m_objViewer.dw_1.SetItemString(newRow, "column11", m_objPatient.m_strREMARKNAME_VCHR); } m_objViewer.dw_1.AcceptText(); m_objViewer.dw_1.Sort(); m_objViewer.dw_1.CalculateGroups(); //m_objViewer.dw_1.Visible = true; DWPrintPreview printPreview = new DWPrintPreview(m_objViewer.dw_1); printPreview.ShowDialog(); } catch (Exception ex) { DWErrorHandler.HandleDWException(ex); } }
/// <summary> /// 构造 /// </summary> /// <param name="_patVo"></param> public frmAntiConsultation(clsBIHPatientInfo _patVo) { InitializeComponent(); patVo = _patVo; }
/// <summary> /// 构造 /// </summary> public frmCpOut(clsBIHPatientInfo _patVo) { InitializeComponent(); this.patVo = _patVo; }
/// <summary> /// 构造 /// </summary> /// <param name="_patVo"></param> public frmOpsApply(clsBIHPatientInfo _patVo) { InitializeComponent(); patVo = _patVo; }
/// <summary> /// 病人表转换成病人信息对象数组 /// </summary> /// <param name="objRow"></param> /// <param name="objPatient"></param> private void m_mthGetPatientInfoFromDateTable(DataTable m_dtPatients, out clsBIHPatientInfo[] m_arrObjPatient) { m_arrObjPatient = new clsBIHPatientInfo[0]; if (m_dtPatients == null) { return; } m_arrObjPatient = new clsBIHPatientInfo[m_dtPatients.Rows.Count]; for (int i = 0; i < m_dtPatients.Rows.Count; i++) { m_arrObjPatient[i] = new clsBIHPatientInfo(); m_arrObjPatient[i].m_strRegisterID = clsConverter.ToString(m_dtPatients.Rows[i]["RegisterID_Chr"]).Trim(); m_arrObjPatient[i].m_strPatientID = clsConverter.ToString(m_dtPatients.Rows[i]["PatientID_Chr"]).Trim(); m_arrObjPatient[i].m_strInHospitalNo = clsConverter.ToString(m_dtPatients.Rows[i]["InPatientID_Chr"]).Trim(); m_arrObjPatient[i].m_dtInHospital = clsConverter.ToDateTime(m_dtPatients.Rows[i]["InPatient_Dat"]); m_arrObjPatient[i].m_strDeptID = clsConverter.ToString(m_dtPatients.Rows[i]["DeptID_Chr"]).Trim(); m_arrObjPatient[i].m_strAreaID = clsConverter.ToString(m_dtPatients.Rows[i]["AreaID_Chr"]).Trim(); m_arrObjPatient[i].m_strAreaName = clsConverter.ToString(m_dtPatients.Rows[i]["AreaName"]).Trim(); m_arrObjPatient[i].m_strBedID = clsConverter.ToString(m_dtPatients.Rows[i]["BedID_Chr"]).Trim(); m_arrObjPatient[i].m_strBedName = clsConverter.ToString(m_dtPatients.Rows[i]["BedName"]).Trim(); /** update by xzf (05-09-29) */ //@ m_arrObjPatient[i].m_strDiagnose=clsConverter.ToString(objRow["Diagnose_Vchr"]).Trim(); m_arrObjPatient[i].m_strDiagnose = clsConverter.ToString(m_dtPatients.Rows[i]["ICD10DIAGTEXT_VCHR"]).Trim(); /* <<============================= */ m_arrObjPatient[i].m_intInTimes = clsConverter.ToInt(m_dtPatients.Rows[i]["InPatientCount_Int"]); m_arrObjPatient[i].m_strPatientName = clsConverter.ToString(m_dtPatients.Rows[i]["Name_VChr"]).Trim(); m_arrObjPatient[i].m_strSex = clsConverter.ToString(m_dtPatients.Rows[i]["Sex_Chr"]).Trim(); m_arrObjPatient[i].m_dtBorn = clsConverter.ToDateTime(m_dtPatients.Rows[i]["Birth_Dat"]); m_arrObjPatient[i].m_strPayTypeID = clsConverter.ToString(m_dtPatients.Rows[i]["PayTypeID_Chr"]).Trim(); m_arrObjPatient[i].m_strPayTypeName = clsConverter.ToString(m_dtPatients.Rows[i]["PayTypeName_VChr"]).Trim(); m_arrObjPatient[i].m_strInpatientState = clsConverter.ToString(m_dtPatients.Rows[i]["state"]).Trim(); m_arrObjPatient[i].m_strMzdiagnose_vchr = clsConverter.ToString(m_dtPatients.Rows[i]["mzdiagnose_vchr"]).Trim(); m_arrObjPatient[i].m_strDiagnose_vchr = clsConverter.ToString(m_dtPatients.Rows[i]["diagnose_vchr"]).Trim(); if (m_dtPatients.Rows[i]["limitrate_mny"] != System.DBNull.Value) { m_arrObjPatient[i].m_dblLIMITRATE_MNY = double.Parse(m_dtPatients.Rows[i]["limitrate_mny"].ToString()); } try { TimeSpan span1 = clsConverter.ToDateTime(m_dtPatients.Rows[i]["today"].ToString().Trim()) - m_arrObjPatient[i].m_dtBorn; m_arrObjPatient[i].m_intAge = span1.Days / 365; } catch { } try { m_arrObjPatient[i].m_strREMARKNAME_VCHR = m_dtPatients.Rows[i]["REMARKNAME_VCHR"].ToString().Trim(); } catch { } try { m_arrObjPatient[i].m_strDES_VCHR = m_dtPatients.Rows[i]["DES_VCHR"].ToString().Trim(); } catch { } } }
/// <summary> /// 构造 /// </summary> /// <param name="_patVo"></param> public frmAntiApply(clsBIHPatientInfo _patVo, int _bizType) { InitializeComponent(); patVo = _patVo; bizType = _bizType; }
public long m_lngGetPatientByCondition(string InPatientID_Chr, string Name_VChr, string AreaID_Chr, string DOCTORID_CHR, string PSTATUS_INT, string STATE_INT, string PayTypeID_Chr, string REMARKID_CHR, DateTime m_dtStart, DateTime m_dtFinish, out clsBIHPatientInfo[] m_ArrobjPatient) { m_ArrobjPatient = new clsBIHPatientInfo[0]; string strSql = @" select * from ( select a.RegisterID_Chr,a.PatientID_Chr,a.InPatientID_Chr,a.InPatient_Dat, a.DeptID_Chr,a.AreaID_Chr,a.BedID_Chr,a.Diagnose_Vchr,a.InPatientCount_Int,a.ICD10DIAGTEXT_VCHR, b.Name_VChr,b.Sex_Chr,b.Birth_Dat, a.PayTypeID_Chr, c.Code_Chr BedName,d.DeptName_VChr AreaName,a.limitrate_mny ,e.flgname_vchr AS PSTATUS_Name ,e2.flgname_vchr AS state_Name ,mzdiagnose_vchr ,f.PAYTYPENAME_VCHR PayTypeName_VChr ,sysdate today ,g.REMARKNAME_VCHR ,a.DES_VCHR ,a.CASEDOCTOR_CHR DOCTORID_CHR ,h.LastName_Vchr DOCTOR_VCHR ,g.REMARKID_CHR ,a.STATE_INT ,a.PSTATUS_INT ,(SELECT h.name_chr AS eatdiccate FROM t_bse_bih_orderdic h, t_opr_bih_order i, t_bse_bih_specordercate j WHERE h.orderdicid_chr = i.orderdicid_chr AND h.ordercateid_chr = j.nursecate AND i.status_int = 2 AND ROWNUM = 1 AND i.registerid_chr = b.registerid_chr) nursecate ,(SELECT h.name_chr AS eatdiccate FROM t_bse_bih_orderdic h, t_opr_bih_order i, t_bse_bih_specordercate j WHERE h.orderdicid_chr = i.orderdicid_chr AND h.ordercateid_chr = j.eatdiccate AND i.status_int = 2 AND ROWNUM = 1 AND i.registerid_chr = b.registerid_chr) eatdiccate from T_Opr_BIH_Register a, t_opr_bih_registerdetail b , T_BSE_Bed c, T_BSE_DeptDesc d, (select flg_int,flgname_vchr from t_sys_flg_table where tablename_vchr = 't_opr_bih_register' and columnname_vchr = 'PSTATUS_INT') e, (select flg_int,flgname_vchr from t_sys_flg_table where tablename_vchr = 't_opr_bih_register' and columnname_vchr = 'STATE_INT') e2, ( select tf.* from T_BSE_PatientPayType tf where tf.isusing_num=1 and tf.payflag_dec!=1) f, T_OPR_BIH_PATSPECREMARK g, t_bse_employee h where a.REGISTERID_CHR=b.REGISTERID_CHR(+) and a.Status_Int=1 --and c.BedID_Chr='[BedIDValue]' and a.REGISTERID_CHR=c.BIHREGISTERID_CHR(+) and a.AreaID_Chr=d.DeptID_Chr(+) AND a.pstatus_int = e.flg_int(+) AND a.STATE_INT = e2.flg_int(+) and a.PayTypeID_Chr=f.PayTypeID_Chr(+) and a.REGISTERID_CHR=g.REGISTERID_CHR(+) and a.CASEDOCTOR_CHR=h.EMPID_CHR(+) order by a.InPatientCount_Int desc ) where 1=1 and LOWER(Name_VChr) like ? and LOWER(InPatientID_Chr) like ? [AreaID_Chr] [DOCTORID_CHR] [PSTATUS_INT] [STATE_INT] [PayTypeID_Chr] [REMARKID_CHR] [INPATIENT_DAT] "; /*<----------------------------------------------*/ if (!AreaID_Chr.Trim().Equals("")) { strSql = strSql.Replace("[AreaID_Chr]", " and AreaID_Chr='" + AreaID_Chr.Trim() + "' "); } else { strSql = strSql.Replace("[AreaID_Chr]", ""); } if (!DOCTORID_CHR.Trim().Equals("")) { strSql = strSql.Replace("[DOCTORID_CHR]", " and DOCTORID_CHR='" + DOCTORID_CHR.Trim() + "' "); } else { strSql = strSql.Replace("[DOCTORID_CHR]", ""); } if (!PSTATUS_INT.Trim().Equals("")) { strSql = strSql.Replace("[PSTATUS_INT]", " and PSTATUS_INT='" + PSTATUS_INT.Trim() + "' "); } else { strSql = strSql.Replace("[PSTATUS_INT]", ""); } if (!STATE_INT.Trim().Equals("")) { strSql = strSql.Replace("[STATE_INT]", " and STATE_INT='" + STATE_INT.Trim() + "' "); } else { strSql = strSql.Replace("[STATE_INT]", ""); } if (!PayTypeID_Chr.Trim().Equals("")) { strSql = strSql.Replace("[PayTypeID_Chr]", " and PayTypeID_Chr='" + PayTypeID_Chr.Trim() + "' "); } else { strSql = strSql.Replace("[PayTypeID_Chr]", ""); } if (!REMARKID_CHR.Trim().Equals("")) { strSql = strSql.Replace("[REMARKID_CHR]", " and REMARKID_CHR='" + REMARKID_CHR.Trim() + "' "); } else { strSql = strSql.Replace("[REMARKID_CHR]", ""); } if (m_dtStart != DateTime.MinValue && m_dtFinish != DateTime.MinValue) { strSql = strSql.Replace("[INPATIENT_DAT]", " and (round(INPATIENT_DAT)>=round(to_date('" + m_dtStart.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-mm-dd hh24:mi:ss')) and round(INPATIENT_DAT)<=round(to_date('" + m_dtFinish.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-mm-dd hh24:mi:ss'))) "); } else { strSql = strSql.Replace("[INPATIENT_DAT]", ""); } DataTable objDT = new DataTable(); clsHRPTableService HRPService = new clsHRPTableService(); long ret = 0; try { System.Data.IDataParameter[] arrParams = null; HRPService.CreateDatabaseParameter(2, out arrParams); arrParams[0].Value = "%" + Name_VChr.ToLower().Trim() + "%"; arrParams[1].Value = "%" + InPatientID_Chr.ToLower().Trim() + "%"; ret = 0; ret = HRPService.lngGetDataTableWithParameters(strSql, ref objDT, arrParams); if ((ret > 0) && (objDT != null) && (objDT.Rows.Count > 0)) { m_ArrobjPatient = new clsBIHPatientInfo[objDT.Rows.Count]; for (int i = 0; i < objDT.Rows.Count; i++) { m_mthGetPatientInfoFromDateTable(objDT.Rows[i], out m_ArrobjPatient[i]); } //add by wjqin()加上相应的预交金,已用金等状态. //--PreMoney 预交金额 //-- PreUseMoney 已用金额(发生的所有费用) //--ClearMoney已清金额 //-- 结余金额=可用预交金(NotUsePreMoney)-已用金额(发生的所有费用) // strSql = @" // select * from // (select sum(round(a.money_dec,2)) PreMoney from t_opr_bih_prepay a where a.registerid_chr='[registerid]')a, // --(select sum(a.money_dec) PreUseMoney from t_opr_bih_prepay a where a.registerid_chr='[registerid]' and a.isclear_int=1)b, // (select sum(round(a.money_dec,2)) NotUsePreMoney from t_opr_bih_prepay a where a.registerid_chr='[registerid]' and a.isclear_int=0)c, // (select sum(round(a.unitprice_dec,2)*round(a.amount_dec,2)) WaitMoney from t_opr_bih_patientcharge a where a.registerid_chr='[registerid]' and a.pstatus_int=1) d, // (select sum(round(a.unitprice_dec,2)*round(a.amount_dec,2)) WaitClearMoney from t_opr_bih_patientcharge a where a.registerid_chr='[registerid]' and a.pstatus_int=2) e, // (select sum(round(a.unitprice_dec,2)*round(a.amount_dec,2)) ClearMoney from t_opr_bih_patientcharge a where a.registerid_chr='[registerid]' and a.pstatus_int=3) f, // (select sum(round(a.unitprice_dec,2)*round(a.amount_dec,2)) PreUseMoney from t_opr_bih_patientcharge a where a.registerid_chr='[registerid]' and a.pstatus_int!=0) b // // "; // strSql = strSql.Replace("[registerid]", objPatient.m_strRegisterID.ToString().Trim()); // ret = HRPService.DoGetDataTable(strSql, ref objDT); // decimal PreMoney = 0, PreUseMoney = 0, NotUsePreMoney = 0, WaitMoney = 0, WaitClearMoney = 0, ClearMoney = 0; // if (objDT.Rows.Count > 0) // { // if (!objDT.Rows[0]["PreMoney"].ToString().Trim().Equals("")) // { // PreMoney = decimal.Parse(objDT.Rows[0]["PreMoney"].ToString().Trim()); // } // if (!objDT.Rows[0]["PreUseMoney"].ToString().Trim().Equals("")) // { // PreUseMoney = decimal.Parse(objDT.Rows[0]["PreUseMoney"].ToString().Trim()); // } // if (!objDT.Rows[0]["NotUsePreMoney"].ToString().Trim().Equals("")) // { // NotUsePreMoney = decimal.Parse(objDT.Rows[0]["NotUsePreMoney"].ToString().Trim()); // } // if (!objDT.Rows[0]["WaitMoney"].ToString().Trim().Equals("")) // { // WaitMoney = decimal.Parse(objDT.Rows[0]["WaitMoney"].ToString().Trim()); // } // if (!objDT.Rows[0]["WaitClearMoney"].ToString().Trim().Equals("")) // { // WaitClearMoney = decimal.Parse(objDT.Rows[0]["WaitClearMoney"].ToString().Trim()); // } // if (!objDT.Rows[0]["ClearMoney"].ToString().Trim().Equals("")) // { // ClearMoney = decimal.Parse(objDT.Rows[0]["ClearMoney"].ToString().Trim()); // } // objPatient.m_decPreMoney = PreMoney; // objPatient.m_decPreUseMoney = PreUseMoney; // objPatient.m_decClearMoney = ClearMoney; // //objPatient.m_decPrePayMoney = PreMoney - PreUseMoney; // objPatient.m_decPrePayMoney = NotUsePreMoney - WaitMoney - WaitClearMoney; //} } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(ret); }
/// <summary> /// 构造 /// </summary> /// <param name="_patVo"></param> public frmChooseRecipe(clsBIHPatientInfo _patVo, DataTable _dtMed) { InitializeComponent(); patVo = _patVo; dtMed = _dtMed; }