With the development of social undertakings, the medical industry is increasingly demanding various instruments, such as biochemical analyzers, ECG monitors, ventilators, etc. These devices currently use two communication methods and lis/pacs/central monitoring system. interface
- Most use the serial port as the data interface, using ASTM as the communication protocol
- Use Ethernet network interface with HL7 as communication protocol
Agreement interpretation
HL7
The HL7 standard is based on the highest level of application standards for the OSI model developed by the ISO standards organization, as shown in the following figure:
The HL7 standard consists of 256 events, 116 message types, 139 segments, 55 data types, 408 data dictionaries, and 79 encoding systems. However, when applying the HL7 standard, it is not necessary to involve all the contents of the standard. You can select the relevant events, message types and segments that you need to apply. In the data dictionary and coding system, the HL7 standard does not have mandatory provisions that allow users to choose. Standard content is recommended. Since HL7 is very extensive and widely accepts opinions from end users, developers, and research institutions in the development process, the HL7 standard can be understood as another general nature of other coding standards in medical information. index of.
ASTM
The full name of ASTM is American Society for TesTIng and Materials, American Society for Testing and Materials. It stipulates a dozen categories and is very versatile, including the following categories:
1. Steel products
2, non-ferrous metal products
3. Metal testing and analysis methods.
4. Construction
5. Petroleum and Chemical Industry
6, dyes and coatings
7, textile
8, plastic
9, rubber
10. Electrical and electronics industry
11. Water and environmental protection technology
12. Nuclear, solar and geothermal energy
13. Medical devices and services
14. General methods and instruments.
15. General and specialty chemicals
The medical industry uses the 13th category, such as
ASTM E1394 and so on
Current status
Traditional hospital systems use PC as an instrument server to access, large in size, expensive, power consumption, and very inflexible. Different instruments require different interface programs. These interface programs are written using Powerbuilder, Delphi, C#. Each time different instrument parameters and protocol interfaces need to be recompiled, deployed and debugged, with high cost and long construction period.
Solution with Dragonboard 410c
In view of this, we decided to use Dragonboard instead of PC to achieve various instrument access. The benefits of using nodejs development are obvious, the price is much lower than pc, and the flexibility does not need to be compiled, and nodejs itself provides a huge amount. The module library, including the HL7 parsing library, using nodejs can greatly reduce the difficulty of development work, dynamic configuration js script can dock the corresponding instruments, so you can remotely configure the debugging instrument, saving expensive travel expenses.
The appearance of the 410c is very small, it will replace the huge pc, it will save the hospital, and the future 410c can be integrated into the instrument and become part of the instrument.
Start workingFirst install
First download the img file, here we choose debian, you can go directly to the linaro website to download
Dragonboard410c_sdcard_install_debian-36.zip this file, but this site is often disconnected, for everyone's convenience I downloaded and shared
http://pan.baidu.com/s/1migYRiC
Insert the tf card into the computer through the usb card reader. It is recommended to use the class 10 tf card, 8G or more.
Format the card using sdformatter
Then use win32diskimager to burn the image to the tf card.
Insert the tf card into the board, start it, and set the jumper position to the following mode.
According to the screen prompt, select intall, then wait a few minutes, the system is installed, then remove the TF card
(If you do not remove the TF card, the next boot will start from the TF card, or you can set the jumper, choose to boot from EMMC, I will unplug the TF card in order to save trouble) Restart
Display linaro login interface
Password and username are both linaro
For future operation, use passwd to create a root account.
Log in as root, then do not need to enter annoying sudo in the operation instructions
Install nodejsBecause the 410c board I have installed nodejs, I will demonstrate the installation process of nodejs on another board.
Curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
Sudo apt-get install -y nodejs
If you find that there is no curl, you can install it with apt-get install curl
After installing nodejs, run node -v to see that it is installed.
Install the corresponding moduleBecause the medical gateway we do needs to support the HL7 and ASTM protocols, we need to install the corresponding module.
Node-serialport and hl7 modules
Install npm install node-serialport directly using npm
Npm install hl7 Because each instrument will only choose one of them, so we install it in a different working directory
Test serial port and ASTM protocolOriginally intended to connect directly to our ASTM emulator, but the IO of the Dragonboard 410c is 1.8v, I am afraid that the 3.3v TTL directly connected to our device will burn out, so I decided to use the serial port turned out by the USB port to solve this problem.
We use a MICO development board as a serial input source to access the 410c motherboard via a USB HUB.
Under /dev/ you can see a device ttyUSB1, write a test program lis.js
Var SerialPort = require("serialport").SerialPort,
Sp = new SerialPort("/dev/ttyUSB1", {
Baudrate: 115200
}, false);
Sp.open(funcTIon (error) {
If (error) {
Console.log('failed to open: ' + error);
Return;
} else {
Console.log('open');
}
});
Sp.on('data', funcTIon (data) {
Console.log(data.toString());
//sp.write("hello/r/n");
});
The serial port can work normally, and the actual communication program can also communicate with us.
Test HL7Next we test the HL7 function and install the hl7 test package on the drgonboard.
Npm install simple-hl7
Then go to node_modules/simple-hl7/examples, you can see that there are 4 examples, we run tcp-server this
Node tcp-server.js
Then run the hl7 emulator on the pc
You can see that the HL7 result sent by the simulator simulation has been accepted by the hl7 server running on the Dragon Edition.
Slightly modify this hl7 program, turn hl7 into json, the conversion function is provided in this hl7 package, you can directly save to the database backend of the rest interface.
Actual simulationUse our own instrument data and simulator to connect our own simulators and save the data to couchdb
You can see that the data is completely saved. Using nodejs, you can easily save the iot data into Hadoop through modules such as webhdfs or save the ECG monitoring data to openTSDB or infuxdb through other related modules. It is also a thousand lines, and it can run on embedded ARM boards such as dragon boards. This is difficult for traditional medical software development tools such as PB, C#, and Java.
Next, I will try octoprint to control 3d printing and other projects. This test has a very important thing in the dragonboard. I hope that I can get the HDMI to CSI board of the dragonboard. Unfortunately, I have never had the chance to test this. Used for the acquisition of endoscopic ultrasound, replacing expensive collection workstations and cumbersome capture cards.
Next, I will try octoprint to control 3d printing and other projects. This test has a very important thing in the dragonboard. I hope that I can get the HDMI to CSI board of the dragonboard. Unfortunately, I have never had the chance to test this. Used for the acquisition of endoscopic ultrasound, replacing expensive collection workstations and cumbersome capture cards.
postscriptThis test is very inadequate, 1.8v IO I am not ready, I can directly use the low-speed socket UART interface to dock the serial device, you can also use Python development, the effect is also very good, the same can be in pc and The arm board can also be used to support serial ports and HL7 libraries.
Industrial Ethernet Cable,Industrial Wire,Electrical Power Cable,Electric Power Cord
Dong guan Sum Wai Electronic Co,. Ltd. , https://www.sw-cables.com