Ensemble

Syndicate content 72 

(Originally posted by @Benjamin Spead on June 25, 2014)

This code snippet generates a list of Ensemble Lookup Tables and Schema documents in the user's current namespace. Run the code by running the class method "test":


Class benspead.EnsTablesSchema
{
    classmethod test() {
        If ##class(%Dictionary.CompiledClass).%ExistsId("Ens.Util.LookupTableDocument") {
            // only supported in Ensemble 2012.1+
            Write !,!,"Exporting Ensemble Lookup Tables..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("Ens.Util.LookupTableDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
        If ##class(%Dictionary.CompiledClass).%ExistsId("EnsLib.HL7.SchemaDocument") {
            Write !,!,"Exporting Ensemble HL7 Schemas..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("EnsLib.HL7.SchemaDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Continue:$listfind($lb("2.1.HL7","2.2.HL7","2.3.HL7","2.4.HL7","2.5.HL7","2.6.HL7","2.7.HL7","2.3.1.HL7","2.5.1.HL7","2.7.1.HL7","ITK.HL7")
                                    ,item)
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
    }
}

Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/...

Last comment 2 days ago
0   0 3
262

views

0

rating

Hi,

I have a global that holds users name and date of birth.

I would like to loop through them and check if the date of birth is more than 2 years based on todays date

so I have ^checker("under2", "Eric David", "02-05-2018")

I want to check the birthdate based on todays date to see if it is greater than 2. How do I access the birthdate in the global

Please can you advice

I tried :

Last answer 6 December 2018 Last comment 19 April 2019
0   0 6
435

views

0

rating

Hi,
We recover a large amount of data from an external database (SQLServer, about 1 million rows in JDBC).
However, we have treatment time issue.
This process takes more than 30 minutes whereas on a "classic" SQL Server Management Studio type request takes less than a minute.

Last answer 20 September 2018 Last comment 18 April 2019
0   1 5
227

views

0

rating

Hi, I have a CSV file with a list of 5000 records in the following format

Name, Acc, division

Eric, 1234, 567

John, 1235, 987

Peter, 3214, 879

I just want to copy the Acc, division to a global so eventually the global would be like the following:

^People("Customers", "Acc.division")

Can you advice on how I can perform this from the terminal? This is a one time task. I want to read all the values from the csv file and insert them into the global

Regards,

Eric

Last answer 26 February 2019 Last comment 19 November 2018
0   0 6
310

views

0

rating

GraphQL is a standard for declaring data structures and methods of data access that serves as a middleware layer between the client and the server. If you’ve never heard about GraphQL, here is a couple of useful online resources: here, here and here.

In this article, I will tell you how you can use GraphQL in your projects based on InterSystems technologies.

Last comment 22 January 2019
+ 13   9 5
954

views

+ 13

rating

Hi, would really appreciate your advice on how I can restart the mirror-monitor. I've followed the instructions and restarted the mirror monitor, and still the status seems to be down. Can you point me to some resource or steps that I can follow ?

I logged into %SYS terminal and restarted the mirror monitor and it says that it is running

Last answer 24 December 2018 Last comment 30 December 2018
0   0 4
179

views

0

rating

Added new System Default Setting  for Production (not Host) setting.

However, Production setting is still the same. I have tried restarting Production and instance, to no avail.

How do I specify System Default Setting correctly?

Production:

Last answer 30 December 2018 Last comment 5 December 2018
0   0 3
186

views

0

rating

I am trying to explore some new possibilities outside of the normal day to day HL7 interfacing we do. I have only done 1 other Web Service interface but it was using a SOAP proxy wizard. Now I am tasked with trying to make a call to an external API 

https://npiregistry.cms.hhs.gov/api/

Last answer 1 December 2018
+ 3   2 5
435

views

+ 3

rating

Is it possible to know the names of the sub-directories in the case of an FTP type service adapters?

I know how to do it for the file type.

Or can you transfer files from an FTP directory and sub-directories to a server by keeping the structure?

