go to post Marc Mundt · Feb 24, 2021 Quick example: Class Demo.FunctionSet Extends Ens.Util.FunctionSet { ClassMethod SendRequestToHTTPOp(arg1 as %String, arg2 as %String) as %String { if '$D(%Ensemble("%Process")) { write "This doesn't work in DTL test mode",! quit "OOPS" } else { #dim bp as Ens.BusinessProcess set req = ##class(Ens.StringRequest).%New() set req.StringValue=arg1_"^"_arg2 set bp=%Ensemble("%Process") set tSC=bp.SendRequestSync("My.HTTP.Operation",req,.resp) if $$$ISERR(tSC) { // Oops... error! } quit "SEND SOMETHING BACK TO WHATEVER CALLED US" } } }
go to post Marc Mundt · Feb 24, 2021 As long as you're calling the FunctionSet method from the context of a business rule or DTL, then this approach will work.
go to post Marc Mundt · Feb 23, 2021 Here's a sample. The resulting URL is "/some-url?PNo=12345&PMsg=this%20is%20my%20pager%20message" Method SendMsg(pRequest As Ens.StringRequest, Output pResponse As Ens.Response) As %Status { set tFormVarNames="PNo,PMsg" set tPNo = "12345" set tPMsg = "this is my pager message" set tSC=..Adapter.Get(.tHttpResponse, tFormVarNames, tPNo, tPMsg) Quit $$$OK }
go to post Marc Mundt · Feb 23, 2021 Just a quick thought: if everything is being passed in the URL then this should probably be a GET rather than a POST. You can call ..Adapter.Get() instead, passing it pFormVarNames as a list of form/URL variable names and pData with the actual values. https://docs.intersystems.com/healthconnectlatest/csp/documatic/%25CSP.D...
go to post Marc Mundt · Feb 18, 2021 A visual trace URL takes the form of: EnsPortal.VisualTrace.zen?SESSIONID=12818 You'll need to run some queries (once in the router namespace and once in the edge namespace) to find the session ID that corresponds to your control ID.You can find messages with that control id by querying the search table.First you need to get the search table property ID for the MSHControlID. Change the value of ClassExtent to match whatever your local search table class is if you're not using the default: SELECT PropId from Ens_Config.SearchTableProp WHERE ClassExtent='EnsLib.HL7.SearchTable' AND Name='MSHControlID' Let's say that returns a PropId of 1 You can then query the search table for the control ID you're looking for where PropValue is the control id. If you have a custom search table you'll need to use your custom table name here instead of the default EnsLib_HL7.SearchTable: SELECT DocId FROM EnsLib_HL7.SearchTable WHERE PropId=1 AND PropValue='123456789' This gives you the ID for the message body. Let's say it returned a DocId of 98765. You can then query the message header table to get the session ID that that message body belongs to: SELECT DISTINCT(SessionId) FROM Ens.MessageHeader WHERE MessageBodyID = 98765 Keep in mind that the URL for the Visual Trace could change in future versions, so you're doing this at your own risk.
go to post Marc Mundt · Feb 18, 2021 Currently the most common approach for creating a web application/page which sources data from IRIS is to use one of the popular client side web application frameworks such as Angular, React, or vue.js. In IRIS you would build a web service which your app would call to get data. Creating REST Serviceshttps://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GREST
go to post Marc Mundt · Feb 17, 2021 To do this in a way that will perform well, I'd suggest making sure MSH:4 is included in your HL7 Search Table. Then you can just query the search table. You could do a join on Ens.MessageHeader to filter by date. https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...
go to post Marc Mundt · Feb 16, 2021 <strong> works as well: Parameter MYMARKUP = "<strong>bold</strong><br/>not-bold";
go to post Marc Mundt · Feb 16, 2021 The following sample works for me. HTML rendering capabilities are limited by what Apache FOP can handle. Class test.ZenReportItemHtml Extends %ZEN.Report.reportPage { Parameter DEFAULTMODE = "pdf"; Parameter MYMARKUP = "<div style='font-weight:bold'>bold</div><br/><div>not-bold</div>"; XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition" ] { <report xmlns="http://www.intersystems.com/zen/report/definition" name="Test" runonce="true"> <element name="MyMarkup" escape="html" expression="..#MYMARKUP" /> </report> } XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display" ] { <report xmlns="http://www.intersystems.com/zen/report/display" name="Test"> <document width="8.5in" height="11in" marginLeft="1.25in" marginRight="1.25in" marginTop="1.0in" marginBottom="1.0in"> </document> <body> <item field="MyMarkup" copyhtml="true" /> </body> </report> } }
go to post Marc Mundt · Feb 9, 2021 It's fairly common to use mutual TLS authentication as well. In a nutshell, both sides validate the other's cert before allowing a connection.
go to post Marc Mundt · Feb 6, 2021 It doesn't use audit events specifically, but maybe creating custom source control hooks would work? You can set actions for certain events such as compiles.
go to post Marc Mundt · Feb 5, 2021 %SQL.Statement's %Execute method returns a result set (%SQL.StatementResult) object, not a %Status. You can check if any rows were returned by checking %ROWCOUNT or %Next() in the StatementResult.
go to post Marc Mundt · Jan 29, 2021 I suspect that some of the binary bytes are getting converted to UTF-8, and this is what the "u" option in the sixth argument of %WriteJSONStreamFromObject specifies. You can try removing the "u" and see if that helps, but even if it does I believe you will find other problems because JSON isn't meant to carry raw binary data. Generally binary data is base 64 encoded when putting it in JSON. One example of the problem with binary data is that the value of binario needs to be enclosed in quotes "". But the binary data could include a byte which is the same code as a quote, which would cause the JSON recipient to think that the value of binario has ended. My suggestion is to base 64 encode the binary data.
go to post Marc Mundt · Jan 28, 2021 You are first copying the binary content into objetoSalida.informacion, which is a %String. Then you write the %String into objetoSalida.binario which is a %Stream.GlobalBinary. Why not just make objetoSalida.binario a %String?
go to post Marc Mundt · Jan 28, 2021 No, you should only stop a process using the IRIS process management tools unless instructed otherwise by the WRC.
go to post Marc Mundt · Jan 27, 2021 The task history page will display the process ID (PID) for the current running task. You can then use IRIS process management tools to monitor, suspend, or terminate the process if it's safe to do so.
go to post Marc Mundt · Jan 27, 2021 In Studio, go to File -> Change Namespace In the Cache Connection Manager window, click "Connect"In the Server Connection window, select the same server and click "OK"Here you can untick "Remember Password" and login again
go to post Marc Mundt · Jan 25, 2021 You were on the right track with %WriteJSONFromObject(), but you'll want to use %WriteJSONStreamFromObject() instead. I don't see what purpose the Body property in your request class serves. You can just create a stream object variable instead. set myTempStream=##class(%Stream.GlobalCharacter).%New() set tSC=##class("%ZEN.Auxiliary.altJSONProvider").%WriteJSONStreamFromObject(.myTempStream, pRequest) if $$$ISERR(tSC) { quit tSC } ...then later: Set tSC=..Adapter.PostURL(tURL,.tHttpResponse, , myTempStream)