I have a use-case where I am needing to pick a few fields out of an HL7 message and insert those fields into a MS-SQL Database. There is a a stored procedure in the database that performs all necessary inserts / updates, all I need to do is pass the appropriate data to these stored procedures.
I’m curious to hear from others what the best way to do this would be? I’ve not used cloverleaf in a couple of years, and I’m now using 6.2 for this project.
Based on work I’ve done in the past, my initial reaction would be to write a TPS script to extract the data elements I’m looking for, and insert the directly via TCL but I’m not sure if that is the best way to do this or not. My primary concern with the TCL approach is exposing the Database credentials in the TCL Script.
I’ve also played around with the Database connector, but I’m unclear how to get values from the Message into the database connector (I assume I would just make an XLATE and store them in variables?).
Any information, especially reference material would be appreciated.