Last answer 19 December 2018 Last comment 21 December 2018
0   0 2
150

views

0

rating

I want to test automatically that HL7 business operation works correctly in error conditions. One is to test CE acknowledgement. I have planned to implement test production which includes business services for different situations (AA, AE, CA, CE, timeout, late response etc).

How should I implement HL7 business service that always returns CE (commit error)? I have tried but it keeps returning "AA".

Last answer 19 December 2018
+ 1   0 3
0

comments

123

views

+ 1

rating

Hello,

I'm looking to find if there is a datatype convert equivalent in Object Script to SQL convert function. Have a VarBinary string coming in from source application (which is really performing a SQL dump). The source application uses the standard SQL convert function to convert from varchar to varbinary on their side.

I know &sql(Convert()) should work in Object Script, but am wondering if there is a better way of doing this. 

Getting data in via flat file (Record Map), then using data transform to transpose this data to SDA3. 

Last answer 15 December 2018 Last comment 17 December 2018
0   0 3
141

views

0

rating

Hello.

I have a delimited flat file that I need to read and then generate an HL7 A08 message from the fields in the file.  I used the Management Portal's Record Mapper to generate the Map.Record class, then used drag & drop to map fields in the delimited flat-file to an A08 message.

But when I try testing this in the test tool, I'm getting an ERROR #6254: Tag expected . XML input. ... is not in proper format as child of Record (ending at line 2 character 11).

Last answer 14 December 2018 Last comment 14 December 2018
0   0 2
128

views

0

rating

Not everyone knows that InterSystems Caché has a built-in tool for code profiling called Caché Monitor.

Its main purpose (obviously) is the collection of statistics for programs running in Caché. It can provide statistics by program, as well as detailed Line-by-Line statistics for each program.

Using Caché Monitor

Let’s take a look at a potential use case for Caché Monitor and its key features. So, in order to start the profiler, you need to go to the terminal and switch to the namespace that you want to monitor, then launch the %SYS.MONLBL system routine:

Last comment 14 December 2018
+ 3   7 2
436

views

+ 3

rating

Is their a way to queue messages in a business operation to be processed later? I want to process messages over a certain size on a schedule, but let everything else process in real time. Is their a way to do this with one business operation or would I have to queue the large messages in a different business operation?

Last answer 13 December 2018
0   0 1
0

comments

154

views

0

rating

Hello,

I'm trying to use Websockets and understand how it works. To do so, I tried to follow the sample in here :

https://github.com/intersystems-ru/WebSocketsSample

I opened studio, connected to my server into the USER namespace and use the Tools -> Import Local in order to add the 3 files (app.js.xml, index.html.xml and WebSockets.Main.cls )

I compile without error and use the View -> Web Page and it doesn't work as expected 

Last answer 11 December 2018
0   0 2
0

comments

109

views

0

rating

Hello,

I am pretty stuck here and would appreciate any help or advice on an approach to this...

I have a single claim file, ingested that has 7 claims inside of it, I am pulling each claim out based on a qualifier, then want to remove all of the others and do something with the one that is left over.

My problem is I cant seem to figure out how to Remove the Claims programatically...

Last answer 10 December 2018
0   0 2
0

comments

101

views

0

rating

Hi,

My [Ensemble] > [Queues] page shows message queues for Operations that were deleted months ago.

When I deleted the Operations I thought Ens.Util.Tasks.Purge would cause the (empty) queues to disappear from the Queues page.

Is there a way to remove queues that no longer refer to an operation?

Kind regards,

Stephen

Last comment 5 December 2018
0   0 4
0

answers

158

views

0

rating

In looking at the Production monitor within Ensemble, I was wondering if there is a way we could customize it for our use. I notice it is basically a dashboard.

For example I would only like to truly display those Services, Processes, and Operations that are truly in dire need of attention. The Monitor out of the box just seems too busy, and I would like to simplify it.

Last comment 3 December 2018
0   3 4
0

answers

222

views

0

rating