#Key Question

0 Followers · 137 Posts

A tag that highlights questions on development, testing, deployment, management, etc using InterSystems Data Platform that are considered to be the most insightful, interesting, puzzling, or important. If a key question includes a best practice, it will also be tagged as such. More details.

InterSystems staff + admins Hide everywhere
Hidden post for admin
Question Rathinakumar S · Jul 26, 2023

Hi,

We have a global with 65 million entries. All we are doing is just iterating through each entry to find out the total no of entries. It is currently taking 110 minutes. Is this something normal? What can we do to speed up this process? Below is the program for just iterating each entry in the global.

s sub=" ,count=0
f{              
     s sub=$o(^YYY(sub)) q:sub=""
     s count= count +1
     }
     w!, "Total Count:"_ count
 

19
1 584
Question Evgeny Shvarov · Jun 9, 2023

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"

18
0 857
Question Evgeny Shvarov · May 13, 2023

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? 

25
0 671
Question Scott Roth · May 15, 2023

Ran into an issue with our upgrade from HealthShare Health Connect 2018.1.3 to IRIS HealthShare Health Connect 2022.1, that I thought I would reach out about, I already have a ticket open with WRC and started a chat on Discord. We have a couple of MS SQL tables that I have setup as Linked Tables within Cache to query NPI, Patient Account Information, Visit information, etc... When we upgraded last week we found that within a day or even a half a day that we were having problems with our JDBC connections.

19
0 773
Question Ben Spead · Apr 12, 2023

I have a situation where I have a handful of classes which I need to copy to another Namespace (which uses a different RoutineDB) on the same instance, load it and compile it.

Can anyone help me come up with a command that will do this quickly and easily?   Perhaps something with extended reference?  

This is somewhat time sensitive so thank you in advance for your ideas!

23
0 887
Question Kurro Lopez · Apr 19, 2023

Hi all,

I'm wondering if exists any command or method to replace a text using parameters.

In C# I use the Format property

var text = string.format("My name is {0} and I'm {1} years","Kurro","18")
// The value of text will be "My name is Kurro and I'm 18 years"

I've tried with this code... but it works only for the specific parameters

set text = "My name is {0}, and I'm {1} years"write$Replace($Replace(text,"{0}","Kurro"),"{1}",18)

is possible to do something for more args? I mean, use for a indeterminate number of args

Best regads

11
1 428
Question Raj Singh · Mar 1, 2023

My general question is how to convert to a %Library.ListOfObjects to a Python "array-like" structure for use in Matplotlib.

Specifically, I have a Line Object which is comprised of a list of Points (see classes below). I want to pass the line to Python to create a Matplotlib Path.

Bonus points for converting the Point to a Python tuple!

Class geo.model.Point Extends %SerialObject
{
  Property latitude As %Float(MAXVAL = 90.0, MINVAL = -90.0, SCALE = 6);
  Property longitude As %Float(MAXVAL = 180.0, MINVAL = -180.0, SCALE = 6);
}
13
0 496
Question Colin Brough · Feb 15, 2023

Is there a way of comparing code running on two Ensemble servers - ideally excluding certain types of difference?We are a new team working in HealthCare (lots of HL7, some web-services). As well as doing new development on local servers with suitable source control, we have a large code base we've inherited from an external supplier for which we have no log of versions or differences. We have a live server and test server - and we've stumbled across a couple of places where there are differences in logic in addition to the expected differences in endpoints. Is there any way of systematically

9
0 436
Question Evgeny Shvarov · Jan 15, 2023

Hi folks!

Have a question for those who are masters of interoperability.

I have a basic task of having one CSV with some data. I need to transform one column in the initial dataset and get the new csv with the same form.

What's the best approach with Interoperability?

Should I user record mapper?

Should I use streams, objects?

What is the best practice?

12
0 687
Question Michael Hill · Jan 12, 2023

Is it possible to retrieve the SQL-Executing process ID (PID) from a process spawned from a UNION %PARALLEL? I have a value set in the SQL-Executing process that I need to replicate in the UNION %PARALLEL spawned process(es). The SQL-Executing process writes the value to a global subscripted by its PID so determining the SQL-Executing PID from the spawned process is what I need. I expected $ZPARENT from the spawned process would hold the SQL-Executing PID but the PID returned is different.

With thanks,

Michael Hill

11
0 441
Question Scott Roth · Jul 8, 2022

We are upgrading from Health Connect 2018.1.3 to IRIS Health Connect 2022.1, and one thing that we are particularly hesitant about is if our Business Rules will work in the new version.

I am trying to come up with a testing process for bulk testing our rules, and wanted to know if this could be done programmatically instead of having to modify all the Business Operations to have them write the HL7 data to a file. I caught Orlando Health's presentation at GS2022 but I am not sure that will work for my team.

10
3 691
Question Anna Golitsyna · Dec 14, 2022

I am familiar with $TEXT which can get you any line in the current routine provided you know the offset. For example, $T(+1) will get you the first line of the current routine at the run time. In the same vein, how do I reference the current line number/offset at the run time? Something like $T(+$CURRENTLINENUMBER) where $CURRENTLINENUMBER is not yet known to me function. The sample below would write 3 as the line number.

RTNNAME
 S A=1
W $CURRENTLINENUMBER

13
1 616
Question Iryna Mykhailova · Nov 9, 2022

Hi guys!

My student asked my why his unit tests don't work as they should, and I just could answer him. Here is the simplified case.

There is a class with a required unique property Name:

Class Test.NewClass [ Abstract ]
{
Property Name As%String [ Required ];
Index NameIndex On Name [ Unique ];
}

And there is an inherited class:

Class Test.NewClass1 Extends (%Persistent, Test.NewClass)
{
}

What I expect to happen, is when I save two objects of class Test.NewClass1 with the same value of property Name, for the second one to get an error stating that it violates the unique index.

9
0 658