1. Interface principle (what the interface does) : Parse the data sent by the instrument and save it to our His database.
Lis instruments on the market generally carry out information interaction in three forms. The first is TCP. Second: port. Third: Parse the file
The purpose of these three is to send data to different tools. For example, I can send data to you through QQ, and I can also use wechat.
Just in a different form)
TCP : supports one-to-many transmission. Data can be sent anywhere through network cables. That’s what it means
The interface program can be installed on any computer, provided it can be pinged. Main Parameters (Host IP address, TCP port number)
Port : one-to-one, the port is connected to the instrument with a line, only that line of the computer can receive the instrument sent
Data main parameters (serial port, baud rate, data bit, stop bit)
Parse file : Instrument software can send data to a file. Our interface program reads the number of that file directly
According to it.
Once you know that, the rest is easy.
2.Interface Data Instance:
3.Above is the instrument to send data, this is the standard hml7, OBR | | 1, the sample is corresponding to the number 1. OBX|7||NM|
In this row, LYM# is the return number, and then **** is the result. These are the main numbers.
4.If connected to his Medical system, it is obvious that the specimen number corresponds to the serial number of his instrument matching, and the corresponding maintenance single channel code can be displayed on his medical system
5.The point of all this is to give you an idea of how it works, and if you’re good at coding, you can usually write a fun interface yourself
6.Next I did not say about the code principle, I hope to help you:.NET listening, can directly listen to the instrument TCP, sent data, we directly process the data sent, saved to the database. The serial port is similar
7.
The client
(1) Connect to the server
Code:
TcpClient tcp = new TcpClient();
tcp.Connect(IP,Port); //根据服务器的IP地址和侦听的端口连接
if (tcp.Connected)
{
//连接成功的消息机制
MessageBox.Show( “成功连接上了服务器”);
}
(2) Establish the data flow connecting to the server
Code:
NetworkStream streamToServer = tcp.GetStream();
(3) Receiving and sending data
Code:
//发送字符串
byte [] buffer = Encoding.Unicode.GetBytes(msg); //msg为发送的字符串
try
{
lock (streamToServer)
{
streamToServer.Write(buffer, 0, buffer.Length); // 发往服务器
}
//接收字符串
buffer = new byte [BufferSize];
lock (streamToServer)
{
bytesRead = streamToServer.Read(buffer, 0, BufferSize);
}
}
The service side:
You can take the server as a test instrument. In fact, you can write a server, a client and two software to conduct a data interaction, similar to our QQ and wechat, so that you can fully understand the TCP, the serial port is actually the same.
8.Procedure for connecting to his Medical system:
- Items prescribed by His, such as test items issued by outpatient doctors, test items issued by inpatient medical orders, or Lis registration in other hospitals.
- Outpatient doctors go to Lis specimen registration and select outpatient drop-down list, or fill in the consultation number. Hospitalization corresponds to hospitalization, and the patient is transferred to the post point
Clicking Save will generate a test bar code. The other hospital can directly open the project and click Save. - Specimen collection is usually only done in hospital. If you do not want it, you can skip it directly.
- Specimen reception: Select the corresponding patient to receive.
- The testing doctor prescribes corresponding items on the Lis instrument for testing. Get the result and the serial number.
- Match the serial number of the instrument. Select the corresponding instrument and match the serial number of the instrument.
- The instrument sends the results.
- The instrument interface receives the results sent by the instrument and saves them to our His database.
10.His queries the database and obtains the results, which are displayed on the His system.
9.Instrument screenshots