go to post Enrico Parisi · Dec 1, 2023 I'm afraid you cannot use the syntax shortcut () within a StrReplace function.You can use the () syntax to assign a constant string to ALL the repeating fields, like: <assign value='"PDF"' property='target.{PIDgrpgrp().ORCgrp().OBXgrp().OBX:ValueType}' action='set' /> In your case you need to iterate in each of the 3 repeating segments using foreach actions, like: <foreach property='source.{PIDgrpgrp()}' key='k1' > <foreach property='source.{PIDgrpgrp(k1).ORCgrp()}' key='k2' > <foreach property='source.{PIDgrpgrp(k1).ORCgrp(k2).OBXgrp()}' key='k3' > <assign value='..ReplaceStr(source.{PIDgrpgrp(k1).ORCgrp(k2).OBXgrp(k3).OBX:ValueType},"ED","PDF")' property='target.{PIDgrpgrp(k1).ORCgrp(k2).OBXgrp(k3).OBX:ValueType}' action='set' /> </foreach> </foreach> </foreach> Enrico
go to post Enrico Parisi · Dec 1, 2023 Hi Ian, I guess in the copy/paste something went wrong 😉Same code with different formatting: ClassMethod ValidNHS(pNHS As %String = "", Output pFailReason) As %Boolean { IF pNHS'?10N { set pFailReason = "Num" Quit 0 } set nCheckdigit = $Extract(pNHS,10,10) set nChi9Digits = $Extract(pNHS,1,9) set nMultFact = 2 set nCalcCheckdigit = 0 for i = 9 : -1 : 1 { set nThisDigit = $Extract(nChi9Digits,i,i) set nCalcCheckdigit = nCalcCheckdigit + (nThisDigit * nMultFact) set nMultFact = nMultFact + 1 } set nCalcCheckdigit = (nCalcCheckdigit # 11) set nCalcCheckdigit = 11 - nCalcCheckdigit if (nCalcCheckdigit = 10) { set pFailReason = "ChkDig" Quit 0 } if (nCalcCheckdigit = 11) { set nCalcCheckdigit = 0 } if (nCheckdigit = nCalcCheckdigit) { set pFailReason = "" Quit 1 } Else { set pFailReason = "ChkDig match" Quit 0 } }
go to post Enrico Parisi · Nov 30, 2023 Check the Filename setting in your Business Operation: Enrico
go to post Enrico Parisi · Nov 30, 2023 I would create my "custom" datatype extending %Library.DateTime: Class Community.dt.CustomDateTime Extends %Library.DateTime { /// Converts the %TimeStamp value to the canonical SOAP encoded value. ClassMethod LogicalToXSD(%val As %TimeStamp) As %String [ ServerOnly = 1 ] { Set %val=##class(%Library.TimeStamp).LogicalToXSD(%val) Quit $translate(%val,"TZ"," ") } } Then in your class define your property as: Property OPDT As Community.dt.CustomDateTime; Are you sure you really need %Library.DateTime and not %Library.TimeStamp?The difference is the JDBC/ODBC format. If you prefer using %Library.TimeStamp, then change the superclass in my sample code. Enrico
go to post Enrico Parisi · Nov 29, 2023 Hi Emil,I can think of 3 possible approaches. 1) Use XPATH2) Modify the XML Document as a DOM3) Use XSLT transformations All 3 can be used/implemented in IRIS. Enrico P.S.: I suggest using the latest version of the documentation
go to post Enrico Parisi · Nov 28, 2023 Maybe the %JSONImport method is returning an error? To find it out change this two lines:do pResponse.%JSONImport(tHttpResponse.Data.Read())quit $$$OK With:quit pResponse.%JSONImport(tHttpResponse.Data.Read()) Then check the trace/event log. Enrico
go to post Enrico Parisi · Nov 27, 2023 If it's in the table, then can be viewed in the event log. All that page does is run a query against ENS_UTIL.LOG and display the result.From your screenshot the source config item should be ....RsltRouter, if not found in the list (I don't know why), you can just type it or omit it.
go to post Enrico Parisi · Nov 27, 2023 You can also search directly in the event log from the Management Portal There you also get a link to the session trace. Enrico
go to post Enrico Parisi · Nov 27, 2023 Method OnRequest(pRequest As Ens.StreamContainer, Output pResponse As Ens.Response) As %Status { $$$LOGINFO("Inne i XmlFilterProcess") set filename = pRequest.OutputFilename set stream = pRequest.Stream $$$LOGINFO(stream.Read()) set status=##class(%XML.XPATH.Document).CreateFromStream(stream,.mydoc) set status=mydoc.EvaluateExpression("/staff/doc/name","text()",.myresults) set count = myresults.Count() $$$LOGINFO(count) for i =1:1:count { set result = myresults.GetAt(i).Value $$$LOGINFO(result) } Quit status } You need to change this two lines: set status=mydoc.EvaluateExpression("/staff/doc/name","1",.myresults)set status=mydoc.EvaluateExpression("/staff/doc/name","text()",.myresults) set result = myresults.GetAt(i)set result = myresults.GetAt(i).Value Enrico
go to post Enrico Parisi · Nov 26, 2023 EVERY interoperability session start from a Business Service, be it from a message/call received from an external system or triggered by a timed event, like in this case.Your problem/question is: "I need to trigger production process/operation every minute" That's EXACTLY what my BS sample does, all you need is to call your "process/operation" that "exchange data with external system". This is the way to implement it.Enrico
go to post Enrico Parisi · Nov 26, 2023 Very simple, just create a Business Service that use Ens.InboundAdapter. The default behavior of Ens.InboundAdapter is to call the BS (ProcessInput()) every "CallInterval" seconds. Something like: Class Community.bs.TimedService Extends Ens.BusinessService { Parameter ADAPTER = "Ens.InboundAdapter"; Method OnProcessInput(pInput As %RegisteredObject, Output pOutput As %RegisteredObject) As %Status { Set BpRequest=##class(Ens.Request).%New() Set sc=..SendRequestSync("YourBusinessProcessName",BpRequest,.BpResponse) ; ; OR, if you don't need to wait for the BP to finish: ;Set sc=..SendRequestAsync("YourBusinessProcessName",BpRequest) Quit sc } } Add this service to your production, to trigger every one minute set the setting CallInterval=60 (seconds). Enrico
go to post Enrico Parisi · Nov 20, 2023 Again, difficult to tell from the limited info provided. What are you doing after instantiating HS.FHIRServer.API.Data.Request ? HS.FHIRServer.API.Data.Request is a serial class, not a persistent class, are you using it in a SendRequest(Sync/Async) call? If so, then you cannot do that. But again, this is only a guess, please provide more context. Enrico
go to post Enrico Parisi · Nov 20, 2023 Difficult to tell from the limited info provided. What I can guess is that it seems you are trying to use a serial class (HS.FHIRServer.API.Data.Request) as message. But I might be wrong, please provide more context. Enrico
go to post Enrico Parisi · Nov 20, 2023 My guess/bet is that they need/want to include the specimen label(s) in PDF format. I think that crating a custom schema with custom Z segment, possibly a repeating segment, is an option. Enrico
go to post Enrico Parisi · Nov 18, 2023 The documentation includes a lot of info about INSERT OR UPDATE Sql command, including: "An existing row is one in which the value being inserted already exists in a column that contains a unique constraint. For more details, see Uniqueness Checks." "When using INSERT OR UPDATE, you can only insert IDKEY column values, not update them. If the table has an IDKEY index and another UNIQUE constraint, INSERT OR UPDATE matches these columns to determine whether to perform an insert or an update. If the other key constraint fails, this forces INSERT OR UPDATE to perform an update rather than an insert. However, if the specified IDKEY column values do not match the existing IDKEY column values, this update fails and generates an SQLCODE -107 error, because the update is attempting to modify the IDKEY columns." I suggest to read carefully the relevant documentation page. Enrico
go to post Enrico Parisi · Nov 14, 2023 It seems that character 8211 (en dash) is not utf-8 but utf-16, google is your best friend and I'm not an expert in unicode, utf-8, utf-16 etc.! 😊 Set xml="<?xml version=""1.0"" encoding=""UTF-8""?>"Set xml=xml_"<Text>This is n-dash "_$wc(8211)_" in xml</Text>"Set xml=$ZCONVERT(xml,"O","UTF8")Set sc=##class(%XML.XPATH.Document).CreateFromString(xml, .xmlDoc)Write scSet sc=xmlDoc.EvaluateExpression("/Text","text()",.result)Write result.GetAt(1).Value,! Result: This is n-dash – in xml Enrico
go to post Enrico Parisi · Nov 8, 2023 I was surprised that overriding the OnFailureTimeout() in the custom BO class did not work! According to the description that was definitely the way to go. But it indeed does not work(ed). I opened a WRC and it turned out that there is a bug "around" the OnFailureTimeout() implementation in Ens.BusinessOperation. So, if anyone need to implement OnFailureTimeout() with Set ..Retry=1, first it requires to contact WRC, explain the problem and reference DP-426250 to get the fix. Enrico
go to post Enrico Parisi · Nov 8, 2023 Sorry, forgot the namespace, try this: do ##class(%XML.XPATH.Document).CreateFromStream(pResponse.ContentStream, .tPnRXML) Set tPnRXML.PrefixMappings="ns urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" Set sc=tPnRXML.EvaluateExpression("/XMLMessage/ContentStream/ns:RegistryResponse/ns:RegistryErrorList/ns:RegistryError","@errorCode",.tPnRResult) Set tPnRResult.GetAt(1).Value ; Value=XDSRegistryDeprecatedDocumentError
go to post Enrico Parisi · Oct 23, 2023 Hi, before using the Java class/method you need to import/create the proxy classes within Caché using ##class(%Net.Remote.Gateway).%ExpressImport() (or method %Import). Have a look to the documentation here: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY... Enrico
go to post Enrico Parisi · Oct 3, 2023 Converting the Base64 stream to a pdf is trivial, extracting and searching text inside a pdf....can be hard to (almost) impossible. Enrico