public void ShowFrmPatientInfo(bool isNewPatient) { ipatientInfo.IsNewPatient = isNewPatient; // 新入院病人 if (isNewPatient) { IP_PatientInfo ip_Patient = new IP_PatientInfo(); ip_Patient.Nationality = "156"; // 国籍默认"中国" ip_Patient.Nation = "01"; //民族默认"汉族" ip_Patient.CulturalLevel = "91"; //教育程度默认"不详" ip_Patient.Birthplace = "110102000"; // 地址默认"北京" ip_Patient.DRegisterAddr = "110102000"; // 地址默认"北京" ip_Patient.NAddress = "110102000"; // 地址默认"北京" ip_Patient.RAddress = "110102000"; // 地址默认"北京" ip_Patient.Relation = "01"; ip_Patient.Occupation = "Y10"; ipatientInfo.PatientInfo = ip_Patient; IP_PatList ipList = new IP_PatList(); ipList.MakerDate = DateTime.Now; ipList.Birthday = DateTime.Now; ipList.EnterHDate = DateTime.Now; ipList.PatTypeID = 106; ipList.EnterSituation = "3"; ipatientInfo.PatList = ipList; ((Form)iBaseView["FrmPatientInfo"]).ShowDialog(); } else { // 修改病人信息 Action <ClientRequestData> requestAction = ((ClientRequestData request) => { request.AddData(iAdmissionRegistration.PatientID); request.AddData(iAdmissionRegistration.PatListID); }); ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "AdmissionController", "GetPatientInfo", requestAction); DataTable patientInfoDt = retdata.GetData <DataTable>(0); DataTable patListDt = retdata.GetData <DataTable>(1); if (patientInfoDt != null && patientInfoDt.Rows.Count > 0) { ipatientInfo.PatientInfo = ConvertExtend.ToObject <IP_PatientInfo>(patientInfoDt, 0); } if (patListDt != null && patListDt.Rows.Count > 0) { ipatientInfo.PatList = ConvertExtend.ToObject <IP_PatList>(patListDt, 0); } ((Form)iBaseView["FrmPatientInfo"]).ShowDialog(); } }
public ServiceResponseData SavePatientInfo() { // 是否为新入院病人 bool isNewPatient = requestData.GetData <bool>(2); // 住院登记记录信息 IP_PatList ip_PatList = requestData.GetData <IP_PatList>(1); // 是否为二次入院病人Flg bool twoAdmission = requestData.GetData <bool>(3); bool inpatientReg = requestData.GetData <bool>(4); // 新入院病人需要生成流水号和病案号 if (isNewPatient) { ip_PatList.SerialNumber = decimal.Parse(NewObject <SerialNumberSource>().GetSerialNumber(SnType.住院流水号)); //if (!twoAdmission) //{ // ip_PatList.CaseNumber = NewObject<SerialNumberSource>().GetSerialNumber(SnType.病案号); //} } // 住院病人信息 IP_PatientInfo ip_PatientInfo = requestData.GetData <IP_PatientInfo>(0); string result = NewObject <IpPatien>().PatientRegistration(ip_PatList, ip_PatientInfo, isNewPatient, inpatientReg); if (string.IsNullOrEmpty(result)) { if (isNewPatient) { #region "保存业务消息数据 --Add By ZhangZhong" // 保存业务消息数据 Dictionary <string, string> msgDic = new Dictionary <string, string>(); int workId = requestData.GetData <int>(5); int userId = requestData.GetData <int>(6); int deptId = requestData.GetData <int>(7); msgDic.Add("WorkID", workId.ToString()); // 消息机构ID msgDic.Add("SendUserId", userId.ToString()); // 消息生成人ID msgDic.Add("SendDeptId", deptId.ToString()); // 消息生成科室ID msgDic.Add("PatListID", ip_PatList.PatListID.ToString()); // 病人登记ID NewObject <BusinessMessage>().GenerateBizMessage(MessageType.病人新入院, msgDic); #endregion } } responseData.AddData(result); responseData.AddData(ip_PatList.PatListID); if (isNewPatient) { responseData.AddData(ip_PatList.SerialNumber); } return(responseData); }
public ServiceResponseData QueryMemberInfo() { int member = requestData.GetData <int>(0); //string cardNO = requestData.GetData<string>(0); decimal deposit = 0; IP_PatientInfo ip_Patient = NewObject <IP_PatientInfo>(); IP_PatList ipList = NewObject <IP_PatList>(); bool result = NewObject <IpPatien>().QueryMemberInfo(member, ip_Patient, ipList, out deposit); responseData.AddData(result); responseData.AddData(ip_Patient); responseData.AddData(ipList); responseData.AddData(deposit); return(responseData); }
/// <summary> /// 保存病人入院登记信息 /// </summary> /// <param name="ip_PatList">入院登记信息</param> /// <param name="ip_PatientInfo">病人基本信息</param> /// <param name="isNewPatient">true:新入院/false:修改病人信息</param> /// <param name="inpatientReg">是否为住院证登记</param> /// <returns>错误消息</returns> public string PatientRegistration(IP_PatList ip_PatList, IP_PatientInfo ip_PatientInfo, bool isNewPatient, bool inpatientReg) { if (isNewPatient) { // 检查当前会员是否已办理入院 bool result = NewDao <IIPManageDao>().CheckPatientInTheHospital(ip_PatList.CardNO); if (!result) { return("病人已在院,入院登记失败!"); } // 新入院病人是否为住院证登记 if (inpatientReg) { // 修改住院证信息 NewDao <IIPManageDao>().UpdateInpatientReg(ip_PatList.MemberID); } } // 保存病人登记信息 ip_PatList.OutSituation = ip_PatList.EnterSituation; this.BindDb(ip_PatList); ip_PatList.save(); // 保存病人基本信息 ip_PatientInfo.PatListID = ip_PatList.PatListID; this.BindDb(ip_PatientInfo); ip_PatientInfo.save(); // 新入院病人保存诊断信息 if (isNewPatient) { if (!string.IsNullOrEmpty(ip_PatList.EnterDiseaseName) && !string.IsNullOrEmpty(ip_PatList.EnterDiseaseCode)) { // 保存诊断信息 IPD_Diagnosis diagnosis = NewObject <IPD_Diagnosis>(); diagnosis.PatListID = ip_PatList.PatListID; diagnosis.DeptID = ip_PatList.CurrDeptID; diagnosis.DgsDocID = ip_PatList.CurrDoctorID; diagnosis.DiagnosisTime = DateTime.Now; diagnosis.DiagnosisClass = 67329; diagnosis.Main = 0; diagnosis.DiagnosisName = ip_PatList.EnterDiseaseName; diagnosis.DiagnosisID = 0; diagnosis.ICDCode = ip_PatList.EnterDiseaseCode; this.BindDb(diagnosis); diagnosis.save(); } } return(string.Empty); }
/// <summary> /// 做成病人基本信息 /// </summary> /// <param name="ip_Patient">病人基本信息</param> /// <param name="dtMemberInfo">会员基本信息</param> private void SetPatientInfo(IP_PatientInfo ip_Patient, DataTable dtMemberInfo) { ip_Patient.IdentityNum = dtMemberInfo.Rows[0]["IDNumber"].ToString(); // 身份证号 ip_Patient.Nationality = dtMemberInfo.Rows[0]["Nationality"].ToString(); // 国籍 ip_Patient.Nation = dtMemberInfo.Rows[0]["Nation"].ToString(); // 名族 ip_Patient.Occupation = dtMemberInfo.Rows[0]["Occupation"].ToString(); // 职业 ip_Patient.CulturalLevel = dtMemberInfo.Rows[0]["Degree"].ToString(); // 文化程度 ip_Patient.Birthplace = dtMemberInfo.Rows[0]["CityCode"].ToString(); // 出生地址 ip_Patient.DRegisterAddr = dtMemberInfo.Rows[0]["CityCode"].ToString(); // 户籍地址 ip_Patient.NAddress = dtMemberInfo.Rows[0]["CityCode"].ToString(); // 现住地址 ip_Patient.Phone = dtMemberInfo.Rows[0]["Mobile"].ToString(); // 联系电话 ip_Patient.UnitName = dtMemberInfo.Rows[0]["WorkUnit"].ToString(); // 单位名称 ip_Patient.UnitPhone = dtMemberInfo.Rows[0]["WorkTele"].ToString(); // 单位电话 ip_Patient.RelationName = dtMemberInfo.Rows[0]["RelationName"].ToString(); // 联系人 ip_Patient.Relation = dtMemberInfo.Rows[0]["Relation"].ToString(); // 关系 ip_Patient.RPhone = dtMemberInfo.Rows[0]["RelationTele"].ToString(); // 联系人电话 ip_Patient.Matrimony = dtMemberInfo.Rows[0]["Matrimony"].ToString(); }
/// <summary> /// 会员号读卡入院 /// </summary> /// <param name="cardNO">会员卡号</param> /// <param name="ip_Patient">病人基本信息</param> /// <param name="ipList">病人登记信息</param> /// <param name="deposit">预交金信息</param> /// <returns>true:已开住院证/false:未开住院证</returns> public bool QueryMemberInfo(int memberID, IP_PatientInfo ip_Patient, IP_PatList ipList, out decimal deposit) { deposit = 0; bool inpatientReg = false; // 根据会员卡号读取会员ID DataTable dtPatInfo = NewDao <IIPManageDao>().QueryMemberInfo(memberID); // 检查是否为二次入院 DataTable dtCaseNumber = NewDao <IIPManageDao>().GetCaseNumberByCardNO(memberID); string caseNumber = string.Empty; int times = 1; if (dtCaseNumber != null && dtCaseNumber.Rows.Count > 0) { caseNumber = dtCaseNumber.Rows[0]["CaseNumber"].ToString(); times = dtCaseNumber.Rows.Count + 1; } // 根据会员ID查询是否当前会员是否已开住院证 if (dtPatInfo == null || dtPatInfo.Rows.Count == 0) { throw new Exception("找不到该卡号病人信息"); } else { DataTable inpatientRegDt = NewDao <IIPManageDao>().GetInpatientReg(Convert.ToInt32(dtPatInfo.Rows[0]["MemberID"])); if (inpatientRegDt != null && inpatientRegDt.Rows.Count > 0) { // 已开住院证 inpatientReg = true; if (inpatientRegDt.Rows[0]["Deposit"] != null && inpatientRegDt.Rows[0]["Deposit"] != DBNull.Value) { if (Convert.ToDecimal(inpatientRegDt.Rows[0]["Deposit"]) > 0) { deposit = Convert.ToDecimal(inpatientRegDt.Rows[0]["Deposit"]); } } } SetPatientInfo(ip_Patient, dtPatInfo); SetPatListInfo(ipList, dtPatInfo, caseNumber, times, inpatientReg, inpatientRegDt); } return(inpatientReg); }
/// <summary> /// 读卡或办卡后绑定病人基本信息 /// </summary> /// <param name="dtMemberInfo">病人基本信息</param> /// <param name="caseNumber">病案号</param> /// <param name="times">入院次数</param> private void SetPatientData(DataTable dtMemberInfo, string caseNumber, int times) { IP_PatientInfo ip_Patient = new IP_PatientInfo(); ip_Patient.IdentityNum = dtMemberInfo.Rows[0]["IDNumber"].ToString(); // 身份证号 ip_Patient.Nationality = dtMemberInfo.Rows[0]["Nationality"].ToString(); // 国籍 ip_Patient.Nation = dtMemberInfo.Rows[0]["Nation"].ToString(); // 名族 ip_Patient.Occupation = dtMemberInfo.Rows[0]["Occupation"].ToString(); // 职业 ip_Patient.CulturalLevel = dtMemberInfo.Rows[0]["Degree"].ToString(); // 文化程度 ip_Patient.Birthplace = dtMemberInfo.Rows[0]["CityCode"].ToString(); // 出生地址 ip_Patient.DRegisterAddr = dtMemberInfo.Rows[0]["CityCode"].ToString(); // 户籍地址 ip_Patient.NAddress = dtMemberInfo.Rows[0]["CityCode"].ToString(); // 现住地址 ip_Patient.Phone = dtMemberInfo.Rows[0]["Mobile"].ToString(); // 联系电话 ip_Patient.UnitName = dtMemberInfo.Rows[0]["WorkUnit"].ToString(); // 单位名称 ip_Patient.UnitPhone = dtMemberInfo.Rows[0]["WorkTele"].ToString(); // 单位电话 ip_Patient.RelationName = dtMemberInfo.Rows[0]["RelationName"].ToString(); // 联系人 ip_Patient.Relation = dtMemberInfo.Rows[0]["Relation"].ToString(); // 关系 ip_Patient.RPhone = dtMemberInfo.Rows[0]["RelationTele"].ToString(); // 联系人电话 ip_Patient.Matrimony = dtMemberInfo.Rows[0]["Matrimony"].ToString(); ipatientInfo.PatientInfo = ip_Patient; IP_PatList ipList = new IP_PatList(); ipList.MemberID = int.Parse(dtMemberInfo.Rows[0]["MemberID"].ToString()); ipList.MemberAccountID = Convert.ToInt32(dtMemberInfo.Rows[0]["AccountID"].ToString());//AccountID ipList.CardNO = dtMemberInfo.Rows[0]["CardNO"].ToString(); ipList.CaseNumber = caseNumber; ipList.Times = times; ipList.Sex = dtMemberInfo.Rows[0]["SexCode"].ToString(); ipList.MakerDate = DateTime.Now; // 登记时间 ipList.Birthday = !string.IsNullOrEmpty(dtMemberInfo.Rows[0]["Birthday"].ToString()) ? DateTime.Parse(dtMemberInfo.Rows[0]["Birthday"].ToString()) : DateTime.Now; // 出生日期 ipList.PatDatCardNo = dtMemberInfo.Rows[0]["CardNO"].ToString(); // 诊疗卡号 ipList.PatName = dtMemberInfo.Rows[0]["MemberName"].ToString(); // 病人姓名 ipList.PatTypeID = int.Parse(dtMemberInfo.Rows[0]["PatTypeID"].ToString()); // 病人类型ID ipList.Sex = dtMemberInfo.Rows[0]["Sex"].ToString(); ipList.MedicareCard = dtMemberInfo.Rows[0]["MedicareCard"].ToString(); ipList.EnterHDate = DateTime.Now; ipList.EnterSituation = "3"; ipatientInfo.PatList = ipList; }