/// <summary> /// 根据申请单号获取申请单详细信息 /// </summary> /// <returns></returns> public static RequestInfoResult GetRequestionBySheetId(string sheetId) { // RequestNoteSoap ws = new RequestNoteSoapClient(); Request req = new Request(); req.requestHeader = new RequestHeader(); req.requestHeader.sender = "2.16.840.1.113883.4.487.2.1.9"; req.requestHeader.receiver = "2.16.840.1.113883.4.487.2.1.3"; req.requestHeader.requestTime = DateTime.Now.ToString("yyyyMMddHH24mmss"); req.requestHeader.msgType = "RequisitionFind"; req.requestHeader.msgId = "SPEC20140909000009"; req.requestHeader.msgPriority = "Normal"; req.requestHeader.msgVersion = "1.0"; req.requestBody = $@" <RequisitionFind> <SheetID>{sheetId}</SheetID> <ExamID></ExamID> </RequisitionFind>" ; RequestNote note = new RequestNote(); note.Url = f.ReadString("广州中山附一", "平台服务url", "http://168.168.252.112:4463/RequestNote"); log.WriteMyLog("尝试从电子申请单WebService获取信息,入参:\r\n" + req.requestBody + "\r\nUrl:" + note.Url); RequestInfoResult result = null; try { var respones = note.RequisitionFind(req); log.WriteMyLog("获取电子申请单信息成功:" + respones.responseBody); result = XmlUtil.Deserialize <RequestInfoResult>(respones.responseBody); } catch (Exception e) { log.WriteMyLog("从电子申请单WebService获取信息失败:\r\n" + e); } //SheetID(电子申请单ID)为空,代表没找到申请单 if (string.IsNullOrEmpty(result.SheetID)) { result = null; } //2017年11月13日 岱嘉张继松: //当是门诊 +特诊+科室不是内镜中心(代码7100)的科室,送检科室全部匹配成特诊门诊,因为这部分报告是需要送到特诊门诊中心的。 if (result != null && (result.PatientStyle == "0" && result.HTH == "82" && result.DepartMentID != "7100")) { result.DepartMent = "特诊门诊"; result.DepartMentID = "6160"; } return(result); }
/// <summary> /// 根据申请单号获取申请单详细信息 /// </summary> /// <returns></returns> public static RequestInfoResult GetRequestionBySheetId(string sheetId) { // RequestNoteSoap ws = new RequestNoteSoapClient(); Request req = new Request(); req.requestHeader = new RequestHeader(); req.requestHeader.sender = "2.16.840.1.113883.4.487.2.1.9"; req.requestHeader.receiver = "2.16.840.1.113883.4.487.2.1.3"; req.requestHeader.requestTime = DateTime.Now.ToString("yyyyMMddHH24mmss"); req.requestHeader.msgType = "RequisitionFind"; req.requestHeader.msgId = "SPEC20140909000009"; req.requestHeader.msgPriority = "Normal"; req.requestHeader.msgVersion = "1.0"; req.requestBody = $@" <RequisitionFind> <SheetID>{sheetId}</SheetID> <ExamID></ExamID> </RequisitionFind>" ; RequestNote note = new RequestNote(); log.WriteMyLog("尝试从电子申请单WebService获取信息,入参:\r\n" + req.requestBody + "\r\nUrl:" + note.Url); RequestInfoResult result = null; try { var respones = note.RequisitionFind(req); log.WriteMyLog("获取电子申请单信息成功:" + respones.responseBody); result = XmlUtil.Deserialize <RequestInfoResult>(respones.responseBody); } catch (Exception e) { log.WriteMyLog("从电子申请单WebService获取信息失败:\r\n" + e); } //SheetID(电子申请单ID)为空,代表没找到申请单 if (string.IsNullOrEmpty(result.SheetID)) { result = null; } return(result); }