Thanks Enrico, it worked!
Do you know why the output AL1 segments have an asterisk at the front in the TEST TRANSFORMATION output message box?
Regards,
Wai
- Log in to post comments
Thanks Enrico, it worked!
Do you know why the output AL1 segments have an asterisk at the front in the TEST TRANSFORMATION output message box?
Regards,
Wai
Thanks, Robert and Scott. It works now.
W
Thanks Phil. Can you provide more detail on how to create a business service with the EnsLib.HTTP.InboundAdapter to receive the JSON message on a REST end point? Would it allow external systems to post to with JSON data via http potocol (i.e. with header 'Content-Type: application/json')?
That would be the first step. I will worry about putting the JSON data in a message structure and passing it to and using it in the business process next.
Updated (jul 4th):
I followed the documentation on EnsLib.HTTP.InboundAdapter and created a business service, and a request message class. So how do I go about testing it after instantiate this business service? What is would be the URL I post to? What other configuration do I have to do?
Class DEVTEST01PKG.HL7ProductionTest01.MyNewWebService Extends EnsLib.HTTP.Service
{
Parameter ADAPTER = "EnsLib.HTTP.InboundAdapter";
Method OnProcessInput(pInput As %GlobalCharacterStream, pOutput As %RegisteredObject) As %Status
{
set tsc=$$$OK
Set tData=pInput.Read(,.tSC)
If $$$ISERR(tSC)
{
do $System.Status.DisplayError(tSC)
}
//create request object to send
Set tRequest=##class(DEVTEST01PKG.HL7ProductionTest01.MyTestRequestMsg).%New()
//use a delimiter to separate the form variables
Set list=$LISTFROMSTRING(tData,"&")
//examine each element and extract the relevant data
Set ptr=0
While $LISTNEXT(list,ptr,key) {
If $PIECE(key,"=") = "MRN" {
Set tRequest.MRN = $PIECE(key,"=",2)
}
Elseif $PIECE(key,"=") = "name" {
SET tRequest.name = $PIECE(key,"=",2)
}
Elseif $PIECE(key,"=") = "NoteID" {
Set tRequest.NoteID = $PIECE(key,"=",2)
}
}
//send to lookup process
Set tSC=..SendRequestSync("EHTTP.LookupProcess",tRequest,.tResponse)
//define output for OnProcessInput
Set pOutput=tResponse
Quit tSC
}
Method OnInit() As %Status
{
Set ..Adapter.ParseBodyFormVars=1
Quit 1
}
}
W
Jeff,
Thank you, Your are right, I missed the Doc Name.
Wil.
Thanks, Julian. It helped.
This is great! Thanks, Sanjib.
Can you please go over how to set up the role/user to have access to this web app (screenshot #2) only using "password" authentication ? Thank you.
Hi Jeffrey,
I tried !iso-8859-1, !latin1 and !utf-8 for Default Char Encoding property but in all cases I still got the same error.
Btw, the original message has 8859/1 in MSH-18. I also tried removing the value in MSH-18 but it still got the same error.
W
Hi Ben, Katherine, and Steve,
Can you help me set up the environment for %SYS.LDAP programming?
I posted this question last week https://community.intersystems.com/post/how-include-syldapinc
Thank you
W.
Enrico,
I tried that already and got
Compiling routine UHNuREST2.impl.1
ERROR: UHNuREST2.impl.cls
ERROR: UHNuREST2.impl.1(7) : MPP5635 : No include file '%syLDAP.INC'
Is that because %syLDAP.INC is not available in my HealthConnect version ? But I've seen posts from 2017 discussing LDAP authentication such as this one: https://community.intersystems.com/post/programatic-user-authentication…
W.