#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 Dmitry Maslennikov · Nov 4, 2022

I have a table, with autoincremented id

CREATETABLEusers (
    idSERIALNOTNULL,
    nameVARCHAR(30) NOTNULL,
    PRIMARY KEY (id)
)

I can add a new item there with an explicit id 

INSERTINTOusers (id, name) VALUES (2, 'fred')

And while my id is autoincremented, I can omit it

INSERTINTOusers (name) VALUES ('ed')

So, this time, I don't know the id, and I want to somehow get it.

I could do it with LAST_IDENTITY() function, but it just uses %RowID, and have no relation to the primary id

11
0 766
Question Dmitry Maslennikov · Oct 23, 2022

This is not an issue in ObjectScript, due to its typeless nature. But it's essential for external programming languages that care a bit more about types of variables.

And in any case, it's still reproducible in ObjectScript. I have table

CREATETABLE some_table (
        idINTEGERNOTNULL, 
        x INTEGER, 
        y INTEGER, 
        z VARCHAR(50), 
        PRIMARY KEY (id)
)

And data

11
0 837
Question John Flippance · Sep 27, 2022

Hello!

Am after some advice on how to approach an issue I am currently having with one of our interfaces within HealthShare HealthConnect.

We send documents to a third party system via their API. 

The API contains a string property, which you use to pass in the document metadata and the Base64 encoded document itself.

Property rsXML As%String;

However, a few times a day we are getting errors as some documents exceed the ‘long string’ length within HealthShare for Strings.

18
0 1362
Question Michael Davidovich · Aug 26, 2022

Hello,

I'm using CircleCI to spin up the image `store/intersystems/irishealth-community:2021.2.0.649.0`.

When building the application we are getting messages that say:

ERROR #5373: Class 'EnsLib.HL7.Message', used by 'Package.Class', does not exist
Skip class Package.Class

Other missing classes seem to include, but not limited to:

Ens.BusinessProcessBPL
Ens.BusinessService
EnsLib.RecordMap.ComplexChild
EnsLib.EDI.XML.Document
Ens.Request

Binding to a port and looking the management portal, it seems we have the namespace HSLIB and some classes:

19
0 470
Question Phillip Wu · Aug 7, 2022

I’m a complete novice with ObjectScript.

I’m trying to write some Object Script directly into command line interface on Linux using some examples on the internet

sudo -u irisowner iris session SCRTC

Username: superuser

Password: ************

AUMHSCRTC:USER>a SET x=1

AUMHSCRTC:USER> WHILE x<10 {

AUMHSCRTC:USER> WRITE !," Looping",x

AUMHSCRTC:USER> SET x=x+1

AUMHSCRTC:USER> }

AUMHSCRTC:USER> WRITE !,"DONE"

AUMHSCRTC:USER>do a

 Looping1

 Looping2

 Looping3

 Looping4

 Looping5

 Looping6

 Looping7

 Looping8

 Looping9

DONE

That seems to work!

How if I put these commands into a file:

cat > /tmp/a.scr

superuser

xyz

a SET x=1

16
0 543
Question Jules Pontois · Jul 4, 2022

Hi,

I have a problem with the recent update 4.9.4 of the WebTerminal.

This message appeared after the loading of the page :

New update is available. Click here to install it now. Changelist:
4.9.4: No longer require /terminal to be at the root of the URL

So I installed the new version. Unfortunatly, after refreshing the page, I have this message again and again :

19
1 772
Question Jonathan Harris · Jul 7, 2022

I am doing a HL7 data transformation with object script but need to only write a substring from the first "(" of the NTE-3 field to the end.

example

Input: NTE|1|||Some text (HI) (321)|ABC

Desired Output: NTE|1|||(HI) (321)|ABC

Basically I'd like to delete "Some text  ".

If I were writing a shell script I would use sed 's/^.*(/(/' with perhaps a modification to get only the first.

I use the function wizard but can't seem to get the right code.

9
0 621