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 464

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 491
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 198
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 206

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 204
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 358

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 231

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 145

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 239

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 430

InterSystems FAQ rubric

Using the Config.Configuration class and SYS.Database class methods, you can create and register a namespace database from the terminal.

Below is a series of execution examples that create database file /CacheDB/AAA/cache.dat and register database AAA and namespace AAA in the configuration file (cache.cpf).
* Execute in the %SYS namespace. *

* Make sure that this script runs as the user that is used for all IRIS processes to ensure that the directory has appropriate ownership and permissions *

4 3
0 281

I have the following method call (have included html and css as well). when I debug the code in a browser, JavaScript seems to work fine. Loading image is coming up, table is getting hidden. But when I close the debug and just load the page and run it, loading image is not coming up, neither the table is hidden. Not sure what is going on? I need help to understand what I am doing wrong?

XData Style

{

<style type="text/css">

#loading {width: 100%;height: 100%;top: 0px;left: 0px;position: fixed;display: block; z-index: 99}

0 3
0 111

We are looking at what we need to do to migrate from our current usage of Zen reports to InterSystems Reports. One of the hurdles for us is figuring out ways to interact with InterSystems reports programmatically from ObjectScript routines. There is a Java API for it, but it is possible to generate a report from InterSystems reports to a stream object in ObjectScript without diving into Java by using a %Net.HttpRequest. Here is a code example, followed by an explanation:

1 0
0 127

I am trying to call to a website that renders a xml structure as a response.if I put the url on the browser an xml rendered page is returned but if i call to this using the below code I get an object reference error which I am finding had to understand is there anyone who could help understand this error or point me in the right direction thanks.

Set tSC=$$$OK

0 2
0 167

Hi,

I'm trying out VS Code with IRIS for Health 2023.2 (not available in above dropdown) in a local container. I can open read-only files in the Objectscript viewer and have a local folder connected to the correct namespace. However, when I make changes and try the "import and compile" option, I get:

ERROR #16006: Document <filepath> name is invalid

The first four chars of <filepath> appear to have been truncated

Here is my settings.json

{

"security.workspace.trust.untrustedFiles": "open",

0 4
0 261

Methods written in ObjectScript can use pass-by-reference arguments to return information to the caller. Python doesn’t support pass-by-reference arguments, so Embedded Python in IRIS doesn’t support them either. That's it, that's the end of the post, hope you liked it. 😉 But wait, what about the Classic Rock & Roll?

7 1
1 261

Example:

Method Execute (args...) As %Status {
...
 #dim statement as %SQL.Statement
 set statement = ##class(%SQL.Statement).%New(2)
 set statement.%Dialect = "CACHE"
 do statement.prepare(query)

 #dim rs as %SQL.StatementResult
 set rs = statement.execute(args...)

My questions are: 1) how do I get the size of args **2) how to get all values of **args **3) is it possible to modify the **args?

0 6
0 245