#ObjectScript

14 Followers · 1.6K Posts

InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.

Documentation.

Article Rizmaan Marikar · Dec 25, 2021 13m read

There are many ways to generate excel files using Intersystems, some of them are ZEN reports, IRIS reports ( Logi reports or formally known as JReports), or we can use third party Java libraries, the possibilities are almost endless.

But, what if you want to create a simple spreadsheet with only Caché ObjectScript? (no third party applications)

15
10 2303
Question Dominic Chui · Jul 14, 2022

Let's say I have two lists of connected data where elements of listTwo only make sense if given an item of listOne as context:

listOne = ["A", "B", "C"]

listTwo = ["x", "y", "z"]

Tuples like ("A", "y") and ("C, "x") make sense, but "A" or "x" by themselves don't. I would like to pass in a list of such tuples into a method and have it handle each tuple in the list. So what would be the best way to format them given that ObjectScript does not have specialized tuples? Would it be nested $LISTBUILD lists or something else?

1
0 369
Question Ramesh Ramachandran · Jul 1, 2022

Is it a good practice to set the MAXLEN value of %Library.String property type?  Will it lead to wasted storage if its not really using it?

For example, I have to store a 5 characters long string into the below str field. Which of the statement is recommended? 

Property str As %String;

vs

Property str As %String(MAXLEN="5");

2
0 2078
Question Yakov Berger · Feb 11, 2020

Hi,

I am using IRIS for Windows (x86-64) 2019.1.1

I have.

1. Created a BS with SQL Inbound Adapter which successfully connects and gets rows from DB .


2. Created a request message is populated with results of SQL query.

3  Created a BP with HL7 Router + Routing Rule + Transformation + Send to Target (BO).

4 . Created BO sending HL7 to file.

i am getting the following error.

ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnRequest+1^EnsLib.MsgRouter.VDocRoutingEngine.1 *DocType,Test.SQLtoHL7Req -- logged as '-' number - @''

What am i missing

Thanks.

8
0 1083
Question Tom Bruce · Jun 20, 2022

Hi, I tried the following exercise from the IRIS documentation. I updated the username, password and IP address, but receiving this error;

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. --->

I can use the same credentials and IP address to connect ok via VSCode to my local IRIS...

Any pointers much appreciated.

https://docs.intersystems.com/irisforhealth20211/csp/docbook/DocBook.UI…

3
0 438
Question Jimmy Christian · May 18, 2022

Hello,

I want to access the HL7 Router settings from within the HL7 rule. Goal is to create a New class by extending "EnsLib.HL7.MsgRouter.RoutingEngine".

Then create a PARAMETER ProcessMessage which can be set to an integer value for the HL7 Router.

Create a Rule class and based on the value of this setting ProcessMessage
process/not process the messages.

15
0 557
Announcement Laurel James (GJS) · Jun 16, 2022

Only a few days to go until the Global Summit! George James Software will be on hand to talk about any projects you may have on the horizon, such as application development, data and platform migration, system integration, training, and support – we can work with you to find practical and maintainable solutions that support the growing needs of your organization. 

We're also running a User Group Session on Wednesday, July 22nd at 12pm. It's a great opportunity to find out more about our tools and ask us (and current users!) any questions. 

0
0 230
Question Warren Oyco · Jun 13, 2022

Hi,

Any suggestion on how to compare dates? Below is my code but it does not seem to work.

USER>w $zdate(zdateh(x,8),1) > $zdate($zdateh(y,8),1)

When I set x to "06/01/2022" and set y to "04/01/2022" gives me an output of 1

When I set x to "09/01/2019" and set y to "04/1/2022" still gives me an output of 1

Any help is appreciated.

Thanks!

7
0 970
Question Tom Bruce · Jun 13, 2022

Hi, is there a method that can retrieve both the filename and archive path?

I can get the path to the file ok i.e. set sPath = pInput.Filename and I can get the archive path i.e. set tArchivePath = ..Adapter.ArchivePath

1
0 512
InterSystems Official Raj Singh · May 2, 2022

This month I announce the release of version 1.8.0 of the VS Code extension, which contains the following enhancements and bug fixes.

The big news is support for server-side project files as some of you old-timers will remember from Studio. If you work client-side, VS Code already has great project management features. You can simply use a folder as a project, or use multi-root workspaces. But if you work server-side, you might appreciate some better artifact management capabilities, and that's what this feature is about. Read more in this new Projects chapter of the documentation.

3
1 513
Article Muhammad Waseem · May 30, 2022 3m read

Hi Community,

This post is a introduction of my open exchange iris-fhir-client application.

 iris-fhir-client can connect to any open FHIR Server by using embedded python with the help of fhirpy Library.
Get Resource information by terminal and by using CSP web application.

2
0 1025
Article Lorenzo Scalese · May 30, 2022 3m read

Hi Community,

Recently, I migrated a series of Objectscript repositories from XML to UDL format.
After the migration, I was a bit disappointed by the presentation on the GitLab web interface.

Since Objectscript syntax is supported by GitHub, I thought It would be also supported by GitLab. Unfortunately, the library used by GitLab to highlight the code does not have an extension to support Objectscript.

1
2 631
Question Federico Raimondo · Jan 20, 2020

Hi everyone, 

I am currently performing a patient merge thorug ADT^40 HL7 messages. In order to do that, I am following this guide which I found on the ducumentation: http://10.41.11.210:57772/csp/docbook/DocBook.UI.Page.cls?KEY=HESUP_ch_IHE#HESUP_IHE_configuring_registry_PIX
My main issue regards the fact that I can't update the PatientID and the SourcePatientID of the HS_Registry.Document table of the prior patient, wheras, I find only the new anagraphic on the HS_Registry.Patient table.

1
0 1213
Article Robert Cemper · Mar 24, 2022 3m read

This package offers a utility to export an XLarge Global into a JSON object file and to show
or import it again. In a previous example, this all was processed in memory. But if this is a
large Global you may either experience <MAXSTRING> or an <STORE>  error
if the generated JSON structure exceeds available memory.
 


Academic refers to the structure created.

1
0 450
Article Timothy Leavitt · Mar 17, 2021 3m read

I ran into an interesting ObjectScript use case today with a general solution that I wanted to share.

Use case:

I have a JSON array (specifically, in my case, an array of issues from Jira) that I want to aggregate over a few fields - say, category, priority, and issue type. I then want to flatten the aggregates into a simple list with the total for each of the groups. Of course, for the aggregation, it makes sense to use a local array in the form:

agg(category, priority, type) = total

Such that for each record in the input array I can just:

Do $increment(agg(category, priority, type))
10
4 1211
Question Ephraim Malane · May 5, 2022

Hi All,

I have been given the following  xml  class file with objectscript code that has methods that I need for file conversions. These method implementations will do necessary conversions but I don't know how to add it to Iris studio and run it as a task or maybe if it must be  put  on any location and call each method from the terminal and even if so how do I then call it.

Please advise how to go about this.

6
0 329
Article Lucas Enard · May 9, 2022 2m read

This is a benchmark built in python and objectscript in InterSystems IRIS.

The objective is to compare the speed for sending back and forth a thousand request/message from a BP to a BO in python and in objectscript.

See https://github.com/LucasEnard/benchmark-python-objectscript for more information.

IMPORTANT : Here are the results of time in seconds, for sending 1000 messagesback and forth from a bp to a bo using python, graph objectscript and objectscript.

String messages are composed of ten string variables.

3
0 496