The ability to resend messages easily has always been a strong feature of our Interoperability capabilities.
With v2024.3 coming out soon (available already now as Developer Preview) out already we've made this even easier!
Pieces of experience in InterSystems Technology which solve some particular problem in elegant or unusual way.
The ability to resend messages easily has always been a strong feature of our Interoperability capabilities.
With v2024.3 coming out soon (available already now as Developer Preview) out already we've made this even easier!
As we keep updating our software, we often realize that we require more and more modern solutions. So far, only one major piece of our software relies on reading barcodes in documents and images. Since Cache did not have a means of reading barcodes in the past, we have always achieved our goals by using a Visual Basic 6 application. However, it is no longer an ideal solution because it is currently complicated to maintain it. IRIS also lacks this capability, but it has recently got an option that makes up for it: embedded Python!
By default, the order of columns in a table is determined automatically by the system. To change the order, explicitly set the order for each property using the property keyword SqlColumnNumber when defining the class.
Example:
Property Name As %String [SqlColumnNumber = 2];
Please see the documentation below.
If you want to change the SQL table name, specify SqlTableName. If you want to change the column name (field name), specify SqlFieldName.
Both apply only to persistent classes.
I am just writing something to share what I encountered last night, which is the IRIS 2024.3 does not comes with Python by default any more!!!
Which means that I need to install it by myself!!😅 The pros is, I can select my python version😁🤭💃 The trouble is.... at the first place.... I don't know what I should do😥. By going through the community (I am much more prefer than the official document, sorry InterSystems document team😓 ), I found the following piece
https://docs.intersystems.com/iris20242/csp/docbook/DocBook.UI.
I was working on a DTL but kept getting ERROR #5002... MAXSTRING errors. The problem was that most of the DTL GUI action steps only support the string data type when working with the segments. A %String has a limit of 3,641,144 characters and my OBX5.1 was 5,242,952 characters long as the example provided. Of course PACS admin stated ultra high quality up to and including 4K resolution files were needed, so we could not get the vendor to compress or reformat these files to compressed jpg or something similar.
.png)
Initially this vendor sends a 2.3 ORU^R01
Many programming languages use the try-and-catch construct to handle runtime errors gracefully. If the code within the try block encounters an error, it will throw an exception to the catch block, where the error handling occurs. Today we will dive into the ObjectScript implementation of this construct and discuss some ways to clean things up.
In the business world, every second counts, and having high-performing applications is essential for streamlining our business processes. We understand the significance of crafting efficient algorithms, measurable through the big O notation.
Nevertheless, there are numerous strategies to boost the performance of systems built on the IRIS Data Platform. These strategies are equally crucial for optimizing overall efficiency.
Let's join the journey for a sneak peek into the tips for making IRIS Data Platform work better, where every little trick will help your applications shine.
1.
There are many applications for working with HL7 V2 messages, but the tools for working with XML in IRIS Management Portal and Cache Studio are limited. While plenty of external utilities and IDEs work with XML messages and even C-CDA documents, there is a compelling case for being able to test directly against the IRIS C-CDA framework.
Testing within the IRIS environment provides the necessary context:
We are doing healthcare interface development.
Developers have Ensemble installed locally on their laptops - code will be developed locally then deployed to integration, test/UAT and ultimately production servers in due course.
One of the other applications we are developing around happens to utilise an Iris desktop client to a remote Iris server. We want to have the application available on the developers laptops alongside the local Ensemble instance.
✅ It appears that if we install their desktop client then install our local Ensemble server, things work.
On Windows, this cannot be changed, but on Unix-like platforms, it can be changed using the iris rename command.
iris rename instname(<current instance name>) newname(<new instane name>)
For more information about the iris rename command, please refer to the following document:
There's an easy new way to add certificate authority (CA) certificates to your SSL/TLS configurations on InterSystems IRIS 2019.1 (and 2018.1.2) on Windows and Mac. You can ask IRIS to use the operating system's certificate store by entering:
%OSCertificateStore
in the field for "File containing Trusted Certificate Authority X.509 certificate(s)". Here's an image of how to do this in the portal:

