Announcement
· Mar 27, 2020
Give it a try on SQLBuilder tool

SQLBuilder is a flexible and powerful SQL query string builder for InterSystems IRIS,

With SQLBuilder you have nice and clean object oriented methods, instead of having to use concatenation and substituition to generate dynamic queries.

A Dynamic SQL without SQLBuilder

A Dynamic SQL with SQLBuilder

11 18
5 581

Now the Classes/Rutines/DeepSee files will be automatically exported to the working directory after saving or compiling and files will be automatically deleted .

https://www.youtube.com/embed/B1pmqAQqd4M
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

Installation

To install isc-dev , you just need to download and import the file isc-dev.xml from last release.
Some ways to import isc-dev .xml file:

  • Go to Management Portal -> System Explorer -> Classes -> Import and select the XML file.
  • Drag the file over Studio.
  • Terminal command:
NS>do $system.OBJ.Load("yourpath/isc-dev.xml","ck")
NS>zpm
zpm: NS>install isc-dev

How to enable this feature:

  • After importing the class in the target namespace, run the following method to set up the working directory:
NS>do ##class(dev.code).workdir("/path/to/your/working/directory/src/")
  • Go to Management Portal -> System Administration -> Configuration -> Additional Settings -> Source Control.
  • Select the target namespace and set the dev.FileManExtension class as the main one and save it.
  • Try to create a new class in the studio and save/compile it
  • Enjoy!
4 4
2 434

Hi,

I'm trying to figure out why I'm unable to iterate through a dynamic array and access the nested objects.

Using the NHS PDS FHIR API in the NHS sandbox environment, I'm querying the PDS endpoint using a sample NHS Number to retrieve a patient's demographics. My Business Operation reads the response data and passes it back to my Business Process where I intend on iterating through certain nested objects. The data present in these nested objects will decide what happens next in the process.

0 4
0 435

Hi folks!

How can I change the production setting programmatically?

I have a production that is a solution that uses some api-keys, which are the parameters of Business Operations but of course cannot be hard-coded into the source code.

E.g. here is the example of such a production that runs a connection of Telegram and ChatGPT.

And it can be installed as:

zpm "install telegram-gpt"

But now one needs to setup the key manually before using the production, having the following setting:

I'd like to set up it programmatically so one could install it as:

zpm "install telegram-gpt -D Token=sometoken"

How can I make it work?

0 18
0 473
Question
· Jul 6, 2023
REST Documentation Confusion

I had attempted to create a REST Operation before but did not have success. As I am going through the Tutorials and Documentation everything references REST services, but I have a case where I want to create a REST Operation that makes Epic API calls against Interconnect. I have done SOAP operations before and we currently have one in our Production Namespace, but from what I understand SOAP has the wsdl which defines al the structures and etc, where REST does not.

0 1
1 190
Article
· Jul 6, 2023 1m read
How to overload methods in ObjectScript

InterSystems FAQ rubric

The InterSystems ObjectScript language does not allow you to define methods of the same name with different arguments. It is generally classified as a programming language called a dynamic language.

In ObjectScript, you can freely control which arguments are used when executing a method, so unlike languages ​​such as Java, which are not dynamic programming languages, there is no need to strictly distinguish methods by the number of arguments at the compilation stage.

5 0
1 199

It is with great pleasure that the CIUSSS de l'Estrie - CHUS is sharing the mocking framework it developed and presented at the InterSystems Summit 2017. I will update this post with more detailed instructions in the next few weeks but I wanted to share the code and presentation quickly :

https://gitlab.com/ciussse-drit-srd-public/Mocking-Framework

11 14
1 1.9K

Hi folks!

How can I refer to a classmethod of the same class while coding another classmethod with Embedded python?

I know that I can call it with iris.cls(classname).MethodName(), but it's more cumbersome even comparing with ObjectScript, where I can call ..MethodName().

Compare ObjectScript:

do ..SetupGame()

and the same call in EmbeddedPython:

    iris.cls('eshvarov.sample.SeaBattle.GamePython').SetupGame()

Thoughts?

0 6
0 246

Has anyone come across a good using Embedded Python to convert a Python List object to an IRIS %List object?

My use case is I want to open an SQL entry with an Objectscript class method, then pass some information from that row into a separate Python class method which will then create a Python List object, then have the Python class method return that list back to the Objectscript class method in such a way that the Python List can be converted to an IRIS %List object for me to then use in the Objectscript code.

0 3
0 196
Question
· Jun 17, 2023
Hide or make routines binary?

Sorry, somewhat of novice here, but how is a mac or a routine created into a binary or is there a way to hide your routines so that no other user can edit them? Like remove source code and have an executable?

I would like to do this MAC and CSP pages

1 8
0 352

Excuse if this is obvious to Python programmers but for those crossing over from ObjectScript this may be a useful tip.

The scenario is developing some Embedded python commands.

Testing out functionality is being confirmed via the shell:

$SYSTEM.Python.Shell()
 
Python 3.9.5 (default, Mar 14 2023, 06:58:44) [MSC v.1927 64 bit (AMD64)] on win32
Type quit() or Ctrl-D to exit this shell.
>>>

When Python evaluates an expression in the shell, it prints the result of the expression to the terminal.

2 0
0 226

Hello!

I would like to find all classes not up to date in a namespace programmatically.

With IRIS Studio, we can see the single "+", but I don't know how to do that with a script.

Set sql = "SELECT ID, Name FROM %Dictionary.ClassDefinition WHERE NOT ID %STARTSWITH ?"
Set params($Increment(params)) = "%"
Set tResult = ##class(%SQL.Statement).%ExecDirect(, sql, params...)

If (tResult.%SQLCODE'=0)&&(tResult.%SQLCODE'=100) Set sc = $$$ERROR($$$SQLError, tResult.%SQLCODE, tResult.%Message) Quit sc

While tResult.%Next() {
    // if class not up to date ??
}

0 1
0 140

Good morning,

I was wondering:

Given the following scenario where we have a string where each two items are being splitted by "|" as follows: "squadName|initialLetter"

"Alfa|A|Bravo|B|Charlie|C|Delta|D|Echo|E|Foxtrot|F|Golf|G|Hotel|H|India|I|Juliett|J|Kilo|K|Lima|L|Mike|M|November|N|Oscar|O|Papa|P|Quebec|Q|Romeo|R|Sierra|S|Tango|T|Uniform|U|Victor|V|Whiskey|W|X-ray|X|Yankee|Y|Zulu|Z"

And we would need to generate a String structure like:

0 4
0 232

Hi folks!

Those who actively use unittests with ObjectScript know that they are methods of instance but not classmethods.

Sometimes this is not very convenient. What I do now if I face that some test method fails I COPY(!) this method somewhere else as classmethod and run/debug it.

Is there a handy way to call the particular unittest method in terminal? And what is more important, a handy way to debug the test method?

Why do we have unittest methods as instance methods?

1 25
0 419