diff --git a/app.config b/app.config
index b97af27..29f44e9 100644
--- a/app.config
+++ b/app.config
@@ -81,6 +81,8 @@
-
+
+
+
diff --git a/deviceAnalysis.cs b/deviceAnalysis.cs
index fdc2ee3..609a1aa 100644
--- a/deviceAnalysis.cs
+++ b/deviceAnalysis.cs
@@ -2258,6 +2258,44 @@ namespace FlyDockTool
else
dataOutPutShow("数据提交失败:" + jsonStr, null);
}
+ if (apiOptions.CurrentDevice == "BH-5380CRP")//BH-5380CRP
+ {
+ string MachineCode = apiOptions.MachineCode;
+ string MachineID = apiOptions.MachineID;
+ deviceDataStr = deviceDataStr.Replace("\r", "").Replace("\n", "");
+ //string[] resulteArray = deviceDataStr.Split('\n');
+ string sampleNo1 = string.Empty;//样本号
+
+ List ermList = new List();
+ string[] itemArray = new string[] { "WBC", "LYM%", "MON%", "NEU%", "EOS%", "BASO%", "LYM#", "MON#", "NEU#", "EOS#", "BASO#", "RBC", "HGB", "HCT", "MCV", "MCH", "MCHC", "RDW", "RDW_SD", "RDW_CV", "PLT", "MPV", "PDW", "PCT", "P_LCR", "P_LCC", "ALY%", "LIC%", "NRBC%", "ALY#", "LIC#", "NRBC#" };
+
+ for (int i = 0; i < itemArray.Length; i++)
+ {
+ string itemStr = string.Empty;
+ itemStr = @"(" + itemArray[i] + @")^||";
+
+ string val1 = deviceDataStr.Substring(deviceDataStr.IndexOf("OBR"), 30);
+ sampleNo1 = val1.Split('|')[3];
+ string testDate1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+ examResultMode erm1 = new examResultMode();
+ erm1.machineCode = MachineCode;
+ erm1.machineID = MachineID;
+ erm1.sampleNo = sampleNo1;
+ erm1.testDate = testDate1;
+ erm1.chanelNo = itemArray[i];//项目代号
+ erm1.itemValue = jiexiVal(deviceDataStr.IndexOf(itemStr), itemStr, deviceDataStr).ToString();//项目结果
+ erm1.itemUnit = "";
+ ermList.Add(erm1);
+ }
+ string jsonStr = JsonConvert.SerializeObject(ermList);
+ //将结果提交到LIS系统
+ baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList);
+ if (bmm1.code == 200)
+ dataOutPutShow("数据提交成功:" + jsonStr, null);
+ else
+ dataOutPutShow("数据提交失败:" + jsonStr, null);
+ }
if (apiOptions.CurrentDevice == "BS-460")//生化BS-460
{
string MachineCode = apiOptions.MachineCode;
@@ -3228,6 +3266,22 @@ namespace FlyDockTool
}
_tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
}
+ if (apiOptions.CurrentDevice == "BH-5380CRP")//BH-5380CRP
+ {
+ // 设置IP地址和端口号
+ string tcp_ip = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[3];
+ string tcp_port = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[4];
+ IPAddress ipAddress = IPAddress.Parse(tcp_ip);
+ // IPAddress ipAddress = IPAddress.Any;
+ //// 创建一个监听Socket
+ if (listener == null)
+ {
+ listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
+ listener.Bind(new IPEndPoint(ipAddress, int.Parse(tcp_port)));
+ listener.Listen(10000);
+ }
+ _tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
+ }
if (apiOptions.CurrentDevice == "hhh5")//BC-5130
{
// 设置IP地址和端口号
@@ -3477,6 +3531,13 @@ namespace FlyDockTool
if (!string.IsNullOrWhiteSpace(tempData_temp))
deviceAnalysisOption(tempData_temp);
}
+ if (apiOptions.CurrentDevice == "BH-5380CRP")//BH-5380CRP
+ {
+ string tempData_temp = tempData;
+ tempData = string.Empty;
+ if (!string.IsNullOrWhiteSpace(tempData_temp))
+ deviceAnalysisOption(tempData_temp);
+ }
if (apiOptions.CurrentDevice == "BS-460")//生化BS-460
{
//File.WriteAllText("deviceDataLog.txt", deviceDataStr, Encoding.GetEncoding("GB18030"));
@@ -3861,6 +3922,11 @@ namespace FlyDockTool
_tcpResult.Change(-1, 10);//停止tcp数据接收
clientSocket.Close();
}
+ if (apiOptions.CurrentDevice == "BH-5380CRP")//BH-5380CRP
+ {
+ _tcpResult.Change(-1, 10);//停止tcp数据接收
+ clientSocket.Close();
+ }
if (apiOptions.CurrentDevice == "BS-460")//生化BS-460
{
_tcpResult.Change(-1, 10);//停止tcp数据接收