Julian Matthews · Jun 3, 2019 go to post

Hi Cedric.

I think you should be able to achieve this using the routing rules by doing something like this: (Please ignore my blank condition in the example)

It should complete the first send (which is your transform to A04) and then it should send your source ORM message on the second send.

Julian Matthews · May 31, 2019 go to post

Hi Murillo.

From that screenshot - an ORU_R01 should go to ManageRIS every time, and go to ManageEDM as well if the OrderStatus is 160, so I'm at a loss as to why it isn't working as intended.

My next steps would be checking the general tab to be sure the rule type is set to "HL7 Message Routing Rule" or, if that fails, creating a new rule to make sure nothing has gone weird in the background for this specific rule.

Otherwise - if no one else is able to point you in the right direction here it might be worth raising with WRC as it could be a weird bug with the version of Ensemble.

Julian Matthews · May 31, 2019 go to post

Hi Murillo.

You will need a when to specify when the action should be triggered, and using WHEN 1 is the easiest way of achieving what you need, however I think I see your problem with the ordering.

The reason why your rule only sends to ManageRIS when the ManageRIS item is above the OrderStatus check is because of the RETURN action.

What the RETURN does is stop any actions beyond that point from being processed if the conditions of the WHEN are met. So in your case: When Orderstatus =160, transform and send, and then do not process anything else and move on to the next message.

So what you will want to do is remove the RETURN block to allow the second WHEN in rule two to be run regardless of the outcome of the first WHEN.

Julian Matthews · May 3, 2019 go to post

You might have some luck using wireshark to see if there's anything that stands out in the communication between Ensemble and the remote system?

Julian Matthews · May 2, 2019 go to post

Within the Production under Production Settings, you should currently find a Document button which will produce a report of everything within your production. However, depending on the production size, this could easily be overkill.

2019 brings a new option called "Interface Maps" where you can get a graphical view of message flows, along with the processes, routers, and rules for the individual sections of your production. It's a lot cleaner than using the Documentation generator, but if you're needing to show multiple routes, you're likely to want to go through each one and take a screenshot. I also found that where I have a router with lots of rules/transforms, I need to scroll the screen to see the bottom of the display.

Information on this can be found here.

Julian Matthews · May 1, 2019 go to post

I haven't come across anything built in as standard that would do this in itself, but I guess it's something you could create within your environment.

I have something a bit similar, but the index is populated by a CSV received daily from another organisation, and then the process compares the HL7 messages against the index and sends if the patient is present in that table before sending.

Julian Matthews · Apr 23, 2019 go to post

I had this exact issue last week, and this is how I got around it. For clarity, I wanted to pass the Dynamic Object from a process to an operation.

I created my dynamic object within the Process, and then used the %ToJSON Method to put the JSON within a GlobalBinaryStream (which can be passed through the request).

In the Operation, I then use the %FromJSON Method of DynamicAbstractObject to then have the Dynamic Object within the operation.

Julian Matthews · Feb 20, 2019 go to post

Hi Scott.

I have just taken a look, and it doesn't seem to appear in anything I have (Highest being v2.7.1). Looking around online, ORU^R40 was apparently introduced in HL7 V2.8.

Julian Matthews · Feb 19, 2019 go to post

Could you generate a message to your ens.alert (or equivalent) from the BO, and then immediately call ##class(Ens.Director).EnableConfigItem to disable the business process?

Julian Matthews · Feb 18, 2019 go to post

Hi Andrew.

I don't think the operation to a downstream system would be the appropriate place for adjusting the HL7 content.

Using Transforms within a router will be the best approach for this, and while it might seem a little cumbersome creating a transform per message type you should be able to remove some of the leg work by using sub-transforms.

For example; if you were looking to adjust the datestamp used in an admission date within a PV1, rather than complete the desired transform work in every message transform that contains a PV1, you create a sub-transform for the PV1 segment once and then reference this in your transform for each message type. If you then have additional changes required to the PV1 which is message specific (say, a change for an A01 but not an A02) you can then make this change in the message specific transformation.

As far as transforming datetime in HL7, I have faced my share of faff when it comes to this with suppliers. The best approach from within the transforms is to use the built in ensemble utility function "ConvertDateTime" listed here

Julian Matthews · Jan 25, 2019 go to post

Just to add to this - I have had a play with this new function within the 2019 Preview release and it works really well.

Julian Matthews · Jan 10, 2019 go to post

You might be hitting a hard limit on the performance of the hardware you're using. Are you able to add more resource and try again?

Julian Matthews · Jan 9, 2019 go to post

What type of business service are you using? If you are using a single job on the inbound, I guess you're hitting a limit on how fast the adapter can work on handling each message (in your case, you're getting around 15ms per message)

You could look at increasing the pool size and jobs per connection if you're not worried about the order in which the messages are received into your process.

