go to post Jeffrey Drumm · Mar 24, 2021 Hi Scott, You can get the repetition count for a field with the GetValueAt() method: Set tRepCount = msg.GetValueAt("OBX(3):5(*)") You can then iterate over the repetitions in a FOR loop: For tRep = 1:1:tRepCount { If msg.GetValueAt("OBX(3):5("_tRep_")") = tMatchVal { // Do stuff } }
go to post Jeffrey Drumm · Mar 24, 2021 Messages for a Business Service would be queued in an external system if the service is unable to process them faster than they're being generated. Are you referring to the time-in-queue for messages received by the service before they're acted upon by a Business Process or Operation?
go to post Jeffrey Drumm · Feb 24, 2021 The tilde character ("~") has special meaning in HL7; it is normally used as the field repetition character. If it is being included in a field value as a literal character, it is often converted to an "escape sequence" so that it can be delivered to a downstream system intact rather than interpreted as a delimiter; the escape sequence for the field repetition character is \R\. Is your intended use of the ~ character to function as a repetition delimiter, or is it actually a verbatim part of a field value?
go to post Jeffrey Drumm · Feb 18, 2021 Are you inserting these values into an EnsLib.HL7.Message object? If yes, the standard way of doing this is to first make sure the SPM field you're working with is defined as repeating in the message schema (DocType), then iterate through your list of field values to be inserted. Assuming your message object is tMsg: Do tMsg.SetValueAt(Modifier1,"SPM:9(1)") Do tMsg.SetValueAt(Modifier2,"SPM:9(2)") Do tMsg.SetValueAt(Modifier3,"SPM:9(3)") This will automatically use the repetition separator to delimit the values in SPM field 9. Note that the path supplied for the SPM segment/field will vary based on your specific schema definition.
go to post Jeffrey Drumm · Feb 15, 2021 You sure can. You can find the documentation for adding settings to business hosts here.
go to post Jeffrey Drumm · Feb 11, 2021 If it's an ObjectScript process, you would use ..SendRequestSync() or ..SendRequestAsync(), with newrequest as the request argument and the name of the downstream process or operation as the target argument. Whether you would send it asynchronously or synchronously would depend on your needs. For healthcare integration, synchronous is generally required as it maintains FIFO. You can't modify an inbound message from a service as it will have the immutable property set; that's why you have to clone it to make changes.
go to post Jeffrey Drumm · Feb 9, 2021 You can download the installer from the Online Distributions area of the WRC, in the Components section. The CSP Gateway is known as the Web Gateway from IRIS 2019 forward. And yes, just follow the documentation once it's installed.
go to post Jeffrey Drumm · Feb 8, 2021 02/08/21-09:17:52:754 (8272) 2 [Generic.Event] Too many Cores (12) for InterSystems IRIS Community License. The Community Edition license is invalid for the number of cores your Windows 10 host has. It supports a maximum of 8 cores, and you appear to have 12.
go to post Jeffrey Drumm · Feb 8, 2021 You'll need to install the CSP gateway component on the Apache server, but not IRIS itself.
go to post Jeffrey Drumm · Feb 8, 2021 As is USER> w $system.Util.InstallDirectory()_"lib" There's also a LibPath entry in IRIS.cpf, but I'm not sure it's the same. But you can get it: %SYS> do ##class(Config.config).Get(.props) %SYS> write props("LibPath") Unfortunately on the IRIS server I'm working with it's empty ...
go to post Jeffrey Drumm · Jan 20, 2021 What class did you use for the inbound service? I created a small batch of HL7 messages using nothing but newlines (newline is \n ... carriage return is actually \r). I consumed that file using a service based on EnsLib.HL7.Service.FileService and they were processed correctly. If you used one of the HL7 service classes, what did you select for Framing? Finally, is it possible that the messages you're testing with contain an actual backslash (\) character followed by the letter 'n' separating the segments? I've seen this happen before, believe it or not ...
go to post Jeffrey Drumm · Jan 20, 2021 I'm assuming you're working with Ensemble (or Interoperability as it's known in the most recent IRIS-based versions) ... If you create a class that extends Ens.Rule.FunctionSet, not only will you be able to call its methods/functions from the DTL editor, they will appear as selectable functions in the drop-down list.
go to post Jeffrey Drumm · Jan 15, 2021 Nevermind. Ugh. Been a rough week. HL7.{PID.7} Contains CurrentDateTime("YYYYMMDD") Close, but not quite:
go to post Jeffrey Drumm · Jan 15, 2021 This question is more than 2 1/2 years old now, but I guess I missed it when it was posted. Regardless, the issue is that "?" is the match operator that "Matches" represents, and is not part of the pattern itself. Your match pattern should not include the "?" character.
go to post Jeffrey Drumm · Jan 14, 2021 Your syntax for the match argument is wrong. You need quantifiers for the literal strings: 1P4N1":F"5N1"R"1P. This is not obvious from the documentation ... I only discovered it through experimentation. It appears as though the expression editor expects the pattern to be a quoted string, so you'll probably need to follow the syntax for quoting strings that contain quote characters: "1P4N1"":F""5N1""R""1P"
go to post Jeffrey Drumm · Dec 24, 2020 I'm thinking that the value you provided for ElementName in the service's configuration is incorrect. Your class definition also needs to match the structure of the repeating element, not the entire XML document. Here's an example XML structure: <Persons> <Person> <LastName>Drumm</LastName> <FirstName>Jeff</FirstName> <FavoriteColor>Red</FavoriteColor> </Person> <Person> <LastName>Herlick</LastName> <FirstName>Blakely</FirstName> <FavoriteColor>Teal</FavoriteColor> </Person></Persons> The classname you'd create would be something like User.Custom.Person, with properties FirstName, LastName and FavoriteColor. In the service's ElementName field, you'd enter Person. When the file is read, each Person element from the XML would end up in a separate message. You can then filter in the routing rule by using the variables Document.FirstName, Document.LastName, etc. and transform it in the DTL by selecting the Persistent Class User.Custom.Person as the source and your HL7 schema as the target. Make sense?
go to post Jeffrey Drumm · Dec 24, 2020 Hi Blake, Can you provide a bit more detail? If you need to create an individual HL7 message for each repeating element in the XML document, my answer here is probably the easiest way to get there. If there's a "master/detail" relationship within the XML, though, you'll need to handle that in a BPL, and perhaps still "chunk" the XML before handing it off to the BPL if there are multiple elements with master/detail relationships. You'd do that with the XML Object file service mentioned in the link (assuming you're getting these XML documents as local files ... there's also an FTP version of the service). There are tutorials on BPLs in ISC's Learning library.
go to post Jeffrey Drumm · Oct 25, 2020 That works, thanks! So the method is now doing everything I need. In its previous incarnation I was just returning a %String, and although it got me into trouble with messages larger than MAXSTRING, it was a LOT faster ... easily 3x to 5x faster.
go to post Jeffrey Drumm · Oct 25, 2020 Ok ... so this actually works: ClassMethod GetHL7Msg(pId As %String) As %Stream.GlobalCharacter [ SqlName = GetMsg, SqlProc ] { Set tHl7 = ##class(EnsLib.HL7.Message).%OpenId(pId,,.tSC) Throw:$$$ISERR(tSC) ..GetErr(-400, "HL7 Message with ID "_pId_" Not Found.") Set tMsg = ##class(%Stream.GlobalCharacter).%New() Set tSC = tHl7.OutputToLibraryStream(.tMsg) Do tHl7.%Close() If tSC Set tSC=tMsg.%Save() Throw:$$$ISERR(tSC) ..GetErr(-400, $system.Status.GetErrorText(tSC)) Return tMsg."%%OID" } I'm concerned that I'm using a persisted object. Does it automatically get killed once I leave the scope of the function (I'm assuming not, see the last paragraph)? Is there a way to force it to temp storage? It's also very slow, but 1) I'm currently connecting to the database over a VPN connection, and 2) the average message size is around 30KB, with some messages up to 3MB. It took 5 minutes to return 1000 rows. Looks like ^CacheStream is currently using almost 600MB.
go to post Jeffrey Drumm · Oct 25, 2020 No errors running the query from $system.SQL.Shell(), but I get the stream OREF rather than the message in the query result: ID SourceConfigName TargetConfigName Message 191344 InEpicMdm_Router OutOptumMdm 23@%Stream.GlobalCharacter 191348 InEpicMdm_Router OutOptumMdm 25@%Stream.GlobalCharacter 191352 InEpicMdm_Router OutOptumMdm 9@%Stream.GlobalCharacter 191356 InEpicMdm_Router OutOptumMdm 23@%Stream.GlobalCharacter 191360 InEpicMdm_Router OutOptumMdm 25@%Stream.GlobalCharacter 191364 InEpicMdm_Router OutOptumMdm 9@%Stream.GlobalCharacter 191368 InEpicMdm_Router OutOptumMdm 23@%Stream.GlobalCharacter 191372 InEpicMdm_Router OutOptumMdm 25@%Stream.GlobalCharacter 191376 InEpicMdm_Router OutOptumMdm 9@%Stream.GlobalCharacter 191380 InEpicMdm_Router OutOptumMdm 23@%Stream.GlobalCharacter ODBC seems to be doing a little magic in the background to return the stream data, but it's not good magic at the moment. EDIT: Turns out the ODBC wrangler needs a persistent object's "%%OID" rather than an OREF to fetch the stream. See the eventual working method here.