go to post Robert Barbiaux · Jun 5, 2024 What is the class of config item ‘TEST_ROUTER’ ? Maybe not EnsLib.HL7.MsgRouter.RoutingEngine, which exposes the HL7 property.
go to post Robert Barbiaux · May 27, 2024 The message is not valid as per HL7 v2.5 section 4.4.6. The second ORC...TQ1...OBR is invalid, it should be ORC...OBR...TQ1 : in the ORDER_PRIOR group, ORC is optionnal and must be followed by OBR followed by optional NTE and then TQ1 group. Keep in mind : IRIS HL7 schemas are based on formal grammars published by HL7.org.
go to post Robert Barbiaux · May 10, 2024 The curly brace syntax "source.{PID:12}" is not supported in code action as the block is included as is in the class code generated at compile time. Use GetValueAt() to achieve the same effect : Set country = source.GetValueAt("PID:12")
go to post Robert Barbiaux · Apr 11, 2024 You can use $classmethod to invoke any class method, including %New, e.g. set cls = "MyPackage.MyClass" set obj = $classmethod(cls,"%New")
go to post Robert Barbiaux · Apr 10, 2024 When dealing with stream input, it’s good to keep in mind that strings are limited in length, as explained in the documentaton.
go to post Robert Barbiaux · Mar 14, 2024 Indeed f j=$i(r)... would get a !! mark if it was a chess move 😉Congratulations !
go to post Robert Barbiaux · Mar 13, 2024 Size 201 181 181, all unit tests passed (including undefined argument, and additional .Type("abc,de","de,abc") --> Unsorted)Thanks Eduard, I missed the extraneous quotes (my mind is still not entirely purged of strongly typed languages habits 😅) ClassMethod Type(a...) As %String { f i=$i(r):1:$g(a){f j=1:1:$l(a(i),","){s l=$l($tr($p(a(i),",",j)," ")),c=$g(c,l),r=$s(l=c:r,r<3*l>c:2,r#2*c>l:3,1:4),c=l} k c} q $p("Constant1Increasing1Decreasing1Unsorted",1,r) }
go to post Robert Barbiaux · Feb 24, 2024 Hi,To summarize the documentation : ReplyCodeActions settings of HL7 operations is a comma-separated list of specifiers in the form <code>=<actions>, where <code> is an expression matching error condition(s) and <actions> is a string of one letter action codes. All codes where <actions> consists of only 'W' (for 'log a Warning') will be evaluated, and a warning will be generated for each matching <code>. Other <code> values will be evaluated in left-to-right order, executing the first matching <code> that has a non-warning <actions> value. As noted in the details for the 'W' flag, an error that only triggers 'W' <actions> will be treated as Completed OK. if ReplyCodeActions is empty, a default setting is used. For HL7 operations, it is : :?R=RF,:?E=S,:~=S,:?A=C,:*=S,:I?=W,:T?=C To match the application reject code in the HL7 ACK^O01 message in the example, and suspend all matching messages, use the following specifier, that matches all ACKs with MSA:1 = "AR" and suspend message, while retaining default behavior for other error conditions : :?R=S,:?E=S,:~=S,:?A=C,:*=S,:I?=W,:T?=C
go to post Robert Barbiaux · Feb 22, 2024 ^SPOOL is not buried 😁, it is well documented, along with %IS and %SPOOL utilities.It is simple and effective when used to it's intended purpose, that is, spooling text written to the currently in use device.
go to post Robert Barbiaux · Feb 22, 2024 As Enrico mentions, HL7 v2 message grammars, segment structures and data type syntaxes are available in IRIS schemas. Complete specifications and semantics are detailed in the normative documents available on HL7.org web site.
go to post Robert Barbiaux · Feb 19, 2024 Yes, ^SPOOL is the simplest way to achieve this. If you need a string rather than a global, you can just get all lines from ^SPOOL, for example : ClassMethod ZWriteToString() As %String { #Dim result as %String #Dim i,lineCount as %Integer kill ^SPOOL($j) open 2:$j use 2 zwrite s result="" s lineCount=$select($data(var):$za-1,1:$za-2) close 2 for i=1:1:lineCount s result=result_^SPOOL($j,i) return result }
go to post Robert Barbiaux · Feb 5, 2024 Thank you David, your excellent remarks are now part of the text.
go to post Robert Barbiaux · Feb 5, 2024 Hi Joseph, To unit test interoperability productions and their business hosts, such as business processes, extend the %UnitTest.TestProduction class.
go to post Robert Barbiaux · Jan 30, 2024 If the intent is to wrap the statements in a new variable scope, why not simply extract the block in a private method ?
go to post Robert Barbiaux · Jan 25, 2024 To execute the routine at scheduled intervals, you can use the task scheduler with %SYS.Task.RunLegacyTask , that is intended to do exactly what you describe, run a routine.
go to post Robert Barbiaux · Jan 24, 2024 EnsLib.HL7.Service.HTTPService may suit your needs : it implements reading HL7 message from incoming HTTP request.
go to post Robert Barbiaux · Jan 23, 2024 To clean pending messages and other suspended production data, you can use Ens.Director.CleanProduction() method, as explained in the documentation. Caution though, this will delete current production state, including removing message headers (Ens.MessageHeader instances) from queues.
go to post Robert Barbiaux · Jan 14, 2024 You can pass the value to the DTL using the transformation auxiliary parameter, as described in the documentation : Working with Rules | Developing Business Rules | InterSystems IRIS for Health 2023.3.To pass the source configuration name : in the business rule, before the send action, add an assign action to set RuleActionUserData to %PrimaryRequestHeader.SourceConfigName in the DTL, use aux.RuleActionUserData to access the value (see https://docs.intersystems.com/irisforhealth20233/csp/docbook/DocBook.UI....)
go to post Robert Barbiaux · Sep 18, 2023 I totally agree.At the moment I have all routines in a git repo, some files are using suffixes for disambiguation, and will gradually reduce entropy by refactoring and applying clear naming conventions as Evgeny suggest. my thanks to you both 😀
go to post Robert Barbiaux · Sep 18, 2023 After enabling case-sensitivity in Windows, it is indeed possible to keep the original storage names.Unfortunately, enabling the flag has no impact on the behaviour of Windows versions of git or vscode, they continue to use case-insensitive comparisons for file names. For example, it is impossible to stage / commit changes to the git repository, as file names differing only case are considered as a single file.