Forum Replies Created
-
AuthorReplies
-
Finally got it. I used your suggestion David, but could not mix tcl and the ksh shell. So wrote the order number to a file using the shell, then used tcl to open the file “set fp [open $fullpath r]” and retrieve it. Seems like it would have been a lot easier to pay Meditech to map the order number to a field in the result message, huh 😀
Good morning David,
I know this thing looks pretty weird locgically. My manager has asked me to insert data from an order message into a SQL table and then later, when the results are returned, to query the table and get the order number to add back into the result message. The outpatient syatem will not post results without an order number, and the HIS, Meditech, does not send the order number back with the result.
The health care system I work for decided not to buy the ODBC module for Cloverleaf, so I am trying to do this using Unix ODBC. I have been able to successfully insert data into an orders table and pull the order number back out in a query, all within a Unix script. But I can’t get the order number back to the cloverleaf environment so I can use it.
I think what you have suggested will work but I think the tcl environment and the ksh shell are stepping all over each other. So I am having a hard time putting this last part together.
Thanks again for your help and I welcome further suggestions. I have gotten so deep into this that I can’t see my way out especially with my limited Unix skills 😀
Skip
I appreciate your response. I am not sure what I doing here, but went ahead and inserted the suggested code. I think we are opening a channel and piping the value from the query to the variable fp. There were no errors but the result was not what we hoped for:
ordernum was blank
when I did an echo with $fp: fp = file4
Thank you to Jim Kosloskey and Michael Hertel for their help with the solution for creating segment groups to cleanup order messages. Both offered viable solutions. The tcl solution was preferred by my supervisor. Skip Williams
😀 Here is a sample message for testing:MSH|^~&|4MEDICA|WESTLFH|LAB|OML|200612060733||ORM^O01|3910304|P|2.3|||AL|AL
PID|1|999999|77777777|5555555|TEST^SKIP ||19641015|M||O|28775 SW HOPE S MT LEBANON^OR^973550000||5414510999|||U||7054A2|544-50-4398|
PV1|1||LAB|||||FARLEDB^FARLEY^DAVID^^^^MD^P|
IN1|1|BS|5|BLUE CROSS|SEE PLANS^^^^0||(503)225-6619|063383000|||||||BS|TEST^SKIP^|3||||||||||||||N|||||YVP921195460|
GT1|0||TEST^KAREN^||28775 SW HOPE S MT RD^^LEBANON^OR^973550000|(541)451-0999||19741019|F||UN|999-99-9999|
GT1|1||TEST^KAREN^||||||||UN|
ORC|NW|9868213800|||||||20061206073100|||FARLEDB^FARLEY^DAVID^^^^MD^P|
OBR|1|9868213800||71306^HEPFUNCT PNL; HEPATIC FUNCTION PANEL^L|||20061206073200||||N|||||FARLEDB^FARLEY^DAVID^^^^MD^P|||||||||||1^^^^^R|
DG1|1|I9|272.4|HYPER&IPIDEMIA NEC/NOS||F|
ORC|NW|9868213800|||||||20061206073100|||FARLEDB^FARLEY^DAVID^^^^MD^P|
OBR|2|9868213800||43540^LIPID PAN; LIPID PANEL^L|||20061206073200||||N|||||FARLEDB^FARLEY^DAVID^^^^MD^P|||||||||||1^^^^^R|
OBX|1||CHM1^FASTING STATE:||12||||||F|||20061206073100|
DG1|1|I9|272.4|HYPERLI&IDEMIA NEC/NOS||F|
ORC|NW|9868213800|||||||20061206073100|||FARLEDB^FARLEY^DAVID^^^^MD^P|
OBR|3|9868213800||75730^VENI; VENIPUNCTURE (DRAW FEE)^L|||20061206073200||||N|||||FARLEDB^FARLEY^DAVID^^^^MD^P|||||||||||1^^^^^R|
DG1|1|I9|272.4|HYPERLIPIDEMI& NEC/NOS||F|
April 15, 2005 at 7:39 pm in reply to: Passing Global Variables from FTP Dir Parse to IB Data #56360Thanks to all of you who read and/or replied to my issue. I found out that my proc was not working in the TPS Directory Parse because I was choosing the wrong message protocol style. So the echos would end up in the process log, but the message was not sent to the IB Data. My test data is a fax message and the only way the engine could interpret it as a message was to chose the “single” option instead of “nl”, “eof” or the others. Again, thanks for all your input – a great educational experience. Skip Williams
Peacehealth Interface Analyst
541 686-3710
-
AuthorReplies