And here's a link to the documentation which describes this. It's in the list of options under "File containing trusted Certificate Authority certificate(s)".
That's all you need to do!
Hi,
Is there a way to set the SettingSchedule on a EnsLib.File.PassthroughService at 9:00 am to 9:30 am but only end of the month?
I can START and STOP a business process via its Schedule setting.
Is it possible to change the value of another Setting in an analogous way?
I can imagine a SettingSchedule that could look like
action:YYYY-MM-DDThh:mm:ss[,action:YYYY-MM-DDThh:mm:ss]
But rather than just START or STOP, action could be "SET Setting = value", overriding whatever the normal value is.
Is there an existing way of achieving this kind of functionality?
I've got a business process that triggers from a scheduled task, and sends documents to a downstream system according to business requirements.
For those of you who still use the Studio IDE for ObjectScript programming and are going through the process of migrating to VS Code, did you know there's a section in the VS Code documentation just for you? Have a look at the Migrating from Studio chapter. It covers:
And now there's a new section, Keyboard Shortcuts, that shows you the VS Code equivalent for shortcuts you may be used to, so your hands never have to leave the keyboard.
The following code downloads https://www.intersystems.com/assets/intersystems-logo.png and saves the file as c:\temp\test.png.
You need to define an SSL configuration called SSLTEST before executing this code
ClassMethod download() As %Status
{
Set sc = $$$OK
Set httprequest=##class(%Net.HttpRequest).%New()
set httprequest.Port = 443
set httprequest.Https = 1
set httprequest.SSLConfiguration = "SSLTEST"
Set httprequest.Server="www.intersystems.com"
Do httprequest.Get("/assets/intersystems-logo.png")
Set httpresponse=httprequest.Temporary globals stored in the IRISTEMP/CACHETEMP databases are used when a process does not need to store data indefinitely, but requires the powerful performance of globals. The IRISTEMP/CACHETEMP databases are not journaled, so using temporary globals does not create journal files.
The system uses the IRISTEMP/CACHETEMP databases for temporary storage and are available to users for the same.
For more information about temporary globals and the IRISTEMP database, see the following document:
Temporary Globals and the IRISTEMP Database
If you do not specify the option to remove the mirror attribute of the mirror database when deleting the mirror configuration, the database cannot be restored to a normal state and will be mounted read-only the next time it is mounted. To restore the database to a read-write state, you must remove the mirror attribute using the system routine ^MIRROR.
As a part of the IRIS Python 2024 contest, my colleague Damir and I went with an idea to build a platform called ShelterShare for connecting victims and volunteers for shelter requests . To do so we chose django as a framework and proceeded to build the first version with 3 different docker containers, django, iris and nginx which would then utilize IRIS as a pure Database engine via the beautifly composed django_iris (cudos to Dimitry). As we were progressing fast, we decided to explore the option of running it within the same container as IRIS by utilizing WSGI added in 2024.1.
There are two great WRC best practice articles Ensemble Orphaned Messages | InterSystems Developer Community | Best
and the delete helper post DeleteHelper - A Class to Help with Deleting Referenced Persistent Classes (intersystems.com)
that go into orphaned records and how to deal with orphans.
Here, we will introduce a sample code for registering and referencing task schedules.
①Sample of task schedule registration
*Create a task to execute do ^TEST every day at 1:00 am.
set task=##class(%SYS.Task).%New()
set task.Name="MyTask1"
set taskDescription="Execute ^xxx every day at 1:00 AM" // Optional
set task.NameSpace="USER"
set task.TimePeriod=0
set task.DailyFrequency=0
set task.DailyFrequencyTime=""
set task.DailyIncrement=""
set task.DailyStartTime=$ZTimeh("01:00:00")
set task.DailyEndTime=""
set task.TaskClass="%SYS.Task.RunLegacyTask"
set task.
To compile class routines including the mapped modifier, specify the compiler modifier "/mapped=1" or "/mapped". For example, do the following:
[Example 1] Get the class list and compile
do $System.OBJ.GetClassList(.list,"/mapped")
// build your classes starting from .list
do $System.OBJ.Compile(.list) [Example 2] Compile all classes
do $system.OBJ.CompileAll("/mapped") Use the ErrorList query of the SYS.ApplicationError class.
An example of command execution is as follows.
USER>set $namespace="%SYS" //equal to zn "%SYS"
%SYS>set rset=##class(%ResultSet).%New()
%SYS>set rset.ClassName="SYS.ApplicationError"
%SYS>set rset.QueryName="ErrorList"
// The first argument of the query is the namespace name, the second argument is the date (in MM/DD/YYYY format).
%SYS>do rset.$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.
SAMPLES>write $SYSTEMUtil.You can use the List query of the %SYS.Audit to output audit logs programmatically.
The sample code is as follows:
Set statement=##class(%SQL.Statement).%New()
Set status=statement.%PrepareClassQuery("%SYS.Audit","List")
Set rs=statement.%Execute()
Set tab = $char(9)
While rs.%Next() {
Write rs.%Get("TimeStamp")_tab_rs.%Get("Event")_tab_rs.%Get("Username"),!
}The procedure for uploading/downloading from an FTP server is as follows.
1. Upload the image file to the FTP server
set tmpfile="c:\temp\test.jpg"
set ftp=##class(%Net.FtpSession).%New()
// connect to FTP server
do ftp.Connect("","<username>","<password>")
// set transfer mode to BINARY
do ftp.Binary()
// Move to the directory to upload
do ftp.SetDirectory("/temp/upload")
// Prepare a stream of files to upload
set file=##class(%File).%New(tmpfile)
do file.
If you want to run an OS executable file, command, or a program created within an InterSystems product when the InterSystems product starts, write the processing in the SYSTEM^%ZSTART routine. (The %ZSTART routine is created in the %SYS namespace).
Before you write any code in SYSTEM^%ZSTART, make sure that it works properly under all conditions.
If the ^%ZSTART routine is written incorrectly, or if it is written correctly but the command does not return a response or an error occurs during processing, InterSystems products may not be able to start.
To disable the timeout, set the query timeout to disabled in the DSN settings:
Windows Control Panel > Administrative Tools > Data Sources (ODBC) > System DSN configuration
If you check Disable query timeout, the timeout will be disabled.
If you want to change it on the application side, you can set it at the ODBC API level.
Set the SQL_ATTR_QUERY_TIMEOUT attribute when calling the ODBC SQLSetStmtAttr function before connecting to the data source.
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.
Hi Community,
We're pleased to invite you to the upcoming webinar in Hebrew:
📅 Date & time: May 21st, 3:30 PM IDT
In our previous article, we explored how to send emails through Microsoft 365 using the Graph API. Since then, an anonymous client reached out to me about setting up some other methods of notifications through that API. He was particularly interested in Outlook’s tasks and calendar events.
If you still have your client ID, client secret, and application ID from the last exercise, you may continue utilizing them. We will reuse the globals we stored from before with the GetToken method. Most of the setup in Microsoft Entra will not need to be repeated.