We need to resize existing images already in %GlobalBinaryStream to create thumbnails.
The requirement is also to use the method to resize new images that are uploaded.
Does anyone have a solution for this ?
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.
We need to resize existing images already in %GlobalBinaryStream to create thumbnails.
The requirement is also to use the method to resize new images that are uploaded.
Does anyone have a solution for this ?
Is there a way to add specific table permissions to a security role programmatically? I'm working on scripting some of the initial setup work when we sell certain add-ons to our software, and I see how I can assign resources to a role and give it a description, but I don't see how I tell it that this role gives the user, for example, SELECT privileges only on the invoices table, or SELECT, INSERT, UPDATE, and DELETE.
Hi Community ,
Can anyone please explain how to use EnsLib.EMail.AlertOperation operation to send notification to my email id when any error occurs in my production?
Please give any example how to use EnsLib.EMail.AlertOperation operation class
Thanks,
Smythee
The topic of for/while loop performance in Caché ObjectScript came up in discussion recently, and I'd like to share some thoughts/best practices with the rest of the community. While this is a basic topic in itself, it's easy to overlook the performance implications of otherwise-reasonable approaches. In short, loops iterating over $ListBuild lists with $ListNext or over a local array with $Order are the fastest options.
As a motivating example, we will consider looping over the pieces of a comma-delimited string.
Hello
I have a class to render reports as pdf. My problem that arabic characters in report replaced with ####.
Please find my code below
set report.RUID = RUID set %response.ContentType = "application/pdf"
set sc = report.GenerateReportToStream(.stream, 2) return:$$$ISERR(sc) sc
do stream.OutputToDevice()
return $$$OK
Your help is appreciated.
Hello all; I am using a one-to-many relationship. I have a Claim (one), in a relationship with Lines (many), but the Claim is storing a list of Lines IDs, rather than the Lines storing the Claim Id. This seems upside down, and not what I expected.
Class Claim
{
Relationship ClaimLineRel as ClaimLine [Cardinality = many, Inverse = Claim];
}
Class ClaimLine
{
Relationship Claim as Claim [ Cardinality = one, Inverse = ClaimLineRel, OnDelete = cascade];
Index ClaimIndex on Claim;
}But the storage globals for Claim show data in the ClaimLine spot:
^ClaimD(1)=$lb("",$lb(2,3).
Good morning, evening, night,... ![]()
A small reflection/question for today... it's true that new IRIS for Health (I4H) releases are more and more powerful each time regarding FHIR capabilities. Nowadays it allows us to consume FHIR resources with extrem easiness, we can connect with end-points in external FHIR servers very easily and make I4H act as passthrough or consume their resources... or, even more, we can define, configure and run a FHIR repository in, literally, less than 5 minutes.
Hi all.
I have a scenario where I am receiving NACKs and I'd like to adjust the error handing of the operation based on the content of the NACK.
For example, I could receive the following and want to move onto the next message:
MSH| ^~\&|||||20221025083135.489+0100||ACK ^A02^ACK|9271|D|2.5.1 MSA|AE|1664378390234 ERR|||207 ^Application internal error ^HL70357^^^^^^Cannot transfer patient, encounter is cancelled.|E
However, I could also receive the following and want to keep retrying:
MSH| ^~\&|||||20221014103828.043+0100||ACK^A03^ACK|1049|D|2.5.
Hi ,
Still a newbie for ensemble, I am trying to convert XML message to HL7 Message. I am using Custom schema for XML structure which includes MSH and PID segments from HL7 Message.
These are the service, process, Operation classes i am using
Business service-EnsLib.EDI.XML.Service.FileService
Business Process-EnsLib.MsgRouter.RoutingEngine
Business operation -EnsLib.HL7.Operation.FileOperation
I am using data transformation to convert XML message to HL7 message and data transformation is working fine and im getting this in the business operation.
Good men don’t need rules.
The Doctor.
It's not an easy task to be a master of dates and times, it is always a problem and sometimes confusing in any programming language, we are going to clarify and put a few tips to make this task as simple as possible.
Get on the TARDIS and I'm going to turn you into a Time lord

Hello,
I am trying to grab a specific zip file from a webpage but once I grab the zip file I need to grab a specific file within that zip file and I was hoping someone could explain how to do this or provide an example
With $Property is possible to dynamically get and set values on property of an instanced class and with $ClassMethod is possible to invoke methods from a class.
I would like to know: Is there an elegant way to do Write and Set dynamically on variables without using Xecute?
Hi everyone,
I'm having trouble parsing XML containing unicode characters which I receive from an external webservice. I believe my file is saved properly with UTF-8 encoding but the SAX Parser still throws me an error.
I have 2 classmethods: 1 general one (get) to make a request to a webservice and return the date, and 1 (getSportsPerDate) to make a specific call and then parse the data.
ClassMethod getSportsPerDate(language As %String, date As %String) { #dim cResponse As betradar.uof.api.descriptions.schedule.scheduleEndpoint #dim res As %Stream.FileCharacter s res=.
Hi, devs!
Consider you have an arbitrary global with an unknown amount of indexes.
How to print all the values to the terminal with Embedded Python?
Hi folks!
I'm working with a global via Embedded Python as a class method. I init the handler for a global via:
gl=iris.gref("^Global")What is the way to check the value at index ^Global("x","y")? E.g.:
In ObjectScript I'd do the following:
set result=$data(^Global("x","y"))How do I do the same in Embedded Python?
I checked the documentation, but haven't found an answer.
Breakpoints do not work when using VS Code Debug this method feature on a ClassMethod. Debug runs like normal and I can sometimes see 'running' on the CALL STACK menu. In the BREAKPOINTS menu, the breakpoints will start red, like normal, but eventually turn gray. On-hover for a grey breakpoint is the message "Breakpoint Cannot Be Mapped". After the method finishes, the breakpoint turns red again. No error messages appear. This is an intermittent issue, as sometimes it runs fine. So far, I have not been able to figure out the conditions to re-create this issue.
Any suggestions?
If your handling XML then it can often be unformatted for human display.
Using a little bit of XSLT magic you can format the XML in just two lines of code...
When using VS Code for Objectscript, is there a way to directly open % classes, like %Library.String, without needing to search for a property of that type and right clicking->"Go to Definition"?
I know it is possible to use "system=1" in the workspace uri definition to see all the % classes, but that tends to clog up the left side viewer with many extra directories. There is also the option in the settings to selectively hide some by defining files.exclude, but it seems fairly complicated to set up a filter for exactly the relevant directories.
So does anyone know the best workaround?
Hey Developers,
Meet the latest video on InterSystems Developers YouTube:
⏯ Configuring VS Code Workspaces for Multiple ObjectScript Connections
Hi, ObjectScript experts!
I know that there are auto-generated getter and setter methods for class properties in ObjectScript.
Are there auto-generated getter methods for class parameters?
Hi folks!
We have a bunch of templates on OEX that provide a handy foundation for building a particular application with IRIS. And the basic principle of each and every template is that we take vanilla IRIS images, load code, and files into the image using Dockerfile, and create a new docker image as a solution. And then we develop running this image and rebuilding it when returning to development.
Some developers ask me why we need to build the docker image to work with the code. Indeed, if at the end of the day I need to develop a ZPM package and not a docker image why don't run the vanilla image and load the code and everything in it?
The problem I have with the building image approach is that often I can wait a lot to build an image and it fails on some Objectscript problem in the source that I cannot fix as the image is not building. and
Any thoughts? How do you develop with docker?
Hi,
My routine contains embedded SQL including this:
The error "SQLCODE=-52 : Cursor C10 already declared" comes up on compilation in Studio. Does anyone know a way around it please?
Bob
If you’re on the fence about learning InterSystems ObjectScript, we’re making the decision a whole lot easier.
We just updated the “Getting Started with InterSystems ObjectScript” learning path with 3 new 5-minute videos — and a capstone exercise to help you pull together everything you’ll learn.
🤝 Get an introduction to InterSystems ObjectScript
🤿 Dive deeper into commands and functions
🤔 Understand data types and variables
👨💻 Create a class definition
Do it all in our updated learning path, Getting Started with InterSystems ObjectScript.
Hey Community,
Don't miss the new video on InterSystems Developers YouTube channel:
⏯ Working with ObjectScript Classes in VS Code for Client Side Editing
Let's consider these two ways of passing an obj to a function:
//var is a structured obj (1) do ..methodX(var) (2) do ..methodX(.var)
In c++ if we pass an obj by reference like in (2) we save a lot in computation because we are not copying the whole object, and when the object is modified within the function it is modified also for everyone.
In this case does (2) achieve any better performance than (1)? Is passing with the "." save any computation? the object is copied anyway?
Is there a simple way of passing obj to a function?
InterSystems is proud to offer 50% discount on InterSystems Certification exams to all registered attendees of UK&I summit. Vouchers will be available at the registration desk.

Available Exams
Hello Community!
This article gives an overview of the REST JSON webservices developed for TrakCare.
These webservices allow users to access TrakCare data from outside of the software, mainly through external apps.
Hello,
I need to run some clean up routine in the background so loss of my terminal session won't stop the process.
I found the JOB command in the documentation.
JOB | ObjectScript Reference | InterSystems IRIS Data Platform 2022.1
When I try it, it doesn't seem to be doing much. I also expected this to become visible in the Background Tasks but that doesn't happen either.
Probably I am missing something.
This is the command I am running:
JOB ##class(HIHLib.Support.GetHL7MessageStat).ISBListingQuery("2017-01-01","2017-02-01",0,"WAHISCL",-1,0)::10
The same command without the ::10 has the same effect.
Hi All,
Can you help me how to extract SQL table data into a text file and generate the text file in a particular file path
Thanks,
Smythee
Is it possible to use integer with a higher precision so that something like this works:
ClassMethod BigNumbers()
{
Set bigInt1 = 9223372036854775807
Set bigInt2 = 9223372036854775808
W !,bigInt1
W !,bigInt2
Set bigInt3 = 9223372036854775807123456789
W !,(bigInt3 # 2)
}9223372036854775807
9223372036854775810 // should be 9223372036854775808
0 // should be 1The docs say ". However, with extremely large numbers (larger than 9223372036854775807E127) it is not always possible to convert a numeric string to a Decimal value.