Question Lionel Woods · Sep 27, 2022

I am trying to split a HL7 message (RDE O11) into several messages depending on how many RXC segments there are in the message (Two RXC segments would need to two separate HL7 messages)

I have seen a couple of posts regarding this but am struggling with my BP using ObjectScript, the idea is to take the receiving message and split this before passing it onto another BP

Here is my code so far 

Class BDROWA.Transform.OVMO Extends Ens.BusinessProcess [ ClassType = persistent ]


{Method OnRequest(pRequest As EnsLib.HL7.Message, Output pResponse As Ens.Response) As %Status

2
0 561
Question Lionel Woods · Nov 2, 2021

I am using the following code to capture the current Date/Time and Date/Time from the previous 15 minutes 

set now=$horolog
$$$TRACE("now:"_now)set time15min = $piece(now,",",*) - (15 * 60)
$$$TRACE("time15min"_time15min)set after = $piece(now,",",1)_","_time15min
$$$TRACE("after"_after)set datetime15=$zdatetime(after, 3)
$$$TRACE("datetime15"_datetime15)set datetimenow=$zdatetime(now, 3)
$$$TRACE("datetimenow"_datetimenow)set datetime15=$replace(datetime15," ","T")
$$$TRACE("datetime15"_datetime15)set datetimenow=$replace(datetimenow," ","T")
$$$TRACE("datetimenow"_datetimenow)

1
0 183
Question Lionel Woods · Sep 28, 2021

I am trying to convert a valid date range (Previous Day - Current Day) to a valid date/time range (-15 mins from current date/time to current date/time) for a Task to run (Format needs to be YYYY-MM-DD hh:mm:ss)

Code being used currently for date range is 

set previousDay=$zdatetime($horolog-1,3)
set currentDay=$zdatetime($horolog-0,3)

Can anyone help?

4
0 436
Question Lionel Woods · Sep 30, 2020

Trying to extract "x, y", and only the "x" is being extracted because the "," is the separator  

The ":"  is set to extract everything after this 

"Working Example": xyz,

"Not  Working Example": "x,  y",

$EXTRACT($P($P(pData,",",78),":",2),2,$L($P($P(pData,",",78),":",2))-1)

Any ideas on how to extract the whole field on the example with the "," in the field

7
0 634