Hi all, 

I am trying to create a method to count the number of entries in a global, including all subscripts. I am having a bit of trouble getting the code to make it to the second subscript. When I get to the position where my key is "Canada" and I add a comma and empty quotes to it, it returns USA as the new key when I do the order function. Is the $Order or the global not able to use a single string to represent multiple subscripts?


Here is my global structure:

0 20 379

I am getting the date 20201121090000 in the HL7 message, How do I convert it to 2020-11-21 09:00:00 in a easy way?

I am currently doing it by extracting the first 7 values and splitting as date and time and then adding a hyphen using substring.

Is there an easier way by using $ZDATE? or something like that?

0 20 428


as you can see in title my problem is with file ccontrol. I want to install whole Ensemble with Manifest if on machine wouldn't be any, or if I somehow find out instance of Ensemble I want to only use settings from included Manifest. I read that I can use file ccontrol to solve this task.

So can someone said me, how to work with ccontrol, is there some variable or function which returns me somethig? I have read some parts of documentation about ccontrol, but nothing help me so much, so you can give me link to part in documentation, where is this desribed.

0 19 351

I have a vendor that is sending an HL7 message. But when I asked for more detail about their mapping tables, they told me they typically don't supply that but supply an API for customers to call so they don't have to define tables and it is more dynamic.

So with that being said I am creating my first REST operation. I understand the gist of how a REST operation works in working with other types out Non HL7 Operations (SOAP, SQL) before. You send a request and get a response back, that part I understand.

0 14 190
Gary Koester · Nov 11
#5003 not implemented

I am trying to create a scheduled task but get not implemented error when I try to run it.

Class PICIS.Core.Tasks.CleanEntry Extends %RegisteredObject

ClassMethod ClearTasks(pBackupFile As %String = "d:\Temp\BackupTasks.xml", pDelete As %Boolean = 0)
    // Create backup file
    Set tBackup = ##class(%Stream.FileCharacter).%New()
    Set tBackup.Filename = pBackupFile
    Do tBackup.WriteLine("<?xml version=""1.0"" encoding=""UTF-8""?>")
    Do tBackup.WriteLine("<Tasks>")

0 14 153
Scott Roth · Jun 19, 2017
Date Filtering Functionality

I have come across several cases where I need to set a Date filter to send only send any admit/scheduled date past a certain point. We have a couple different date comparison functions but none looking at the true date. Most of them are date + 15 or etc. Does anyone have a good date function they have written to say if x > 20170102 ?



0 14 1,470
Token Ibragimov · Sep 6, 2018
parsing xml response


I'm sending http resuest to the web service :

Set httpRequest=##class(%Net.HttpRequest).%New()
Set httpRequest.Server=""
Set httpRequest.ContentType="text/xml" 
Set httpRequest.Https=1
Set httpRequest.ContentCharset="UTF-8"
Do httpRequest.SetHeader("Accept","text/xml")
Set httpRequest.Timeout=300     

0 13 751


I have a ORU message, which has a EVN segment that I want to remove and send the message across.

I tried to clone the request as below:

s newreq = request.constructClone

s changreq = newreq.RemoveSegmentAt("EVN")

Set request  = changereq

but it fails. Is there a way that I can safely remove a segment and pass it on?

Would appreciate your help in this



0 12 827
Jose Antonio Benitez · Jan 31, 2018

We need to  process 01B edifact files,  INVOICE / CREDIT NOTE / DEBIT NOTE, ORDER, MESSAGE STATUS

Does anyone have SEF files or scheme to import , this EDIFACT version or other to use it at Ensemble?

Thanks in adavance!

0 12 426

FIrst of all thank you for your time in reading this question and writing a response,

We would need some help,

-> Our objective is to control which method is being used in the service: GET POST PUT

We have tried to understand the example REST Service: Demo.REST.DirectoryService


After that we have tried to create our own custom rest service,

please take a few minutes to examine the following code:

0 12 161

Hello All,

I am looking to send out an email based on a patient's discharge where PID13-4 contains their email. We are currently using something similar with an Email.OutboundAdapter. However, in our current scenario we have a hard coded email in place as the recipient (as this is for order notification to a pager).  In the scenario in question, I would need PID13-4 to populate as the recipient of the email.  Does anyone have an example of something similar, or a suggestion on where to start?


1 12 387
Erin Dolson · Jul 16, 2019
Interface Monitoring

Hi all,

I'm looking to set up monitoring for several interfaces. I understand that I can set an Inactivity Timeout. However, obviously there are messages coming through more frequently during certain hours than other hours. 

Is there a way to set an Inactivity Timeout for each hour of the day instead of one value that is used all day long? 



3 12 453


I have a business service that needs to run only once a day at an specific time. It is important that the service only runs once.

I have tried the scheduler but you can only define the times (start-stop) when the service will be running...so this will not work for me as I need this to run only once.

Looking at the documentation I found "tasks". Apparently this is exactly what I need. As per documentation:

0 12 1,197

I need to set and use some context variables in a transformation (written in DTL), but the code is manually written.

When writing the same as BPL I define context variables and they are visible in transformations called by that process.

In something like this my.DTLtransform sets HL7 message fields to values in context variables:

1 11 263

Hi all,

I am trying to delete an item from a production through a routine that installs and disables items.

To add any item, I have no problems, even to enable and disable some particular items.

The problem arises when I try to eliminate the production item, because when it does, the production become unstable and only works again when this item is added again in the collection (or the item is deleted manually in the production.cls)


This is my code attempt:

0 11 371

I have a need to create a custom deployment package for our production. I can't do a full deployment of the production so I need to create a custom deployment package that will add our new classes, business processes, rest end points and transforms. I would like for the production to add and configure the business services, process and operations as well.

Does anyone have an example for doing this? 




0 11 152

I have a requirement to update the Ensemble Host Settings Programmatically.  Mainly the "AlertOnError,QueueCountAlert,QueueWaitAlert,InactivityTimeout" settings.

I used Ens_Config.Item (persistent) class to get the settings (list object) and then update it. But for some of the Business Host's, I dont see the above settings in the table, but present in Settings of that particular Host in Ensemble Management Portal. So my logic is not working.

0 11 143

I have multiple files with different columns, first 9 values are fixed, so i want to ignore the first value, and next 8 values i want to combine into one value using ^ sign

Current Format


Desired Format


Reading each line from the file use below code.

0 11 245


I create a WebService in Machine One, with some process, i tested this webservice with SOAPUI, worked.

After that i create a simple Business Operation, SOAP Adapter, based on WebClient created with SOAP Wizzard, the problem with that is on response var, i have empty var on my operation, somebody have some Ideas ? 

0 11 498

I'm working on a project were we are going to be receiving a non-HL7 formatted flat file that will contain a single result message per line and each result messages may  contain repeating OBX fields that will need to be parsed out so that can be sent as an HL7 ORU messages that contains multiple OBX segments.

0 10 162