Hello community,

I recently started to work with Ensemble. I defined a subclass of EnsLib.HL7.Message. In my production I receive HL7v2 messages and transport them using the Message Router to a business operation. The operation class has an OnMessage method with parameter

pObject As MySubclassOfEnsLibHL7Message.

0 7
0 565
 

Hi,

I know there are several alternatives, but I would like to find the easiest & simpler ones to store data coming in Json format from post requests and also allowing me to do SQL queries.

I want to have a property called favouriteColors. I want to store a few colors, and I want to be able to do queries to get top favorite colors, etc... so not handling the list of colors as just a fixed string or fixed object.

1 4
0 467

What if you could serialize/deserialize objects in whatever format: JSON, XML, CSV,...; attending different criteria: export/import some properties and not others, transform values in this or that way before exporting/importing,...; and all of this without having to change the class definition? Wouldn't that be great??

Well, perhaps it's a goal too ambitious to reach 100% but, exploring this idea, I've developed a bunch of classes that I thought it was good to share. If you want to test, change, modify or improve the code, or just take a look at it, you can do it here. There you'll find a more detailed explanation (see Readme.md)

Be aware, this is a proof of concept for myself done in spare times, sure it's not robust enough or it can be done much better... but, I was just playing...ok, I could just wait to the new JSON Adaptor (coming soon!) that sure is going to resolve much more scenarios in a cleaner way, but... meanwhile... :-) ...

9 4
4 2.2K

Hi,

I have two namespaces

  1. In the first one, I have defined a class which Extends (%Persistent, Ens.Util.MessageBodyMethods), we'll call it NSOne.Msg.Req
  2. In the second namespace NSTwo, I want to use the previous class with something like SET pInput = ##class(NSOne.Msg.Req).%New()

I mapped the NSOne.Msg.Req package in namespace NSOne. In Atelier, I can see NSOne.Msg.Req in my NSOne. But, when I try to execute line 2 above, it tells me :

0 2
0 457

In the previous article, I have demonstrated a simple way to record data changes. At this time I have changed the "Audit Abstract Class" which is responsible for recording audit data and the data structure where the audit log will be recorded.

I have changed the data structure to a parent and child structure where there will be two tables to record the "transaction" and the "fields its values" changed on that transaction.

Take a look at the new data model:

6 4
1 929

Hello community!

I have a question about the %OnSave method of a class. We have a class that has two properties that are classes.

Class A

Class B

Class C

Class A.PropertyB as Class B

ClassA.PropertyC as Class C

Classes B and C also need to point back to Class A - it's just the way it is. We need to be able to use any one of these classes and get to the others (it's actually even more complicated than this, as Classes B and C also have a PropertyC and PropertyB as well, respectively) :

0 3
0 728

The Management Portal allows you to Export one or more globals to a file that you can then Import into that or another namespace. However, the Management Portal can only be used to export entire globals. For exporting selected nodes or subtrees within a global, a different utility is necessary. This utility is the Export() classmethod in the %Library.Global class, which can export an entire global but also has the ability to export selected nodes or subtrees.

9 1
1 2.1K
Question
· Feb 28, 2016
Mocking tools for Unit Testing

Hello everyone!

Does anyone know of a library that can be used to create Mock objects for Objectscript classes?

Right now, my team has been building mock objects by hand to help circumvent dependencies when writing and executing unit tests, but I always wondered if someone had ever created a Mock library like Mockito to help quicken the process.

Thanks!

3 4
0 900

Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good wink ).

6 1
2 447
Article
· May 31, 2017 28m read
Cogs Library

Cogs Library

Over the next few months I will be releasing a number of open source libraries and tools to the Caché community.

Most of the code has evolved from previous production grade solutions over the years and I am collating it together under a single overarching library package that I am calling Cogs.

17 38
4 1.4K

As a developer, you have probably spent at least some time writing repetetive code. You may have even found yourself wishing you could generate the code programmatically. If this sounds familiar, this article is for you!

We'll start with an example. Note: the following examples use the %DynamicObject interface, which requires Caché 2016.2 or later. If you are unfamiliar with this class, check out the documentation here: Using JSON in Caché. It's really cool!

20 2
3 3K


Hello!

This article is a small overview of a tool that helps to understand classes and their structure inside the InterSystems products: from IRIS to Caché, Ensemble, HealthShare.

In short, it visualizes a class or an entire package, shows the relations between classes and provides all the possible information to developers and team leads without making them go to Studio and examine the code there.

If you are learning InterSystems products, reviewing projects a lot or just interested in something new in InterSystems Technology solutions — you are more than welcome to read the overview of ObjectScript Class Explorer!

21 35
3 5.5K

Hi all,

we are wondering if anybody has a reporting tool that is capable using IRIS Objects?

I know there are things like Crystal Reports and others out there who can read the SQL Data throug ODBC but we need the capability of using object methods while running the report.

Since now we where using a JAVA based report generator (ReportWeaver) but since the object binding for JAVA doesn't exist anymore in IRIS data platform, did any of you have an alternative report generator?

Looking forward to any answers

cheers

Stephan

0 2
0 324

Hey Intersystems-Developer,

I have already used that and know its possible, but can't find it anymore :(

I need dynamic access on proxy objects. For example:

set key = "lastName"

set name = obj.name

set lastName = obj.key <- Not possible

set lastName = obj.GetAt(key) <- Not possible

How can I get access to that object with my dynamic variable "key" ?

Best regards.

0 3
0 271

Hi guys!

As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).

1. Get it by as a property of an instance with "Object access":

ClassMethod GetPropertyForID(stId As %Integer) As %String

{

set obj=..%OpenId(stId)

return obj.StringData

}

2. Get it as a value of a column of the record with "SQL access":

0 18
0 908

Have some free text fields in your application that you wish you could search efficiently? Tried using some methods before but found out that they just cannot match the performance needs of your customers? Do I have one weird trick that will solve all your problems? Don’t you already know!? All I do is bring great solutions to your performance pitfalls!

As usual, if you want the TL;DR (too long; didn’t read) version, skip to the end. Just know you are hurting my feelings.

22 11
2 2.5K

Is there a way to get an inventory list of the Services, Processes, Routing, and Operations that are on the system. We get asked constantly from different departments to justify the number of personal we have. We are currently on 2015.2.2, with our upgrade to 2019 set for later this year.

Thanks

Scott

0 1
0 216