public static YHResponse <T> get(YHRequest request) { YHResponse <T> response = new YHResponse <T>(); try { //LogUtil.writeLog("MQ请求数据:" + request.getQueryXml()); long ret = 0; string respMsgId = ""; string respMsg = ""; MQDLL.MQFuntion MQManagment = new MQDLL.MQFuntion(); ret = MQManagment.connectMQ(); ret = MQManagment.putMsg(request.Fid, request.getQueryXml(), ref respMsgId); ret = MQManagment.getMsgById(request.Fid, respMsgId, 60000, ref respMsg); MQManagment.disconnectMQ(); response.xmlData = XmlUtil.filterSpASCII(respMsg); response.success = true; response = convert(response); } catch (Exception e) { response.msg = "调用医惠MQ出现错误"; response.success = false; //while (e != null) //{ // MessageBox.Show(e.Message); // e = e.InnerException; //} MessageBox.Show(response.msg); //LogUtil.writeLog("调用医惠MQ出现错误:" + e.ToString()); } return(response); }
/// <summary> /// 根据读卡信息查询His接口信息 /// 2017-12-05 cc /// </summary> /// <param name="PAT_INDEX_NO">病人ID</param> /// <param name="CARD_NO">就诊卡号</param> /// <param name="isNowDay">是否查询当天</param> /// <returns></returns> public static IList <HisPatientInfo> GetListHisPatientInfo(string PAT_INDEX_NO, string CARD_NO, bool isNowDay) { YHRequest YHReq = new YHRequest(YHRequest.fid_get_hisregist); if (isNowDay) { YHReq.addQuery(YHRequest.item_date, YHRequest.compy_gt, "to_date('" + DateTime.Now.Date.ToString("yyyy-MM-dd") + "','yyyy-MM-dd')", YHRequest.splice_and); } if (!string.IsNullOrEmpty(PAT_INDEX_NO)) { YHReq.addQuery(YHRequest.item_patient, YHRequest.compy_equals, "'" + PAT_INDEX_NO + "'", YHRequest.splice_and); } if (!string.IsNullOrEmpty(CARD_NO)) { YHReq.addQuery(YHRequest.item_visit_no, YHRequest.compy_equals, "'" + CARD_NO + "'", YHRequest.splice_and); } var result = YHMQUtil <HisPatientInfo> .get(YHReq); if (result.success) { return(result.dataList); } else { return(null); } }
/// <summary> /// 根据条件查询 /// 2017-11-14 cc /// </summary> /// <param name="txtPatientId">病人ID</param> /// <param name="txtPatientName">姓名</param> /// <param name="txtSex">性别</param> /// <param name="txtBirth">出生日期</param> /// <param name="txtStartTime">开始时间</param> /// <param name="txtEbdTime">结束时间</param> /// <returns></returns> public IList <HisPatientInfo> GetListRequest(string txtPatientId, string txtPatientName, string txtSex, string txtBirth, string txtStartTime, string txtEbdTime) { YHRequest YHReq = new YHRequest(YHRequest.fid_get_hisregist); if (!string.IsNullOrEmpty(txtPatientId)) { YHReq.addQuery(YHRequest.item_patient, YHRequest.compy_equals, "'" + txtPatientId + "'", YHRequest.splice_and); } if (!string.IsNullOrEmpty(txtPatientName)) { YHReq.addQuery(YHRequest.item_name, YHRequest.compy_like, "'%" + txtPatientName + "%'", YHRequest.splice_and); } if (!string.IsNullOrEmpty(txtSex)) { YHReq.addQuery(YHRequest.item_sex, YHRequest.compy_equals, "'" + txtSex + "'", YHRequest.splice_and); } if (txtStartTime != "") { if (_hospital.Contains("礼嘉")) { YHReq.addQuery(YHRequest.item_date, YHRequest.compy_gt, "to_date('" + txtStartTime + "','yyyy-MM-dd')", YHRequest.splice_and); YHReq.addQuery(YHRequest.item_date, YHRequest.compy_lt, "to_date('" + ((Convert.ToDateTime(txtEbdTime)).AddDays(1)).ToString("yyyy-MM-dd") + "','yyyy-MM-dd') and (REGIST_DEPT_NAME ='礼嘉儿保科' or REGIST_DEPT_NAME = '礼嘉心理科')", YHRequest.splice_and); } else { YHReq.addQuery(YHRequest.item_date, YHRequest.compy_gt, "to_date('" + txtStartTime + "','yyyy-MM-dd')", YHRequest.splice_and); YHReq.addQuery(YHRequest.item_date, YHRequest.compy_lt, "to_date('" + ((Convert.ToDateTime(txtEbdTime)).AddDays(1)).ToString("yyyy-MM-dd") + "','yyyy-MM-dd') and (REGIST_DEPT_NAME ='儿保科' or REGIST_DEPT_NAME = '心理科')", YHRequest.splice_and); } } else { if (_hospital.Contains("礼嘉")) { YHReq.addQuery(YHRequest.item_date, YHRequest.compy_gt_equals, "to_date('" + DateTime.Now.ToString("yyyy-MM-dd") + "','yyyy-MM-dd') and (REGIST_DEPT_NAME ='礼嘉儿保科' or REGIST_DEPT_NAME = '礼嘉心理科')", YHRequest.splice_and); } else { YHReq.addQuery(YHRequest.item_date, YHRequest.compy_gt_equals, "to_date('" + DateTime.Now.ToString("yyyy-MM-dd") + "','yyyy-MM-dd') and (REGIST_DEPT_NAME ='儿保科' or REGIST_DEPT_NAME = '心理科')", YHRequest.splice_and); } } if (!string.IsNullOrEmpty(txtBirth)) { YHReq.addQuery(YHRequest.item_birth, YHRequest.compy_equals, "to_date('" + txtBirth + "','yyyy-MM-dd')", YHRequest.splice_and); } var result = YHMQUtil <HisPatientInfo> .get(YHReq); if (result.success) { return(result.dataList); } else { return(null); } }
/// <summary> /// 获取读芯片号对象 /// 2017-11-29 cc /// </summary> /// <returns></returns> public static HisChipInfo GetChipObj() { if (IsSuccess()) { string chipnum = GetChipNum(); YHRequest YHReq = new YHRequest(YHRequest.fid_get_hischip); YHReq.addQuery(YHRequest.item_chip, YHRequest.compy_equals, "'" + chipnum + "'", YHRequest.splice_and); var result = YHMQUtil <HisChipInfo> .get(YHReq); HisChipInfo hisobj = result.data; return(hisobj); } else { return(null); } }