infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
Connecting to Resting API and doing a PUSH
Jeffkohl
Hello,
Semi new so please do not beat me up here.
Working with cloverleaf and sending to a vendor called Angel Eye which I know groups using EPIC and cloverleaf and send data to them
The Ask is to convert the hl7 ADT feed to JSON and push out to an API via engine.
I was able to convert the hl7 to the json format and have the body of the message build out perfectly.
The two next steps are routes and the Header.
There is a base webaddress to send the information to however the last part of the address changes based on message type ie
A01 add /admit
A02 add/transfer
Rather then set up 7 threads for each of the message types out there
I was hoping to use one thread and programmatically change the address we are sending to.
Has anybody done anything like that and if so do they have some code they were will to share
Second part is adding the Header information to the message with all the API key information.
It does not appear the cloverleaf gui has fields for that and I will have to put together a tcl to combind the API (header) with the body.
Again anybody have any code to help out with doing that.
Thank you in advance
Jeff
Find more posts tagged with
Clovertech
Comments
brent-fenderson
Jeff, I attached the script that I wrote for the Angel eye api. Hope this helps. bf
tps_angeleye_set_api.tcl
Keith McLeod
You can override the URL or the Path in the userdata. I do this using tables and a preproc in the Xlate.
I determine my key based on a value in my HL7 data to get which URL I am going to use. I store it in
@URL
.
I send the path straight from the field, like PID:3.1
And if I require some Authorization for the Header, again I use the source and a table and store it in
@SOME_AUTHORIZATION
I copy In my source:
@URL
1(0).0(0).0(0).PID(0).#3(0).[0]
@SOME_AUTHORIZATION
Use this preproc snippet
keylset userData httpRequestInfo.requestURL [list [lindex $xlateInVals 0]/[lindex $xlateInVals 1]] httpRequestHeaders.SOME-AUTHORIZATION [list [lindex $xlateInVals 2]]
xpmmetaset $xlateId USERDATA $userData
and my destination is
@null
since I am purely formulating the msg metadata USERDATA to override any settings ws-rawclient.
Works pretty well. Only have to update my table values for the most part with the URL and Authorization Header info. You can update PATH only, but once you do the URL, PATH is no longer used.
Hope this helps....
Keith McLeod
Not sure the snippet copied. Hate when it obliterates your code... See Attached
URL_PATH_Override.png
david_barr
I've done stuff like that using the "java/ws-rawclient" protocol. It may also be possible with the "http-client" protocol. But if you want examples from me, they would be using ws-rawclient which requires a web services license.
Jeffkohl
Thank you I will review with one of my co-works and give it a try!!!!!!!!!!
Jeffkohl
we do have the Java/ws-client license and can use that if that is the better way
Jeffkohl
Brent thank you for the tcl that is what I was trying to to do just did not know what the variables where to pull and change.
I will have to play around . Where did you plug that TCL into in the route or some where else
Also never did a connection using PROTOCOL:http-client, we usually use TCPIP first time connecting to an API
I can not get my thread to start I keep getting an error: Error Msg : No Query TPS configured -- HTTP Client driver will do nothing without it.
I found that field on the set up. is there a standard TCL to plug in there or is this something specific to this thread I need to create
THanks for any help anybody can provide!!
brent-fenderson
Jeff, i boxed our interface for you to use as reference
angeleye.box
Jeffkohl
THANK YOU SO MUCH THIS HELPS ALOT!!!!