Hey Developers,
New video is already on InterSystems Developers YouTube channel:
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.
Hey Developers,
New video is already on InterSystems Developers YouTube channel:
Hi Folks,
I created a persistent class as below
Class myclass.DataBase Extends %Persistent
{
Property ID As %String;
Property Skill As list Of myclass.SerialTablelist;
}and Created another Serial class as
Class myclass.SerialTablelist Extends %SerialObject
{
Property PSkill As %String;
Property OSkill As %String;
}Now I will save the id as below
do rs.Prepare("Insert into myclass.DataBase(ID)VALUES(?)")
do rs.Execute(ID)I am facing issue with the AS LIST OF
Could any one guide me how to save the Skill (PSkill ,OSkill ) using resultset (I am able to )
Hi all - we just released the first episode of Season 2 for our Data Points podcast by Learning Services. This episode features a conversation with @Bob Kuszewski about Embedded Python. If you're a Python developer, or if you're simply interested in the functionality, check it out! For more information, head over to https://datapoints.intersystems.com.
I'm trying to write a method that runs an OS command with $zf(-100,"/ASYNC") and then waits for it to finish before returning, but I can't figure out how to check if the child process (in $zchild) is still running. $System.Process.State($zchild) always returns "RUN" even once the child process is gone. Is there some better way to check this, short of running another OS-specific command and processing the output (which is just really annoying and unelegant)?
Hi, I am trying to work with visual studio with the extensions offered by InterSystems, but I can't find any option to work locally, is there any way to do it?
Hi,
I am using VSCode together with IRIS 2021.1.
When using Shift+Alt+F to reformat a class file, it pops up with the below message. When I select install formatter, it routes me to the extensions page, where it shows the extensions as being installed. Any advice will be appreciated.
Currently running Ensemble on Red Hat Enterprise Linux Server release 7.7
One of our clients is requesting files sent to their SFTP site be encrypted with their PGP public key and digitally signed with our PGP private key
We have created a custom class that includes the following command to encrypt the files
if (pAction = "Encrypt") {
// Find the Key ID from the Keyname
set tKeyId = ..GPGKeyLookup(pKeyName, ..#PUBLICKEYLUT)
set tCmdLine = "gpg --homedir "_pGPGhomedir_" --always-trust -r """_tKeyId_""" -o "_pOutFileName_" -e "_pInFileName
}
// Execute the command to generate the output file
For some years I missed being able to offer, to everybody interested in ObjectScript, a tutorial more or less complete, to start with ObjectScript. Something that could help more and make things easier to those new developers that come to our technology... something intermediate, halfway between the common "Hello World!", that doesn't really get you further, and the "Advanced Training", that is unaffordable because of lack of time,etc.
If there were something truly helpful not only as an introduction to the ecosystem, but as a starting point, as a boost, to really start to walk into ObjectScript and move forward by yourself... wouldn't that be awesome?
If you develop in IRIS you are confronted with two major phenomena:
Is there some generic way to output a %SQL.StatementResult to CSV?
Hi Developers
As you know it's very easy to publish a package to the Developers Community registry.
But how to test it before publishing? How to be sure that everything you introduced into module.xml is installed properly?
See the step-by-step instruction below!
Hey Developers,
Ready to participate in our annual December competition?
Join the Advent of Code 2021 with InterSystems and participate in our ObjectScript contest to win some $$$ prizes!

So I've been reviewing a lot of questions posted in the InterSystems community regarding NULL properties in JSON. I've also been reviewing the JSON documentation. None of these things have been able to help me so far.
1. We don't seem to have the %JSON.Adaptor class available for us to use in our system.
2. I'm not really confident enough to create JSON Type classes or backporting code, etc.
I created a dummy class and I need my JSON to look like this:
{
"notanumber":"28001",
"aboolean":true,
"anumber":12345,
"adecimal":1.
Hi Devs!
Recently, I needed to create templates for newsletters.
I couldn't find any tools, so I decided to use the CSP (Caché Server Pages) to build the templates.
Let's figure out how to make a newsletter similar to Weekly OEX Digest.
.png)
Weekly OEX Digest
There are strict requirements for HTML email messages.
Basic requirements:
The XData (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_XDATA) is a powerful feature to set documentation and metadata information for classes and methods. The %CSP.REST class uses XDATA to mapping REST calls (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GREST_csprest), so in this article you will see how to use XData into your apps as code, not only as documentation.
When you write XData comments/definitions, the IRIS store it into %Dictionary.ClassDefinition (for classes) %Dictionary.MethodDefinition (for methods).
Hi
I'm using a class which extends
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> </soap>
However, I don't see how to do this with the code I have. So far, I have
Class GMMHTIE.Docman.Messages.Request.RequestWrapper Extends (%Persistent, %XML.Adaptor) { Parameter XMLNAME = "soap:Envelope"; Parameter NAMESPACE = "http://www.w3.
We have a couple of systems that send us a URL link to a PDF instead of base 64 encoding it in the HL7 message. Has anyone ever tired to take that URL, and retrieve the file off of the server to save it off somewhere?
Hey Developers,
Thanks to everyone for participating in the Advent of Code 2021and coding in InterSystems ObjectScript! We're pleased to introduce the winners and distribute all the prizes!
Big applause goes to these developers:
@Yuval Golan(w/ repo)
@Oliver Wilms(w/ repo)
We'd also like to reward another developer who conquered Embedded Python and made all 25 challenges on it. Please welcome:
@Robert Cemper (w/ repo)
Hi Developers,
New video is already on InterSystems Developers YouTube:
⏯ Embedded Python for ObjectScript Developers: Working with Python and ObjectScript Side-By-Side
Setting the Scene
I was editing the properties of a persistent ObjectScript class the other day and noticed that the storage definition wasn't updating to reflect my latest changes.
In this case, I deleted a property that was no longer needed from the class definition, saved, recompiled, and still saw it in the storage definition.
No problem, I thought. If the storage definition gets autogenerated on compile, I can just delete it and recompile the class. Sure enough, after doing this, I no longer saw the deleted property in the storage definition.
There, problem solved.
I've found a couple of methods that will tell me whether a package is mapped from another database, but not which database. Is there such a method/routine?
Class Audit.ModifiedTracker [ abstract ] {
/// Last time this record was saved
Property LastModifiedTime As %TimeStamp [ SqlComputeCode = {Set {*}=$zdt($zts,3)}, SqlComputed, SqlComputeOnChange = ("%%INSERT", "%%UPDATE") ];
/// User responsible for modifying record
Property LastModifiedUser As %String [ SqlComputeCode = {set {*} = .Hi folks!
I'm curious if it is possible to change the class method to another class?
I call a method of a system class to generate another class. But there is a bug/feature in a library class, so I need to tweak a bit the generated method, e.g. add additional parameter and change the line to "if" the parameter.
I hope to do this programmatically after class generation and change the code in a way I like.
What are the options?
Hey InterSystems Community,
I noticed something interesting in regards to business rule editing. Whenever you use the Management Portal or Studio to edit a business rule, the " characters gets escaped to a ".
.png)
Which results in the following code:
.png)
As long as you are not mixing development styles - as in, sticking to only the UI or only the code, it is not a problem. But as soon as you mix both, the escaping starts to hinder readability of the rules a bit. I noticed that this is not the case with other interoperability features, like data transformations.
I need to store an equivalent of the SNN (Social Security number). I need it to be encrypted and I'll have to be able to search for it once stored.
For what I've seen my options are:
- SHAHash from the %system.encryption library. Simple and easy to implement. My question is, might collisions be a problem? We are talking about a 10 millions entry.
- AES encryption. In this case I'd like to know if there is a standard way for key management in the InterSystems environment.
I can eventually get a certificate for this project to use other encryption function as well.
Open to suggestions.
Hi Dev Community,
I have a persistent Document class that has a FileName string property and another Question class that has an optional one-to-many relationship with Document.
I'm trying to add a SqlComputed property to the Question class (docFileName) where docFileName = Document.FileName if there is a related Document or an empty string if there isn't one.
I'd prefer the property to be SqlComputed so that if Question.Document changes, Question.docFileName will automatically update.
Does anyone know the syntax for accessing the properties of a related object in the SqlComputeCode?
Thanks!
Hi all,
I'm trying to output a XML file, mapped from a ORU_R01 2.3 HL7 message, with a file name based of fields in the source HL7 message in the following format,
source.{PIDgrpgrp(1).PIDgrp.PID:PatientIDInternalID(1).ID}_"-"_
source.{PIDgrpgrp(1).PIDgrp.PV1grp.PV1:VisitNumber.ID}_"-"_
source.{PIDgrpgrp(1).ORCgrp(1).OBR:ObservationDateTime.timeofanevent}
To give something like RXR0000000-000000123-20211125105415.xml as the output filename,
I initially tried to extend the EnsLib.XML.Object.Operation.
.png)
Welcome to day 3 of Virtual Summit 2021! We have incredible content available to you this year and I'd just like to bring your attention to the 4(!) sessions that we have on Embedded Python.
Hello,
I am trying to pass a pattern in the Ensemble function Matches(val,pat) in Business Rule as below.
Eg.
Matches(tSite,
tSite is a variable containing the site name
Want to check if the variable contains any of the site name.
But i receive a parsing error when compiling.
Is there another way to pass the pattern in the Matches function or any other similar function which i can use in the business rule or DTL without multiple sentences with Contains.
Thanks,
Jimmy Christian.
Hi all,
I'm using a snippet I found from Scott Roth to extract, decode, and save a PDF from a HL7 message and save it to a specified file path, but I'm running issues with the following error:.png)
My approach was to a create a utility function accessible from a DTL like this:
Class ELHTPRODPKG.Functions.Utility.ExtractPDF Extends Ens.Rule.FunctionSet
{
ClassMethod DecodeBase64HL7(base64 As %Stream.