I have started adding the Request Information Records of LIS2-A2 functionality to senaite.lis2a. I created a Draft PR in the hope that people can see what I’ve done so far and correct me if I am going in the wrong direction.
My most pressing question currently is about the behaviour of an instrument when it sends a request for information from Senaite. In my very limited understanding, the lab staff capture a batch of containers and place a barcode sticker on each before adding it to a rack. When the rack is full it is placed inside the instrument. The instrument then scans the barcode on each container and makes a request to senaite for which test/s must to be performed on that sample.
I see two options, either (a) it sends the request and waits for a reply or (b) it sends the request and continues with the rest of the containers in the rack. If it waits for the reply like in (a) above then senaite must create and return a message with the analysis/analyses required. Or if it continues like (b) above, then senaite must acknowledge it has received the request and then asynchronously send an Order instruction to the instrument to perform the required test/s.
Your understanding in the process seems perfect.
I may be able to send a log / trace file of an analyzer if that will help you (you can message me in that regard if needed), but unfortunately won’t be able to tell you exactly how it works.
I have started to plan for this previously, but haven’t gone forward yet. I wonder if configuring a MirthConnect server and configuring Senaite to connect to MirthConnect isn’t the better long term solution? That way the Senaite-MirthConnect interface can be setup once, and when new analysers are added, they can be done without much more development? MirthConnect seems to be the standard in interfacing middleware.
I am adding LIS documents of clinical chemistry analysers to this post, hopefully it will help. Chemilumiscent Analyzer LIS Protocol V1.1e.pdf (280.3 KB) Chemray 420 Host Interface Manual (HL7).pdf (242.3 KB) RocheCobasE411Host Interface Manual e411 V2.2_2.2_EN.pdf (701.6 KB)
Remember that HL7 messaging is transactional, IE a message is sent, and a reply is received acknowledging receipt. It doesn’t matter if your HL7 Sender can send 30 messages per second (which the Router Simulator really can do), if the receiving listener takes 2 seconds to reply to each message then you and your trading partner will only be exchanging 30 messages per minute PERIOD.
I guess this hints toward the fact that the communication via HL7 messages (and hence I assume ASTM) happens synchronously rather than being async.
I contacted a ASTM/HL7 integrator (thanks for the lead @dietervdwes) who said option is (b) is correct - “In all the years that I’ve been working on these instruments I haven’t come across one that waits for the order.”