新增尿常规 560
This commit is contained in:
parent
f2d00d0fa9
commit
db80ab7789
@ -88,6 +88,8 @@
|
|||||||
<add key="URIT-8400" value="CHINAMI-7VR1TBO,URIT-8400,121,192.169.13.27,5150,UTF-8" />
|
<add key="URIT-8400" value="CHINAMI-7VR1TBO,URIT-8400,121,192.169.13.27,5150,UTF-8" />
|
||||||
<!-- BH-5390 -->
|
<!-- BH-5390 -->
|
||||||
<add key="BH-5390" value="PC-202106061449,BH-5390,121,127.0.0.1,5600,GB18030" />
|
<add key="BH-5390" value="PC-202106061449,BH-5390,121,127.0.0.1,5600,GB18030" />
|
||||||
<add key="CurrentDevice" value="URIT-8460"/>
|
<!-- 尿常规URIT-560 -->
|
||||||
|
<add key="URIT-560" value="wstwsy-PC,MA-4210,90,COM1,9600,NONE,8,1" />
|
||||||
|
<add key="CurrentDevice" value="URIT-560"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -3130,6 +3130,233 @@ namespace FlyDockTool
|
|||||||
else
|
else
|
||||||
dataOutPutShow("数据提交失败:" + jsonStr, null);
|
dataOutPutShow("数据提交失败:" + jsonStr, null);
|
||||||
}
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-560")//URIT-560
|
||||||
|
{
|
||||||
|
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[0].Trim().Replace("NO.", "").TrimStart('0');
|
||||||
|
// 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";//项目代号
|
||||||
|
if (resulteArray[i + 4].Contains("*"))
|
||||||
|
{
|
||||||
|
erm.itemValue = resulteArray[i + 4].Replace("*WBC", "").Replace("leu/uL", "").Trim().Split(' ')[0].Trim(); //项目结果
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm.itemValue = resulteArray[i + 4].Replace("WBC", "").Replace("leu/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";//项目代号
|
||||||
|
if (resulteArray[i + 5].Contains("*"))
|
||||||
|
{
|
||||||
|
erm1.itemValue = resulteArray[i + 5].Replace("*KET", "").Replace("mg/dL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm1.itemValue = resulteArray[i + 5].Replace("KET", "").Replace("mg/dL", "").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";//项目代号
|
||||||
|
if (resulteArray[i + 6].Contains("*"))
|
||||||
|
{
|
||||||
|
erm2.itemValue = resulteArray[i + 6].Replace("*NIT", "").Replace("Neg", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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";//项目代号
|
||||||
|
if (resulteArray[i + 7].Contains("*"))
|
||||||
|
{
|
||||||
|
erm3.itemValue = resulteArray[i + 7].Replace("*URO", "").Replace("umol/L", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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";//项目代号
|
||||||
|
if (resulteArray[i + 8].Contains("*"))
|
||||||
|
{
|
||||||
|
erm4.itemValue = resulteArray[i + 8].Replace("*BIL", "").Replace("mg/dL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm4.itemValue = resulteArray[i + 8].Replace("BIL", "").Replace("mg/dL", "").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;
|
||||||
|
if (resulteArray[i + 9].Contains("*"))
|
||||||
|
{
|
||||||
|
erm5.chanelNo = "*PRO";//项目代号
|
||||||
|
erm5.itemValue = resulteArray[i + 9].Replace("*PRO", "").Replace("mg/dL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm5.chanelNo = "PRO";//项目代号
|
||||||
|
erm5.itemValue = resulteArray[i + 9].Replace("PRO", "").Replace("mg/dL", "").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";//项目代号
|
||||||
|
if (resulteArray[i + 10].Contains("*"))
|
||||||
|
{
|
||||||
|
erm6.itemValue = resulteArray[i + 10].Replace("*GLU", "").Replace("mg/dL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm6.itemValue = resulteArray[i + 10].Replace("GLU", "").Replace("mg/dL", "").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";//项目代号
|
||||||
|
if (resulteArray[i + 11].Contains("*"))
|
||||||
|
{
|
||||||
|
erm10.itemValue = resulteArray[i + 11].Replace("*SG", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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";//项目代号
|
||||||
|
if (resulteArray[i + 12].Contains("*"))
|
||||||
|
{
|
||||||
|
erm7.itemValue = resulteArray[i + 12].Replace("*BLD", "").Replace("mg/dL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm7.itemValue = resulteArray[i + 12].Replace("BLD", "").Replace("mg/dL", "").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";//项目代号
|
||||||
|
if (resulteArray[i + 13].Contains("*"))
|
||||||
|
{
|
||||||
|
erm8.itemValue = resulteArray[i + 13].Replace("*pH", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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";//项目代号
|
||||||
|
if (resulteArray[i + 14].Contains("*"))
|
||||||
|
{
|
||||||
|
erm9.itemValue = resulteArray[i + 14].Replace("*Vc", "").Replace("mg/dL", "").Trim().Split(' ')[0].Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
erm9.itemValue = resulteArray[i + 14].Replace("Vc", "").Replace("mg/dL", "").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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3829,6 +4056,12 @@ namespace FlyDockTool
|
|||||||
SerialPortOption.CreateInstance().dataOutPutShow += new EventHandler(onReData);
|
SerialPortOption.CreateInstance().dataOutPutShow += new EventHandler(onReData);
|
||||||
SerialPortOption.CreateInstance().StartDataReadThread();//开启数据接收
|
SerialPortOption.CreateInstance().StartDataReadThread();//开启数据接收
|
||||||
}
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-560")//URIT - 560
|
||||||
|
{
|
||||||
|
SerialPortOption.CreateInstance().IniserialPortOption();//初始化串口
|
||||||
|
SerialPortOption.CreateInstance().dataOutPutShow += new EventHandler(onReData);
|
||||||
|
SerialPortOption.CreateInstance().StartDataReadThread();//开启数据接收
|
||||||
|
}
|
||||||
if (apiOptions.CurrentDevice == "BH-5390")//BH-5390
|
if (apiOptions.CurrentDevice == "BH-5390")//BH-5390
|
||||||
{
|
{
|
||||||
// 设置IP地址和端口号
|
// 设置IP地址和端口号
|
||||||
@ -4063,7 +4296,9 @@ namespace FlyDockTool
|
|||||||
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||||
if (apiOptions.CurrentDevice == "URIT-330")//优利特尿常规URIT-300
|
if (apiOptions.CurrentDevice == "URIT-330")//优利特尿常规URIT-300
|
||||||
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-560")//优利特尿常规URIT-560
|
||||||
|
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -4447,6 +4682,10 @@ namespace FlyDockTool
|
|||||||
{
|
{
|
||||||
SerialPortOption.CreateInstance().StopDataReadThread();//开启数据接收
|
SerialPortOption.CreateInstance().StopDataReadThread();//开启数据接收
|
||||||
}
|
}
|
||||||
|
if (apiOptions.CurrentDevice == "URIT-560")//优利特血常规 URIT-560
|
||||||
|
{
|
||||||
|
SerialPortOption.CreateInstance().StopDataReadThread();//开启数据接收
|
||||||
|
}
|
||||||
if (apiOptions.CurrentDevice == "BH-5390")//BH-5390
|
if (apiOptions.CurrentDevice == "BH-5390")//BH-5390
|
||||||
{
|
{
|
||||||
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
_tcpResult.Change(-1, 10);//停止tcp数据接收
|
||||||
|
@ -38,8 +38,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\生化URIT-8460.txt", Encoding.GetEncoding("GB18030"));
|
// string resultDataStr = File.ReadAllText(@"D:\工作\接受数据工具 list\尿常规URIT-560.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