go to post Marc Mundt · Mar 17, 2021 1) Ah, that makes sense. SendFormDataArray is a method in EnsLib.HTTP.OutboundAdapter, but you're not using an adapter. To do a POST using %Net.HTTPRequest, you'll need to use the Post() method. 2) I had a look at the HTTP specs, and it looks like content-disposition is required for each part: In a multipart/form-data body, the HTTP Content-Disposition general header is a header that must be used on each subpart of a multipart body to give information about the field it applies to. The subpart is delimited by the boundary defined in the Content-Type header. Used on the body itself, Content-Disposition has no effect. You can set this like any other header using the SetHeader method in %Net.MIMEPart. You're already doing that here: Do BinaryMIMEPart.SetHeader("Content-Type", ContentType)
go to post Marc Mundt · Mar 9, 2021 You can use %Stream.FileBinary to create a file-based stream and then copy the contents from the %CSP.BinaryStream to it. Set stream=##class(%Stream.FileBinary).%New() Set sc=stream.LinkToFile("c:\myfile.txt") Set sc=stream.CopyFromAndSave(myCSPBinaryStream)
go to post Marc Mundt · Mar 8, 2021 Yone, try removing this line and test if it works: Set pOutput=##class(%GlobalBinaryStream).%New()
go to post Marc Mundt · Mar 5, 2021 If you are sending a body in your request to the REST service then it needs to be a POST, not a GET. <Route Url="/consultarImagen" Method="GET" Call="consultarImagen"/>
go to post Marc Mundt · Mar 4, 2021 There is an included utility that lets you see at a glance which ports are configured for use by which business services. Naturally this won't tell you if some other OS application is using a port - for that you'd use netstat as mentioned above. https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI...
go to post Marc Mundt · Feb 26, 2021 Emanuel, Since you're writing this in a normal .int, you won't want to use "..%HTTPRequest". You can just instantiate a new request object and name it something like httpRequest: set httpRequest=##class(%Net.HttpRequest).%New() And instead of Craig's ..Adapter call, you can use httpRequest's Post method.
go to post Marc Mundt · Feb 25, 2021 Joey, this does what Nicole described above. If any of the OBX:3.1 values match WBC, the message will be sent to the business operation.
go to post Marc Mundt · Feb 25, 2021 Sample code using Embedded SQL: set tName="EMRNameA" set tEMRNameLike="%"_tName &SQL(SELECT DataValue INTO :tValue FROM Ens_Util.LookupTable WHERE TableName = 'EMRName' AND KeyName LIKE :tEMRNameLike) if (SQLCODE = 0) { write "tValue:",tValue,! } else { write tName_" Not found",! }
go to post Marc Mundt · Feb 25, 2021 Have you considered using SQL for this rather than going directly to the globals? SELECT DataValue FROM Ens_Util.LookupTable WHERE TableName = 'EMRName' AND KeyName LIKE '%EMRNameA'
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> } }