新增类型URIT-8460
This commit is contained in:
parent
1e1418b8de
commit
54afb99d55
19
app.config
19
app.config
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<!--根据MacAddress获取设备信息,请求方式:get-->
|
||||
<add key="getMacAddressInfo" value="https://wlcblis.gw12320.com:8443/interFace/list" />
|
||||
@ -59,24 +61,13 @@
|
||||
<add key="hhh5" value="wstwsy-PC,hhh5,90,127.0.0.1,6688,GB18030" />
|
||||
<!--帝迈血常规DF55-->
|
||||
<add key="DF55-2" value="PC-202106061449,DF55-2,121,127.0.0.1,5600,GB18030" />
|
||||
|
||||
<!--尿常规U120-->
|
||||
<add key="U120" value="user-PC,U120,89,COM1,4800,NONE,8,1,GB18030" />
|
||||
|
||||
<!--BS-330E-->
|
||||
<add key="BS-330E" value="PC-202106061449,BS-330E,121,127.0.0.1,5600,GB18030" />
|
||||
|
||||
<!-- BC-5120 -->
|
||||
<add key="BC-5120" value="PC-202106061449,BC-5120,121,127.0.0.1,5600,GB18030" />
|
||||
|
||||
<add key="MA-4210" value="wstwsy-PC,MA-4210,90,COM1,9600,NONE,8,1" />
|
||||
|
||||
<!--尿常规U120-->
|
||||
<add key="U120" value="user-PC,U120,89,COM1,4800,NONE,8,1,GB18030" />
|
||||
|
||||
|
||||
<!-- BC-5120 -->
|
||||
<add key="BC-5120" value="PC-202106061449,BC-5120,121,127.0.0.1,5600,GB18030" />
|
||||
<!--迈瑞BS-460-->
|
||||
<add key="BS-460" value="User-2024H-II,BS-460,91,127.0.0.1,6688,GB18030" />
|
||||
<!--迈瑞BS-460-1 14项-->
|
||||
@ -85,7 +76,9 @@
|
||||
<add key="BS-460-2" value="User-2024H-II,BS-460,91,127.0.0.1,6688,GB18030" />
|
||||
<!--血常规Z3CRP-->
|
||||
<add key="Z3 CRP" value="User-2024H-II,Z3 CRP,90,127.0.0.1,6688,GB18030" />
|
||||
<!-- URIT-8460 -->
|
||||
<add key="URIT-8460" value="PC-202106061449,URIT-8460,121,127.0.0.1,5600,GB18030" />
|
||||
|
||||
<add key="CurrentDevice" value="Z3 CRP"/>
|
||||
|
||||
</appSettings>
|
||||
</configuration>
|
||||
|
@ -2220,6 +2220,44 @@ namespace FlyDockTool
|
||||
dataOutPutShow("数据提交失败:" + jsonStr, null);
|
||||
|
||||
}
|
||||
if (apiOptions.CurrentDevice == "URIT-8460")//URIT-8460
|
||||
{
|
||||
string MachineCode = apiOptions.MachineCode;
|
||||
string MachineID = apiOptions.MachineID;
|
||||
deviceDataStr = deviceDataStr.Replace("\r", "").Replace("\n", "");
|
||||
//string[] resulteArray = deviceDataStr.Split('\n');
|
||||
string sampleNo1 = string.Empty;//样本号
|
||||
|
||||
List<examResultMode> ermList = new List<examResultMode>();
|
||||
string[] itemArray = new string[] { "A/G", "ALT/AST", "GLB", "ALT", "AST", "TP", "ALB", "TB", "UREA", "Cr", "UA", "TG", "CHOL", "HDL_C", "LDL_C" };
|
||||
|
||||
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;
|
||||
@ -3030,8 +3068,22 @@ namespace FlyDockTool
|
||||
clientSocket.Connect(ipAddress, int.Parse(tcp_port));
|
||||
_tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
|
||||
}
|
||||
|
||||
|
||||
if (apiOptions.CurrentDevice == "URIT-8460")//URIT-8460
|
||||
{
|
||||
// 设置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地址和端口号
|
||||
@ -3268,6 +3320,13 @@ namespace FlyDockTool
|
||||
deviceAnalysisOption(tempData_temp);
|
||||
}
|
||||
}
|
||||
if (apiOptions.CurrentDevice == "URIT-8460")//URIT-8460
|
||||
{
|
||||
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"));
|
||||
@ -3645,6 +3704,11 @@ namespace FlyDockTool
|
||||
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
||||
clientSocket.Close();
|
||||
}
|
||||
if (apiOptions.CurrentDevice == "URIT-8460")//URIT-8460
|
||||
{
|
||||
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
||||
clientSocket.Close();
|
||||
}
|
||||
if (apiOptions.CurrentDevice == "BS-460")//生化BS-460
|
||||
{
|
||||
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
||||
|
Loading…
Reference in New Issue
Block a user