Julian Matthews · Dec 27, 2018 go to post

Hi Alexandr.

If you are looking to run a task at specific times, you could create a new task which extends %SYS.Task.Definition to then be selectable as an option from the task manager.

For example, I have a folder which I need to periodically delete files older than x days.

To achieve this, I have a class that looks like this:

Class DEV.Schedule.Purge Extends %SYS.Task.Definition
{

Parameter TaskName = "Purge Sent Folder";

Property Directory As %String;

Property Daystokeep As %Integer(VALUELIST = ",5,10,15,20,25,30") [ InitialExpression = "30" ];

Method OnTask() As %Status
{

Set tsc = ..PurgeSentFolder(..Directory,..Daystokeep,"txt")
Quit tsc
}

Method PurgeSentFolder(Directory As %String, DaysToKeep As %Integer, Extention As %String) As %Status
{
// Calculate the oldest date to keep files on or after
set BeforeThisDate = $zdt($h-DaysToKeep_",0",3)

// Gather the list of files in the specified directory
set rs=##class(%ResultSet).%New("%File:FileSet")
Set ext = "*."_Extention
do rs.Execute(Directory,ext,"DateModified")

// Step through the files in DateModified order
while rs.Next() {
set DateModified=rs.Get("DateModified")
if BeforeThisDate]DateModified {
// Delete the file
set Name=rs.Get("Name")
do ##class(%File).Delete(Name)
}
// Stop when we get to files with last modified dates on or after our delete date
if DateModified]BeforeThisDate 
set tSC = 1
}
quit tSC
}

}

Then I created a new task in the scheduler, selected the namespace where the new class exists, and then filled in the properties and times I want the task to run.

Julian Matthews · Dec 24, 2018 go to post

Hi Eric.

My first check would be looking at the console log for that instance to see if there's anything wobbling in the background. Specifically checking for any entries around the time the monitor thinks it has gone down.

Failing that, it's probably worth going to WRC. The last thing I think you need this close to Christmas is the Primary dropping and you needing the Mirror to be working.

Julian Matthews · Dec 24, 2018 go to post

If you go to the management portal for the "down" mirror, are their any errors that might point to the issue?

I recently saw this happen where the mirror had run out of space to store the journal files, so the mirror stopped functioning and was showing as "down".

Julian Matthews · Nov 29, 2018 go to post

Hi Stephen.

Are you able to select the specific queue from the Queues page and press the abort all button, or does it return an error?

Julian Matthews · Nov 15, 2018 go to post

Yes, a new schema can do this along with a transformation.

If you have an existing schema, probably best to clone it and then edit the clone to speed things up.

Julian Matthews · Nov 2, 2018 go to post

So I found that it is possible to save single messages using the "HL7 V2.x Message Viewer" which might not be suitable for you if you're looking to export loads of messages.

One option could be to add a new HL7 file out operation, search for your desired messages from the Router you wish to "export" from and then resend them to a new target which can be selected from the Resend messages page.

Julian Matthews · Oct 18, 2018 go to post

Sorry John, I hadn't had my coffee when I read your post.

When you look at the first message heading info within the Trace, does the Time Processed come before or after the Time Created of Message 2?

Julian Matthews · Oct 1, 2018 go to post

Hi all, I have answered my own question.

Per number, I will need to create a new HS.SDA3.PatientNumber and set the required information, and then insert each HS.SDA3.PatientNumber into the HS.SDA3.PatientNumbers list that exists within the HS.SDA3.Patient object.

For the benefit of anyone else that stumbles across this post (and myself when I forget this in a few weeks time and end up finding my own post): To achieve this in Terminal as a testing area, these are the steps I followed:

Set Patient  = ##class(HS.SDA3.Patient).%New()

Set PatNum1 = ##class(HS.SDA3.PatientNumber).%New()

Set PatNum2 = ##class(HS.SDA3.PatientNumber).%New()

Set PatNum1.Number = "123456"

Set PatNum1.NumberType = "MRN"

Set PatNum2.Number = "9999991234"

Set PatNum2.NumberType = "NHS"

Do Patient.PatientNumbers.Insert(PatNum1)

Do Patient.PatientNumbers.Insert(PatNum2)

Julian Matthews · Sep 21, 2018 go to post

Hi Akio.

Generally speaking, the password for the "_SYSTEM" account is set by the user during the install process, so I don't think there will be a default.

Julian Matthews · Jul 17, 2018 go to post

Is the Business Process custom? If so, it's possible that there is a bit of bad code that is returning an error state and then continuing to process the message as expected?

It might help if you provide some more detail on the BP itself.

Julian Matthews · Jun 15, 2018 go to post

Hi Guilherme.

I think your best starting point will be providing your system specifications, the OS you're running Studio on, and the version of Studio/Cache you are running.

Depending on the issue it could be anything that is causing your problems.