URIT-500B
This commit is contained in:
parent
54afb99d55
commit
95a9d97ebc
@ -78,7 +78,9 @@
|
|||||||
<add key="Z3 CRP" value="User-2024H-II,Z3 CRP,90,127.0.0.1,6688,GB18030" />
|
<add key="Z3 CRP" value="User-2024H-II,Z3 CRP,90,127.0.0.1,6688,GB18030" />
|
||||||
<!-- URIT-8460 -->
|
<!-- URIT-8460 -->
|
||||||
<add key="URIT-8460" value="PC-202106061449,URIT-8460,121,127.0.0.1,5600,GB18030" />
|
<add key="URIT-8460" value="PC-202106061449,URIT-8460,121,127.0.0.1,5600,GB18030" />
|
||||||
|
<!-- 尿常规URIT-500B -->
|
||||||
|
<add key="URIT-500B" value="wstwsy-PC,MA-4210,90,COM1,9600,NONE,8,1" />
|
||||||
|
|
||||||
<add key="CurrentDevice" value="Z3 CRP"/>
|
<add key="CurrentDevice" value="URIT-500B"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -2557,6 +2557,150 @@ namespace FlyDockTool
|
|||||||
else
|
else
|
||||||
dataOutPutShow("数据提交失败:" + jsonStr, null);
|
dataOutPutShow("数据提交失败:" + jsonStr, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-500B")//URIT-500B
|
||||||
|
{
|
||||||
|
string MachineCode = apiOptions.MachineCode;
|
||||||
|
string MachineID = apiOptions.MachineID;
|
||||||
|
List<examResultMode> ermList = new List<examResultMode>();
|
||||||
|
string[] resulteArray = deviceDataStr.Split('\n');
|
||||||
|
// File.WriteAllText("BT-200.TXT", deviceDataStr);
|
||||||
|
for (int i = 0; i < resulteArray.Length; i += 15)
|
||||||
|
{
|
||||||
|
//这里需要判断一下数据是否超过了当前数据的长度
|
||||||
|
ermList.Clear();
|
||||||
|
if (i + 15 > resulteArray.Length)
|
||||||
|
break;
|
||||||
|
string[] spArray = resulteArray[1].Trim().Split(' ');
|
||||||
|
string sampleNo1 = spArray[0].Replace("NO.","").Replace("0", " ").Trim();
|
||||||
|
|
||||||
|
// string sampleNo1 = spArray.Length > 2 ? spArray[2].Substring(0, 1).TrimStart('0') : "0";
|
||||||
|
// string sampleNo1 = resulteArray[2].Trim().Split(' ')[1]; .Replace("-", "0").TrimStart('0')
|
||||||
|
//string testDate1 = jiexiDate(resulteArray[i + 1], resulteArray[i + 2]);
|
||||||
|
string testDate1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
examResultMode erm = new examResultMode();
|
||||||
|
erm.machineCode = MachineCode;
|
||||||
|
erm.machineID = MachineID;
|
||||||
|
erm.sampleNo = sampleNo1;
|
||||||
|
erm.testDate = testDate1;
|
||||||
|
erm.chanelNo = "WBC";//项目代号
|
||||||
|
erm.itemValue = resulteArray[i + 4].Replace("WBC", "").Replace("CELL/uL", "").Trim().Split(' ')[0].Trim(); //项目结果
|
||||||
|
erm.itemUnit = "";
|
||||||
|
ermList.Add(erm);
|
||||||
|
examResultMode erm1 = new examResultMode();
|
||||||
|
erm1.machineCode = MachineCode;
|
||||||
|
erm1.machineID = MachineID;
|
||||||
|
erm1.sampleNo = sampleNo1;
|
||||||
|
erm1.testDate = testDate1;
|
||||||
|
erm1.chanelNo = "KET";//项目代号
|
||||||
|
erm1.itemValue = resulteArray[i + 5].Replace("KET", "").Replace("mmol/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm1.itemUnit = "";
|
||||||
|
ermList.Add(erm1);
|
||||||
|
|
||||||
|
examResultMode erm2 = new examResultMode();
|
||||||
|
erm2.machineCode = MachineCode;
|
||||||
|
erm2.machineID = MachineID;
|
||||||
|
erm2.sampleNo = sampleNo1;
|
||||||
|
erm2.testDate = testDate1;
|
||||||
|
erm2.chanelNo = "NIT";//项目代号
|
||||||
|
erm2.itemValue = resulteArray[i + 6].Replace("NIT", "").Replace("Neg", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm2.itemUnit = "";
|
||||||
|
ermList.Add(erm2);
|
||||||
|
|
||||||
|
examResultMode erm3 = new examResultMode();
|
||||||
|
erm3.machineCode = MachineCode;
|
||||||
|
erm3.machineID = MachineID;
|
||||||
|
erm3.sampleNo = sampleNo1;
|
||||||
|
erm3.testDate = testDate1;
|
||||||
|
erm3.chanelNo = "URO";//项目代号
|
||||||
|
erm3.itemValue = resulteArray[i + 7].Replace("*URO", "").Replace("umol/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm3.itemUnit = "";
|
||||||
|
ermList.Add(erm3);
|
||||||
|
|
||||||
|
examResultMode erm4 = new examResultMode();
|
||||||
|
erm4.machineCode = MachineCode;
|
||||||
|
erm4.machineID = MachineID;
|
||||||
|
erm4.sampleNo = sampleNo1;
|
||||||
|
erm4.testDate = testDate1;
|
||||||
|
erm4.chanelNo = "BIL";//项目代号
|
||||||
|
erm4.itemValue = resulteArray[i + 8].Replace("BIL", "").Replace("umol/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm4.itemUnit = "";
|
||||||
|
ermList.Add(erm4);
|
||||||
|
|
||||||
|
|
||||||
|
examResultMode erm5 = new examResultMode();
|
||||||
|
erm5.machineCode = MachineCode;
|
||||||
|
erm5.machineID = MachineID;
|
||||||
|
erm5.sampleNo = sampleNo1;
|
||||||
|
erm5.testDate = testDate1;
|
||||||
|
erm5.chanelNo = "PRO";//项目代号
|
||||||
|
erm5.itemValue = resulteArray[i + 9].Replace("PRO", "").Replace("g/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm5.itemUnit = "";
|
||||||
|
ermList.Add(erm5);
|
||||||
|
|
||||||
|
|
||||||
|
examResultMode erm6 = new examResultMode();
|
||||||
|
erm6.machineCode = MachineCode;
|
||||||
|
erm6.machineID = MachineID;
|
||||||
|
erm6.sampleNo = sampleNo1;
|
||||||
|
erm6.testDate = testDate1;
|
||||||
|
erm6.chanelNo = "GLU";//项目代号
|
||||||
|
erm6.itemValue = resulteArray[i + 10].Replace("GLU", "").Replace("mmol/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm6.itemUnit = "";
|
||||||
|
ermList.Add(erm6);
|
||||||
|
|
||||||
|
examResultMode erm10 = new examResultMode();
|
||||||
|
erm10.machineCode = MachineCode;
|
||||||
|
erm10.machineID = MachineID;
|
||||||
|
erm10.sampleNo = sampleNo1;
|
||||||
|
erm10.testDate = testDate1;
|
||||||
|
erm10.chanelNo = "SG";//项目代号
|
||||||
|
erm10.itemValue = resulteArray[i + 11].Replace("SG", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm10.itemUnit = "";
|
||||||
|
ermList.Add(erm10);
|
||||||
|
|
||||||
|
|
||||||
|
examResultMode erm7 = new examResultMode();
|
||||||
|
erm7.machineCode = MachineCode;
|
||||||
|
erm7.machineID = MachineID;
|
||||||
|
erm7.sampleNo = sampleNo1;
|
||||||
|
erm7.testDate = testDate1;
|
||||||
|
erm7.chanelNo = "BLD";//项目代号
|
||||||
|
erm7.itemValue = resulteArray[i + 12].Replace("BLD", "").Replace("CELL/uL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm7.itemUnit = "";
|
||||||
|
ermList.Add(erm7);
|
||||||
|
|
||||||
|
examResultMode erm8 = new examResultMode();
|
||||||
|
erm8.machineCode = MachineCode;
|
||||||
|
erm8.machineID = MachineID;
|
||||||
|
erm8.sampleNo = sampleNo1;
|
||||||
|
erm8.testDate = testDate1;
|
||||||
|
erm8.chanelNo = "pH";//项目代号
|
||||||
|
erm8.itemValue = resulteArray[i + 13].Replace("pH", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm8.itemUnit = "";
|
||||||
|
ermList.Add(erm8);
|
||||||
|
|
||||||
|
examResultMode erm9 = new examResultMode();
|
||||||
|
erm9.machineCode = MachineCode;
|
||||||
|
erm9.machineID = MachineID;
|
||||||
|
erm9.sampleNo = sampleNo1;
|
||||||
|
erm9.testDate = testDate1;
|
||||||
|
erm9.chanelNo = "Vc";//项目代号
|
||||||
|
erm9.itemValue = resulteArray[i + 14].Replace("Vc", "").Replace("mmol/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
erm9.itemUnit = "";
|
||||||
|
ermList.Add(erm9);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//将结果提交到LIS系统
|
||||||
|
baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList);
|
||||||
|
string jsonStr = JsonConvert.SerializeObject(ermList);
|
||||||
|
if (bmm1.code == 200)
|
||||||
|
dataOutPutShow("数据提交成功:" + jsonStr, null);
|
||||||
|
else
|
||||||
|
dataOutPutShow("数据提交失败:" + jsonStr, null);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return rerultJson;
|
return rerultJson;
|
||||||
}
|
}
|
||||||
@ -3176,6 +3320,12 @@ namespace FlyDockTool
|
|||||||
}
|
}
|
||||||
_tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
|
_tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
|
||||||
}
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-500B")//URIT-500B
|
||||||
|
{
|
||||||
|
SerialPortOption.CreateInstance().IniserialPortOption();//初始化串口
|
||||||
|
SerialPortOption.CreateInstance().dataOutPutShow += new EventHandler(onReData);
|
||||||
|
SerialPortOption.CreateInstance().StartDataReadThread();//开启数据接收
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -3365,6 +3515,8 @@ namespace FlyDockTool
|
|||||||
|
|
||||||
//_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
//_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||||
}
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-500B")//优利特尿常规URIT-500B
|
||||||
|
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -3730,6 +3882,10 @@ namespace FlyDockTool
|
|||||||
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
||||||
clientSocket.Close();
|
clientSocket.Close();
|
||||||
}
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-500B")//优利特血常规 URIT-500B
|
||||||
|
{
|
||||||
|
SerialPortOption.CreateInstance().StopDataReadThread();//开启数据接收
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
|
@ -33,8 +33,8 @@ namespace FlyDockTool
|
|||||||
apiOptions.MachineID = ConfigurationManager.AppSettings[CurrentDevice].Split(',')[2];
|
apiOptions.MachineID = ConfigurationManager.AppSettings[CurrentDevice].Split(',')[2];
|
||||||
lb_currentDeviceInfo.Text = CurrentDevice;
|
lb_currentDeviceInfo.Text = CurrentDevice;
|
||||||
//////测试代码 测试完毕后注释调一下两行代码
|
//////测试代码 测试完毕后注释调一下两行代码
|
||||||
//string resultDataStr = File.ReadAllText(@"D:\工作\接受数据工具 list\血常规Z3CRP.txt", Encoding.GetEncoding("GB18030"));
|
// string resultDataStr = File.ReadAllText(@"D:\桌面\尿常规URIT-500B.txt", Encoding.GetEncoding("GB18030"));
|
||||||
//deviceAnalysis.CreateInstance().deviceAnalysisOption(resultDataStr);
|
// deviceAnalysis.CreateInstance().deviceAnalysisOption(resultDataStr);
|
||||||
btn_start_or_stop_Click(null,null);//启动数据接收
|
btn_start_or_stop_Click(null,null);//启动数据接收
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user