#ObjectScript

0 Followers · 1.5K 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.

Job Matthias Thon · Jun 12, 2024

Hello,

I have over 30 years of experience developing solutions with MUMPS and IRIS. Additionally, I also develop in C++, Python, Angular... 
Experiences with Container (Docker) , GIT and REST-API's

 I'm seated in Germany and looking for a job opportunity as a freelancer who mostly works from home office.

regards Matthias

0
0 0
Question Lee Butcher · Jul 15, 2024

Hi

We have a use case whereby very large HL7 MDM messages, which contain many OBX segments, need to be processed by a custom business process. Part of the process is to iterate over each OBX segment and set a value in the same field for each segment.

Testing with a message that is ~500MB and contains over 8000 OBX segments I've encountered <STORE> errors, which surprisingly seems to be due to using SetValueAt. It appears to get through a few thousand segments before it falls over with the memory error, which I assume is because the SetValueAt method keeps in memory each preceding OBX segment?

0
0 0
Question Evgeniy Potapov · Jun 20, 2024

My team and I noticed that the %ZEN class documentation labeled all properties and methods as deprecated.

Example: %ZEN.Auxiliary.altJSONProvider - InterSystems IRIS Data Platform 2024.1 - including private class members

In this regard, the big question is: what will be used to replace these methods, in particular %ZEN.Auxiliary.altJSONProvider?

It is used as the basis for the MDX2JSON package, from which DeepSeeWeb gets data to build Analytical Dashboards.

Is a replacement proposed for deprecated methods of %ZEN class?

And when is this functionality scheduled to be permanently disabled?

0
0 0
Question Scott Roth · Jul 9, 2024

Using the FHIR DEMO, I have pieced together how to make a FHIR Request using OAuth against an External FHIR Repository. When I execute the Patient search (HS.FHIRServer.Interop.Request), I get a HS.FHIRServer.Interop.Response that has a Quick Stream ID, which I then use to convert the Quick Stream to a JSON Dynamic Object. if I do a trace on the Raw JSON Object, I am able to pull out single elements, however I want to pull the raw JSON into a defined Class Structure. 

I tried using fromDao(dao As %DynamicAbstractObject) As <HS.FHIRModel.R4 subclass> outlined within Working with FHIR Data

0
0 0
Question Martin Nielsen · Jul 4, 2024

Hi, I have a controller which handles accounts, and forwards to the relevant controller based on the path, example below:

XData UrlMap
{
<Routes>

<Map Prefix="/:accountId/anothercontroller" Forward="AnotherController"/>

</Routes>
}

Problem is that inside AnotherController, the accountId path parameter is lost, I assume that's because the map forward simply checks if there's a match then forwards.

AnotherController:

XData UrlMap
{
<Routes>

<Route Url="/:somethingId" Method="POST" Call="CreateSomething"/>

</Routes>
}
ClassMethod CreateSomething(somethingId)
{
}
0
0 0
Article Tomoko Furuzono · Jul 4, 2024 1m read

InterSystems FAQ rubric

$ZTIMESTAMP returns the date and time in UTC format, so to change it to the local time zone, use the following system method: 

$SYSTEM.Util.UTCtoLocalWithZTIMEZONE($ZTIMESTAMP)

The above output will be in the format ddddd,sssss.fff.

    ddddd: Same format as $HOROLOG dates
 sssss: An integer indicating the number of seconds elapsed since midnight on the current date
 fff: Variable number of digits indicating the fractional part of a second

* Similar to $HOROLOG, except that $HOROLOG does not include fractional seconds. 

0
0 0
Question Scott Roth · Jun 28, 2024

Has anyone noticed weird behavior when upgrading to HealthShare Health Connect 2024.1

Wednesday I upgraded our TEST environment from IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2022.1.4 (Build 812_0_22913U) [HealthConnect:3.5.0-1.m1] [HealthConnect:3.5.0-1.m1] to IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1 (Build 267_2U) [HealthConnect:3.5.0-1.m1].

Some of our Business Processes have been throwing...

0
0 0
Article Robert Cemper · Mar 21, 2024 2m read

This is an attempt to run a vector search demo completely in IRIS
There are no external tools and all you need is a Terminal / Console and the management portal.
Special thanks to Alvin Ryanputra as his package iris-vector-search that was the base
of inspiration and the source for test data.
My package is based on IRIS 2024.1 release and requires attention to your processor capabilities.

0
0 496
Question Rich Taylor · Jun 27, 2024

The SYS.Mirror CatchupDB() method requires a System File Number/Inode value as a parameter.   I have not yet found a suitable internal method to get this value.  Is anyone aware of a utility method that would do this?   I do know I can get this value with a small amount of Python or by calling out to the OS.  However I wanted to stick with pure Objectscript in this project if possible.  

Failing in this I will use embedded python to run the line or two of Python needed to get this value.

Thank you for any hints

0
0 0
Question Julian Matthews · Nov 3, 2021

Hey everyone.

I was wondering if anyone had come across a way of reformatting ObjectScript within VSCode.

I have the various Intersystems Extensions installed (InterSystems Language Pack,  InterSystems ObjectScript,  InterSystems ObjectScript Extension Pack,  InterSystems Server Manager) but a formatter does not seem to be something included within this variety of extensions.

16
0 932
Question Yone Moreno · Jun 25, 2024

Hello,

Thanks for reading this question.

