Anyone know how to subtract three hours from $ZDATETIME($HOROLOG,3)?
If $ZDATETIME($HOROLOG,3) returns 2025-01-30 10:17:04, I would like $ZDATETIME($HOROLOG,3) - 3 hours to return 2025-01-30 07:17:04
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.
Anyone know how to subtract three hours from $ZDATETIME($HOROLOG,3)?
If $ZDATETIME($HOROLOG,3) returns 2025-01-30 10:17:04, I would like $ZDATETIME($HOROLOG,3) - 3 hours to return 2025-01-30 07:17:04
We have some ObjectScript code in a custom business process:.png)
When Log Trace Events is ticked on the business process in the Production view in the management portal, the argument is obviously computed.
Our question is whether the argument is computed when Log Trace Events is not ticked? Don't want to accidentally include something in a $$$TRACE() statement that takes enough computation to make a performance difference when released to production, even though the final output is not written to the event log.
The documentation at https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.U…
Case-sensitive: variable names (other than the system variables) are case-sensitive. Names of classes and their members, names of routines and their entry points, names of include files and macros are all case sensitive.
Consider "fully qualified" class name: Package.subpackage.ClassName
What is the class name mentioned in the documentation? Package.subpackage.ClassName or ClassName ?
Hi Community,
Watch this short exercise in writing basic code snippets in InterSystems ObjectScript using Copilot in VSCode and the GPT-4.0 engine. This screencast covers "Hello, World," global manipulation, class creation, and building a simple REST API application.
>> Coding InterSystems ObjectScript with Copilot <<
🗣 Presenter: @Evgeny Shvarov, Senior Manager of Developer and Startup Programs, InterSystems
📌 The related code can be found here: objectscript-copilot-demo.
Hi Everyone!
The Certification Team of InterSystems Learning Services is currently developing an InterSystems ObjectScript Specialist certification exam. Earlier this month we reached out to our community for feedback that will help us evaluate and establish the contents of this exam. We are still currently accepting responses and would love to hear your feedback!
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 the other exam, InterSystems IRIS Developer Professional exam, here.
Hi Dev Community
I thought i would share a little method I knocked together to traverse and compare 2 JSON objects for basic equivilance. I'm currently working on some data migration, and wanted a basic sanity check to validate that the JSON output is basically equivliant between the old and new, excluding a few things like timestamps.
It's a basic little recurvsive method, that will bubble up any differences over a nested structure. It's very low tech, as that's all I need it to do, but I thought it might be useful for others?
Hi folks!
I'm building a very simple REST API.
But before testing it via a Web Server what I want to make sure that REST API methods work in principle.
Is it an easy way to "fake" the web-server request and get a result e.g. of the method with signature like that?
ClassMethod GetAllRecords(pRequest As %CSP.Request, pResponse As %CSP.Response) As %Status
e.g. calling it in Terminal?
Hello!
This article is a small overview of a tool that helps to understand classes and their structure inside the InterSystems products: from IRIS to Caché, Ensemble, HealthShare.
In short, it visualizes a class or an entire package, shows the relations between classes and provides all the possible information to developers and team leads without making them go to Studio and examine the code there.
If you are learning InterSystems products, reviewing projects a lot or just interested in something new in InterSystems Technology solutions — you are more than welcome to read the overview of ObjectScript Class Explorer!
Hi all!
In this article I would like to review those VS Code extensions which I use myself to work with InterSystems and which make my work much more convenient. I am sure this article will be useful for those who are just starting their journey to learn InterSystems technologies. However, I also hope that this article could be useful for experienced developers with many years of experience and open up new possibilities for them when using VS Code for development.
| “At the request of the survivors, the names have been changed. Out of respect for the dead, the REST has been told exactly as it occurred.” |
First, let me wish the developer community a Happy New Year! We hope to bring you many good things this year, and today I'd like to introduce the latest version of the Intersystems Language Server extension to VS Code. Most Language Server improvements are experienced via the ObjectScript extension UI, so you many not be aware of the many improvements in areas like Intellisense and hover overs that were released throughout 2024. Please take a quick read over the Language Server's CHANGELOG and find out what you missed. Most recently, version 2.7.0 brings support for the Windows ARM platform,
In this article, exceptions are covered.
Working with Exceptions
Instead of returning a %Status response, you can raise and throw an Exception. You are then responsible for catching the exception and validating it. IRIS provides five main classes to handle exceptions effectively. Additionally, you can create custom exception class definition based on your needs.
Hi,
I found an issue while fetching records from FHIR DB, I am getting below error thou FHIR repository have the records with the corresponding id
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "not-found",
"diagnostics": "<HSFHIRErr>ResourceNotFound",
"details": {
"text": "No resource with type 'Appointment' and id '21'"
}
}
]
}
Hello All,
I need help Integrating the vendor-provided code into the current code to check if the data is an array and if it is, iterate through each item using a for each loop. Also, I need to hit every error handler code mentioned at the bottom along with the transform in both instances.
My Current Code:
/// Given a patient number in a JSON string format, this includes required transformations and makes use of
/// the MPI Query Handler to pull basic demographics from Epic.
Class CUH.Proc.DCIQGetPatient Extends Ens.BusinessProcessBPL [ ClassType = persistent, ProcedureBlock ]
{
Hello,
I'm trying to add another segment to an HL7 MDM message. More specifically OBXgrp(1).OBX. The addition itself works,. When I look at the message in the trace, the segment with the content can be seen. However, it is not displayed as an OBX segment.
Build Map Status = 'ERROR <EnsEDI>ErrMapRequired: Missing required OBXgrp(1) element at segment 6'
'ERROR <EnsEDI>ErrMapSegUnrecog: Unrecognized Segment 6:'' found after segment 5 (TXA)'
We have a vendor that can only send us a uu-encoded PDF. Is there a way to decrypt it in Ensemble?
Thanks
Scott Roth
The Ohio State University Wexner Medical Center
Hi Everyone!
The Certification Team of InterSystems Learning Services is currently 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 the other exam, InterSystems IRIS Developer Professional exam, here.
In the previous article. Practices of class members and their execution within embedded Python. We will now turn our attention to the process of switching namespaces, accessing global variables , traversing and routine executions within embedded Python.
Before proceeding to the other functions. let us briefly review the execute function within the iris package. This function is exceptionally beneficial for executing the arbitrary ObjectScript functions and class invocation.
I inherited some legacy MUMPS / ObjectScript code. A code review identified an exclusive NEW and that is not allowed per our coding standards.
The original code contains:
RUN(CALL,DRVNAME)
S $EC=""
S ^TMP($J,"RMPV","DRVNAME")=DRVNAME
N TMPFILE,OLDIO
S OLDIO=$IO
I $G(^TMP("RMPV","SILENT"),1) S IOP="NULL",%ZIS=0 D ^%ZIS I '$G(POP,1) U IO
D INIT^@DRVNAME
D ; scope variables
.N (DUZ,CALL) ; Protect %response
.S IOF="""""",IOM=80,U="^"
.D @CALL
U OLDIO
Q
I attempted to replace Exclusive NEW with a ClassMethod in a procedure block as follows:
Hello everyone! This is my first post into the developer community and one that I hope is fairly simple to answer. In our environment we currently have 3 different Test environments for testing before migrating code to our Prod environment. Currently we are working on establishing a source control method using Git in house which has been a bit of a struggle. We have also had developers that had used different test and migration methods in the past which has caused some issues with keeping the different test environment in sync.
Hello,
Is there a single ObjectScript operator or method to concatenate two %DynamicArrays?
I'm looking for something that will do the following:
set arr1 = [ 1, 2, 3 ] set arr2 = [ 4, 5, 6 ] set arrcombined = arr1.%Concatenate(arr2)
or
set arrcombined arr1_arr2
With end result:
zw arrcombined arr1=[1,2,3,4,5,6] ; <DYNAMIC ARRAY>
I can iterate and %Pop over the 2nd array and %Push each popped entry to the 1st array, but I was looking for something more succinct.
Thanks in advance.
Everytime I try to send a POST FHIR bundle I'm getting the following response: 404 Not Found. I'm not really sure why, although it works fine with a GET!
This is an example:
Response:
It might be something related to request path but not really sure.
And this is the HTTP service I'm using
I tried this with Postman and it's working as expected
Am I missing something ?
As part of a migration project from a bunch of java classes to IRIS, we need to maintain a few jar files due to some external dependencies.
The problem I am seeing is that I cannot pass a byte array ( byte[] ) from ObjectScript to the Java Class. I have tried a number of different ways
I have reproduced in a java class and Objectscript class:
Java Class:
InterSystems has corrected a defect that causes invalid database and journal records to be introduced when using a specific $LIST syntax. The likelihood of encountering this defect is very low but the operational impacts can be significant.
Products Affected
In tracking down some of our Orphaned message issues, I was wondering if setting our EnsLib.SQL.Snapshot variable equal to "" was the same as calling the .Clean() method on EnsLib.SQL.Snapshot? Are they the same?
should I be possibly using ##class(EnsLib.SQL.Snapshot).%Delete() instead?
I'm sure I've seen this issue reported before, but a search hasn't turned it up.
This appears to happen randomly, but once it starts it doesn't seem to stop ... at least for a while. I attempt to compile a class and compilation fails but produces no error explaining why. Here's an example:
The last two compilation errors repeat indefinitely (or at least until I've found and fixed the issue), but I can open the class in Studio, compile, and get the error information in the output panel every time. The compilation qualifiers are the same in both.
Hello
I am trying to work with UDP Connection/Adapter and I get this error.
Here is the method
Hey Community,
Our huge thanks to everyone who participated in the Advent of Code 2024! We're pleased to present the participants and distribute all the prizes.
Our congratulations to these developers who have finished all tasks:
🥇 @Abdul Manan (w/ repo)
🥈 @Yuval Golan (w/ repo)
Here's the final InterSystems leaderboard:
Hi Community,
The Season's holidays are fast approaching, and it's time to get ready for them! Join the Advent of Code 2024 with InterSystems and engage in our ObjectScript challenge!
.jpg)
I'm attempting to build a fairly complicated object graph, with nested objects and collections, in order to create a FHIR bundle.
In its most basic form there is a <bundle></bundle> element that represents the root, and there can be a number of nested <entry></entry> child elements.
I'm attempting to represent this as such:
class Bundle (%RegisteredObject, %XML.Adaptor)
{
Property Entries As List Of Entry;
}