/// <summary> /// 获取病人基本信息 /// </summary> /// <param name="p_strPatientCardID">诊疗卡号</param> /// <param name="p_objPatientInfoVO">返回病人信息VO</param> /// <returns></returns> public long m_lngQueryPatientInfo(string p_strPatientCardID, out clsPatientBaseInfo_VO p_objPatientInfoVO) { long lngRes = 0; clsLisBarcodeSortQuerySvc objSvc = (clsLisBarcodeSortQuerySvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsLisBarcodeSortQuerySvc)); lngRes = objSvc.m_lngQueryPatientInfo(p_strPatientCardID, out p_objPatientInfoVO); return(lngRes); }
public long m_lngQueryPatientInfo(string p_strPatientCardID, out clsPatientBaseInfo_VO p_objPatientInfoVO) { p_objPatientInfoVO = null; long lngRes = 0; clsHRPTableService objHRPSvc = null; string strSQL = null; try { strSQL = @"select a.lastname_vchr, a.sex_chr, a.birth_dat from t_bse_patient a, t_bse_patientcard c where a.patientid_chr = c.patientid_chr and c.patientcardid_chr = ? "; IDataParameter[] objDPArr = null; objHRPSvc = new clsHRPTableService(); objHRPSvc.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strPatientCardID; DataTable dtResult = null; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dtResult, objDPArr); if (lngRes > 0 && dtResult != null && dtResult.Rows.Count > 0) { DataRow drTemp = dtResult.Rows[0]; com.digitalwave.iCare.middletier.common.clsGetCurrentTime objSvc = new com.digitalwave.iCare.middletier.common.clsGetCurrentTime(); string strBirthDay = null; DateTime dtTime = objSvc.m_mthGetCurrentDateTime(); p_objPatientInfoVO = new clsPatientBaseInfo_VO(); p_objPatientInfoVO.m_strPatientCardNO = p_strPatientCardID; p_objPatientInfoVO.m_strName = drTemp["lastname_vchr"].ToString().Trim(); p_objPatientInfoVO.m_strSex = drTemp["sex_chr"].ToString().Trim(); strBirthDay = drTemp["birth_dat"].ToString().Trim(); p_objPatientInfoVO.m_strAge = com.digitalwave.Emr.StaticObject.clsConsts.m_strCalAge(strBirthDay, dtTime); } } catch (Exception objEx) { clsLogText objLogger = new clsLogText(); objLogger.LogDetailError(objEx, true); } finally { p_strPatientCardID = null; strSQL = null; objHRPSvc = null; } return(lngRes); }
/// <summary> /// Print /// </summary> void Print() { if (this.dtpOpDate.Tag == null) { MessageBox.Show("手术申请还未保存,不能打印。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataRow dr = this.dtpOpDate.Tag as DataRow; clsSchedulingPrintTool print = new clsSchedulingPrintTool(); clsOperation operation = new clsOperation(); clsOperationRequisition prtVo = new clsOperationRequisition(); clsPatientBaseInfo_VO pVo = new clsPatientBaseInfo_VO(); #region prtVo if (dr["approval_date"] != DBNull.Value) { prtVo.m_dtConfirmdat_dat = Convert.ToDateTime(dr["approval_date"]); prtVo.m_intIfconfirm = 1; prtVo.m_intIfConfirm = 1; prtVo.m_intIscomfim_int = 1; } prtVo.m_dtmApplyOperationDate = dr["operationdate_dat"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr["operationdate_dat"]); // Convert.ToDateTime("2016-11-10 10:10:00"); prtVo.m_dtmNoticeDate = Convert.ToDateTime(this.lblNoticeDate.Text); prtVo.m_dtmOperationDate = prtVo.m_dtmApplyOperationDate; //Convert.ToDateTime(dr["operationdate_dat"]); prtVo.m_dtmOperationEnd = prtVo.m_dtmOperationDate; // Convert.ToDateTime(""); prtVo.m_dtmInPatientDate = dr["inpatientdate_dat"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr["inpatientdate_dat"]); prtVo.m_dtmCreateDate = Convert.ToDateTime(dr["opendate_dat"]); //prtVo.m_dtmDeActivedDate = Convert.ToDateTime("2016-11-12 10:10:00"); prtVo.m_dtmModifyDate = dr["modifydate_dat"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr["modifydate_dat"]); prtVo.m_dtmOpenDate = Convert.ToDateTime(dr["opendate_dat"]); prtVo.m_dtmOperationEnd = prtVo.m_dtmOpenDate; //Convert.ToDateTime("2016-11-12 10:10:00"); prtVo.m_intBacterium = 0; prtVo.m_intEmergency = dr["isemergency_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["isemergency_int"]); prtVo.m_intFrom_int = dr["from_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["from_int"]); prtVo.m_intIsContinuedOperation = dr["iscontinuedoperation_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["iscontinuedoperation_int"]); prtVo.m_intISMINIINVASIVE = dr["isminiinvasive_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["isminiinvasive_int"]); prtVo.m_intIsOperationICF = dr["issignedicf"] == DBNull.Value ? 0 : Convert.ToInt32(dr["issignedicf"]); prtVo.m_strAge_vchr = dr["age_vchr"].ToString(); prtVo.m_strAnadeptid_chr = dr["anadeptid_chr"].ToString(); prtVo.m_strAnaMode = dr["anamode_chr"].ToString(); prtVo.m_strBedno_vchr = dr["bedno_vchr"].ToString(); prtVo.m_strConfirmid_vchr = dr["confirmid_vchr"].ToString(); prtVo.m_strContinuedoperation_vchr = dr["continuedoperation_vchr"].ToString(); prtVo.m_strDeptID = dr["deptid_chr"].ToString(); prtVo.m_strDiagnose = dr["preoperativediagnosis_chr"].ToString(); //prtVo.m_strDiagnoseicd10_vchr = dr[""].ToString(); prtVo.m_strDiseaseName = dr["diseasename_chr"].ToString(); prtVo.m_strEmergency = dr["emergency_chr"].ToString(); if (dr["isisolated_int"] != DBNull.Value) { if (dr["isisolated_int"].ToString() == "1") { prtVo.m_strIsOlationIndicator = "正常"; } else if (dr["isisolated_int"].ToString() == "2") { prtVo.m_strIsOlationIndicator = "隔离"; } else if (dr["isisolated_int"].ToString() == "3") { prtVo.m_strIsOlationIndicator = "放射"; } } //prtVo.m_strOperationcode_vchr = dr[""].ToString(); prtVo.m_strOperationName = dr["operationname_chr"].ToString(); prtVo.m_strOperationPart = dr["operationpart_chr"].ToString(); prtVo.m_strOperationRoomID = dr["operationroomid_chr"].ToString(); //prtVo.m_strOperationRoomName = dr[""].ToString(); //prtVo.m_strOperationScale = dr[""].ToString(); //prtVo.m_strORDERID_CHR = dr[""].ToString(); prtVo.m_strPatientname_vchr = dr["patientname_vchr"].ToString(); prtVo.m_strRemark = dr["remark_chr"].ToString(); prtVo.m_strRollbackreason = dr["rollbackreason"].ToString(); //prtVo.m_strSequence = dr["signsequence_int"].ToString(); prtVo.m_strSex_vchr = dr["sex_vchr"].ToString(); prtVo.m_strSpecialCase = dr["specialcase_chr"].ToString(); prtVo.m_strVisitor = dr["visitor_chr"].ToString(); prtVo.m_strWeight = dr["weight_chr"].ToString(); prtVo.strOPENDATEOriginal = dr["opendate_dat"].ToString(); clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); DataTable dtSign = svc.GetOpRecordSign(Convert.ToDecimal(dr["signsequence_int"])); if (dtSign != null && dtSign.Rows.Count > 0) { string doctType = string.Empty; string doctName = string.Empty; clsEmrSigns_VO signVo = null; prtVo.objSignerArr = new List <clsEmrSigns_VO>(); //new clsEmrSigns_VO[dtSign.Rows.Count];//List<clsEmrSigns_VO>(); //for (int j = 0; j < dtSign.Rows.Count; j++) //{ // doctType = dtSign.Rows[j]["tag_chr"].ToString().Trim(); // doctName = dtSign.Rows[j]["employeename_chr"].ToString().Trim(); // prtVo.objSignerArr[j]. //} foreach (DataRow dr2 in dtSign.Rows) { if (dr2["tag_chr"] != DBNull.Value && dr2["employeename_chr"] != DBNull.Value) { doctType = dr2["tag_chr"].ToString().Trim(); doctName = dr2["employeename_chr"].ToString().Trim(); signVo = new clsEmrSigns_VO(); signVo.controlName = doctType; signVo.objEmployee = new clsEmrEmployeeBase_VO(); signVo.objEmployee.m_strLASTNAME_VCHR = doctName; prtVo.objSignerArr.Add(signVo); } } } #endregion #region patVo pVo.m_datBirthDate = patVo.m_dtBorn; pVo.m_datEmrInPatientDate = patVo.m_dtInHospital; pVo.m_datInPatientDate = patVo.m_dtInHospital; pVo.m_intInPatientCount = 1; pVo.m_strAge = patVo.m_strAge; pVo.m_strBedID = patVo.m_strBedID; pVo.m_strBedName = patVo.m_strBedName; pVo.m_strDaptName = patVo.m_strDeptName; pVo.m_strDeptID = patVo.m_strDeptID; pVo.m_strDeptName = patVo.m_strDeptName; pVo.m_strEmrInPatientID = patVo.m_strInHospitalNo; pVo.m_strInPatientID = patVo.m_strInHospitalNo; pVo.m_strName = patVo.m_strPatientName; pVo.m_strPatientCardNO = patVo.m_strPATIENTCARDID_CHR; pVo.m_strPatientID = patVo.m_strPatientID; pVo.m_strPatientName = patVo.m_strPatientName; pVo.m_strRegisterID = patVo.m_strRegisterID; pVo.m_strSex = patVo.m_strSex; #endregion operation.m_objRequisition = prtVo; operation.m_objPatient = pVo; operation.m_objPatient.m_strDaptName = patVo.m_strDeptName; print.m_mthPrintSingle(operation); print.isPrintLandscape = true; }
/// <summary> /// 查询病人信息 /// </summary> public void m_mthQuery() { string strPatientCardId = m_objViewer.m_txtPatientCard.Text.Trim(); if (string.IsNullOrEmpty(strPatientCardId)) { return; } m_objViewer.m_txtPatientCard.Clear(); long lngRes = 0; clsPatientBaseInfo_VO m_objPatientInfo = null; lngRes = m_objDomain.m_lngQueryPatientInfo(strPatientCardId, out m_objPatientInfo); if (lngRes > 0 && m_objPatientInfo != null) { for (int i = 0; i < m_objViewer.m_dgBarcodeSort.Rows.Count; i++) { if (m_objViewer.m_dgBarcodeSort.Rows[i].Cells["colPatientCard"].Value.ToString() == strPatientCardId) { return; } } if (m_objViewer.m_xmlBarcodeSort != null) { try { XmlNode root = m_objViewer.m_xmlBarcodeSort.SelectSingleNode("Sort"); XmlElement xmlEment = m_objViewer.m_xmlBarcodeSort.CreateElement("Item"); XmlNode childNode = m_objViewer.m_xmlBarcodeSort.CreateElement("PatientCard"); childNode.InnerText = strPatientCardId; xmlEment.AppendChild(childNode); childNode = m_objViewer.m_xmlBarcodeSort.CreateElement("DateTime"); childNode.InnerText = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); xmlEment.AppendChild(childNode); childNode = m_objViewer.m_xmlBarcodeSort.CreateElement("PatientName"); childNode.InnerText = m_objPatientInfo.m_strName; xmlEment.AppendChild(childNode); childNode = m_objViewer.m_xmlBarcodeSort.CreateElement("PatientSex"); childNode.InnerText = m_objPatientInfo.m_strSex; xmlEment.AppendChild(childNode); childNode = m_objViewer.m_xmlBarcodeSort.CreateElement("PatientAge"); childNode.InnerText = m_objPatientInfo.m_strAge; xmlEment.AppendChild(childNode); root.AppendChild(xmlEment); DataRow drTemp = m_objViewer.m_dtBaricodeSort.NewRow(); drTemp["PatientCard"] = strPatientCardId; drTemp["DateTime"] = DateTime.Now; drTemp["PatientName"] = m_objPatientInfo.m_strName; drTemp["PatientSex"] = m_objPatientInfo.m_strSex; drTemp["PatientAge"] = m_objPatientInfo.m_strAge; m_objViewer.m_dtBaricodeSort.Rows.Add(drTemp); m_objViewer.m_dtBaricodeSort.AcceptChanges(); m_objViewer.m_xmlBarcodeSort.Save("PatientBarcodeSort.XML"); } catch (Exception objEx) { MessageBox.Show(objEx.Message); } } if (m_objViewer.m_dgBarcodeSort.DataSource == null) { m_objViewer.m_dgBarcodeSort.DataSource = m_objViewer.m_dtBaricodeSort; } m_objViewer.m_dgBarcodeSort.Rows[0].Selected = true; } }