We need to remove the line feeds and carriage returns from start and end, but not from the middle of a string

We have tested the following ways:

set output = $ZStrip("[line feed](carriage return) str [line feed](carriage return) ing [line feed](carriage return)","<>C")

But it removes also control characters which we need to preserve...

Also we have tested:

set output = $REPLACE("[line feed](carriage return) str [line feed](carriage return) ing [line feed](carriage return)",$C(13,10),"")
0
0 0
Discussion Jeffrey Drumm · Jun 13, 2024

I'm scraping my way through some code that's been around for a while, and came across the use of $ZTRAP and (dear GOD) GOTO for trapping and handling errors.

In an effort to "modernize" it and make it, I don't know, less M-ish (sorry old-timers!), I'm replacing it with Try/Catch blocks.

Some questions:

  1. Is this a dumb idea?
  2. Anything I should look out for?
  3. Did I hurt anyone's feelings?

And if the answer to number 3 is Yes, my deepest apologies ... I love you guys! 🤩

0
0 0
Question Ben Spead · May 29, 2024

Let's say I have an InterSystems IRIS instance with 6 Namespaces:

  • Foo1
  • Foo2
  • Foo3
  • Foo4
  • Foo5
  • Bar

And the number of Foo# namespaces can increase at any time for a number of reasons.  I need to ensure that they all have identical configuration globals stored in a DB called CONFIG, so I do the following in my configuration file:

[Map.%ALL] 
Global_SYS=%DEFAULTDB 
Global_SYS("CommonConfig")=CONFIG 
Global_SYS("CommonOtherSettings")=CONFIG 
Global_SourceControl=CONFIG 

This will ensure that all Namespace see the exact same settings when they reference ^SYS("CommonConfig") or ^SourceControl, etc.

Now...

0
0 0
Question Pietro Di Leo · Jun 13, 2024

Hello everyone,

Recently, I've been working on a Business Process that processes a large JSON FHIR message containing up to 50k requests in an array within the JSON.

Currently, the code imports the JSON as a dynamic object from the original message stream, obtains an iterator from it, and processes each request one at a time in a loop.

0
0 0
Announcement Shane Nowack · Jun 6, 2024

Hello Everyone,

The Certification Team of InterSystems Learning Services is developing an InterSystems ObjectScript Specialist certification exam, and we are reaching out to our community for feedback that will help us evaluate and establish the contents of this exam.  Please note that this is one of two exams being developed to replace our InterSystems IRIS Core Solutions Developer exam. You can find more details about our InterSystems IRIS Developer Professional exam here.

0
0 0
InterSystems Official Raj Singh · Jun 5, 2024

Note: this was originally posted on June 5, 2024 but presented as being posted on May 9, 2024 so this re-post fixes the date. 

Recent updates to the Intersystems Language Server introduce many significant enhancements aimed at improving developer experience and productivity. I'll talk about some of the key ones here, while the complete list, including numerous bug fixes, can be found in the Language Server's CHANGELOG.

Detailed descriptions for syntax errors

0
0 0
Article Robert Cemper · Jun 1, 2024 2m read

Translated from the Spanish Community Article Contest.

Following the latest programming contest on OEX I had some surprising observation.
There were almost exclusive applications based on AI in combination with pre-cooked Py modules.
But digging deeper, all examples used the same technical pieces of IRIS.

Seen from point of view of IRIS it was pretty much the same whether searching for text
or searching for images or other pattern.  It ended in almost exchangeable methods.

0
0 0
Article Muhammad Waseem · Jul 2, 2023 4m read

Hi Community
In this article, I will introduce my application irisChatGPT which is built on LangChain Framework.
First of all, let us have a brief overview of the framework.

The entire world is talking about ChatGPT and how Large Language Models(LLMs) have become so powerful and has been performing beyond expectations, giving human-like conversations. This is just the beginning of how this can be applied to every enterprise and every domain! 

11
6 2146
Article Alberto Fuentes · Jan 29, 2024 12m read

We have a yummy dataset with recipes written by multiple Reddit users, however most of the information is free text as the title or description of a post. Let's find out how we can very easily load the dataset, extract some features and analyze it using features from OpenAI large language model within Embedded Python and the Langchain framework.

Loading the dataset

First things first, we need to load the dataset or can we just connect to it?

2
2 381
Article Megumi Kakechi · May 23, 2024 2m read

InterSystems FAQ rubric

The TIMESTAMP type corresponds to the %Library.TimeStamp data type (=%TimeStamp) in InterSystems products, and the format is YYYY-MM-DD HH:MM:SS.nnnnnnnnn.

If you want to change the precision after the decimal point, set it using the following method.

1) Set system-wide

Management Portal: [System Administration] > [Configuration] > [SQL and Object Settings] > [General SQL Settings] 
Default time precision for GETDATE(), CURRENT_TIME, CURRENT_TIMESTAMP. You can specify the number of digits in the range 0 to 9.

0
0 278
Discussion Yone Moreno · May 15, 2024

Hello,

I would like you to propose this challenge.

It has been created by the CodeWars community here: https://www.codewars.com/kata/6523a71df7666800170a1954/python

I will copy and paste the description:

🔡🟢 DESCRIPTION:

A number is Esthetic if, in any base from base2 up to base10, the absolute difference between every pair of its adjacent digits is constantly equal to 1.

0
0 147