The routine I wrote to interface between Feds and Lab. The first client was a belgian clinic, but most of the other 30-some were british. Near the end of my staž with Firriver a couple of american ones bought it too.
The first version, around 2009 or so, was just a batch SQL statement that would be run overnight, to synchronize our demographics (aka patients table) into their database. Eventually that turned out as too much, because same records would travel over over and over, and with Lab's cockamamie scheme with inline audit (each record would get a fresh copy of itself after each edit, with timestamp and a pointer to the current version, while the record before that would point to this etc etc - just getting one record written would sometimes require 600000 reads, :facepalm: and it would take up to 90-110-130 seconds).
So around 2011-13 I wrote a pusher, which would react, within Feds itself, when a demo or cycle record was saved, and would then push the record to their db. Which worked fine until more new customers with more exotic (read as flimsy) setups came along - the connection to their db would get lost, the records sent would get nowhere and wouldn't be resent until next edit, if any etc. Also, every workstation had to connect, which wasn't pleasing the admins and wasn't always possible.
So in 2013 I wrote a standalone version, which would read the audit, check for any changes since last successful transmission, and would send them only. Robust, error resistant etc, it would still choke after a few hours of work. So I made it quit after 58 minutes and relaunch on next hour, through task scheduler. This worked much better, actually still works, but has its own set of troubles, mainly in the clinics where admins don't stay long (aka training centers), so every now and then someone sets the password to expire, and then the scheduled task stops working. Norman has a better scheduler and has already switched one clinic to use it; parting, I recommended to do that on all of them. Task scheduler is just complicated.
11-VIII-2019 - 2-IV-2026