go to post Marc Mundt · Jan 19, 2021 Can the customer provide you with a sample XML file?If not, you can try something like this online tool which accepts an XSD file and generates a sample XML document with fake data according to the XSD schema.Demo.HL7.MsgRouter.Schema:ORM_O01 really isn't applicable to your use case. Not worth spending your time on it.
go to post Marc Mundt · Jan 19, 2021 $this is a reference to the currently executing DTL. We need a reference to the BP that's calling the DTL.Code action in DTL set ^zmm("$this")=$this set ^zmm("%Ensemble(""%Process"")")=%Ensemble("%Process") TESTING>zw ^zmm ^zmm("$this")="Demo.DTL.ChainTest1" ^zmm("%Ensemble(""%Process"")")="7@EnsLib.HL7.MsgRouter.RoutingEngine"
go to post Marc Mundt · Jan 15, 2021 No worries, it's always hard to understand from a forum post how far along someone is with their project. Have you been given any sample XML files that adhere to the schema? If so, you can just copy the XML into the test tool window. If you do this, does it work? One other question: what version of Ensemble or HealthShare are you using?
go to post Marc Mundt · Jan 15, 2021 It looks like the ENSDEMO namespace doesn't have an example for XML v-docs. The basic steps are:- Import an XSD (XML schema) for the document format you need to work with:https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c...- In your DTL, select XML as the Source Type and for Source Document Type select the schema that you just imported- The DTL editor will use the imported schema to display a document structure that you can use to visually build your mappingsAt this point you can paste into the testing tool a sample XML that follows the XSD. If you just want to do a quick test to see how this works, you can find a simple XSD online and import that. I found this sample which includes an XSD and sample XML that follows the XSD's structure:https://www.w3schools.com/XML/schema_example.asp
go to post Marc Mundt · Jan 15, 2021 That's an HL7 vdoc (EnsLib.HL7.Message) and that sample is HL7 code (though with strange delimiters). So yes, if your input message is HL7 (EnsLib.HL7.Message) then you can just paste a raw HL7 message into the testing tool. If your input message is XML (EnsLib.EDI.XML.Document) then you can just paste raw XML into the testing tool. If your input message is an EnsLib.EDI.XML.Document and the message content is HL7 there's going to be a problem :)
go to post Marc Mundt · Jan 15, 2021 That makes it easy. You can just paste raw XML into the Input Message box in the testing tool.
go to post Marc Mundt · Jan 15, 2021 What kind of virtual document? What class is the source message -- for example EnsLib.EDI.XML.Document?
go to post Marc Mundt · Jan 15, 2021 Yes, it's possible. Your input message is HL7, so you can just paste raw HL7 into the test tool.
go to post Marc Mundt · Jan 14, 2021 You need to literally use %Ensemble("%Process")... Don't replace "%Process" with the name of your component.
go to post Marc Mundt · Jan 14, 2021 A reference to the business process (our message router) that the DTL is being run from is stored in %Ensemble.("%Process") and you can use that to do a SendRequestSync. Be sure to add lots of error handling. DTLs throwing strange errors can be a pain to troubleshoot. if '$D(%Ensemble("%Process")) { write "This doesn't work in DTL test mode",! quit $$$OK } else { #dim bp as Ens.BusinessProcess set req = ##class(Ens.Request).%New() set bp=%Ensemble("%Process") set tSC=bp.SendRequestSync("My.Operation",req,.resp) if $$$ISERR(tSC) { // Oops... error! } quit tSC }
go to post Marc Mundt · Jan 7, 2021 I didn't read your post carefully enough -- I see that you're passing the column name as a variable named "index". Embedded SQL doesn't allow using host variables (e.g. :myVar ) in place of an identifier: A host variable cannot be used to specify an SQL identifier, such as a schema name, table name, field name, or cursor name. A host variable cannot be used to specify an SQL keyword. The alternative would be to switch from embedded SQL to Dynamic SQL, which would allow you to manually construct your query string before executing it: set myQuery="SELECT "_index_" FROM osuwmc_Tecsys.UnitReference WHERE "_index_" = ?" "value" would then be passed as a parameter when executing the statement and you would use "%Get" in the result set to fetch the value for ValidUnitID.
go to post Marc Mundt · Jan 7, 2021 If "index" is a column name in the table then it shouldn't have a colon at the front. Also, it's best to check the SQLCODE in order to handle errors: if SQLCODE < 0 { // Do something about an error } else { quit myReturnValue }
go to post Marc Mundt · Jan 5, 2021 Hi Yone, I see two possible problems: It seems like "Do ImagenMIMEPart.Body.Write(linea)" should be inside the while loop. No? In this case after the final read() linea may be empty and that is what is set as the content of the mime part. While 'stream.AtEnd { Set linea=stream.Read() } $$$LOGINFO("linea: "_linea) //Escribir la imagen en el mensaje MIME Do ImagenMIMEPart.Body.Write(linea) And here you are using a character stream to read the jpeg, but jpeg is a binary format. You'll want to use %Stream.FileBinary instead. Set stream=##class(%Stream.FileCharacter).%New() Set sc=stream.LinkToFile("C:\Users\ext-ymorjim\Pictures\miSCS.jpg")
go to post Marc Mundt · Jan 4, 2021 Here's a doc about creating multipart/form-data requests: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...
go to post Marc Mundt · Dec 8, 2020 Yes, from system management portal System Explorer >> SQL you can enter a query and instead of executing it click "Show Plan".
go to post Marc Mundt · Dec 2, 2020 %K(-5) wouldn't take care of DST automatically. $ZDATETIMEH(myUTCTime, -3) will convert a $HOROLOG format (actually $ZTIMESTAMP format) value of UTC time into a $HOROLOG value in local time. So you can first use ConvertDateTime with %q(4) to convert to $ZTIMESTAMP format, then use $ZDATETIMEH with -3 to convert to local time, then use ConvertDateTime (or $ZDATETIME) to convert the $HOROLOG format back into a formatted date/time string. https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c... https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c...
go to post Marc Mundt · Dec 2, 2020 Yes, this can be done through configuration and is a standard feature of the HL7 HTTP business operation (EnsLib.HL7.Operation.HTTPOperation). Details on settings for the HTTP operation. Look in particular at SSLConfiguration:https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c... Details on creating an SSL/TLS config (with or without cert) to be used by the operation:https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI...
go to post Marc Mundt · Nov 20, 2020 A few people have suggested using web services, which seems like the most straightforward approach to me. Anna, is there a reason not to use a web service?