go to post Jeffrey Drumm · May 1, 2021 No, you can't use the quoted string notation (or at least if you can, I haven't figured out how). It's not persistent either, which is why I followed up to state that it's not really what you're looking for.
go to post Jeffrey Drumm · May 1, 2021 You should need only to iterate over the result set and populate the repetition of the PV1 field. Note that you reference PV1.7 (attending provider) in your narrative, but your code references PV1.3 (assigned patient location), so adjust the below as needed to identify the proper field: //create a copy of the request Set newREQ = pRequest.%ConstructClone() //now we use the copy for manipulation Set res=##class(%ResultSet).%New("%DynamicQueryGW:SQLGW") Set sc=res.Prepare(sqlstring,,conn) Set sc=res.Execute() // create a repetition counter Set cnt=1 While res.Next() { Set RET = res.GetData(2) //Modify the segment //Reference the correct repetition for the current result set member set res = newREQ.SetValueAt(RET,"PV1:3("_cnt_")") //Increment the repetition counter Set cnt=cnt+1 } Set sc=res.Close() Set sc=conn.Disconnect() The appropriate repetition delimiters as defined within the message schema (in this case "~") are automatically inserted. Note that the SetValueAt() method has been modified with the assumption that you're using a consistent HL7 schema across all messages and know the correct path to the PV1 field in question. In that case the FindSegment() method should not be necessary.
go to post Jeffrey Drumm · Apr 30, 2021 Hmm. Upon re-reading your question, I realized this isn't really the answer you were looking for. Others have provided the correct solutions/references.
go to post Jeffrey Drumm · Apr 30, 2021 ClassMethod TestObj() As %DynamicObject { Set oM = {} Set mMode = ["down","up","click"] Set iter = mMode.%GetIterator() While iter.%GetNext(,.val) { Do oM.%Set(val,{"id":"","type":""}) } Quit oM } USER> set oM = ##class(User.DynObj).TestObj() USER> write oM.%ToJSON() {"down":{"id":"","type":""},"up":{"id":"","type":""},"click":{"id":"","type":""}} USER> zwrite oM.down.id "" USER> zwrite oM.up.type "" USER> set oM.click.type = "double" USER> write oM.click.type double USER> write oM.%ToJSON() {"down":{"id":"","type":""},"up":{"id":"","type":""},"click":{"id":"","type":"double"}}
go to post Jeffrey Drumm · Apr 28, 2021 To clarify, are you looking for a method to be used in a Business Process to obtain the path and name of a file created by a Business Operation?
go to post Jeffrey Drumm · Apr 26, 2021 There's a description of this in the documentation. You can find it here: Business Host Versions.
go to post Jeffrey Drumm · Apr 24, 2021 For me, this was a fundamental revelation when I started working with Caché/ObjectScript. Where the $#&! is the sort function/method? I had naively assumed that arrays were simply associative with no intrinsic ordering, like Perl hashes. When the light dawned ... 🤦♀️
go to post Jeffrey Drumm · Apr 1, 2021 Do you have ^EnsPortal("DisableInactivityTimeout","Portal")=1 in each namespace that's running a production? It's not mapped from another namespace.
go to post Jeffrey Drumm · Apr 1, 2021 I'm pretty sure you want the value to be 0 for the second option: set ^%SYS("Portal","EnableAutoRefresh")=0
go to post Jeffrey Drumm · Apr 1, 2021 Have you tried %K(Server) as the output format prefix? HICG>set tm="20210401072630+0000" HICG>w ##class(Ens.Util.FunctionSet).ConvertDateTime(tm,"%q%z","%K(Server)%q%z") 20210401032630-0400 This of course assumes your server is in your locale/time zone.
go to post Jeffrey Drumm · Mar 30, 2021 This might get you closer to what you want, perhaps called from OnProcessMessage() in the service: ClassMethod QueueGetOldest(pQueueName As %String, Output pStatus As %Status) As %String { If ##class(Ens.Queue).GetCount(pQueueName) > 0 { Set tStmt = ##class(%SQL.Statement).%New() set qSC = tStmt.%PrepareClassQuery("Ens.Queue","EnumerateItem") Set tRS = tStmt.%Execute(pQueueName,"") Do tRS.%Next() Set tHdrid = tRS.%Get("MessageId") Set tMsghdr = ##class(Ens.MessageHeader).%OpenId(tHdrid) Set pStatus = $$$OK Return tMsghdr.TimeCreated } Set pStatus = $$$ERROR($$$GeneralError,"Not found") Return "" } It returns the time created of the oldest entry in the queue, or the empty string if the queue is empty or doesn't exist. You could create a variant that would accept a duration argument and return true/false if the duration between the current time and the time of the oldest entry exceeds that.
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.