%Net.DB.Connection
I am trying to use the IRIS connection to connect from our LIS to Health Connect (ENSEMBLE) directly. You can do this in the same namespace using this:
I ##class(Ens.Director).CreateBusinessService(Ensemble Service Name,.theService)
I theService.ProcessInput(TRAN,.response)
I would like to be able to do the same thing across servers using IRIS connection. I have the following connection:
set connection = ##class(%Net.DB.DataSource).CreateConnection(host, port, namespace, user, pwd)
if 'connection.IsConnected set ERRTXT="NotConnected" quit
set irisC=connection.CreateIris()
set theService = irisC.ClassMethodValue("Ens.Director","CreateBusinessService",Ensemble Service Name,.theService)
//How do I replace the line below to use the IRIS instance I established above?
set response = theService.OnProcessInput(TRAN,.response)
do connection.Disconnect()
Everything works great until we try to send the transaction: theService.OnProcessInput(TRAN,.response). Is there any thing that I can use with the IRIS connection to be able to execute theService.OnProcessInput(TRAN,.response)?
Thank you.
Have you tried wrapping your message call (Ens.Director and OnProcessInput) in a class on the target machine.
That works great. Thank you for pointing me in the right direction.
Glad it worked! Good luck with your project :)