|
@@ -160,43 +160,24 @@ namespace ZLPlugin_LisPacs_MR
|
|
Recordset rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(), code);
|
|
Recordset rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(), code);
|
|
string json = Tools.RecordsetToJson(rd);
|
|
string json = Tools.RecordsetToJson(rd);
|
|
clientSend.Send(json);
|
|
clientSend.Send(json);
|
|
- //Tools.Delay(10000, 0);
|
|
|
|
-
|
|
|
|
- bool status = true; int i = 0;
|
|
|
|
- var begintime = DateTime.Now.Ticks;
|
|
|
|
- TimeSpan timeSpan = new TimeSpan();
|
|
|
|
Log.Info("初始化完成!");
|
|
Log.Info("初始化完成!");
|
|
- while (status)
|
|
|
|
|
|
+ try
|
|
{
|
|
{
|
|
- timeSpan = new TimeSpan(DateTime.Now.Ticks - begintime);
|
|
|
|
- //Thread.Sleep(3000);
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- clientSend.Receive();
|
|
|
|
- }
|
|
|
|
- catch (Exception e)
|
|
|
|
- {
|
|
|
|
- Log.Info("接收失败!" + e.Message);
|
|
|
|
- }
|
|
|
|
- if (timeSpan.TotalSeconds > 10 || !string.IsNullOrWhiteSpace(SocketClient.Message))
|
|
|
|
- {
|
|
|
|
- status = false;
|
|
|
|
- }
|
|
|
|
- Log.Info("timeSpan.TotalSeconds:" + timeSpan.TotalSeconds);
|
|
|
|
- i++;
|
|
|
|
-
|
|
|
|
|
|
+ clientSend.WhileReceive();
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ Log.Info("接收失败!" + e.Message);
|
|
}
|
|
}
|
|
- Log.Info("22222" + SocketClient.Message);
|
|
|
|
-
|
|
|
|
if (!string.IsNullOrWhiteSpace(SocketClient.Message))
|
|
if (!string.IsNullOrWhiteSpace(SocketClient.Message))
|
|
{
|
|
{
|
|
- Log.Info(SocketClient.Message);
|
|
|
|
ResultsEx rex = new ResultsEx();
|
|
ResultsEx rex = new ResultsEx();
|
|
rex = JSON.JsonToObject<ResultsEx>(Tools.FormatStr(SocketClient.Message), Encoding.UTF8);
|
|
rex = JSON.JsonToObject<ResultsEx>(Tools.FormatStr(SocketClient.Message), Encoding.UTF8);
|
|
if (rex.ResultCode == 2)//有互认
|
|
if (rex.ResultCode == 2)//有互认
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ clientSend.WhileReceive();
|
|
MessageBox.Show("回传数据至his!");
|
|
MessageBox.Show("回传数据至his!");
|
|
- clientSend.Receive();
|
|
|
|
//SocketClient.Message = null;
|
|
//SocketClient.Message = null;
|
|
return SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, 1);
|
|
return SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, 1);
|
|
}
|
|
}
|
|
@@ -267,11 +248,8 @@ namespace ZLPlugin_LisPacs_MR
|
|
}
|
|
}
|
|
#endregion
|
|
#endregion
|
|
}*/
|
|
}*/
|
|
- string hisApplyId =Tools.Generate16CharUUID();
|
|
|
|
- Log.Info("hisApplyId=" + hisApplyId);
|
|
|
|
|
|
+
|
|
string patientSource = ""; //病人来源
|
|
string patientSource = ""; //病人来源
|
|
-
|
|
|
|
-
|
|
|
|
string code = ""; // 又算开单唯一id
|
|
string code = ""; // 又算开单唯一id
|
|
string billProjectNames = ""; //开单项目名称
|
|
string billProjectNames = ""; //开单项目名称
|
|
List<Codes> listlis;
|
|
List<Codes> listlis;
|
|
@@ -279,6 +257,8 @@ namespace ZLPlugin_LisPacs_MR
|
|
LisPacs_MR_Bll.GetTreatmentId(ss_list, out code, out listlis, out listpacs,out billProjectNames);
|
|
LisPacs_MR_Bll.GetTreatmentId(ss_list, out code, out listlis, out listpacs,out billProjectNames);
|
|
Log.Info("code=="+code);
|
|
Log.Info("code=="+code);
|
|
Log.Info("billProjectNames==" + billProjectNames);
|
|
Log.Info("billProjectNames==" + billProjectNames);
|
|
|
|
+ string hisApplyId = Tools.Generate16CharGUID();
|
|
|
|
+ Log.Info("hisApplyId=" + hisApplyId);
|
|
Recordset rd = new Recordset();
|
|
Recordset rd = new Recordset();
|
|
decimal totalPrice = 0;
|
|
decimal totalPrice = 0;
|
|
int hrType = 0;
|
|
int hrType = 0;
|
|
@@ -356,32 +336,16 @@ namespace ZLPlugin_LisPacs_MR
|
|
string json = Tools.RecordsetToJson(rd);
|
|
string json = Tools.RecordsetToJson(rd);
|
|
Log.Info("save发送json ===" + json);
|
|
Log.Info("save发送json ===" + json);
|
|
socketClient.Send(json);
|
|
socketClient.Send(json);
|
|
- //Tools.Delay(waittingdate, 0);
|
|
|
|
- bool status = true; int i = 0;
|
|
|
|
- var begintime = DateTime.Now.Ticks;
|
|
|
|
- TimeSpan timeSpan = new TimeSpan();
|
|
|
|
- Log.Info("初始化完成!");
|
|
|
|
- while (status)
|
|
|
|
|
|
+
|
|
|
|
+ try
|
|
{
|
|
{
|
|
- timeSpan = new TimeSpan(DateTime.Now.Ticks - begintime);
|
|
|
|
- //Thread.Sleep(3000);
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- socketClient.Receive();
|
|
|
|
- }
|
|
|
|
- catch (Exception e)
|
|
|
|
- {
|
|
|
|
- Log.Info("接收失败!"+ e.Message);
|
|
|
|
- }
|
|
|
|
- if (timeSpan.TotalSeconds > 10 || !string.IsNullOrWhiteSpace(SocketClient.Message))
|
|
|
|
- {
|
|
|
|
- status = false;
|
|
|
|
- }
|
|
|
|
- Log.Info("timeSpan.TotalSeconds:" + timeSpan.TotalSeconds);
|
|
|
|
- i++;
|
|
|
|
-
|
|
|
|
|
|
+ socketClient.WhileReceive();
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ Log.Info("接收失败!"+ e.Message);
|
|
}
|
|
}
|
|
- Log.Info("22222"+SocketClient.Message);
|
|
|
|
|
|
+
|
|
Log.Info("退出循环!");
|
|
Log.Info("退出循环!");
|
|
Log.Info("listlis count!" + listlis.Count);
|
|
Log.Info("listlis count!" + listlis.Count);
|
|
Log.Info("listpacs count!" + listpacs.Count);
|
|
Log.Info("listpacs count!" + listpacs.Count);
|
|
@@ -391,12 +355,10 @@ namespace ZLPlugin_LisPacs_MR
|
|
rex = JSON.JsonToObject<ResultsEx>(Tools.FormatStr(SocketClient.Message), Encoding.UTF8);
|
|
rex = JSON.JsonToObject<ResultsEx>(Tools.FormatStr(SocketClient.Message), Encoding.UTF8);
|
|
if (rex.ResultCode == 2)//有互认
|
|
if (rex.ResultCode == 2)//有互认
|
|
{
|
|
{
|
|
|
|
+ socketClient.WhileReceive();
|
|
MessageBox.Show("回传数据至his!");
|
|
MessageBox.Show("回传数据至his!");
|
|
- socketClient.Receive();
|
|
|
|
- // SocketClient.Message = null;
|
|
|
|
- Log.Info("2:" + SocketClient.Message);
|
|
|
|
SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, -1);
|
|
SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, -1);
|
|
- //保存开单项目
|
|
|
|
|
|
+ //保存开单项目
|
|
int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), hisApplyId, hrType.ToString(), Infos.UserInfo.姓名, patientSource);
|
|
int ii = LisPacs_MR_Bll.InsertHuRenBillProject(Dns.GetHostName(), lngPatientID, billProjectNames, 999, Tools.GetHostIp(), Infos.UserInfo.ID.ToString(), hisApplyId, hrType.ToString(), Infos.UserInfo.姓名, patientSource);
|
|
Log.Info("开单状态="+ ii);
|
|
Log.Info("开单状态="+ ii);
|
|
socketClient.Close();
|
|
socketClient.Close();
|